/
home
/
desid573
/
public_html
/
drivers
/
/home/desid573/public_html/drivers
mkdir
upload
Name
Size
Mode
Actions
training/
-
0755
rm
twilio-php-master/
-
0755
rm
avail.php
19359
0644
edit
dl
rm
cancel_booking.php
4537
0644
edit
dl
rm
checkDetails.php
1568
0644
edit
dl
rm
checkDetailsId.php
1774
0644
edit
dl
rm
cleaning_record.pdf
117117
0644
edit
dl
rm
contractor_conduct.pdf
110192
0644
edit
dl
rm
create.php
2610
0644
edit
dl
rm
createbilling.php
8952
0644
edit
dl
rm
createdriver.php
5278
0644
edit
dl
rm
createSMS.php
1844
0644
edit
dl
rm
daily.php
9342
0644
edit
dl
rm
default.php
16383
0644
edit
dl
rm
delete.php
935
0644
edit
dl
rm
deletedriver.php
3619
0644
edit
dl
rm
driverBilling.php
8378
0644
edit
dl
rm
driver_check_qld.php
3907
0644
edit
dl
rm
drugs_policy.pdf
78742
0644
edit
dl
rm
error_log
390475
0644
edit
dl
rm
getDailyAvailability.php
3065
0644
edit
dl
rm
getDefaultAvailability.php
1102
0644
edit
dl
rm
getDriverAvailability.php
1642
0644
edit
dl
rm
home.php
5517
0644
edit
dl
rm
incident.php
1871
0644
edit
dl
rm
incident_report.php
6179
0644
edit
dl
rm
index1.php
3937
0644
edit
dl
rm
licence_file_qld.php
1768
0644
edit
dl
rm
list.php
2046
0644
edit
dl
rm
login.php
7782
0644
edit
dl
rm
loginDriver.php
1214
0644
edit
dl
rm
medical.pdf
32899
0644
edit
dl
rm
new.php
835
0644
edit
dl
rm
off.php
3502
0644
edit
dl
rm
qld_report.php
1109
0644
edit
dl
rm
register.php
8676
0644
edit
dl
rm
setDefaultAvailability.php
3257
0644
edit
dl
rm
setDriverAvailability.php
3365
0644
edit
dl
rm
setDriverPin.php
2189
0644
edit
dl
rm
smsregister.php
1564
0644
edit
dl
rm
updateDetails.php
4527
0644
edit
dl
rm
updateDetailsDriver.php
5101
0644
edit
dl
rm
Edit:
/home/desid573/public_html/drivers/daily.php
(9342B)
<html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Daily Availability</title> <style type='text/css'> table { display: block; border-collapse: collapse; } tr { height:30px; } td { margin-left:10px; } .flight { display: none; } .family { display: none; } table tr:nth-child(odd) td{ background-color: #d3d3d3; } table tr:nth-child(even) td{ } </style> <!-- Bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesnt work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <style> body{ background-color: #d9d9d9; } .time { width: 80px; } .bgloader { display: none; position: fixed; width: 100%; height: 100%; background-color:#f26f18; opacity : 0.4; z-index: 100; } .loader { display: none; position: fixed; left: 50%; top: 50%; z-index: 101; margin: -60px 0 0 -60px; border: 16px solid #f3f3f3; /* Light grey */ border-top: 16px solid #000080; /* Blue */ border-radius: 50%; width: 120px; height: 120px; animation: spin 2s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } table { width:auto; } .btn-group { display: flex; } .dateCol { height: 40px; } .text { font-size:18; } .avail { width: 99%; padding-left:10px; padding-right:10px; } thead { font-weight: bold; } * { padding: 0; margin: 0; } #over { //position:absolute; margin-top: 10px; width:100%; height:40px; text-align: center; /*handles the horizontal centering*/ } /*handles the vertical centering*/ .Centerer { display: inline-block; height: 100%; vertical-align: middle; } .Centered { display: inline-block; vertical-align: middle; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript"> function setDecimal(input) { input.value = parseFloat(input.value).toFixed(2); } </script> </head> <body> <div class="loader"></div> <div class="bgloader"></div> <div class="container"> <div id="over"> <span class="Centerer"></span> <span class="Centered" style="max-height:60px; font-weight: bold; font-size: 30px;"> Daily Availability <br> <select id="week" class="btn"> <?php date_default_timezone_set("Australia/Perth"); $start_month = date("Y-m-d"); $end_month = date('Y-m-d',strtotime("2 weeks")); while (strtotime($start_month) <= strtotime($end_month)) { //$week_start = date('d/m/Y',strtotime($start_month.' last Sunday')); $week_end = date('d/m/Y',strtotime($start_month)); ?> <option value='<?php echo $week_end; ?>' > <?php echo "Availability ".$week_end; ?> </option> <?php $start_month = date("Y-m-d", strtotime($start_month." +1 days")); } ?> </select> </span> </div> <br> <div class="row" style="margin-top:20px;"> <div class="col-xs-12 no-padding"> <div class="row"> <div class="col-xs-12 "> <table id="table"> <thead> <tr> <td class="driver">Driver</td> <td class="avail">Availability</td> <td class="call"></td> </tr> </thead> <tbody id="tbody"> </tbody> </table> </div> <br> </div> </div> </div> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <link type="text/css" href="../family/assets/css/bootstrap-timepicker.min.css" /> <script src="../family/assets/js/bootstrap-timepicker.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.23/jquery.form-validator.min.js"></script> <script type="text/javascript"> var driver = "<?=$_GET['driver']?>"; $('#date1range1', '#date1range2').timepicker(); $(document).ready(function(){ setDates(); }) $('select').on('change', function() { setDates(); }) $('label').on('change', function() { var element = this.parentNode.id.replace("datebutton", ""); setTextVisibility(element, this.children[0].value); }) function setTextVisibility(element, state) { var input = "#details" + element; if(state == "on") { $(input).show(); $(input).val("Full Availability"); } else { $(input).hide(); $(input).val("OFF"); } } function setDates() { var weekEnd = $("#week").val(); var endSplit = weekEnd.split("/"); var date = endSplit[2] + "-" + endSplit[1] + "-" + endSplit[0]; console.log(date); var data = {date: date}; $.ajax({ type: "POST", url: "getDailyAvailability.php", data: data, dataType: 'json', success: function (data) { console.log(data); if(data.status == "OK") { var drivers = data.drivers; var mytable = $('#tbody'); console.log(mytable); mytable.html(""); for(var i = 0; i < drivers.length; i++) { var rows = '<tr><td class="driver">' + drivers[i].name + '</td><td class="avail">' + drivers[i].availibility + '</td><td class="call"><button onclick="document.location.href = `tel:' + drivers[i].phone + '`">Call</button></td></tr>'; var new_row = rows; if(drivers[i].availibility == "OFF") { var last_row = $('#table tbody tr').last(); console.log(last_row); if(last_row.length == 0) { $('#table tbody').append(new_row); console.log($('#table tbody')); } else { last_row.after(new_row); } } else { var last_row = $('#table tbody tr').first(); if(last_row.length == 0) { $('#table tbody').append(new_row); } else { last_row.before(new_row); } } //console.log(last_row); } } if(data.status == "none") { $('input[name*="button"][value="on"]').click() } if(data.status == "error") { alert(data.message); } //console.log(daysOfWeek); }, error: function (XMLHttpRequest, textStatus, errorThrown) { console.log(XMLHttpRequest + " " + textStatus + " " + errorThrown); } }) } </script> </body> </html>
Save
Daily Availability
Daily Availability
Driver
Availability