| Line | |
|---|
| 1 | <?php
|
|---|
| 2 | include '../include/factdb.php';
|
|---|
| 3 | $x = 0;
|
|---|
| 4 | $day = $_GET['days'];
|
|---|
| 5 | $days = Date('Y-m-d',strtotime($day));
|
|---|
| 6 |
|
|---|
| 7 | $fetch = mysql_query("SELECT * FROM schedule") or die(mysql_error());
|
|---|
| 8 |
|
|---|
| 9 | while($rows = mysql_fetch_array($fetch)){
|
|---|
| 10 | $timestamp=strtotime($rows['fLastUpdate']);
|
|---|
| 11 | $timestamp2 = date('Y-m-d',$timestamp);
|
|---|
| 12 | $date_time = date('H:i',$timestamp);
|
|---|
| 13 | //$time_new = $date_time->format('H:i:s')
|
|---|
| 14 | if($days == $timestamp2){
|
|---|
| 15 | $x++;
|
|---|
| 16 |
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 | if($x==0){
|
|---|
| 23 |
|
|---|
| 24 | ?><input type="button" id="save" value="SAVE" class="button" title="Click to save"> <input type="button" id="LoadPrev" value="Load Previous Night" class="button" title="Click to load previous night">
|
|---|
| 25 | <?php
|
|---|
| 26 |
|
|---|
| 27 | }else{
|
|---|
| 28 | ?><input type="button" id="update" value="UPDATE" class="button" title="Click to save"> <input type="button" id="LoadPrev" value="Load Previous Night" class="button" title="Click to load previous night">
|
|---|
| 29 | <?php
|
|---|
| 30 |
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | ?>
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | |
|---|
Note:
See
TracBrowser
for help on using the repository browser.