Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/modules/NS-Settings/admin/modules/settings.php
<?php
// File: $Id: settings.php,v 1.46 2001/12/06 19:43:04 besfred Exp $ $Name:  $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// Modification 10/O9/2001, Sebastien. Added
// ----------------------------------------------------------------------

if (!eregi('admin.php', $PHP_SELF))
{
    print 'Access Denied';
    exit;
}
$hlpfile = 'manual/config.html';

modules_get_language();

/* Fixes the ' duplicated in the slogan & footer fields - acm3 */
function FixConfigQuotes ($what = "") {
    $what = ereg_replace(chr(146), chr(39), $what);
    while (ereg("\\\'", $what)) {
        $what = ereg_replace("\\\'", chr(39), $what);
    }
    return $what;
}

/*********************************************************/
/* Configuration Functions to Setup all the Variables    */
/*********************************************************/

function Configure() {
global $pnconfig;
    include 'header.php';
    GraphicAdmin($GLOBALS['hlpfile']);
    OpenTable();
    print '<center><font size="4" class="pn-pagetitle">'._SITECONFIG.'</font></center>';
    CloseTable();
    print '<br>';

    if (!(authorised(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[$GLOBALS['dyn_keywords']] = ' checked';
    //$sel_protectemail[$GLOBALS['protectemail']] = ' checked';
    $sel_top[$GLOBALS['top']] = ' selected';
    $sel_storyhome[$GLOBALS['storyhome']] = ' selected';
    $sel_oldnum[$GLOBALS['oldnum']] = ' selected';
    $sel_anonpost[$GLOBALS['anonpost']] = ' checked';
    $sel_defaulttheme[$GLOBALS['Default_Theme']] = ' selected';
    $sel_lang[$GLOBALS['currentlang']] = ' selected';
    $sel_nobox[$GLOBALS['nobox']] = ' checked';
    $sel_tzoffset[$GLOBALS['timezone_offset']] = ' selected';
    $sel_multilingual[$GLOBALS['multilingual']] = ' checked';
    $sel_useflags[$GLOBALS['useflags']] = ' checked';
    $sel_banners[$GLOBALS['banners']] = ' checked';
    $sel_backendlanguage[$GLOBALS['backend_language']] = ' selected';
    $sel_perpage[$GLOBALS['perpage']] = ' selected';
    $sel_popular[$GLOBALS['popular']] = ' selected';
    $sel_newlinks[$GLOBALS['newlinks']] = ' selected';
    $sel_toplinks[$GLOBALS['toplinks']] = ' selected';
    $sel_linksresults[$GLOBALS['linksresults']] = ' selected';
    $sel_anonaddlinklock[$GLOBALS['links_anonaddlinklock']] = ' checked';
    $sel_notify[$GLOBALS['notify']] = ' checked';
    $sel_moderate[$GLOBALS['moderate']] = ' selected';
    $sel_setCookies[$GLOBALS['setCookies']] = ' checked';
    $sel_admingraphic[$GLOBALS['admingraphic']] = ' checked';
    $sel_admart[$GLOBALS['admart']] = ' selected';
    $sel_minpass[$GLOBALS['minpass']] = ' selected';
    $sel_httpref[$GLOBALS['httpref']] = ' checked';
    $sel_httprefmax[$GLOBALS['httprefmax']] = ' selected';
    $sel_pollcomm[$GLOBALS['pollcomm']] = ' checked';
    $sel_autolinkpref[$GLOBALS['autolinkpref']] = ' checked';
    $sel_usergraphic[$GLOBALS['usergraphic']] = ' checked';
    $sel_topicsinrow[$GLOBALS['topicsinrow']] = ' selected';   // added for topic image row width - rwwood

    // FTO Avoid warnings

    if ( ! isset($sel_dynkeywords[0]) ) $sel_dynkeywords[0] = "" ;
    if ( ! isset($sel_dynkeywords[1]) ) $sel_dynkeywords[1] = "" ;


    if ( ! isset ($sel_top[5]) )  $sel_top[5] ="";
    if ( ! isset ($sel_top[10]) ) $sel_top[10]="";
    if ( ! isset ($sel_top[15]) ) $sel_top[15]="";
    if ( ! isset ($sel_top[20]) ) $sel_top[20]="";
    if ( ! isset ($sel_top[25]) ) $sel_top[25]="";
    if ( ! isset ($sel_top[30]) ) $sel_top[30]="";

    if ( ! isset ($sel_storyhome[5]) )  $sel_storyhome[5] ="";
    if ( ! isset ($sel_storyhome[10]) ) $sel_storyhome[10]="";
    if ( ! isset ($sel_storyhome[15]) ) $sel_storyhome[15]="";
    if ( ! isset ($sel_storyhome[20]) ) $sel_storyhome[20]="";
    if ( ! isset ($sel_storyhome[25]) ) $sel_storyhome[25]="";
    if ( ! isset ($sel_storyhome[30]) ) $sel_storyhome[30]="";

    if ( ! isset ($sel_oldnum[10]) ) $sel_oldnum[10]="";
    if ( ! isset ($sel_oldnum[20]) ) $sel_oldnum[20]="";
    if ( ! isset ($sel_oldnum[30]) ) $sel_oldnum[30]="";
    if ( ! isset ($sel_oldnum[40]) ) $sel_oldnum[40]="";
    if ( ! isset ($sel_oldnum[50]) ) $sel_oldnum[50]="";

    if ( ! isset($sel_anonpost[0]) ) $sel_anonpost[0] = "" ;
    if ( ! isset($sel_anonpost[1]) ) $sel_anonpost[1] = "" ;

    if ( ! isset($sel_multilingual[0]) ) $sel_multilingual[0] = "" ;
    if ( ! isset($sel_multilingual[1]) ) $sel_multilingual[1] = "" ;

    if ( ! isset($sel_useflags[0]) ) $sel_useflags[0] = "" ;
    if ( ! isset($sel_useflags[1]) ) $sel_useflags[1] = "" ;

    if ( ! isset($sel_banners[0]) ) $sel_banners[0] = "" ;
    if ( ! isset($sel_banners[1]) ) $sel_banners[1] = "" ;


    if ( ! isset ($sel_perpage[10]) ) $sel_perpage[10]="";
    if ( ! isset ($sel_perpage[15]) ) $sel_perpage[15]="";
    if ( ! isset ($sel_perpage[20]) ) $sel_perpage[20]="";
    if ( ! isset ($sel_perpage[25]) ) $sel_perpage[25]="";
    if ( ! isset ($sel_perpage[30]) ) $sel_perpage[30]="";
    if ( ! isset ($sel_perpage[50]) ) $sel_perpage[50]="";

    if ( ! isset ($sel_popular[100]) ) $sel_popular[100]="";
    if ( ! isset ($sel_popular[250]) ) $sel_popular[250]="";
    if ( ! isset ($sel_popular[500]) ) $sel_popular[500]="";
    if ( ! isset ($sel_popular[1000])) $sel_popular[1000]="";
    if ( ! isset ($sel_popular[1500])) $sel_popular[1500]="";
    if ( ! isset ($sel_popular[2000])) $sel_popular[2000]="";

    if ( ! isset ($sel_newlinks[10]) ) $sel_newlinks[10]="";
    if ( ! isset ($sel_newlinks[15]) ) $sel_newlinks[15]="";
    if ( ! isset ($sel_newlinks[20]) ) $sel_newlinks[20]="";
    if ( ! isset ($sel_newlinks[25]) ) $sel_newlinks[25]="";
    if ( ! isset ($sel_newlinks[30]) ) $sel_newlinks[30]="";
    if ( ! isset ($sel_newlinks[50]) ) $sel_newlinks[50]="";

    if ( ! isset ($sel_toplinks[10]) ) $sel_toplinks[10]="";
    if ( ! isset ($sel_toplinks[15]) ) $sel_toplinks[15]="";
    if ( ! isset ($sel_toplinks[20]) ) $sel_toplinks[20]="";
    if ( ! isset ($sel_toplinks[25]) ) $sel_toplinks[25]="";
    if ( ! isset ($sel_toplinks[30]) ) $sel_toplinks[30]="";
    if ( ! isset ($sel_toplinks[50]) ) $sel_toplinks[50]="";

    if ( ! isset ($sel_linksresults[10]) ) $sel_linksresults[10]="";
    if ( ! isset ($sel_linksresults[15]) ) $sel_linksresults[15]="";
    if ( ! isset ($sel_linksresults[20]) ) $sel_linksresults[20]="";
    if ( ! isset ($sel_linksresults[25]) ) $sel_linksresults[25]="";
    if ( ! isset ($sel_linksresults[30]) ) $sel_linksresults[30]="";
    if ( ! isset ($sel_linksresults[50]) ) $sel_linksresults[50]="";

    if ( ! isset($sel_anonaddlinklock[0]) ) $sel_anonaddlinklock[0] = "" ;
    if ( ! isset($sel_anonaddlinklock[1]) ) $sel_anonaddlinklock[1] = "" ;

    if ( ! isset($sel_notify[0]) ) $sel_notify[0] = "" ;
    if ( ! isset($sel_notify[1]) ) $sel_notify[1] = "" ;

    if ( ! isset($sel_moderate[1]) ) $sel_moderate[1] = "" ;
    if ( ! isset($sel_moderate[2]) ) $sel_moderate[2] = "" ;
    if ( ! isset($sel_moderate[3]) ) $sel_moderate[3] = "" ;

    if ( ! isset($sel_setCookies[0]) ) $sel_setCookies[0] = "" ;
    if ( ! isset($sel_setCookies[1]) ) $sel_setCookies[1] = "" ;

    if ( ! isset($sel_pollcomm[0]) ) $sel_pollcomm[0] = "" ;
    if ( ! isset($sel_pollcomm[1]) ) $sel_pollcomm[1] = "" ;

    if ( ! isset($sel_admingraphic[0]) ) $sel_admingraphic[0] = "" ;
    if ( ! isset($sel_admingraphic[1]) ) $sel_admingraphic[1] = "" ;

    if ( ! isset($sel_usergraphic[0]) ) $sel_usergraphic[0] = "" ;
    if ( ! isset($sel_usergraphic[1]) ) $sel_usergraphic[1] = "" ;


    if ( ! isset($sel_topicsinrow[1]) ) $sel_topicsinrow[1] = "" ;
    if ( ! isset($sel_topicsinrow[2]) ) $sel_topicsinrow[2] = "" ;
    if ( ! isset($sel_topicsinrow[3]) ) $sel_topicsinrow[3] = "" ;
    if ( ! isset($sel_topicsinrow[4]) ) $sel_topicsinrow[4] = "" ;
    if ( ! isset($sel_topicsinrow[5]) ) $sel_topicsinrow[5] = "" ;


    if ( ! isset ($sel_admart[10]) ) $sel_admart[10]="";
    if ( ! isset ($sel_admart[15]) ) $sel_admart[15]="";
    if ( ! isset ($sel_admart[20]) ) $sel_admart[20]="";
    if ( ! isset ($sel_admart[25]) ) $sel_admart[25]="";
    if ( ! isset ($sel_admart[30]) ) $sel_admart[30]="";
    if ( ! isset ($sel_admart[50]) ) $sel_admart[50]="";

    if ( ! isset ($sel_minpass[3]) ) $sel_minpass[3]="";
    if ( ! isset ($sel_minpass[5]) ) $sel_minpass[5]="";
    if ( ! isset ($sel_minpass[8]) ) $sel_minpass[8]="";
    if ( ! isset ($sel_minpass[10])) $sel_minpass[10]="";

    if ( ! isset ($sel_popular[100]) ) $sel_popular[100]="";
    if ( ! isset ($sel_popular[250]) ) $sel_popular[250]="";
    if ( ! isset ($sel_popular[500]) ) $sel_popular[500]="";
    if ( ! isset ($sel_popular[1000])) $sel_popular[1000]="";
    if ( ! isset ($sel_popular[1500])) $sel_popular[1500]="";
    if ( ! isset ($sel_popular[2000])) $sel_popular[2000]="";

    if ( ! isset($sel_httpref[0]) ) $sel_httpref[0] = "" ;
    if ( ! isset($sel_httpref[1]) ) $sel_httpref[1] = "" ;

    if ( ! isset ($sel_httprefmax[100]) ) $sel_httprefmax[100]="";
    if ( ! isset ($sel_httprefmax[250]) ) $sel_httprefmax[250]="";
    if ( ! isset ($sel_httprefmax[500]) ) $sel_httprefmax[500]="";
    if ( ! isset ($sel_httprefmax[1000])) $sel_httprefmax[1000]="";
    if ( ! isset ($sel_httprefmax[2000])) $sel_httprefmax[2000]="";


    //
    // 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
    
        //addition for upgrading from older config.php for autolink
        if ($pnconfig['autolinkpref']) {
                $GLOBALS['autolinkpref'] = $pnconfig['autolinkpref'];
        } else {
                 $GLOBALS['autolinkpref'] = 0;
        }

        // end of addition







         OpenTable();
    print '<center><font size="3" class="pn-title">'._GENSITEINFO.'</font></center>'
        .'<form action="admin.php" name="settings" method="post">'
        // The next line was added by sgk on Oct 23, 2001.
        // This hidden value will be used in ConfigSave() function.
        .'<input type="hidden" name="_magic_quotes_gpc_test" value="&quot;">'
        .'<table border="0"><tr><td class="pn-normal">'
        ._SITENAME.":</td><td><input type=\"text\" name=\"xsitename\" value=\"$GLOBALS[sitename]\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._SITEURL.":</td><td><input type=\"text\" name=\"xnukeurl\" value=\"$GLOBALS[nukeurl]\" size=\"50\" maxlength=\"200\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._SITELOGO.":</td><td><input type=\"text\" name=\"xsite_logo\" value=\"$GLOBALS[site_logo]\" size=\"20\" maxlength=\"25\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._SITESLOGAN.":</td><td><input type=\"text\" name=\"xslogan\" value=\"$GLOBALS[slogan]\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._METAKEYWORDS.':</td><td><textarea name="xmetakeywords" cols="60" rows="5" wrap="virtual" class="pn-normal">'.htmlspecialchars($GLOBALS['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.' &nbsp;'
        ."<input type=\"radio\" name=\"xdyn_keywords\" value=\"0\"$sel_dynkeywords[0] class=\"pn-normal\">"._NO.'&nbsp;'
        .'</td></tr><tr><td class="pn-normal">'
        ._STARTDATE.":</td><td><input type=\"text\" name=\"xstartdate\" value=\"$GLOBALS[startdate]\" size=\"20\" maxlength=\"30\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ADMINEMAIL.":</td><td><input type=\"text\" name=\"xadminmail\" value=\"$GLOBALS[adminmail]\" size=30 maxlength=100>"
        .'</td></tr><tr><td class="pn-normal">'
        ._ITEMSTOP.':</td><td><select name="xtop" size="1" class="pn-normal">'
        ."<option value=\"5\"$sel_top[5]>5</option>"
        ."<option value=\"10\"$sel_top[10]>10</option>"
        ."<option value=\"15\"$sel_top[15]>15</option>"
        ."<option value=\"20\"$sel_top[20]>20</option>"
        ."<option value=\"25\"$sel_top[25]>25</option>"
        ."<option value=\"30\"$sel_top[30]>30</option>"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._STORIESHOME.':</td><td><select name="xstoryhome" size="1" class="pn-normal">'
        ."<option value=\"5\"$sel_storyhome[5]>5</option>"
        ."<option value=\"10\"$sel_storyhome[10]>10</option>"
        ."<option value=\"15\"$sel_storyhome[15]>15</option>"
        ."<option value=\"20\"$sel_storyhome[20]>20</option>"
        ."<option value=\"25\"$sel_storyhome[25]>25</option>"
        ."<option value=\"30\"$sel_storyhome[30]>30</option>"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._OLDSTORIES.':</td><td><select name="xoldnum" size="1" class="pn-normal">'
        ."<option value=\"10\"$sel_oldnum[10]>10</option>"
        ."<option value=\"20\"$sel_oldnum[20]>20</option>"
        ."<option value=\"30\"$sel_oldnum[30]>30</option>"
        ."<option value=\"40\"$sel_oldnum[40]>40</option>"
        ."<option value=\"50\"$sel_oldnum[50]>50</option>"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._ALLOWANONPOST.' </td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xanonpost\" value=\"1\"$sel_anonpost[1] class=\"pn-normal\">"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xanonpost\" value=\"0\"$sel_anonpost[0] class=\"pn-normal\">"._NO
        .'</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)
    {
//FTO Avoid Warning
        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">'
        ._SELLANGUAGE.':</td><td class="pn-normal">'
        .'<select name="xlanguage" size="1" class="pn-normal">'
    ;
    $lang = languagelist();
    $handle = opendir('language');
    while ($f = readdir($handle))
    {
        if (is_dir("language/$f") && $lang[$f])
        {
            $langlist[$f] = $lang[$f];
        }
    }
    asort($langlist);
    foreach ($langlist as $k=>$v)
    {
        print "<option value=\"$k\"$sel_lang[$k]>$v</option>\n";
    }
    print '</select>'
        .'</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.' &nbsp;'
        ."<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=\"$GLOBALS[locale]\" size=\"20\" maxlength=\"40\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._TIMEZONEOFFSET.':</td><td class="pn-normal"><select name="xtimezoneoffset" size="1" class="pn-normal">'
        ."<option value=\"0.0\"".$sel_tzoffset['0.0'].">(GMT -12:00 hours - $tzstring[tz0]) Eniwetok, Kwajalein</option>\n"
        ."<option value=\"1.0\"".$sel_tzoffset['1.0'].">(GMT -11:00 hours - $tzstring[tz1]) Midway Island, Samoa</option>\n"
        ."<option value=\"2.0\"".$sel_tzoffset['2.0'].">(GMT -10:00 hours - $tzstring[tz2]) Hawaii</option>\n"
        ."<option value=\"3.0\"".$sel_tzoffset['3.0'].">(GMT -9:00 hours - $tzstring[tz3]) Alaska</option>\n"
        ."<option value=\"4.0\"".$sel_tzoffset['4.0'].">(GMT -8:00 hours - $tzstring[tz4]) Pacific Time (US & Canada)</option>\n"
        ."<option value=\"5.0\"".$sel_tzoffset['5.0'].">(GMT -7:00 hours - $tzstring[tz5]) Mountain Time (US & Canada)</option>\n"
        ."<option value=\"6.0\"".$sel_tzoffset['6.0'].">(GMT -6:00 hours - $tzstring[tz6]) Central Time (US & Canada), Mexico City</option>\n"
        ."<option value=\"7.0\"".$sel_tzoffset['7.0'].">(GMT -5:00 hours - $tzstring[tz7]) Eastern Time (US & Canada), Bogota, Lima, Quito</option>\n"
        ."<option value=\"8.0\"".$sel_tzoffset['8.0'].">(GMT -4:00 hours - $tzstring[tz8]) Atlantic Time (Canada), Caracas, La Paz</option>\n"
        ."<option value=\"8.5\"".$sel_tzoffset['8.5'].">(GMT -3:30 hours - $tzstring[tz8a]) Newfoundland</option>\n"
        ."<option value=\"9.0\"".$sel_tzoffset['9.0'].">(GMT -3:00 hours - $tzstring[tz9]) Brazil, Buenos Aires, Georgetown</option>\n"
        ."<option value=\"10.0\"".$sel_tzoffset['10.0'].">(GMT -2:00 hours - $tzstring[tz10]) Mid-Atlantic</option>\n"
        ."<option value=\"11.0\"".$sel_tzoffset['11.0'].">(GMT -1:00 hours - $tzstring[tz11]) Azores, Cape Verde Islands</option>\n"
        ."<option value=\"12.0\"".$sel_tzoffset['12.0'].">(GMT - $tzstring[tz12]) Western Europe Time, London, Lisbon, Casablanca, Monrovia</option>\n"
        ."<option value=\"13.0\"".$sel_tzoffset['13.0'].">(GMT +1:00 hours - $tzstring[tz13]) CET(Central Europe Time), Brussels, Copenhagen, Madrid, Paris</option>\n"
        ."<option value=\"14.0\"".$sel_tzoffset['14.0'].">(GMT +2:00 hours - $tzstring[tz14]) EET(Eastern Europe Time), Kaliningrad, South Africa</option>\n"
        ."<option value=\"15.0\"".$sel_tzoffset['15.0'].">(GMT +3:00 hours - $tzstring[tz15]) Baghdad, Kuwait, Riyadh, Moscow, St. Petersburg, Volgograd, Nairobi</option>\n"
        ."<option value=\"15.5\"".$sel_tzoffset['15.5'].">(GMT +3:30 hours - $tzstring[tz15a]) Tehran</option>\n"
        ."<option value=\"16.0\"".$sel_tzoffset['16.0'].">(GMT +4:00 hours - $tzstring[tz16]) Abu Dhabi, Muscat, Baku, Tbilisi</option>\n"
        ."<option value=\"16.5\"".$sel_tzoffset['16.5'].">(GMT +4:30 hours - $tzstring[tz16a]) Kabul</option>\n"
        ."<option value=\"17.0\"".$sel_tzoffset['17.0'].">(GMT +5:00 hours - $tzstring[tz17]) Ekaterinburg, Islamabad, Karachi, Tashkent</option>\n"
        ."<option value=\"17.5\"".$sel_tzoffset['17.5'].">(GMT +5:30 hours - $tzstring[tz17a]) Bombay, Calcutta, Madras, New Delhi</option>\n"
        ."<option value=\"18.0\"".$sel_tzoffset['18.0'].">(GMT +6:00 hours - $tzstring[tz18]) Almaty, Dhaka, Colombo</option>\n"
        ."<option value=\"19.0\"".$sel_tzoffset['19.0'].">(GMT +7:00 hours - $tzstring[tz19]) Bangkok, Hanoi, Jakarta</option>\n"
        ."<option value=\"20.0\"".$sel_tzoffset['20.0'].">(GMT +8:00 hours - $tzstring[tz20]) Beijing, Perth, Singapore, Hong Kong, Chongqing, Urumqi, Taipei</option>\n"
        ."<option value=\"21.0\"".$sel_tzoffset['21.0'].">(GMT +9:00 hours - $tzstring[tz21]) Tokyo, Seoul, Osaka, Sapporo, Yakutsk</option>\n"
        ."<option value=\"21.5\"".$sel_tzoffset['21.5'].">(GMT +9:30 hours - $tzstring[tz21a]) Adelaide, Darwin</option>\n"
        ."<option value=\"22.0\"".$sel_tzoffset['22.0'].">(GMT +10:00 hours - $tzstring[tz22]) EAST(East Australian Standard), Guam, Papua New Guinea, Vladivostok</option>\n"
        ."<option value=\"23.0\"".$sel_tzoffset['23.0'].">(GMT +11:00 hours - $tzstring[tz23]) Magadan, Solomon Islands, New Caledonia</option>\n"
        ."<option value=\"24.0\"".$sel_tzoffset['24.0'].">(GMT +12:00 hours - $tzstring[tz24]) Auckland, Wellington, Fiji, Kamchatka, Marshall Island</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._MINAGE."</td><td class=\"pn-normal\"><input type=\"text\" name=\"xminage\" value=\"$GLOBALS[minage]\" size=\"2\" maxlength=\"2\" class=\"pn-normal\" /> "._MINAGEDESCR."\n"
        .'</td></tr><tr><td class="pn-normal">'
        ._STARTPAGE."</td><td class=\"pn-normal\">"
        ."<select name=\"xstartpage\" size=\"1\" class=\"pn-normal\">\n";
    $handle = opendir('modules');
    while ($f = readdir($handle))
    {
        if ((!ereg('[.]', $f)) && $f != 'CVS' && (!ereg('NS-', $f)))
        {
            $startpagepath = "$f";
            if ($GLOBALS['startpage'] == $startpagepath)
            {
                $sel_startpage = " selected";
            }
            else
            {
                $sel_startpage = "";
            }
            echo "<option value=\"$startpagepath\"$sel_startpage>$f</option>\n";
        }
    }
    closedir($handle);
    echo "</select> "._STARTPAGEDESCR."\n"
        ."</td></tr><tr><td class=\"pn-normal\">\n"
        .'</td></tr>'
        .'</table>'
    ;
    CloseTable();
    // ML : Crocket 07-10: added multilingual options
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._MULTILINGUALOPT.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._ACTMULTILINGUAL.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xmultilingual\" value=\"1\" class=\"pn-normal\" $sel_multilingual[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xmultilingual\" value=\"0\" class=\"pn-normal\" $sel_multilingual[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._ACTUSEFLAGS.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xuseflags\" value=\"1\" class=\"pn-normal\"$sel_useflags[1]>"._YES." &nbsp;"
        ."<input type=\"radio\" name=\"xuseflags\" value=\"0\" class=\"pn-normal\"$sel_useflags[0]>"._NO
        .'</td></tr></table>'
    ;
    // ML : END MULTILINGUAL OPTIONS
    CloseTable();
    print '<br><a name="banners">';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._BANNERSOPT.'</b></font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._ACTBANNERS.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xbanners\" value=\"1\" class=\"pn-normal\"$sel_banners[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xbanners\" value=\"0\" class=\"pn-normal\"$sel_banners[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._YOURIP.':</td><td>'
        ."<input type=\"text\" name=\"xmyIP\" value=\"$GLOBALS[myIP]\" size=\"30\" class=\"pn-normal\">"
        .'</td></tr></table>'
    ;
    CloseTable();
    print '</a><br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._FOOTERMSG.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._FOOTERLINE.':</td><td><textarea name="xfoot1" cols="50" rows="5" wrap="soft" class="pn-normal">'.htmlspecialchars($GLOBALS['foot1']).'</textarea>'
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    $rsslang['af']           = "Afrikaans";
    $rsslang['sq']           = "Albanian";
    $rsslang['ar-bh']        = "Arabic (Bahrain)";
    $rsslang['eu']           = "Basque";
    $rsslang['be']           = "Belarusian";
    $rsslang['bg']           = "Bulgarian";
    $rsslang['ca']           = "Catalan";
    $rsslang['zh-cn']        = 'Chinese (Simplified)';
    $rsslang['zh-tw']        = 'Chinese (Traditional)';
    $rsslang['hr']           = 'Croatian';
    $rsslang['cs']           = 'Czech';
    $rsslang['da']           = 'Danish';
    $rsslang['nl']           = 'Dutch';
    $rsslang['nl-be']        = 'Dutch (Belgium)';
    $rsslang['nl-nl']        = 'Dutch (Netherlands)';
    $rsslang['en']           = 'English';
    $rsslang['en-au']        = 'English (Australia)';
    $rsslang['en-bz']        = 'English (Belize)';
    $rsslang['en-ca']        = 'English (Canada)';
    $rsslang['en-ie']        = 'English (Ireland)';
    $rsslang['en-jm']        = 'English (Jamaica)';
    $rsslang['en-nz']        = 'English (New Zealand)';
    $rsslang['en-ph']        = 'English (Phillipines)';
    $rsslang['en-za']        = 'English (South Africa)';
    $rsslang['en-tt']        = 'English (Trinidad)';
    $rsslang['en-gb']        = 'English (United Kingdom)';
    $rsslang['en-us']        = 'English (United States)';
    $rsslang['en-zw']        = 'English (Zimbabwe)';
    $rsslang['fo']           = 'Faeroese';
    $rsslang['fi']           = 'Finnish';
    $rsslang['fr']           = 'French';
    $rsslang['fr-be']        = 'French (Belgium)';
    $rsslang['fr-ca']        = 'French (Canada)';
    $rsslang['fr-fr']        = 'French (France)';
    $rsslang['fr-lu']        = 'French (Luxembourg)';
    $rsslang['fr-mc']        = 'French (Monaco)';
    $rsslang['fr-ch']        = 'French (Switzerland)';
    $rsslang['gl']           = 'Galician';
    $rsslang['gd']           = 'Gaelic';
    $rsslang['de']           = 'German';
    $rsslang['de-at']        = 'German (Austria)';
    $rsslang['de-de']        = 'German (Germany)';
    $rsslang['de-li']        = 'German (Liechtenstein)';
    $rsslang['de-lu']        = 'German (Luxembourg)';
    $rsslang['de-ch']        = 'German (Switzerland)';
    $rsslang['el']           = 'Greek';
    $rsslang['hu']           = 'Hungarian';
    $rsslang['is']           = 'Icelandic';
    $rsslang['in']           = 'Indonesian';
    $rsslang['ga']           = 'Irish';
    $rsslang['it']           = 'Italian';
    $rsslang['it-it']        = 'Italian (Italy)';
    $rsslang['it-ch']        = 'Italian (Switzerland)';
    $rsslang['ja']           = 'Japanese';
    $rsslang['ko']           = 'Korean';
    $rsslang['mk']           = 'Macedonian';
    $rsslang['no']           = 'Norwegian';
    $rsslang['pl']           = 'Polish';
    $rsslang['pt']           = 'Portuguese';
    $rsslang['pt-br']        = 'Portuguese (Brazil)';
    $rsslang['pt-pt']        = 'Portuguese (Portugal)';
    $rsslang['ro']           = 'Romanian';
    $rsslang['ro-mo']        = 'Romanian (Moldova)';
    $rsslang['ro-ro']        = 'Romanian (Romania)';
    $rsslang['ru']           = 'Russian';
    $rsslang['KOI8-R']       = 'Russian KOI8-R';
    $rsslang['ru-mo']        = 'Russian (Moldova)';
    $rsslang['ru-ru']        = 'Russian (Russia)';
    $rsslang['sr']           = 'Serbian';
    $rsslang['sk']           = 'Slovak';
    $rsslang['sl']           = 'Slovenian';
    $rsslang['es']           = 'Spanish';
    $rsslang['es-ar']        = 'Spanish (Argentina)';
    $rsslang['es-bo']        = 'Spanish (Bolivia)';
    $rsslang['es-cl']        = 'Spanish (Chile)';
    $rsslang['es-co']        = 'Spanish (Colombia)';
    $rsslang['es-cr']        = 'Spanish (Costa Rica)';
    $rsslang['es-do']        = 'Spanish (Dominican Republic)';
    $rsslang['es-ec']        = 'Spanish (Ecuador)';
    $rsslang['es-sv']        = 'Spanish (El Salvador)';
    $rsslang['es-gt']        = 'Spanish (Guatemala)';
    $rsslang['es-hn']        = 'Spanish (Honduras)';
    $rsslang['es-mx']        = 'Spanish (Mexico)';
    $rsslang['es-ni']        = 'Spanish (Nicaragua)';
    $rsslang['es-pa']        = 'Spanish (Panama)';
    $rsslang['es-py']        = 'Spanish (Paraguay)';
    $rsslang['es-pe']        = 'Spanish (Peru)';
    $rsslang['es-pr']        = 'Spanish (Puerto Rico)';
    $rsslang['es-es']        = 'Spanish (Spain)';
    $rsslang['es-uy']        = 'Spanish (Uruguay)';
    $rsslang['es-ve']        = 'Spanish (Venezuela)';
    $rsslang['sv']           = 'Swedish';
    $rsslang['sv-fi']        = 'Swedish (Finland)';
    $rsslang['sv-se']        = 'Swedish (Sweden)';
    $rsslang['th']           = 'Thai';
    $rsslang['tr']           = 'Turkish';
    $rsslang['uk']           = 'Ukranian';
    $rsslang['ar']           = 'Arabic';
    $rsslang['ar-ae']        = 'Arabic (United Arab Emirates)';
    $rsslang['ar-bh']        = 'Arabic (Bahrain)';
    $rsslang['ar-dz']        = 'Arabic (Algeria)';
    $rsslang['ar-eg']        = 'Arabic (Egypt)';
    $rsslang['ar-iq']        = 'Arabic (Iraq)';
    $rsslang['ar-jo']        = 'Arabic (Jordan)';
    $rsslang['ar-kw']        = 'Arabic (Kuwait)';
    $rsslang['ar-lb']        = 'Arabic (Lebanon)';
    $rsslang['ar-ly']        = 'Arabic (Libya)';
    $rsslang['ar-ma']        = 'Arabic (Morocco)';
    $rsslang['ar-mr']        = 'Arabic (Mauritania)';
    $rsslang['ar-om']        = 'Arabic (Oman)';
    $rsslang['ar-qa']        = 'Arabic (Qatar)';
    $rsslang['ar-sa']        = 'Arabic (Saudi Arabia)';
    $rsslang['ar-sd']        = 'Arabic (Sudan)';
    $rsslang['ar-so']        = 'Arabic (Somalia)';
    $rsslang['ar-sy']        = 'Arabic (Syria)';
    $rsslang['ar-tn']        = 'Arabic (Tunisia)';
    $rsslang['ar-ye']        = 'Arabic (Yemen)';
    $rsslang['ar-km']        = 'Arabic (Comoros)';
    $rsslang['ar-dj']        = 'Arabic (Djibouti)';
    asort($rsslang);
    OpenTable();
    print '<center><font size="3" class="pn-title">'._BACKENDCONF.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._BACKENDTITLE.":</td><td><input type=\"text\" name=\"xbackend_title\" value=\"$GLOBALS[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">'
    ;
    foreach ($rsslang as $k=>$v)
    {
//FTO : Avoid warning
        if (! isset($sel_backendlanguage[$k])) $sel_backendlanguage[$k]="";
        
        
        print "<option value=\"$k\"$sel_backendlanguage[$k]>[$k] $v</option>\n";
    }
    print '</select>'
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._WEBLINKSCONF.'</b></font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._LINKSPAGE.':</td><td>'
        .'<select name="xperpage" size="1" class="pn-normal">'
        ."<option value=\"10\"$sel_perpage[10]>10</option>\n"
        ."<option value=\"15\"$sel_perpage[15]>15</option>\n"
        ."<option value=\"20\"$sel_perpage[20]>20</option>\n"
        ."<option value=\"25\"$sel_perpage[25]>25</option>\n"
        ."<option value=\"30\"$sel_perpage[30]>30</option>\n"
        ."<option value=\"50\"$sel_perpage[50]>50</option>\n"
        .'</select>'
        ."<input type=\"hidden\" value=\"$GLOBALS[links_anonaddlinklock]\" name=\"xlinks_anonaddlinklock\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[anonwaitdays]\" name=\"xanonwaitdays\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[outsidewaitdays]\" name=\"xoutsidewaitdays\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[useoutsidevoting]\" name=\"xuseoutsidevoting\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[anonweight]\" name=\"xanonweight\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[outsideweight]\" name=\"xoutsideweight\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[detailvotedecimal]\" name=\"xdetailvotedecimal\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[mainvotedecimal]\" name=\"xmainvotedecimal\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[toplinkspercentrigger]\" name=\"xtoplinkspercentrigger\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[toplinks]\" name=\"xtoplinks\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[mostpoplinkspercentrigger]\" name=\"xmostpoplinkspercentrigger\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[mostpoplinks]\" name=\"xmostpoplinks\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[featurebox]\" name=\"xfeaturebox\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[linkvotemin]\" name=\"xlinkvotemin\">"
        ."<input type=\"hidden\" value=\"$GLOBALS[blockunregmodify]\" name=\"xblockunregmodify\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._TOBEPOPULAR.':</td><td>'
        .'<select name="xpopular" size="1" class="pn-normal">'
        ."<option value=\"100\"$sel_popular[100]>100</option>\n"
        ."<option value=\"250\"$sel_popular[250]>250</option>\n"
        ."<option value=\"500\"$sel_popular[500]>500</option>\n"
        ."<option value=\"1000\"$sel_popular[1000]>1000</option>\n"
        ."<option value=\"1500\"$sel_popular[1500]>1500</option>\n"
        ."<option value=\"2000\"$sel_popular[2000]>2000</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._LINKSASNEW.':</td><td>'
        .'<select name="xnewlinks" size="1" class="pn-normal">'
        ."<option value=\"10\"$sel_newlinks[10]>10</option>\n"
        ."<option value=\"15\"$sel_newlinks[15]>15</option>\n"
        ."<option value=\"20\"$sel_newlinks[20]>20</option>\n"
        ."<option value=\"25\"$sel_newlinks[25]>25</option>\n"
        ."<option value=\"30\"$sel_newlinks[30]>30</option>\n"
        ."<option value=\"50\"$sel_newlinks[50]>50</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._LINKSASBEST.':</td><td>'
        .'<select name="xtoplinks" size="1" class="pn-normal">'
        ."<option value=\"10\"$sel_toplinks[10]>10</option>\n"
        ."<option value=\"15\"$sel_toplinks[15]>15</option>\n"
        ."<option value=\"20\"$sel_toplinks[20]>20</option>\n"
        ."<option value=\"25\"$sel_toplinks[25]>25</option>\n"
        ."<option value=\"30\"$sel_toplinks[30]>30</option>\n"
        ."<option value=\"50\"$sel_toplinks[50]>50</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._LINKSINRES.':</td><td>'
        .'<select name="xlinksresults" class="pn-normal">'
        ."<option value=\"10\"$sel_linksresults[10]>10</option>\n"
        ."<option value=\"15\"$sel_linksresults[15]>15</option>\n"
        ."<option value=\"20\"$sel_linksresults[20]>20</option>\n"
        ."<option value=\"25\"$sel_linksresults[25]>25</option>\n"
        ."<option value=\"30\"$sel_linksresults[30]>30</option>\n"
        ."<option value=\"50\"$sel_linksresults[50]>50</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._ANONPOSTLINKS.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xlinks_anonaddlinklock\" value=\"1\" class=\"pn-normal\"$sel_anonaddlinklock[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xlinks_anonaddlinklock\" value=\"0\" class=\"pn-normal\"$sel_anonaddlinklock[0]>"._NO
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._MAIL2ADMIN.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._NOTIFYSUBMISSION.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xnotify\" value=\"1\" class=\"pn-normal\"$sel_notify[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xnotify\" value=\"0\" class=\"pn-normal\"$sel_notify[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._EMAIL2SENDMSG.":</td><td><input type=\"text\" name=\"xnotify_email\" value=\"$GLOBALS[notify_email]\" size=\"30\" maxlength=\"100\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._EMAILSUBJECT.":</td><td><input type=\"text\" name=\"xnotify_subject\" value=\"$GLOBALS[notify_subject]\" size=\"50\" maxlength=\"100\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._EMAILMSG.':</td><td><textarea name="xnotify_message" cols="40" rows="8" wrap="soft" class="pn-normal">'.htmlspecialchars($GLOBALS['notify_message']).'</textarea>'
        .'</td></tr><tr><td class="pn-normal">'
        ._EMAILFROM.":</td><td><input type=\"text\" name=\"xnotify_from\" value=\"$GLOBALS[notify_from]\" size=\"15\" maxlength=\"255\" class=\"pn-normal\">"
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._COMMENTSMOD.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._MODTYPE.':</td><td>'
        .'<select name="xmoderate" size="1" class="pn-normal">'
        ."<option value=\"1\"$sel_moderate[1]>"._MODADMIN.'</option>'
        ."<option value=\"2\"$sel_moderate[2]>"._MODUSERS.'</option>'
        ."<option value=\"0\"$sel_moderate[3]>"._NOMOD.'</option>'
        .'</select>'
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._COMMENTSOPT.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._COMMENTSLIMIT.":</td><td><input type=\"text\" name=\"xcommentlimit\" value=\"$GLOBALS[commentlimit]\" size=\"11\" maxlength=\"10\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ANONYMOUSNAME.":</td><td><input type=\"text\" name=\"xanonymous\" value=\"$GLOBALS[anonymous]\" size=\"15\" class=\"pn-normal\">"
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._SURVEYSCONF.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._SCALEBAR.":</td><td><input type=\"text\" name=\"xBarScale\" value=\"$GLOBALS[BarScale]\" size=\"4\" maxlength=\"3\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ALLOWTWICE.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xsetCookies\" value=\"1\" class=\"pn-normal\"$sel_setCookies[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xsetCookies\" value=\"0\" class=\"pn-normal\"$sel_setCookies[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._COMMENTSPOLLS.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xpollcomm\" value=\"1\" class=\"pn-normal\"$sel_pollcomm[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xpollcomm\" value=\"0\" class=\"pn-normal\"$sel_pollcomm[0]>"._NO
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._GRAPHICOPT.'</b></font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._TOPICSPATH.":</td><td><input type=\"text\" name=\"xtipath\" value=\"$GLOBALS[tipath]\" size=\"50\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._USERPATH.":</td><td><input type=\"text\" name=\"xuserimg\" value=\"$GLOBALS[userimg]\" size=\"50\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ADMINPATH.":</td><td><input type=\"text\" name=\"xadminimg\" value=\"$GLOBALS[adminimg]\" size=\"50\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ADMINGRAPHIC.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xadmingraphic\" value=\"1\" class=\"pn-normal\"$sel_admingraphic[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xadmingraphic\" value=\"0\" class=\"pn-normal\"$sel_admingraphic[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._USERGRAPHIC.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xusergraphic\" value=\"1\" class=\"pn-normal\"$sel_usergraphic[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xusergraphic\" value=\"0\" class=\"pn-normal\"$sel_usergraphic[0]>"._NO
        .'<tr><td class="pn-normal">'
        ._TOPICSINROW.'</td><td>'	// for choosing number of topic icons per row - rwwood
	.'<select name="xtopicsinrow" size="1" class="pn-normal">'
        ."<option value=\"1\"$sel_topicsinrow[1]>1</option>\n"
        ."<option value=\"2\"$sel_topicsinrow[2]>2</option>\n"
        ."<option value=\"3\"$sel_topicsinrow[3]>3</option>\n"
        ."<option value=\"4\"$sel_topicsinrow[4]>4</option>\n"
        ."<option value=\"5\"$sel_topicsinrow[5]>5</option>\n"
        .'</select>'
        .'</td></tr></table>'
    ;
    CloseTable();
    print '<br>';
    OpenTable();
    print '<center><font size="3" class="pn-title">'._MISCOPT.'</font></center>'
        .'<table border="0"><tr><td class="pn-normal">'
        ._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">'
        ._PASSWDLEN.':</td><td>'
        .'<select name="xminpass" size"1" class="pn-normal">'
        ."<option value=\"3\"$sel_minpass[3]>3</option>\n"
        ."<option value=\"5\"$sel_minpass[5]>5</option>\n"
        ."<option value=\"8\"$sel_minpass[8]>8</option>\n"
        ."<option value=\"10\"$sel_minpass[10]>10</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
        ._DEFAULTGROUP.":</td><td><input type=\"text\" name=\"xdefaultgroup\" value=\"$GLOBALS[defaultgroup]\" size=\"20\" class=\"pn-normal\">"
        .'</td></tr><tr><td class="pn-normal">'
        ._ACTIVATEHTTPREF.'</td><td class="pn-normal">'
        ."<input type=\"radio\" name=\"xhttpref\" value=\"1\" class=\"pn-normal\"$sel_httpref[1]>"._YES.' &nbsp;'
        ."<input type=\"radio\" name=\"xhttpref\" value=\"0\" class=\"pn-normal\"$sel_httpref[0]>"._NO
        .'</td></tr><tr><td class="pn-normal">'
        ._MAXREF.'</td><td>'
        .'<select name="xhttprefmax" size="1" class="pn-normal">'
        ."<option value=\"100\"$sel_httprefmax[100]>100</option>\n"
        ."<option value=\"250\"$sel_httprefmax[250]>250</option>\n"
        ."<option value=\"500\"$sel_httprefmax[500]>500</option>\n"
        ."<option value=\"1000\"$sel_httprefmax[1000]>1000</option>\n"
//FTO Bug 2000 instead 1000
//      ."<option value=\"1000\"$sel_httprefmax[2000]>2000</option>\n"
        ."<option value=\"2000\"$sel_httprefmax[2000]>2000</option>\n"
        .'</select>'
        .'</td></tr><tr><td class="pn-normal">'
 .'</td><td class="pn-normal">'
."<input type=\"hidden\" name=\"xautolinkpref\" value=\"$GLOBALS[autolinkpref]\">"
.'</td></tr></table><br><br>'
        .'<input type="hidden" name="op" value="ConfigSave">'
        .'<center><input type="submit" value="'._SAVECHANGES.'" class="pn-normal" style="text-align:center"></center>'
        .'</form>'
    ;
    CloseTable();
    include 'footer.php';
}

function ConfigSave($vars) {

    if (!(authorised(0, 'Settings::', '::', ACCESS_ADMIN))) {
        include 'header.php';
        echo _SETTINGSNOAUTH;
        include 'footer.php';
        return;
    }


    // Escape some characters in these variables.
    // hehe, I like doing this, much cleaner :-)
    $fixvars = array (
        'xsitevars',
        'xnukeurl',
        'xsite_logo',
        'xslogan',
        'xmetakeywords',
        'xstartdate',
        'xDefault_Theme',
        'xmyIP',
        'xfoot1',
        'xbackend_title',
        'xbackend_language',
        'xlanguage',
        'xlocale',
        'xnotify_email',
        'xnotify_subject',
        'xnotify_message',
        'xnotify_from',
        'xanonymous',
        'xtipath',
        'xuserimg',
        'xadminimg'
    );

    //
    // This 'if' and the false block was added by sgk on Oct 23, 2001.
    // This enable the system to work when the magic quote is off.
    //
    if ($vars["_magic_quotes_gpc_test"] == '\\"') {
        // magic_quotes_gpc == on
        foreach ($fixvars as $v)
            $vars[$v] = FixConfigQuotes($vars[$v]);
    } else {
        // magic_quotes_gpc == off
        foreach ($fixvars as $v) {
            $s = $vars[$v];
            $vars[$v] = "";
            while (ereg('^([^"]*)"(.*)', $s, $a)) {
                $vars[$v] .= $a[1] . '\\"';
                $s = $a[2];
            }
            $vars[$v] .= $s;
        }
    }

    // Set any numerical variables that havn't been set, to 0. i.e. paranoia check :-)
    $fixvars = array (
        'xdyn_keywords',
        'xminage',
        'xanonpost',
        'xpollcomm',
        'xbanners',
        'xuseflags',
        'xlinks_anonaddlinklock',
        'xoutsidewaitdays',
        'xfeaturebox',
        'xblockunregmodify',
        'downloads_anonadddownloadlock',
        'user_adddownload',
        'xnotify',
        'xmoderate',
        'xsetCookies',
        'xadmingraphic',
        'xhttpref',
        'xnobox',
        'xautolinkpref',
        'xusergraphic'
    );
    foreach ($fixvars as $v)
    {
//FTO Bug : v was used instead $v
        if (!$$vars[$v])
        {
            $$vars[$v] = 0;
        }
    }
    $d = ml_ftime(_DATETIMELONG);
    $content = "<?php // Generated: $d\n"
        ."// ----------------------------------------------------------------------\n"
        ."// POST-NUKE Content Management System\n"
        ."// Copyright (C) 2001 by the Post-Nuke Development Team.\n"
        ."// http://www.postnuke.com/\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Based on:\n"
        ."// PHP-NUKE Web Portal System - http://phpnuke.org/\n"
        ."// Thatware - http://thatware.org/\n"
        ."// ----------------------------------------------------------------------\n"
        ."// LICENSE\n"
        ."//\n"
        ."// This program is free software; you can redistribute it and/or\n"
        ."// modify it under the terms of the GNU General Public License (GPL)\n"
        ."// as published by the Free Software Foundation; either version 2\n"
        ."// of the License, or (at your option) any later version.\n"
        ."//\n"
        ."// This program is distributed in the hope that it will be useful,\n"
        ."// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
        ."// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
        ."// GNU General Public License for more details.\n"
        ."//\n"
        ."// To read the license please visit http://www.gnu.org/copyleft/gpl.html\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Original Author of file: Everyone\n"
        ."// Purpose of file: Configure the main options for your site\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Database & System Config\n"
        ."//\n"
        ."//      dbtype:     type of database, currently only mysql\n"
        ."//      dbhost:     MySQL Database Hostname\n"
        ."//      dbuname:    MySQL Username\n"
        ."//      dbpass:     MySQL Password\n"
        ."//      dbname:     MySQL Database Name\n"
        ."//      system:     0 for Unix/Linux, 1 for Windows\n"
        ."//      encoded:     0 for MySQL information unenccoded\n"
        ."//                          , 1 for encoded\n"
        ."// ----------------------------------------------------------------------\n"
        ."//\n"
        ."\$pnconfig['dbtype'] = '$GLOBALS[dbtype]';\n"
        ."\$pnconfig['dbhost'] = '$GLOBALS[dbhost]';\n"
        ."\$pnconfig['dbuname'] = '$GLOBALS[dbuname]';\n"
        ."\$pnconfig['dbpass'] = '$GLOBALS[dbpass]';\n"
        ."\$pnconfig['dbname'] = '$GLOBALS[dbname]';\n"
        ."\$pnconfig['system'] = '$GLOBALS[system]';\n"
        ."\$pnconfig['prefix'] = '$GLOBALS[prefix]';\n"
        ."\$pnconfig['encoded'] = '$GLOBALS[encoded]';\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// You have finished configuring the database. Now you can start to\n"
        ."// change your site settings in the Administration Section.\n"
        ."// To enter, point your web browser to http://yourdomain.com/admin.php\n"
        ."//\n"
        ."// Remember to chmod 666 this file in order to let the system write\n"
        ."// to it properly. If you can't change the permissions you can edit\n"
        ."// the rest of this file by hand.\n"
        ."//\n"
        ."// Congratulations! You now have an automated news portal!\n"
        ."// Thanks for choosing PostNuke: The Future of the Web.\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// General Site Configuration\n"
        ."//\n"
        ."//    \$sitename:          Your Site Name\n"
        ."//    \$nukeurl:           Complete URL for your site (Do not put / at end)\n"
        ."//    \$site_logo:         Logo for Printer Friendly Page (It's good to have a Black/White graphic)\n"
        ."//    \$slogan:            Your site's slogan\n"
        ."//    \$metakeywords:      Site key words for meta tags\n"
        ."//    \$dyn_keywords:      Activate dynamic keywords (1=Yes 0=No)\n"
        ."//    \$startdate:         Start Date to display in Statistic Page\n"
        ."//    \$adminmail:         Site Administrator's Email\n"
        ."//    \$anonpost:          Allow Anonymous to Post Comments? (1=Yes 0=No)\n"
        ."//    \$Default_Theme:     Default Theme for your site (See /themes directory for the complete list, case sensitive!)\n"
        ."//    \$foot(x):           Messages for all footer pages (Can include HTML code)\n"
        ."//    \$commentlimit:      Maximum number of bytes for each comment\n"
        ."//    \$commentsystemname: Name of the module handeling comments ('system_default' is the default system)\n"
        ."//    \$anonymous:         Anonymous users Default Name\n"
        ."//    \$minpass:           Minimum character for users passwords\n"
        ."//    \$defaultgroup:      Initial group new users are placed in\n"
        ."//    \$pollcomm:          Activate comments in Polls? (1=Yes 0=No)\n"
        ."//    \$timezone_offset    Used for user's time settings\n"
        ."//    \$nobox Determines if you want a right side block displayed in your articles\n"
        ."//    \$minage:            Sets the required age to register (0=No age check)\n"
        ."//    \$startpage:         index.php is redirected to this page\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['sitename'] = stripslashes(\"$vars[xsitename]\");\n"
        ."\$pnconfig['nukeurl'] = \"$vars[xnukeurl]\";\n"
        ."\$pnconfig['site_logo'] = \"$vars[xsite_logo]\";\n"
        ."\$pnconfig['slogan'] = stripslashes(\"$vars[xslogan]\");\n"
        ."\$pnconfig['metakeywords'] = \"$vars[xmetakeywords]\";\n"
        ."\$pnconfig['dyn_keywords'] = \"$vars[xdyn_keywords]\";\n"
        ."\$pnconfig['startdate'] = \"$vars[xstartdate]\";\n"
        ."\$pnconfig['adminmail'] = \"$vars[xadminmail]\";\n"
        ."\$pnconfig['anonpost'] = $vars[xanonpost];\n"
        ."\$pnconfig['Default_Theme'] = \"$vars[xDefault_Theme]\";\n"
        ."\$pnconfig['foot1'] = stripslashes(\"$vars[xfoot1]\");\n"
        ."\$pnconfig['commentlimit'] = $vars[xcommentlimit];\n"
        ."\$pnconfig['anonymous'] = \"$vars[xanonymous]\";\n"
        ."\$pnconfig['minpass'] = $vars[xminpass];\n"
        ."\$pnconfig['defaultgroup'] = \"$vars[xdefaultgroup]\";\n"
        ."\$pnconfig['pollcomm'] = $vars[xpollcomm];\n"
        ."\$pnconfig['timezone_offset'] = '$vars[xtimezoneoffset]';\n"
        ."\$pnconfig['nobox'] = $vars[xnobox];\n"
        ."\$pnconfig['minage'] = \"$vars[xminage]\";\n"
        ."\$pnconfig['startpage'] = \"$vars[xstartpage]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// General Stories Options\n"
        ."//\n"
        ."//    \$top:       How many items in Top Page?\n"
        ."//    \$storyhome: How many stories to display in Home Page?\n"
        ."//    \$oldnum:    How many stories in Old Articles Box?\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['top'] = $vars[xtop];\n"
        ."\$pnconfig['storyhome'] = $vars[xstoryhome];\n"
        ."\$pnconfig['oldnum'] = $vars[xoldnum];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Banners/Advertising Configuration\n"
        ."//\n"
        ."//    \$banners: Activate Banners Ads for your site? (1=Yes 0=No)\n"
        ."//    \$myIP:    Write your IP number to not count impressions, be fair about this!\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['banners'] = $vars[xbanners];\n"
        ."\$pnconfig['myIP'] = \"$vars[xmyIP]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// XML/RDF Backend Configuration\n"
        ."//\n"
        ."//    \$backend_title:    Backend title, can be your site's name and slogan\n"
        ."//    \$backend_language: Language format of your site\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['backend_title'] = \"$vars[xbackend_title]\";\n"
        ."\$pnconfig['backend_language'] = \"$vars[xbackend_language]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Site Language Preferences\n"
        ."//\n"
        ."//    \$language: Language of your site (You need to have lng/*.php files for your selected language in the /language/ directory of your site)\n"
        ."//    \$locale:   Locale configuration to correctly display date with your country format. (See /usr/share/locale)\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['language'] = \"$vars[xlanguage]\";\n"
        ."\$pnconfig['locale'] = \"$vars[xlocale]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Multilingual Configuration\n"
        ."//\n"
        ."//    \$multilingual: Activate multilingual features? (1=Yes 0=No) No means you only want to use interface language switching.\n"
        ."//    \$useflags: (1=Yes 0=No) If set to Yes , flags will be used for the language switching , if set to No a dropdown box will be displayed\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['multilingual'] = \"$vars[xmultilingual]\";\n"
        ."\$pnconfig['useflags'] = \"$vars[xuseflags]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Web Links Preferences (Some variables are valid also for Downloads)\n"
        ."//\n"
        ."//    \$perpage:               How many links to show on each page?\n"
        ."//    \$popular:               How many hits need a link to be listed as popular?\n"
        ."//    \$newlinks:              How many links to display in the New Links Page?\n"
        ."//    \$toplinks:              How many links to display in The Best Links Page? (Most Popular)\n"
        ."//    \$linksresults:          How many links to display on each search result page?\n"
        ."//    \$links_anonaddlinklock:     Lock Unregistered users from Suggesting New Links? (1=Yes 0=No)\n"
        ."//    \$anonwaitdays:          Number of days anonymous users need to wait to vote on a link\n"
        ."//    \$outsidewaitdays:       Number of days outside users need to wait to vote on a link (checks IP)\n"
        ."//    \$useoutsidevoting:          Allow Webmasters to put vote links on their site (1=Yes 0=No)\n"
        ."//    \$anonweight:            How many Unregistered User vote per 1 Registered User Vote?\n"
        ."//    \$outsideweight:         How many Outside User vote per 1 Registered User Vote?\n"
        ."//    \$detailvotedecimal:         Let Detailed Vote Summary Decimal out to N places. (no max)\n"
        ."//    \$mainvotedecimal:       Let Main Vote Summary Decimal show out to N places. (max 4)\n"
        ."//    \$toplinkspercentrigger:     1 to Show Top Links as a Percentage (else # of links)\n"
        ."//    \$toplinks:              Either # of links OR percentage to show (percentage as whole number. #/100)\n"
        ."//    \$mostpoplinkspercentrigger: 1 to Show Most Popular Links as a Percentage (else # of links)\n"
        ."//    \$mostpoplinks:          Either # of links OR percentage to show (percentage as whole number. #/100)\n"
        ."//    \$featurebox:            1 to Show Feature Link Box on links Main Page? (1=Yes 0=No)\n"
        ."//    \$linkvotemin:           Number votes needed to make the 'top 10' list\n"
        ."//    \$blockunregmodify:          Block unregistered users from suggesting links changes? (1=Yes 0=No)\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['perpage'] = $vars[xperpage];\n"
        ."\$pnconfig['popular'] = $vars[xpopular];\n"
        ."\$pnconfig['newlinks'] = $vars[xnewlinks];\n"
        ."\$pnconfig['toplinks'] = $vars[xtoplinks];\n"
        ."\$pnconfig['linksresults'] = $vars[xlinksresults];\n"
        ."\$pnconfig['links_anonaddlinklock'] = $vars[xlinks_anonaddlinklock];\n"
        ."\$pnconfig['anonwaitdays'] = $vars[xanonwaitdays];\n"
        ."\$pnconfig['outsidewaitdays'] = $vars[xoutsidewaitdays];\n"
        ."\$pnconfig['useoutsidevoting'] = $vars[xuseoutsidevoting];\n"
        ."\$pnconfig['anonweight'] = $vars[xanonweight];\n"
        ."\$pnconfig['outsideweight'] = $vars[xoutsideweight];\n"
        ."\$pnconfig['detailvotedecimal'] = $vars[xdetailvotedecimal];\n"
        ."\$pnconfig['mainvotedecimal'] = $vars[xmainvotedecimal];\n"
        ."\$pnconfig['toplinkspercentrigger'] = $vars[xtoplinkspercentrigger];\n"
        ."\$pnconfig['toplinks'] = $vars[xtoplinks];\n"
        ."\$pnconfig['mostpoplinkspercentrigger'] = $vars[xmostpoplinkspercentrigger];\n"
        ."\$pnconfig['mostpoplinks'] = $vars[xmostpoplinks];\n"
        ."\$pnconfig['featurebox'] = $vars[xfeaturebox];\n"
        ."\$pnconfig['linkvotemin'] = $vars[xlinkvotemin];\n"
        ."\$pnconfig['blockunregmodify'] = $vars[xblockunregmodify];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Downloads Preferences\n"
        ."//\n"
        ."//    \$newdownloads:                 How many downloads to display in the New downloads Page?\n"
        ."//    \$topdownloads:                 How many downloads to display in The Best downloads Page? (Most Popular)\n"
        ."//    \$downloadsresults:             How many downloads to display on each search result page?\n"
        ."//    \$downloads_anonadddownloadlock: Lock Unregistered users from Suggesting New downloads? (1=Yes 0=No)\n"
        ."//    \$user_adddownload:         Let users to add new downloads? (1=Yes 0=No)\n"
        ."//    \$topdownloadspercentrigger:     1 to Show Top downloads as a Percentage (else # of downloads)\n"
        ."//    \$topdownloads:                 Either # of downloads OR percentage to show (percentage as whole number. #/100)\n"
        ."//    \$mostpopdownloadspercentrigger: 1 to Show Most Popular downloads as a Percentage (else # of downloads)\n"
        ."//    \$mostpopdownloads:             Either # of downloads OR percentage to show (percentage as whole number. #/100)\n"
        ."//    \$downloadvotemin:              Number votes needed to make the 'top 10' list\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['newdownloads'] = $GLOBALS[newdownloads];\n"
        ."\$pnconfig['topdownloads'] = $GLOBALS[topdownloads];\n"
        ."\$pnconfig['downloadsresults'] = $GLOBALS[downloadsresults];\n"
        ."\$pnconfig['downloads_anonadddownloadlock'] = $GLOBALS[downloads_anonadddownloadlock];\n"
        ."\$pnconfig['user_adddownload'] = $GLOBALS[user_adddownload];\n"
        ."\$pnconfig['topdownloadspercentrigger'] = $GLOBALS[topdownloadspercentrigger];\n"
        ."\$pnconfig['topdownloads'] = $GLOBALS[topdownloads];\n"
        ."\$pnconfig['mostpopdownloadspercentrigger'] = $GLOBALS[mostpopdownloadspercentrigger];\n"
        ."\$pnconfig['mostpopdownloads'] = $GLOBALS[mostpopdownloads];\n"
        ."\$pnconfig['downloadvotemin'] = $GLOBALS[downloadvotemin];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Notification of News Submissions\n"
        ."//\n"
        ."//    \$notify:         Notify you each time your site receives a news submission? (1=Yes 0=No)\n"
        ."//    \$notify_email:   Email, address to send the notification\n"
        ."//    \$notify_subject: Email subject\n"
        ."//    \$notify_message: Email body, message\n"
        ."//    \$notify_from:    account name to appear in From field of the Email\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['notify'] = $vars[xnotify];\n"
        ."\$pnconfig['notify_email'] = \"$vars[xnotify_email]\";\n"
        ."\$pnconfig['notify_subject'] = \"$vars[xnotify_subject]\";\n"
        ."\$pnconfig['notify_message'] = \"$vars[xnotify_message]\";\n"
        ."\$pnconfig['notify_from'] = \"$vars[xnotify_from]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Moderation Config (not 100% working)\n"
        ."//\n"
        ."//    \$moderate:   Activate moderation system? (1=Yes 0=No)\n"
        ."//    \$resons:     List of reasons for the moderation (each reason under quotes and comma separated)\n"
        ."//    \$badreasons: Number of bad reasons in the reasons list\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['moderate'] = '$vars[xmoderate]';\n"
        ."\$pnconfig['reasons'] = array(\n"
        ."    \"As Is\",\n"
        ."    \"Offtopic\",\n"
        ."    \"Flamebait\",\n"
        ."    \"Troll\",\n"
        ."    \"Redundant\",\n"
        ."    \"Insighful\",\n"
        ."    \"Interesting\",\n"
        ."    \"Informative\",\n"
        ."    \"Funny\",\n"
        ."    \"Overrated\",\n"
        ."    \"Underrated\"\n"
        .");\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Survey/Polls Config\n"
        ."//\n"
        ."//    \$BarScale:   Scale for the Bar, multiple of 100, You may leave this to 1\n"
        ."//    \$setCookies: Set cookies to prevent visitors vote twice in a period of 24 hours? (1=Yes 0=No)\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['BarScale'] = $vars[xBarScale];\n"
        ."\$pnconfig['setCookies'] = $vars[xsetCookies];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Some Graphics Options\n"
        ."//\n"
        ."//    \$tipath:       Topics images path (put / only at the end, not at the begining)\n"
        ."//    \$userimg:      User images path (No / at begining and at the end)\n"
        ."//    \$adminimg:     Administration system images path (put / only at the end, not at the begining)\n"
        ."//    \$admingraphic: Activate graphic menu for Administration Menu? (1=Yes 0=No)\n"
        ."//    \$admart:       How many articles to show in the admin section?\n"
        ."//    \$usergraphic:  Activate graphic menu for User Page (1=Yes 0=No)\n"
	."//	\$topicsinrow:	Number of icons displayed to not force horizontal scroll - rwwood\n" 
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['tipath'] = \"$vars[xtipath]\";\n"
        ."\$pnconfig['userimg'] = \"$vars[xuserimg]\";\n"
        ."\$pnconfig['adminimg'] = \"$vars[xadminimg]\";\n"
        ."\$pnconfig['admingraphic'] = '$vars[xadmingraphic]';\n"
        ."\$pnconfig['admart'] = $vars[xadmart];\n"
        ."\$pnconfig['usergraphic'] = '$vars[xusergraphic]';\n"
        ."\$pnconfig['topicsinrow'] = $vars[xtopicsinrow];\n" 
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// HTTP Referers Options\n"
        ."//\n"
        ."//    \$httpref:    Activate HTTP referer logs to know who is linking to our site? (1=Yes 0=No)"
        ."//    \$httprefmax: Maximum number of HTTP referers to store in the Database (Try to not set this to a high number, 500 ~ 1000 is Ok)\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['httpref'] = $vars[xhttpref];\n"
        ."\$pnconfig['httprefmax'] = $vars[xhttprefmax];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['autolinkpref'] = $vars[xautolinkpref];\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Allowable HTML tags\n"
        ."//\n"
        ."//    \$AllowableHTML: HTML command to allow in the comments\n"
        ."//                  =>2 means accept all qualifiers: <foo bar>\n"
        ."//                  =>1 means accept the tag only: <foo>\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['AllowableHTML'] = array(\n"
        ."    \"p\"=>2,\n"
        ."    \"b\"=>1,\n"
        ."    \"i\"=>1,\n"
        ."    \"a\"=>2,\n"
        ."    \"em\"=>1,\n"
        ."    \"br\"=>1,\n"
        ."    \"strong\"=>1,\n"
        ."    \"blockquote\"=>1,\n"
        ."    \"tt\"=>1,\n"
        ."    \"li\"=>1,\n"
        ."    \"ol\"=>1,\n"
        ."    \"ul\"=>1\n"
        .");\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Filters Options\n"
        ."//\n"
        ."//    \$CensorList:    List of bad word to be replaced on Comments\n"
        ."//    \$CensorMode:    0 = No Filtering (leave the bad words)\n"
        ."//          1 = Exact Match\n"
        ."//          2 = Match Word at the Begining\n"
        ."//          3 = Match String Anywhere in the Text\n"
        ."//    \$CensorReplace: String to replace bad words\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['CensorList'] = array(\n"
        ."    \"fuck\",\n"
        ."    \"cunt\",\n"
        ."    \"fucker\",\n"
        ."    \"fucking\",\n"
        ."    \"pussy\",\n"
        ."    \"cock\",\n"
        ."    \"c0ck\",\n"
        ."    \"cum\",\n"
        ."    \"twat\",\n"
        ."    \"clit\",\n"
        ."    \"bitch\",\n"
        ."    \"fuk\",\n"
        ."    \"fuking\",\n"
        ."    \"motherfucker\"\n"
        .");\n"
        ."\$pnconfig['CensorMode'] = 1;\n"
        ."\$pnconfig['CensorReplace'] = \"*****\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// Do not touch the following options!\n"
        ."// ----------------------------------------------------------------------\n"
        ."\n"
        ."\$pnconfig['cookieadmtime'] = 2592000;\n"
        ."\$pnconfig['cookiePrefix'] = \"NukePoll\";\n"
        ."\$pnconfig['Version_Num'] = \"$GLOBALS[Version_Num]\";\n"
        ."\$pnconfig['Version_ID'] = \"$GLOBALS[Version_ID]\";\n"
        ."\$pnconfig['Version_Sub'] = \"$GLOBALS[Version_Sub]\";\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// For debugging (Pablo Roca)\n"
        ."//\n"
        ."// \$debug - debugger windows active\n"
        ."//          0 = No\n"
        ."//          1 = Yes\n"
        ."//\n"
        ."// \$debug_sql - show SQL in debugger windows\n"
        ."//          0 = No\n"
        ."//          1 = Yes\n"
        ."// ----------------------------------------------------------------------\n"
        ."\$pnconfig['debug']          = 0;\n"
        ."\$pnconfig['debug_sql']      = 0;\n"
        ."\n"
        ."// ----------------------------------------------------------------------\n"
        ."// if there is a personal_config.php in the folder where is config.php\n"
        ."// we add it. (this HAS to be at the end, after all initialization AND before the).\n"
        ."// next Extract()\n"
        ."// modif sebastien bernard\n"
        ."// ----------------------------------------------------------------------\n";
                if ( empty($serverName))
                        {
                        $content .= "if (@file_exists(\"personal_config.php\"))\n"
                ."{ include(\"personal_config.php\"); }\n";
                        }
                else
                        {
                        $content .= "if (@file_exists(\"parameters/\$serverName/personal_config.php\"))\n"
                ."{ include(\"parameters/\$serverName/personal_config.php\"); }\n";
                        }

                $content .= "// ----------------------------------------------------------------------\n"
        ."// Make config file backwards compatable\n"
        ."// ----------------------------------------------------------------------\n"
        ."extract(\$pnconfig, EXTR_OVERWRITE);\n"
        .'?'.'>'
    ;
    // I can't seem to get around the stupid PHP file owner problem :-(
    //$tmpf = tempnam('tmp', 'postnuke_');
    //$fp = fopen("$tmpf.php", w);
    $fp = @fopen(WHERE_IS_PERSO.'config.php', w);
    if (!$fp) die (sprintf(_ERROR_FILE_OPEN,'config.php','config.php'));
    fwrite($fp, $content);
    fclose($fp);
    pnRedirect('admin.php?op=adminMain');
}

if (!(authorised(0, 'Settings::', '::', ACCESS_ADMIN))) {

    include 'header.php';
    echo _SETTINGSNOAUTH;
    include 'footer.php';

} else {

    switch ($op) {
        case 'Configure':
            if (strlen(WHERE_IS_PERSO)>0) {
                $tipath = str_replace(WHERE_IS_PERSO,'',$tipath);
            }
            Configure();
            break;

        case 'ConfigSave':
            ConfigSave($HTTP_POST_VARS);
            break;
    }
}

?>
Return current item: ProNuke. Postnuke To Oracle