@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
6 | -switch($modx->getManagerApi()->action) { |
|
6 | +switch ($modx->getManagerApi()->action) { |
|
7 | 7 | case 12: |
8 | - if(!$modx->hasPermission('edit_user')) { |
|
8 | + if (!$modx->hasPermission('edit_user')) { |
|
9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
10 | 10 | } |
11 | 11 | break; |
12 | 12 | case 11: |
13 | - if(!$modx->hasPermission('new_user')) { |
|
13 | + if (!$modx->hasPermission('new_user')) { |
|
14 | 14 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
15 | 15 | } |
16 | 16 | break; |
@@ -18,24 +18,24 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$user = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | // check to see the snippet editor isn't locked |
24 | -$rs = $modx->getDatabase()->select('username', $modx->getFullTableName('active_users'), "action=12 AND id='{$user}' AND internalKey!='" . $modx->getLoginUserID() . "'"); |
|
25 | -if($username = $modx->getDatabase()->getValue($rs)) { |
|
24 | +$rs = $modx->getDatabase()->select('username', $modx->getFullTableName('active_users'), "action=12 AND id='{$user}' AND internalKey!='".$modx->getLoginUserID()."'"); |
|
25 | +if ($username = $modx->getDatabase()->getValue($rs)) { |
|
26 | 26 | $modx->webAlertAndQuit(sprintf($_lang["lock_msg"], $username, "user")); |
27 | 27 | } |
28 | 28 | // end check for lock |
29 | 29 | |
30 | -if($modx->getManagerApi()->action == '12') { |
|
30 | +if ($modx->getManagerApi()->action == '12') { |
|
31 | 31 | // get user attribute |
32 | 32 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('user_attributes'), "internalKey = '{$user}'"); |
33 | 33 | $userdata = $modx->getDatabase()->getRow($rs); |
34 | - if(!$userdata) { |
|
34 | + if (!$userdata) { |
|
35 | 35 | $modx->webAlertAndQuit("No user returned!"); |
36 | 36 | } |
37 | 37 | |
38 | - if($_SESSION['mgrRole'] != 1 && $userdata['role'] == 1) { |
|
38 | + if ($_SESSION['mgrRole'] != 1 && $userdata['role'] == 1) { |
|
39 | 39 | $modx->webAlertAndQuit('Illegal attempt to create/modify administrator by non-administrator!'); |
40 | 40 | } |
41 | 41 | |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | // get user settings |
44 | 44 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('user_settings'), "user = '{$user}'"); |
45 | 45 | $usersettings = array(); |
46 | - while($row = $modx->getDatabase()->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
46 | + while ($row = $modx->getDatabase()->getRow($rs)) $usersettings[$row['setting_name']] = $row['setting_value']; |
|
47 | 47 | // manually extract so that user display settings are not overwritten |
48 | - foreach($usersettings as $k => $v) { |
|
49 | - if($k != 'manager_language' && $k != 'manager_theme') { |
|
48 | + foreach ($usersettings as $k => $v) { |
|
49 | + if ($k != 'manager_language' && $k != 'manager_theme') { |
|
50 | 50 | ${$k} = $v; |
51 | 51 | } |
52 | 52 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | // get user name |
55 | 55 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('manager_users'), "id = '{$user}'"); |
56 | 56 | $usernamedata = $modx->getDatabase()->getRow($rs); |
57 | - if(!$usernamedata) { |
|
57 | + if (!$usernamedata) { |
|
58 | 58 | $modx->webAlertAndQuit("No user returned while getting username!"); |
59 | 59 | } |
60 | 60 | $_SESSION['itemname'] = $usernamedata['username']; |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | // avoid doubling htmlspecialchars (already encoded in DB) |
69 | -foreach($userdata as $key => $val) { |
|
69 | +foreach ($userdata as $key => $val) { |
|
70 | 70 | $userdata[$key] = html_entity_decode($val, ENT_NOQUOTES, $modx->config['modx_charset']); |
71 | 71 | }; |
72 | 72 | $usernamedata['username'] = html_entity_decode($usernamedata['username'], ENT_NOQUOTES, $modx->config['modx_charset']); |
73 | 73 | |
74 | 74 | // restore saved form |
75 | 75 | $formRestored = false; |
76 | -if($modx->getManagerApi()->hasFormValues()) { |
|
76 | +if ($modx->getManagerApi()->hasFormValues()) { |
|
77 | 77 | $modx->getManagerApi()->loadFormValues(); |
78 | 78 | // restore post values |
79 | 79 | $userdata = array_merge($userdata, $_POST); |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | // include the country list language file |
89 | 89 | $_country_lang = array(); |
90 | 90 | include_once "lang/country/english_country.inc.php"; |
91 | -if($manager_language != "english" && file_exists($modx->config['site_manager_path'] . "includes/lang/country/" . $manager_language . "_country.inc.php")) { |
|
92 | - include_once "lang/country/" . $manager_language . "_country.inc.php"; |
|
91 | +if ($manager_language != "english" && file_exists($modx->config['site_manager_path']."includes/lang/country/".$manager_language."_country.inc.php")) { |
|
92 | + include_once "lang/country/".$manager_language."_country.inc.php"; |
|
93 | 93 | } |
94 | 94 | asort($_country_lang); |
95 | 95 | |
96 | 96 | $displayStyle = ($_SESSION['browser'] === 'modern') ? 'table-row' : 'block'; |
97 | -if($which_browser == 'default') { |
|
97 | +if ($which_browser == 'default') { |
|
98 | 98 | $which_browser = $modx->configGlobal['which_browser'] ? $modx->configGlobal['which_browser'] : $modx->config['which_browser']; |
99 | 99 | } |
100 | 100 | ?> |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | document.userform.save.click(); |
187 | 187 | }, |
188 | 188 | delete: function() { |
189 | - <?php if($_GET['id'] == $modx->getLoginUserID()) { ?> |
|
189 | + <?php if ($_GET['id'] == $modx->getLoginUserID()) { ?> |
|
190 | 190 | alert("<?php echo $_lang['alert_delete_self']; ?>"); |
191 | 191 | <?php } else { ?> |
192 | 192 | if(confirm("<?php echo $_lang['confirm_delete_user']; ?>") === true) { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $evtOut = $modx->invokeEvent("OnUserFormPrerender", array( |
210 | 210 | "id" => $user |
211 | 211 | )); |
212 | - if(is_array($evtOut)) { |
|
212 | + if (is_array($evtOut)) { |
|
213 | 213 | echo implode("", $evtOut); |
214 | 214 | } |
215 | 215 | ?> |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | <input type="hidden" name="blockedmode" value="<?php echo ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || ($userdata['blockedafter'] < time() && $userdata['blockedafter'] != 0) || $userdata['failedlogins'] > 3) ? "1" : "0" ?>" /> |
219 | 219 | |
220 | 220 | <h1> |
221 | - <i class="fa fa fa-user"></i><?= ($usernamedata['username'] ? $usernamedata['username'] . '<small>(' . $usernamedata['id'] . ')</small>' : $_lang['user_title']) ?> |
|
221 | + <i class="fa fa fa-user"></i><?= ($usernamedata['username'] ? $usernamedata['username'].'<small>('.$usernamedata['id'].')</small>' : $_lang['user_title']) ?> |
|
222 | 222 | </h1> |
223 | 223 | |
224 | 224 | <?php echo $_style['actionbuttons']['dynamic']['user'] ?> |
@@ -236,13 +236,13 @@ discard block |
||
236 | 236 | <table border="0" cellspacing="0" cellpadding="3" class="table table--edit table--editUser"> |
237 | 237 | <tr> |
238 | 238 | <td colspan="3"><span id="blocked" class="warning"> |
239 | - <?php if($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || $userdata['failedlogins'] > 3) { ?> |
|
239 | + <?php if ($userdata['blocked'] == 1 || ($userdata['blockeduntil'] > time() && $userdata['blockeduntil'] != 0) || $userdata['failedlogins'] > 3) { ?> |
|
240 | 240 | <?php echo $_lang['user_is_blocked']; ?> |
241 | 241 | <?php } ?> |
242 | 242 | </span> |
243 | 243 | <br /></td> |
244 | 244 | </tr> |
245 | - <?php if(!empty($userdata['id'])) { ?> |
|
245 | + <?php if (!empty($userdata['id'])) { ?> |
|
246 | 246 | <tr id="showname" style="display: <?php echo ($modx->getManagerApi()->action == '12' && (!isset($usernamedata['oldusername']) || $usernamedata['oldusername'] == $usernamedata['username'])) ? $displayStyle : 'none'; ?> "> |
247 | 247 | <td colspan="3"><i class="<?php echo $_style["icons_user"] ?>"></i> <b><?php echo $modx->getPhpCompat()->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?></b> - <span class="comment"><a href="javascript:;" onClick="changeName();return false;"><?php echo $_lang["change_name"]; ?></a></span> |
248 | 248 | <input type="hidden" name="oldusername" value="<?php echo $modx->getPhpCompat()->htmlspecialchars(!empty($usernamedata['oldusername']) ? $usernamedata['oldusername'] : $usernamedata['username']); ?>" /> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <td><input type="text" name="newusername" class="inputBox" value="<?php echo $modx->getPhpCompat()->htmlspecialchars($usernamedata['username']); ?>" onChange='documentDirty=true;' maxlength="100" /></td> |
256 | 256 | </tr> |
257 | 257 | <tr> |
258 | - <th><?php echo $modx->getManagerApi()->action == '11' ? $_lang['password'] . ":" : $_lang['change_password_new'] . ":"; ?></th> |
|
258 | + <th><?php echo $modx->getManagerApi()->action == '11' ? $_lang['password'].":" : $_lang['change_password_new'].":"; ?></th> |
|
259 | 259 | <td> </td> |
260 | 260 | <td><input name="newpasswordcheck" type="checkbox" onClick="changestate(document.userform.newpassword);changePasswordState(document.userform.newpassword);"<?php echo $modx->getManagerApi()->action == "11" ? " checked disabled" : ""; ?>> |
261 | 261 | <input type="hidden" name="newpassword" value="<?php echo $modx->getManagerApi()->action == "11" ? 1 : 0; ?>" onChange="documentDirty=true;" /> |
@@ -309,8 +309,8 @@ discard block |
||
309 | 309 | ?> |
310 | 310 | <select name="role" class="inputBox" onChange='documentDirty=true;' style="width:300px"> |
311 | 311 | <?php |
312 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
313 | - if($modx->getManagerApi()->action == '11') { |
|
312 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
313 | + if ($modx->getManagerApi()->action == '11') { |
|
314 | 314 | $selectedtext = $row['id'] == '1' ? ' selected="selected"' : ''; |
315 | 315 | } else { |
316 | 316 | $selectedtext = $row['id'] == $userdata['role'] ? "selected='selected'" : ''; |
@@ -364,8 +364,8 @@ discard block |
||
364 | 364 | <?php $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $userdata['country']; ?> |
365 | 365 | <option value="" <?php (!isset($chosenCountry) ? ' selected' : '') ?> > </option> |
366 | 366 | <?php |
367 | - foreach($_country_lang as $key => $country) { |
|
368 | - echo "<option value=\"$key\"" . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . ">$country</option>"; |
|
367 | + foreach ($_country_lang as $key => $country) { |
|
368 | + echo "<option value=\"$key\"".(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').">$country</option>"; |
|
369 | 369 | } |
370 | 370 | ?> |
371 | 371 | </select></td> |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | <td> </td> |
392 | 392 | <td><textarea type="text" name="comment" class="inputBox" rows="5" onChange="documentDirty=true;"><?php echo $modx->getPhpCompat()->htmlspecialchars($userdata['comment']); ?></textarea></td> |
393 | 393 | </tr> |
394 | - <?php if($modx->getManagerApi()->action == '12') { ?> |
|
394 | + <?php if ($modx->getManagerApi()->action == '12') { ?> |
|
395 | 395 | <tr> |
396 | 396 | <th><?php echo $_lang['user_logincount']; ?>:</th> |
397 | 397 | <td> </td> |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | </tr> |
429 | 429 | <?php } ?> |
430 | 430 | </table> |
431 | - <?php if($_GET['id'] == $modx->getLoginUserID()) { ?> |
|
431 | + <?php if ($_GET['id'] == $modx->getLoginUserID()) { ?> |
|
432 | 432 | <p><?php echo $_lang['user_edit_self_msg']; ?></p> |
433 | 433 | <?php } ?> |
434 | 434 | </div> |
@@ -445,8 +445,8 @@ discard block |
||
445 | 445 | <?php |
446 | 446 | $activelang = !empty($usersettings['manager_language']) ? $usersettings['manager_language'] : ''; |
447 | 447 | $dir = dir("includes/lang"); |
448 | - while($file = $dir->read()) { |
|
449 | - if(strpos($file, ".inc.php") > 0) { |
|
448 | + while ($file = $dir->read()) { |
|
449 | + if (strpos($file, ".inc.php") > 0) { |
|
450 | 450 | $endpos = strpos($file, "."); |
451 | 451 | $languagename = substr($file, 0, $endpos); |
452 | 452 | $selectedtext = $languagename == $activelang ? "selected='selected'" : ""; |
@@ -533,17 +533,17 @@ discard block |
||
533 | 533 | <option value=""></option> |
534 | 534 | <?php |
535 | 535 | $dir = dir("media/style/"); |
536 | - while($file = $dir->read()) { |
|
537 | - if($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') { |
|
536 | + while ($file = $dir->read()) { |
|
537 | + if ($file != "." && $file != ".." && is_dir("media/style/$file") && substr($file, 0, 1) != '.') { |
|
538 | 538 | $themename = $file; |
539 | - if($themename === 'common') { |
|
539 | + if ($themename === 'common') { |
|
540 | 540 | continue; |
541 | 541 | } |
542 | - $attr = 'value="' . $themename . '" '; |
|
543 | - if(isset($usersettings['manager_theme']) && $themename == $usersettings['manager_theme']) { |
|
542 | + $attr = 'value="'.$themename.'" '; |
|
543 | + if (isset($usersettings['manager_theme']) && $themename == $usersettings['manager_theme']) { |
|
544 | 544 | $attr .= 'selected="selected" '; |
545 | 545 | } |
546 | - echo "\t\t<option " . rtrim($attr) . '>' . ucwords(str_replace("_", " ", $themename)) . "</option>\n"; |
|
546 | + echo "\t\t<option ".rtrim($attr).'>'.ucwords(str_replace("_", " ", $themename))."</option>\n"; |
|
547 | 547 | } |
548 | 548 | } |
549 | 549 | $dir->close(); |
@@ -584,12 +584,12 @@ discard block |
||
584 | 584 | <td><select name="which_browser" class="inputBox" onChange="documentDirty=true;"> |
585 | 585 | <?php |
586 | 586 | $selected = 'default' == $usersettings['which_browser'] || !$usersettings['which_browser'] ? ' selected="selected"' : ''; |
587 | - echo '<option value="default"' . $selected . '>' . $_lang['option_default'] . "</option>\n"; |
|
588 | - foreach(glob("media/browser/*", GLOB_ONLYDIR) as $dir) { |
|
587 | + echo '<option value="default"'.$selected.'>'.$_lang['option_default']."</option>\n"; |
|
588 | + foreach (glob("media/browser/*", GLOB_ONLYDIR) as $dir) { |
|
589 | 589 | $dir = str_replace('\\', '/', $dir); |
590 | 590 | $browser_name = substr($dir, strrpos($dir, '/') + 1); |
591 | 591 | $selected = $browser_name == $usersettings['which_browser'] ? ' selected="selected"' : ''; |
592 | - echo '<option value="' . $browser_name . '"' . $selected . '>' . "{$browser_name}</option>\n"; |
|
592 | + echo '<option value="'.$browser_name.'"'.$selected.'>'."{$browser_name}</option>\n"; |
|
593 | 593 | } |
594 | 594 | ?> |
595 | 595 | </select></td> |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | </tr> |
617 | 617 | <tr> |
618 | 618 | <td> </td> |
619 | - <td class='comment'><?php echo $_lang["uploadable_images_message"] . $_lang["user_upload_message"] ?></td> |
|
619 | + <td class='comment'><?php echo $_lang["uploadable_images_message"].$_lang["user_upload_message"] ?></td> |
|
620 | 620 | </tr> |
621 | 621 | <tr> |
622 | 622 | <th><?php echo $_lang["uploadable_media_title"] ?></th> |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | </tr> |
629 | 629 | <tr> |
630 | 630 | <td> </td> |
631 | - <td class='comment'><?php echo $_lang["uploadable_media_message"] . $_lang["user_upload_message"] ?></td> |
|
631 | + <td class='comment'><?php echo $_lang["uploadable_media_message"].$_lang["user_upload_message"] ?></td> |
|
632 | 632 | </tr> |
633 | 633 | <tr> |
634 | 634 | <th><?php echo $_lang["uploadable_flash_title"] ?></th> |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | </tr> |
641 | 641 | <tr> |
642 | 642 | <td> </td> |
643 | - <td class='comment'><?php echo $_lang["uploadable_flash_message"] . $_lang["user_upload_message"] ?></td> |
|
643 | + <td class='comment'><?php echo $_lang["uploadable_flash_message"].$_lang["user_upload_message"] ?></td> |
|
644 | 644 | </tr> |
645 | 645 | <tr> |
646 | 646 | <th><?php echo $_lang["uploadable_files_title"] ?></th> |
@@ -652,7 +652,7 @@ discard block |
||
652 | 652 | </tr> |
653 | 653 | <tr> |
654 | 654 | <td> </td> |
655 | - <td class='comment'><?php echo $_lang["uploadable_files_message"] . $_lang["user_upload_message"] ?></td> |
|
655 | + <td class='comment'><?php echo $_lang["uploadable_files_message"].$_lang["user_upload_message"] ?></td> |
|
656 | 656 | </tr> |
657 | 657 | <tr class='row2'> |
658 | 658 | <th><?php echo $_lang["upload_maxsize_title"] ?></th> |
@@ -671,11 +671,11 @@ discard block |
||
671 | 671 | $edt = isset ($usersettings["which_editor"]) ? $usersettings["which_editor"] : ''; |
672 | 672 | // invoke OnRichTextEditorRegister event |
673 | 673 | $evtOut = $modx->invokeEvent("OnRichTextEditorRegister"); |
674 | - echo "<option value='none'" . ($edt == 'none' ? " selected='selected'" : "") . ">" . $_lang["none"] . "</option>\n"; |
|
675 | - if(is_array($evtOut)) { |
|
676 | - for($i = 0; $i < count($evtOut); $i++) { |
|
674 | + echo "<option value='none'".($edt == 'none' ? " selected='selected'" : "").">".$_lang["none"]."</option>\n"; |
|
675 | + if (is_array($evtOut)) { |
|
676 | + for ($i = 0; $i < count($evtOut); $i++) { |
|
677 | 677 | $editor = $evtOut[$i]; |
678 | - echo "<option value='$editor'" . ($edt == $editor ? " selected='selected'" : "") . ">$editor</option>\n"; |
|
678 | + echo "<option value='$editor'".($edt == $editor ? " selected='selected'" : "").">$editor</option>\n"; |
|
679 | 679 | } |
680 | 680 | } |
681 | 681 | ?> |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | <?php |
714 | 714 | // invoke OnInterfaceSettingsRender event |
715 | 715 | $evtOut = $modx->invokeEvent("OnInterfaceSettingsRender"); |
716 | - if(is_array($evtOut)) { |
|
716 | + if (is_array($evtOut)) { |
|
717 | 717 | echo implode("", $evtOut); |
718 | 718 | } |
719 | 719 | ?> |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | function BrowseServer() { |
741 | 741 | var w = screen.width * 0.7; |
742 | 742 | var h = screen.height * 0.7; |
743 | - OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser;?>/browser.php?Type=images", w, h); |
|
743 | + OpenServerBrowser("<?php echo MODX_MANAGER_URL; ?>media/browser/<?php echo $which_browser; ?>/browser.php?Type=images", w, h); |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | function SetUrl(url, width, height, alt) { |
@@ -763,17 +763,17 @@ discard block |
||
763 | 763 | </tr> |
764 | 764 | </table> |
765 | 765 | </div> |
766 | - <?php if($use_udperms == 1) { |
|
766 | + <?php if ($use_udperms == 1) { |
|
767 | 767 | |
768 | 768 | $groupsarray = array(); |
769 | 769 | |
770 | - if($modx->getManagerApi()->action == '12') { // only do this bit if the user is being edited |
|
770 | + if ($modx->getManagerApi()->action == '12') { // only do this bit if the user is being edited |
|
771 | 771 | $rs = $modx->getDatabase()->select('user_group', $modx->getFullTableName('member_groups'), "member='{$user}'"); |
772 | 772 | $groupsarray = $modx->getDatabase()->getColumn('user_group', $rs); |
773 | 773 | } |
774 | 774 | // retain selected doc groups between post |
775 | - if(is_array($_POST['user_groups'])) { |
|
776 | - foreach($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
775 | + if (is_array($_POST['user_groups'])) { |
|
776 | + foreach ($_POST['user_groups'] as $n => $v) $groupsarray[] = $v; |
|
777 | 777 | } |
778 | 778 | ?> |
779 | 779 | <div class="tab-page" id="tabAccess"> |
@@ -782,8 +782,8 @@ discard block |
||
782 | 782 | <p><?php echo $_lang['access_permissions_user_message'] ?></p> |
783 | 783 | <?php |
784 | 784 | $rs = $modx->getDatabase()->select('name, id', $modx->getFullTableName('membergroup_names'), '', 'name'); |
785 | - while($row = $modx->getDatabase()->getRow($rs)) { |
|
786 | - echo "<label><input type='checkbox' name='user_groups[]' value='" . $row['id'] . "'" . (in_array($row['id'], $groupsarray) ? " checked='checked'" : "") . " />" . $row['name'] . "</label><br />"; |
|
785 | + while ($row = $modx->getDatabase()->getRow($rs)) { |
|
786 | + echo "<label><input type='checkbox' name='user_groups[]' value='".$row['id']."'".(in_array($row['id'], $groupsarray) ? " checked='checked'" : "")." />".$row['name']."</label><br />"; |
|
787 | 787 | } |
788 | 788 | } |
789 | 789 | ?> |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | $evtOut = $modx->invokeEvent("OnUserFormRender", array( |
797 | 797 | "id" => $user |
798 | 798 | )); |
799 | - if(is_array($evtOut)) { |
|
799 | + if (is_array($evtOut)) { |
|
800 | 800 | echo implode("", $evtOut); |
801 | 801 | } |
802 | 802 | ?> |
@@ -1,12 +1,12 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('save_template')) { |
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
9 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
10 | 10 | $reset = isset($_POST['reset']) && $_POST['reset'] == 'true' ? 1 : 0; |
11 | 11 | |
12 | 12 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $templatename = ''; |
20 | 20 | |
21 | 21 | if (isset($_POST['listSubmitted'])) { |
22 | - $updateMsg .= '<div class="text-success" id="updated">' . $_lang['sort_updated'] . '</div>'; |
|
22 | + $updateMsg .= '<div class="text-success" id="updated">'.$_lang['sort_updated'].'</div>'; |
|
23 | 23 | foreach ($_POST as $listName => $listValue) { |
24 | 24 | if ($listName == 'listSubmitted' || $listName == 'reset') { |
25 | 25 | continue; |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | while ($row = $modx->getDatabase()->getRow($rs)) { |
48 | 48 | $templatename = $row['templatename']; |
49 | 49 | $caption = $row['caption'] != '' ? $row['caption'] : $row['name']; |
50 | - $sortableList .= '<li id="item_' . $row['id'] . '"><i class="fa fa-list-alt"></i> ' . $caption . ' <small class="protectedNode" style="float:right">[*' . $row['name'] . '*]</small></li>'; |
|
50 | + $sortableList .= '<li id="item_'.$row['id'].'"><i class="fa fa-list-alt"></i> '.$caption.' <small class="protectedNode" style="float:right">[*'.$row['name'].'*]</small></li>'; |
|
51 | 51 | } |
52 | 52 | $sortableList .= '</ul></div>'; |
53 | 53 | } else { |
54 | - $updateMsg = '<p class="text-danger">' . $_lang['tmplvars_novars'] . '</p>'; |
|
54 | + $updateMsg = '<p class="text-danger">'.$_lang['tmplvars_novars'].'</p>'; |
|
55 | 55 | } |
56 | 56 | ?> |
57 | 57 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | </script> |
129 | 129 | |
130 | 130 | <h1> |
131 | - <i class="fa fa-sort-numeric-asc"></i><?= ($templatename ? $templatename . '<small>(' . $id . ')</small>' : $_lang['template_tv_edit_title']) ?> |
|
131 | + <i class="fa fa-sort-numeric-asc"></i><?= ($templatename ? $templatename.'<small>('.$id.')</small>' : $_lang['template_tv_edit_title']) ?> |
|
132 | 132 | </h1> |
133 | 133 | |
134 | 134 | <?= $_style['actionbuttons']['dynamic']['save'] ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!$modx->hasPermission('logs')) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $logs_user = record_sort(array_unique_multi($logs, 'internalKey'), 'username'); |
29 | 29 | foreach ($logs_user as $row) { |
30 | 30 | $selectedtext = $row['internalKey'] == $_REQUEST['searchuser'] ? ' selected="selected"' : ''; |
31 | - echo "\t\t" . '<option value="' . $row['internalKey'] . '"' . $selectedtext . '>' . $row['username'] . "</option>\n"; |
|
31 | + echo "\t\t".'<option value="'.$row['internalKey'].'"'.$selectedtext.'>'.$row['username']."</option>\n"; |
|
32 | 32 | } |
33 | 33 | ?> |
34 | 34 | </select> |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | continue; |
50 | 50 | } |
51 | 51 | $selectedtext = $row['action'] == $_REQUEST['action'] ? ' selected="selected"' : ''; |
52 | - echo "\t\t" . '<option value="' . $row['action'] . '"' . $selectedtext . '>' . $row['action'] . ' - ' . $action . "</option>\n"; |
|
52 | + echo "\t\t".'<option value="'.$row['action'].'"'.$selectedtext.'>'.$row['action'].' - '.$action."</option>\n"; |
|
53 | 53 | } |
54 | 54 | ?> |
55 | 55 | </select> |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $logs_items = record_sort(array_unique_multi($logs, 'itemid'), 'itemid'); |
66 | 66 | foreach ($logs_items as $row) { |
67 | 67 | $selectedtext = $row['itemid'] == $_REQUEST['itemid'] ? ' selected="selected"' : ''; |
68 | - echo "\t\t" . '<option value="' . $row['itemid'] . '"' . $selectedtext . '>' . $row['itemid'] . "</option>\n"; |
|
68 | + echo "\t\t".'<option value="'.$row['itemid'].'"'.$selectedtext.'>'.$row['itemid']."</option>\n"; |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | </select> |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $logs_names = record_sort(array_unique_multi($logs, 'itemname'), 'itemname'); |
82 | 82 | foreach ($logs_names as $row) { |
83 | 83 | $selectedtext = $row['itemname'] == $_REQUEST['itemname'] ? ' selected="selected"' : ''; |
84 | - echo "\t\t" . '<option value="' . $row['itemname'] . '"' . $selectedtext . '>' . $row['itemname'] . "</option>\n"; |
|
84 | + echo "\t\t".'<option value="'.$row['itemname'].'"'.$selectedtext.'>'.$row['itemname']."</option>\n"; |
|
85 | 85 | } |
86 | 86 | ?> |
87 | 87 | </select> |
@@ -139,26 +139,26 @@ discard block |
||
139 | 139 | // get the selections the user made. |
140 | 140 | $sqladd = array(); |
141 | 141 | if ($_REQUEST['searchuser'] != 0) { |
142 | - $sqladd[] = "internalKey='" . (int)$_REQUEST['searchuser'] . "'"; |
|
142 | + $sqladd[] = "internalKey='".(int) $_REQUEST['searchuser']."'"; |
|
143 | 143 | } |
144 | 144 | if ($_REQUEST['action'] != 0) { |
145 | - $sqladd[] = "action=" . (int)$_REQUEST['action']; |
|
145 | + $sqladd[] = "action=".(int) $_REQUEST['action']; |
|
146 | 146 | } |
147 | 147 | if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { |
148 | - $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; |
|
148 | + $sqladd[] = "itemid='".$_REQUEST['itemid']."'"; |
|
149 | 149 | } |
150 | 150 | if ($_REQUEST['itemname'] != '0') { |
151 | - $sqladd[] = "itemname='" . $modx->getDatabase()->escape($_REQUEST['itemname']) . "'"; |
|
151 | + $sqladd[] = "itemname='".$modx->getDatabase()->escape($_REQUEST['itemname'])."'"; |
|
152 | 152 | } |
153 | 153 | if ($_REQUEST['message'] != "") { |
154 | - $sqladd[] = "message LIKE '%" . $modx->getDatabase()->escape($_REQUEST['message']) . "%'"; |
|
154 | + $sqladd[] = "message LIKE '%".$modx->getDatabase()->escape($_REQUEST['message'])."%'"; |
|
155 | 155 | } |
156 | 156 | // date stuff |
157 | 157 | if ($_REQUEST['datefrom'] != "") { |
158 | - $sqladd[] = "timestamp>" . $modx->toTimeStamp($_REQUEST['datefrom']); |
|
158 | + $sqladd[] = "timestamp>".$modx->toTimeStamp($_REQUEST['datefrom']); |
|
159 | 159 | } |
160 | 160 | if ($_REQUEST['dateto'] != "") { |
161 | - $sqladd[] = "timestamp<" . $modx->toTimeStamp($_REQUEST['dateto']); |
|
161 | + $sqladd[] = "timestamp<".$modx->toTimeStamp($_REQUEST['dateto']); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | // If current position is not set, set it to zero |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // Number of result to display on the page, will be in the LIMIT of the sql query also |
172 | 172 | $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs; |
173 | 173 | |
174 | - $extargv = "&a=13&searchuser=" . $_REQUEST['searchuser'] . "&action=" . $_REQUEST['action'] . "&itemid=" . $_REQUEST['itemid'] . "&itemname=" . $_REQUEST['itemname'] . "&message=" . $_REQUEST['message'] . "&dateto=" . $_REQUEST['dateto'] . "&datefrom=" . $_REQUEST['datefrom'] . "&nrresults=" . $int_num_result . "&log_submit=" . $_REQUEST['log_submit']; // extra argv here (could be anything depending on your page) |
|
174 | + $extargv = "&a=13&searchuser=".$_REQUEST['searchuser']."&action=".$_REQUEST['action']."&itemid=".$_REQUEST['itemid']."&itemname=".$_REQUEST['itemname']."&message=".$_REQUEST['message']."&dateto=".$_REQUEST['dateto']."&datefrom=".$_REQUEST['datefrom']."&nrresults=".$int_num_result."&log_submit=".$_REQUEST['log_submit']; // extra argv here (could be anything depending on your page) |
|
175 | 175 | |
176 | 176 | // build the sql |
177 | 177 | $limit = $num_rows = $modx->getDatabase()->getValue($modx->getDatabase()->select('COUNT(*)', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''))); |
@@ -179,9 +179,9 @@ discard block |
||
179 | 179 | $rs = $modx->getDatabase()->select('*', $modx->getFullTableName('manager_log'), (!empty($sqladd) ? implode(' AND ', $sqladd) : ''), 'timestamp DESC, id DESC', "{$int_cur_position}, {$int_num_result}"); |
180 | 180 | |
181 | 181 | if ($limit < 1) { |
182 | - echo '<p>' . $_lang["mgrlog_emptysrch"] . '</p>'; |
|
182 | + echo '<p>'.$_lang["mgrlog_emptysrch"].'</p>'; |
|
183 | 183 | } else { |
184 | - echo '<p>' . $_lang["mgrlog_sortinst"] . '</p>'; |
|
184 | + echo '<p>'.$_lang["mgrlog_sortinst"].'</p>'; |
|
185 | 185 | |
186 | 186 | // New instance of the Paging class, you can modify the color and the width of the html table |
187 | 187 | $p = new EvolutionCMS\Support\Paginate($num_rows, $int_cur_position, $int_num_result, $extargv); |
@@ -192,11 +192,11 @@ discard block |
||
192 | 192 | $current_row = $int_cur_position / $int_num_result; |
193 | 193 | |
194 | 194 | // Display the result as you like... |
195 | - print "<p>" . $_lang["paging_showing"] . " " . $array_paging['lower']; |
|
196 | - print " " . $_lang["paging_to"] . " " . $array_paging['upper']; |
|
197 | - print " (" . $array_paging['total'] . " " . $_lang["paging_total"] . ")<br />"; |
|
198 | - $paging = $array_paging['first_link'] . $_lang["paging_first"] . (isset($array_paging['first_link']) ? "</a> " : " "); |
|
199 | - $paging .= $array_paging['previous_link'] . $_lang["paging_prev"] . (isset($array_paging['previous_link']) ? "</a> " : " "); |
|
195 | + print "<p>".$_lang["paging_showing"]." ".$array_paging['lower']; |
|
196 | + print " ".$_lang["paging_to"]." ".$array_paging['upper']; |
|
197 | + print " (".$array_paging['total']." ".$_lang["paging_total"].")<br />"; |
|
198 | + $paging = $array_paging['first_link'].$_lang["paging_first"].(isset($array_paging['first_link']) ? "</a> " : " "); |
|
199 | + $paging .= $array_paging['previous_link'].$_lang["paging_prev"].(isset($array_paging['previous_link']) ? "</a> " : " "); |
|
200 | 200 | $pagesfound = sizeof($array_row_paging); |
201 | 201 | if ($pagesfound > 6) { |
202 | 202 | $paging .= $array_row_paging[$current_row - 2]; // ." "; |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | $paging .= $array_row_paging[$current_row + 2]; // ." "; |
207 | 207 | } else { |
208 | 208 | for ($i = 0; $i < $pagesfound; $i++) { |
209 | - $paging .= $array_row_paging[$i] . " "; |
|
209 | + $paging .= $array_row_paging[$i]." "; |
|
210 | 210 | } |
211 | 211 | } |
212 | - $paging .= $array_paging['next_link'] . $_lang["paging_next"] . (isset($array_paging['next_link']) ? "</a> " : " ") . " "; |
|
213 | - $paging .= $array_paging['last_link'] . $_lang["paging_last"] . (isset($array_paging['last_link']) ? "</a> " : " ") . " "; |
|
212 | + $paging .= $array_paging['next_link'].$_lang["paging_next"].(isset($array_paging['next_link']) ? "</a> " : " ")." "; |
|
213 | + $paging .= $array_paging['last_link'].$_lang["paging_last"].(isset($array_paging['last_link']) ? "</a> " : " ")." "; |
|
214 | 214 | // The above exemple print somethings like: |
215 | 215 | // Results 1 to 20 of 597 <<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 >>> |
216 | 216 | // Of course you can now play with array_row_paging in order to print |
@@ -246,16 +246,16 @@ discard block |
||
246 | 246 | if (!preg_match("/^[0-9]+$/", $logentry['itemid'])) { |
247 | 247 | $item = '<div style="text-align:center;">-</div>'; |
248 | 248 | } elseif ($logentry['action'] == 3 || $logentry['action'] == 27 || $logentry['action'] == 5) { |
249 | - $item = '<a href="index.php?a=3&id=' . $logentry['itemid'] . '">' . $logentry['itemname'] . '</a>'; |
|
249 | + $item = '<a href="index.php?a=3&id='.$logentry['itemid'].'">'.$logentry['itemname'].'</a>'; |
|
250 | 250 | } else { |
251 | 251 | $item = $logentry['itemname']; |
252 | 252 | } |
253 | 253 | //index.php?a=13&searchuser=' . $logentry['internalKey'] . '&action=' . $logentry['action'] . '&itemname=' . $logentry['itemname'] . '&log_submit=true' |
254 | - $user_drill = 'index.php?a=13&searchuser=' . $logentry['internalKey'] . '&itemname=0&log_submit=true'; |
|
254 | + $user_drill = 'index.php?a=13&searchuser='.$logentry['internalKey'].'&itemname=0&log_submit=true'; |
|
255 | 255 | ?> |
256 | 256 | <tr> |
257 | - <td><?= '<a href="' . $user_drill . '">' . $logentry['username'] . '</a>' ?></td> |
|
258 | - <td class="text-nowrap"><?= '[' . $logentry['action'] . '] ' . $logentry['message'] ?></td> |
|
257 | + <td><?= '<a href="'.$user_drill.'">'.$logentry['username'].'</a>' ?></td> |
|
258 | + <td class="text-nowrap"><?= '['.$logentry['action'].'] '.$logentry['message'] ?></td> |
|
259 | 259 | <td class="text-xs-right"><?= $logentry['itemid'] ?></td> |
260 | 260 | <td><?= $item ?></td> |
261 | 261 | <td class="text-nowrap"><?= $modx->toDateFormat($logentry['timestamp'] + $server_offset_time) ?></td> |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
6 | -switch ((int)$modx->getManagerApi()->action) { |
|
6 | +switch ((int) $modx->getManagerApi()->action) { |
|
7 | 7 | case 35: |
8 | 8 | if (!$modx->hasPermission('edit_role')) { |
9 | 9 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$role = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$role = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | $tbl_user_roles = $modx->getFullTableName('user_roles'); |
24 | 24 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | // Add lock-element JS-Script |
47 | 47 | $lockElementId = $role; |
48 | 48 | $lockElementType = 8; |
49 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
49 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
50 | 50 | ?> |
51 | 51 | <script type="text/javascript"> |
52 | 52 | function changestate(element) { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | <input type="hidden" name="id" value="<?= $_GET['id'] ?>"> |
83 | 83 | |
84 | 84 | <h1> |
85 | - <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'] . '<small>(' . $roledata['id'] . ')</small>' : $_lang['role_title']) ?> |
|
85 | + <i class="fa fa-legal"></i><?= ($roledata['name'] ? $roledata['name'].'<small>('.$roledata['id'].')</small>' : $_lang['role_title']) ?> |
|
86 | 86 | </h1> |
87 | 87 | |
88 | 88 | <?= $_style['actionbuttons']['dynamic']['savedelete'] ?> |
@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | <tr> |
14 | 14 | <th><?php echo $_lang['sitestatus_title'] ?><br><small>[(site_status)]</small></th> |
15 | 15 | <td> |
16 | - <?php echo wrap_label($_lang['online'], form_radio('site_status', 1));?><br /> |
|
17 | - <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0));?> |
|
16 | + <?php echo wrap_label($_lang['online'], form_radio('site_status', 1)); ?><br /> |
|
17 | + <?php echo wrap_label($_lang['offline'], form_radio('site_status', 0)); ?> |
|
18 | 18 | </td> |
19 | 19 | </tr> |
20 | 20 | <tr> |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | <br /> |
59 | 59 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
60 | 60 | <select name="reload_site_unavailable" id="reload_site_unavailable_select" onchange="confirmLangChange(this, 'siteunavailable_message_default', 'site_unavailable_message_textarea');"> |
61 | -<?php echo get_lang_options('siteunavailable_message_default');?> |
|
61 | +<?php echo get_lang_options('siteunavailable_message_default'); ?> |
|
62 | 62 | </select> |
63 | 63 | </th> |
64 | 64 | <td> <textarea name="site_unavailable_message" id="site_unavailable_message_textarea" style="width:100%; height: 120px;"><?php echo $site_unavailable_message_view; ?></textarea> |
65 | - <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']);?>" /> |
|
66 | - <div class="comment"><?php echo $_lang['siteunavailable_message'];?></div> |
|
65 | + <input type="hidden" name="siteunavailable_message_default" id="siteunavailable_message_default_hidden" value="<?php echo addslashes($_lang['siteunavailable_message_default']); ?>" /> |
|
66 | + <div class="comment"><?php echo $_lang['siteunavailable_message']; ?></div> |
|
67 | 67 | </td> |
68 | 68 | </tr> |
69 | 69 | <tr> |
@@ -78,17 +78,17 @@ discard block |
||
78 | 78 | 'c.category, t.templatename ASC' |
79 | 79 | ); |
80 | 80 | ?> |
81 | - <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"> |
|
81 | + <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"> |
|
82 | 82 | <?php |
83 | 83 | |
84 | 84 | $currentCategory = ''; |
85 | 85 | while ($row = $modx->getDatabase()->getRow($rs)) { |
86 | 86 | $thisCategory = $row['category']; |
87 | - if($thisCategory == null) { |
|
87 | + if ($thisCategory == null) { |
|
88 | 88 | $thisCategory = $_lang['no_category']; |
89 | 89 | } |
90 | - if($thisCategory != $currentCategory) { |
|
91 | - if($closeOptGroup) { |
|
90 | + if ($thisCategory != $currentCategory) { |
|
91 | + if ($closeOptGroup) { |
|
92 | 92 | echo "\t\t\t\t\t</optgroup>\n"; |
93 | 93 | } |
94 | 94 | echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | echo "\t\t\t\t\t".'<option value="'.$row['id'].'"'.$selectedtext.'>'.$row['templatename']."</option>\n"; |
107 | 107 | $currentCategory = $thisCategory; |
108 | 108 | } |
109 | - if($thisCategory != '') { |
|
109 | + if ($thisCategory != '') { |
|
110 | 110 | echo "\t\t\t\t\t</optgroup>\n"; |
111 | 111 | } |
112 | 112 | ?> |
@@ -114,19 +114,19 @@ discard block |
||
114 | 114 | <br /> |
115 | 115 | <div id="template_reset_options_wrapper" style="display:none;"> |
116 | 116 | <label><input type="radio" name="reset_template" value="1" /> <?php echo $_lang['template_reset_all']; ?></label><br /> |
117 | - <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'],$oldTmpName); ?></label> |
|
117 | + <label><input type="radio" name="reset_template" value="2" /> <?php echo sprintf($_lang['template_reset_specific'], $oldTmpName); ?></label> |
|
118 | 118 | </div> |
119 | 119 | <input type="hidden" name="old_template" value="<?php echo $oldTmpId; ?>" /> |
120 | 120 | <div class="comment"><?php echo $_lang['defaulttemplate_message'] ?></div> |
121 | 121 | </td> |
122 | 122 | </tr> |
123 | 123 | <tr> |
124 | - <th><?php echo $_lang['defaulttemplate_logic_title'];?><br><small>[(auto_template_logic)]</small></th> |
|
124 | + <th><?php echo $_lang['defaulttemplate_logic_title']; ?><br><small>[(auto_template_logic)]</small></th> |
|
125 | 125 | <td> |
126 | - <p><?php echo $_lang['defaulttemplate_logic_general_message'];?></p> |
|
127 | - <label><input type="radio" name="auto_template_logic" value="system"<?php if($auto_template_logic == 'system') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br /> |
|
128 | - <label><input type="radio" name="auto_template_logic" value="parent"<?php if($auto_template_logic == 'parent') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br /> |
|
129 | - <label><input type="radio" name="auto_template_logic" value="sibling"<?php if($auto_template_logic == 'sibling') {echo " checked='checked'";}?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br /> |
|
126 | + <p><?php echo $_lang['defaulttemplate_logic_general_message']; ?></p> |
|
127 | + <label><input type="radio" name="auto_template_logic" value="system"<?php if ($auto_template_logic == 'system') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_system_message']; ?></label><br /> |
|
128 | + <label><input type="radio" name="auto_template_logic" value="parent"<?php if ($auto_template_logic == 'parent') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_parent_message']; ?></label><br /> |
|
129 | + <label><input type="radio" name="auto_template_logic" value="sibling"<?php if ($auto_template_logic == 'sibling') {echo " checked='checked'"; }?>/> <?php echo $_lang['defaulttemplate_logic_sibling_message']; ?></label><br /> |
|
130 | 130 | </td> |
131 | 131 | </tr> |
132 | 132 | <tr> |
@@ -138,22 +138,22 @@ discard block |
||
138 | 138 | $modx->getDatabase()->select('id', '[+prefix+]site_plugins', |
139 | 139 | "plugincode LIKE '%phx.parser.class.inc.php%OnParseDocument();%' AND disabled != 1") |
140 | 140 | ); |
141 | - if($count) { |
|
141 | + if ($count) { |
|
142 | 142 | $disabledFilters = 1; |
143 | 143 | echo '<b>'.$_lang['enable_filter_phx_warning'].'</b><br/>'; |
144 | 144 | } |
145 | 145 | else $disabledFilters = false; |
146 | 146 | ?> |
147 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_filter', 1, '', $disabledFilters));?><br /> |
|
148 | - <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters));?> |
|
147 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_filter', 1, '', $disabledFilters)); ?><br /> |
|
148 | + <?php echo wrap_label($_lang['no'], form_radio('enable_filter', 0, '', $disabledFilters)); ?> |
|
149 | 149 | <div class="comment"><?php echo $_lang['enable_filter_message']; ?></div> |
150 | 150 | </td> |
151 | 151 | </tr> |
152 | 152 | <tr> |
153 | 153 | <th><?php echo $_lang['enable_at_syntax_title'] ?><br><small>[(enable_at_syntax)]</small></th> |
154 | 154 | <td > |
155 | - <?php echo wrap_label($_lang['yes'],form_radio('enable_at_syntax', 1));?><br /> |
|
156 | - <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0));?> |
|
155 | + <?php echo wrap_label($_lang['yes'], form_radio('enable_at_syntax', 1)); ?><br /> |
|
156 | + <?php echo wrap_label($_lang['no'], form_radio('enable_at_syntax', 0)); ?> |
|
157 | 157 | <div class="comment"> |
158 | 158 | <?php echo $_lang['enable_at_syntax_message']; ?> |
159 | 159 | <ul> |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | <tr> |
168 | 168 | <th><?php echo $_lang['defaultpublish_title'] ?><br><small>[(publish_default)]</small></th> |
169 | 169 | <td> |
170 | - <?php echo wrap_label($_lang['yes'],form_radio('publish_default', 1));?><br /> |
|
171 | - <?php echo wrap_label($_lang['no'],form_radio('publish_default', 0));?> |
|
170 | + <?php echo wrap_label($_lang['yes'], form_radio('publish_default', 1)); ?><br /> |
|
171 | + <?php echo wrap_label($_lang['no'], form_radio('publish_default', 0)); ?> |
|
172 | 172 | <div class="comment"><?php echo $_lang['defaultpublish_message'] ?></div> |
173 | 173 | </td> |
174 | 174 | </tr> |
@@ -176,24 +176,24 @@ discard block |
||
176 | 176 | <tr> |
177 | 177 | <th><?php echo $_lang['defaultcache_title'] ?><br><small>[(cache_default)]</small></th> |
178 | 178 | <td> |
179 | - <?php echo wrap_label($_lang['yes'],form_radio('cache_default', 1));?><br /> |
|
180 | - <?php echo wrap_label($_lang['no'],form_radio('cache_default', 0));?> |
|
179 | + <?php echo wrap_label($_lang['yes'], form_radio('cache_default', 1)); ?><br /> |
|
180 | + <?php echo wrap_label($_lang['no'], form_radio('cache_default', 0)); ?> |
|
181 | 181 | <div class="comment"><?php echo $_lang['defaultcache_message'] ?></div> |
182 | 182 | </td> |
183 | 183 | </tr> |
184 | 184 | <tr> |
185 | 185 | <th><?php echo $_lang['defaultsearch_title'] ?><br><small>[(search_default)]</small></th> |
186 | 186 | <td> |
187 | - <?php echo wrap_label($_lang['yes'],form_radio('search_default', 1));?><br /> |
|
188 | - <?php echo wrap_label($_lang['no'],form_radio('search_default', 0));?> |
|
187 | + <?php echo wrap_label($_lang['yes'], form_radio('search_default', 1)); ?><br /> |
|
188 | + <?php echo wrap_label($_lang['no'], form_radio('search_default', 0)); ?> |
|
189 | 189 | <div class="comment"><?php echo $_lang['defaultsearch_message'] ?></div> |
190 | 190 | </td> |
191 | 191 | </tr> |
192 | 192 | <tr> |
193 | 193 | <th><?php echo $_lang['defaultmenuindex_title'] ?><br><small>[(auto_menuindex)]</small></th> |
194 | 194 | <td> |
195 | - <?php echo wrap_label($_lang['yes'],form_radio('auto_menuindex', 1));?><br /> |
|
196 | - <?php echo wrap_label($_lang['no'],form_radio('auto_menuindex', 0));?> |
|
195 | + <?php echo wrap_label($_lang['yes'], form_radio('auto_menuindex', 1)); ?><br /> |
|
196 | + <?php echo wrap_label($_lang['no'], form_radio('auto_menuindex', 0)); ?> |
|
197 | 197 | <div class="comment"><?php echo $_lang['defaultmenuindex_message'] ?></div> |
198 | 198 | </td> |
199 | 199 | </tr> |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | <table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"> |
204 | 204 | <select name="lst_custom_contenttype" style="width:200px;height:100px;" size="5"> |
205 | 205 | <?php |
206 | - $ct = explode(",",$custom_contenttype); |
|
207 | - for($i=0;$i<count($ct);$i++) { |
|
206 | + $ct = explode(",", $custom_contenttype); |
|
207 | + for ($i = 0; $i < count($ct); $i++) { |
|
208 | 208 | echo "<option value=\"".$ct[$i]."\">".$ct[$i]."</option>"; |
209 | 209 | } |
210 | 210 | ?> |
@@ -218,14 +218,14 @@ discard block |
||
218 | 218 | <th><?php echo $_lang['docid_incrmnt_method_title'] ?><br><small>[(docid_incrmnt_method)]</small></th> |
219 | 219 | <td> |
220 | 220 | <label><input type="radio" name="docid_incrmnt_method" value="0" |
221 | - <?php echo ($docid_incrmnt_method=='0') ? 'checked="checked"' : "" ; ?> /> |
|
221 | + <?php echo ($docid_incrmnt_method == '0') ? 'checked="checked"' : ""; ?> /> |
|
222 | 222 | <?php echo $_lang['docid_incrmnt_method_0']?></label><br /> |
223 | 223 | |
224 | 224 | <label><input type="radio" name="docid_incrmnt_method" value="1" |
225 | - <?php echo ($docid_incrmnt_method=='1') ? 'checked="checked"' : "" ; ?> /> |
|
225 | + <?php echo ($docid_incrmnt_method == '1') ? 'checked="checked"' : ""; ?> /> |
|
226 | 226 | <?php echo $_lang['docid_incrmnt_method_1']?></label><br /> |
227 | 227 | <label><input type="radio" name="docid_incrmnt_method" value="2" |
228 | - <?php echo ($docid_incrmnt_method=='2') ? 'checked="checked"' : "" ; ?> /> |
|
228 | + <?php echo ($docid_incrmnt_method == '2') ? 'checked="checked"' : ""; ?> /> |
|
229 | 229 | <?php echo $_lang['docid_incrmnt_method_2']?></label><br /> |
230 | 230 | </td> |
231 | 231 | </tr> |
@@ -233,24 +233,24 @@ discard block |
||
233 | 233 | <tr> |
234 | 234 | <th><?php echo $_lang['enable_cache_title'] ?><br><small>[(enable_cache)]</small></th> |
235 | 235 | <td> |
236 | - <?php echo wrap_label($_lang['enabled'],form_radio('enable_cache', 1));?><br /> |
|
237 | - <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0));?><br /> |
|
238 | - <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2));?> |
|
236 | + <?php echo wrap_label($_lang['enabled'], form_radio('enable_cache', 1)); ?><br /> |
|
237 | + <?php echo wrap_label($_lang['disabled'], form_radio('enable_cache', 0)); ?><br /> |
|
238 | + <?php echo wrap_label($_lang['disabled_at_login'], form_radio('enable_cache', 2)); ?> |
|
239 | 239 | </td> |
240 | 240 | </tr> |
241 | 241 | |
242 | 242 | <tr> |
243 | 243 | <th><?php echo $_lang['cache_type_title'] ?><br><small>[(cache_type)]</small></th> |
244 | 244 | <td> |
245 | -<?php echo wrap_label($_lang['cache_type_1'],form_radio('cache_type', 1));?><br /> |
|
246 | -<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2));?> |
|
245 | +<?php echo wrap_label($_lang['cache_type_1'], form_radio('cache_type', 1)); ?><br /> |
|
246 | +<?php echo wrap_label($_lang['cache_type_2'], form_radio('cache_type', 2)); ?> |
|
247 | 247 | </td> |
248 | 248 | </tr> |
249 | 249 | <tr> |
250 | 250 | <th><?php echo $_lang['minifyphp_incache_title'] ?><br><small>[(minifyphp_incache)]</small></th> |
251 | 251 | <td> |
252 | -<?php echo wrap_label($_lang['enabled'],form_radio('minifyphp_incache', 1));?><br /> |
|
253 | -<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0));?> |
|
252 | +<?php echo wrap_label($_lang['enabled'], form_radio('minifyphp_incache', 1)); ?><br /> |
|
253 | +<?php echo wrap_label($_lang['disabled'], form_radio('minifyphp_incache', 0)); ?> |
|
254 | 254 | <div class="comment"><?php echo $_lang['minifyphp_incache_message'] ?></div> |
255 | 255 | </td> |
256 | 256 | </tr> |
@@ -259,23 +259,23 @@ discard block |
||
259 | 259 | <th><?php echo $_lang['serveroffset_title'] ?><br><small>[(server_offset_time)]</small></th> |
260 | 260 | <td> <select name="server_offset_time" size="1" class="inputBox"> |
261 | 261 | <?php |
262 | - for($i=-24; $i<25; $i++) { |
|
263 | - $seconds = $i*60*60; |
|
264 | - $selectedtext = $seconds==$server_offset_time ? "selected='selected'" : "" ; |
|
262 | + for ($i = -24; $i < 25; $i++) { |
|
263 | + $seconds = $i * 60 * 60; |
|
264 | + $selectedtext = $seconds == $server_offset_time ? "selected='selected'" : ""; |
|
265 | 265 | ?> |
266 | 266 | <option value="<?php echo $seconds; ?>" <?php echo $selectedtext; ?>><?php echo $i; ?></option> |
267 | 267 | <?php |
268 | 268 | } |
269 | 269 | ?> |
270 | 270 | </select> |
271 | - <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time()+$server_offset_time)); ?></div> |
|
271 | + <div class="comment"><?php printf($_lang['serveroffset_message'], strftime('%H:%M:%S', time()), strftime('%H:%M:%S', time() + $server_offset_time)); ?></div> |
|
272 | 272 | </td> |
273 | 273 | </tr> |
274 | 274 | <tr> |
275 | 275 | <th><?php echo $_lang['server_protocol_title'] ?><br><small>[(server_protocol)]</small></th> |
276 | 276 | <td> |
277 | - <?php echo wrap_label($_lang['server_protocol_http'],form_radio('server_protocol', 'http'));?><br /> |
|
278 | - <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https'));?> |
|
277 | + <?php echo wrap_label($_lang['server_protocol_http'], form_radio('server_protocol', 'http')); ?><br /> |
|
278 | + <?php echo wrap_label($_lang['server_protocol_https'], form_radio('server_protocol', 'https')); ?> |
|
279 | 279 | <div class="comment"><?php echo $_lang['server_protocol_message'] ?></div> |
280 | 280 | </td> |
281 | 281 | </tr> |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | <tr> |
289 | 289 | <th><?php echo $_lang['track_visitors_title'] ?><br><small>[(track_visitors)]</small></th> |
290 | 290 | <td> |
291 | - <?php echo wrap_label($_lang['yes'],form_radio('track_visitors', 1));?><br /> |
|
292 | - <?php echo wrap_label($_lang['no'],form_radio('track_visitors', 0));?> |
|
291 | + <?php echo wrap_label($_lang['yes'], form_radio('track_visitors', 1)); ?><br /> |
|
292 | + <?php echo wrap_label($_lang['no'], form_radio('track_visitors', 0)); ?> |
|
293 | 293 | <div class="comment"><?php echo $_lang['track_visitors_message'] ?></div> |
294 | 294 | </td> |
295 | 295 | </tr> |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | <?php |
302 | 302 | // invoke OnSiteSettingsRender event |
303 | 303 | $evtOut = $modx->invokeEvent('OnSiteSettingsRender'); |
304 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
304 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
305 | 305 | ?> |
306 | 306 | </td> |
307 | 307 | </tr> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $MODX_SITE_HOSTNAMES = MODX_SITE_HOSTNAMES; // Fix for PHP 5.4 |
3 | - if(empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
3 | + if (empty($valid_hostnames) && empty($MODX_SITE_HOSTNAMES)) { |
|
4 | 4 | $valid_hostnames = $_SERVER['HTTP_HOST']; |
5 | 5 | } else { |
6 | 6 | $valid_hostnames = $MODX_SITE_HOSTNAMES; |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | <tr> |
16 | 16 | <th><?php echo $_lang['allow_eval_title']; ?><br><small>[(allow_eval)]</small></th> |
17 | 17 | <td> |
18 | -<?php echo wrap_label($_lang['allow_eval_with_scan'] , form_radio('allow_eval','with_scan'));?><br /> |
|
19 | -<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'] , form_radio('allow_eval','with_scan_at_post'));?><br /> |
|
20 | -<?php echo wrap_label($_lang['allow_eval_everytime_eval'] , form_radio('allow_eval','everytime_eval'));?><br /> |
|
21 | -<?php echo wrap_label($_lang['allow_eval_dont_eval'] , form_radio('allow_eval','dont_eval'));?> |
|
18 | +<?php echo wrap_label($_lang['allow_eval_with_scan'], form_radio('allow_eval', 'with_scan')); ?><br /> |
|
19 | +<?php echo wrap_label($_lang['allow_eval_with_scan_at_post'], form_radio('allow_eval', 'with_scan_at_post')); ?><br /> |
|
20 | +<?php echo wrap_label($_lang['allow_eval_everytime_eval'], form_radio('allow_eval', 'everytime_eval')); ?><br /> |
|
21 | +<?php echo wrap_label($_lang['allow_eval_dont_eval'], form_radio('allow_eval', 'dont_eval')); ?> |
|
22 | 22 | <div class="comment"> |
23 | 23 | <?php echo $_lang['allow_eval_msg'] ?> |
24 | 24 | </div> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | <tr> |
44 | 44 | <th><?php echo $_lang['check_files_onlogin_title'] ?><br><small>[(check_files_onlogin)]</small></th> |
45 | 45 | <td> |
46 | - <textarea name="check_files_onlogin"><?php echo $check_files_onlogin;?></textarea><br /> |
|
46 | + <textarea name="check_files_onlogin"><?php echo $check_files_onlogin; ?></textarea><br /> |
|
47 | 47 | |
48 | 48 | </td> |
49 | 49 | </tr> |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | <tr> |
54 | 54 | <td nowrap class="warning"><?php echo $_lang['validate_referer_title'] ?><br><small>[(validate_referer)]</small></td> |
55 | 55 | <td> |
56 | - <?php echo wrap_label($_lang['yes'],form_radio('validate_referer', 1));?><br /> |
|
57 | - <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0));?> |
|
56 | + <?php echo wrap_label($_lang['yes'], form_radio('validate_referer', 1)); ?><br /> |
|
57 | + <?php echo wrap_label($_lang['no'], form_radio('validate_referer', 0)); ?> |
|
58 | 58 | </td> |
59 | 59 | </tr> |
60 | 60 | <tr> |
@@ -89,25 +89,25 @@ discard block |
||
89 | 89 | <tr> |
90 | 90 | <th><?php echo $_lang['a17_error_reporting_title']; ?><br><small>[(error_reporting)]</small></th> |
91 | 91 | <td> |
92 | -<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting','0'));?><br /> |
|
93 | -<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting','1'));?><br /> |
|
94 | -<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting','2'));?><br /> |
|
95 | -<?php echo wrap_label($_lang['a17_error_reporting_opt99'],form_radio('error_reporting','99'));?> |
|
92 | +<?php echo wrap_label($_lang['a17_error_reporting_opt0'], form_radio('error_reporting', '0')); ?><br /> |
|
93 | +<?php echo wrap_label($_lang['a17_error_reporting_opt1'], form_radio('error_reporting', '1')); ?><br /> |
|
94 | +<?php echo wrap_label($_lang['a17_error_reporting_opt2'], form_radio('error_reporting', '2')); ?><br /> |
|
95 | +<?php echo wrap_label($_lang['a17_error_reporting_opt99'], form_radio('error_reporting', '99')); ?> |
|
96 | 96 | </td> |
97 | 97 | </tr> |
98 | 98 | <tr> |
99 | 99 | <td width="200"> </td> |
100 | - <td class="comment"> <?php echo $_lang['a17_error_reporting_msg'];?></td> |
|
100 | + <td class="comment"> <?php echo $_lang['a17_error_reporting_msg']; ?></td> |
|
101 | 101 | </tr> |
102 | 102 | <tr><td colspan="2"><div class="split"></div></td></tr> |
103 | 103 | <tr> |
104 | 104 | <th><?php echo $_lang['mutate_settings.dynamic.php6']; ?><br><small>[(send_errormail)]</small></th> |
105 | 105 | <td> |
106 | -<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'],form_radio('send_errormail','0'));?><br /> |
|
107 | -<?php echo wrap_label('error',form_radio('send_errormail','3'));?><br /> |
|
108 | -<?php echo wrap_label('error + warning',form_radio('send_errormail','2'));?><br /> |
|
109 | -<?php echo wrap_label('error + warning + information',form_radio('send_errormail','1'));?><br /> |
|
110 | -<?php echo parseText($_lang['mutate_settings.dynamic.php8'],array('emailsender'=>$modx->config['emailsender']));?></td> |
|
106 | +<?php echo wrap_label($_lang['mutate_settings.dynamic.php7'], form_radio('send_errormail', '0')); ?><br /> |
|
107 | +<?php echo wrap_label('error', form_radio('send_errormail', '3')); ?><br /> |
|
108 | +<?php echo wrap_label('error + warning', form_radio('send_errormail', '2')); ?><br /> |
|
109 | +<?php echo wrap_label('error + warning + information', form_radio('send_errormail', '1')); ?><br /> |
|
110 | +<?php echo parseText($_lang['mutate_settings.dynamic.php8'], array('emailsender'=>$modx->config['emailsender'])); ?></td> |
|
111 | 111 | </tr> |
112 | 112 | <tr> |
113 | 113 | <td colspan="2"><div class="split"></div></td> |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | <tr> |
116 | 116 | <th><?php echo $_lang['enable_bindings_title'] ?><br><small>[(enable_bindings)]</small></th> |
117 | 117 | <td> |
118 | -<?php echo wrap_label($_lang['yes'],form_radio('enable_bindings','1'));?><br /> |
|
119 | -<?php echo wrap_label($_lang['no'], form_radio('enable_bindings','0'));?> |
|
118 | +<?php echo wrap_label($_lang['yes'], form_radio('enable_bindings', '1')); ?><br /> |
|
119 | +<?php echo wrap_label($_lang['no'], form_radio('enable_bindings', '0')); ?> |
|
120 | 120 | |
121 | 121 | </td> |
122 | 122 | </tr> |
@@ -157,20 +157,20 @@ discard block |
||
157 | 157 | <th><?php echo $_lang['pwd_hash_algo_title'] ?><br><small>[(pwd_hash_algo)]</small></th> |
158 | 158 | <td> |
159 | 159 | <?php |
160 | -if(empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | -$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0:1; |
|
162 | -$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0:1; |
|
163 | -$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0:1; |
|
164 | -$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0:1; |
|
165 | -$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0:1; |
|
166 | -$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0:1; |
|
160 | +if (empty($pwd_hash_algo)) $phm['sel']['UNCRYPT'] = 1; |
|
161 | +$phm['e']['BLOWFISH_Y'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_Y') ? 0 : 1; |
|
162 | +$phm['e']['BLOWFISH_A'] = $modx->getManagerApi()->checkHashAlgorithm('BLOWFISH_A') ? 0 : 1; |
|
163 | +$phm['e']['SHA512'] = $modx->getManagerApi()->checkHashAlgorithm('SHA512') ? 0 : 1; |
|
164 | +$phm['e']['SHA256'] = $modx->getManagerApi()->checkHashAlgorithm('SHA256') ? 0 : 1; |
|
165 | +$phm['e']['MD5'] = $modx->getManagerApi()->checkHashAlgorithm('MD5') ? 0 : 1; |
|
166 | +$phm['e']['UNCRYPT'] = $modx->getManagerApi()->checkHashAlgorithm('UNCRYPT') ? 0 : 1; |
|
167 | 167 | ?> |
168 | -<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y']));?><br /> |
|
169 | -<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)',form_radio('pwd_hash_algo','BLOWFISH_A', '', $phm['e']['BLOWFISH_A']));?><br /> |
|
170 | -<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA512' , '', $phm['e']['SHA512']));?><br /> |
|
171 | -<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)' ,form_radio('pwd_hash_algo','SHA256' , '', $phm['e']['SHA256']));?><br /> |
|
172 | -<?php echo wrap_label('CRYPT_MD5 (salt & stretch)' ,form_radio('pwd_hash_algo','MD5' , '', $phm['e']['MD5']));?><br /> |
|
173 | -<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)' ,form_radio('pwd_hash_algo','UNCRYPT' , '', $phm['e']['UNCRYPT']));?> |
|
168 | +<?php echo wrap_label('CRYPT_BLOWFISH_Y (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_Y', '', $phm['e']['BLOWFISH_Y'])); ?><br /> |
|
169 | +<?php echo wrap_label('CRYPT_BLOWFISH_A (salt & stretch)', form_radio('pwd_hash_algo', 'BLOWFISH_A', '', $phm['e']['BLOWFISH_A'])); ?><br /> |
|
170 | +<?php echo wrap_label('CRYPT_SHA512 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA512', '', $phm['e']['SHA512'])); ?><br /> |
|
171 | +<?php echo wrap_label('CRYPT_SHA256 (salt & stretch)', form_radio('pwd_hash_algo', 'SHA256', '', $phm['e']['SHA256'])); ?><br /> |
|
172 | +<?php echo wrap_label('CRYPT_MD5 (salt & stretch)', form_radio('pwd_hash_algo', 'MD5', '', $phm['e']['MD5'])); ?><br /> |
|
173 | +<?php echo wrap_label('UNCRYPT(32 chars salt + SHA-1 hash)', form_radio('pwd_hash_algo', 'UNCRYPT', '', $phm['e']['UNCRYPT'])); ?> |
|
174 | 174 | </td> |
175 | 175 | </tr> |
176 | 176 | <tr> |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | ?> |
187 | 187 | <?php |
188 | 188 | $gdAvailable = extension_loaded('gd'); |
189 | -if(!$gdAvailable) $use_captcha = 0; |
|
189 | +if (!$gdAvailable) $use_captcha = 0; |
|
190 | 190 | ?> |
191 | 191 | <tr> |
192 | 192 | <td nowrap class="warning"><?php echo $_lang['captcha_title'] ?><br><small>[(use_captcha)]</small></td> |
193 | - <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha==1) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : ''; ?> /> |
|
193 | + <td> <label><input type="radio" id="captchaOn" name="use_captcha" value="1" <?php echo ($use_captcha == 1) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
194 | 194 | <?php echo $_lang['yes']?></label><br /> |
195 | - <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha==0) ? 'checked="checked"' : "" ; echo (!$gdAvailable)? ' readonly="readonly"' : '';?> /> |
|
195 | + <label><input type="radio" id="captchaOff" name="use_captcha" value="0" <?php echo ($use_captcha == 0) ? 'checked="checked"' : ""; echo (!$gdAvailable) ? ' readonly="readonly"' : ''; ?> /> |
|
196 | 196 | <?php echo $_lang['no']?></label> </td> |
197 | 197 | </tr> |
198 | 198 | <tr> |
@@ -202,23 +202,23 @@ discard block |
||
202 | 202 | <tr> |
203 | 203 | <td colspan="2"><div class="split"></div></td> |
204 | 204 | </tr> |
205 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
205 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
206 | 206 | <td nowrap class="warning"><?php echo $_lang['captcha_words_title'] ?><br><small>[(captcha_words)]</small> |
207 | 207 | <br /> |
208 | 208 | <p><?php echo $_lang['update_settings_from_language']; ?></p> |
209 | 209 | <select name="reload_captcha_words" id="reload_captcha_words_select" onchange="confirmLangChange(this, 'captcha_words_default', 'captcha_words_input');"> |
210 | -<?php echo get_lang_options('captcha_words_default');?> |
|
210 | +<?php echo get_lang_options('captcha_words_default'); ?> |
|
211 | 211 | </select> |
212 | 212 | </td> |
213 | 213 | <td><input type="text" id="captcha_words_input" name="captcha_words" style="width:250px" value="<?php echo $captcha_words; ?>" /> |
214 | - <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']);?>" /> |
|
214 | + <input type="hidden" name="captcha_words_default" id="captcha_words_default_hidden" value="<?php echo addslashes($_lang['captcha_words_default']); ?>" /> |
|
215 | 215 | </td> |
216 | 216 | </tr> |
217 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
217 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
218 | 218 | <td width="200"> </td> |
219 | 219 | <td class="comment"><?php echo $_lang['captcha_words_message'] ?></td> |
220 | 220 | </tr> |
221 | - <tr class="captchaRow" <?php echo showHide($use_captcha==1);?>> |
|
221 | + <tr class="captchaRow" <?php echo showHide($use_captcha == 1); ?>> |
|
222 | 222 | <td colspan="2"><div class="split"></div></td> |
223 | 223 | </tr> |
224 | 224 | <tr> |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | <?php |
227 | 227 | // invoke OnMiscSettingsRender event |
228 | 228 | $evtOut = $modx->invokeEvent('OnSecuritySettingsRender'); |
229 | - if(is_array($evtOut)) echo implode("",$evtOut); |
|
229 | + if (is_array($evtOut)) echo implode("", $evtOut); |
|
230 | 230 | ?> |
231 | 231 | </td> |
232 | 232 | </tr> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | if (!($modx->hasPermission('new_module') || $modx->hasPermission('edit_module') || $modx->hasPermission('exec_module'))) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["run_module"], "js:menuAction(1)", $_style['actions_run'], (!$modx->hasPermission('exec_module') ? 1 : 0)); |
31 | 31 | if ($modx->hasPermission('edit_module') || $modx->hasPermission('new_module') || $modx->hasPermission('delete_module')) { |
@@ -108,24 +108,24 @@ discard block |
||
108 | 108 | <div class="table-responsive"> |
109 | 109 | <?php |
110 | 110 | if ($_SESSION['mgrRole'] != 1 && !empty($modx->config['use_udperms'])) { |
111 | - $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"' . $_lang['yes'] . '","-") as disabled, IF(sm.icon<>"",sm.icon,"' . $_style['icons_modules'] . '") as icon |
|
112 | - FROM ' . $modx->getFullTableName('site_modules') . ' AS sm |
|
113 | - LEFT JOIN ' . $modx->getFullTableName('site_module_access') . ' AS sma ON sma.module = sm.id |
|
114 | - LEFT JOIN ' . $modx->getFullTableName('member_groups') . ' AS mg ON sma.usergroup = mg.user_group |
|
115 | - WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID() . ') AND sm.disabled != 1 AND sm.locked != 1 |
|
111 | + $rs = $modx->getDatabase()->query('SELECT DISTINCT sm.id, sm.name, sm.description, mg.member, IF(disabled,"'.$_lang['yes'].'","-") as disabled, IF(sm.icon<>"",sm.icon,"'.$_style['icons_modules'].'") as icon |
|
112 | + FROM ' . $modx->getFullTableName('site_modules').' AS sm |
|
113 | + LEFT JOIN ' . $modx->getFullTableName('site_module_access').' AS sma ON sma.module = sm.id |
|
114 | + LEFT JOIN ' . $modx->getFullTableName('member_groups').' AS mg ON sma.usergroup = mg.user_group |
|
115 | + WHERE (mg.member IS NULL OR mg.member = ' . $modx->getLoginUserID().') AND sm.disabled != 1 AND sm.locked != 1 |
|
116 | 116 | ORDER BY sm.name'); |
117 | 117 | if ($modx->hasPermission('edit_module')) { |
118 | - $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
118 | + $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
119 | 119 | } else if ($modx->hasPermission('exec_module')) { |
120 | - $title = "<a href='index.php?a=112&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
120 | + $title = "<a href='index.php?a=112&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
121 | 121 | } else { |
122 | 122 | $title = '[+value+]'; |
123 | 123 | } |
124 | 124 | } else { |
125 | 125 | $rs = $modx->getDatabase()->select("id, name, description, IF(locked,'{$_lang['yes']}','-') as locked, IF(disabled,'{$_lang['yes']}','-') as disabled, IF(icon<>'',icon,'{$_style['icons_module']}') as icon", $modx->getFullTableName("site_modules"), (!empty($sqlQuery) ? "(name LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "name"); |
126 | - $title = "<a href='index.php?a=108&id=[+id+]' title='" . $_lang["module_edit_click_title"] . "'>[+value+]</a>"; |
|
126 | + $title = "<a href='index.php?a=108&id=[+id+]' title='".$_lang["module_edit_click_title"]."'>[+value+]</a>"; |
|
127 | 127 | } |
128 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
128 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
129 | 129 | $grd = new DataGrid('', $rs, $number_of_results); // set page size to 0 t show all items |
130 | 130 | $grd->noRecordMsg = $_lang["no_records_found"]; |
131 | 131 | $grd->cssClass = "table data"; |
@@ -133,10 +133,10 @@ discard block |
||
133 | 133 | $grd->itemClass = "tableItem"; |
134 | 134 | $grd->altItemClass = "tableAltItem"; |
135 | 135 | $grd->fields = "icon,name,description,locked,disabled"; |
136 | - $grd->columns = $_lang["icon"] . " ," . $_lang["name"] . " ," . $_lang["description"] . " ," . $_lang["locked"] . " ," . $_lang["disabled"]; |
|
136 | + $grd->columns = $_lang["icon"]." ,".$_lang["name"]." ,".$_lang["description"]." ,".$_lang["locked"]." ,".$_lang["disabled"]; |
|
137 | 137 | $grd->colWidths = "34,,,60,60"; |
138 | 138 | $grd->colAligns = "center,,,center,center"; |
139 | - $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang["click_to_context"] . "'><i class='[+value+]'></i></a>||template:" . $title; |
|
139 | + $grd->colTypes = "template:<a class='tableRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang["click_to_context"]."'><i class='[+value+]'></i></a>||template:".$title; |
|
140 | 140 | if ($listmode == '1') { |
141 | 141 | $grd->pageSize = 0; |
142 | 142 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('view_eventlog')) { |
|
5 | +if (!$modx->hasPermission('view_eventlog')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | $modx->getManagerApi()->initPageViewState(); |
16 | 16 | |
17 | 17 | // get and save search string |
18 | -if($_REQUEST['op'] == 'reset') { |
|
18 | +if ($_REQUEST['op'] == 'reset') { |
|
19 | 19 | $sqlQuery = $query = ''; |
20 | 20 | $_PAGE['vs']['search'] = ''; |
21 | 21 | } else { |
22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
23 | - if(!is_numeric($sqlQuery)) { |
|
23 | + if (!is_numeric($sqlQuery)) { |
|
24 | 24 | $sqlQuery = $modx->getDatabase()->escape($query); |
25 | 25 | } |
26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $_PAGE['vs']['lm'] = $listmode; |
32 | 32 | |
33 | 33 | // context menu |
34 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
34 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
35 | 35 | $cm = new ContextMenu("cntxm", 150); |
36 | 36 | $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['actions_preview']); |
37 | 37 | $cm->addSeparator(); |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | <?php |
128 | 128 | $ds = $modx->getDatabase()->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el |
129 | 129 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0 |
130 | - LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
131 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
130 | + LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC"); |
|
131 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
132 | 132 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items |
133 | 133 | $grd->pagerClass = ''; |
134 | 134 | $grd->pageClass = 'page-item'; |
@@ -139,14 +139,14 @@ discard block |
||
139 | 139 | $grd->itemClass = "tableItem"; |
140 | 140 | $grd->altItemClass = "tableAltItem"; |
141 | 141 | $grd->fields = "type,source,createdon,eventid,username"; |
142 | - $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
142 | + $grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid']; |
|
143 | 143 | $grd->colWidths = "1%,,1%,1%,1%"; |
144 | 144 | $grd->colAligns = "center,,,center,center"; |
145 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
146 | - if($listmode == '1') { |
|
145 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p'; |
|
146 | + if ($listmode == '1') { |
|
147 | 147 | $grd->pageSize = 0; |
148 | 148 | } |
149 | - if($_REQUEST['op'] == 'reset') { |
|
149 | + if ($_REQUEST['op'] == 'reset') { |
|
150 | 150 | $grd->pageNumber = 1; |
151 | 151 | } |
152 | 152 | // render grid |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
2 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | 3 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | 5 | |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
19 | 19 | } |
20 | 20 | |
21 | -$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
21 | +$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
22 | 22 | |
23 | 23 | // Get table names (alphabetical) |
24 | 24 | $tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets'); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $content['name'] = $_REQUEST['itemname']; |
48 | 48 | } else { |
49 | 49 | $_SESSION['itemname'] = $_lang["new_htmlsnippet"]; |
50 | - $content['category'] = (int)$_REQUEST['catid']; |
|
50 | + $content['category'] = (int) $_REQUEST['catid']; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if ($modx->getManagerApi()->hasFormValues()) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | // Add lock-element JS-Script |
66 | 66 | $lockElementId = $id; |
67 | 67 | $lockElementType = 3; |
68 | -require_once(MODX_MANAGER_PATH . 'includes/active_user_locks.inc.php'); |
|
68 | +require_once(MODX_MANAGER_PATH.'includes/active_user_locks.inc.php'); |
|
69 | 69 | |
70 | 70 | // Print RTE Javascript function |
71 | 71 | ?> |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | <input type="hidden" name="mode" value="<?= $modx->getManagerApi()->action ?>" /> |
137 | 137 | |
138 | 138 | <h1> |
139 | - <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'] . '<small>(' . $content['id'] . ')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
139 | + <i class="fa fa-th-large"></i><?= ($content['name'] ? $content['name'].'<small>('.$content['id'].')</small>' : $_lang['new_htmlsnippet']) ?><i class="fa fa-question-circle help"></i> |
|
140 | 140 | </h1> |
141 | 141 | |
142 | 142 | <?= $_style['actionbuttons']['dynamic']['element'] ?> |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | <div class="form-control-name clearfix"> |
161 | 161 | <input name="name" type="text" maxlength="100" value="<?= $modx->getPhpCompat()->htmlspecialchars($content['name']) ?>" class="form-control form-control-lg" onchange="documentDirty=true;" /> |
162 | 162 | <?php if ($modx->hasPermission('save_role')): ?> |
163 | - <label class="custom-control" title="<?= $_lang['lock_htmlsnippet'] . "\n" . $_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
163 | + <label class="custom-control" title="<?= $_lang['lock_htmlsnippet']."\n".$_lang['lock_htmlsnippet_msg'] ?>" tooltip> |
|
164 | 164 | <input name="locked" type="checkbox" value="on"<?= ($content['locked'] == 1 || $content['locked'] == 'on' ? ' checked="checked"' : '') ?> /> |
165 | 165 | <i class="fa fa-lock"></i> |
166 | 166 | </label> |
@@ -184,9 +184,9 @@ discard block |
||
184 | 184 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
185 | 185 | <option> </option> |
186 | 186 | <?php |
187 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
187 | + include_once(MODX_MANAGER_PATH.'includes/categories.inc.php'); |
|
188 | 188 | foreach (getCategories() as $n => $v) { |
189 | - echo "\t\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '') . '>' . $modx->getPhpCompat()->htmlspecialchars($v['category']) . "</option>\n"; |
|
189 | + echo "\t\t\t\t".'<option value="'.$v['id'].'"'.($content['category'] == $v['id'] || (empty($content['category']) && $_POST['categoryid'] == $v['id']) ? ' selected="selected"' : '').'>'.$modx->getPhpCompat()->htmlspecialchars($v['category'])."</option>\n"; |
|
190 | 190 | } |
191 | 191 | ?> |
192 | 192 | </select> |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | </div> |
201 | 201 | <?php if ($_SESSION['mgrRole'] == 1): ?> |
202 | 202 | <div class="form-row"> |
203 | - <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>" . $_lang['disabled'] . "</span>" : $_lang['disabled']) ?></label> |
|
203 | + <label><input name="disabled" type="checkbox" value="on"<?= ($content['disabled'] == 1 ? ' checked="checked"' : '') ?> /> <?= ($content['disabled'] == 1 ? "<span class='text-danger'>".$_lang['disabled']."</span>" : $_lang['disabled']) ?></label> |
|
204 | 204 | </div> |
205 | 205 | <?php endif; ?> |
206 | 206 | </div> |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $evtOut = $modx->invokeEvent('OnRichTextEditorRegister'); |
217 | 217 | if (is_array($evtOut)) { |
218 | 218 | foreach ($evtOut as $i => $editor) { |
219 | - echo "\t" . '<option value="' . $editor . '"' . ($which_editor == $editor ? ' selected="selected"' : '') . '>' . $editor . "</option>\n"; |
|
219 | + echo "\t".'<option value="'.$editor.'"'.($which_editor == $editor ? ' selected="selected"' : '').'>'.$editor."</option>\n"; |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | ?> |