1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?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.vehicleForm.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;
-
- }
- .vehicleForm span{
- color:red;
- margin-right: 5px;
- }
- input[type="submit"].btn.btn-default.saveNumber {
- background: radial-gradient(#0da3bb, #04161fc2);
- color: #610e14;
- font-family:-webkit-pictograph;
- font-size: 18px;
- margin-right: 20px;
- width: 70px;
- }
- input[type="button"].btn.btn-default.cancel {
- background: radial-gradient(#b71515eb, #ef0b0bdb);
- color: #fff;
- font-family:-webkit-pictograph;
- font-size:18px;
- width: 73px;
- }
- .col-sm-offset-2.col-sm-10.Vsave {
- margin-top: 75px;
- margin-left: 120px;
- }
- .form-group.vrow1 label{
- height:20px;
- margin-left: 100px;
- margin-top:20px;
- margin-bottom:30px;
- color: #610e14;
- font-family:-webkit-pictograph;
- font-size: 20px;
- }
- .form-group.vrow2{
- margin-left: 50px;
- }
- .form-group.vrow2 label{
- color: #610e14;font-family:-webkit-pictograph;
- }
- </style>
- <div class="container addVehicleForm modal" id="addVForm">
- <form class="form-horizontal vehicleForm modal-content animate" action="" method="post">
- <span onclick="document.getElementById('addVForm').style.display='none'" class="close" title="Close PopUp">×</span>
- <div class="form-group vrow1">
- <label style="">New Vehicle</label>
- </div>
- <div class="form-group vrow2">
- <label class="control-label col-sm-2"> Number: </label>
- <div class="col-sm-10">
- <input type="text" name="number" required="true">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10 Vsave">
- <input type="submit" class="btn btn-default saveNumber" 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>
|