<?php
/**
* XS2:
*
* This file is developed by Solutecs, LLC for the purpose of the company
* and is provided together with XS2 Framework as and inherent part of the
* system. This file can be used on the terms of License Agreement.
*
* +7 (495) 585-0833 / 13 Rusakovskaya street, Moscow 107140 Russia
*
* @link http://www.solutecs.com
* @copyright ©1998-2007 Solutecs, LLC
* @package XS2-MODCOM
* @subpackage proc-blog
* @version 1.XX
*/
xs2Fetch(array('mod'=>'users','met'=>'lib'));
xs2Fetch(array('mod'=>'blog','met'=>'lib'));
$nodeId = $_THE['PARAMS'][0];
if ($_POST['action']=='addComment' && $GLOBALS['myBlog']['NodId']>0) {
xs2InsertNode(array('NType' => 'comment',
'NFlag' => 1,
'ParId' => $nodeId,
'Blog' => array('NodId'=> $GLOBALS['myBlog']['NodId']),
'NName' => $_POST['NName'],
'Text' => $_POST['Text']));
}
$message = xs2GetNode(array('NodId'=> $nodeId, 'NType'=>'message'));
$blog = xs2GetNode(array('NodId'=> $message['ParId'],'NType'=>'blog'));
$allComments = xs2GetChildren(array('ParId'=> $nodeId, 'NType'=>'comment'));
$_HTML->assign('blog', $blog);
$_HTML->assign('message', $message);
$_HTML->assign('allComments', $allComments);
?>
|
|