Advertisement
Guest User

PHP Code

a guest
Sep 25th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1.         $cAction = substr($_REQUEST['c'], 0, 3);
  2.          $getComment = $comments->getCommentById('comments', $cID);
  3.          
  4.          if ($getComment)
  5.          {
  6.            switch($cAction)
  7.            {
  8.              case 'rpl':
  9.                 $commentPoster = $users->getById($getComment['user']);
  10.                 $page->smarty->assign('showReview', 'true');
  11.                 $page->smarty->assign('msgUser', ( $commentPoster ? $commentPoster['username'] : Users::MEMBER_UNKNOWN) );
  12.                 $page->smarty->assign('msgReview', $bb_code->process($getComment['text']));
  13.              break;
  14.              case 'del':
  15.                $allow = $users->checkCurrentUserRights($getComment['user'], $page->userdata);
  16.                if ($allow)
  17.                {
  18.                   $this->deleteCommentById($cID, $viewData['id']);
  19.                   header("Location: /details/".$viewData['id'].DIRECTORY_SEPARATOR.$viewData['name']."?cset=".$cset."#comments");
  20.                 }
  21.              break;
  22.            }
  23.          }
  24.          else
  25.            $page->show404();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement