PageRenderTime 62ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/manager/actions/mutate_settings.dynamic.php

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

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