header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1. if(isset($_POST['setjour']) && $_POST['spara'] == "Spara jour") { shell_exec("echo \"".htmlspecialchars($_POST['setjour']) ."\" > jour.txt"); shell_exec("echo \"$(date +'%Y-%m-%d %T') ".htmlspecialchars($_POST['setjour']) ."\" >> log.jour.txt"); $str = "FM: "; if($_POST['anders'] == "fm") $str .= "Anders, "; if($_POST['christoffer'] == "fm") $str .= "Christoffer, "; if($_POST['jakob'] == "fm") $str .= "Jakob, "; if($_POST['Farid'] == "fm") $str .= "Farid, "; shell_exec("echo ". substr($str,0,-2) ." > permittering.txt"); shell_exec("echo \"$(date +'%Y-%m-%d %T') ". $str ."\" >> log.schema.txt"); $str = "EM: "; if($_POST['anders'] == "em") $str .= "Anders, "; if($_POST['christoffer'] == "em") $str .= "Christoffer, "; if($_POST['jakob'] == "em") $str .= "Jakob, "; if($_POST['Farid'] == "em") $str .= "Farid, "; shell_exec("echo ". substr($str,0,-2) ." >> permittering.txt"); shell_exec("echo \"$(date +'%Y-%m-%d %T') ". $str ."\" >> log.schema.txt"); shell_exec("touch image.graph.week.png"); } if(isset($_POST['setadm']) && $_POST['spara'] == "Spara admintid") { $fp = fopen('admintid.log', 'a'); fwrite($fp, $_POST['admdatum'] ." ". $_POST['setadm'] ."\n"); fclose($fp); } if(isset($_GET['deleteadm'])) { shell_exec("cp admintid.log admintid2.log"); shell_exec("cat admintid2.log|grep -v ". $_GET['deleteadm'] ." > admintid.log"); } if(isset($_POST['spara']) && $_POST['spara'] == "Spara version") { shell_exec("echo ". $_POST['majorversion'] .".". $_POST['minorversion'] ." > version.txt"); } if(isset($_POST['spara']) && $_POST['spara'] == "Spara avancerad version") { shell_exec("echo ". $_POST['advmajorversion'] .".". $_POST['advminorversion'] ." > advversion.txt"); } ?>