PageRenderTime 59ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/manager/actions/mutate_settings.dynamic.php

https://github.com/good-web-master/modx.evo.custom
PHP | 1427 lines | 1350 code | 38 blank | 39 comment | 108 complexity | 1ae5abd66b690e95a46b10daa592cb41 MD5 | raw file
Possible License(s): LGPL-2.1, AGPL-1.0, GPL-2.0, MIT, BSD-3-Clause

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly.");
  3. if(!$modx->hasPermission('settings')) {
  4. $e->setError(3);
  5. $e->dumpError();
  6. }
  7. // check to see the edit settings page isn't locked
  8. $sql = "SELECT internalKey, username FROM $dbase.`".$table_prefix."active_users` WHERE $dbase.`".$table_prefix."active_users`.action=17";
  9. $rs = mysql_query($sql);
  10. $limit = mysql_num_rows($rs);
  11. if($limit>1) {
  12. for ($i=0;$i<$limit;$i++) {
  13. $lock = mysql_fetch_assoc($rs);
  14. if($lock['internalKey']!=$modx->getLoginUserID()) {
  15. $msg = sprintf($_lang["lock_settings_msg"],$lock['username']);
  16. $e->setError(5, $msg);
  17. $e->dumpError();
  18. }
  19. }
  20. }
  21. // end check for lock
  22. // reload system settings from the database.
  23. // this will prevent user-defined settings from being saved as system setting
  24. $settings = array();
  25. $sql = "SELECT setting_name, setting_value FROM $dbase.`".$table_prefix."system_settings`";
  26. $rs = mysql_query($sql);
  27. $number_of_settings = mysql_num_rows($rs);
  28. while ($row = mysql_fetch_assoc($rs)) $settings[$row['setting_name']] = $row['setting_value'];
  29. extract($settings, EXTR_OVERWRITE);
  30. $displayStyle = ( ($_SESSION['browser']=='mz') || ($_SESSION['browser']=='op') || ($_SESSION['browser']=='sf') ) ? "table-row" : "block" ;
  31. // load languages and keys
  32. $lang_keys = array();
  33. $dir = dir("includes/lang");
  34. while ($file = $dir->read()) {
  35. if(strpos($file, ".inc.php")>0) {
  36. $endpos = strpos ($file, ".");
  37. $languagename = substr($file, 0, $endpos);
  38. $lang_keys[$languagename] = get_lang_keys($file);
  39. }
  40. }
  41. $dir->close();
  42. $isDefaultUnavailableMsg = $site_unavailable_message == $_lang['siteunavailable_message_default'];
  43. $isDefaultUnavailableMsgJs = $isDefaultUnavailableMsg ? 'true' : 'false';
  44. $site_unavailable_message_view = isset($site_unavailable_message) ? $site_unavailable_message : $_lang['siteunavailable_message_default'];
  45. /* check the file paths */
  46. $settings['filemanager_path'] = $filemanager_path = trim($settings['filemanager_path']) == '' ? MODX_BASE_PATH : $settings['filemanager_path'];
  47. $settings['rb_base_dir'] = $rb_base_dir = trim($settings['rb_base_dir']) == '' ? MODX_BASE_PATH.'assets/' : $settings['rb_base_dir'];
  48. $settings['rb_base_url'] = $rb_base_url = trim($settings['rb_base_url']) == '' ? 'assets/' : $settings['rb_base_url'];
  49. ?>
  50. <script type="text/javascript">
  51. function checkIM() {
  52. im_on = document.settings.im_plugin[0].checked; // check if im_plugin is on
  53. if(im_on==true) {
  54. showHide(/imRow/, 1);
  55. }
  56. };
  57. function checkCustomIcons() {
  58. if(document.settings.editor_toolbar.selectedIndex!=3) {
  59. showHide(/custom/,0);
  60. }
  61. };
  62. function showHide(what, onoff){
  63. var all = document.getElementsByTagName( "*" );
  64. var l = all.length;
  65. var buttonRe = what;
  66. var id, el, stylevar;
  67. if(onoff==1) {
  68. stylevar = "<?php echo $displayStyle; ?>";
  69. } else {
  70. stylevar = "none";
  71. }
  72. for ( var i = 0; i < l; i++ ) {
  73. el = all[i]
  74. id = el.id;
  75. if ( id == "" ) continue;
  76. if (buttonRe.test(id)) {
  77. el.style.display = stylevar;
  78. }
  79. }
  80. };
  81. function addContentType(){
  82. var i,o,exists=false;
  83. var txt = document.settings.txt_custom_contenttype;
  84. var lst = document.settings.lst_custom_contenttype;
  85. for(i=0;i<lst.options.length;i++)
  86. {
  87. if(lst.options[i].value==txt.value) {
  88. exists=true;
  89. break;
  90. }
  91. }
  92. if (!exists) {
  93. o = new Option(txt.value,txt.value);
  94. lst.options[lst.options.length]= o;
  95. updateContentType();
  96. }
  97. txt.value='';
  98. }
  99. function removeContentType(){
  100. var i;
  101. var lst = document.settings.lst_custom_contenttype;
  102. for(i=0;i<lst.options.length;i++) {
  103. if(lst.options[i].selected) {
  104. lst.remove(i);
  105. break;
  106. }
  107. }
  108. updateContentType();
  109. }
  110. function updateContentType(){
  111. var i,o,ol=[];
  112. var lst = document.settings.lst_custom_contenttype;
  113. var ct = document.settings.custom_contenttype;
  114. while(lst.options.length) {
  115. ol[ol.length] = lst.options[0].value;
  116. lst.options[0]= null;
  117. }
  118. if(ol.sort) ol.sort();
  119. ct.value = ol.join(",");
  120. for(i=0;i<ol.length;i++) {
  121. o = new Option(ol[i],ol[i]);
  122. lst.options[lst.options.length]= o;
  123. }
  124. documentDirty = true;
  125. }
  126. /**
  127. * @param element el were language selection comes from
  128. * @param string lkey language key to look up
  129. * @param id elupd html element to update with results
  130. * @param string default_str default value of string for loaded manager language - allows some level of confirmation of change from default
  131. */
  132. function confirmLangChange(el, lkey, elupd){
  133. lang_current = document.getElementById(elupd).value;
  134. lang_default = document.getElementById(lkey+'_hidden').value;
  135. changed = lang_current != lang_default;
  136. proceed = true;
  137. if(changed) {
  138. proceed = confirm('<?php echo $_lang['confirm_setting_language_change']; ?>');
  139. }
  140. if(proceed) {
  141. //document.getElementById(elupd).value = '';
  142. lang = el.options[el.selectedIndex].value;
  143. var myAjax = new Ajax('index.php?a=118', {
  144. method: 'post',
  145. data: 'action=get&lang='+lang+'&key='+lkey
  146. }).request();
  147. myAjax.addEvent('onComplete', function(resp){
  148. document.getElementById(elupd).value = resp;
  149. });
  150. }
  151. }
  152. </script>
  153. <form name="settings" action="index.php?a=30" method="post">
  154. <h1><?php echo $_lang['settings_title']; ?></h1>
  155. <div id="actions">
  156. <ul class="actionButtons">
  157. <li id="Button1">
  158. <a href="#" onclick="documentDirty=false; document.settings.submit();">
  159. <img src="<?php echo $_style["icons_save"]?>" /> <?php echo $_lang['save']; ?>
  160. </a>
  161. </li>
  162. <li id="Button5">
  163. <a href="#" onclick="documentDirty=false;document.location.href='index.php?a=2';">
  164. <img src="<?php echo $_style["icons_cancel"]?>" /> <?php echo $_lang['cancel']; ?>
  165. </a>
  166. </li>
  167. </ul>
  168. </div>
  169. <div style="margin: 0 10px 0 20px">
  170. <input type="hidden" name="site_id" value="<?php echo $site_id; ?>" />
  171. <input type="hidden" name="settings_version" value="<?php echo $modx_version; ?>" />
  172. <!-- this field is used to check site settings have been entered/ updated after install or upgrade -->
  173. <?php if(!isset($settings_version) || $settings_version!=$modx_version) { ?>
  174. <div class='sectionBody'><p><?php echo $_lang['settings_after_install']; ?></p></div>
  175. <?php } ?>
  176. <script type="text/javascript" src="media/script/tabpane.js"></script>
  177. <div class="tab-pane" id="settingsPane">
  178. <script type="text/javascript">
  179. tpSettings = new WebFXTabPane( document.getElementById( "settingsPane" ), <?php echo $modx->config['remember_last_tab'] == 1 ? 'true' : 'false'; ?> );
  180. </script>
  181. <!-- Site Settings -->
  182. <div class="tab-page" id="tabPage2">
  183. <h2 class="tab"><?php echo $_lang["settings_site"] ?></h2>
  184. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage2" ) );</script>
  185. <table border="0" cellspacing="0" cellpadding="3">
  186. <tr>
  187. <td nowrap class="warning"><b><?php echo $_lang["sitename_title"] ?></b></td>
  188. <td ><input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 200px;" name="site_name" value="<?php echo isset($site_name) ? $site_name : "My MODx Site" ; ?>" /></td>
  189. </tr>
  190. <tr>
  191. <td width="200">&nbsp;</td>
  192. <td class='comment'><?php echo $_lang["sitename_message"] ?></td>
  193. </tr>
  194. <tr>
  195. <td colspan="2"><div class='split'></div></td>
  196. </tr>
  197. <tr>
  198. <td nowrap class="warning"><b><?php echo $_lang["language_title"]?></b></td>
  199. <td> <select name="manager_language" size="1" class="inputBox" onchange="documentDirty=true;">
  200. <?php echo get_lang_options(null, $manager_language);?>
  201. </select> </td>
  202. </tr>
  203. <tr>
  204. <td width="200">&nbsp;</td>
  205. <td class='comment'><?php echo $_lang["language_message"]?></td>
  206. </tr>
  207. <tr>
  208. <td colspan="2"><div class='split'></div></td>
  209. </tr>
  210. <tr>
  211. <td nowrap class="warning"><b><?php echo $_lang["charset_title"]?></b></td>
  212. <td> <select name="modx_charset" size="1" class="inputBox" style="width:250px;" onchange="documentDirty=true;">
  213. <?php include "charsets.php"; ?>
  214. </select> </td>
  215. </tr>
  216. <tr>
  217. <td width="200">&nbsp;</td>
  218. <td class='comment'><?php echo $_lang["charset_message"]?></td>
  219. </tr>
  220. <tr>
  221. <td colspan="2"><div class='split'></div></td>
  222. </tr>
  223. <tr>
  224. <tr>
  225. <td nowrap class="warning"><b><?php echo $_lang["xhtml_urls_title"] ?></b></td>
  226. <td><input onchange="documentDirty=true;" type="radio" name="xhtml_urls" value="1" <?php echo $xhtml_urls=='1' ? 'checked="checked"' : "" ; ?> />
  227. <?php echo $_lang["yes"]?><br />
  228. <input onchange="documentDirty=true;" type="radio" name="xhtml_urls" value="0" <?php echo ($xhtml_urls=='0' || !isset($xhtml_urls)) ? 'checked="checked"' : "" ; ?> />
  229. <?php echo $_lang["no"]?> </td>
  230. </tr>
  231. <tr>
  232. <td width="200">&nbsp;</td>
  233. <td class='comment'><?php echo $_lang["xhtml_urls_message"] ?></td>
  234. </tr>
  235. <tr>
  236. <td colspan="2"><div class='split'></div></td>
  237. </tr>
  238. <tr>
  239. <td nowrap class="warning"><b><?php echo $_lang["sitestart_title"] ?></b></td>
  240. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="site_start" value="<?php echo isset($site_start) ? $site_start : 1 ; ?>" /></td>
  241. </tr>
  242. <tr>
  243. <td width="200">&nbsp;</td>
  244. <td class='comment'><?php echo $_lang["sitestart_message"] ?></td>
  245. </tr>
  246. <tr>
  247. <td colspan="2"><div class='split'></div></td>
  248. </tr>
  249. <tr>
  250. <td nowrap class="warning"><b><?php echo $_lang["errorpage_title"] ?></b></td>
  251. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="error_page" value="<?php echo isset($error_page) ? $error_page : 1 ; ?>" /></td>
  252. </tr>
  253. <tr>
  254. <td width="200">&nbsp;</td>
  255. <td class='comment'><?php echo $_lang["errorpage_message"] ?></td>
  256. </tr>
  257. <tr>
  258. <td colspan="2"><div class='split'></div></td>
  259. </tr>
  260. <tr>
  261. <td nowrap class="warning"><b><?php echo $_lang["unauthorizedpage_title"] ?></b></td>
  262. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="unauthorized_page" value="<?php echo isset($unauthorized_page) ? $unauthorized_page : 1 ; ?>" /></td>
  263. </tr>
  264. <tr>
  265. <td width="200">&nbsp;</td>
  266. <td class='comment'><?php echo $_lang["unauthorizedpage_message"] ?></td>
  267. </tr>
  268. <tr>
  269. <td colspan="2"><div class='split'></div></td>
  270. </tr>
  271. <tr>
  272. <td nowrap class="warning"><b><?php echo $_lang["sitestatus_title"] ?></b></td>
  273. <td><input onchange="documentDirty=true;" type="radio" name="site_status" value="1" <?php echo ($site_status=='1' || !isset($site_status)) ? 'checked="checked"' : "" ; ?> />
  274. <?php echo $_lang["online"]?><br />
  275. <input onchange="documentDirty=true;" type="radio" name="site_status" value="0" <?php echo $site_status=='0' ? 'checked="checked"' : "" ; ?> />
  276. <?php echo $_lang["offline"]?> </td>
  277. </tr>
  278. <tr>
  279. <td width="200">&nbsp;</td>
  280. <td class='comment'><?php echo $_lang["sitestatus_message"] ?></td>
  281. </tr>
  282. <tr>
  283. <td colspan="2"><div class='split'></div></td>
  284. </tr>
  285. <tr>
  286. <td nowrap class="warning" valign="top"><b><?php echo $_lang["siteunavailable_page_title"] ?></b></td>
  287. <td><input onchange="documentDirty=true;" name="site_unavailable_page" type="text" maxlength="10" size="5" value="<?php echo isset($site_unavailable_page) ? $site_unavailable_page : "" ; ?>" /></td>
  288. </tr>
  289. <tr>
  290. <td width="200">&nbsp;</td>
  291. <td class='comment'><?php echo $_lang["siteunavailable_page_message"] ?></td>
  292. </tr>
  293. <tr>
  294. <td colspan="2"><div class='split'></div></td>
  295. </tr>
  296. <tr>
  297. <td nowrap class="warning" valign="top"><b><?php echo $_lang["siteunavailable_title"] ?></b>
  298. <br />
  299. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  300. <select name="reload_site_unavailable" id="reload_site_unavailable_select" onchange="confirmLangChange(this, 'siteunavailable_message_default', 'site_unavailable_message_textarea');">
  301. <?php echo get_lang_options('siteunavailable_message_default');?>
  302. </select>
  303. </td>
  304. <td> <textarea name="site_unavailable_message" id="site_unavailable_message_textarea" style="width:100%; height: 120px;"><?php echo $site_unavailable_message_view; ?></textarea>
  305. <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']);?>" />
  306. </td>
  307. </tr>
  308. <tr>
  309. <td width="200">&nbsp;</td>
  310. <td class='comment'><?php echo $_lang['siteunavailable_message'];?></td>
  311. </tr>
  312. <tr>
  313. <td colspan="2"><div class='split'></div></td>
  314. </tr>
  315. <tr>
  316. <td nowrap class="warning" valign="top"><b><?php echo $_lang["track_visitors_title"] ?></b></td>
  317. <td><input onchange="documentDirty=true;" type="radio" name="track_visitors" value="1" <?php echo ($track_visitors=='1' || !isset($track_visitors)) ? 'checked="checked"' : "" ; ?> />
  318. <?php echo $_lang["yes"]?><br />
  319. <input onchange="documentDirty=true;" type="radio" name="track_visitors" value="0" <?php echo $track_visitors=='0' ? 'checked="checked"' : "" ; ?> />
  320. <?php echo $_lang["no"]?> </td>
  321. </tr>
  322. <tr>
  323. <td width="200">&nbsp;</td>
  324. <td class='comment'><?php echo $_lang["track_visitors_message"] ?></td>
  325. </tr>
  326. <tr>
  327. <td colspan="2"><div class='split'></div></td>
  328. </tr>
  329. <tr>
  330. <td nowrap class="warning" valign="top"><b><?php echo $_lang["top_howmany_title"] ?></b></td>
  331. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="top_howmany" value="<?php echo isset($top_howmany) ? $top_howmany : 10 ; ?>" /></td>
  332. </tr>
  333. <tr>
  334. <td width="200">&nbsp;</td>
  335. <td class='comment'><?php echo $_lang["top_howmany_message"] ?></td>
  336. </tr>
  337. <tr>
  338. <td colspan="2"><div class='split'></div></td>
  339. </tr>
  340. <tr>
  341. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaulttemplate_logic_title"];?></b></td>
  342. <td>
  343. <p><?php echo $_lang["defaulttemplate_logic_general_message"];?></p>
  344. <input onchange="documentDirty=true;" type="radio" name="auto_template_logic" value="system"<?php if($auto_template_logic == 'system') {echo " checked='checked'";}?>/> <?php echo $_lang["defaulttemplate_logic_system_message"]; ?><br />
  345. <input onchange="documentDirty=true;" type="radio" name="auto_template_logic" value="parent"<?php if($auto_template_logic == 'parent') {echo " checked='checked'";}?>/> <?php echo $_lang["defaulttemplate_logic_parent_message"]; ?><br />
  346. <input onchange="documentDirty=true;" type="radio" name="auto_template_logic" value="sibling"<?php if($auto_template_logic == 'sibling') {echo " checked='checked'";}?>/> <?php echo $_lang["defaulttemplate_logic_sibling_message"]; ?><br />
  347. </td>
  348. </tr>
  349. <tr>
  350. <td colspan="2"><div class='split'></div></td>
  351. </tr>
  352. <tr>
  353. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaulttemplate_title"] ?></b></td>
  354. <td>
  355. <?php
  356. $sql = 'SELECT t.templatename, t.id, c.category FROM '.$table_prefix.'site_templates t LEFT JOIN '.$table_prefix.'categories c ON t.category = c.id ORDER BY c.category, t.templatename ASC';
  357. $rs = mysql_query($sql);
  358. ?>
  359. <select name="default_template" class="inputBox" onchange="documentDirty=true;wrap=document.getElementById('template_reset_options_wrapper');if(this.options[this.selectedIndex].value != '<?php echo $default_template;?>'){wrap.style.display='block';}else{wrap.style.display='none';}" style="width:150px">
  360. <?php
  361. $currentCategory = '';
  362. while ($row = mysql_fetch_assoc($rs)) {
  363. $thisCategory = $row['category'];
  364. if($thisCategory == null) {
  365. $thisCategory = $_lang["no_category"];
  366. }
  367. if($thisCategory != $currentCategory) {
  368. if($closeOptGroup) {
  369. echo "\t\t\t\t\t</optgroup>\n";
  370. }
  371. echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n";
  372. $closeOptGroup = true;
  373. } else {
  374. $closeOptGroup = false;
  375. }
  376. $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : '';
  377. if ($selectedtext) {
  378. $oldTmpId = $row['id'];
  379. $oldTmpName = $row['templatename'];
  380. }
  381. echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n";
  382. $currentCategory = $thisCategory;
  383. }
  384. if($thisCategory != '') {
  385. echo "\t\t\t\t\t</optgroup>\n";
  386. }
  387. ?>
  388. </select>
  389. <br />
  390. <div id="template_reset_options_wrapper" style="display:none;">
  391. <input onchange="documentDirty=true;" type="radio" name="reset_template" value="1" /> <?php echo $_lang["template_reset_all"]; ?><br />
  392. <input onchange="documentDirty=true;" type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang["template_reset_specific"],$oldTmpName); ?>
  393. </div>
  394. <input type="hidden" name="old_template" value="<?php echo $oldTmpId; ?>" />
  395. </td>
  396. </tr>
  397. <tr>
  398. <td width="200">&nbsp;</td>
  399. <td class='comment'><?php echo $_lang["defaulttemplate_message"] ?></td>
  400. </tr>
  401. <tr>
  402. <td colspan="2"><div class='split'></div></td>
  403. </tr>
  404. <tr>
  405. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultpublish_title"] ?></b></td>
  406. <td> <input onchange="documentDirty=true;" type="radio" name="publish_default" value="1" <?php echo $publish_default=='1' ? 'checked="checked"' : "" ; ?> />
  407. <?php echo $_lang["yes"]?><br />
  408. <input onchange="documentDirty=true;" type="radio" name="publish_default" value="0" <?php echo ($publish_default=='0' || !isset($publish_default)) ? 'checked="checked"' : "" ; ?> />
  409. <?php echo $_lang["no"]?> </td>
  410. </tr>
  411. <tr>
  412. <td width="200">&nbsp;</td>
  413. <td class='comment'><?php echo $_lang["defaultpublish_message"] ?></td>
  414. </tr>
  415. <tr>
  416. <td colspan="2"><div class='split'></div></td>
  417. </tr>
  418. <tr>
  419. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultcache_title"] ?></b></td>
  420. <td> <input onchange="documentDirty=true;" type="radio" name="cache_default" value="1" <?php echo $cache_default=='1' ? 'checked="checked"' : "" ; ?> />
  421. <?php echo $_lang["yes"]?><br />
  422. <input onchange="documentDirty=true;" type="radio" name="cache_default" value="0" <?php echo ($cache_default=='0' || !isset($cache_default)) ? 'checked="checked"' : "" ; ?> />
  423. <?php echo $_lang["no"]?> </td>
  424. </tr>
  425. <tr>
  426. <td width="200">&nbsp;</td>
  427. <td class='comment'><?php echo $_lang["defaultcache_message"] ?></td>
  428. </tr>
  429. <tr>
  430. <td colspan="2"><div class='split'></div></td>
  431. </tr>
  432. <tr>
  433. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultsearch_title"] ?></b></td>
  434. <td> <input onchange="documentDirty=true;" type="radio" name="search_default" value="1" <?php echo $search_default=='1' ? 'checked="checked"' : "" ; ?> />
  435. <?php echo $_lang["yes"]?><br />
  436. <input onchange="documentDirty=true;" type="radio" name="search_default" value="0" <?php echo ($search_default=='0' || !isset($search_default)) ? 'checked="checked"' : "" ; ?> />
  437. <?php echo $_lang["no"]?> </td>
  438. </tr>
  439. <tr>
  440. <td width="200">&nbsp;</td>
  441. <td class='comment'><?php echo $_lang["defaultsearch_message"] ?></td>
  442. </tr>
  443. <tr>
  444. <td colspan="2"><div class='split'></div></td>
  445. </tr>
  446. <tr>
  447. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultmenuindex_title"] ?></b></td>
  448. <td> <input onchange="documentDirty=true;" type="radio" name="auto_menuindex" value="1" <?php echo ($auto_menuindex=='1' || !isset($auto_menuindex)) ? 'checked="checked"' : "" ; ?> />
  449. <?php echo $_lang["yes"]?><br />
  450. <input onchange="documentDirty=true;" type="radio" name="auto_menuindex" value="0" <?php echo ($auto_menuindex=='0') ? 'checked="checked"' : "" ; ?> />
  451. <?php echo $_lang["no"]?> </td>
  452. </tr>
  453. <tr>
  454. <td width="200">&nbsp;</td>
  455. <td class='comment'><?php echo $_lang["defaultmenuindex_message"] ?></td>
  456. </tr>
  457. <tr>
  458. <td colspan="2"><div class='split'></div></td>
  459. </tr>
  460. <tr>
  461. <td nowrap class="warning" valign="top"><b><?php echo $_lang["custom_contenttype_title"] ?></b></td>
  462. <td><input name="txt_custom_contenttype" type="text" maxlength="100" style="width: 200px;" value="" /> <input type="button" value="<?php echo $_lang["add"]; ?>" onclick='addContentType()' /><br />
  463. <table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
  464. <select name="lst_custom_contenttype" style="width:200px;" size="5">
  465. <?php
  466. $custom_contenttype = (isset($custom_contenttype) ? $custom_contenttype : "text/css,text/html,text/javascript,text/plain,text/xml");
  467. $ct = explode(",",$custom_contenttype);
  468. for($i=0;$i<count($ct);$i++) {
  469. echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>";
  470. }
  471. ?>
  472. </select>
  473. <input name="custom_contenttype" type="hidden" value="<?php echo $custom_contenttype; ?>" />
  474. </td><td valign="top">&nbsp;<input name="removecontenttype" type="button" value="<?php echo $_lang["remove"]; ?>" onclick='removeContentType()' /></td></tr></table>
  475. </td>
  476. </tr>
  477. <tr>
  478. <td width="200">&nbsp;</td>
  479. <td class='comment'><?php echo $_lang["custom_contenttype_message"] ?></td>
  480. </tr>
  481. <tr>
  482. <td colspan="2"><div class='split'></div></td>
  483. <tr>
  484. <td nowrap class="warning"><b><?php echo $_lang["serveroffset_title"] ?></b></td>
  485. <td> <select name="server_offset_time" size="1" class="inputBox">
  486. <?php
  487. for($i=-24; $i<25; $i++) {
  488. $seconds = $i*60*60;
  489. $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ;
  490. ?>
  491. <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option>
  492. <?php
  493. }
  494. ?>
  495. </select> </td>
  496. </tr>
  497. <tr>
  498. <td width="200">&nbsp;</td>
  499. <td class='comment'><?php printf($_lang["serveroffset_message"], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></td>
  500. </tr>
  501. <tr>
  502. <td colspan="2"><div class='split'>&nbsp;</div></td>
  503. </tr>
  504. <tr>
  505. <td nowrap class="warning"><b><?php echo $_lang["server_protocol_title"] ?></b></td>
  506. <td> <input onchange="documentDirty=true;" type="radio" name="server_protocol" value="http" <?php echo ($server_protocol=='http' || !isset($server_protocol))? 'checked="checked"' : "" ; ?> />
  507. <?php echo $_lang["server_protocol_http"]?><br />
  508. <input onchange="documentDirty=true;" type="radio" name="server_protocol" value="https" <?php echo $server_protocol=='https' ? 'checked="checked"' : "" ; ?> />
  509. <?php echo $_lang["server_protocol_https"]?> </td>
  510. </tr>
  511. <tr>
  512. <td width="200">&nbsp;</td>
  513. <td class='comment'><?php echo $_lang["server_protocol_message"] ?></td>
  514. </tr>
  515. <tr>
  516. <td colspan="2"><div class='split'></div></td>
  517. </tr>
  518. <tr>
  519. <td nowrap class="warning"><b><?php echo $_lang["validate_referer_title"] ?></b></td>
  520. <td><input onchange="documentDirty=true;" type="radio" name="validate_referer" value="1" <?php echo ($validate_referer=='1' || !isset($validate_referer)) ? 'checked="checked"' : "" ; ?> />
  521. <?php echo $_lang["yes"]?><br />
  522. <input onchange="documentDirty=true;" type="radio" name="validate_referer" value="0" <?php echo $validate_referer=='0' ? 'checked="checked"' : "" ; ?> />
  523. <?php echo $_lang["no"]?> </td>
  524. </tr>
  525. <tr>
  526. <td width="200">&nbsp;</td>
  527. <td class='comment'><?php echo $_lang["validate_referer_message"] ?></td>
  528. </tr>
  529. <tr>
  530. <td colspan="2"><div class='split'></div></td>
  531. </tr>
  532. <tr>
  533. <td nowrap class="warning"><?php echo $_lang["rss_url_news_title"] ?></td>
  534. <td ><input onchange="documentDirty=true;" type='text' maxlength='350' style="width: 350px;" name="rss_url_news" value="<?php echo isset($rss_url_news) ? $rss_url_news : $_lang["rss_url_news_default"] ; ?>" /></td>
  535. </tr>
  536. <tr>
  537. <td width="200">&nbsp;</td>
  538. <td class='comment'><?php echo $_lang["rss_url_news_message"] ?></td>
  539. </tr>
  540. <tr>
  541. <td colspan="2"><div class='split'></div></td>
  542. </tr>
  543. <tr>
  544. <td nowrap class="warning"><?php echo $_lang["rss_url_security_title"] ?></td>
  545. <td ><input onchange="documentDirty=true;" type='text' maxlength='350' style="width: 350px;" name="rss_url_security" value="<?php echo isset($rss_url_security) ? $rss_url_security : $_lang["rss_url_security_default"] ; ?>" /></td>
  546. </tr>
  547. <tr>
  548. <td width="200">&nbsp;</td>
  549. <td class='comment'><?php echo $_lang["rss_url_security_message"] ?></td>
  550. </tr>
  551. <tr>
  552. <td colspan="2"><div class='split'></div></td>
  553. </tr>
  554. <tr class='row1'>
  555. <td colspan="2">
  556. <?php
  557. // invoke OnSiteSettingsRender event
  558. $evtOut = $modx->invokeEvent("OnSiteSettingsRender");
  559. if(is_array($evtOut)) echo implode("",$evtOut);
  560. ?>
  561. </td>
  562. </tr>
  563. </table>
  564. </div>
  565. <!-- Friendly URL settings -->
  566. <div class="tab-page" id="tabPage3">
  567. <h2 class="tab"><?php echo $_lang["settings_furls"] ?></h2>
  568. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage3" ) );</script>
  569. <table border="0" cellspacing="0" cellpadding="3">
  570. <tr>
  571. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurls_title"] ?></b></td>
  572. <td> <input onchange="documentDirty=true;" type="radio" name="friendly_urls" value="1" <?php echo $friendly_urls=='1' ? 'checked="checked"' : "" ; ?> onclick='showHide(/furlRow/, 1);' />
  573. <?php echo $_lang["yes"]?><br />
  574. <input onchange="documentDirty=true;" type="radio" name="friendly_urls" value="0" <?php echo ($friendly_urls=='0' || !isset($friendly_urls)) ? 'checked="checked"' : "" ; ?> onclick='showHide(/furlRow/, 0);' />
  575. <?php echo $_lang["no"]?> </td>
  576. </tr>
  577. <tr>
  578. <td width="200">&nbsp;</td>
  579. <td class='comment'><?php echo $_lang["friendlyurls_message"] ?></td>
  580. </tr>
  581. <tr>
  582. <td colspan="2"><div class='split'></div></td>
  583. </tr>
  584. <tr id='furlRow1' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  585. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurlsprefix_title"] ?></b></td>
  586. <td><input onchange="documentDirty=true;" type='text' maxlength='50' style="width: 200px;" name="friendly_url_prefix" value="<?php echo isset($friendly_url_prefix) ? $friendly_url_prefix : "p" ; ?>" /></td>
  587. </tr>
  588. <tr id='furlRow2' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  589. <td width="200">&nbsp;</td>
  590. <td class='comment'><?php echo $_lang["friendlyurlsprefix_message"] ?></td>
  591. </tr>
  592. <tr id='furlRow3' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  593. <td colspan="2"><div class='split'></div></td>
  594. </tr>
  595. <tr id='furlRow4' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  596. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurlsuffix_title"] ?></b></td>
  597. <td><input onchange="documentDirty=true;" type='text' maxlength='50' style="width: 200px;" name="friendly_url_suffix" value="<?php echo isset($friendly_url_suffix) ? $friendly_url_suffix : ".html" ; ?>" /></td>
  598. </tr>
  599. <tr id='furlRow5' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  600. <td width="200">&nbsp;</td>
  601. <td class='comment'><?php echo $_lang["friendlyurlsuffix_message"] ?></td>
  602. </tr>
  603. <tr id='furlRow6' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  604. <td colspan="2"><div class='split'></div></td>
  605. </tr>
  606. <tr id='furlRow7' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  607. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendly_alias_title"] ?></b></td>
  608. <td> <input onchange="documentDirty=true;" type="radio" name="friendly_alias_urls" value="1" <?php echo $friendly_alias_urls=='1' ? 'checked="checked"' : "" ; ?> />
  609. <?php echo $_lang["yes"]?><br />
  610. <input onchange="documentDirty=true;" type="radio" name="friendly_alias_urls" value="0" <?php echo ($friendly_alias_urls=='0' || !isset($friendly_alias_urls)) ? 'checked="checked"' : "" ; ?> />
  611. <?php echo $_lang["no"]?> </td>
  612. </tr>
  613. <tr id='furlRow8' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  614. <td width="200">&nbsp;</td>
  615. <td class='comment'><?php echo $_lang["friendly_alias_message"] ?></td>
  616. </tr>
  617. <tr id='furlRow9' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  618. <td colspan="2"><div class='split'></div></td>
  619. </tr>
  620. <tr id='furlRow10' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  621. <td nowrap class="warning" valign="top"><b><?php echo $_lang["use_alias_path_title"] ?></b></td>
  622. <td> <input onchange="documentDirty=true;" type="radio" name="use_alias_path" value="1" <?php echo $use_alias_path=='1' ? 'checked="checked"' : "" ; ?> />
  623. <?php echo $_lang["yes"]?><br />
  624. <input onchange="documentDirty=true;" type="radio" name="use_alias_path" value="0" <?php echo ($use_alias_path=='0' || !isset($use_alias_path)) ? 'checked="checked"' : "" ; ?> />
  625. <?php echo $_lang["no"]?> </td>
  626. </tr>
  627. <tr id='furlRow11' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  628. <td width="200">&nbsp;</td>
  629. <td class='comment'><?php echo $_lang["use_alias_path_message"] ?></td>
  630. </tr>
  631. <tr id='furlRow12' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  632. <td colspan="2"><div class='split'></div></td>
  633. </tr>
  634. <tr id='furlRow16' class='row2' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  635. <td nowrap class="warning" valign="top"><b><?php echo $_lang["duplicate_alias_title"] ?></b></td>
  636. <td> <input onchange="documentDirty=true;" type="radio" name="allow_duplicate_alias" value="1" <?php echo $allow_duplicate_alias=='1' ? 'checked="checked"' : "" ; ?> />
  637. <?php echo $_lang["yes"]?><br />
  638. <input onchange="documentDirty=true;" type="radio" name="allow_duplicate_alias" value="0" <?php echo ($allow_duplicate_alias=='0' || !isset($allow_duplicate_alias)) ? 'checked="checked"' : "" ; ?> />
  639. <?php echo $_lang["no"]?> </td>
  640. </tr>
  641. <tr id='furlRow17' class='row2' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  642. <td width="200">&nbsp;</td>
  643. <td class='comment'><?php echo $_lang["duplicate_alias_message"] ?></td>
  644. </tr>
  645. <tr id='furlRow18' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  646. <td colspan="2"><div class='split'></div></td>
  647. </tr>
  648. <tr id='furlRow13' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  649. <td nowrap class="warning" valign="top"><b><?php echo $_lang["automatic_alias_title"] ?></b></td>
  650. <td> <input onchange="documentDirty=true;" type="radio" name="automatic_alias" value="1" <?php echo $automatic_alias=='1' ? 'checked="checked"' : "" ; ?> />
  651. <?php echo $_lang["yes"]?><br />
  652. <input onchange="documentDirty=true;" type="radio" name="automatic_alias" value="0" <?php echo ($automatic_alias=='0' || !isset($automatic_alias)) ? 'checked="checked"' : "" ; ?> />
  653. <?php echo $_lang["no"]?> </td>
  654. </tr>
  655. <tr id='furlRow14' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  656. <td width="200">&nbsp;</td>
  657. <td class='comment'><?php echo $_lang["automatic_alias_message"] ?></td>
  658. </tr>
  659. <tr id='furlRow15' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  660. <td colspan="2"><div class='split'></div></td>
  661. </tr>
  662. <tr class='row1'>
  663. <td colspan="2">
  664. <?php
  665. // invoke OnFriendlyURLSettingsRender event
  666. $evtOut = $modx->invokeEvent("OnFriendlyURLSettingsRender");
  667. if(is_array($evtOut)) echo implode("",$evtOut);
  668. ?>
  669. </td>
  670. </tr>
  671. </table>
  672. </div>
  673. <!-- User settings -->
  674. <div class="tab-page" id="tabPage4">
  675. <h2 class="tab"><?php echo $_lang["settings_users"] ?></h2>
  676. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage4" ) );</script>
  677. <table border="0" cellspacing="0" cellpadding="3">
  678. <tr>
  679. <td nowrap class="warning"><b><?php echo $_lang["udperms_title"] ?></b></td>
  680. <td> <input onchange="documentDirty=true;" type="radio" name="use_udperms" value="1" <?php echo $use_udperms=='1' ? 'checked="checked"' : "" ; ?> onclick='showHide(/udPerms/, 1);' />
  681. <?php echo $_lang["yes"]?><br />
  682. <input onchange="documentDirty=true;" type="radio" name="use_udperms" value="0" <?php echo ($use_udperms=='0' || !isset($use_udperms)) ? 'checked="checked"' : "" ; ?> onclick='showHide(/udPerms/, 0);' />
  683. <?php echo $_lang["no"]?> </td>
  684. </tr>
  685. <tr>
  686. <td width="200">&nbsp;</td>
  687. <td class='comment'><?php echo $_lang["udperms_message"] ?></td>
  688. </tr>
  689. <tr>
  690. <td colspan="2"><div class='split'></div></td>
  691. </tr>
  692. <tr id='udPermsRow1' class='row1' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  693. <td nowrap class="warning"><b><?php echo $_lang["udperms_allowroot_title"] ?></b></td>
  694. <td> <input onchange="documentDirty=true;" type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> />
  695. <?php echo $_lang["yes"]?><br />
  696. <input onchange="documentDirty=true;" type="radio" name="udperms_allowroot" value="0" <?php echo ($udperms_allowroot=='0' || !isset($udperms_allowroot)) ? 'checked="checked"' : "" ; ?> />
  697. <?php echo $_lang["no"]?> </td>
  698. </tr>
  699. <tr id='udPermsRow2' class='row1' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  700. <td width="200">&nbsp;</td>
  701. <td class='comment'><?php echo $_lang["udperms_allowroot_message"] ?></td>
  702. </tr>
  703. <tr id='udPermsRow3' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  704. <td colspan="2"><div class='split'></div></td>
  705. </tr>
  706. <tr>
  707. <td nowrap class="warning"><b><?php echo $_lang["failed_login_title"] ?></b></td>
  708. <td><input type="text" name="failed_login_attempts" style="width:50px" value="<?php echo isset($failed_login_attempts) ? $failed_login_attempts : "3" ; ?>" /></td>
  709. </tr>
  710. <tr>
  711. <td width="200">&nbsp;</td>
  712. <td class='comment'><?php echo $_lang["failed_login_message"] ?></td>
  713. </tr>
  714. <tr>
  715. <td colspan="2"><div class='split'></div></td>
  716. </tr>
  717. <tr>
  718. <td nowrap class="warning"><b><?php echo $_lang["blocked_minutes_title"] ?></b></td>
  719. <td><input type="text" name="blocked_minutes" style="width:100px" value="<?php echo isset($blocked_minutes) ? $blocked_minutes : "60" ; ?>" /></td>
  720. </tr>
  721. <tr>
  722. <td width="200">&nbsp;</td>
  723. <td class='comment'><?php echo $_lang["blocked_minutes_message"] ?></td>
  724. </tr>
  725. <tr>
  726. <td colspan="2"><div class='split'></div></td>
  727. </tr>
  728. <?php
  729. // Check for GD before allowing captcha to be enabled
  730. $gdAvailable = extension_loaded('gd');
  731. ?>
  732. <tr>
  733. <td nowrap class="warning"><b><?php echo $_lang["captcha_title"] ?></b></td>
  734. <td> <input onchange="documentDirty=true;" type="radio" name="use_captcha" value="1" <?php echo ($use_captcha=='1' && $gdAvailable) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> />
  735. <?php echo $_lang["yes"]?><br />
  736. <input onchange="documentDirty=true;" type="radio" name="use_captcha" value="0" <?php echo ($use_captcha=='0' || !isset($use_captcha) || !$gdAvailable) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> />
  737. <?php echo $_lang["no"]?> </td>
  738. </tr>
  739. <tr>
  740. <td width="200">&nbsp;</td>
  741. <td class='comment'><?php echo $_lang["captcha_message"] ?></td>
  742. </tr>
  743. <tr>
  744. <td colspan="2"><div class='split'></div></td>
  745. </tr>
  746. <tr>
  747. <td nowrap class="warning"><b><?php echo $_lang["captcha_words_title"] ?></b>
  748. <br />
  749. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  750. <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');">
  751. <?php echo get_lang_options('captcha_words_default');?>
  752. </select>
  753. </td>
  754. <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo isset($captcha_words) ? $captcha_words : $_lang["captcha_words_default"] ; ?>" />
  755. <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang["captcha_words_default"]);?>" />
  756. </td>
  757. </tr>
  758. <tr>
  759. <td width="200">&nbsp;</td>
  760. <td class='comment'><?php echo $_lang["captcha_words_message"] ?></td>
  761. </tr>
  762. <tr>
  763. <td colspan="2"><div class='split'></div></td>
  764. </tr>
  765. <tr>
  766. <td nowrap class="warning"><b><?php echo $_lang["emailsender_title"] ?></b></td>
  767. <td ><input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="emailsender" value="<?php echo isset($emailsender) ? $emailsender : "you@example.com" ; ?>" /></td>
  768. </tr>
  769. <tr>
  770. <td width="200">&nbsp;</td>
  771. <td class='comment'><?php echo $_lang["emailsender_message"] ?></td>
  772. </tr>
  773. <tr>
  774. <td colspan="2"><div class='split'></div></td>
  775. </tr>
  776. <tr>
  777. <td nowrap class="warning"><b><?php echo $_lang["emailsubject_title"] ?></b>
  778. <br />
  779. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  780. <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
  781. <?php echo get_lang_options('emailsubject_default');?>
  782. </select>
  783. </td>
  784. <td ><input id="emailsubject_field" name="emailsubject" onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" value="<?php echo isset($emailsubject) ? $emailsubject : $_lang["emailsubject_default"] ; ?>" />
  785. <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
  786. </td>
  787. </tr>
  788. <tr>
  789. <td width="200">&nbsp;</td>
  790. <td class='comment'><?php echo $_lang["emailsubject_message"] ?></td>
  791. </tr>
  792. <tr>
  793. <td colspan="2"><div class='split'></div></td>
  794. </tr>
  795. <tr>
  796. <td nowrap class="warning" valign="top"><b><?php echo $_lang["signupemail_title"] ?></b>
  797. <br />
  798. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  799. <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
  800. <?php echo get_lang_options('system_email_signup');?>
  801. </select>
  802. </td>
  803. <td> <textarea id="signupemail_message_textarea" name="signupemail_message" style="width:100%; height: 120px;"><?php echo isset($signupemail_message) ? $signupemail_message : $_lang["system_email_signup"] ?></textarea>
  804. <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
  805. </td>
  806. </tr>
  807. <tr>
  808. <td width="200">&nbsp;</td>
  809. <td class='comment'><?php echo $_lang["signupemail_message"] ?></td>
  810. </tr>
  811. <tr>
  812. <td colspan="2"><div class='split'></div></td>
  813. </tr>
  814. <tr>
  815. <td nowrap class="warning" valign="top"><b><?php echo $_lang["websignupemail_title"] ?></b>
  816. <br />
  817. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  818. <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
  819. <?php echo get_lang_options('system_email_websignup');?>
  820. </select>
  821. </td>
  822. <td> <textarea id="websignupemail_message_textarea" name="websignupemail_message" style="width:100%; height: 120px;"><?php echo isset($websignupemail_message) ? $websignupemail_message : $_lang["system_email_websignup"] ?></textarea>
  823. <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
  824. </td>
  825. </tr>
  826. <tr>
  827. <td width="200">&nbsp;</td>
  828. <td class='comment'><?php echo $_lang["websignupemail_message"] ?></td>
  829. </tr>
  830. <tr>
  831. <td colspan="2"><div class='split'></div></td>
  832. </tr>
  833. <tr>
  834. <td nowrap class="warning" valign="top"><b><?php echo $_lang["webpwdreminder_title"] ?></b>
  835. <br />
  836. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  837. <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
  838. <?php echo get_lang_options('system_email_webreminder');?>
  839. </select>
  840. </td>
  841. <td> <textarea id="system_email_webreminder_textarea" name="webpwdreminder_message" style="width:100%; height: 120px;"><?php echo isset($webpwdreminder_message) ? $webpwdreminder_message : $_lang["system_email_webreminder"]; ?></textarea>
  842. <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
  843. </td>
  844. </tr>
  845. <tr>
  846. <td width="200">&nbsp;</td>
  847. <td class='comment'><?php echo $_lang["webpwdreminder_message"] ?></td>
  848. </tr>
  849. <tr class='row1'>
  850. <td colspan="2">
  851. <?php
  852. // invoke OnUserSettingsRender event
  853. $evtOut = $modx->invokeEvent("OnUserSettingsRender");
  854. if(is_array($evtOut)) echo implode("",$evtOut);
  855. ?>
  856. </td>
  857. </tr>
  858. </table>
  859. </div>
  860. <!-- Interface & editor settings -->
  861. <div class="tab-page" id="tabPage5">
  862. <h2 class="tab"><?php echo $_lang["settings_ui"] ?></h2>
  863. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage5" ) );</script>
  864. <table border="0" cellspacing="0" cellpadding="3">
  865. <tr>
  866. <td nowrap class="warning"><b><?php echo $_lang["manager_theme"]?></b></td>
  867. <td> <select name="manager_theme" size="1" class="inputBox" onchange="documentDirty=true;document.forms['settings'].theme_refresher.value = Date.parse(new Date())">
  868. <?php
  869. $dir = dir("media/style/");
  870. while ($file = $dir->read()) {
  871. if($file!="." && $file!=".." && is_dir("media/style/$file") && substr($file,0,1) != '.') {
  872. $themename = $file;
  873. $selectedtext = $themename==$manager_theme ? "selected='selected'" : "" ;
  874. echo "<option value='$themename' $selectedtext>".ucwords(str_replace("_", " ", $themename))."</option>";
  875. }
  876. }
  877. $dir->close();
  878. ?>
  879. </select><input type="hidden" name="theme_refresher" value="" /></td>
  880. </tr>
  881. <tr>
  882. <td width="200">&nbsp;</td>
  883. <td class='comment'><?php echo $_lang["manager_theme_message"]?></td>
  884. </tr>
  885. <tr>
  886. <td colspan="2"><div class='split'></div></td>
  887. </tr>
  888. <tr>
  889. <td nowrap class="warning"><b><?php echo $_lang["warning_visibility"] ?></b></td>
  890. <td> <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="0" <?php echo $warning_visibility=='0' ? 'checked="checked"' : ""; ?> />
  891. <?php echo $_lang["administrators"]?><br />
  892. <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="1" <?php echo (!isset($warning_visibility) || $warning_visibility=='1') ? 'checked="checked"' : ""; ?> />
  893. <?php echo $_lang["everybody"]?></td>
  894. </tr>
  895. <tr>
  896. <td width="200">&nbsp;</td>
  897. <td class='comment'><?php echo $_lang["warning_visibility_message"]?></td>
  898. </tr>
  899. <tr>

Large files files are truncated, but you can click here to view the full file