Yesterday i succesfully implemented my security to the mainpage of the faq.
i implemented in line 384 below
//
// Load template files and set template variables
//
Code: Select all
include '../login/dbc.php';
page_protect();
Code: Select all
else if ((checkAdmin()) && ($_SESSION['user_id'])) {
$links_template_vars = array(
"faqHome" => $faqconfig->get('main.referenceURL'),
"msgSearch" => '<a href="index.php?'.$sids.'action=search">'.$PMF_LANG["msgAdvancedSearch"].'</a>',
"msgAddContent" => '<a href="index.php?'.$sids.'action=add">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="index.php?'.$sids.'action=ask">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="index.php?'.$sids.'action=open">'.$PMF_LANG["msgOpenQuestions"].'</a>',
"msgHelp" => '<a href="index.php?'.$sids.'action=help">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="index.php?'.$sids.'action=contact">'.$PMF_LANG["msgContact"].'</a>',
"allCategories" => '<a href="index.php?'.$sids.'action=show">'.$PMF_LANG["msgShowAllCategories"].'</a>',
"backToHome" => '<a href="index.php?'.$sids.'">'.$PMF_LANG["msgHome"].'</a>',
'showInstantResponse' => '<a href="index.php?'.$sids.'action=instantresponse">'.$PMF_LANG['msgInstantResponse'].'</a>',
'showSitemap' => '<a href="index.php?'.$sids.'action=sitemap&lang='.$LANGCODE.'">'.$PMF_LANG['msgSitemap'].'</a>',
"adminusers" => '<a href="index.php?action=useradmin">Beheer Gebruikers</a>',
"adminfaq" => '<a href="admin/index.php">Beheer FAQ</a>',
"loguit" => '<a href="../login/logout.php">Uitloggen</a>',
"mijnaccount" => '<a href="index.php?action=mijnaccount">Mijn Account</a>',
'opensearch' => $systemUri . 'opensearch.php');
}
else if ($_SESSION['user_id']) {
$links_template_vars = array(
"faqHome" => $faqconfig->get('main.referenceURL'),
"msgSearch" => '<a href="index.php?'.$sids.'action=search">'.$PMF_LANG["msgAdvancedSearch"].'</a>',
"msgAddContent" => '<a href="index.php?'.$sids.'action=add">'.$PMF_LANG["msgAddContent"].'</a>',
"msgQuestion" => '<a href="index.php?'.$sids.'action=ask">'.$PMF_LANG["msgQuestion"].'</a>',
"msgOpenQuestions" => '<a href="index.php?'.$sids.'action=open">'.$PMF_LANG["msgOpenQuestions"].'</a>',
"msgHelp" => '<a href="index.php?'.$sids.'action=help">'.$PMF_LANG["msgHelp"].'</a>',
"msgContact" => '<a href="index.php?'.$sids.'action=contact">'.$PMF_LANG["msgContact"].'</a>',
"allCategories" => '<a href="index.php?'.$sids.'action=show">'.$PMF_LANG["msgShowAllCategories"].'</a>',
"backToHome" => '<a href="index.php?'.$sids.'">'.$PMF_LANG["msgHome"].'</a>',
'showInstantResponse' => '<a href="index.php?'.$sids.'action=instantresponse">'.$PMF_LANG['msgInstantResponse'].'</a>',
'showSitemap' => '<a href="index.php?'.$sids.'action=sitemap&lang='.$LANGCODE.'">'.$PMF_LANG['msgSitemap'].'</a>',
"adminusers" => '',
"adminfaq" => '',
"loguit" => '<a href="../login/logout.php">Uitloggen</a>',
"mijnaccount" => '<a href="index.php?action=mijnaccount">Mijn Account</a>',
'opensearch' => $systemUri . 'opensearch.php');
}
But when i click on the search button it gives me a white page and does nothing, and when i try to login to the admin section it rederects me to the login part of the admin section

Code: Select all
faq/?searchcategory=%25&action=search&search=&submit=Zoeken