You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.6 KiB
95 lines
2.6 KiB
<?php
|
|
|
|
session_start();
|
|
|
|
@include 'cgi-bin/conn.conn';
|
|
@include 'cgi-bin/functions.inc';
|
|
@include 'cgi-bin/params.inc';
|
|
|
|
$conn=@mysqli_connect($DATAhst,$DATAusr,$DATApwd,$DATAdtb)or die("CONNECTION ERROR");
|
|
mysqli_set_charset($conn, "utf8");
|
|
|
|
?>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
|
|
<title>COZe</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="description" content="COZe">
|
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
|
|
|
<base href="<?php echo $BASE_URL;?>/">
|
|
<?php
|
|
@include 'cssvendors.php';
|
|
?>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div id="MainContent" class="container">
|
|
<form method="post">
|
|
|
|
<?php
|
|
if($_POST['name']) {
|
|
|
|
$q = mysqli_query($conn, "INSERT INTO session VALUES(null, '".convert($_POST['name'])."', '".convert_url($_POST['name'])."', '".$_POST['start']."', '".$_POST['stop']."', ".$_POST['enabled'].")");
|
|
|
|
echo "<script>parent.window.location=parent.window.location</script>";
|
|
|
|
} else {
|
|
?>
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<span class="font-12 text-grey">Session title</span>
|
|
<input type="text" name="name">
|
|
</div>
|
|
<!-- <div class="col-12">
|
|
<span class="font-12 text-grey">Session link</span>
|
|
<input type="text" id="link" name="link" value="<?= $BASE_URL;?>" readonly>
|
|
</div>-->
|
|
<div class="col-6">
|
|
<span class="font-12 text-grey">Session start</span>
|
|
<input type="text" name="start" class="datepicker">
|
|
</div>
|
|
<div class="col-6">
|
|
<span class="font-12 text-grey">Session end</span>
|
|
<input type="text" name="stop" class="datepicker">
|
|
</div>
|
|
<div class="col-6">
|
|
<span class="font-12 text-grey">Status</span>
|
|
<select class="select" name="enabled">
|
|
<option value="1">Enabled</option>
|
|
<option value="0">NOT enabled</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-12">
|
|
<button type="submit" class="button big full confirm mx-0">Add session</button>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
@include 'jsvendors.php';
|
|
@include 'scripts/'.$getQ[0].'.php';
|
|
?>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
<?php
|
|
mysqli_close($conn);
|
|
?>
|