<link rel="stylesheet" type="text/css" media="screen,projection" href="tpl/stdstyle/css/style.css" /> <?php global $usr; if (isset($_REQUEST['ocController']) && $_REQUEST['ocController'] == 1) { session_start(); require_once __DIR__ . '/lib/Controllers/OcController.php'; $ocRouter = new \lib\Controllers\OcController(); $ocRouter->run($_REQUEST); exit; } //prepare the templates and include all neccessary if (!isset($rootpath)) { $rootpath = __DIR__ . DIRECTORY_SEPARATOR; } require_once './lib/common.inc.php'; //Preprocessing if ($error == false) { //set the template to process $tplname = 'start'; // news require $stylepath . '/news.inc.php'; $newscontent = '<div class="line-box">'; $rs = sql('SELECT `news`.`date_posted` `date`, `news`.`content` `content` FROM `news` WHERE datediff(now(), news.date_posted) <= 31 AND `news`.`display`=1 AND `news`.`topic`=2 ORDER BY `news`.`date_posted` DESC LIMIT 4'); if (mysql_num_rows($rs) != 0) { $newscontent .= $tpl_newstopic_header; } while ($r = sql_fetch_array($rs)) { $news = '<div class="logs" style="width: 750px;">' . $tpl_newstopic_without_topic; $post_date = strtotime($r['date']); $news = mb_ereg_replace('{date}', fixPlMonth(htmlspecialchars(strftime("%d %B %Y", $post_date), ENT_COMPAT, 'UTF-8')), $news); $news = mb_ereg_replace('{message}', $r['content'], $news);
<?php require_once __DIR__ . '/lib/common.inc.php'; if (!isset($_SESSION['user_id'])) { print 'no hacking please!'; exit; } else { $ocController = new lib\Controllers\OcController(); $request = $_REQUEST; $result = $ocController->removeLog($request); echo json_encode($result); }