} // MAIN $list = $_FINPUT->post('list', ''); if ($list === SUFFIX_COMMENTS) { $suffix = SUFFIX_COMMENTS; } elseif ($list === SUFFIX_COMMENT_SUBMISSIONS) { $suffix = SUFFIX_COMMENT_SUBMISSIONS; } else { $suffix = ''; } $action = $_FINPUT->post('bulk_action' . $suffix, ''); switch ($action) { case 'bulk_approve': approveComments($suffix); break; case 'bulk_delete': deleteComments($suffix); break; case 'bulk_ban_user': banUsers($suffix); break; case 'bulk_ban_ip_address': banIpAddresses($suffix); break; default: // Do nothing here break; } $content = COM_showMessageFromParameter() . listComments(); $display = COM_createHTMLDocument($content, array('pagetitle' => $LANG03[100])); COM_output($display);
function viewArticle() { $articleid = $_REQUEST['articleid']; $article = getValidArticle($articleid); if (!$article) { h3("Fant ikke artikkelen."); } else { increment_view_count($articleid); table_open(); tr_open(); td_open(1); printArticle($article[0]); div_open("showarticlelink"); if (isset($_SESSION['valid_admin'])) { echo printAdminArticlesMenu($article[0]['articleid']); } else { if (isset($_SESSION['valid_user'])) { if ($_SESSION['valid_user'] == $article[0]['author_username']) { echo printAuthorArticlesMenu($article[0]['articleid']); } } } div_close(); td_close(); tr_close(); table_close(); makeAnchor("comments"); listComments($article[0]['articleid']); if (isset($_SESSION['valid_user'])) { makeAnchor("entercomment"); enterComment($article[0]['articleid']); } else { echo '<a href="javascript:viewLogin()">Logg inn for å legge inn kommentar</a>'; } } }
<?php if (!isset($_RESQUEST['id'])) { if (!($match = Uri::match('^post\\-(\\d+)\\-.*?\\.html'))) { Redirect::to('404page'); } $_RESQUEST['id'] = $match[1]; $id = $match[1]; } else { $id = $_RESQUEST['id']; } // print_r($_RESQUEST['id']);die(); $pageName = 'post'; $pageData = array(); $pageData['content_top'] = Render::content_top($pageName); $pageData['content_left'] = Render::content_left($pageName); $pageData['content_right'] = Render::content_right($pageName); $pageData['content_bottom'] = Render::content_bottom($pageName); Theme::model('post'); $headData = GlobalCMS::$setting; $pageData['commentAlert'] = sendComment(); // $pageData['categories']=categories(); $pageData = postProcess($pageData); $pageData['listComments'] = listComments($id); $headData['title'] = $pageData['title']; Theme::view('head', $headData); Theme::view($pageName, $pageData); Theme::view('footer');