function lang_dropdown() { global $currentlang; $locale_dir = './locales/'; $lang = languagelist(); $langlist = array(); if (is_dir($locale_dir)) { if ($dh = opendir($locale_dir)) { while (($file = readdir($dh)) !== false) { if ($file == '.' || $file == '..' || $file == 'CVS' || filetype($locale_dir . $file) == 'file') { continue; } if (is_dir($locale_dir . $file) && @$lang[$file]) { $langlist[$file] = $lang[$file]; } } closedir($dh); } } asort($langlist); $selection = '<select name="alanguage" class="ow-text">'; foreach ($langlist as $k => $v) { $selection .= '<option value="' . $k . '"'; if ($currentlang == $k) { $selection .= ' selected'; } $selection .= '>' . $v . '</option> '; } $selection .= '</select>'; return $selection; }
function blocks_thelang_block($row) { $currentlang = pnUserGetLang(); if (!pnSecAuthAction(0, 'Languageblock::', "{$row['title']}::", ACCESS_OVERVIEW)) { return; } if (!pnConfigGetVar('multilingual')) { return; } $currentURL = $_SERVER['REQUEST_URI']; if ($currentURL === "") { $currentURL = "index.php"; } $pattern = '/\\?newlang=.../'; $currentURL = preg_replace($pattern, '', $currentURL); $pattern = '/\\&newlang=.../'; $currentURL = pnVarPrepForDisplay(preg_replace($pattern, '', $currentURL)); $append = "&"; if (strpos($currentURL, '?') === false) { $append = "?"; } $lang = languagelist(); $handle = opendir('language'); while ($f = readdir($handle)) { if (is_dir("language/{$f}") && !empty($lang[$f])) { $langlist[$f] = $lang[$f]; $sel_lang[$f] = ''; } } asort($langlist); $content = '<center><font class="pn-normal">' . _SELECTGUILANG . '</font><br><br>'; if (pnConfigGetVar('useflags')) { $i = 1; foreach ($langlist as $k => $v) { if ($i > 3) { $content .= "<br>\n"; $i = 1; } $imgsize = @getimagesize("images/flags/flag-{$k}.png"); $content .= "<a href=\"{$currentURL}" . $append . "newlang={$k}\"><img src=\"images/flags/flag-{$k}.png\" border=\"0\" alt=\"{$lang[$k]}\" hspace=\"3\" vspace=\"3\" {$imgsize['3']}></a>"; $i++; } $content .= '</center>'; } else { $content .= '<form method="post" action="index.php"><select class="pn-text" name="newlanguage" onChange="top.location.href=this.options[this.selectedIndex].value">'; $sel_lang[$currentlang] = ' selected'; foreach ($langlist as $k => $v) { $content .= "<option value=\"{$currentURL}" . $append . "newlang={$k}\"{$sel_lang[$k]}>{$v}</option>\n"; } $content .= '</select></form></center>'; } if (empty($row['title'])) { $row['title'] = _SELECTLANGUAGE; } $row['content'] = $content; return themesideblock($row); }
function lang_dropdown() { global $currentlang; $selection = '<select name="alanguage" class="ow-text">'; $lang = languagelist(); $handle = opendir('lang'); while ($f = readdir($handle)) { if (is_dir("lang/{$f}") && @$lang[$f]) { $langlist[$f] = $lang[$f]; } } asort($langlist); foreach ($langlist as $k => $v) { $selection .= '<option value="' . $k . '"'; if ($currentlang == $k) { $selection .= ' selected'; } $selection .= '>' . $v . '</option> '; } $selection .= '</select>'; return $selection; }
/** Make common language selection dropdown. * Dropdown corresponds to contents of install/lang. * @author Tim Litwiller */ function lang_dropdown() { global $currentlang; echo "<select name=\"alanguage\" class=\"pn-text\">"; $lang = languagelist(); // List install/lang $handle = opendir('install/lang'); while ($f = readdir($handle)) { if (is_dir("install/lang/{$f}") && @$lang[$f]) { $langlist[$f] = $lang[$f]; } } asort($langlist); // Generation of html code foreach ($langlist as $k => $v) { echo '<option value="' . $k . '"'; if ($currentlang == $k) { echo ' selected'; } echo '>' . $v . '</option> '; } echo "</select>"; }
/** * get a language name */ function language_name($language) { if (!isset($language)) { return null; } static $name = array(); if (!count($name)) { $name = languagelist(); } return $name[$language]; }
function editmsg() { list($mid, $authid) = pnVarCleanFromInput('mid', 'authid'); list($dbconn) = pnDBGetConn(); $pntable = pnDBGetTables(); include "header.php"; GraphicAdmin(); OpenTable(); echo "<center><font class=\"pn-title\"><b>" . _MESSAGESADMIN . "</b></font></center>"; CloseTable(); $column =& $pntable['message_column']; $result = $dbconn->Execute("SELECT {$column['title']},\n {$column['content']},\n {$column['date']},\n {$column['expire']},\n {$column['active']},\n {$column['view']},\n {$column['mlanguage']} \n FROM {$pntable['message']}\n WHERE {$column['mid']}= '" . pnVarPrepForStore($mid) . "'"); list($title, $content, $mdate, $expire, $active, $view, $mlanguage) = $result->fields; if (!pnSecAuthAction(0, 'Messages::', "{$title}::{$mid}", ACCESS_EDIT)) { echo _MESSAGESEDITNOAUTH; include 'footer.php'; return; } OpenTable(); echo "<center><font class=\"pn-title\"><b>" . _EDITMSG . "</b></font></center>"; $asel1 = ''; $asel2 = ''; if ($active == 1) { $asel1 = "checked"; } elseif ($active == 0) { $asel2 = "checked"; } $sel1 = ''; $sel2 = ''; $sel3 = ''; $sel4 = ''; if ($view == 1) { $sel1 = "selected"; } elseif ($view == 2) { $sel2 = "selected"; } elseif ($view == 3) { $sel3 = "selected"; } elseif ($view == 4) { $sel4 = "selected"; } $esel1 = ''; $esel2 = ''; $esel3 = ''; $esel4 = ''; $esel5 = ''; $esel6 = ''; if ($expire == 86400) { $esel1 = "selected"; } elseif ($expire == 172800) { $esel2 = "selected"; } elseif ($expire == 432000) { $esel3 = "selected"; } elseif ($expire == 1296000) { $esel4 = "selected"; } elseif ($expire == 2592000) { $esel5 = "selected"; } elseif ($expire == 0) { $esel6 = "selected"; } echo "<form action=\"admin.php\" method=\"post\">"; echo "<b><font class=\"pn-normal\">" . _MESSAGETITLE . ":</font></b><br>" . "<input type=\"text\" name=\"title\" value=\"" . pnVarPrepForDisplay($title) . "\" size=\"50\" maxlength=\"100\"><br><br>" . "<b><font class=\"pn-normal\">" . _MESSAGECONTENT . ":</font></b><br>" . "<textarea name=\"content\" rows=\"10\" cols=\"80\">" . pnVarPrepForDisplay($content) . "</textarea><br><br><font class=\"pn-normal\">" . '<b>' . _LANGUAGE . ': </b></font>' . '<select name="mlanguage" size="1">' . '<option value="">' . _ALL . '</option>'; $lang = languagelist(); $sel_lang[$mlanguage] = ' selected'; $handle = opendir('language'); while ($f = readdir($handle)) { if (is_dir("language/{$f}") && !empty($lang[$f])) { $langlist[$f] = $lang[$f]; } } asort($langlist); // a bit ugly, but it works in E_ALL conditions (Andy Varganov) foreach ($langlist as $k => $v) { echo '<option value="' . $k . '"'; if (isset($sel_lang[$k])) { echo ' selected'; } echo '>' . $v . '</option>'; } print '</select><br><br>' . "<font class=\"pn-normal\"><b>" . _ACTIVE . "?</b> <input type=\"radio\" name=\"active\" value=\"1\" {$asel1}>" . _YES . " " . "<input type=\"radio\" name=\"active\" value=\"0\" {$asel2}>" . _NO . "</font>"; if ($active == 1) { echo "<br><br><font class=\"pn-normal\"><b>" . _CHANGEDATE . "</b>" . "<input type=\"radio\" name=\"chng_date\" value=\"1\">" . _YES . " " . "<input type=\"radio\" name=\"chng_date\" value=\"0\" checked>" . _NO . "</font><br><br>"; } elseif ($active == 0) { echo "<br><font class=\"pn-sub\">" . _IFYOUACTIVE . "</font><br><br>" . "<input type=\"hidden\" name=\"chng_date\" value=\"1\">"; } echo "<font class=\"pn-normal\"><b>" . _VIEWPRIV . "</b> <select name=\"view\">" . "<option value=\"1\" {$sel1}>" . _MVALL . "</option>" . "<option value=\"2\" {$sel2}>" . _MVUSERS . "</option>" . "<option value=\"3\" {$sel3}>" . _MVANON . "</option>" . "<option value=\"4\" {$sel4}>" . _MVADMIN . "</option>" . "</select></font><br><br>" . "<input type=\"hidden\" name=\"mdate\" value=\"{$mdate}\">" . "<input type=\"hidden\" name=\"mid\" value=\"{$mid}\">" . "<input type=\"hidden\" name=\"module\" value=\"" . $GLOBALS['module'] . "\">" . "<input type=\"hidden\" name=\"op\" value=\"savemsg\">" . "<input type=\"hidden\" name=\"authid\" value=\"" . pnSecGenAuthKey() . "\">" . "<input type=\"submit\" value=\"" . _SAVECHANGES . "\">" . "</form>"; CloseTable(); include "footer.php"; }
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'; }