PageRenderTime 51ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/web/trunk/forum/exxadmin/pages/global.php

#
PHP | 96 lines | 94 code | 2 blank | 0 comment | 10 complexity | d1589773c03c35fe6a68cc8f9ab0a4e0 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php check_security(); ?>
  2. <form action="<?php echo $myname; ?>" method="POST">
  3. <input type="hidden" name="page" value="setup" />
  4. <input type="hidden" name="action" value="global" />
  5. <table border="0" cellspacing="0" cellpadding="3" class="box-table">
  6. <tr>
  7. <td colspan="2" align="center" valign="middle" class="table-header">Global Settings</td>
  8. </tr>
  9. <tr>
  10. <th valign="middle">Default Messages Per Page:</th>
  11. <td valign="middle">
  12. <input type="Text" name="new_DefaultDisplay" value="<?php echo $DefaultDisplay; ?>" size="10" style="width: 200px;" class="TEXT" />
  13. </td>
  14. </tr>
  15. <tr>
  16. <th valign="middle">Default Email:</th>
  17. <td valign="middle">
  18. <input type="Text" name="new_DefaultEmail" value="<?php echo $DefaultEmail; ?>" size="10" style="width: 200px;" class="TEXT" />
  19. </td>
  20. </tr>
  21. <tr>
  22. <th valign="middle">PhorumMail Code:</th>
  23. <td valign="middle">
  24. <input type="Text" name="new_PhorumMailCode" value="<?php echo $PhorumMailCode; ?>" size="10" style="width: 200px;" class="TEXT" />
  25. </td>
  26. </tr>
  27. <tr>
  28. <th valign="middle">Cookies:</th>
  29. <td valign="middle">
  30. <select name="new_UseCookies" class=big>
  31. <option value="0" <?php if($UseCookies==0) echo "selected"; ?>>Do Not
  32. Use Cookies</option>
  33. <option value="1" <?php if($UseCookies==1) echo "selected"; ?>>Use Cookies</option>
  34. </select>
  35. </td>
  36. </tr>
  37. <tr>
  38. <th valign="middle">Sorting:</th>
  39. <td valign="middle">
  40. <select name="new_SortForums" class=big>
  41. <option value="0" <?php if($SortForums==0) echo "selected"; ?>>Do Not
  42. Sort Forums</option>
  43. <option value="1" <?php if($SortForums==1) echo "selected"; ?>>Sort
  44. Forums</option>
  45. </select>
  46. </td>
  47. </tr>
  48. <tr>
  49. <th valign="middle">Default Language:</th>
  50. <td valign="middle">
  51. <select name="new_default_lang">
  52. <?php
  53. $aryLangs = array();
  54. $strLangDir = "lang/";
  55. $dirCurrent = dir($strLangDir);
  56. while($strFile=$dirCurrent->read()) {
  57. if (is_file($strLangDir.$strFile)) {
  58. $aryLangs[] = $strLangDir.$strFile;
  59. }
  60. }
  61. $dirCurrent->close();
  62. if (count($aryLangs) > 1) { sort ($aryLangs); }
  63. $file = current($aryLangs);
  64. while ($file) {
  65. if($file!="$strLangDir"."blank.php"){
  66. $intStartLang = strpos($file, '/') + 1;
  67. $intLengthLang = strrpos($file, '.') - $intStartLang;
  68. $text=ucwords(substr($file,$intStartLang,$intLengthLang));
  69. echo "<option value=\"$file\"";
  70. if($file==$default_lang) echo ' selected';
  71. echo ">$text</option>\n";
  72. }
  73. $file = next($aryLangs);
  74. }
  75. ?>
  76. </select>
  77. </td>
  78. </tr>
  79. <tr>
  80. <th valign="middle">TimeZone Offset (from server)</th>
  81. <td valign="middle">
  82. <select name="new_default_timezone_offset">
  83. <?php
  84. for($x=12;$x>-12;$x--){
  85. echo ' <option value="'.$x.'"'.($x==$TimezoneOffset?' selected':'').'>'.$x."</option>\n";
  86. }
  87. ?>
  88. </select>
  89. </td>
  90. </tr>
  91. </table>
  92. <br />
  93. <center><input type="Submit" name="submit" value="Update" class="BUTTON" /></center>
  94. </form>