<?php
include('../include/session.php');

date_default_timezone_set('Africa/Gaborone');
$entry_date = date("Y-m-d H:i:s"); 

$job_card_no = $_GET['job_card_no'];
$comment = $_GET['comments_text'];

$table_name6 = $_SESSION['db_prefix']."_order_history";
$history_query = "INSERT INTO $table_name6 (job_card_number, note_date, note_text, user_name ) VALUES ('".$job_card_no."', '".$entry_date."', '".$comment."', '".$_SESSION['username']."' ) ";
execsql($history_query);

if (isset($_GET['alert_checkbox']))  {
	include('../include/job_card_comment_alert.php');
}

?>

<script language="javascript" type="text/javascript">
        window.location="job_card_add_comments.php?job_card_no=<?php echo $job_card_no ?>";
</script>