PageRenderTime 172ms CodeModel.GetById 22ms RepoModel.GetById 5ms app.codeStats 1ms

/manager/actions/mutate_settings.dynamic.php

http://modx-ja.googlecode.com/
PHP | 1448 lines | 1370 code | 39 blank | 39 comment | 105 complexity | e8bdeb7576ea7e205bb34b349afa0a85 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, 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']!=='ie') ? '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" enctype="multipart/form-data">
  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. include(MODX_MANAGER_PATH.'includes/locale/' . $manager_language . '/system_settings.php');
  175. ?>
  176. <div class='sectionBody'><p><?php echo $_lang['settings_after_install']; ?></p></div>
  177. <?php } ?>
  178. <script type="text/javascript" src="media/script/tabpane.js"></script>
  179. <div class="tab-pane" id="settingsPane">
  180. <script type="text/javascript">
  181. tpSettings = new WebFXTabPane( document.getElementById( "settingsPane" ), <?php echo $modx->config['remember_last_tab'] == 0 ? 'false' : 'true'; ?> );
  182. </script>
  183. <!-- Site Settings -->
  184. <div class="tab-page" id="tabPage2">
  185. <h2 class="tab"><?php echo $_lang["settings_site"] ?></h2>
  186. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage2" ) );</script>
  187. <table border="0" cellspacing="0" cellpadding="3">
  188. <tr>
  189. <td nowrap class="warning"><b><?php echo $_lang["sitename_title"] ?></b></td>
  190. <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>
  191. </tr>
  192. <tr>
  193. <td width="200">&nbsp;</td>
  194. <td class='comment'><?php echo $_lang["sitename_message"] ?></td>
  195. </tr>
  196. <tr>
  197. <td colspan="2"><div class='split'></div></td>
  198. </tr>
  199. <tr>
  200. <td nowrap class="warning"><b><?php echo $_lang["language_title"]?></b></td>
  201. <td> <select name="manager_language" size="1" class="inputBox" onchange="documentDirty=true;">
  202. <?php echo get_lang_options(null, $manager_language);?>
  203. </select> </td>
  204. </tr>
  205. <tr>
  206. <td width="200">&nbsp;</td>
  207. <td class='comment'><?php echo $_lang["language_message"]?></td>
  208. </tr>
  209. <tr>
  210. <td colspan="2"><div class='split'></div></td>
  211. </tr>
  212. <tr>
  213. <td nowrap class="warning"><b><?php echo $_lang["charset_title"]?></b></td>
  214. <td> <select name="modx_charset" size="1" class="inputBox" style="width:250px;" onchange="documentDirty=true;">
  215. <?php include "charsets.php"; ?>
  216. </select> </td>
  217. </tr>
  218. <tr>
  219. <td width="200">&nbsp;</td>
  220. <td class='comment'><?php echo $_lang["charset_message"]?></td>
  221. </tr>
  222. <tr>
  223. <td colspan="2"><div class='split'></div></td>
  224. </tr>
  225. <tr>
  226. <tr>
  227. <td nowrap class="warning"><b><?php echo $_lang["xhtml_urls_title"] ?></b></td>
  228. <td><input onchange="documentDirty=true;" type="radio" name="xhtml_urls" value="1" <?php echo $xhtml_urls=='1' ? 'checked="checked"' : "" ; ?> />
  229. <?php echo $_lang["yes"]?><br />
  230. <input onchange="documentDirty=true;" type="radio" name="xhtml_urls" value="0" <?php echo ($xhtml_urls=='0' || !isset($xhtml_urls)) ? 'checked="checked"' : "" ; ?> />
  231. <?php echo $_lang["no"]?> </td>
  232. </tr>
  233. <tr>
  234. <td width="200">&nbsp;</td>
  235. <td class='comment'><?php echo $_lang["xhtml_urls_message"] ?></td>
  236. </tr>
  237. <tr>
  238. <td colspan="2"><div class='split'></div></td>
  239. </tr>
  240. <tr>
  241. <td nowrap class="warning"><b><?php echo $_lang["sitestart_title"] ?></b></td>
  242. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="site_start" value="<?php echo isset($site_start) ? $site_start : 1 ; ?>" /></td>
  243. </tr>
  244. <tr>
  245. <td width="200">&nbsp;</td>
  246. <td class='comment'><?php echo $_lang["sitestart_message"] ?></td>
  247. </tr>
  248. <tr>
  249. <td colspan="2"><div class='split'></div></td>
  250. </tr>
  251. <tr>
  252. <td nowrap class="warning"><b><?php echo $_lang["errorpage_title"] ?></b></td>
  253. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="error_page" value="<?php echo isset($error_page) ? $error_page : 1 ; ?>" /></td>
  254. </tr>
  255. <tr>
  256. <td width="200">&nbsp;</td>
  257. <td class='comment'><?php echo $_lang["errorpage_message"] ?></td>
  258. </tr>
  259. <tr>
  260. <td colspan="2"><div class='split'></div></td>
  261. </tr>
  262. <tr>
  263. <td nowrap class="warning"><b><?php echo $_lang["unauthorizedpage_title"] ?></b></td>
  264. <td><input onchange="documentDirty=true;" type='text' maxlength='10' size='5' name="unauthorized_page" value="<?php echo isset($unauthorized_page) ? $unauthorized_page : 1 ; ?>" /></td>
  265. </tr>
  266. <tr>
  267. <td width="200">&nbsp;</td>
  268. <td class='comment'><?php echo $_lang["unauthorizedpage_message"] ?></td>
  269. </tr>
  270. <tr>
  271. <td colspan="2"><div class='split'></div></td>
  272. </tr>
  273. <tr>
  274. <td nowrap class="warning"><b><?php echo $_lang["sitestatus_title"] ?></b></td>
  275. <td><input onchange="documentDirty=true;" type="radio" name="site_status" value="1" <?php echo ($site_status=='1' || !isset($site_status)) ? 'checked="checked"' : "" ; ?> />
  276. <?php echo $_lang["online"]?><br />
  277. <input onchange="documentDirty=true;" type="radio" name="site_status" value="0" <?php echo $site_status=='0' ? 'checked="checked"' : "" ; ?> />
  278. <?php echo $_lang["offline"]?> </td>
  279. </tr>
  280. <tr>
  281. <td width="200">&nbsp;</td>
  282. <td class='comment'><?php echo $_lang["sitestatus_message"] ?></td>
  283. </tr>
  284. <tr>
  285. <td colspan="2"><div class='split'></div></td>
  286. </tr>
  287. <tr>
  288. <td nowrap class="warning" valign="top"><b><?php echo $_lang["siteunavailable_page_title"] ?></b></td>
  289. <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>
  290. </tr>
  291. <tr>
  292. <td width="200">&nbsp;</td>
  293. <td class='comment'><?php echo $_lang["siteunavailable_page_message"] ?></td>
  294. </tr>
  295. <tr>
  296. <td colspan="2"><div class='split'></div></td>
  297. </tr>
  298. <tr>
  299. <td nowrap class="warning" valign="top"><b><?php echo $_lang["siteunavailable_title"] ?></b>
  300. <br />
  301. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  302. <select name="reload_site_unavailable" id="reload_site_unavailable_select" onchange="confirmLangChange(this, 'siteunavailable_message_default', 'site_unavailable_message_textarea');">
  303. <?php echo get_lang_options('siteunavailable_message_default');?>
  304. </select>
  305. </td>
  306. <td> <textarea name="site_unavailable_message" id="site_unavailable_message_textarea" style="width:100%; height: 120px;"><?php echo $site_unavailable_message_view; ?></textarea>
  307. <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']);?>" />
  308. </td>
  309. </tr>
  310. <tr>
  311. <td width="200">&nbsp;</td>
  312. <td class='comment'><?php echo $_lang['siteunavailable_message'];?></td>
  313. </tr>
  314. <tr>
  315. <td colspan="2"><div class='split'></div></td>
  316. </tr>
  317. <tr>
  318. <td nowrap class="warning" valign="top"><b><?php echo $_lang["track_visitors_title"] ?></b></td>
  319. <td><input onchange="documentDirty=true;" type="radio" name="track_visitors" value="1" <?php echo ($track_visitors=='1' || !isset($track_visitors)) ? 'checked="checked"' : "" ; ?> />
  320. <?php echo $_lang["yes"]?><br />
  321. <input onchange="documentDirty=true;" type="radio" name="track_visitors" value="0" <?php echo $track_visitors=='0' ? 'checked="checked"' : "" ; ?> />
  322. <?php echo $_lang["no"]?> </td>
  323. </tr>
  324. <tr>
  325. <td width="200">&nbsp;</td>
  326. <td class='comment'><?php echo $_lang["track_visitors_message"] ?></td>
  327. </tr>
  328. <tr>
  329. <td colspan="2"><div class='split'></div></td>
  330. </tr>
  331. <tr>
  332. <td nowrap class="warning" valign="top"><b><?php echo $_lang["top_howmany_title"] ?></b></td>
  333. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="top_howmany" value="<?php echo isset($top_howmany) ? $top_howmany : 10 ; ?>" /></td>
  334. </tr>
  335. <tr>
  336. <td width="200">&nbsp;</td>
  337. <td class='comment'><?php echo $_lang["top_howmany_message"] ?></td>
  338. </tr>
  339. <tr>
  340. <td colspan="2"><div class='split'></div></td>
  341. </tr>
  342. <tr>
  343. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaulttemplate_logic_title"];?></b></td>
  344. <td>
  345. <p><?php echo $_lang["defaulttemplate_logic_general_message"];?></p>
  346. <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 />
  347. <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 />
  348. <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 />
  349. </td>
  350. </tr>
  351. <tr>
  352. <td colspan="2"><div class='split'></div></td>
  353. </tr>
  354. <tr>
  355. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaulttemplate_title"] ?></b></td>
  356. <td>
  357. <?php
  358. $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';
  359. $rs = mysql_query($sql);
  360. ?>
  361. <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">
  362. <?php
  363. $currentCategory = '';
  364. while ($row = mysql_fetch_assoc($rs)) {
  365. $thisCategory = $row['category'];
  366. if($thisCategory == null) {
  367. $thisCategory = $_lang["no_category"];
  368. }
  369. if($thisCategory != $currentCategory) {
  370. if($closeOptGroup) {
  371. echo "\t\t\t\t\t</optgroup>\n";
  372. }
  373. echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n";
  374. $closeOptGroup = true;
  375. } else {
  376. $closeOptGroup = false;
  377. }
  378. $selectedtext = $row['id'] == $default_template ? ' selected="selected"' : '';
  379. if ($selectedtext) {
  380. $oldTmpId = $row['id'];
  381. $oldTmpName = $row['templatename'];
  382. }
  383. echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n";
  384. $currentCategory = $thisCategory;
  385. }
  386. if($thisCategory != '') {
  387. echo "\t\t\t\t\t</optgroup>\n";
  388. }
  389. ?>
  390. </select>
  391. <br />
  392. <div id="template_reset_options_wrapper" style="display:none;">
  393. <input onchange="documentDirty=true;" type="radio" name="reset_template" value="1" /> <?php echo $_lang["template_reset_all"]; ?><br />
  394. <input onchange="documentDirty=true;" type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang["template_reset_specific"],$oldTmpName); ?>
  395. </div>
  396. <input type="hidden" name="old_template" value="<?php echo $oldTmpId; ?>" />
  397. </td>
  398. </tr>
  399. <tr>
  400. <td width="200">&nbsp;</td>
  401. <td class='comment'><?php echo $_lang["defaulttemplate_message"] ?></td>
  402. </tr>
  403. <tr>
  404. <td colspan="2"><div class='split'></div></td>
  405. </tr>
  406. <tr>
  407. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultpublish_title"] ?></b></td>
  408. <td> <input onchange="documentDirty=true;" type="radio" name="publish_default" value="1" <?php echo $publish_default=='1' ? 'checked="checked"' : "" ; ?> />
  409. <?php echo $_lang["yes"]?><br />
  410. <input onchange="documentDirty=true;" type="radio" name="publish_default" value="0" <?php echo ($publish_default=='0' || !isset($publish_default)) ? 'checked="checked"' : "" ; ?> />
  411. <?php echo $_lang["no"]?> </td>
  412. </tr>
  413. <tr>
  414. <td width="200">&nbsp;</td>
  415. <td class='comment'><?php echo $_lang["defaultpublish_message"] ?></td>
  416. </tr>
  417. <tr>
  418. <td colspan="2"><div class='split'></div></td>
  419. </tr>
  420. <tr>
  421. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultcache_title"] ?></b></td>
  422. <td> <input onchange="documentDirty=true;" type="radio" name="cache_default" value="1" <?php echo $cache_default=='1' ? 'checked="checked"' : "" ; ?> />
  423. <?php echo $_lang["yes"]?><br />
  424. <input onchange="documentDirty=true;" type="radio" name="cache_default" value="0" <?php echo ($cache_default=='0' || !isset($cache_default)) ? 'checked="checked"' : "" ; ?> />
  425. <?php echo $_lang["no"]?> </td>
  426. </tr>
  427. <tr>
  428. <td width="200">&nbsp;</td>
  429. <td class='comment'><?php echo $_lang["defaultcache_message"] ?></td>
  430. </tr>
  431. <tr>
  432. <td colspan="2"><div class='split'></div></td>
  433. </tr>
  434. <tr>
  435. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultsearch_title"] ?></b></td>
  436. <td> <input onchange="documentDirty=true;" type="radio" name="search_default" value="1" <?php echo $search_default=='1' ? 'checked="checked"' : "" ; ?> />
  437. <?php echo $_lang["yes"]?><br />
  438. <input onchange="documentDirty=true;" type="radio" name="search_default" value="0" <?php echo ($search_default=='0' || !isset($search_default)) ? 'checked="checked"' : "" ; ?> />
  439. <?php echo $_lang["no"]?> </td>
  440. </tr>
  441. <tr>
  442. <td width="200">&nbsp;</td>
  443. <td class='comment'><?php echo $_lang["defaultsearch_message"] ?></td>
  444. </tr>
  445. <tr>
  446. <td colspan="2"><div class='split'></div></td>
  447. </tr>
  448. <tr>
  449. <td nowrap class="warning" valign="top"><b><?php echo $_lang["defaultmenuindex_title"] ?></b></td>
  450. <td> <input onchange="documentDirty=true;" type="radio" name="auto_menuindex" value="1" <?php echo ($auto_menuindex=='1' || !isset($auto_menuindex)) ? 'checked="checked"' : "" ; ?> />
  451. <?php echo $_lang["yes"]?><br />
  452. <input onchange="documentDirty=true;" type="radio" name="auto_menuindex" value="0" <?php echo ($auto_menuindex=='0') ? 'checked="checked"' : "" ; ?> />
  453. <?php echo $_lang["no"]?> </td>
  454. </tr>
  455. <tr>
  456. <td width="200">&nbsp;</td>
  457. <td class='comment'><?php echo $_lang["defaultmenuindex_message"] ?></td>
  458. </tr>
  459. <tr>
  460. <td colspan="2"><div class='split'></div></td>
  461. </tr>
  462. <tr>
  463. <td nowrap class="warning" valign="top"><b><?php echo $_lang["custom_contenttype_title"] ?></b></td>
  464. <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 />
  465. <table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
  466. <select name="lst_custom_contenttype" style="width:200px;" size="5">
  467. <?php
  468. $custom_contenttype = (isset($custom_contenttype) ? $custom_contenttype : "text/css,text/html,text/javascript,text/plain,text/xml");
  469. $ct = explode(",",$custom_contenttype);
  470. for($i=0;$i<count($ct);$i++) {
  471. echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>";
  472. }
  473. ?>
  474. </select>
  475. <input name="custom_contenttype" type="hidden" value="<?php echo $custom_contenttype; ?>" />
  476. </td><td valign="top">&nbsp;<input name="removecontenttype" type="button" value="<?php echo $_lang["remove"]; ?>" onclick='removeContentType()' /></td></tr></table>
  477. </td>
  478. </tr>
  479. <tr>
  480. <td width="200">&nbsp;</td>
  481. <td class='comment'><?php echo $_lang["custom_contenttype_message"] ?></td>
  482. </tr>
  483. <tr>
  484. <td colspan="2"><div class='split'></div></td>
  485. <tr>
  486. <td nowrap class="warning"><b><?php echo $_lang["serveroffset_title"] ?></b></td>
  487. <td> <select name="server_offset_time" size="1" class="inputBox">
  488. <?php
  489. for($i=-24; $i<25; $i++) {
  490. $seconds = $i*60*60;
  491. $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ;
  492. ?>
  493. <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option>
  494. <?php
  495. }
  496. ?>
  497. </select> </td>
  498. </tr>
  499. <tr>
  500. <td width="200">&nbsp;</td>
  501. <td class='comment'><?php printf($_lang["serveroffset_message"], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></td>
  502. </tr>
  503. <tr>
  504. <td colspan="2"><div class='split'>&nbsp;</div></td>
  505. </tr>
  506. <tr>
  507. <td nowrap class="warning"><b><?php echo $_lang["server_protocol_title"] ?></b></td>
  508. <td> <input onchange="documentDirty=true;" type="radio" name="server_protocol" value="http" <?php echo ($server_protocol=='http' || !isset($server_protocol))? 'checked="checked"' : "" ; ?> />
  509. <?php echo $_lang["server_protocol_http"]?><br />
  510. <input onchange="documentDirty=true;" type="radio" name="server_protocol" value="https" <?php echo $server_protocol=='https' ? 'checked="checked"' : "" ; ?> />
  511. <?php echo $_lang["server_protocol_https"]?> </td>
  512. </tr>
  513. <tr>
  514. <td width="200">&nbsp;</td>
  515. <td class='comment'><?php echo $_lang["server_protocol_message"] ?></td>
  516. </tr>
  517. <tr>
  518. <td colspan="2"><div class='split'></div></td>
  519. </tr>
  520. <tr>
  521. <td nowrap class="warning"><b><?php echo $_lang["validate_referer_title"] ?></b></td>
  522. <td><input onchange="documentDirty=true;" type="radio" name="validate_referer" value="1" <?php echo ($validate_referer=='1' || !isset($validate_referer)) ? 'checked="checked"' : "" ; ?> />
  523. <?php echo $_lang["yes"]?><br />
  524. <input onchange="documentDirty=true;" type="radio" name="validate_referer" value="0" <?php echo $validate_referer=='0' ? 'checked="checked"' : "" ; ?> />
  525. <?php echo $_lang["no"]?> </td>
  526. </tr>
  527. <tr>
  528. <td width="200">&nbsp;</td>
  529. <td class='comment'><?php echo $_lang["validate_referer_message"] ?></td>
  530. </tr>
  531. <tr>
  532. <td colspan="2"><div class='split'></div></td>
  533. </tr>
  534. <tr>
  535. <td nowrap class="warning"><?php echo $_lang["rss_url_news_title"] ?></td>
  536. <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>
  537. </tr>
  538. <tr>
  539. <td width="200">&nbsp;</td>
  540. <td class='comment'><?php echo $_lang["rss_url_news_message"] ?></td>
  541. </tr>
  542. <tr>
  543. <td colspan="2"><div class='split'></div></td>
  544. </tr>
  545. <tr>
  546. <td nowrap class="warning"><?php echo $_lang["rss_url_security_title"] ?></td>
  547. <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>
  548. </tr>
  549. <tr>
  550. <td width="200">&nbsp;</td>
  551. <td class='comment'><?php echo $_lang["rss_url_security_message"] ?></td>
  552. </tr>
  553. <tr>
  554. <td colspan="2"><div class='split'></div></td>
  555. </tr>
  556. <tr class='row1'>
  557. <td colspan="2">
  558. <?php
  559. // invoke OnSiteSettingsRender event
  560. $evtOut = $modx->invokeEvent("OnSiteSettingsRender");
  561. if(is_array($evtOut)) echo implode("",$evtOut);
  562. ?>
  563. </td>
  564. </tr>
  565. </table>
  566. </div>
  567. <!-- Friendly URL settings -->
  568. <div class="tab-page" id="tabPage3">
  569. <h2 class="tab"><?php echo $_lang["settings_furls"] ?></h2>
  570. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage3" ) );</script>
  571. <table border="0" cellspacing="0" cellpadding="3">
  572. <tr>
  573. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurls_title"] ?></b></td>
  574. <td> <input onchange="documentDirty=true;" type="radio" name="friendly_urls" value="1" <?php echo $friendly_urls=='1' ? 'checked="checked"' : "" ; ?> onclick='showHide(/furlRow/, 1);' />
  575. <?php echo $_lang["yes"]?><br />
  576. <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);' />
  577. <?php echo $_lang["no"]?> </td>
  578. </tr>
  579. <tr>
  580. <td width="200">&nbsp;</td>
  581. <td class='comment'><?php echo $_lang["friendlyurls_message"] ?></td>
  582. </tr>
  583. <tr>
  584. <td colspan="2"><div class='split'></div></td>
  585. </tr>
  586. <tr id='furlRow1' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  587. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurlsprefix_title"] ?></b></td>
  588. <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>
  589. </tr>
  590. <tr id='furlRow2' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  591. <td width="200">&nbsp;</td>
  592. <td class='comment'><?php echo $_lang["friendlyurlsprefix_message"] ?></td>
  593. </tr>
  594. <tr id='furlRow3' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  595. <td colspan="2"><div class='split'></div></td>
  596. </tr>
  597. <tr id='furlRow4' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  598. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendlyurlsuffix_title"] ?></b></td>
  599. <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>
  600. </tr>
  601. <tr id='furlRow5' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  602. <td width="200">&nbsp;</td>
  603. <td class='comment'><?php echo $_lang["friendlyurlsuffix_message"] ?></td>
  604. </tr>
  605. <tr id='furlRow6' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  606. <td colspan="2"><div class='split'></div></td>
  607. </tr>
  608. <tr id='furlRow7' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  609. <td nowrap class="warning" valign="top"><b><?php echo $_lang["friendly_alias_title"] ?></b></td>
  610. <td> <input onchange="documentDirty=true;" type="radio" name="friendly_alias_urls" value="1" <?php echo $friendly_alias_urls=='1' ? 'checked="checked"' : "" ; ?> />
  611. <?php echo $_lang["yes"]?><br />
  612. <input onchange="documentDirty=true;" type="radio" name="friendly_alias_urls" value="0" <?php echo ($friendly_alias_urls=='0' || !isset($friendly_alias_urls)) ? 'checked="checked"' : "" ; ?> />
  613. <?php echo $_lang["no"]?> </td>
  614. </tr>
  615. <tr id='furlRow8' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  616. <td width="200">&nbsp;</td>
  617. <td class='comment'><?php echo $_lang["friendly_alias_message"] ?></td>
  618. </tr>
  619. <tr id='furlRow9' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  620. <td colspan="2"><div class='split'></div></td>
  621. </tr>
  622. <tr id='furlRow10' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  623. <td nowrap class="warning" valign="top"><b><?php echo $_lang["use_alias_path_title"] ?></b></td>
  624. <td> <input onchange="documentDirty=true;" type="radio" name="use_alias_path" value="1" <?php echo $use_alias_path=='1' ? 'checked="checked"' : "" ; ?> />
  625. <?php echo $_lang["yes"]?><br />
  626. <input onchange="documentDirty=true;" type="radio" name="use_alias_path" value="0" <?php echo ($use_alias_path=='0' || !isset($use_alias_path)) ? 'checked="checked"' : "" ; ?> />
  627. <?php echo $_lang["no"]?> </td>
  628. </tr>
  629. <tr id='furlRow11' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  630. <td width="200">&nbsp;</td>
  631. <td class='comment'><?php echo $_lang["use_alias_path_message"] ?></td>
  632. </tr>
  633. <tr id='furlRow12' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  634. <td colspan="2"><div class='split'></div></td>
  635. </tr>
  636. <tr id='furlRow16' class='row2' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  637. <td nowrap class="warning" valign="top"><b><?php echo $_lang["duplicate_alias_title"] ?></b></td>
  638. <td> <input onchange="documentDirty=true;" type="radio" name="allow_duplicate_alias" value="1" <?php echo $allow_duplicate_alias=='1' ? 'checked="checked"' : "" ; ?> />
  639. <?php echo $_lang["yes"]?><br />
  640. <input onchange="documentDirty=true;" type="radio" name="allow_duplicate_alias" value="0" <?php echo ($allow_duplicate_alias=='0' || !isset($allow_duplicate_alias)) ? 'checked="checked"' : "" ; ?> />
  641. <?php echo $_lang["no"]?> </td>
  642. </tr>
  643. <tr id='furlRow17' class='row2' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  644. <td width="200">&nbsp;</td>
  645. <td class='comment'><?php echo $_lang["duplicate_alias_message"] ?></td>
  646. </tr>
  647. <tr id='furlRow18' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  648. <td colspan="2"><div class='split'></div></td>
  649. </tr>
  650. <tr id='furlRow13' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  651. <td nowrap class="warning" valign="top"><b><?php echo $_lang["automatic_alias_title"] ?></b></td>
  652. <td> <input onchange="documentDirty=true;" type="radio" name="automatic_alias" value="1" <?php echo $automatic_alias=='1' ? 'checked="checked"' : "" ; ?> />
  653. <?php echo $_lang["yes"]?><br />
  654. <input onchange="documentDirty=true;" type="radio" name="automatic_alias" value="0" <?php echo ($automatic_alias=='0' || !isset($automatic_alias)) ? 'checked="checked"' : "" ; ?> />
  655. <?php echo $_lang["no"]?> </td>
  656. </tr>
  657. <tr id='furlRow14' class='row1' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  658. <td width="200">&nbsp;</td>
  659. <td class='comment'><?php echo $_lang["automatic_alias_message"] ?></td>
  660. </tr>
  661. <tr id='furlRow15' style="display: <?php echo $friendly_urls==1 ? $displayStyle : 'none' ; ?>">
  662. <td colspan="2"><div class='split'></div></td>
  663. </tr>
  664. <tr class='row1'>
  665. <td colspan="2">
  666. <?php
  667. // invoke OnFriendlyURLSettingsRender event
  668. $evtOut = $modx->invokeEvent("OnFriendlyURLSettingsRender");
  669. if(is_array($evtOut)) echo implode("",$evtOut);
  670. ?>
  671. </td>
  672. </tr>
  673. </table>
  674. </div>
  675. <!-- User settings -->
  676. <div class="tab-page" id="tabPage4">
  677. <h2 class="tab"><?php echo $_lang["settings_users"] ?></h2>
  678. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage4" ) );</script>
  679. <table border="0" cellspacing="0" cellpadding="3">
  680. <tr>
  681. <td nowrap class="warning"><b><?php echo $_lang["udperms_title"] ?></b></td>
  682. <td> <input onchange="documentDirty=true;" type="radio" name="use_udperms" value="1" <?php echo $use_udperms=='1' ? 'checked="checked"' : "" ; ?> onclick='showHide(/udPerms/, 1);' />
  683. <?php echo $_lang["yes"]?><br />
  684. <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);' />
  685. <?php echo $_lang["no"]?> </td>
  686. </tr>
  687. <tr>
  688. <td width="200">&nbsp;</td>
  689. <td class='comment'><?php echo $_lang["udperms_message"] ?></td>
  690. </tr>
  691. <tr>
  692. <td colspan="2"><div class='split'></div></td>
  693. </tr>
  694. <tr id='udPermsRow1' class='row1' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  695. <td nowrap class="warning"><b><?php echo $_lang["udperms_allowroot_title"] ?></b></td>
  696. <td> <input onchange="documentDirty=true;" type="radio" name="udperms_allowroot" value="1" <?php echo $udperms_allowroot=='1' ? 'checked="checked"' : "" ; ?> />
  697. <?php echo $_lang["yes"]?><br />
  698. <input onchange="documentDirty=true;" type="radio" name="udperms_allowroot" value="0" <?php echo ($udperms_allowroot=='0' || !isset($udperms_allowroot)) ? 'checked="checked"' : "" ; ?> />
  699. <?php echo $_lang["no"]?> </td>
  700. </tr>
  701. <tr id='udPermsRow2' class='row1' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  702. <td width="200">&nbsp;</td>
  703. <td class='comment'><?php echo $_lang["udperms_allowroot_message"] ?></td>
  704. </tr>
  705. <tr id='udPermsRow3' style="display: <?php echo $use_udperms==1 ? $displayStyle : 'none' ; ?>">
  706. <td colspan="2"><div class='split'></div></td>
  707. </tr>
  708. <tr>
  709. <td nowrap class="warning"><b><?php echo $_lang["failed_login_title"] ?></b></td>
  710. <td><input type="text" name="failed_login_attempts" style="width:50px" value="<?php echo isset($failed_login_attempts) ? $failed_login_attempts : "3" ; ?>" /></td>
  711. </tr>
  712. <tr>
  713. <td width="200">&nbsp;</td>
  714. <td class='comment'><?php echo $_lang["failed_login_message"] ?></td>
  715. </tr>
  716. <tr>
  717. <td colspan="2"><div class='split'></div></td>
  718. </tr>
  719. <tr>
  720. <td nowrap class="warning"><b><?php echo $_lang["blocked_minutes_title"] ?></b></td>
  721. <td><input type="text" name="blocked_minutes" style="width:100px" value="<?php echo isset($blocked_minutes) ? $blocked_minutes : "60" ; ?>" /></td>
  722. </tr>
  723. <tr>
  724. <td width="200">&nbsp;</td>
  725. <td class='comment'><?php echo $_lang["blocked_minutes_message"] ?></td>
  726. </tr>
  727. <tr>
  728. <td colspan="2"><div class='split'></div></td>
  729. </tr>
  730. <?php
  731. // Check for GD before allowing captcha to be enabled
  732. $gdAvailable = extension_loaded('gd');
  733. ?>
  734. <tr>
  735. <td nowrap class="warning"><b><?php echo $_lang["captcha_title"] ?></b></td>
  736. <td> <input onchange="documentDirty=true;" type="radio" name="use_captcha" value="1" <?php echo ($use_captcha=='1' && $gdAvailable) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> />
  737. <?php echo $_lang["yes"]?><br />
  738. <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"' : '';?> />
  739. <?php echo $_lang["no"]?> </td>
  740. </tr>
  741. <tr>
  742. <td width="200">&nbsp;</td>
  743. <td class='comment'><?php echo $_lang["captcha_message"] ?></td>
  744. </tr>
  745. <tr>
  746. <td colspan="2"><div class='split'></div></td>
  747. </tr>
  748. <tr>
  749. <td nowrap class="warning"><b><?php echo $_lang["captcha_words_title"] ?></b>
  750. <br />
  751. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  752. <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');">
  753. <?php echo get_lang_options('captcha_words_default');?>
  754. </select>
  755. </td>
  756. <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"] ; ?>" />
  757. <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang["captcha_words_default"]);?>" />
  758. </td>
  759. </tr>
  760. <tr>
  761. <td width="200">&nbsp;</td>
  762. <td class='comment'><?php echo $_lang["captcha_words_message"] ?></td>
  763. </tr>
  764. <tr>
  765. <td colspan="2"><div class='split'></div></td>
  766. </tr>
  767. <tr>
  768. <td nowrap class="warning"><b><?php echo $_lang["emailsender_title"] ?></b></td>
  769. <td ><input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="emailsender" value="<?php echo isset($emailsender) ? $emailsender : "you@example.com" ; ?>" /></td>
  770. </tr>
  771. <tr>
  772. <td width="200">&nbsp;</td>
  773. <td class='comment'><?php echo $_lang["emailsender_message"] ?></td>
  774. </tr>
  775. <tr>
  776. <td colspan="2"><div class='split'></div></td>
  777. </tr>
  778. <tr>
  779. <td nowrap class="warning"><b><?php echo $_lang["emailsubject_title"] ?></b>
  780. <br />
  781. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  782. <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
  783. <?php echo get_lang_options('emailsubject_default');?>
  784. </select>
  785. </td>
  786. <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"] ; ?>" />
  787. <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
  788. </td>
  789. </tr>
  790. <tr>
  791. <td width="200">&nbsp;</td>
  792. <td class='comment'><?php echo $_lang["emailsubject_message"] ?></td>
  793. </tr>
  794. <tr>
  795. <td colspan="2"><div class='split'></div></td>
  796. </tr>
  797. <tr>
  798. <td nowrap class="warning" valign="top"><b><?php echo $_lang["signupemail_title"] ?></b>
  799. <br />
  800. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  801. <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
  802. <?php echo get_lang_options('system_email_signup');?>
  803. </select>
  804. </td>
  805. <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>
  806. <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
  807. </td>
  808. </tr>
  809. <tr>
  810. <td width="200">&nbsp;</td>
  811. <td class='comment'><?php echo $_lang["signupemail_message"] ?></td>
  812. </tr>
  813. <tr>
  814. <td colspan="2"><div class='split'></div></td>
  815. </tr>
  816. <tr>
  817. <td nowrap class="warning" valign="top"><b><?php echo $_lang["websignupemail_title"] ?></b>
  818. <br />
  819. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  820. <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
  821. <?php echo get_lang_options('system_email_websignup');?>
  822. </select>
  823. </td>
  824. <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>
  825. <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
  826. </td>
  827. </tr>
  828. <tr>
  829. <td width="200">&nbsp;</td>
  830. <td class='comment'><?php echo $_lang["websignupemail_message"] ?></td>
  831. </tr>
  832. <tr>
  833. <td colspan="2"><div class='split'></div></td>
  834. </tr>
  835. <tr>
  836. <td nowrap class="warning" valign="top"><b><?php echo $_lang["webpwdreminder_title"] ?></b>
  837. <br />
  838. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  839. <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
  840. <?php echo get_lang_options('system_email_webreminder');?>
  841. </select>
  842. </td>
  843. <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>
  844. <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
  845. </td>
  846. </tr>
  847. <tr>
  848. <td width="200">&nbsp;</td>
  849. <td class='comment'><?php echo $_lang["webpwdreminder_message"] ?></td>
  850. </tr>
  851. <tr class='row1'>
  852. <td colspan="2">
  853. <?php
  854. // invoke OnUserSettingsRender event
  855. $evtOut = $modx->invokeEvent("OnUserSettingsRender");
  856. if(is_array($evtOut)) echo implode("",$evtOut);
  857. ?>
  858. </td>
  859. </tr>
  860. </table>
  861. </div>
  862. <!-- Interface & editor settings -->
  863. <div class="tab-page" id="tabPage5">
  864. <h2 class="tab"><?php echo $_lang["settings_ui"] ?></h2>
  865. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage5" ) );</script>
  866. <table border="0" cellspacing="0" cellpadding="3">
  867. <tr>
  868. <td nowrap class="warning"><b><?php echo $_lang["manager_theme"]?></b></td>
  869. <td> <select name="manager_theme" size="1" class="inputBox" onchange="documentDirty=true;document.forms['settings'].theme_refresher.value = Date.parse(new Date())">
  870. <?php
  871. $dir = dir("media/style/");
  872. while ($file = $dir->read()) {
  873. if($file!="." && $file!=".." && is_dir("media/style/$file") && substr($file,0,1) != '.') {
  874. $themename = $file;
  875. $selectedtext = $themename==$manager_theme ? "selected='selected'" : "" ;
  876. echo "<option value='$themename' $selectedtext>".ucwords(str_replace("_", " ", $themename))."</option>";
  877. }
  878. }
  879. $dir->close();
  880. ?>
  881. </select><input type="hidden" name="theme_refresher" value="" /></td>
  882. </tr>
  883. <tr>
  884. <td width="200">&nbsp;</td>
  885. <td class='comment'><?php echo $_lang["manager_theme_message"]?></td>
  886. </tr>
  887. <tr>
  888. <td colspan="2"><div class='split'></div></td>
  889. </tr>
  890. <tr>
  891. <td nowrap class="warning"><b><?php echo $_lang["warning_visibility"] ?></b></td>
  892. <td> <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="0" <?php echo $warning_visibility=='0' ? 'checked="checked"' : ""; ?> />
  893. <?php echo $_lang["administrators"]?><br />
  894. <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="1" <?php echo (!isset($warning_visibility) || $warning_visibility=='1') ? 'checked="checked"' : ""; ?> />
  895. <?php echo $_lang["everybody"]?></td>
  896. </tr>
  897. <tr>
  898. <td width="200">&nbsp;</td>
  899. <td class='comment'><?php echo $_lang["warning_visibility_message"]?></td>
  900. </tr>
  901. <tr>
  902. <td colspan="2"><div class='split'></div></td>
  903. </tr>
  904. <tr>
  905. <td nowrap class="warning"><b><?php echo $_lang["tree_page_click"] ?></b></td>
  906. <td> <input onchange="documentDirty=true;" type="radio" name="tree_page_click" value="27" <?php echo ($tree_page_click=='27' || !isset($tree_page_click)) ? 'checked="checked"' : ""; ?> />
  907. <?php echo $_lang["edit_resource"]?><br />
  908. <input onchange="documentDirty=true;" type="radio" name="tree_page_click" value="3" <?php echo ($tree_page_click=='3') ? 'checked="checked"' : ""; ?> />
  909. <?php echo $_lang["doc_data_title"]?></td>
  910. </tr>
  911. <tr>
  912. <td width="200">&nbsp;</td>
  913. <td class='comment'><?php echo $_lang["tree_page_click_message"]?></td>
  914. </tr>
  915. <tr>
  916. <td colspa

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