Changeset 17543 for schedule/Module
- Timestamp:
- 02/08/14 05:52:47 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/control.php
r17519 r17543 4 4 var testdata = "old data"; 5 5 var pastdata = false; 6 var transPrevNight = 1; 6 7 7 8 function clearNode(node){ … … 115 116 $(targetView).after(newtr); 116 117 } 117 function deleteRow(tableID){118 try{119 var table = document.getElementById(tableID);120 var rowCount = table.rows.length;121 122 for(var i = 0; i < rowCount; i++){123 var row = table.rows[i];124 var chkbox = row.cells[0].childNodes[0];125 if(null != chkbox && true == chkbox.checked){126 if(rowCount <= 1){127 alert("Cannot delete all the rows.");128 break;129 }130 table.deleteRow(i);131 rowCount--;132 i--;133 }134 }135 }catch(e){136 alert(e);137 }138 }139 140 118 <?php 141 119 $cnt=0; … … 151 129 $day =date("Y-m-d"); 152 130 } 131 $prev = mysql_query("SELECT date(fStart) AS PrevDate FROM schedule WHERE (date(fStart) < '2014-01-26') ORDER BY date(fStart) DESC LIMIT 1"); 132 $prevnight = mysql_fetch_array($prev); 133 if(mysql_num_rows($prevnight) > 0) { 134 $prevday = date('Y-m-d', $prevnight['PrevDate']); 135 } else { 136 $prevday = date ('Y-m-d'); 137 } 138 $prevday = date('Y-m-d', strtotime($day .' -1 day')); 153 139 $prev_time = array(); 154 140 ?> … … 335 321 { 336 322 $timestamp=strtotime($times['fStart']); 337 $testdate = date('Y-m-d H:i:s', $times['fStart']);323 $testdate = date('Y-m-d H:i:s', $times['fStart']); 338 324 $testing = date('Y-m-d H:i', $timestamp); 339 325 $actualtime = date('Y-m-d H:i:s', $timestamp); … … 685 671 686 672 ?> 687 688 673 689 674 } 690 675 691 676 $('#LoadPrev').click(function() { 677 if(transPrevNight == 1) { 678 $('#Scheduling').load('Module/Scheduling.php?days=<?php echo $prevday;?>'); 679 transPrevNight = 0; 680 } 692 681 }); 682 693 683 </script> 694 684
Note:
See TracChangeset
for help on using the changeset viewer.