$check = $obj->login($_POST); break; case 'verify': $check = $obj->verifyUser($_POST); break; default: $check = false; break; } $header = $check === true ? 'Location: /admin/' : "Location: /{$obj->url0}/error/"; } } } else { if ($_POST['action'] == 'cmnt_post') { $cmnt = new Comments(); $header = $cmnt->postComment(); } else { if ($_GET['action'] == 'cmnt_delete') { $cmnt = new Comments(); $header = $cmnt->deleteComment($_GET['bid'], $_GET['cmntid']); } else { if ($_GET['action'] == 'logout') { $admin = new Admin(); $check = $admin->logout(); $header = $check === true ? 'Location: /' : 'Location: /admin/error/'; } else { $header = "Location: /"; } } } }
public function post_action($id, $type, $backPage) { Comments::postComment($id, $type, $backPage); }
<?php include_once "topmenu.php"; include_once "properties/serverproperties.php"; include_once 'classes/Comments.php'; $isAjaxPage = true; $jsExec = ''; $receiverID = $_POST['receiver_id']; $senderID = $_POST['sender_id']; $content = $_POST['content']; $time = strftime('%c'); if (Comments::postComment($senderID, $receiverID, $content, $time)) { } else { } ?> <div style="display: none;"> <div id="inline1" style=""></div> </div> <a class="inlinecontent abshide" href="#inline1"> </a>