12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- require "connectionDb.php";
- if (isset($_POST['saveNumber']) && isset($_POST['number']) ) {
-
- $number = $_POST['number'];
- $cid = $_COOKIE['customerId'];
- $db->exec("INSERT INTO vehicle (type,created_at,updated_at,customer_id,number) VALUES ('',strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),strftime('%Y-%m-%d %H:%M:%f000000+06:30', 'now', 'localtime'),'$cid','$number');");
- echo '<script>window.location.href="customers.php"</script>';
- }
- ?>
- <style type="text/css">
- .addVehicleForm {
- display: none;
- }
- /* form.form-horizontal.modal-content.animate {
- width: 400px;
- height: 280px;
- margin-left: -15px;
- background-color: #dfe3e6;
- }
- div#addVForm {
- width: 400px;
- height: 280px;
- border-radius: 0.5em;
- margin-top: 100px;
-
- }
- input[type="submit"].btn.btn-default {
- background: radial-gradient(#0da3bb, #04161fc2);
- color: #610e14;
- font-family:-webkit-pictograph;
- font-size: 18px;
- margin-right: -84px;
- width: 70px;
- }
- input[type="button"].btn.btn-default {
- background: radial-gradient(#b71515eb, #ef0b0bdb);
- color: #fff;
- font-family:-webkit-pictograph;
- font-size:18px;
- width: 73px;
- }
- .col-sm-offset-2.col-sm-10 {
- margin-top: 95px;
- margin-left: 30px;
- }*/
- </style>
- <div class="container addVehicleForm" id="addVForm">
- <form class="form-horizontal" action="" method="post">
- <!-- <span onclick="document.getElementById('addVForm').style.display='none'" class="close" title="Close PopUp" style="color:red;margin-right: 5px;">×</span> -->
- <div class="form-group" style="width: height:20px;margin-left: 150px;margin-top:20px;margin-bottom:30px;">
- <label style="color: #610e14;font-family:-webkit-pictograph;font-size: 20px;">New Vehicle</label>
- </div>
- <div class="form-group" style="margin-left: 50px;">
- <label class="control-label col-sm-2" style="color: #610e14;font-family:-webkit-pictograph;"> Number </label>
- <div class="col-sm-10">
- <input type="text" name="number">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <input type="submit" class="btn btn-default" name="saveNumber" value="Save">
- <input type="button" class="btn btn-default cancel" value="Cancel" onclick="document.getElementById('addVForm').style.display = 'none';">
- </div>
- </div>
- </form>
- </div>
|