#!/usr/bin/php <?php /** * Returns a student's housing assignment, meal plan, and application status * @author Jeremy Booker <jbooker at tux dot appstate dot edu> */ require_once 'SOAP.php'; require_once 'cliCommon.php'; $args = array('username' => '', 'term' => ''); $switches = array(); check_args($argc, $argv, $args, $switches); $soap = new PhpSOAP(); $result = $soap->getHousMealRegister($args['username'], $args['term'], 'All'); print_r($result); echo "\n";
#!/usr/bin/php <?php /** * Gets all assignments from HMS and compares them to Banner PROD * @author Jeff Tickle <jtickle at tux dot appstate dot edu> */ require_once 'SOAP.php'; require_once 'cliCommon.php'; require_once '../db_config.php.inc'; $args = array('term' => ''); $switches = array(); check_args($argc, $argv, $args, $switches); $soap = new PhpSOAP(); $db = pg_connect("host={$host} dbname={$database} user={$dbuser} password={$dbpasswd}"); $results = pg_query("\n SELECT\n hms_assignment.asu_username,\n hms_bed.banner_id,\n hms_residence_hall.banner_building_code\n FROM hms_assignment\n JOIN hms_bed ON\n hms_assignment.bed_id = hms_bed.id\n JOIN hms_room ON\n hms_bed.room_id = hms_room.id\n JOIN hms_floor ON\n hms_room.floor_id = hms_floor.id\n JOIN hms_residence_hall ON\n hms_floor.residence_hall_id = hms_residence_hall.id\n WHERE\n hms_room.is_online = 1 AND\n hms_floor.is_online = 1 AND\n hms_residence_hall.is_online = 1 AND\n hms_assignment.term = {$args['term']}\n ORDER BY\n hms_residence_hall.banner_building_code,\n hms_bed.banner_id\n"); while ($row = pg_fetch_assoc($results)) { $banner = $soap->getHousMealRegister($row['asu_username'], $args['term'], 'All'); echo "{$row['asu_username']}:\t"; echo "{$row['banner_building_code']} {$row['banner_id']}"; echo " <=> "; if (!isset($banner->room_assign) || !is_object($banner->room_assign)) { echo "No room assignment! *************************** \n"; continue; } echo "{$banner->room_assign->bldg_code} {$banner->room_assign->room_code}"; if ($row['banner_building_code'] != $banner->room_assign->bldg_code || $row['banner_id'] != $banner->room_assign->room_code) { echo "\t*********************"; } echo "\n"; }