Example #1
0
// Uncomment if there are language overrides
//if ( $skinLangFile = loadLanguage( ZM_SKIN_PATH ) )
//require_once( $skinLangFile );
foreach (getSkinIncludes('includes/config.php') as $includeFile) {
    require_once $includeFile;
}
foreach (getSkinIncludes('includes/functions.php') as $includeFile) {
    require_once $includeFile;
}
if (empty($view)) {
    $view = isset($user) ? 'console' : 'login';
}
if (!isset($user) && ZM_OPT_USE_AUTH && ZM_AUTH_TYPE == "remote" && !empty($_SERVER['REMOTE_USER'])) {
    $view = "postlogin";
    $action = "login";
    $_REQUEST['username'] = $_SERVER['REMOTE_USER'];
}
if (isset($user)) {
    // Bandwidth Limiter
    if (!empty($user['MaxBandwidth'])) {
        if ($user['MaxBandwidth'] == "low") {
            $_COOKIE['zmBandwidth'] = "low";
        } elseif ($user['MaxBandwidth'] == "medium" && $_COOKIE['zmBandwidth'] == "high") {
            $_COOKIE['zmBandwidth'] = "medium";
        }
    }
}
// If there are additional actions
foreach (getSkinIncludes('includes/actions.php') as $includeFile) {
    require_once $includeFile;
}
Example #2
0
    $row = dbFetchOne('SELECT * FROM Groups WHERE Id = ?', NULL, array($_REQUEST['group']));
    $groupSql = " and find_in_set( Id, '" . $row['MonitorIds'] . "' )";
}
$mid = validInt($_REQUEST['mid']);
$sql = "SELECT * FROM Monitors WHERE Function != 'None' AND Controllable = 1{$groupSql} ORDER BY Sequence";
$mids = array();
foreach (dbFetchAll($sql) as $row) {
    if (!visibleMonitor($row['Id'])) {
        continue;
    }
    if (empty($mid)) {
        $mid = $row['Id'];
    }
    $mids[$row['Id']] = $row['Name'];
}
foreach (getSkinIncludes('includes/control_functions.php') as $includeFile) {
    require_once $includeFile;
}
$sql = 'SELECT C.*,M.* FROM Monitors AS M INNER JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
$monitor = dbFetchOne($sql, NULL, array($mid));
$focusWindow = true;
xhtmlHeaders(__FILE__, $SLANG['Control']);
?>
<body>
  <div id="page">
    <div id="header">
      <div id="headerButtons">
        <a href="#" onclick="closeWindow();"><?php 
echo $SLANG['Close'];
?>
</a>
Example #3
0
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
if (!canView('Events')) {
    $view = "error";
    return;
}
foreach (getSkinIncludes('includes/timeline_functions.php') as $includeFile) {
    require_once $includeFile;
}
//
// Date/time formats used in charts
//
// These are the time axis range text. The first of each pair is the start date/time
// and the second is the last so often contains additional information
//
// When the chart range is years
define("STRF_TL_AXIS_RANGE_YEAR1", "%b %Y");
define("STRF_TL_AXIS_RANGE_YEAR2", STRF_TL_AXIS_RANGE_YEAR1);
// When the chart range is months
define("STRF_TL_AXIS_RANGE_MONTH1", "%b");
define("STRF_TL_AXIS_RANGE_MONTH2", STRF_TL_AXIS_RANGE_MONTH1 . " %Y");
// When the chart range is days
Example #4
0
            Fatal("Request '{$request}' does not exist");
        }
        require_once $includeFile;
    }
    return;
} else {
    if ($includeFiles = getSkinIncludes('views/' . $view . '.php', true, true)) {
        foreach ($includeFiles as $includeFile) {
            if (!file_exists($includeFile)) {
                Fatal("View '{$view}' does not exist");
            }
            require_once $includeFile;
        }
        // If the view overrides $view to 'error', and the user is not logged in, then the
        // issue is probably resolvable by logging in, so provide the opportunity to do so.
        // The login view should handle redirecting to the correct location afterward.
        if ($view == 'error' && !isset($user)) {
            $view = 'login';
            foreach (getSkinIncludes('views/login.php', true, true) as $includeFile) {
                require_once $includeFile;
            }
        }
    }
    // If the view is missing or the view still returned error with the user logged in,
    // then it is not recoverable.
    if (!$includeFiles || $view == 'error') {
        foreach (getSkinIncludes('views/error.php', true, true) as $includeFile) {
            require_once $includeFile;
        }
    }
}