From a2958fe2889a77939bdd040d0f4f167d9ad098c3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 3 Aug 2020 10:57:08 -0400 Subject: [PATCH] Spacing, and don't output mootools for postlogin. Don't use mootools in postlogin --- web/skins/classic/includes/functions.php | 100 ++++++++++---------- web/skins/classic/views/js/postlogin.js.php | 7 +- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 570eaaf50..abd9b98c8 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -18,7 +18,6 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. // - function xhtmlHeaders($file, $title) { global $css; global $skin; @@ -59,6 +58,7 @@ function xhtmlHeaders($file, $title) { foreach ( $files as $file ) { $html[] = ''; } + $html[] = ''; // So we ge a trailing \n return implode("\n", $html); } ?> @@ -68,7 +68,7 @@ function xhtmlHeaders($file, $title) { - <?php echo validHtmlStr(ZM_WEB_TITLE_PREFIX); ?> - <?php echo validHtmlStr($title) ?> + <?php echo validHtmlStr(ZM_WEB_TITLE_PREFIX) . ' - ' . validHtmlStr($title) ?> - - - - + + + - - + @@ -265,7 +260,7 @@ function getNavBarHTML() { global $sortQuery; global $limitQuery; - if (!$sortQuery) { + if ( !$sortQuery ) { parseSort(); } if ( (!$filterQuery) and isset($_REQUEST['filter']) ) { @@ -318,7 +313,7 @@ function getNormalNavBarHTML($running, $user, $bandwidth_options, $view, $filter echo getLogHTML(); echo getDevicesHTML(); echo getGroupsHTML($view); - echo getFilterHTML($view,$filterQuery,$sortQuery,$limitQuery); + echo getFilterHTML($view, $filterQuery, $sortQuery, $limitQuery); echo getCycleHTML($view); echo getMontageHTML($view); echo getMontageReviewHTML($view); @@ -375,7 +370,6 @@ function getNormalNavBarHTML($running, $user, $bandwidth_options, $view, $filter '.PHP_EOL; $result .= 'trending_up'.PHP_EOL; @@ -482,14 +476,14 @@ function getSysLoadHTML() { // Returns the html representing the current number of connections made to the database function getDbConHTML() { - $result=''; + $result = ''; $connections = dbFetchOne('SHOW status WHERE variable_name=\'threads_connected\'', 'Value'); $max_connections = dbFetchOne('SHOW variables WHERE variable_name=\'max_connections\'', 'Value'); $percent_used = $max_connections ? 100 * $connections / $max_connections : 100; - $class = ( $percent_used > 90 ) ? 'text-warning' : ''; + $class = ( $percent_used > 90 ) ? ' text-warning' : ''; - $result .= ''.PHP_EOL; @@ -499,7 +493,7 @@ function getDbConHTML() { // Returns the html representing up to 4 storage areas and their current capacity function getStorageHTML() { - $result=''; + $result = ''; $func = function($S) { $class = ''; @@ -538,7 +532,7 @@ function getStorageHTML() { // Returns the html representing the current capacity of mapped memory filesystem (usually /dev/shm) function getShmHTML() { - $result=''; + $result = ''; $shm_percent = getDiskPercent(ZM_PATH_MAP); $shm_total_space = disk_total_space(ZM_PATH_MAP); @@ -557,37 +551,40 @@ function getShmHTML() { // Returns the html representing the optional web console banner text function getConsoleBannerHTML() { - $result=''; + $result = ''; if ( defined('ZM_WEB_CONSOLE_BANNER') and ZM_WEB_CONSOLE_BANNER != '' ) { $result .= '

'.validHtmlStr(ZM_WEB_CONSOLE_BANNER).'

'; } - return $result; } // Returns the html representing the current high,medium,low bandwidth setting -function getBandwidthHTML($bandwidth_options,$user) { - $result=''; +function getBandwidthHTML($bandwidth_options, $user) { + $result = ''; - $result .= ''.PHP_EOL; + $result .= ''.PHP_EOL; return $result; } // Returns the html representing the version of ZoneMinder function getZMVersionHTML() { - $result=''; + $result = ''; $class = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'text-danger':''; - $result .= ''.PHP_EOL; + $result .= ''.PHP_EOL; return $result; } // Returns the html representing the ZoneMinder logo function getNavBrandHTML() { - $result=''; + $result = ''; $result .= '' .ZM_HOME_CONTENT. ''.PHP_EOL; @@ -596,7 +593,7 @@ function getNavBrandHTML() { // Returns the html representing the Console menu item function getConsoleHTML() { - $result=''; + $result = ''; if ( canView('Monitors') ) { $result .= ''.PHP_EOL; @@ -607,7 +604,7 @@ function getConsoleHTML() { // Returns the html representing the Options menu item function getOptionsHTML() { - $result=''; + $result = ''; if ( canView('System') ) { $result .= ''.PHP_EOL; @@ -618,7 +615,7 @@ function getOptionsHTML() { // Returns the html representing the Log menu item function getLogHTML() { - $result=''; + $result = ''; if ( canView('System') ) { if ( ZM\logToDatabase() > ZM\Logger::NOLOG ) { @@ -647,13 +644,15 @@ function getLogHTML() { // Returns the html representing the log icon function getLogIconHTML() { - $result=''; + $result = ''; if ( canView('System') ) { if ( ZM\logToDatabase() > ZM\Logger::NOLOG ) { $logstate = logState(); $class = ($logstate == 'ok') ? 'text-success' : ($logstate == 'alert' ? 'text-warning' : (($logstate == 'alarm' ? 'text-danger' : ''))); - $result .= ''.PHP_EOL; + $result .= ''.PHP_EOL; } } @@ -662,7 +661,7 @@ function getLogIconHTML() { // Returns the html representing the X10 Devices menu item function getDevicesHTML() { - $result=''; + $result = ''; if ( ZM_OPT_X10 && canView('Devices') ) { $result .= ''.PHP_EOL; @@ -673,7 +672,7 @@ function getDevicesHTML() { // Returns the html representing the Groups menu item function getGroupsHTML($view) { - $result=''; + $result = ''; $class = $view == 'groups' ? ' selected' : ''; $result .= ''.PHP_EOL; @@ -682,8 +681,8 @@ function getGroupsHTML($view) { } // Returns the html representing the Filter menu item -function getFilterHTML($view,$filterQuery,$sortQuery,$limitQuery) { - $result=''; +function getFilterHTML($view, $filterQuery, $sortQuery, $limitQuery) { + $result = ''; $class = $view == 'filter' ? ' selected' : ''; $result .= ''.PHP_EOL; @@ -693,7 +692,7 @@ function getFilterHTML($view,$filterQuery,$sortQuery,$limitQuery) { // Returns the html representing the Cycle menu item function getCycleHTML($view) { - $result=''; + $result = ''; if ( canView('Stream') ) { $class = $view == 'cycle' ? ' selected' : ''; @@ -705,7 +704,7 @@ function getCycleHTML($view) { // Returns the html representing the Montage menu item function getMontageHTML($view) { - $result=''; + $result = ''; if ( canView('Stream') ) { $class = $view == 'cycle' ? ' selected' : ''; @@ -717,7 +716,7 @@ function getMontageHTML($view) { // Returns the html representing the MontageReview menu item function getMontageReviewHTML($view) { - $result=''; + $result = ''; if ( canView('Events') ) { if ( isset($_REQUEST['filter']['Query']['terms']['attr']) ) { @@ -744,7 +743,7 @@ function getMontageReviewHTML($view) { // Returns the html representing the Audit Events Report menu item function getRprtEvntAuditHTML($view) { - $result=''; + $result = ''; if ( canView('Events') ) { $class = $view == 'report_event_audit' ? ' selected' : ''; @@ -756,7 +755,7 @@ function getRprtEvntAuditHTML($view) { // Returns the html representing the header collapse toggle menu item function getHeaderFlipHTML() { - $result=''; + $result = ''; $header = ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'down') ? 'down' : 'up'; $result .= ''.PHP_EOL; @@ -766,12 +765,13 @@ function getHeaderFlipHTML() { // Returns the html representing the logged in user name and avatar function getAcctCircleHTML($user=null) { - $result=''; + $result = ''; if ( ZM_OPT_USE_AUTH and $user ) { $result .= ''.PHP_EOL; } @@ -780,7 +780,7 @@ function getAcctCircleHTML($user=null) { // Returns the html representing the runtime status button function getStatusBtnHTML($status) { - $result=''; + $result = ''; if ( canEdit('System') ) { //$result .= '