home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / KOMUNIK / progweb / progweb.exe / phpnuke / html / admin / settings.php < prev    next >
PHP Script  |  2000-12-05  |  38KB  |  758 lines

  1. <?PHP
  2.  
  3. ######################################################################
  4. # PHP-NUKE: Web Portal System
  5. # ===========================
  6. #
  7. # Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
  8. # http://phpnuke.org
  9. #
  10. # This modules is the main administration part
  11. #
  12. # This program is free software. You can redistribute it and/or modify
  13. # it under the terms of the GNU General Public License as published by
  14. # the Free Software Foundation; either version 2 of the License.
  15. ######################################################################
  16.  
  17. if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }
  18. $hlpfile = "manual/config.html";
  19. $result = mysql_query("select radminsuper from authors where aid='$aid'");
  20. list($radminsuper) = mysql_fetch_row($result);
  21. if ($radminsuper==1) {
  22.  
  23. /*********************************************************/
  24. /* Configuration Functions to Setup all the Variables    */
  25. /*********************************************************/
  26.  
  27. function Configure() {
  28.     global $hlpfile, $admin;
  29.     include ("config.php");
  30.     include ("header.php");
  31.     GraphicAdmin($hlpfile);
  32.     OpenTable();
  33.     echo "
  34.     <center><font size=4><b>".translate("General Site Info")."</b></font></center>
  35.     <form action=admin.php method=post>
  36.     <table width=90% border=0><tr><td>
  37.     ".translate("Site Name:")." </td><td><input type=text name=\"xsitename\" value=\"$sitename\" size=50 maxlength=100>
  38.     </td></tr><tr><td>
  39.     ".translate("Site URL:")." </td><td><input type=text name=\"xnuke_url\" value=\"$nuke_url\" size=50 maxlength=200>
  40.     </td></tr><tr><td>
  41.     ".translate("Site Logo:")." </td><td><input type=text name=\"xsite_logo\" value=\"$site_logo\" size=20 maxlength=25>
  42.     </td></tr><tr><td>
  43.     ".translate("Site Slogan:")." </td><td><input type=text name=\"xslogan\" value=\"$slogan\" size=50 maxlength=100>
  44.     </td></tr><tr><td>
  45.     ".translate("Site Start Date:")." </td><td><input type=text name=\"xstartdate\" value=\"$startdate\" size=20 maxlength=30>
  46.     </td></tr><tr><td>
  47.     ".translate("Administrator Email:")." </td><td><input type=text name=\"xadminmail\" value=\"$adminmail\" size=30 maxlength=100>
  48.     </td></tr><tr><td>
  49.     ".translate("Number of items in TOP Page:")." </td><td><select name=\"xtop\">
  50.     <option name=\"xtop\">$top</option>
  51.     <option name=\"xtop\">5</option>
  52.     <option name=\"xtop\">10</option>
  53.     <option name=\"xtop\">15</option>
  54.     <option name=\"xtop\">20</option>
  55.     <option name=\"xtop\">25</option>
  56.     <option name=\"xtop\">30</option>
  57.     </select>
  58.     </td></tr><tr><td>
  59.     ".translate("Stories Number in the Home:")." </td><td><select name=xstoryhome>
  60.     <option name=\"xstoryhome\">$storyhome</option>
  61.     <option name=\"xstoryhome\">5</option>
  62.     <option name=\"xstoryhome\">10</option>
  63.     <option name=\"xstoryhome\">15</option>
  64.     <option name=\"xstoryhome\">20</option>
  65.     <option name=\"xstoryhome\">25</option>
  66.     <option name=\"xstoryhome\">30</option>
  67.     </select>
  68.     </td></tr><tr><td>
  69.     ".translate("Stories in Old Articles Box:")." </td><td><select name=\"xoldnum\">
  70.     <option name=\"xoldnum\">$oldnum</option>
  71.     <option name=\"xoldnum\">10</option>
  72.     <option name=\"xoldnum\">20</option>
  73.     <option name=\"xoldnum\">30</option>
  74.     <option name=\"xoldnum\">40</option>
  75.     <option name=\"xoldnum\">50</option>
  76.     </select>
  77.     </td></tr><tr><td>
  78.     ".translate("Activate Ultramode?")." </td><td>";
  79.     if ($ultramode==1) {
  80.     echo "<input type=radio name=\"xultramode\" value=1 checked>".translate("Yes")."  
  81.     <input type=radio name=\"xultramode\" value=0>".translate("No")."";
  82.     } else {
  83.     echo "<input type=radio name=\"xultramode\" value=1>".translate("Yes")."  
  84.     <input type=radio name=\"xultramode\" value=0 checked>".translate("No")."";
  85.     }
  86.     echo "</td></tr><tr><td>
  87.     ".translate("Allow Anonymous to Post?")." </td><td>";
  88.     if ($anonpost==1) {
  89.     echo "<input type=radio name=\"xanonpost\" value=1 checked>".translate("Yes")."  
  90.     <input type=radio name=\"xanonpost\" value=0>".translate("No")."";
  91.     } else {
  92.     echo "<input type=radio name=\"xanonpost\" value=1>".translate("Yes")."  
  93.     <input type=radio name=\"xanonpost\" value=0 checked>".translate("No")."";
  94.     }
  95.     echo "</td></tr><tr><td>
  96.     ".translate("Default Theme for your Site:")."</td><td><select name=\"xDefault_Theme\">";
  97.     include("themes/list.php");
  98.     $themelist = explode(" ", $themelist);
  99.     for ($i=0; $i < sizeof($themelist); $i++) {
  100.     if($themelist[$i]!="") {
  101.         echo "<option name=\"xDefault_Theme\" value=\"$themelist[$i]\" ";
  102.         if($themelist[$i]==$Default_Theme) echo "selected";
  103.         echo ">$themelist[$i]\n";
  104.     }
  105.     }
  106.     echo "</select>
  107.     </td></tr><tr><td>
  108.     ".translate("Select the Language for your Site:")."</td><td>
  109.     <select name=\"xlanguage\">";
  110.     include("images/menu/list.php");
  111.     $languageslist = explode(" ", $languageslist);
  112.     for ($i=0; $i < sizeof($languageslist); $i++) {
  113.     if($languageslist[$i]!="") {
  114.         echo "<option name=\"xlanguage\" value=\"$languageslist[$i]\" ";
  115.         if($languageslist[$i]==$language) echo "selected";
  116.         echo ">$languageslist[$i]\n";
  117.     }
  118.     }
  119.     echo "</select>
  120.     </td></tr><tr><td>
  121.     ".translate("Locale Time Format:")."</td><td><input type=text name=\"xlocale\" value=\"$locale\" size=20 maxlength=40>";
  122.     echo "</td></tr></table></td></tr></table></td></tr></table>";
  123.     OpenTable();    
  124.     echo "<br>
  125.     <center><font size=4><b>".translate("Banners Options")."</b></font></center>
  126.     <table width=90% border=0><tr><td>
  127.     ".translate("Activate Banners in your site?")."</td><td>";
  128.     if ($banners==1) {
  129.     echo "<input type=radio name=\"xbanners\" value=1 checked>".translate("Yes")."  
  130.     <input type=radio name=\"xbanners\" value=0>".translate("No")."";
  131.     } else {
  132.     echo "<input type=radio name=\"xbanners\" value=1>".translate("Yes")."  
  133.     <input type=radio name=\"xbanners\" value=0 checked>".translate("No")."";
  134.     }
  135.     echo "</td></tr><tr><td>
  136.     ".translate("Your IP to not count the hits:")."</td><td>
  137.     <input type=text name=\"xmyIP\" value=\"$myIP\">
  138.     </td></tr></table></td></tr></table></td></tr></table>";
  139.     OpenTable();
  140.     echo "<br>
  141.     <center><font size=4><b>".translate("Footer Messages")."</b></font></center>
  142.     <table width=90% border=0><tr><td>
  143.     ".translate("Footer Line 1:")."</td><td><textarea name=\"xfoot1\" cols=60 rows=5>$foot1</textarea>
  144.     </td></tr><tr><td>
  145.     ".translate("Footer Line 2:")."</td><td><textarea name=\"xfoot2\" cols=60 rows=5>$foot2</textarea>
  146.     </td></tr><tr><td>
  147.     ".translate("Footer Line 3:")."</td><td><textarea name=\"xfoot3\" cols=60 rows=5>$foot3</textarea>
  148.     </td></tr><tr><td>
  149.     ".translate("Footer Line 4:")."</td><td><textarea name=\"xfoot4\" cols=60 rows=5>$foot4</textarea>";
  150.     echo "</td></tr></table></td></tr></table></td></tr></table>";
  151.     OpenTable();
  152.     echo "<br>
  153.     <center><font size=4><b>".translate("Backend Configuration")."</b></font></center>
  154.     <table width=90% border=0><tr><td>
  155.     ".translate("Backend Title:")."</td><td><input type=text name=\"xbackend_title\" value=\"$backend_title\" size=50 maxlength=100>
  156.     </td></tr><tr><td>
  157.     ".translate("Backend Language:")."</td><td><input type=text name=\"xbackend_language\" value=\"$backend_language\" size=10 maxlength=10>
  158.     </td></tr><tr><td>
  159.     ".translate("Backend Image URL:")."</td><td><input type=text name=\"xbackend_image\" value=\"$backend_image\" size=50 maxlength=200>
  160.     </td></tr><tr><td>
  161.     ".translate("Backend Image Width:")."</td><td><input type=text name=\"xbackend_width\" value=\"$backend_width\" size=4 maxlength=3>
  162.     </td></tr><tr><td>
  163.     ".translate("Backend Image Height:")."</td><td><input type=text name=\"xbackend_height\" value=\"$backend_height\" size=4 maxlength=3>
  164.     </td></tr></table></td></tr></table></td></tr></table>";
  165.     OpenTable();
  166.     echo "<br>
  167.     <center><font size=4><b>".translate("Web Links Default Config")."</b></font></center>
  168.     <table width=90% border=0><tr><td>
  169.     ".translate("Links per Page:")."</td><td width=100%>
  170.     <select name=xperpage>
  171.     <option name=xperpage value=$perpage selected>$perpage</option>
  172.     <option name=xperpage value=10>10</option>
  173.     <option name=xperpage value=15>15</option>
  174.     <option name=xperpage value=20>20</option>
  175.     <option name=xperpage value=25>25</option>
  176.     <option name=xperpage value=30>30</option>
  177.     <option name=xperpage value=50>50</option>
  178.     </select>
  179.     </td></tr><tr><td>
  180.     ".translate("Hits to be Popular:")."</td><td>
  181.     <select name=xpopular>
  182.     <option name=xpopular value=$popular selected>$popular</option>
  183.     <option name=xpopular value=10>100</option>
  184.     <option name=xpopular value=15>250</option>
  185.     <option name=xpopular value=20>500</option>
  186.     <option name=xpopular value=25>1000</option>
  187.     <option name=xpopular value=30>1500</option>
  188.     <option name=xpopular value=50>2000</option>
  189.     </select>
  190.     </td></tr><tr><td>
  191.     ".translate("Number of Links as New:")."</td><td>
  192.     <select name=xnewlinks>
  193.     <option name=xnewlinks value=$newlinks selected>$newlinks</option>
  194.     <option name=xnewlinks value=10>10</option>
  195.     <option name=xnewlinks value=15>15</option>
  196.     <option name=xnewlinks value=20>20</option>
  197.     <option name=xnewlinks value=25>25</option>
  198.     <option name=xnewlinks value=30>30</option>
  199.     <option name=xnewlinks value=50>50</option>
  200.     </select>
  201.     </td></tr><tr><td>
  202.     ".translate("Number of Links as Best:")."</td><td>
  203.     <select name=xtoplinks>
  204.     <option name=xtoplinks value=$toplinks selected>$toplinks</option>
  205.     <option name=xtoplinks value=10>10</option>
  206.     <option name=xtoplinks value=15>15</option>
  207.     <option name=xtoplinks value=20>20</option>
  208.     <option name=xtoplinks value=25>25</option>
  209.     <option name=xtoplinks value=30>30</option>
  210.     <option name=xtoplinks value=50>50</option>
  211.     </select>
  212.     </td></tr><tr><td>
  213.     ".translate("Links in Search Results:")."</td><td>
  214.     <select name=xlinksresults>
  215.     <option name=xlinksresults value=$linksresults selected>$linksresults</option>
  216.     <option name=xlinksresults value=10>10</option>
  217.     <option name=xlinksresults value=15>15</option>
  218.     <option name=xlinksresults value=20>20</option>
  219.     <option name=xlinksresults value=25>25</option>
  220.     <option name=xlinksresults value=30>30</option>
  221.     <option name=xlinksresults value=50>50</option>
  222.     </select>
  223.     </td></tr><tr><td>
  224.     ".translate("Let Anonymous users to post new links?")."</td><td>";
  225.     if ($links_anonaddlinklock==1) {
  226.     echo "<input type=radio name=\"xlinks_anonaddlinklock\" value=1 checked>".translate("Yes")."  
  227.     <input type=radio name=\"xlinks_anonaddlinklock\" value=0>".translate("No")."";
  228.     } else {
  229.     echo "<input type=radio name=\"xlinks_anonaddlinklock\" value=1>".translate("Yes")."  
  230.     <input type=radio name=\"xlinks_anonaddlinklock\" value=0 checked>".translate("No")."";
  231.     }
  232.     echo "</td></tr></table></td></tr></table></td></tr></table>";
  233.     OpenTable();
  234.     echo "<br>
  235.     <center><font size=4><b>".translate("Mail New Stories to Admin")."</b></font></center>
  236.     <table width=90% border=0><tr><td>
  237.     ".translate("Notify new submissions by email?")."</td><td>";
  238.     if ($notify==1) {
  239.     echo "<input type=radio name=\"xnotify\" value=1 checked>".translate("Yes")."  
  240.     <input type=radio name=\"xnotify\" value=0>".translate("No")."";
  241.     } else {
  242.     echo "<input type=radio name=\"xnotify\" value=1>".translate("Yes")."  
  243.     <input type=radio name=\"xnotify\" value=0 checked>".translate("No")."";
  244.     }
  245.     echo "
  246.     </td></tr><tr><td>
  247.     ".translate("Email to send the message:")."</td><td><input type=text name=xnotify_email value=\"$notify_email\" size=30 maxlength=100>
  248.     </td></tr><tr><td>
  249.     ".translate("Email Subject:")."</td><td><input type=text name=xnotify_subject value=\"$notify_subject\" size=50 maxlength=100>
  250.     </td></tr><tr><td>
  251.     ".translate("Email Message:")."</td><td><textarea name=xnotify_message cols=40 rows=8>$notify_message</textarea>
  252.     </td></tr><tr><td>
  253.     ".translate("Email Account (From):")."</td><td><input type=text name=xnotify_from value=\"$notify_from\" size=15 maxlength=25>
  254.     </td></tr></table></td></tr></table></td></tr></table>";
  255.     OpenTable();
  256.     echo "<br>
  257.     <center><font size=4><b>".translate("Comments Moderation")."</b></font></center>
  258.     <table width=90% border=0><tr><td>
  259.     ".translate("Type of Moderation:")."</td><td>
  260.     <select name=xmoderate>";
  261.     if ($moderate==1) {
  262.     echo "<option name=\"xmoderate\" value=1 selected>".translate("Moderation by Admin")."</option>
  263.     <option name=\"xmoderate\" value=2>".translate("Moderation by Users")."</option>
  264.     <option name=\"xmoderate\" value=0>".translate("No Moderation")."</option>";
  265.     } elseif ($moderate==2) {
  266.     echo "<option name=\"xmoderate\" value=1>".translate("Moderation by Admin")."</option>
  267.     <option name=\"xmoderate\" value=2 selected>".translate("Moderation by Users")."</option>
  268.     <option name=\"xmoderate\" value=0>".translate("No Moderation")."</option>";
  269.     } elseif ($moderate==0) {
  270.     echo "<option name=\"xmoderate\" value=1>".translate("Moderation by Admin")."</option>
  271.     <option name=\"xmoderate\" value=2>".translate("Moderation by Users")."</option>
  272.     <option name=\"xmoderate\" value=0 selected>".translate("No Moderation")."</option>";
  273.     }
  274.     echo "</select></td></tr></table></td></tr></table></td></tr></table>";
  275.     OpenTable();
  276.     echo "<br>
  277.     <center><font size=4><b>".translate("Comments Options")."</b></font></center>
  278.     <table width=90% border=0><tr><td>
  279.     ".translate("Comments Limit in Bytes:")."</td><td><input type=text name=xcommentlimit value=\"$commentlimit\" size=11 maxlength=10>
  280.     </td></tr><tr><td>
  281.     ".translate("Anonymous Default Name:")."</td><td><input type=text name=xanonymous value=$anonymous>
  282.     </td></tr></table></td></tr></table></td></tr></table>";
  283.     OpenTable();
  284.     echo "<br>
  285.     <center><font size=4><b>".translate("Voting Booth Options")."</b></font></center>
  286.     <table width=90% border=0><tr><td>
  287.     ".translate("Max Poll Options:")."</td><td width=100%>
  288.     <select name=xmaxOptions>
  289.     <option name=xmaxOptions value=$maxOptions>$maxOptions</option>
  290.     <option name=xmaxOptions value=10>10</option>
  291.     <option name=xmaxOptions value=12>12</option>
  292.     <option name=xmaxOptions value=15>15</option>
  293.     <option name=xmaxOptions value=20>20</option>
  294.     </select>
  295.     </td></tr><tr><td>
  296.     ".translate("Scale of Result Bar:")."</td><td><input type=text name=xBarScale value=$BarScale size=4 maxlength=3>
  297.     </td></tr><tr><td>
  298.     ".translate("Allow users to vote twice?")."</td><td>";
  299.     if ($setCookies==0) {
  300.     echo "<input type=radio name=\"xsetCookies\" value=0 checked>".translate("Yes")."  
  301.     <input type=radio name=\"xsetCookies\" value=1>".translate("No")."";
  302.     } else {
  303.     echo "<input type=radio name=\"xsetCookies\" value=0>".translate("Yes")."  
  304.     <input type=radio name=\"xsetCookies\" value=1 checked>".translate("No")."";
  305.     }
  306.     echo "</td></tr></table></td></tr></table></td></tr></table>";
  307.     OpenTable();
  308.     echo "<br>
  309.     <center><font size=4><b>".translate("Some Graphics Stuff")."</b></font></center>
  310.     <table width=90% border=0><tr><td>
  311.     ".translate("Topics Images Path:")."</td><td><input type=text name=\"xtipath\" value=\"$tipath\" size=50 maxlength=100>
  312.     </td></tr><tr><td>
  313.     ".translate("User Menu Images Path:")."</td><td><input type=text name=\"xuserimg\" value=\"$userimg\" size=50 maxlength=100>
  314.     </td></tr><tr><td>
  315.     ".translate("Admin Menu Images Path:")."</td><td><input type=text name=\"xadminimg\" value=\"$adminimg\" size=50 maxlength= maxlength=100>
  316.     </td></tr><tr><td>
  317.     ".translate("Graphics in Administration Menu?")."</td><td>";
  318.     if ($admingraphic==1) {
  319.     echo "<input type=radio name=\"xadmingraphic\" value=1 checked>".translate("Yes")."  
  320.     <input type=radio name=\"xadmingraphic\" value=0>".translate("No")."";
  321.     } else {
  322.     echo "<input type=radio name=\"xadmingraphic\" value=1>".translate("Yes")."  
  323.     <input type=radio name=\"xadmingraphic\" value=0 checked>".translate("No")."";
  324.     }
  325.     echo "</td></tr><tr><td>
  326.     ".translate("Site Font:")."</td><td><input type=text name=\"xsite_font\" value=\"$site_font\" size=30 maxlength=100>
  327.     </td></tr></table></td></tr></table></td></tr></table>";
  328.     OpenTable();
  329.     echo "<br>
  330.     <center><font size=4><b>".translate("Miscelaneous")."</b></font></center>
  331.     <table width=90% border=0><tr><td>
  332.     ".translate("Articles Number in Admin:")."</td><td width=100%>
  333.     <select name=xadmart>
  334.     <option name=xadmart value=$admart>$admart</option>
  335.     <option name=xadmart value=10>10</option>
  336.     <option name=xadmart value=15>15</option>
  337.     <option name=xadmart value=20>20</option>
  338.     <option name=xadmart value=25>25</option>
  339.     <option name=xadmart value=30>30</option>
  340.     </select>
  341.     </td></tr><tr><td>
  342.     ".translate("Minimum users password length:")."</td><td>
  343.     <select name=xminpass>
  344.     <option name=xminpass value=$minpass>$minpass</option>
  345.     <option name=xminpass value=3>3</option>
  346.     <option name=xminpass value=5>5</option>
  347.     <option name=xminpass value=8>8</option>
  348.     <option name=xminpass value=10>10</option>
  349.     </select>
  350.     </td></tr><tr><td>
  351.     ".translate("Activate HTTP Referers?")."</td><td>";
  352.     if ($httpref==1) {
  353.     echo "<input type=radio name=xhttpref value=1 checked>".translate("Yes")."  
  354.     <input type=radio name=xhttpref value=0>".translate("No")."";
  355.     } else {
  356.     echo "<input type=radio name=\"xhttpref\" value=1>".translate("Yes")."  
  357.     <input type=radio name=\"xhttpref\" value=0 checked>".translate("No")."";
  358.     }
  359.     echo "</td></tr><tr><td>
  360.     ".translate("How Many Referers you want as Maximum?")."</td><td>
  361.     <select name=xhttprefmax>
  362.     <option name=xhttprefmax value=$httprefmax>$httprefmax</option>
  363.     <option name=xhttprefmax value=100>100</option>
  364.     <option name=xhttprefmax value=250>250</option>
  365.     <option name=xhttprefmax value=500>500</option>
  366.     <option name=xhttprefmax value=1000>1000</option>
  367.     <option name=xhttprefmax value=1000>2000</option>
  368.     </select>
  369.     </td></tr><tr><td>
  370.     ".translate("Activate Comments in Polls?")."</td><td>";
  371.     if ($pollcomm==1) {
  372.     echo "<input type=radio name=\"xpollcomm\" value=1 checked>".translate("Yes")."  
  373.     <input type=radio name=\"xpollcomm\" value=0>".translate("No")."";
  374.     } else {
  375.     echo "<input type=radio name=\"xpollcomm\" value=1>".translate("Yes")."  
  376.     <input type=radio name=\"xpollcomm\" value=0 checked>".translate("No")."";
  377.     }
  378.     echo "
  379.     </td></tr><tr><td>
  380.     ".translate("Activate Ephemerids System?")."</td><td>";
  381.     if ($Ephemerids==1) {
  382.     echo "<input type=radio name=\"xEphemerids\" value=1 checked>".translate("Yes")."  
  383.     <input type=radio name=\"xEphemerids\" value=0>".translate("No")."";
  384.     } else {
  385.     echo "<input type=radio name=\"xEphemerids\" value=1>".translate("Yes")."  
  386.     <input type=radio name=\"xEphemerids\" value=0 checked>".translate("No")."";
  387.     }
  388.     echo "</td></tr><tr><td>
  389.     ".translate("Activate Advanced Stats Page?")."</td><td>";
  390.     if ($advancedstats==1) {
  391.     echo "<input type=radio name=\"xadvancedstats\" value=1 checked>".translate("Yes")."  
  392.     <input type=radio name=\"xadvancedstats\" value=0>".translate("No")."";
  393.     } else {
  394.     echo "<input type=radio name=\"xadvancedstats\" value=1>".translate("Yes")."  
  395.     <input type=radio name=\"xadvancedstats\" value=0 checked>".translate("No")."";
  396.     }
  397.     echo "
  398.     <input type=hidden name=op value=ConfigSave>
  399.     </td></tr></table>
  400.     <center><br><br><input type=submit value=\"".translate("Save Changes")."\"></center>
  401.     </form></td></tr></table></td></tr></table>
  402.     </center></td></tr></table></td></tr></table>";
  403.     include ("footer.php");
  404. }
  405.  
  406. function ConfigSave($xsitename, $xnuke_url, $xsite_logo, $xslogan, $xstartdate, $xadminmail, $xtop, $xstoryhome, $xoldnum, $xultramode, $xanonpost, $xDefault_Theme, $xbanners, $xmyIP, $xfoot1, $xfoot2, $xfoot3, $xfoot4, $xbackend_title, $xbackend_language, $xbackend_image, $xbackend_width, $xbackend_height, $xlanguage, $xlocale, $xperpage, $xpopular, $xnewlinks, $xtoplinks, $xlinksresults, $xlinks_anonaddlinklock, $xnotify, $xnotify_email, $xnotify_subject, $xnotify_message, $xnotify_from, $xmoderate, $xcommentlimit, $xanonymous, $xmaxOptions, $xBarScale, $xsetCookies, $xtipath, $xuserimg, $xadminimg, $xadmingraphic, $xsite_font, $xadmart, $xminpass, $xhttpref, $xhttprefmax, $xpollcomm, $xEphemerids, $xadvancedstats) {
  407.     include ("config.php");
  408.     $xsitename = FixQuotes($xsitename);
  409.     $xnuke_url = FixQuotes($xnuke_url);
  410.     $xsite_logo = FixQuotes($xsite_logo);
  411.     $xslogan = FixQuotes($xslogan);
  412.     $xstartdate = FixQuotes($xstartdate);
  413.     $xDefault_Theme = FixQuotes($xDefault_Theme);
  414.     $xmyIP = FixQuotes($xmyIP);
  415.     $xfoot1 = FixQuotes($xfoot1);
  416.     $xfoot2 = FixQuotes($xfoot2);
  417.     $xfoot3 = FixQuotes($xfoot3);
  418.     $xfoot4 = FixQuotes($xfoot4);
  419.     $xbackend_title = FixQuotes($xbackend_title);
  420.     $xbackend_language = FixQuotes($xbackend_language);
  421.     $xbackend_image = FixQuotes($xbackend_image);
  422.     $xbackend_width = FixQuotes($xbackend_width);
  423.     $xbackend_height = FixQuotes($xbackend_height);
  424.     $xlanguage = FixQuotes($xlanguage);
  425.     $xlocale = FixQuotes($xlocale);
  426.     $xnotify_email = FixQuotes($xnotify_email);
  427.     $xnotify_subject = FixQuotes($xnotify_subject);
  428.     $xnotify_message = FixQuotes($xnotify_message);
  429.     $xnotify_from = FixQuotes($xnotify_from);
  430.     $xcommentlimit = FixQuotes($xcommentlimit);
  431.     $xanonymous = FixQuotes($xanonymous);
  432.     $xtipath = FixQuotes($xtipath);
  433.     $xuserimg = FixQuotes($xuserimg);
  434.     $xadminimg = FixQuotes($xadminimg);
  435.     $xsite_font = FixQuotes($xsite_font);
  436.     $file = fopen("config.php", "w");
  437.     $line = "######################################################################\n";
  438.     $content = "<?PHP\n\n";
  439.     $content .= "$line";
  440.     $content .= "# PHP-NUKE: Web Portal System\n";
  441.     $content .= "# ===========================\n";
  442.     $content .= "#\n";
  443.     $content .= "# Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)\n";
  444.     $content .= "# http://phpnuke.org\n";
  445.     $content .= "#\n";
  446.     $content .= "# This module is to configure the main options for your site\n";
  447.     $content .= "#\n";
  448.     $content .= "# This program is free software. You can redistribute it and/or modify\n";
  449.     $content .= "# it under the terms of the GNU General Public License as published by\n";
  450.     $content .= "# the Free Software Foundation; either version 2 of the License.\n";
  451.     $content .= "$line";
  452.     $content .= "\n";
  453.     $content .= "$line";
  454.     $content .= "# Database & System Config\n";
  455.     $content .= "#\n";
  456.     $content .= "# dbhost:   MySQL Database Hostname\n";
  457.     $content .= "# dbuname:  MySQL Username\n";
  458.     $content .= "# dbpass:   MySQL Password\n";
  459.     $content .= "# dbname:   MySQL Database Name\n";
  460.     $content .= "# system:   0 for Unix/Linux, 1 for Windows\n";
  461.     $content .= "$line";
  462.     $content .= "\n";
  463.     $content .= "\$dbhost = \"$dbhost\";\n";
  464.     $content .= "\$dbuname = \"$dbuname\";\n";
  465.     $content .= "\$dbpass = \"$dbpass\";\n";
  466.     $content .= "\$dbname = \"$dbname\";\n";
  467.     $content .= "\$system = $system;\n";
  468.     $content .= "\n";
  469.     $content .= "/*********************************************************************/\n";
  470.     $content .= "/* You finished to configure the Database. Now you can change all    */\n";
  471.     $content .= "/* you want in the Administration Section.   To enter just launch    */\n";
  472.     $content .= "/* you web browser pointing to http://yourdomain.com/admin.php       */\n";
  473.     $content .= "/*                                                                   */\n";
  474.     $content .= "/* At the prompt use the following ID to login (case sensitive):     */\n";
  475.     $content .= "/*                                                                   */\n";
  476.     $content .= "/* AdminID: God                                                      */\n";
  477.     $content .= "/* Password: Password                                                */\n";
  478.     $content .= "/*                                                                   */\n";
  479.     $content .= "/* Be sure to change inmediately the God login & password clicking   */\n";
  480.     $content .= "/* on Edit Admin in the Admin menu. After that, click on Preferences */\n";
  481.     $content .= "/* to configure your new site. In that menu you can change all you   */\n";
  482.     $content .= "/* need to change.                                                   */\n";
  483.     $content .= "/*                                                                   */\n";
  484.     $content .= "/* Remember to chmod 666 this file in order to let the system write  */\n";
  485.     $content .= "/* to it properly. If you can't change the permissions you can edit  */\n";
  486.     $content .= "/* the rest of this file by hand.                                    */\n";
  487.     $content .= "/*                                                                   */\n";
  488.     $content .= "/* Congratulations! now you have an automated news portal!           */\n";
  489.     $content .= "/* Thanks for choose PHP-Nuke: The Future of the Web                 */\n";
  490.     $content .= "/*********************************************************************/\n";
  491.     $content .= "\n\n";
  492.     $content .= "\n";
  493.     $content .= "$line";
  494.     $content .= "# General Site Configuration\n";
  495.     $content .= "#\n";
  496.     $content .= "# \$sitename:      Your Site Name\n";
  497.     $content .= "# \$nuke_url:      Complete URL for your site (Do not put / at end)\n";
  498.     $content .= "# \$site_logo:     Logo for Printer Friendly Page (It's good to have a Black/White graphic)\n";
  499.     $content .= "# \$slogan:        Your site's slogan\n";
  500.     $content .= "# \$startdate:     Start Date to display in Statistic Page\n";
  501.     $content .= "# \$adminmail:     Site Administrator's Email\n";
  502.     $content .= "# \$anonpost:      Allow Anonymous to Post Comments? (1=Yes 0=No)\n";
  503.     $content .= "# \$Default_Theme: Default Theme for your site (See /themes directory for the complete list, case sensitive!)\n";
  504.     $content .= "# \$foot(x):       Messages for all footer pages (Can include HTML code)\n";
  505.     $content .= "# \$commentlimit:  Maximum number of bytes for each comment\n";
  506.     $content .= "# \$anonymous:     Anonymous users Default Name\n";
  507.     $content .= "# \$site_font:     Font for your entire site (Comma separated for many fonts type)\n";
  508.     $content .= "# \$minpass:       Minimum character for users passwords\n";
  509.     $content .= "# \$pollcomm:      Activate comments in Polls? (1=Yes 0=No)\n";
  510.     $content .= "$line";
  511.     $content .= "\n";
  512.     $content .= "\$sitename = \"$xsitename\";\n";
  513.     $content .= "\$nuke_url = \"$xnuke_url\";\n";
  514.     $content .= "\$site_logo = \"$xsite_logo\";\n";
  515.     $content .= "\$slogan = \"$xslogan\";\n";
  516.     $content .= "\$startdate = \"$xstartdate\";\n";
  517.     $content .= "\$adminmail = \"$xadminmail\";\n";
  518.     $content .= "\$anonpost = $xanonpost;\n";
  519.     $content .= "\$Default_Theme = \"$xDefault_Theme\";\n";
  520.     $content .= "\$foot1 = \"$xfoot1\";\n";
  521.     $content .= "\$foot2 = \"$xfoot2\";\n";
  522.     $content .= "\$foot3 = \"$xfoot3\";\n";
  523.     $content .= "\$foot4 = \"$xfoot4\";\n";
  524.     $content .= "\$commentlimit = $xcommentlimit;\n";
  525.     $content .= "\$anonymous = \"$xanonymous\";\n";
  526.     $content .= "\$site_font = \"$xsite_font\";\n";
  527.     $content .= "\$minpass = $xminpass;\n";
  528.     $content .= "\$pollcomm = $xpollcomm;\n";
  529.     $content .= "\n";
  530.     $content .= "$line";
  531.     $content .= "# General Stories Options\n";
  532.     $content .= "#\n";
  533.     $content .= "# \$top:       How many items in Top Page?\n";
  534.     $content .= "# \$storyhome: How many stories to display in Home Page?\n";
  535.     $content .= "# \$oldnum:    How many stories in Old Articles Box?\n";
  536.     $content .= "# \$ultramode: Activate ultramode plain text file backend syndication? (1=Yes 0=No  Need to chmod 666 ultramode.txt file)\n";
  537.     $content .= "$line";
  538.     $content .= "\n";
  539.     $content .= "\$top = $xtop;\n";
  540.     $content .= "\$storyhome = $xstoryhome;\n";
  541.     $content .= "\$oldnum = $xoldnum;\n";
  542.     $content .= "\$ultramode = $xultramode;\n";
  543.     $content .= "\n";
  544.     $content .= "$line";
  545.     $content .= "# Banners/Advertising Configuration\n";
  546.     $content .= "#\n";
  547.     $content .= "# \$banners: Activate Banners Ads for your site? (1=Yes 0=No)\n";
  548.     $content .= "# \$myIP:    Write your IP number to not count impressions, be fair about this!\n";
  549.     $content .= "$line";
  550.     $content .= "\n";
  551.     $content .= "\$banners = $xbanners;\n";
  552.     $content .= "\$myIP = \"$xmyIP\";\n";
  553.     $content .= "\n";
  554.     $content .= "$line";
  555.     $content .= "# XML/RDF Backend Configuration\n";
  556.     $content .= "#\n";
  557.     $content .= "# \$backend_title:    Backend title, can be your site's name and slogan\n";
  558.     $content .= "# \$backend_language: Language format of your site\n";
  559.     $content .= "# \$backend_image:    Image logo for your site\n";
  560.     $content .= "# \$backend_width:    Image logo width\n";
  561.     $content .= "# \$backend_height:   Image logo height\n";
  562.     $content .= "$line";
  563.     $content .= "\n";
  564.     $content .= "\$backend_title = \"$xbackend_title\";\n";
  565.     $content .= "\$backend_language = \"$xbackend_language\";\n";
  566.     $content .= "\$backend_image = \"$xbackend_image\";\n";
  567.     $content .= "\$backend_width = $xbackend_width;\n";
  568.     $content .= "\$backend_height = $xbackend_height;\n";
  569.     $content .= "\n";
  570.     $content .= "$line";
  571.     $content .= "# Site Language Preferences\n";
  572.     $content .= "#\n";
  573.     $content .= "# \$language: Language of your site (You need to have lang-xxxxxx.php file for your selected language in the /language directory of your site)\n";
  574.     $content .= "# \$locale:   Locale configuration to correctly display date with your country format. (See /usr/share/locale)\n";
  575.     $content .= "$line";
  576.     $content .= "\n";
  577.     $content .= "\$language = \"$xlanguage\";\n";
  578.     $content .= "\$locale = \"$xlocale\";\n";
  579.     $content .= "\n";
  580.     $content .= "$line";
  581.     $content .= "# Web Links Preferences\n";
  582.     $content .= "#\n";
  583.     $content .= "# \$perpage:              How many links to show on each page?\n";
  584.     $content .= "# \$popular:              How many hits need a link to be listed as popular?\n";
  585.     $content .= "# \$newlinks:             How many links to display in the New Links Page?\n";
  586.     $content .= "# \$toplinks:             How many links to display in The Best Links Page? (Most Popular)\n";
  587.     $content .= "# \$linksresults:         How many links to display on each search result page?\n";
  588.     $content .= "# \$links_anonaddlinklock: Let Anonymous users to post new links? (1=Yes 0=No)\n";
  589.     $content .= "$line";
  590.     $content .= "\n";
  591.     $content .= "\$perpage = $xperpage;\n";
  592.     $content .= "\$popular = $xpopular;\n";
  593.     $content .= "\$newlinks = $xnewlinks;\n";
  594.     $content .= "\$toplinks = $xtoplinks;\n";
  595.     $content .= "\$linksresults = $xlinksresults;\n";
  596.     $content .= "\$links_anonaddlinklock = $xlinks_anonaddlinklock;\n";
  597.     $content .= "\n";
  598.     $content .= "$line";
  599.     $content .= "# Notification of News Submissions\n";
  600.     $content .= "#\n";
  601.     $content .= "# \$notify:         Notify you each time your site receives a news submission? (1=Yes 0=No)\n";
  602.     $content .= "# \$notify_email:   Email, address to send the notification\n";
  603.     $content .= "# \$notify_subject: Email subject\n";
  604.     $content .= "# \$notify_message: Email body, message\n";
  605.     $content .= "# \$notify_from:    account name to appear in From field of the Email\n";
  606.     $content .= "$line";
  607.     $content .= "\n";
  608.     $content .= "\$notify = $xnotify;\n";
  609.     $content .= "\$notify_email = \"$xnotify_email\";\n";
  610.     $content .= "\$notify_subject = \"$xnotify_subject\";\n";
  611.     $content .= "\$notify_message = \"$xnotify_message\";\n";
  612.     $content .= "\$notify_from = \"$xnotify_from\";\n";
  613.     $content .= "\n";
  614.     $content .= "$line";
  615.     $content .= "# Moderation Config (not 100% working)\n";
  616.     $content .= "#\n";
  617.     $content .= "# \$moderate:   Activate moderation system? (1=Yes 0=No)\n";
  618.     $content .= "# \$resons:     List of reasons for the moderation (each reason under quotes and comma separated)\n";
  619.     $content .= "# \$badreasons: Number of bad reasons in the reasons list\n";
  620.     $content .= "$line";
  621.     $content .= "\n";
  622.     $content .= "\$moderate = $xmoderate;\n";
  623.     $content .= "\$reasons = array(\"As Is\",
  624.             \"Offtopic\",
  625.             \"Flamebait\",
  626.             \"Troll\",
  627.             \"Redundant\",
  628.             \"Insighful\",
  629.             \"Interesting\",
  630.             \"Informative\",
  631.             \"Funny\",
  632.             \"Overrated\",
  633.             \"Underrated\");\n";
  634.     $content .= "\$badreasons = 4;\n";
  635.     $content .= "\n";
  636.     $content .= "$line";
  637.     $content .= "# Survey/Polls Config\n";
  638.     $content .= "#\n";
  639.     $content .= "# \$maxOptions: Number of maximum options for each poll\n";
  640.     $content .= "# \$BarScale:   Scale for the Bar, multiple of 100, You may leave this to 1\n";
  641.     $content .= "# \$setCookies: Set cookies to prevent visitors vote twice in a period of 24 hours? (1=Yes 0=No)\n";
  642.     $content .= "$line";
  643.     $content .= "\n";
  644.     $content .= "\$maxOptions = $xmaxOptions;\n";
  645.     $content .= "\$BarScale = $xBarScale;\n";
  646.     $content .= "\$setCookies = $xsetCookies;\n";
  647.     $content .= "\n";
  648.     $content .= "$line";
  649.     $content .= "# Some Graphics Options\n";
  650.     $content .= "#\n";
  651.     $content .= "# \$tipath:       Topics images path (put / only at the end, not at the begining)\n";
  652.     $content .= "# \$userimg:      User images path (put / only at the end, not at the begining)\n";
  653.     $content .= "# \$adminimg:     Administration system images path (put / only at the end, not at the begining)\n";
  654.     $content .= "# \$admingraphic: Activate graphic menu for Administration Menu? (1=Yes 0=No)\n";
  655.     $content .= "# \$admart:       How many articles to show in the admin section?\n";
  656.     $content .= "$line";
  657.     $content .= "\n";
  658.     $content .= "\$tipath = \"$xtipath\";\n";
  659.     $content .= "\$userimg = \"$xuserimg\";\n";
  660.     $content .= "\$adminimg = \"$xadminimg\";\n";
  661.     $content .= "\$admingraphic = $xadmingraphic;\n";
  662.     $content .= "\$admart = $xadmart;\n";
  663.     $content .= "\n";
  664.     $content .= "$line";
  665.     $content .= "# HTTP Referers Options\n";
  666.     $content .= "#\n";
  667.     $content .= "# \$httpref:    Activate HTTP referer logs to know who is linking to our site? (1=Yes 0=No)";
  668.     $content .= "# \$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";
  669.     $content .= "$line";
  670.     $content .= "\n";
  671.     $content .= "\$httpref = $xhttpref;\n";
  672.     $content .= "\$httprefmax = $xhttprefmax;\n";
  673.     $content .= "\n";
  674.     $content .= "$line";
  675.     $content .= "# Allowable HTML tags\n";
  676.     $content .= "#\n";
  677.     $content .= "# \$AllowableHTML: HTML command to allow in the comments\n";
  678.     $content .= "#                  =>2 means accept all qualifiers: <foo bar>\n";
  679.     $content .= "#                  =>1 means accept the tag only: <foo>\n";
  680.     $content .= "$line";
  681.     $content .= "\n";
  682.     $content .= "\$AllowableHTML = array(\"p\"=>2,
  683.             \"b\"=>1,
  684.             \"i\"=>1,
  685.             \"a\"=>2,
  686.             \"em\"=>1,
  687.             \"br\"=>1,
  688.             \"strong\"=>1,
  689.             \"blockquote\"=>1,
  690.                     \"tt\"=>1,
  691.                     \"li\"=>1,
  692.                     \"ol\"=>1,
  693.             \"div\"=>2,
  694.                     \"ul\"=>1);\n";
  695.     $content .= "\n";
  696.     $content .= "$line";
  697.     $content .= "# Miscelaneous Options\n";
  698.     $content .= "#\n";
  699.     $content .= "# \$Ephemerids:    Activate Ephemerids (Past Events) system? (1=Yes 0=No)\n";
  700.     $content .= "# \$advancedstats: Activate Advanced Stats? (1=Yes 0=No  This will display a new box in Statistics page with relevant server info)\n";
  701.     $content .= "$line";
  702.     $content .= "\n";
  703.     $content .= "\$Ephemerids = $xEphemerids;\n";
  704.     $content .= "\$advancedstats = $xadvancedstats;\n";
  705.     $content .= "\n";
  706.     $content .= "$line";
  707.     $content .= "# Filters Options (not working yet)\n";
  708.     $content .= "$line";
  709.     $content .= "\n";
  710.     $content .= "\$MaxTextLength = 0;\n";
  711.     $content .= "\$MaxTotalLength = 0;\n";
  712.     $content .= "\$CensorList = array(\"fuck\",
  713.             \"cunt\",
  714.             \"fucker\",
  715.             \"fucking\",
  716.             \"pussy\",
  717.             \"cock\",
  718.             \"c0ck\",
  719.             \"cum\",
  720.             \"twat\",
  721.             \"clit\",
  722.             \"bitch\",
  723.             \"fuk\",
  724.             \"fuking\",
  725.             \"motherfucker\");\n";
  726.     $content .= "\$CensorMode = 1;\n";
  727.     $content .= "\$CensorReplace = \"*\";\n";
  728.     $content .= "\n";
  729.     $content .= "$line";
  730.     $content .= "# Do not touch the following options!\n";
  731.     $content .= "$line";
  732.     $content .= "\n";
  733.     $content .= "\$cookieadmtime = 2592000;\n";
  734.     $content .= "\$cookiePrefix = \"NukePoll\";\n";
  735.     $content .= "\$uimages = \"\$userimg\$language\";\n";
  736.     $content .= "\$Version_Num = \"$Version_Num\";\n";
  737.     $content .= "\n";
  738.     $content .= "?>";
  739.     fwrite($file, $content);
  740.     fclose($file);
  741.     Header("Location: admin.php?op=AdminMain");
  742. }
  743.  
  744. switch($op) {
  745.     
  746.         case "Configure":
  747.             Configure();
  748.             break;
  749.         
  750.         case "ConfigSave":
  751.             ConfigSave($xsitename, $xnuke_url, $xsite_logo, $xslogan, $xstartdate, $xadminmail, $xtop, $xstoryhome, $xoldnum, $xultramode, $xanonpost, $xDefault_Theme, $xbanners, $xmyIP, $xfoot1, $xfoot2, $xfoot3, $xfoot4, $xbackend_title, $xbackend_language, $xbackend_image, $xbackend_width, $xbackend_height, $xlanguage, $xlocale, $xperpage, $xpopular, $xnewlinks, $xtoplinks, $xlinksresults, $xlinks_anonaddlinklock, $xnotify, $xnotify_email, $xnotify_subject, $xnotify_message, $xnotify_from, $xmoderate, $xcommentlimit, $xanonymous, $xmaxOptions, $xBarScale, $xsetCookies, $xtipath, $xuserimg, $xadminimg, $xadmingraphic, $xsite_font, $xadmart, $xminpass, $xhttpref, $xhttprefmax, $xpollcomm, $xEphemerids, $xadvancedstats);
  752.             break;
  753. }
  754.  
  755. } else {
  756.     echo "Access Denied";
  757. }
  758. ?>