Ejemplo n.º 1
0
             $code = $nwObj->fetchNewswirePage(0, $currentPage);
             break;
     }
     break;
 case 'readStory':
     define("INIT_SESSION", true);
     include_once 'initialize.php';
     switch ($cmd) {
         case 'addComment':
             if (isset($_GET['siteContentId']) and isset($_GET['comments'])) {
                 $comments = $_GET['comments'];
                 $siteContentId = $_GET['siteContentId'];
                 if ($comments != '') {
                     require_once PATH_CORE . 'classes/comments.class.php';
                     $comObj = new comments($db);
                     $comInfo = $comObj->serialize(0, 0, $siteContentId, 0, $comments, 0, $db->ui->userid, $db->ui->memberName, '', 0);
                     // $db->ui->uid
                     $siteCommentId = $comObj->add($comInfo);
                     require_once PATH_CORE . '/classes/log.class.php';
                     $logObj = new log($db);
                     $logItem = $logObj->serialize(0, $db->ui->userid, 'comment', $siteContentId);
                     $logItem->itemid2 = $siteCommentId;
                     // djm: hack for now so I have it
                     $inLog = $logObj->add($logItem);
                     $code = 'Your comment has been posted!';
                 } else {
                     $error = true;
                     $errorMsg = 'Please enter a valid comment.';
                 }
             } else {
                 $error = true;