<commit_before><div class="col-sm-8 col-sm-offset-2">
<h1>Add Order!</h1>
</div>
<div class="col-sm-8 col-sm-offset-2">
This form is to add order 
</div>
	<?php
	if (isset($_POST['id'])){
		//save info from $_post to local variables
		$carid = $_POST['id'];
		$customerid = $_SESSION['customer_id'];
		$date = $_POST['date'];
		$time = $_POST['time'];
		//creat SQL and execute qurty
		$num_pending = $mysql->oneQuery("SELECT COUNT(ID) FROM orders WHERE status < 4");
		$sql_order= "INSERT INTO orders (cus_id,Date,Time,status,rate) VALUES ('$customerid','$date','$time','1','')";	
		$mysql->query($sql_order); 		
		$order_id = mysql_insert_id();
		$mysql->query("INSERT INTO order_service(car_id,order_id) VALUES('$carid','$order_id')");
		echo"<script type='text/javascript'>alert('There have ".$num_pending." people before'); location='index.php?page=order';</script>"; 
	}
	?>
	<div class="col-sm-10 col-md-offset-2">
		<?php
		$sql_orders = "SELECT c.*,cu.username FROM car AS c INNER JOIN customer AS cu ON c.cus_id=cu.id WHERE cus_id ='".$_SESSION['customer_id']."'";
		$result_orders = $mysql->query($sql_orders);
		$row_orders = $mysql->fetch($result_orders);
		?>
	</div>
		<div class="col-sm-10 col-md-offset-2">
			Name:
			<?php echo $row_orders['username'];?>
		</div>
		<div class="col-sm-10 col-md-offset-2">
			<form method="post"> 
				Choose Car:
				<select name="id"> 
					<?php
					while ($row_orders = $mysql->fetch($result_orders)){
					?>
					<option value="<?php echo $row_orders['id']; ?>"><?php echo $row_orders['plate']; ?></option> 
						<?php
					}
						?>
				</select> 
	    </div>
		<div class="col-sm-5 col-md-offset-2">
			Choose Services:
		</div>
			<div class="col-sm-10 col-md-offset-2">
				Wax:
				<input type="checkbox" name="wax" value="wax">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Polishing:
				<input type="checkbox" name="pol" value="pol">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Wash Big Car:
				<input type="checkbox" name="wbc" value="wbc">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Wash Small Car:
				<input type="checkbox" name="wsc" value="wsc">
			</div>
		<div class="col-sm-10 col-md-offset-2">
			Date:
			<input type="date" name="date">
		</div>
		<div class="col-sm-10 col-md-offset-2">
			Time:
			<input type="time" name="time">
		</div>
		<div class="col-sm-10 col-md-offset-2">
			<input type="submit" value="Submit" class="btn btn-primary">
		</div>
		</form><commit_msg>change check box in adorer.php<commit_after><div class="col-sm-8 col-sm-offset-2">
<h1>Add Order!</h1>
</div>
<div class="col-sm-8 col-sm-offset-2">
This form is to add order 
</div>
	<?php
	if (isset($_POST['id'])){
		//save info from $_post to local variables
		$carid = $_POST['id'];
		$customerid = $_SESSION['customer_id'];
		$date = $_POST['date'];
		$time = $_POST['time'];
		//creat SQL and execute qurty
		$num_pending = $mysql->oneQuery("SELECT COUNT(ID) FROM orders WHERE status < 4");
		$sql_order= "INSERT INTO orders (cus_id,Date,Time,status,rate) VALUES ('$customerid','$date','$time','1','')";	
		$mysql->query($sql_order); 		
		$order_id = mysql_insert_id();
		$mysql->query("INSERT INTO order_service(car_id,order_id,) VALUES('$carid','$order_id','.implode(',',$services).')");
        $sqlstr = "insert into 表(rol) values(".implode(',',$rol).")";
		echo"<script type='text/javascript'>alert('There have ".$num_pending." people before'); location='index.php?page=order';</script>"; 
	}
	?>
	<div class="col-sm-10 col-md-offset-2">
		<?php
		$sql_orders = "SELECT c.*,cu.username FROM car AS c INNER JOIN customer AS cu ON c.cus_id=cu.id WHERE cus_id ='".$_SESSION['customer_id']."'";
		$result_orders = $mysql->query($sql_orders);
		$row_orders = $mysql->fetch($result_orders);
		?>
	</div>
		<div class="col-sm-10 col-md-offset-2">
			Name:
			<?php echo $row_orders['username'];?>
		</div>
		<div class="col-sm-10 col-md-offset-2">
			<form method="post"> 
				Choose Car:
				<select name="id"> 
					<?php
					while ($row_orders = $mysql->fetch($result_orders)){
					?>
					<option value="<?php echo $row_orders['id']; ?>"><?php echo $row_orders['plate']; ?></option> 
						<?php
					}
						?>
				</select> 
	    </div>
		<div class="col-sm-5 col-md-offset-2">
			Choose Services:
		</div>
			<div class="col-sm-10 col-md-offset-2">
				Wax:
				<input type="checkbox" name="services[]" value="Wax">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Polishing:
				<input type="checkbox" name="services[]" value="Polishing">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Wash Big Car:
				<input type="checkbox" name="services[]" value="Big Car Washing">
			</div>
            <div class="col-sm-10 col-md-offset-2">
				Fine Wash Big Car:
				<input type="checkbox" name="services[]" value="Fine Big Car Washing">
			</div>
			<div class="col-sm-10 col-md-offset-2">
				Wash Small Car:
				<input type="checkbox" name="services[]" value="Small Car Washing">
			</div>
            <div class="col-sm-10 col-md-offset-2">
				Fine Wash Small Car:
				<input type="checkbox" name="services[]" value="Fine Small Car Washing">
			</div>
		<div class="col-sm-10 col-md-offset-2">
			Date:
			<input type="date" name="date">
		</div>
		<div class="col-sm-10 col-md-offset-2">
			Time:
			<input type="time" name="time">
		</div>
		<div class="col-sm-10 col-md-offset-2">
			<input type="submit" value="Submit" class="btn btn-primary">
		</div>
		</form>

{'fraction_non_alphanumeric': 0.2123088128186453, 'fraction_numerical': 0.015659140568099052, 'mean_word_length': 3.6748936170212767, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '571311', 'n_tokens_mistral': 2361, 'n_tokens_neox': 2035, 'n_words': 438}