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.
		
		
		
		
		
			
		
			
				
					
					
						
							97 lines
						
					
					
						
							2.9 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							97 lines
						
					
					
						
							2.9 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, "UPDATE session SET name='".convert($_POST['name'])."', link='".convert_url($_POST['name'])."', | |
|                                     start='".$_POST['start']."', stop='".$_POST['stop']."', enabled=".$_POST['enabled']." | |
|                                     WHERE id=".$_POST['id'].""); | |
|  | |
|              echo "<script>parent.window.location=parent.window.location</script>"; | |
|  | |
|             } else { | |
|  | |
|                 $q = mysqli_query($conn, "SELECT * FROM session WHERE id=".$_GET['id'].""); | |
|                 $r = mysqli_fetch_array($q); | |
|         ?> | |
|  | |
|          <div class="row"> | |
|                 <div class="col-12"> | |
|                     <span class="font-12 text-grey">Session title</span> | |
|                     <input type="text" name="name" value="<?= $r['name'];?>"> | |
|                     <input type="hidden" name="id" value="<?= $_GET['id'];?>"> | |
|                 </div> | |
|                 <div class="col-6"> | |
|                     <span class="font-12 text-grey">Session start</span> | |
|                     <input type="text" name="start" class="datepicker" value="<?= $r['start'];?>"> | |
|                 </div> | |
|                 <div class="col-6"> | |
|                     <span class="font-12 text-grey">Session end</span> | |
|                     <input type="text" name="stop" class="datepicker" value="<?= $r['stop'];?>"> | |
|                 </div> | |
|                 <div class="col-6"> | |
|                     <span class="font-12 text-grey">Status</span> | |
|                     <select class="select" name="enabled"> | |
|                         <option value="1" <?php if($r['enabled'] == 1){echo "selected";}?>>Enabled</option> | |
|                         <option value="0" <?php if($r['enabled'] == 0){echo "selected";}?>>NOT enabled</option> | |
|                     </select> | |
|                 </div> | |
|                 <div class="col-12"> | |
|                     <button type="submit" class="button big full confirm mx-0">Update session</button> | |
|                 </div> | |
|             </div> | |
|  | |
|         <?php | |
|             } | |
|         ?> | |
|  | |
|         </form> | |
|     </div> | |
|  | |
|     <?php | |
|         @include 'jsvendors.php'; | |
|         @include 'scripts/'.$getQ[0].'.php'; | |
|     ?> | |
|  | |
|  | |
| </body> | |
| </html> | |
|  | |
|  | |
|  | |
| <?php | |
| mysqli_close($conn); | |
| ?>
 |