logXmlErr("Not all parameters specified for action Monitor state");
         exit;
     }
     $mid = validInteger($_GET['mid']);
     if (!isMonitor($mid)) {
         exit;
     }
     $url = "./index.php?view=none&action=function&mid=" . $mid . "&newFunction=" . validString($_GET['func']) . "&newEnabled=" . validString($_GET['en']);
     header("Location: " . $url);
     exit;
 } else {
     if (!strcmp($action, "vlog")) {
         /* ACTION: View log file. Must have debug and log to file enabled, and sufficient perms 
          * Parms: [lines] */
         if (!canEdit('System')) {
             logXmlErr("Insufficient permissions to view log file");
             echo "Insufficient permissions to view log file";
             exit;
         }
         if (!ZM_EYEZM_DEBUG || !ZM_EYEZM_LOG_TO_FILE) {
             echo "eyeZm Debug (EYEZM_DEBUG) or log-to-file (EYEZM_LOG_TO_FILE) not enabled. Please enable first";
             exit;
         }
         if (!file_exists(ZM_EYEZM_LOG_FILE)) {
             echo "Log file " . ZM_EYEZM_LOG_FILE . " doesn't exist";
             exit;
         }
         $lines = validInteger(getset('lines', ZM_EYEZM_LOG_LINES));
         logXml("Returning last " . $lines . " lines of eyeZm Log from " . ZM_EYEZM_LOG_FILE);
         echo shell_exec("tail -n " . $lines . " " . ZM_EYEZM_LOG_FILE);
         echo "\n\n--- Showing last " . $lines . " lines ---\n";
Exemple #2
0
/** Returns whether necessary components for H264 streaming
 * are present */
function canStream264($sup = 0)
{
    if (!ffmpegSupportsCodec("libx264")) {
        if (!$sup) {
            logXmlErr("FFMPEG not installed, accessible in path/ZM_PATH_FFMPEG, or doesn't support libx264");
        }
        return FALSE;
    }
    /* Make sure segmenter exists */
    if (!exeExists(shell_exec("which segmenter"))) {
        if (!$sup) {
            logXmlErr("HTTP segmenter not installed or not accessible in path");
        }
        return FALSE;
    }
    /* Check for zmstreamer */
    if (!exeExists(shell_exec("which zmstreamer"))) {
        if (!$sup) {
            logXmlErr("ZMSTREAMER not installed or not accessible in path");
        }
        return FALSE;
    }
    return TRUE;
}