From 8fabf77b2a7720a357c63817c07035a9908818a0 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 10 Nov 2021 17:53:50 +0100 Subject: Update --- Neutron-trunk/api/admin/calendar_create.php | 155 ---------------------------- 1 file changed, 155 deletions(-) delete mode 100644 Neutron-trunk/api/admin/calendar_create.php (limited to 'Neutron-trunk/api/admin/calendar_create.php') diff --git a/Neutron-trunk/api/admin/calendar_create.php b/Neutron-trunk/api/admin/calendar_create.php deleted file mode 100644 index 6384528..0000000 --- a/Neutron-trunk/api/admin/calendar_create.php +++ /dev/null @@ -1,155 +0,0 @@ - -', '>', $name); - $name = str_replace('<', '<', $name); - if (strlen($name) > 75) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["calnamelong"]); - } - if (trim($name) == "") { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["calnamenone"]); - } - $desc = str_replace('>', '>', $desc); - $desc = str_replace('<', '<', $desc); - if ($day == "1") { - $daystr = $lang["api"]["calordinal"]; - } else { - $daystr = $day; - } - if ($month == "01") { - $monthstr = $lang["api"]["calminmonths"][0]; - } - if ($month == "02") { - $monthstr = $lang["api"]["calminmonths"][1]; - } - if ($month == "03") { - $monthstr = $lang["api"]["calminmonths"][2]; - } - if ($month == "04") { - $monthstr = $lang["api"]["calminmonths"][3]; - } - if ($month == "05") { - $monthstr = $lang["api"]["calminmonths"][4]; - } - if ($month == "06") { - $monthstr = $lang["api"]["calminmonths"][5]; - } - if ($month == "07") { - $monthstr = $lang["api"]["calminmonths"][6]; - } - if ($month == "08") { - $monthstr = $lang["api"]["calminmonths"][7]; - } - if ($month == "09") { - $monthstr = $lang["api"]["calminmonths"][8]; - } - if ($month == "10") { - $monthstr = $lang["api"]["calminmonths"][9]; - } - if ($month == "11") { - $monthstr = $lang["api"]["calminmonths"][10]; - } - if ($month == "12") { - $monthstr = $lang["api"]["calminmonths"][11]; - } - $json = json_decode($jsonraw); - foreach($json->events as $event) { - if (isset($event->timestamp)) { - if ($event->timestamp == $year . date('m', $date) . date('d', $date)) { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["calsameday"]); - } - } - } - $pos = count($json->events); - $json->events[$pos] = new stdClass(); - $json->events[$pos]->timestamp = $year . date('m', $date) . date('d', $date); - $json->events[$pos]->name = $name; - $json->events[$pos]->description = $desc; - if (substr($link, 0, 4) == "http") { - $json->events[$pos]->link = $link; - } else { - $json->events[$pos]->link = "http://" . $link; - } - $json->events[$pos]->datestr = $daystr . " " . $monthstr . " " . $year; - $newjsonraw = json_encode($json, JSON_PRETTY_PRINT); - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/caldb.json", $newjsonraw); - require $_SERVER['DOCUMENT_ROOT'] . "/api/admin/cache_content_reset.php"; - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit("ok"); -} else { - require $_SERVER['DOCUMENT_ROOT'] . "/api/electrode/quit.php";quit($lang["api"]["calerror"]); -} \ No newline at end of file -- cgit