Beispiel #1
0
        $this->open($stringDB);
    }
}
$type = $_REQUEST["type"];
//Läser in variablen type från GET-meddelandet.
if ($type == "getLogs") {
    //Hämta alla loggar	graphLog.php?type=getLogs
    getLogs();
} else {
    if ($type == "loadLog") {
        //Ladda ett loggschema graphLog.php?type=loadLog&date="2015/05/20 10:47"
        loadLog();
    } else {
        if ($type == "deleteLog") {
            //Ta bort en logg 	graphLog.php?type=deleteLog&date="2015/04/22"
            deleteLog();
        } else {
            if ($type == "loadCurrent") {
                //Load the most recent log  graphLog.php?type=loadCurrent
                loadCurrent();
            }
        }
    }
}
function getLogs()
{
    $db = new MyDB("sqltemptime.db");
    if (!$db) {
        echo $db->lastErrorMsg();
    }
    $sql = <<<EOF
Beispiel #2
0
			})();
		</script>
		';
}
/*	
	// Client browser caching to do:
	$mod_time = filemtime($image_path.'tiny/'.$filename);
	$expires = 604800;

	header("Content-type: image/jpeg");
	header("Cache-Control: private, max-age=".$expires.", pre-check=".$expires."");
	header("Expires: " . gmdate('D, d M Y H:i:s', strtotime( '+'.$expires.' seconds')) . " GMT");

	if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
		// if the browser has a cached version of this image, send 304
		header("Last-Modified: " . gmdate('D, d M Y H:i:s', $mod_time).' GMT');
		header("HTTP/1.1 304 Not Modified");
		die;
	} elseif(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $mod_time)) {
		// option 2, if you have a file to base your mod date off:
		// send the last mod time of the file back
		header('Last-Modified: '.gmdate('D, d M Y H:i:s', $mod_time).' GMT',true, 304);
		header("HTTP/1.1 304 Not Modified");
		die;
	} else {
		header("Last-Modified: " . gmdate('D, d M Y H:i:s', $mod_time).' GMT');
	}
*/
// Clear development log:
deleteLog($config);