if (function_exists($function_op)) { $function_op($_REQUEST); exit; } elseif (function_exists($function_main)) { $function_main($_REQUEST); exit; } else { // die("error : user_execute($file,$function_op)"); pnRedirect('index.php'); return true; } } // when we are here, the call is the result of an action // requested by a (legacy) Your_Account plugin. // Get all user modules... $usermods = pnModGetUserMods(); // since the your account module does't have index.php/pnuser.php it // won't be listed as user_capable hence we need to manually add it to // our result set. [markwest] $usermods[] = pnModGetInfo(pnModGetIDFromName('Your_Account')); // ...and run the requested action (specified by $op) foreach ($usermods as $usermod) { if (@is_dir($dir = 'modules/' . $usermod['directory'] . '/user/case/')) { $casedir = opendir($dir); while ($func = readdir($casedir)) { if (eregi('^case.', $func)) { $ModName = $usermod['name']; include $dir . pnVarPrepForOS($func); } } closedir($casedir);
function blocks_menu_block($row) { list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); // Generic check if (!pnSecAuthAction(0, 'Menublock::', "{$row['title']}::", ACCESS_READ)) { return; } // Break out options from our content field $vars = pnBlockVarsFromContent($row['content']); // Display style // style = 1 - simple list // style = 2 - drop-down list // Title $block['title'] = $row['title']; // Styling if (empty($vars['style'])) { $vars['style'] = 1; } $block['content'] = startMenuStyle($vars['style']); $content = 0; // nkame: must start with some blank line, otherwise we're not able to // chose the first option in case of a drop-down menu. // a better solution would be to detect where we are, and adjust the selected // option in the list, and only add a blank line in case of no recognition. if ($vars['style'] == 2) { $block['content'] .= addMenuStyledUrl($vars['style'], "", "", ""); } // Content if (!empty($vars['content'])) { $contentlines = explode("LINESPLIT", $vars['content']); foreach ($contentlines as $contentline) { list($url, $title, $comment) = explode('|', $contentline); if (pnSecAuthAction(0, "Menublock::", "{$row['title']}:{$title}:", ACCESS_READ)) { $block['content'] .= addMenuStyledUrl($vars['style'], pnVarPrepForDisplay($title), $url, pnVarPrepForDisplay($comment)); $content = 1; } } } // Modules if (!empty($vars['displaymodules'])) { $mods = pnModGetUserMods(); // Separate from current content, if any if ($content == 1) { $block['content'] .= addMenuStyledUrl($vars['style'], "", "", ""); } foreach ($mods as $mod) { // jgm - need to work back ML into modules table somehow // if (file_exists("modules/$mod/modname.php")) { // include "modules/$mod/modname.php"; // } else { if (pnSecAuthAction(0, "{$mod['name']}::", "::", ACCESS_OVERVIEW)) { switch ($mod['type']) { case 1: $block['content'] .= addMenuStyledUrl($vars['style'], pnVarPrepForDisplay($mod['displayname']), "modules.php?op=modload&name=" . pnVarPrepForDisplay($mod['directory']) . "&file=index", pnVarPrepForDisplay($mod['description'])); $content = 1; break; case 2: $block['content'] .= addMenuStyledUrl($vars['style'], pnVarPrepForDisplay($mod['displayname']), pnModURL($mod['name'], 'user', 'main'), pnVarPrepForDisplay($mod['description'])); $content = 1; break; } } } } // Waiting content if (!empty($vars['displaywaiting'])) { // Separate from current content, if any if ($content == 1) { $block['content'] .= addMenuStyledUrl($vars['style'], "", "", ""); } $header = 0; if (pnSecAuthAction(0, "Stories::Story", "::", ACCESS_ADD)) { $result = $dbconn->Execute("SELECT count(1) FROM {$pntable['queue']}\n WHERE {$pntable['queue_column']['arcd']}=0"); if ($dbconn->ErrorNo() == 0) { list($qnum) = $result->fields; $result->Close(); if ($qnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT . "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], _SUBMISSIONS . ": {$qnum}", "admin.php?module=NS-AddStory&op=submissions", ""); $content = 1; } } } if (pnSecAuthAction(0, "Reviews::", "::", ACCESS_ADD)) { $result = $dbconn->Execute("SELECT count(1) FROM {$pntable['reviews_add']}"); if ($dbconn->ErrorNo() == 0) { list($rnum) = $result->fields; $result->Close(); if ($rnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT . "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], _WREVIEWS . ": {$rnum}", "admin.php?module=Reviews&op=main", ""); $content = 1; } } } if (pnSecAuthAction(0, "Web Links::Link", "::", ACCESS_ADD)) { $result = $dbconn->Execute("SELECT count(1) FROM {$pntable['links_newlink']}"); if ($dbconn->ErrorNo() == 0) { list($lnum) = $result->fields; $result->Close(); if ($lnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT . "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], _WLINKS . ": {$lnum}", "admin.php?module=Web_Links&op=main", ""); $content = 1; } } } if (pnSecAuthAction(0, "Downloads::Item", "::", ACCESS_ADD)) { $result = $dbconn->Execute("SELECT count(1) FROM {$pntable['downloads_newdownload']}"); if ($dbconn->ErrorNo() == 0) { list($dnum) = $result->fields; $result->Close(); if ($dnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT . "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], _WDOWNLOADS . ": {$dnum}", "admin.php?module=Downloads&op=main", ""); $content = 1; } } } if (pnSecAuthAction(0, "FAQ::", "::", ACCESS_ADD)) { $faqcolumn =& $pntable['faqanswer_column']; $result = $dbconn->Execute("SELECT count(1) FROM {$pntable['faqanswer']} WHERE {$faqcolumn['answer']}=''"); if ($dbconn->ErrorNo() == 0) { list($fnum) = $result->fields; $result->Close(); if ($fnum) { if ($header == 0) { $block['content'] .= addMenuStyledUrl($vars['style'], "<strong>" . _WAITINGCONT . "</strong>", "", ""); $header = 1; } $block['content'] .= addMenuStyledUrl($vars['style'], _FQUESTIONS . ": {$fnum}", "admin.php?module=FAQ&op=FaqCatUnanswered", ""); $content = 1; } } } } // Styling $block['content'] .= endMenuStyle($vars['style']); if ($content) { $row['title'] = $block['title']; $row['content'] = $block['content']; return themesideblock($row); } }
function settings_admin_main($var) { $pnconfig = $GLOBALS["pnconfig"]; if (strlen(WHERE_IS_PERSO) > 0) { $pnconfig['tipath'] = str_replace(WHERE_IS_PERSO, '', pnConfigGetVar('tipath')); } include 'header.php'; GraphicAdmin(); OpenTable(); print '<center><font size="4" class="pn-pagetitle">' . _SITECONFIG . '</font></center>'; CloseTable(); if (!pnSecAuthAction(0, 'Settings::', '::', ACCESS_ADMIN)) { echo _SETTINGSNOAUTH; include 'footer.php'; return; } // Set the current settings for select fields, radio buttons and checkboxes. // Much better then using if() statements all over the place :-) $sel_dynkeywords['0'] = ''; $sel_dynkeywords['1'] = ''; $sel_dynkeywords[pnConfigGetVar('dyn_keywords')] = ' checked'; $sel_storyhome['5'] = ''; $sel_storyhome['10'] = ''; $sel_storyhome['15'] = ''; $sel_storyhome['20'] = ''; $sel_storyhome['25'] = ''; $sel_storyhome['30'] = ''; $sel_storyhome[pnConfigGetVar('storyhome')] = ' selected'; $sel_storyorder['0'] = ''; $sel_storyorder['1'] = ''; $sel_storyorder[pnConfigGetVar('storyorder')] = ' selected'; $sel_defaulttheme[pnConfigGetVar('Default_Theme')] = ' selected'; $sel_themechange['0'] = ''; $sel_themechange['1'] = ''; $sel_themechange[pnConfigGetVar('theme_change')] = ' checked'; $sel_lang[pnConfigGetVar('language')] = ' selected'; $sel_nobox['0'] = ''; $sel_nobox['1'] = ''; $sel_nobox[pnConfigGetVar('nobox')] = ' checked'; $sel_tzoffset[pnConfigGetVar('timezone_offset')] = ' selected'; $sel_backendlanguage[pnConfigGetVar('backend_language')] = ' selected'; $sel_admingraphic['0'] = ''; $sel_admingraphic['1'] = ''; $sel_admingraphic[pnConfigGetVar('admingraphic')] = ' checked'; $sel_admart['10'] = ''; $sel_admart['15'] = ''; $sel_admart['20'] = ''; $sel_admart['25'] = ''; $sel_admart['30'] = ''; $sel_admart['50'] = ''; $sel_admart[pnConfigGetVar('admart')] = ' selected'; $sel_reportlevel['0'] = ''; $sel_reportlevel['1'] = ''; $sel_reportlevel['2'] = ''; $sel_reportlevel[pnConfigGetVar('reportlevel')] = ' checked'; $sel_funtext['0'] = ''; $sel_funtext['1'] = ''; $sel_funtext[pnConfigGetVar('funtext')] = ' checked'; $sel_intranet['0'] = ''; $sel_intranet['1'] = ''; $sel_WYSIWYGEditor['0'] = ''; $sel_WYSIWYGEditor['1'] = ''; $sel_WYSIWYGEditor[pnConfigGetVar('WYSIWYGEditor')] = ' checked'; $sel_pnAntiCracker['0'] = ''; $sel_pnAntiCracker['1'] = ''; $sel_pnAntiCracker[pnConfigGetVar('pnAntiCracker')] = ' checked'; $sel_intranet[pnConfigGetVar('intranet')] = ' checked'; $sel_seclevel['High'] = ''; $sel_seclevel['Medium'] = ''; $sel_seclevel['Low'] = ''; $sel_seclevel[pnConfigGetVar('seclevel')] = 'selected'; $sel_htmlentities['0'] = ''; $sel_htmlentities['1'] = ''; $sel_htmlentities[pnConfigGetVar('htmlentities')] = 'checked'; $sel_usecompression['0'] = ''; $sel_usecompression['1'] = ''; $sel_usecompression[pnConfigGetVar('UseCompression')] = ' selected'; $sel_refereronprint['0'] = ''; $sel_refereronprint['1'] = ''; $sel_refereronprint[pnConfigGetVar('refereronprint')] = ' selected'; // // let's pre-create an array of the current times for each TZ // $tzo = 0; $gmt = time() - date('Z'); for ($i = -12; $i <= 12; $i++) { $tzstring["tz{$tzo}"] = strftime(_TIMEBRIEF, $gmt + 3600 * $i); $tzo++; } // some special cases $tzstring['tz8a'] = strftime(_TIMEBRIEF, $gmt - 12600); $tzstring['tz15a'] = strftime(_TIMEBRIEF, $gmt + 12600); $tzstring['tz16a'] = strftime(_TIMEBRIEF, $gmt + 16200); $tzstring['tz17a'] = strftime(_TIMEBRIEF, $gmt + 19800); $tzstring['tz21a'] = strftime(_TIMEBRIEF, $gmt + 34200); // done, now on to the form echo '<form action="admin.php" name="settings" method="post">'; OpenTable(); print '<center><font size="3" class="pn-title">' . _GENSITEINFO . '</font></center>' . '<input type="hidden" name="_magic_quotes_gpc_test" value=""">' . '<table border="0"><tr><td class="pn-normal">' . _SITENAME . ":</td><td><input type=\"text\" name=\"xsitename\" value=\"" . pnConfigGetVar('sitename') . "\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _SITELOGO . ":</td><td><input type=\"text\" name=\"xsite_logo\" value=\"" . pnConfigGetVar('site_logo') . "\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _SITESLOGAN . ":</td><td><input type=\"text\" name=\"xslogan\" value=\"" . pnConfigGetVar('slogan') . "\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _METAKEYWORDS . ':</td><td><textarea name="xmetakeywords" cols="80" rows="10" class="pn-normal">' . htmlspecialchars(pnConfigGetVar('metakeywords')) . '</textarea>' . '</td></tr><tr><td class="pn-normal">' . _DYNKEYWORDS . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xdyn_keywords\" value=\"1\"" . $sel_dynkeywords['1'] . " class=\"pn-normal\">" . _YES . ' ' . "<input type=\"radio\" name=\"xdyn_keywords\" value=\"0\"" . $sel_dynkeywords['0'] . " class=\"pn-normal\">" . _NO . ' ' . '</td></tr><tr><td class="pn-normal">' . _STARTDATE . ":</td><td><input type=\"text\" name=\"xstartdate\" value=\"" . pnConfigGetVar('startdate') . "\" size=\"20\" maxlength=\"30\">" . '</td></tr><tr><td class="pn-normal">' . _ADMINEMAIL . ":</td><td><input type=\"text\" name=\"xadminmail\" value=\"" . pnConfigGetVar('adminmail') . "\" size=30 maxlength=100>" . '</td></tr><tr><td class="pn-normal">' . '</td></tr><tr><td class="pn-normal">' . _DEFAULTTHEME . ':</td><td><select name="xDefault_Theme" size="1" class="pn-normal">'; $handle = opendir('themes'); while ($f = readdir($handle)) { if ($f != '.' && $f != '..' && $f != 'CVS' && !ereg("[.]", $f)) { $themelist[] = $f; } } closedir($handle); /* modif sebastien multi sites le 09/09/2001. */ $cWhereIsPerso = WHERE_IS_PERSO; if (!empty($cWhereIsPerso)) { $handle = opendir(WHERE_IS_PERSO . 'themes'); while ($f = readdir($handle)) { if ($f != '.' && $f != '..' && $f != 'CVS' && !ereg("[.]", $f)) { $themelist[] = $f; } } closedir($handle); } /* fin modif sebastien */ sort($themelist); foreach ($themelist as $v) { if (!isset($sel_defaulttheme[$v])) { $sel_defaulttheme[$v] = ''; } print "<option value=\"{$v}\"{$sel_defaulttheme[$v]}>{$v}</option>\n"; } print '</select>' . '</td></tr><tr><td class="pn-normal">' . _THEMECHANGE . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xtheme_change\" value=\"0\" class=\"pn-normal\"{$sel_themechange['0']}>" . _YES . ' ' . "<input type=\"radio\" name=\"xtheme_change\" value=\"1\" class=\"pn-normal\"{$sel_themechange['1']}>" . _NO . '</td></tr><tr><td class="pn-normal">' . _BLOCKSINARTICLES . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xnobox\" value=\"0\" class=\"pn-normal\"{$sel_nobox['0']}>" . _YES . ' ' . "<input type=\"radio\" name=\"xnobox\" value=\"1\" class=\"pn-normal\"{$sel_nobox['1']}>" . _NO . '</td></tr><tr><td class="pn-normal">' . _LOCALEFORMAT . ":</td><td><input type=\"text\" name=\"xlocale\" value=\"" . pnConfigGetVar('locale') . "\" size=\"20\" maxlength=\"40\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _TIMEZONEOFFSET . ':</td><td class="pn-normal">'; $tzoffset = pnConfigGetVar('timezone_offset'); global $tzinfo; echo "<select name=\"xtimezone_offset\" size=\"1\" class=\"pn-normal\">\n"; foreach ($tzinfo as $tzindex => $tzdata) { echo "<option value=\"{$tzindex}\""; if ($tzoffset == $tzindex) { echo "selected"; } echo ">"; echo $tzdata; echo "</option>"; } echo '</select>' . '</td></tr><tr><td class="pn-normal">' . '</td></tr><tr><td class="pn-normal">' . _STARTPAGE . "</td><td class=\"pn-normal\">" . "<select name=\"xstartpage\" size=\"1\" class=\"pn-normal\">\n"; /* Must changed */ /* // this way everything from /modules is listed // even not initialized/not active modules $handle = opendir('modules'); while ($f = readdir($handle)) { if ((!ereg('[.]', $f)) && $f != 'CVS' && (!ereg('NS-', $f))) { $startpagepath = "$f"; if (pnConfigGetVar('startpage') == $startpagepath) { $sel_startpage = " selected"; } else { $sel_startpage = ""; } echo "<option value=\"$startpagepath\"$sel_startpage>$f</option>\n"; } } closedir($handle); */ // better to use the API to display the correct mods / thx to jn $usermods = pnModGetUserMods(); foreach ($usermods as $usermod) { if (pnConfigGetVar('startpage') == $usermod['name']) { $sel_startpage = " selected"; } else { $sel_startpage = ""; } echo "<option value=\"{$usermod['name']}\"{$sel_startpage}>{$usermod['name']}</option>\n"; } echo "</select> " . _STARTPAGEDESCR . "\n" . "</td></tr><tr><td class=\"pn-normal\">\n" . _ARTINADMIN . ':</td><td>' . '<select name="xadmart" size="1" class="pn-normal">' . "<option value=\"10\"" . $sel_admart['10'] . ">10</option>\n" . "<option value=\"15\"" . $sel_admart['15'] . ">15</option>\n" . "<option value=\"20\"" . $sel_admart['20'] . ">20</option>\n" . "<option value=\"25\"" . $sel_admart['25'] . ">25</option>\n" . "<option value=\"30\"" . $sel_admart['30'] . ">30</option>\n" . "<option value=\"50\"" . $sel_admart['50'] . ">50</option>\n" . '</select>' . "</td></tr><tr><td class=\"pn-normal\">\n" . _STORIESHOME . ':</td><td>' . '<select name="xstoryhome" size="1" class="pn-normal">' . "<option value=\"5\"" . $sel_storyhome['5'] . ">5</option>\n" . "<option value=\"10\"" . $sel_storyhome['10'] . ">10</option>\n" . "<option value=\"15\"" . $sel_storyhome['15'] . ">15</option>\n" . "<option value=\"20\"" . $sel_storyhome['20'] . ">20</option>\n" . "<option value=\"25\"" . $sel_storyhome['25'] . ">25</option>\n" . "<option value=\"30\"" . $sel_storyhome['30'] . ">30</option>\n" . '</select>' . "</td></tr><tr><td class=\"pn-normal\">\n" . _STORIESORDER . ':</td><td>' . '<select name="xstoryorder" size="1" class="pn-normal">' . "<option value=\"0\"" . $sel_storyorder['0'] . ">" . _STORIESORDER0 . "</option>\n" . "<option value=\"1\"" . $sel_storyorder['1'] . ">" . _STORIESORDER1 . "</option>\n" . '</select>' . "</td></tr><tr><td class=\"pn-normal\">\n" . _ADMINGRAPHIC . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xadmingraphic\" value=\"1\" class=\"pn-normal\"" . $sel_admingraphic['1'] . ">" . _YES . ' ' . "<input type=\"radio\" name=\"xadmingraphic\" value=\"0\" class=\"pn-normal\"" . $sel_admingraphic['0'] . ">" . _NO . "</td></tr><tr><td class=\"pn-normal\">\n" . _REPORTLEVEL . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xreportlevel\" value=\"0\" class=\"pn-normal\"" . $sel_reportlevel['0'] . ">" . _REPORTLEVEL0 . ' ' . "<input type=\"radio\" name=\"xreportlevel\" value=\"1\" class=\"pn-normal\"" . $sel_reportlevel['1'] . ">" . _REPORTLEVEL1 . ' ' . "<input type=\"radio\" name=\"xreportlevel\" value=\"2\" class=\"pn-normal\"" . $sel_reportlevel['2'] . ">" . _REPORTLEVEL2 . '</td></tr><tr><td class="pn-normal">' . _FUNTEXT . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xfuntext\" value=\"1\" class=\"pn-normal\"" . $sel_funtext['1'] . ">" . _YES . ' ' . "<input type=\"radio\" name=\"xfuntext\" value=\"0\" class=\"pn-normal\"" . $sel_funtext['0'] . ">" . _NO . '</td></tr><tr><td class="pn-normal">' . _WYSIWYGEDITORTEXT . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xWYSIWYGEditor\" value=\"1\" class=\"pn-normal\"" . $sel_WYSIWYGEditor['1'] . ">" . _YES . ' ' . "<input type=\"radio\" name=\"xWYSIWYGEditor\" value=\"0\" class=\"pn-normal\"" . $sel_WYSIWYGEditor['0'] . ">" . _NO . '</td></tr><tr><td class="pn-normal">' . _PNANTICRACKERTEXT . '</td><td class="pn-normal">' . "<input type=\"radio\" name=\"xpnAntiCracker\" value=\"1\" class=\"pn-normal\"" . $sel_pnAntiCracker['1'] . ">" . _YES . ' ' . "<input type=\"radio\" name=\"xpnAntiCracker\" value=\"0\" class=\"pn-normal\"" . $sel_pnAntiCracker['0'] . ">" . _NO . '</td></tr><tr><td class="pn-normal">' . _DEFAULTGROUP . '</td><td class="pn-normal">' . "<input type=\"text\" name=\"xdefaultgroup\" value=\"" . pnConfigGetVar('defaultgroup') . "\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _SELLANGUAGE . ':</td><td><select name="xlanguage" size="1" class="pn-normal">'; $lang = languagelist(); foreach ($lang as $k => $v) { echo '<option value="' . $k . '"'; if (isset($sel_lang[$k])) { echo ' selected'; } echo '>'; echo "[{$k}] "; echo "{$v}"; echo '</option>' . "\n"; } echo '</select>' . '</td></tr>' . '<tr><td class="pn-normal">' . _USECOMPRESSION . '</td><td class="pn-normal">' . "<select name=\"xUseCompression\" class=\"pn-normal\">\n" . "<option value=\"0\"" . $sel_usecompression['0'] . " class=\"pn-normal\">" . _NO . "</option>" . "<option value=\"1\"" . $sel_usecompression['1'] . " class=\"pn-normal\">" . _YES . "</option>" . "</select>\n" . '</td></tr>' . '</table>'; CloseTable(); OpenTable(); print '<center><font class="pn-title">' . _FOOTERMSG . '</font></center>' . '<table border="0"><tr><td class="pn-normal">' . _FOOTERLINE . ':</td><td><textarea name="xfoot1" cols="80" rows="10" class="pn-normal">' . htmlspecialchars(pnConfigGetVar('foot1')) . '</textarea>' . '</td></tr></table>'; CloseTable(); OpenTable(); print '<center><font class="pn-title">' . _BACKENDCONF . '</font></center>' . '<table border="0"><tr><td class="pn-normal">' . _BACKENDTITLE . ":</td><td><input type=\"text\" name=\"xbackend_title\" value=\"" . pnConfigGetVar('backend_title') . "\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">" . '</td></tr><tr><td class="pn-normal">' . _BACKENDLANG . ':</td><td><select name="xbackend_language" size="1" class="pn-normal">'; $rsslang = rsslanguagelist(); foreach ($rsslang as $k => $v) { echo '<option value="' . $k . '"'; if (isset($sel_backendlanguage[$k])) { echo ' selected'; } echo '>'; echo "[{$k}] "; echo "{$v}"; echo '</option>' . "\n"; } echo '</select>' . '</td></tr></table>'; CloseTable(); print '<br>'; OpenTable(); print '<center><font size="3" class="pn-title">' . _SECOPT . '</font></center>' . '<table border="0"><tr><td class="pn-normal">' . _SECLEVEL . ':</td><td>' . '<select name="xseclevel" size="1" class="pn-normal">' . "<option value=\"High\" {$sel_seclevel['High']}>" . _SECHIGH . "</option>\n" . "<option value=\"Medium\" {$sel_seclevel['Medium']}>" . _SECMEDIUM . "</option>\n" . "<option value=\"Low\" {$sel_seclevel['Low']}>" . _SECLOW . "</option>\n" . '</select>' . '</td></tr><tr><td class="pn-normal">' . _SECMEDLENGTH . ":</td><td><input type=\"text\" name=\"xsecmeddays\" value=\"" . pnConfigGetVar('secmeddays') . "\" size=\"4\" class=\"pn-normal\"> " . _DAYS . '</td></tr><tr><td class="pn-normal">' . _SECINACTIVELENGTH . ":</td><td><input type=\"text\" name=\"xsecinactivemins\" value=\"" . pnConfigGetVar('secinactivemins') . "\" size=\"4\" class=\"pn-normal\"> " . _MINUTES . "</td></tr>" . "<tr><td class=\"pn-normal\">" . _REFERERONPRINT . '</td><td class="pn-normal">' . "<select name=\"xrefereronprint\" class=\"pn-normal\">\n" . "<option value=\"0\"" . $sel_refereronprint['0'] . " class=\"pn-normal\">" . _NO . "</option>" . "<option value=\"1\"" . $sel_refereronprint['1'] . " class=\"pn-normal\">" . _YES . "</option>" . "</select>\n" . "</td></tr></table>\n"; CloseTable(); // Intranet configuration OpenTable(); print '<br>'; print '<center><font size="3" class="pn-title">' . _INTRANETOPT . '</font></center>'; print '<table border="0">'; print '<tr>'; print '<td><font class="pn-normal">' . _INTRANET . '</font></td><td class="pn-normal">'; print "<input type=\"radio\" name=\"xintranet\" value=\"1\" class=\"pn-normal\"" . $sel_intranet['1'] . ">" . _YES . ' '; print "<input type=\"radio\" name=\"xintranet\" value=\"0\" class=\"pn-normal\"" . $sel_intranet['0'] . ">" . _NO; print '</td></tr>'; print '</table>'; print '<b><font class="pn-normal"> ' . _INTRANETWARNING . '</font></b>'; CloseTable(); // Allowed HTML OpenTable(); print '<br>'; print '<center><font size="3" class="pn-title">' . _HTMLOPT . '</font></center>' . '<table border="0"><tr><td class="pn-normal">' . _HTMLALLOWED . ':</td></tr></table>'; echo '<table border="2">'; echo '<tr><th><font class="pn-title">' . _HTMLTAGNAME . '</font></th>' . '<th><font class="pn-title">' . _HTMLTAGNOTALLOWED . '</font></th>' . '<th><font class="pn-title">' . _HTMLTAGALLOWED . '</font></th>' . '<th><font class="pn-title">' . _HTMLTAGALLOWEDWITHPARAMS . '</font></th>' . '</tr>'; $htmltags = settingsGetHTMLTags(); $currenthtmltags = pnConfigGetVar('AllowableHTML'); foreach ($htmltags as $htmltag) { $selected[0] = ''; $selected[1] = ''; $selected[2] = ''; if (isset($currenthtmltags[$htmltag])) { $selected[$currenthtmltags[$htmltag]] = ' checked'; } else { $selected[0] = ' checked'; } echo '<tr>'; echo '<td><font class="pn-normal"><' . pnVarPrepForDisplay($htmltag) . '></font></td>'; echo '<td align="center"><input type=radio value="0" name="htmlallow' . pnVarPrepForDisplay($htmltag) . 'tag" ' . $selected[0] . '></td>'; echo '<td align="center"><input type=radio value="1" name="htmlallow' . pnVarPrepForDisplay($htmltag) . 'tag" ' . $selected[1] . '></td>'; echo '<td align="center"><input type=radio value="2" name="htmlallow' . pnVarPrepForDisplay($htmltag) . 'tag" ' . $selected[2] . '></td>'; echo '</tr>'; } echo '</table>'; CloseTable(); echo '<table><tr><td><b><font class="pn-normal"> ' . _HTMLWARNING . '</font></b>'; echo '<br />'; echo _HTMLALLOWENTITIES . '<input type="radio" name="xhtmlentities" value="1" class="pn-normal"' . $sel_htmlentities[1] . '>' . _YES . ' ' . '<input type="radio" name="xhtmlentities" value="0" class="pn-normal"' . $sel_htmlentities[0] . '>' . _NO; // Finish echo '<input type="hidden" name="op" value="generate">' . '<input type="hidden" name="module" value="NS-Settings">' . '<input type="hidden" name="authid" value="' . pnSecGenAuthKey() . '">' . '<center><input type="submit" value="' . _SAVECHANGES . '" class="pn-normal" style="text-align:center"></center>' . '</td></tr></table>' . '</form>'; include 'footer.php'; }