2023-05-15 21:45:18 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
GET Variables
|
2023-05-21 19:14:28 +00:00
|
|
|
Optional:
|
|
|
|
id: id of the crontab
|
2023-05-15 21:45:18 +00:00
|
|
|
*/
|
|
|
|
$GLOBALS['db'] = new SQLite3('../../webcron.db');
|
|
|
|
|
2023-05-21 19:14:28 +00:00
|
|
|
if (!array_key_exists("id", $_GET)) {
|
2023-05-15 21:45:18 +00:00
|
|
|
$name = "";
|
|
|
|
} else {
|
2023-05-21 19:14:28 +00:00
|
|
|
$id = $_GET["id"];
|
2023-05-15 21:45:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$db = $GLOBALS['db'];
|
|
|
|
|
|
|
|
if (empty($id)){
|
|
|
|
echo "$name is not a valid crontab";
|
|
|
|
} else {
|
|
|
|
$data = $db->querySingle("SELECT crontab_data FROM crontabs WHERE crontab_id = $id;");
|
2023-05-21 19:14:28 +00:00
|
|
|
$lines = explode("\n", $data);
|
|
|
|
foreach ($lines as $line){
|
|
|
|
echo "$line<br>";
|
|
|
|
}
|
2023-05-15 21:45:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|