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/Scheduler/admin/parse/ |
Upload File : |
<? // parseProcess_classmeeting.phpinc // if ( $thisClass['courseNumber'] == '2824' ) $DEBUG_parseProcess_classmeeting = true; if ( !isset($DEBUG_parseProcess_classmeeting) ) { $DEBUG_parseProcess_classmeeting = false; } t_Begin($DEBUG_parseProcess_classmeeting); // Begin TRACKing parseProcess_classmeeting.phpinc. // BEGIN parseProcess_classmeeting.phpinc // foreach ( $thisClass['meeting'] as $thisClassmeeting ) { // Loop thru class meetings. $roomIds = array(); d_Var('$thisClassmeeting',$thisClassmeeting); $classmeetingOnOff = NULL; // Check if on campus, OFF CAMPUS, or ON LINE. d_Var("strtoupper(\$thisClassmeeting['BLDG'].\$thisClassmeeting['ROOM'])",strtoupper($thisClassmeeting['BLDG'].$thisClassmeeting['ROOM'])); // Note: classmeetingOnOff; NULL = neither, 1 = Online, 0 = Off Campus. switch ( strtoupper($thisClassmeeting['BLDG'].$thisClassmeeting['ROOM']) ) { // switch on room for online or off campus. case 'ONONLINE': $roomIds[] = NULL; $classmeetingOnOff = 1; $thisClassmeeting['BLDG'] = ''; $thisClassmeeting['ROOM'] = ''; break; case 'OFFCAMPUS': $roomIds[] = NULL; $classmeetingOnOff = 0; $thisClassmeeting['BLDG'] = ''; $thisClassmeeting['ROOM'] = ''; break; default: if ( ( $thisClassmeeting['BLDG'] == 'ON' && $thisClassmeeting['ROOM'] == 'ONLINE' ) || ( $thisClassmeeting['BLDG'] == 'OFF' && $thisClassmeeting['ROOM'] == 'CAMPUS' ) ) { // Is this an online or off campus meeting? $thisClassmeeting['BLDG'] = ''; $thisClassmeeting['ROOM'] = ''; } // Is this an online or off campus meeting? if ( $thisClassmeeting['BLDG'].$thisClassmeeting['ROOM'] != '' ) { // Is there a building and room. $rooms = explode('/',$thisClassmeeting['ROOM']); foreach ( $rooms as $room ) { // Get roomId. $query = " SELECT roomId FROM `room` JOIN `building` ON room.buildingId = building.buildingId WHERE roomNumber = '".query_safe($room)."' AND buildingCode = '".query_safe($thisClassmeeting['BLDG'])."' ORDER BY roomNumber "; d_Var('roomInfo',$query,'q'); $roomInfo = query_info($query); d_Var('$roomInfo',$roomInfo); // In $roomInfo['roomId']. if ( $roomInfo ) { // Is the room in the database? $roomIds[] = $roomInfo['roomId']; } else { // Is the room in the database? // Room OR building were not found. // Check if building is in the database. $query = "SELECT buildingId FROM building WHERE buildingCode = '".query_safe($thisClassmeeting['BLDG'])."' "; $buildingInfo = query_info($query); if( $buildingInfo ) { // Is the building not in the database? $buildingId = $buildingInfo['buildingId']; } else { // Is the building not in the database? //echo("\nNew Building Code: " . $thisClassmeeting['BLDG'] . "\n" ); $query = "INSERT INTO building (campusId, buildingCode) VALUES(".$campusIds[$thisClassmeeting['CAMPUS']].", ".$thisClassmeeting['BLDG'].") "; d_Var('buildingINSERT',$query,'q'); $buildingINSERT = query_info($query); $buildingId = $GLOBALS['_QUERY']['insertId']; @d_Var("\$buildingId",$buildingId); ?> <article class="error">New <?=$thisClass['BLDG']?> building found on line <?=$thisClass['!line']?>.</article> <? } // Is the building not in the database? $query = "INSERT INTO room (buildingId, roomNumber) VALUES(".$buildingId.", '".$room."') "; d_Var('roomINSERT',$query,'q'); $roomINSERT = query_do($query); $roomIds[] = $GLOBALS['_QUERY']['insertId']; @d_Var("\$roomId",$roomId); ?> <article class="error">New <?=$room?> room found on line <?=$thisClass['!line']?>.</article> <? } // Is the room in the database? } } else { // Is there a building and room. // No, there is no room. // Add a NULL roomId. $roomIds[] = NULL; $thisClassmeeting['BLDG'] = ''; $thisClassmeeting['ROOM'] = ''; } // Is there a building and room. #d_Var('$roomInfo',$roomInfo,'d'); //$classmeetingOnOff = NULL; break; } // switch on room for online or off campus. #if ( $thisClass['classId'] == 4324 ) d_Var('$roomIds',$roomIds,'d'); #d_Var('thisClassmeeting',$thisClassmeeting,'d'); if ( $thisClassmeeting['classmeetingStartDate'] == '' || substr($thisClassmeeting['classmeetingStartDate'],4) == '-00-00' ) { $thisClassmeeting['classmeetingStartDate'] = NULL; } if ( $thisClassmeeting['classmeetingEndDate'] == '' || substr($thisClassmeeting['classmeetingEndDate'],4) == '-00-00' ) { $thisClassmeeting['classmeetingEndDate'] = NULL; } #d_Var('thisClassmeeting',$thisClassmeeting,'d'); foreach ( $roomIds as $roomId ) { // Loop thru roomIds. // INSERT class meeting. $query = " INSERT INTO `classmeeting` ( classId , classmeetingStartDate , classmeetingEndDate"; if ( $thisClassmeeting['classmeetingBeginTime'] != '' ) { // Does the class have a begin and end time? $query .= " , classmeetingBeginTime , classmeetingEndTime"; } // Does the class have a begin and end time? if ( $roomId !== NULL ) { // Does the class have a room? $query .= " , roomId"; } // Does the class have a room? if ( $classmeetingOnOff !== NULL ) { // Is the class online or off campus? $query .= " , classmeetingOnOff"; } // Is the class online or off campus? $query .= " ) VALUES ( ".$thisClass['classId']." , '".query_safe($thisClassmeeting['classmeetingStartDate'])."' , '".query_safe($thisClassmeeting['classmeetingEndDate'])."'"; if ( $thisClassmeeting['classmeetingBeginTime'] != '' ) { // Does the class have a begin and end time? $query .= " , '".query_safe(valid_time($thisClassmeeting['classmeetingBeginTime']))."' , '".query_safe(valid_time($thisClassmeeting['classmeetingEndTime']))."'"; } // Does the class have a begin and end time? if ( $roomId !== NULL ) { // Does the class have a room? $query .= " , ".$roomId; } // Does the class have a room? if ( $classmeetingOnOff !== NULL ) { // Is the class online or off campus? $query .= " , ".$classmeetingOnOff; } // Is the class online or off campus? $query .= " ) "; d_Var('classmeetingINSERT',$query,'q'); $classmeetingINSERT = query_do($query); d_Var('$classmeetingINSERT',$classmeetingINSERT,'l'); $thisClassmeeting['classmeetingId'] = $GLOBALS['_QUERY']['insertId']; d_Var("\$thisClassmeeting['classmeetingId']",$thisClassmeeting['classmeetingId']); // Process classmeeting days require('parseProcess_classmeeting_days.phpinc'); // Process classmeeting instructors require('parseProcess_classmeeting_instructors.phpinc'); } // Loop thru roomIds. } // Loop thru class meetings. #d_Var('$thisClass',$thisClass,'d+');exit; // END $DEBUG_parseProcess_classmeeting = false; t_End(); // End TRACKing parseProcess_classmeeting.phpinc. ?>