Пример #1
0
    $monitors[$i] = array_merge($monitors[$i], $counts);
    $seqIdList[] = $monitors[$i]['Id'];
    $displayMonitors[] = $monitors[$i];
}
$states = dbFetchAll("select * from States");
/* XML Dump Starts here */
xml_header();
/* Print out the general section */
xml_tag_sec("ZM_XML", 1);
xml_tag_sec("GENERAL", 1);
xml_tag_val("RUNNING", $running);
xml_tag_val("PROTOVER", ZM_EYEZM_PROTOCOL_VERSION);
xml_tag_val("FEATURESET", ZM_EYEZM_FEATURE_SET);
xml_tag_val("VERSION", ZM_VERSION);
xml_tag_val("CANSTR264", canStream264(1));
xml_tag_val("GD", gdExists());
xml_tag_val("FVCODEC", ZM_EYEZM_FEED_VCODEC);
xml_tag_val("FVTMT", ZM_EYEZM_H264_TIMEOUT);
xml_tag_val("USER", $user['Username']);
xml_tag_val("UID", $user['Id']);
/* Permissions block */
xml_tag_sec("PERMS", 1);
xml_tag_val("STREAM", $user['Stream']);
xml_tag_val("EVENTS", $user['Events']);
xml_tag_val("CONTROL", $user['Control']);
xml_tag_val("MONITORS", $user['Monitors']);
xml_tag_val("DEVICES", $user['Devices']);
xml_tag_val("SYSTEM", $user['System']);
xml_tag_sec("PERMS", 0);
/* End permissions block */
if (canEdit('System')) {
Пример #2
0
     $suffix = "capture";
 }
 /* A frame index of 0 is invalid, so if we see this, just use frame 1 */
 if (!$frame) {
     $frame = 1;
 }
 /* Suffix based on 'analyze' */
 $fname = sprintf("%0" . ZM_EVENT_IMAGE_DIGITS . "d-%s.jpg", $frame, $suffix);
 $url = "./" . getEventPathSafe($event) . "/" . $fname;
 if (!file_exists($url)) {
     logXmlErr("Invalid frame image requested: " . $url);
     $url = "./skins/xml/views/notfound.png";
 }
 /* Check if the image needs any processing - check for GD if requested */
 if ($scale != 100 || $qty < 100) {
     if (!gdExists()) {
         logXmlErr("Lib GD is not loaded, but required for image scaling functions");
         $url = "./skins/xml/views/notfound.png";
     } else {
         if (!($img = imagecreatefromjpeg($url))) {
             logXmlErr("Could not load JPEG from " . $url);
             $url = "./skins/xml/views/notfound.png";
         } else {
             /* GD exists and we read the file ok */
             header('Content-type: image/jpeg');
             /* Check if resizing is needed */
             if ($scale != 100) {
                 list($width_orig, $height_orig) = getimagesize($url);
                 $width_new = $width_orig * ($scale / 100);
                 $height_new = $height_orig * ($scale / 100);
                 $img_new = imagecreatetruecolor($width_new, $height_new);