PageRenderTime 47ms CodeModel.GetById 23ms 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
  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 echo isset($captcha_words) ? $captcha_words : $_lang["captcha_words_default"] ; ?>" />
  918. <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang["captcha_words_default"]);?>" />
  919. </td>
  920. </tr>
  921. <tr>
  922. <td width="200">&nbsp;</td>
  923. <td class='comment'><?php echo $_lang["captcha_words_message"] ?></td>
  924. </tr>
  925. <tr>
  926. <td colspan="2"><div class='split'></div></td>
  927. </tr>
  928. <tr>
  929. <td nowrap class="warning"><?php echo $_lang["emailsender_title"] ?></td>
  930. <td ><input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="emailsender" value="<?php echo isset($emailsender) ? $emailsender : "you@example.com" ; ?>" /></td>
  931. </tr>
  932. <tr>
  933. <td width="200">&nbsp;</td>
  934. <td class='comment'><?php echo $_lang["emailsender_message"] ?></td>
  935. </tr>
  936. <!--for smtp-->
  937. <tr>
  938. <td colspan="2"><div class='split'></div></td>
  939. </tr>
  940. <tr>
  941. <td nowrap class="warning"><?php echo $_lang["email_method_title"] ?></td>
  942. <td>
  943. <?php echo wrap_label($_lang["email_method_mail"],form_radio('email_method','mail', ($email_method=='mail' || !isset($email_method)) ));?><br />
  944. <?php echo wrap_label($_lang["email_method_smtp"],form_radio('email_method','smtp', ($email_method=='smtp') ));?><br />
  945. </td>
  946. </tr>
  947. <tr>
  948. <td colspan="2"><div class="split"></div></td>
  949. </tr>
  950. <tr>
  951. <td nowrap class="warning"><?php echo $_lang["smtp_auth_title"] ?></td>
  952. <td>
  953. <?php echo wrap_label($_lang["yes"],form_radio('smtp_auth','1', ($smtp_auth=='1' || !isset($smtp_auth)) ));?><br />
  954. <?php echo wrap_label($_lang["no"],form_radio('smtp_auth','0', ($smtp_auth=='0') ));?><br />
  955. </td>
  956. </tr>
  957. <tr>
  958. <td colspan="2"><div class="split"></div></td>
  959. </tr>
  960. <tr>
  961. <td nowrap class="warning"><?php echo $_lang["smtp_secure_title"] ?></td>
  962. <td >
  963. <select name="smtp_secure" size="1" class="inputBox">
  964. <option value="none" ><?php echo $_lang["no"] ?></option>
  965. <option value="ssl" <?php if($smtp_secure == 'ssl') echo "selected='selected'"; ?> >SSL</option>
  966. <option value="tls" <?php if($smtp_secure == 'tls') echo "selected='selected'"; ?> >TLS</option>
  967. </select>
  968. <br />
  969. </td>
  970. </tr>
  971. <tr>
  972. <td colspan="2"><div class="split"></div></td>
  973. </tr>
  974. <tr>
  975. <td nowrap class="warning"><?php echo $_lang["smtp_host_title"] ?></td>
  976. <td ><input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="smtp_host" value="<?php echo isset($smtp_host) ? $smtp_host : "smtp.example.com" ; ?>" /></td>
  977. </tr>
  978. <tr>
  979. <td colspan="2"><div class="split"></div></td>
  980. </tr>
  981. <tr>
  982. <td nowrap class="warning"><?php echo $_lang["smtp_port_title"] ?></td>
  983. <td ><input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="smtp_port" value="<?php echo isset($smtp_port) ? $smtp_port : "25" ; ?>" /></td>
  984. </tr>
  985. <tr>
  986. <td colspan="2"><div class='split'></div></td>
  987. </tr>
  988. <tr>
  989. <td nowrap class="warning"><?php echo $_lang["smtp_username_title"] ?></td>
  990. <td ><input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="smtp_username" value="<?php echo isset($smtp_username) ? $smtp_username : $emailsender ; ?>" /></td>
  991. </tr>
  992. <tr>
  993. <td colspan="2"><div class="split"></div></td>
  994. </tr>
  995. <tr>
  996. <td nowrap class="warning"><?php echo $_lang["smtp_password_title"] ?></td>
  997. <td ><input onchange="documentDirty=true;" type="text" maxlength="255" style="width: 250px;" name="smtppw" value="********************" autocomplete="off" /></td>
  998. </tr>
  999. <tr>
  1000. <td colspan="2"><div class="split"></div></td>
  1001. </tr>
  1002. <tr>
  1003. <td nowrap class="warning"><?php echo $_lang["emailsubject_title"] ?>
  1004. <br />
  1005. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  1006. <select name="reload_emailsubject" id="reload_emailsubject_select" onchange="confirmLangChange(this, 'emailsubject_default', 'emailsubject_field');">
  1007. <?php echo get_lang_options('emailsubject_default');?>
  1008. </select>
  1009. </td>
  1010. <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"] ; ?>" />
  1011. <input type="hidden" name="emailsubject_default" id="emailsubject_default_hidden" value="<?php echo addslashes($_lang['emailsubject_default']);?>" />
  1012. </td>
  1013. </tr>
  1014. <tr>
  1015. <td width="200">&nbsp;</td>
  1016. <td class='comment'><?php echo $_lang["emailsubject_message"] ?></td>
  1017. </tr>
  1018. <tr>
  1019. <td colspan="2"><div class='split'></div></td>
  1020. </tr>
  1021. <tr>
  1022. <td nowrap class="warning" valign="top"><?php echo $_lang["signupemail_title"] ?>
  1023. <br />
  1024. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  1025. <select name="reload_signupemail_message" id="reload_signupemail_message_select" onchange="confirmLangChange(this, 'system_email_signup', 'signupemail_message_textarea');">
  1026. <?php echo get_lang_options('system_email_signup');?>
  1027. </select>
  1028. </td>
  1029. <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>
  1030. <input type="hidden" name="system_email_signup_default" id="system_email_signup_hidden" value="<?php echo addslashes($_lang['system_email_signup']);?>" />
  1031. </td>
  1032. </tr>
  1033. <tr>
  1034. <td width="200">&nbsp;</td>
  1035. <td class='comment'><?php echo $_lang["signupemail_message"] ?></td>
  1036. </tr>
  1037. <tr>
  1038. <td colspan="2"><div class='split'></div></td>
  1039. </tr>
  1040. <tr>
  1041. <td nowrap class="warning" valign="top"><?php echo $_lang["websignupemail_title"] ?>
  1042. <br />
  1043. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  1044. <select name="reload_websignupemail_message" id="reload_websignupemail_message_select" onchange="confirmLangChange(this, 'system_email_websignup', 'websignupemail_message_textarea');">
  1045. <?php echo get_lang_options('system_email_websignup');?>
  1046. </select>
  1047. </td>
  1048. <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>
  1049. <input type="hidden" name="system_email_websignup_default" id="system_email_websignup_hidden" value="<?php echo addslashes($_lang['system_email_websignup']);?>" />
  1050. </td>
  1051. </tr>
  1052. <tr>
  1053. <td width="200">&nbsp;</td>
  1054. <td class='comment'><?php echo $_lang["websignupemail_message"] ?></td>
  1055. </tr>
  1056. <tr>
  1057. <td colspan="2"><div class='split'></div></td>
  1058. </tr>
  1059. <tr>
  1060. <td nowrap class="warning" valign="top"><?php echo $_lang["webpwdreminder_title"] ?>
  1061. <br />
  1062. <p><?php echo $_lang["update_settings_from_language"]; ?></p>
  1063. <select name="reload_system_email_webreminder_message" id="reload_system_email_webreminder_select" onchange="confirmLangChange(this, 'system_email_webreminder', 'system_email_webreminder_textarea');">
  1064. <?php echo get_lang_options('system_email_webreminder');?>
  1065. </select>
  1066. </td>
  1067. <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>
  1068. <input type="hidden" name="system_email_webreminder_default" id="system_email_webreminder_hidden" value="<?php echo addslashes($_lang['system_email_webreminder']);?>" />
  1069. </td>
  1070. </tr>
  1071. <tr>
  1072. <td width="200">&nbsp;</td>
  1073. <td class='comment'><?php echo $_lang["webpwdreminder_message"] ?></td>
  1074. </tr>
  1075. <tr class='row1'>
  1076. <td colspan="2">
  1077. <?php
  1078. // invoke OnUserSettingsRender event
  1079. $evtOut = $modx->invokeEvent("OnUserSettingsRender");
  1080. if(is_array($evtOut)) echo implode("",$evtOut);
  1081. ?>
  1082. </td>
  1083. </tr>
  1084. </table>
  1085. </div>
  1086. <!-- Interface & editor settings -->
  1087. <div class="tab-page" id="tabPage5">
  1088. <h2 class="tab"><?php echo $_lang["settings_ui"] ?></h2>
  1089. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage5" ) );</script>
  1090. <table border="0" cellspacing="0" cellpadding="3">
  1091. <tr>
  1092. <td nowrap class="warning"><?php echo $_lang["manager_theme"]?></td>
  1093. <td> <select name="manager_theme" size="1" class="inputBox" onchange="documentDirty=true;document.forms['settings'].theme_refresher.value = Date.parse(new Date())">
  1094. <?php
  1095. $dir = dir("media/style/");
  1096. while ($file = $dir->read()) {
  1097. if($file!="." && $file!=".." && is_dir("media/style/$file") && substr($file,0,1) != '.') {
  1098. if($file==='common') continue;
  1099. $themename = $file;
  1100. $selectedtext = $themename==$manager_theme ? "selected='selected'" : "" ;
  1101. echo "<option value='$themename' $selectedtext>".ucwords(str_replace("_", " ", $themename))."</option>";
  1102. }
  1103. }
  1104. $dir->close();
  1105. ?>
  1106. </select><input type="hidden" name="theme_refresher" value="" /></td>
  1107. </tr>
  1108. <tr>
  1109. <td width="200">&nbsp;</td>
  1110. <td class='comment'><?php echo $_lang["manager_theme_message"]?></td>
  1111. </tr>
  1112. <tr>
  1113. <td colspan="2"><div class='split'></div></td>
  1114. </tr>
  1115. <tr>
  1116. <td nowrap class="warning"><?php echo $_lang["warning_visibility"] ?></td>
  1117. <td> <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="0" <?php echo $warning_visibility=='0' ? 'checked="checked"' : ""; ?> />
  1118. <?php echo $_lang["administrators"]?><br />
  1119. <input onchange="documentDirty=true;" type="radio" name="warning_visibility" value="1" <?php echo (!isset($warning_visibility) || $warning_visibility=='1') ? 'checked="checked"' : ""; ?> />
  1120. <?php echo $_lang["everybody"]?></td>
  1121. </tr>
  1122. <tr>
  1123. <td width="200">&nbsp;</td>
  1124. <td class='comment'><?php echo $_lang["warning_visibility_message"]?></td>
  1125. </tr>
  1126. <tr>
  1127. <td colspan="2"><div class='split'></div></td>
  1128. </tr>
  1129. <tr>
  1130. <td nowrap class="warning"><?php echo $_lang["tree_page_click"] ?></td>
  1131. <td> <input onchange="documentDirty=true;" type="radio" name="tree_page_click" value="27" <?php echo $tree_page_click=='27' ? 'checked="checked"' : ""; ?> />
  1132. <?php echo $_lang["edit_resource"]?><br />
  1133. <input onchange="documentDirty=true;" type="radio" name="tree_page_click" value="3" <?php echo ($tree_page_click=='3' || !isset($tree_page_click)) ? 'checked="checked"' : ""; ?> />
  1134. <?php echo $_lang["doc_data_title"]?></td>
  1135. </tr>
  1136. <tr>
  1137. <td width="200">&nbsp;</td>
  1138. <td class='comment'><?php echo $_lang["tree_page_click_message"]?></td>
  1139. </tr>
  1140. <tr>
  1141. <td colspan="2"><div class='split'></div></td>
  1142. </tr>
  1143. <tr>
  1144. <td nowrap class="warning"><?php echo $_lang["remember_last_tab"] ?></td>
  1145. <td> <input onchange="documentDirty=true;" type="radio" name="remember_last_tab" value="1" <?php echo $remember_last_tab=='1' ? 'checked="checked"' : ""; ?> />
  1146. <?php echo $_lang["yes"]?><br />
  1147. <input onchange="documentDirty=true;" type="radio" name="remember_last_tab" value="0" <?php echo (!isset($remember_last_tab) || $remember_last_tab=='0') ? 'checked="checked"' : ""; ?> />
  1148. <?php echo $_lang["no"]?></td>
  1149. </tr>
  1150. <tr>
  1151. <td width="200">&nbsp;</td>
  1152. <td class='comment'><?php echo $_lang["remember_last_tab_message"]?></td>
  1153. </tr>
  1154. <tr>
  1155. <td colspan="2"><div class='split'></div></td>
  1156. </tr>
  1157. <?php
  1158. if(!isset($resource_tree_node_name)) $resource_tree_node_name = 'pagetitle';
  1159. ?>
  1160. <tr>
  1161. <th><?php echo $_lang["setting_resource_tree_node_name"] ?></th>
  1162. <td>
  1163. <select name="resource_tree_node_name" size="1" class="inputBox">
  1164. <?php
  1165. $tpl = '<option value="[+value+]" [+selected+]>[*[+value+]*]</option>' . "\n";
  1166. $option = array('pagetitle','menutitle','alias','createdon','editedon','publishedon');
  1167. $output = array();
  1168. foreach($option as $v)
  1169. {
  1170. $selected = ($v==$resource_tree_node_name) ? 'selected' : '';
  1171. $s = array('[+value+]','[+selected+]');
  1172. $r = array($v,$selected);
  1173. $output[] = str_replace($s,$r,$tpl);
  1174. }
  1175. echo implode("\n",$output)
  1176. ?>
  1177. </select><br />
  1178. </td>
  1179. </tr>
  1180. <tr class='row1' >
  1181. <td width="200">&nbsp;</td>
  1182. <td class='comment'> <?php echo $_lang["setting_resource_tree_node_name_desc"]?></td>
  1183. </tr>
  1184. <tr>
  1185. <td colspan="2"><div class='split'></div></td>
  1186. </tr>
  1187. <tr>
  1188. <td nowrap class="warning"><?php echo $_lang["tree_show_protected"] ?></td>
  1189. <td> <input onchange="documentDirty=true;" type="radio" name="tree_show_protected" value="1" <?php echo (!isset($tree_show_protected) || $tree_show_protected=='0') ? '' : 'checked="checked" '; ?>/>
  1190. <?php echo $_lang["yes"]?><br />
  1191. <input onchange="documentDirty=true;" type="radio" name="tree_show_protected" value="0" <?php echo (!isset($tree_show_protected) || $tree_show_protected=='0') ? 'checked="checked" ' : ''; ?>/>
  1192. <?php echo $_lang["no"]?></td>
  1193. </tr>
  1194. <tr>
  1195. <td width="200">&nbsp;</td>
  1196. <td class='comment'><?php echo $_lang["tree_show_protected_message"]?></td>
  1197. </tr>
  1198. <tr>
  1199. <td colspan="2"><div class='split'></div></td>
  1200. </tr>
  1201. <tr>
  1202. <td nowrap class="warning"><?php echo $_lang["show_meta"] ?></td>
  1203. <td> <input onchange="documentDirty=true;" type="radio" name="show_meta" value="1" <?php echo $show_meta=='1' ? 'checked="checked"' : ""; ?> />
  1204. <?php echo $_lang["yes"]?><br />
  1205. <input onchange="documentDirty=true;" type="radio" name="show_meta" value="0" <?php echo ($show_meta=='0' || !isset($show_meta)) ? 'checked="checked"' : ""; ?> />
  1206. <?php echo $_lang["no"]?></td>
  1207. </tr>
  1208. <tr>
  1209. <td width="200">&nbsp;</td>
  1210. <td class='comment'><?php echo $_lang["show_meta_message"]?></td>
  1211. </tr>
  1212. <tr>
  1213. <td colspan="2"><div class='split'></div></td>
  1214. </tr>
  1215. <tr>
  1216. <td nowrap class="warning"><?php echo $_lang["datepicker_offset"] ?></td>
  1217. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="datepicker_offset" value="<?php echo isset($datepicker_offset) ? $datepicker_offset : '-10' ; ?>" /></td>
  1218. </tr>
  1219. <tr>
  1220. <td width="200">&nbsp;</td>
  1221. <td class='comment'><?php echo $_lang["datepicker_offset_message"]?></td>
  1222. </tr>
  1223. <tr>
  1224. <td colspan="2"><div class='split'></div></td>
  1225. </tr>
  1226. <tr>
  1227. <td nowrap class="warning"><?php echo $_lang["datetime_format"]?></td>
  1228. <td> <select name="datetime_format" size="1" class="inputBox">
  1229. <?php
  1230. $datetime_format_list = array('dd-mm-YYYY', 'mm/dd/YYYY', 'YYYY/mm/dd');
  1231. $str = '';
  1232. foreach($datetime_format_list as $value)
  1233. {
  1234. $selectedtext = ($datetime_format == $value) ? ' selected' : '';
  1235. $str .= '<option value="' . $value . '"' . $selectedtext . '>';
  1236. $str .= $value . '</option>' . PHP_EOL;
  1237. }
  1238. echo $str;
  1239. ?>
  1240. </select></td>
  1241. </tr>
  1242. <tr>
  1243. <td width="200">&nbsp;</td>
  1244. <td class='comment'><?php echo $_lang["datetime_format_message"]?></td>
  1245. </tr>
  1246. <tr>
  1247. <td colspan="2"><div class='split'></div></td>
  1248. </tr>
  1249. <tr>
  1250. <td nowrap class="warning"><?php echo $_lang["nologentries_title"]?></td>
  1251. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="number_of_logs" value="<?php echo isset($number_of_logs) ? $number_of_logs : 100 ; ?>" /></td>
  1252. </tr>
  1253. <tr>
  1254. <td width="200">&nbsp;</td>
  1255. <td class='comment'><?php echo $_lang["nologentries_message"]?></td>
  1256. </tr>
  1257. <tr>
  1258. <td colspan="2"><div class='split'></div></td>
  1259. </tr>
  1260. <tr>
  1261. <td nowrap class="warning"><?php echo $_lang["mail_check_timeperiod_title"] ?></td>
  1262. <td><input type="text" name="mail_check_timeperiod" onchange="documentDirty=true;" size="5" value="<?php echo isset($mail_check_timeperiod) ? $mail_check_timeperiod : "60" ; ?>" /></td>
  1263. </tr>
  1264. <tr>
  1265. <td width="200">&nbsp;</td>
  1266. <td class='comment'><?php echo $_lang["mail_check_timeperiod_message"] ?></td>
  1267. </tr>
  1268. <tr>
  1269. <td colspan="2"><div class='split'></div></td>
  1270. </tr>
  1271. <tr>
  1272. <td nowrap class="warning"><?php echo $_lang["nomessages_title"]?></td>
  1273. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="number_of_messages" value="<?php echo isset($number_of_messages) ? $number_of_messages : 30 ; ?>" /></td>
  1274. </tr>
  1275. <tr>
  1276. <td width="200">&nbsp;</td>
  1277. <td class='comment'><?php echo $_lang["nomessages_message"]?></td>
  1278. </tr>
  1279. <tr>
  1280. <td colspan="2"><div class='split'></div></td>
  1281. </tr>
  1282. <tr>
  1283. <td nowrap class="warning"><?php echo $_lang["noresults_title"]?></td>
  1284. <td><input onchange="documentDirty=true;" type='text' maxlength='50' size="5" name="number_of_results" value="<?php echo isset($number_of_results) ? $number_of_results : 30 ; ?>" /></td>
  1285. </tr>
  1286. <tr>
  1287. <td width="200">&nbsp;</td>
  1288. <td class='comment'><?php echo $_lang["noresults_message"]?></td>
  1289. </tr>
  1290. <tr>
  1291. <td colspan="2"><div class='split'></div></td>
  1292. </tr>
  1293. <tr>
  1294. <td nowrap class="warning"><?php echo $_lang["use_editor_title"]?></td>
  1295. <td> <input onchange="documentDirty=true;" type="radio" name="use_editor" value="1" <?php echo ($use_editor=='1' || !isset($use_editor)) ? 'checked="checked"' : "" ; ?> onclick="showHide(/editorRow/, 1); checkCustomIcons();" />
  1296. <?php echo $_lang["yes"]?><br />
  1297. <input onchange="documentDirty=true;" type="radio" name="use_editor" value="0" <?php echo $use_editor=='0' ? 'checked="checked"' : "" ; ?> onclick="showHide(/editorRow/, 0);" />
  1298. <?php echo $_lang["no"]?> </td>
  1299. </tr>
  1300. <tr>
  1301. <td width="200">&nbsp;</td>
  1302. <td class='comment'><?php echo $_lang["use_editor_message"]?></td>
  1303. </tr>
  1304. <tr>
  1305. <td colspan="2"><div class='split'></div></td>
  1306. </tr>
  1307. <?php if(!isset($use_editor)) $use_editor=1; ?>
  1308. <tr id='editorRow0' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1309. <td nowrap class="warning"><?php echo $_lang["which_editor_title"]?></td>
  1310. <td>
  1311. <select name="which_editor" onchange="documentDirty=true;">
  1312. <?php
  1313. // invoke OnRichTextEditorRegister event
  1314. $evtOut = $modx->invokeEvent("OnRichTextEditorRegister");
  1315. echo "<option value='none'".($which_editor=='none' ? " selected='selected'" : "").">".$_lang["none"]."</option>\n";
  1316. if(is_array($evtOut)) for($i=0;$i<count($evtOut);$i++) {
  1317. $editor = $evtOut[$i];
  1318. echo "<option value='$editor'".($which_editor==$editor ? " selected='selected'" : "").">$editor</option>\n";
  1319. }
  1320. ?>
  1321. </select>
  1322. </td>
  1323. </tr>
  1324. <tr id='editorRow1' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1325. <td width="200">&nbsp;</td>
  1326. <td class='comment'><?php echo $_lang["which_editor_message"]?></td>
  1327. </tr>
  1328. <tr id='editorRow3' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1329. <td colspan="2"><div class='split'></div></td>
  1330. </tr>
  1331. <tr id='editorRow4' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1332. <td nowrap class="warning"><?php echo $_lang["fe_editor_lang_title"]?></td>
  1333. <td> <select name="fe_editor_lang" size="1" class="inputBox" onchange="documentDirty=true;">
  1334. <?php echo get_lang_options(null, $fe_editor_lang);?>
  1335. </select> </td>
  1336. </tr>
  1337. <tr id='editorRow5' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1338. <td width="200">&nbsp;</td>
  1339. <td class='comment'><?php echo $_lang["fe_editor_lang_message"]?></td>
  1340. </tr>
  1341. <tr id='editorRow2' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1342. <td colspan="2"><div class='split'></div></td>
  1343. </tr>
  1344. <tr id='editorRow14' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1345. <td nowrap class="warning"><?php echo $_lang["editor_css_path_title"]?></td>
  1346. <td><input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="editor_css_path" value="<?php echo isset($editor_css_path) ? $editor_css_path : "" ; ?>" />
  1347. </td>
  1348. </tr>
  1349. <tr id='editorRow15' class='' style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1350. <td width="200">&nbsp;</td>
  1351. <td class='comment'><?php echo $_lang["editor_css_path_message"]?></td>
  1352. </tr>
  1353. <tr id='editorRow16' class="" style="display: <?php echo $use_editor==1 ? $displayStyle : 'none' ; ?>">
  1354. <td colspan="2"><div class='split'></div></td>
  1355. </tr>
  1356. <tr class='row1'>
  1357. <td colspan="2">
  1358. <?php
  1359. // invoke OnInterfaceSettingsRender event
  1360. $evtOut = $modx->invokeEvent("OnInterfaceSettingsRender");
  1361. if(is_array($evtOut)) echo implode("",$evtOut);
  1362. ?>
  1363. </td>
  1364. </tr>
  1365. </table>
  1366. </div>
  1367. <!-- Miscellaneous settings -->
  1368. <div class="tab-page" id="tabPage7">
  1369. <h2 class="tab"><?php echo $_lang["settings_misc"] ?></h2>
  1370. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage7" ) );</script>
  1371. <table border="0" cellspacing="0" cellpadding="3">
  1372. <tr>
  1373. <td nowrap class="warning"><?php echo $_lang["filemanager_path_title"]?></td>
  1374. <td>
  1375. <?php echo $_lang['default']; ?> <span id="default_filemanager_path">[(base_path)]</span><br />
  1376. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="filemanager_path" id="filemanager_path" value="<?php echo isset($filemanager_path) ? $filemanager_path : '[(base_path)]'; ?>" /> <input type="button" onclick="reset_path('filemanager_path');" value="<?php echo $_lang["reset"]; ?>" name="reset_filemanager_path">
  1377. </td>
  1378. </tr>
  1379. <tr>
  1380. <td width="200">&nbsp;</td>
  1381. <td class='comment'><?php echo $_lang["filemanager_path_message"]?></td>
  1382. </tr>
  1383. <tr>
  1384. <td colspan="2"><div class='split'></div></td>
  1385. </tr>
  1386. <tr>
  1387. <td nowrap class="warning"><?php echo $_lang["uploadable_files_title"]?></td>
  1388. <td>
  1389. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="upload_files" value="<?php echo isset($upload_files) ? $upload_files : "txt,php,html,htm,xml,js,css,cache,zip,gz,rar,z,tgz,tar,htaccess,pdf" ; ?>" />
  1390. </td>
  1391. </tr>
  1392. <tr>
  1393. <td width="200">&nbsp;</td>
  1394. <td class='comment'><?php echo $_lang["uploadable_files_message"]?></td>
  1395. </tr>
  1396. <tr>
  1397. <td colspan="2"><div class='split'></div></td>
  1398. </tr>
  1399. <tr>
  1400. <td nowrap class="warning"><?php echo $_lang["uploadable_images_title"]?></td>
  1401. <td>
  1402. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="upload_images" value="<?php echo isset($upload_images) ? $upload_images : "jpg,gif,png,ico,bmp,psd" ; ?>" />
  1403. </td>
  1404. </tr>
  1405. <tr>
  1406. <td width="200">&nbsp;</td>
  1407. <td class='comment'><?php echo $_lang["uploadable_images_message"]?></td>
  1408. </tr>
  1409. <tr>
  1410. <td colspan="2"><div class='split'></div></td>
  1411. </tr>
  1412. <tr>
  1413. <td nowrap class="warning"><?php echo $_lang["uploadable_media_title"]?></td>
  1414. <td>
  1415. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="upload_media" value="<?php echo isset($upload_media) ? $upload_media : "mp3,wav,au,wmv,avi,mpg,mpeg" ; ?>" />
  1416. </td>
  1417. </tr>
  1418. <tr>
  1419. <td width="200">&nbsp;</td>
  1420. <td class='comment'><?php echo $_lang["uploadable_media_message"]?></td>
  1421. </tr>
  1422. <tr>
  1423. <td colspan="2"><div class='split'></div></td>
  1424. </tr>
  1425. <tr>
  1426. <td nowrap class="warning"><?php echo $_lang["uploadable_flash_title"]?></td>
  1427. <td>
  1428. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="upload_flash" value="<?php echo isset($upload_flash) ? $upload_flash : "swf,fla" ; ?>" />
  1429. </td>
  1430. </tr>
  1431. <tr>
  1432. <td width="200">&nbsp;</td>
  1433. <td class='comment'><?php echo $_lang["uploadable_flash_message"]?></td>
  1434. </tr>
  1435. <tr>
  1436. <td colspan="2"><div class='split'></div></td>
  1437. </tr>
  1438. <tr>
  1439. <td nowrap class="warning"><?php echo $_lang["upload_maxsize_title"]?></td>
  1440. <td>
  1441. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="upload_maxsize" value="<?php echo isset($upload_maxsize) ? $upload_maxsize : "1048576" ; ?>" />
  1442. </td>
  1443. </tr>
  1444. <tr>
  1445. <td width="200">&nbsp;</td>
  1446. <td class='comment'><?php echo $_lang["upload_maxsize_message"]?></td>
  1447. </tr>
  1448. <tr>
  1449. <td colspan="2"><div class='split'></div></td>
  1450. </tr>
  1451. <tr>
  1452. <td nowrap class="warning"><?php echo $_lang["new_file_permissions_title"]?></td>
  1453. <td>
  1454. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="new_file_permissions" value="<?php echo isset($new_file_permissions) ? $new_file_permissions : "0644" ; ?>" />
  1455. </td>
  1456. </tr>
  1457. <tr>
  1458. <td width="200">&nbsp;</td>
  1459. <td class='comment'><?php echo $_lang["new_file_permissions_message"]?></td>
  1460. </tr>
  1461. <tr>
  1462. <td colspan="2"><div class='split'></div></td>
  1463. </tr>
  1464. <tr>
  1465. <td nowrap class="warning"><?php echo $_lang["new_folder_permissions_title"]?></td>
  1466. <td>
  1467. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="new_folder_permissions" value="<?php echo isset($new_folder_permissions) ? $new_folder_permissions : "0755" ; ?>" />
  1468. </td>
  1469. </tr>
  1470. <tr>
  1471. <td width="200">&nbsp;</td>
  1472. <td class='comment'><?php echo $_lang["new_folder_permissions_message"]?></td>
  1473. </tr>
  1474. <tr>
  1475. <td colspan="2"><div class='split'></div></td>
  1476. <tr class='row1'>
  1477. <td colspan="2">
  1478. </td>
  1479. </tr>
  1480. </table>
  1481. </div>
  1482. <!-- KCFinder settings -->
  1483. <div class="tab-page" id="tabPage8">
  1484. <h2 class="tab"><?php echo $_lang["settings_KC"] ?></h2>
  1485. <script type="text/javascript">tpSettings.addTabPage( document.getElementById( "tabPage8" ) );</script>
  1486. <table border="0" cellspacing="0" cellpadding="3">
  1487. <tr>
  1488. <td nowrap class="warning"><?php echo $_lang["rb_title"]?></td>
  1489. <td> <input onchange="documentDirty=true;" type="radio" name="use_browser" value="1" <?php echo ($use_browser=='1' || !isset($use_browser)) ? 'checked="checked"' : "" ; ?> onclick="showHide(/rbRow/, 1);" />
  1490. <?php echo $_lang["yes"]?><br />
  1491. <input onchange="documentDirty=true;" type="radio" name="use_browser" value="0" <?php echo $use_browser=='0' ? 'checked="checked"' : "" ; ?> onclick="showHide(/rbRow/, 0);" />
  1492. <?php echo $_lang["no"]?> </td>
  1493. </tr>
  1494. <tr>
  1495. <td width="200">&nbsp;</td>
  1496. <td class='comment'><?php echo $_lang["rb_message"]?></td>
  1497. </tr>
  1498. <tr>
  1499. <td colspan="2"><div class='split'></div></td>
  1500. </tr>
  1501. <?php if(!isset($use_browser)) $use_browser=1; ?>
  1502. <tr id='rbRow1' class="" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1503. <td nowrap class="warning"><?php echo $_lang["rb_webuser_title"]?></td>
  1504. <td><input onchange="documentDirty=true;" type="radio" name="rb_webuser" value="1" <?php echo $rb_webuser=='1' ? 'checked="checked"' : "" ; ?> />
  1505. <?php echo $_lang["yes"]?><br />
  1506. <input onchange="documentDirty=true;" type="radio" name="rb_webuser" value="0" <?php echo ($rb_webuser=='0' || !isset($rb_webuser)) ? 'checked="checked"' : "" ; ?> />
  1507. <?php echo $_lang["no"]?> </td>
  1508. </tr>
  1509. <tr id='rbRow2' class="" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1510. <td width="200">&nbsp;</td>
  1511. <td class="comment"><?php echo $_lang["rb_webuser_message"]?></td>
  1512. </tr>
  1513. <tr id='rbRow3' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1514. <td colspan="2"><div class='split'></div></td>
  1515. </tr>
  1516. <tr id='rbRow4' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1517. <td nowrap class="warning"><?php echo $_lang["rb_base_dir_title"]?></td>
  1518. <td>
  1519. <?php echo $_lang['default']; ?> <span id="default_rb_base_dir">[(base_path)]assets/</span><br />
  1520. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="rb_base_dir" id="rb_base_dir" value="<?php echo (isset($rb_base_dir)) ? $rb_base_dir : '[(base_path)]assets/' ; ?>" /> <input type="button" onclick="reset_path('rb_base_dir');" value="<?php echo $_lang["reset"]; ?>" name="reset_rb_base_dir">
  1521. </td>
  1522. </tr>
  1523. <tr id='rbRow5' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1524. <td width="200">&nbsp;</td>
  1525. <td class='comment'><?php echo $_lang["rb_base_dir_message"]?></td>
  1526. </tr>
  1527. <tr id='rbRow6' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1528. <td colspan="2"><div class='split'></div></td>
  1529. </tr>
  1530. <tr id='rbRow7' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1531. <td nowrap class="warning"><?php echo $_lang["rb_base_url_title"]?></td>
  1532. <td> <?php
  1533. function getResourceBaseUrl() {
  1534. global $site_url;
  1535. return $site_url . "assets/";
  1536. }
  1537. ?>
  1538. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="rb_base_url" value="<?php echo isset($rb_base_url) ? $rb_base_url : getResourceBaseUrl() ; ?>" />
  1539. </td>
  1540. </tr>
  1541. <tr id='rbRow8' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1542. <td width="200">&nbsp;</td>
  1543. <td class='comment'><?php echo $_lang["rb_base_url_message"]?></td>
  1544. </tr>
  1545. <tr id='rbRow9' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1546. <td colspan="2"><div class='split'></div></td>
  1547. </tr>
  1548. <tr id='rbRow172' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1549. <td nowrap class="warning"><?php echo $_lang["clean_uploaded_filename"]?></td>
  1550. <td> <input onchange="documentDirty=true;" type="radio" name="clean_uploaded_filename" value="1" <?php echo $clean_uploaded_filename=='1' ? 'checked="checked"' : "" ; ?> />
  1551. <?php echo $_lang["yes"]?><br />
  1552. <input onchange="documentDirty=true;" type="radio" name="clean_uploaded_filename" value="0" <?php echo ($clean_uploaded_filename=='0' || !isset($clean_uploaded_filename)) ? 'checked="checked"' : "" ; ?> />
  1553. <?php echo $_lang["no"]?> </td>
  1554. </tr>
  1555. <tr id='rbRow17' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1556. <td width="200">&nbsp;</td>
  1557. <td class='comment'><?php echo $_lang["clean_uploaded_filename_message"];?></td>
  1558. </tr>
  1559. <tr id='rbRow18' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1560. <td colspan="2"><div class='split'></div></td>
  1561. </tr>
  1562. <tr id='rbRow19' class='' style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1563. <td nowrap class="warning"><?php echo $_lang["settings_strip_image_paths_title"]?></td>
  1564. <td><input onchange="documentDirty=true;" type="radio" name="strip_image_paths" value="1" <?php echo $strip_image_paths=='1' ? 'checked="checked"' : "" ; ?> />
  1565. <?php echo $_lang["yes"]?><br />
  1566. <input onchange="documentDirty=true;" type="radio" name="strip_image_paths" value="0" <?php echo ($strip_image_paths=='0' || !isset($strip_image_paths)) ? 'checked="checked"' : "" ; ?> />
  1567. <?php echo $_lang["no"]?> </td>
  1568. </tr>
  1569. <tr id="rbRow20" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1570. <td width="200">&nbsp;</td>
  1571. <td class="comment"><?php echo $_lang["settings_strip_image_paths_message"]?></td>
  1572. </tr>
  1573. <tr id="rbRow21" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1574. <td colspan="2"><div class='split'></div></td>
  1575. </tr>
  1576. <tr id="rbRow22" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1577. <td nowrap class="warning"><?php echo $_lang["maxImageWidth"]?></td>
  1578. <td>
  1579. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="maxImageWidth" value="<?php echo isset($maxImageWidth) ? $maxImageWidth : "1600" ; ?>" />
  1580. </td>
  1581. </tr>
  1582. <tr id="rbRow23" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1583. <td width="200">&nbsp;</td>
  1584. <td class='comment'><?php echo $_lang["maxImageWidth_message"]?></td>
  1585. </tr>
  1586. <tr id="rbRow24" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1587. <td colspan="2"><div class='split'></div></td>
  1588. </tr>
  1589. <tr id="rbRow25" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1590. <td nowrap class="warning"><?php echo $_lang["maxImageHeight"]?></td>
  1591. <td>
  1592. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="maxImageHeight" value="<?php echo isset($maxImageHeight) ? $maxImageHeight : "1200" ; ?>" />
  1593. </td>
  1594. </tr>
  1595. <tr id="rbRow26" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1596. <td width="200">&nbsp;</td>
  1597. <td class='comment'><?php echo $_lang["maxImageHeight_message"]?></td>
  1598. </tr>
  1599. <tr id="rbRow27" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1600. <td colspan="2"><div class='split'></div></td>
  1601. </tr>
  1602. <tr id="rbRow28" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1603. <td nowrap class="warning"><?php echo $_lang["thumbWidth"]?></td>
  1604. <td>
  1605. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="thumbWidth" value="<?php echo isset($thumbWidth) ? $thumbWidth : "150" ; ?>" />
  1606. </td>
  1607. </tr>
  1608. <tr id="rbRow29" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1609. <td width="200">&nbsp;</td>
  1610. <td class='comment'><?php echo $_lang["thumbWidth_message"]?></td>
  1611. </tr>
  1612. <tr id="rbRow30" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1613. <td colspan="2"><div class='split'></div></td>
  1614. </tr>
  1615. <tr id="rbRow31" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1616. <td nowrap class="warning"><?php echo $_lang["thumbHeight"]?></td>
  1617. <td>
  1618. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="thumbHeight" value="<?php echo isset($thumbHeight) ? $thumbHeight : "150" ; ?>" />
  1619. </td>
  1620. </tr>
  1621. <tr id="rbRow32" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1622. <td width="200">&nbsp;</td>
  1623. <td class='comment'><?php echo $_lang["thumbHeight_message"]?></td>
  1624. </tr>
  1625. <tr id="rbRow33" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1626. <td colspan="2"><div class='split'></div></td>
  1627. </tr>
  1628. <tr id="rbRow34" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1629. <td nowrap class="warning"><?php echo $_lang["thumbsDir"]?></td>
  1630. <td>
  1631. <input onchange="documentDirty=true;" type='text' maxlength='255' style="width: 250px;" name="thumbsDir" value="<?php echo isset($thumbsDir) ? $thumbsDir : ".thumbs" ; ?>" />
  1632. </td>
  1633. </tr>
  1634. <tr id="rbRow35" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1635. <td width="200">&nbsp;</td>
  1636. <td class='comment'><?php echo $_lang["thumbsDir_message"]?></td>
  1637. </tr>
  1638. <tr id="rbRow36" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1639. <td colspan="2"><div class='split'></div></td>
  1640. </tr>
  1641. <tr id="rbRow37" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1642. <td nowrap class="warning"><?php echo $_lang["jpegQuality"]?></td>
  1643. <td>
  1644. <input onchange="documentDirty=true;" type='text' maxlength='4' style="width: 50px;" name="jpegQuality" value="<?php echo isset($jpegQuality) ? $jpegQuality : "90" ; ?>" />
  1645. </td>
  1646. </tr>
  1647. <tr id="rbRow38" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1648. <td width="200">&nbsp;</td>
  1649. <td class='comment'><?php echo $_lang["jpegQuality_message"]?></td>
  1650. </tr>
  1651. <tr id="rbRow39" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1652. <td colspan="2"><div class='split'></div></td>
  1653. </tr>
  1654. <tr id="rbRow40" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1655. <td nowrap class="warning"><?php echo $_lang["denyZipDownload"] ?></td>
  1656. <td> <input onchange="documentDirty=true;" type="radio" name="denyZipDownload" value="0" <?php echo $denyZipDownload=='0' ? 'checked="checked"' : ""; ?> />
  1657. <?php echo $_lang["no"]?><br />
  1658. <input onchange="documentDirty=true;" type="radio" name="denyZipDownload" value="1" <?php echo (!isset($denyZipDownload) || $denyZipDownload=='1') ? 'checked="checked"' : ""; ?> />
  1659. <?php echo $_lang["yes"]?></td>
  1660. </tr>
  1661. <tr id="rbRow41" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1662. <td colspan="2"><div class='split'></div></td>
  1663. </tr>
  1664. <tr id="rbRow42" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1665. <td nowrap class="warning"><?php echo $_lang["denyExtensionRename"] ?></td>
  1666. <td> <input onchange="documentDirty=true;" type="radio" name="denyExtensionRename" value="0" <?php echo $denyExtensionRename=='0' ? 'checked="checked"' : ""; ?> />
  1667. <?php echo $_lang["no"]?><br />
  1668. <input onchange="documentDirty=true;" type="radio" name="denyExtensionRename" value="1" <?php echo (!isset($denyExtensionRename) || $denyExtensionRename=='1') ? 'checked="checked"' : ""; ?> />
  1669. <?php echo $_lang["yes"]?></td>
  1670. </tr>
  1671. <tr id="rbRow43" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1672. <td colspan="2"><div class='split'></div></td>
  1673. </tr>
  1674. <tr id="rbRow44" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1675. <td nowrap class="warning"><?php echo $_lang["showHiddenFiles"] ?></td>
  1676. <td> <input onchange="documentDirty=true;" type="radio" name="showHiddenFiles" value="0" <?php echo $showHiddenFiles=='0' ? 'checked="checked"' : ""; ?> />
  1677. <?php echo $_lang["no"]?><br />
  1678. <input onchange="documentDirty=true;" type="radio" name="showHiddenFiles" value="1" <?php echo (!isset($showHiddenFiles) || $showHiddenFiles=='1') ? 'checked="checked"' : ""; ?> />
  1679. <?php echo $_lang["yes"]?></td>
  1680. </tr>
  1681. <tr id="rbRow45" style="display: <?php echo $use_browser==1 ? $displayStyle : 'none' ; ?>">
  1682. <td colspan="2"><div class='split'></div></td>
  1683. </tr>
  1684. <tr class='row1'>
  1685. <td colspan="2">
  1686. <?php
  1687. // invoke OnMiscSettingsRender event
  1688. $evtOut = $modx->invokeEvent("OnMiscSettingsRender");
  1689. if(is_array($evtOut)) echo implode("",$evtOut);
  1690. ?>
  1691. </td>
  1692. </tr>
  1693. </table>
  1694. </div>
  1695. </div>
  1696. </div>
  1697. </form>
  1698. <?php
  1699. if (is_numeric($_GET['tab'])) {
  1700. echo '<script type="text/javascript">tpSettings.setSelectedIndex( '.$_GET['tab'].' );</script>';
  1701. }
  1702. /**
  1703. * get_lang_keys
  1704. *
  1705. * @return array of keys from a language file
  1706. */
  1707. function get_lang_keys($filename) {
  1708. $file = MODX_MANAGER_PATH.'includes/lang' . DIRECTORY_SEPARATOR . $filename;
  1709. if(is_file($file) && is_readable($file)) {
  1710. include($file);
  1711. return array_keys($_lang);
  1712. } else {
  1713. return array();
  1714. }
  1715. }
  1716. /**
  1717. * get_langs_by_key
  1718. *
  1719. * @return array of languages that define the key in their file
  1720. */
  1721. function get_langs_by_key($key) {
  1722. global $lang_keys;
  1723. $lang_return = array();
  1724. foreach($lang_keys as $lang=>$keys) {
  1725. if(in_array($key, $keys)) {
  1726. $lang_return[] = $lang;
  1727. }
  1728. }
  1729. return $lang_return;
  1730. }
  1731. /**
  1732. * get_lang_options
  1733. *
  1734. * returns html option list of languages
  1735. *
  1736. * @param string $key specify language key to return options of langauges that override it, default return all languages
  1737. * @param string $selected_lang specify language to select in option list, default none
  1738. * @return html option list
  1739. */
  1740. function get_lang_options($key=null, $selected_lang=null) {
  1741. global $lang_keys, $_lang;
  1742. $lang_options = '';
  1743. if($key) {
  1744. $languages = get_langs_by_key($key);
  1745. sort($languages);
  1746. $lang_options .= '<option value="">'.$_lang['language_title'].'</option>';
  1747. foreach($languages as $language_name) {
  1748. $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
  1749. $lang_options .= '<option value="'.$language_name.'">'.$uclanguage_name.'</option>';
  1750. }
  1751. return $lang_options;
  1752. } else {
  1753. $languages = array_keys($lang_keys);
  1754. sort($languages);
  1755. foreach($languages as $language_name) {
  1756. $uclanguage_name = ucwords(str_replace("_", " ", $language_name));
  1757. $sel = $language_name == $selected_lang ? ' selected="selected"' : '';
  1758. $lang_options .= '<option value="'.$language_name.'" '.$sel.'>'.$uclanguage_name.'</option>';
  1759. }
  1760. return $lang_options;
  1761. }
  1762. }
  1763. function form_radio($name,$value,$checked=false,$add='',$disabled=false) {
  1764. if($checked) $checked = ' checked="checked"'; else $checked = '';
  1765. if($disabled) $disabled = ' disabled'; else $disabled = '';
  1766. if($add) $add = ' ' . $add;
  1767. return '<input type="radio" name="' . $name . '" value="' . $value . '"' . $checked . $disabled . $add . ' />';
  1768. }
  1769. function wrap_label($str='',$object) {
  1770. return "<label>{$object}\n{$str}</label>";
  1771. }
  1772. function parsePlaceholder($tpl='', $ph=array())
  1773. {
  1774. if(empty($ph) || empty($tpl)) return $tpl;
  1775. foreach($ph as $k=>$v)
  1776. {
  1777. $k = "[+{$k}+]";
  1778. $tpl = str_replace($k, $v, $tpl);
  1779. }
  1780. return $tpl;
  1781. }