$RegisterFormData_Step4 = ExtractFormByID($RegisterToStep4, 'aspnetForm'); $RegisterFormData_Step4['ctl00$ctl00$mainContent$PageContent$gvPendingEnroll$ctl02$ddlSection'] = SelectSubjectSection($RegisterFormData_Step3['ctl00$ctl00$mainContent$PageContent$UcFindSubject1$GridView1$ctl02$Button1'], $Subject_To_Register[$i]['SubjectSec']); echo "[" . getTimeNow() . "] Register Information : Select Section and Fetch Subject Status " . $Subject_To_Register[$i]['SubjectCode'] . "\n"; $RegisterFormData_Step4['ctl00$ctl00$mainContent$PageContent$gvPendingEnroll$ctl02$ddlRegistType'] = $Subject_To_Register[$i]['SubjectCredit']; extractSecInfo($RegisterToStep4, $Subject_To_Register[$i]['SubjectSec']); unset($RegisterFormData_Step4['ctl00$ctl00$mainContent$PageContent$btnCancel']); $RegisterToStep5 = GetDataFromURL($SIS_URL . '/WebRegist2005/Enroll/' . $RegisterFormData_Step3['ctl00$ctl00$mainContent$PageContent$UcFindSubject1$GridView1$ctl02$Button1'], $RegisterFormData_Step4); $chkErrorBeforeReg = str_get_html($RegisterToStep5); $chkErrorBeforeSave = $chkErrorBeforeReg->find('span[id=ctl00_ctl00_mainContent_PageContent_UcAttention1_lblAttention]')[0]->innertext; if (!empty($chkErrorBeforeSave)) { echo "[" . getTimeNow() . "] [" . $Subject_To_Register[$i]['SubjectCode'] . "] Register Error Message : (Before Confirm Register) " . explode('<br>', $chkErrorBeforeSave)[0] . "\n"; $failure++; } else { echo "[" . getTimeNow() . "] Register Information : Finally enroll to subject " . $Subject_To_Register[$i]['SubjectCode'] . "\n"; $SemiFinalRegister = GetDataFromURL($SIS_URL . '/WebRegist2005/Enroll/EnrollDetail.aspx', null); $SemiFinalFormRegister = ExtractFormHided($SemiFinalRegister, 'aspnetForm'); $SemiFinalFormRegister['ctl00$ctl00$mainContent$PageContent$btnConfirm'] = 'Confirm The Registration'; $FinalRegister = GetDataFromURL($SIS_URL . '/WebRegist2005/Enroll/EnrollDetail.aspx', $SemiFinalFormRegister); echo "[" . getTimeNow() . "] [" . $Subject_To_Register[$i]['SubjectCode'] . "] Register Information : Complete!\n"; $success++; } } echo "------------------------------------------------------------------------\n"; echo "[" . getTimeNow() . "] Registration finished :: Success: {$success} : Failure: {$failure} ::\n"; echo "------------------------------------------------------------------------\n"; break; } } } else { echo "[" . getTimeNow() . "] Invalid PSU Passport Username or PSU Passport Password"; }
function bumpVastEventTrackingBucketCounter($data) { $aQuery = array('interval_start' => $data['interval_start'], 'creative_id' => $data['creative_id'], 'zone_id' => $data['zone_id'], 'vast_event_id' => $data['vast_event_id']); return OX_bucket_updateTable('data_bkt_vast_e', $aQuery); } ###START_STRIP_DELIVERY OX_Delivery_logMessage('starting delivery script ' . __FILE__, 7); ###END_STRIP_DELIVERY MAX_commonRegisterGlobalsArray(array('vast_event')); // if its a vast tracking event if ($vast_event) { // NB: videotimeposn is not yet supported by the player MAX_commonRegisterGlobalsArray(array('video_time_posn', 'banner_id', 'zone_id')); // Prevent the logging beacon from being cached by browsers MAX_commonSetNoCacheHeaders(); // Remove any special characters from the request variables MAX_commonRemoveSpecialChars($_REQUEST); $time = getTimeNow(); $oi = $GLOBALS['_MAX']['CONF']['maintenance']['operationInterval']; $intervalStart = gmdate('Y-m-d H:i:s', $time - $time % ($oi * 60)); $viewerIsOkToLog = _viewersHostOkayToLog(); $aQuery = array('creative_id' => intVal($banner_id), 'zone_id' => intVal($zone_id), 'vast_event_id' => getVastEventIdFromVastEventStr($vast_event), 'interval_start' => $intervalStart, 'is_host_ok' => $viewerIsOkToLog); if ($viewerIsOkToLog) { bumpVastEventTrackingBucketCounter($aQuery); } if (!empty($_REQUEST[$GLOBALS['_MAX']['CONF']['var']['dest']])) { MAX_redirect($_REQUEST[$GLOBALS['_MAX']['CONF']['var']['dest']]); exit; } } MAX_commonDisplay1x1();