コード例 #1
0
 /**
  * prepares arguments for DML
  */
 protected function _prep_args()
 {
     // this is the data prepared for binding.
     // these fields are ordered as they are in the table
     $args = array('the_id' => $this->id, 'psu_id' => $this->psu_id, 'name' => $this->name, 'report_group' => $this->report_group, 'contract_balance' => $this->contract_balance, 'account_status' => $this->account_status, 'record_type' => $this->record_type, 'plan_type' => $this->plan_type, 'fund_not_disbursed' => $this->fund_not_disbursed, 'tms_customer_number' => $this->tms_customer_number, 'file_id' => $this->file_id, 'date_parsed' => $this->date_parsed ? \PSU::db('banner')->BindDate($this->date_parsed_timestamp()) : null, 'date_processed' => $this->date_processed ? \PSU::db('banner')->BindDate($this->date_processed_timestamp()) : null, 'summer_contract_balance' => $this->summer_contract_balance, 'fall_contract_balance' => $this->fall_contract_balance, 'winter_contract_balance' => $this->winter_contract_balance, 'spring_contract_balance' => $this->spring_contract_balance);
     return $args;
 }
コード例 #2
0
 /**
  * Return the highest aid year for a person.
  */
 public function max_aid_year($pidm)
 {
     $sql = "\n\t\t\tSELECT rcrapp1_aidy_code\n\t\t\tFROM rcrapp1\n\t\t\tWHERE rcrapp1_pidm = :pidm\n\t\t\tORDER BY rcrapp1_aidy_code DESC\n\t\t";
     $args = array('pidm' => $pidm);
     $aid_year = PSU::db('banner')->GetOne($sql, $args);
     return $aid_year ?: null;
 }
コード例 #3
0
 public function get()
 {
     $sql = "\n\t\t\tSELECT \n\t\t\t\tc.date_processed,\n\t\t\t\tm.*\n\t\t\tFROM\n\t\t\t\tpayment_plan_contract c\n\t\t\t\tJOIN v_bio b\n\t\t\t\t  ON b.id = c.psu_id\n\t\t\t\tJOIN tbrmemo m\n\t\t\t\t  ON tbrmemo_pidm = b.pidm\n\t\t\t\t AND tbrmemo_create_user = '******' || c.tms_customer_number\n\t\t\t\t AND tbrmemo_data_origin = 'feed_' || :file_sub_type\n\t\t\tWHERE\n\t\t\t\tc.file_id = :file_id\n\t\t";
     $args = array('file_id' => $this->file_id, 'file_sub_type' => preg_replace('/[0-9]{4}_.+_(Grads?_)?([0-9]+)[^0-9]+$/', '\\2', $this->file_name));
     $results = \PSU::db('banner')->GetAll($sql, $args);
     return $results;
 }
コード例 #4
0
 /**
  * Actually submit the feedback 
  * @param array &$postData An array containing the data that has been validated
  * @param array &$responseData An array containing the data for the JSON response
  */
 public static function submit(&$postData, &$responseData)
 {
     // Email settings
     $email_settings = array('email_recip_address' => '*****@*****.**', 'subject_prefix' => 'PSU Mobile Feedback');
     // Create headers
     $mail_to = $email_settings['email_recip_address'];
     $mail_subject = $email_settings['subject_prefix'] . ' - ' . $postData['title'];
     $mail_headers = 'From: ' . $postData['email'] . "\r\n" . 'Reply-To: ' . $postData['email'];
     // Grab the message from a template
     $tpl = new \MobileTemplate();
     $tpl->assign('message', $postData['message']);
     $tpl->assign('feeling', $postData['feeling']);
     $mail_message = $tpl->fetch('feedback-email.tpl');
     // Mail the recipient
     if (\PSU::mail($mail_to, $mail_subject, $mail_message, $mail_headers)) {
         $responseData['success'] = true;
         $responseData['error'] = false;
         $responseData['response']['title'] = 'Success!';
         $responseData['response']['message'] = 'Your feedback was submitted! Thank you!';
     } else {
         $responseData['error'] = true;
         $responseData['response']['title'] = 'Uh oh...';
         $responseData['response']['message'] = 'There was a processing error. Please try again later.';
     }
     return $responseData;
 }
コード例 #5
0
 public function get()
 {
     $args = array('pidm' => $this->pidm);
     $sql = "\n\t\t\tSELECT rprauth_pidm pidm,\n\t\t\t\t\t\t rprauth_term_code term_code,\n\t\t\t\t\t\t rfrbase_detail_code detail_code,\n\t\t\t\t\t\t rprauth_amount amount\n\t\t\tFROM   rfrbase, rprauth\n\t\t\tWHERE  rprauth_pidm             = :pidm\n\t\t\t\tAND  rfrbase_fund_code        = rprauth_fund_code\n\t\t";
     $rset = \PSU::db('banner')->Execute($sql, $args);
     return $rset;
 }
コード例 #6
0
ファイル: Rules.php プロジェクト: AholibamaSI/plymouth-webapp
 public function get_rules()
 {
     $args = array('aidy' => $this->aid_year);
     $sql = "\n\t\t\tSELECT rorwebr_coa_ind,\n\t\t\t\t\t\t rorwebr_need_calc_ind,\n\t\t\t\t\t\t rorwebr_cum_loan_ind,\n\t\t\t\t\t\t rorwebr_detail_resource_ind,\n\t\t\t\t\t\t rorwebr_acpt_partial_amt_ind,\n\t\t\t\t\t\t rorwebr_acpt_all_awards_ind,\n\t\t\t\t\t\t rorwebr_resource_info_ind,\n\t\t\t\t\t\t rorwebr_award_info_ind,\n\t\t\t\t\t\t rorwebr_enrollment_status,\n\t\t\t\t\t\t rorwebr_housing_status_ind,\n\t\t\t\t\t\t rorwebr_term_zero_awrd_ind,\n\t\t\t\t\t\t rorwebr_fund_zero_amt_ind,\n\t\t\t\t\t\t rorwebr_resource_tab_ind,\n\t\t\t\t\t\t rorwebr_terms_tab_ind,\n\t\t\t\t\t\t rorwebr_award_acpt_tab_ind,\n\t\t\t\t\t\t rorwebr_special_msg_tab_ind,\n\t\t\t\t\t\t rorwebr_terms_cond_print_ind\n\t\t\t\tFROM rorwebr\n\t\t\t WHERE rorwebr_aidy_code = :aidy\n\t\t";
     $data = PSU::db('banner')->GetRow($sql, $args);
     return $data;
 }
コード例 #7
0
 /**
  * retrieve contracts
  */
 public function get()
 {
     $args = array();
     if ($this->psu_id) {
         $args['psu_id'] = $this->psu_id;
         $where .= " AND c.psu_id = :psu_id";
     }
     //end if
     if ($this->processed) {
         $where .= " AND c.date_processed IS NOT NULL";
     } elseif (!$this->include_processed) {
         $where .= " AND c.date_processed IS NULL";
     }
     //end if
     if ($this->num_rows) {
         $where .= " AND rownum <= :num_rows";
         $args['num_rows'] = $this->num_rows;
     }
     //end if
     if ($this->file_id) {
         $where .= " AND c.file_id = :file_id";
         $args['file_id'] = $this->file_id;
     }
     //end if
     $sql = "\n\t\t\tSELECT c.*, \n\t\t\t       b.pidm,\n\t\t         f.file_name,\n\t\t         f.file_type,\n\t\t\t\t\t\t f.file_sub_type,\n\t\t\t\t\t\t f.file_date\n\t\t\t\tFROM payment_plan_contract c\n\t\t\t\t\t\t JOIN payment_plan_feed f\n\t\t\t         ON f.id = c.file_id\n\t\t         LEFT JOIN v_bio b\n\t\t\t         ON b.id = psu_id\n\t\t\t\t\t\t\tAND REGEXP_LIKE( b.id, '[0-9]{9}' )\n\t\t\t WHERE 1 = 1 {$where} \n\t\t\t ORDER BY UPPER(b.last_name), UPPER(b.first_name), b.middle_name, file_id, c.id";
     $results = \PSU::db('banner')->Execute($sql, $args);
     return $results ? $results : array();
 }
コード例 #8
0
 /**
  * instantiates a group of PSURotation objects and returns them
  */
 public static function get_collection($dir, $params = array())
 {
     $params = PSU::params($params, self::$defaults);
     if ($params['type'] == 'image') {
         $files = PSUFiles::getImageArray($dir, 0, $params['depth']);
     } else {
         $files = PSUFiles::getImageArray($dir, 0, $params['depth'], array('txt', 'html'));
     }
     //end if
     foreach ((array) $files as $key => $file) {
         if (strpos($file, '/thumbs/') !== false) {
             unset($files[$key]);
         }
         //end if
     }
     //end foreach
     sort($files);
     $num_files = count($files);
     $collection = array();
     $collection_count = 0;
     while ($collection_count < $num_files && $collection_count < 4) {
         $random_index = rand(0, count($files) - 1);
         $params['set'] = $files[$random_index];
         $collection[] = new self($dir, $params);
         unset($files[$random_index]);
         sort($files);
         $collection_count = count($collection);
     }
     //end while
     return $collection;
 }
コード例 #9
0
ファイル: Note.php プロジェクト: AholibamaSI/plymouth-webapp
 public function delete()
 {
     //this function will delete a note
     $sql = "UPDATE psu_identity.person_notes \n\t\t\t\t SET deleted=1 \n                   WHERE id = :note_id";
     $data = array('note_id' => $this->id);
     return \PSU::db('banner')->Execute($sql, $data);
 }
コード例 #10
0
ファイル: SAU.php プロジェクト: AholibamaSI/plymouth-webapp
 /**
  * prepares arguments for DML
  */
 protected function _prep_args()
 {
     // this is the data prepared for binding.
     // these fields are ordered as they are in the table
     $args = array('the_id' => $this->id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'street_line1' => $this->street_line1, 'street_line2' => $this->street_line2, 'city' => $this->city, 'state' => $this->state, 'zip' => $this->zip, 'phone' => $this->phone, 'fax' => $this->fax, 'legacy_code' => $this->legacy_code);
     return $args;
 }
コード例 #11
0
 public function process()
 {
     $success = false;
     if ($this->psu_status == 'eod') {
         PSU::db('banner')->StartTrans();
         $person = PSUPerson::get($this->ordernumber);
         if ($person->pidm) {
             if ($this->status_flag == 'success') {
                 $appl_no = PSU::db('banner')->GetOne("SELECT appl_no FROM psu.v_ug_app WHERE pidm = " . $person->pidm);
                 if ($appl_no) {
                     $sql = "UPDATE sarchkl SET sarchkl_receive_date = sysdate WHERE sarchkl_pidm = " . $person->pidm . " AND sarchkl_appl_no = " . $appl_no . " AND sarchkl_admr_code = 'APFE'";
                     PSU::db('banner')->Execute($sql);
                 }
                 //end if
             }
             //end if
             $this->psu_status = 'loaded';
             $this->save();
             return PSU::db('banner')->CompleteTrans() ? $this->totalamount / 100 : false;
         }
         //end if
     }
     //end if
     PSU::db('banner')->CompleteTrans(false);
     return false;
 }
コード例 #12
0
 /**
  * retrieve receivables for a person
  */
 public function get()
 {
     $args = array('pidm' => $this->pidm);
     $sql = "SELECT * FROM tbraccd WHERE tbraccd_pidm = :pidm";
     $rset = \PSU::db('banner')->Execute($sql, $args);
     return $rset ? $rset : array();
 }
コード例 #13
0
 /**
  * retrieve phones for a person
  */
 public function get()
 {
     $args = array('wp_id' => $this->wp_id);
     $sql = "\n\t\t\tSELECT * \n\t\t\t  FROM person_phone\n\t\t\t WHERE wp_id = ?\n\t\t\t ORDER BY id DESC\n\t\t";
     $rset = \PSU::db('emergency_notification')->Execute($sql, $args);
     return $rset ? $rset : array();
 }
コード例 #14
0
 /**
  * Create a robot, using Config settings for host/port,
  * providing a PSU::is() conditional.
  *
  * @param $config
  * @param $is Conditional for PSU::is()
  * @return Object that impelements RobotInterface
  */
 public static function conditional_robot_from_config(\PSU\Config $config, $is)
 {
     if (\PSU::is($is)) {
         return self::robot_from_config($config);
     }
     return new Dummy(null, null);
 }
コード例 #15
0
 public function get()
 {
     $sql = "\n\t\t\tSELECT \n\t\t\t\td.date_processed,\n\t\t\t\tt.*\n\t\t\tFROM\n\t\t\t\tpayment_plan_disbursement d\n\t\t\t\tJOIN v_bio b\n\t\t\t\t  ON b.id = d.psu_id\n\t\t\t\tJOIN tbraccd t\n\t\t\t\t  ON t.tbraccd_pidm = b.pidm\n\t\t\t\t AND t.tbraccd_document_number = :document_number\n\t\t\tWHERE\n\t\t\t\td.file_id = :file_id\n\t\t";
     $args = array('document_number' => \PSU\AR\PaymentPlan::document_number($this->file_id), 'file_id' => $this->file_id);
     $results = \PSU::db('banner')->Execute($sql, $args);
     return $results;
 }
コード例 #16
0
 public function get()
 {
     $sql = "\n\t\t\tSELECT *\n\t\t\t  FROM sfrrgfe\n\t\t\t WHERE sfrrgfe_term_code = :term_code\n\t\t\t   AND sfrrgfe_type = 'STUDENT'\n\t\t\t\t AND sfrrgfe_flat_fee_amount IS NOT NULL\n\t\t";
     $args = array('term_code' => $this->term_code);
     $results = \PSU::db('banner')->Execute($sql, $args);
     return $results;
 }
コード例 #17
0
 public function __construct($prefix)
 {
     $this->prefix = $prefix;
     $file = 'other/psumc' . (PSU::isdev() ? '_dev' : '');
     $mc = PSUDatabase::connect($file, 'return');
     $this->connect($mc['hostname'], $mc['port']);
 }
コード例 #18
0
 public function __construct($args = array())
 {
     $args = PSU::params($args);
     $args['type'] = 'radio';
     parent::__construct($args);
     $this->selected = array();
 }
コード例 #19
0
 public static function Batch_Verify_SPRADDR($in)
 {
     $defaults = array('fn_max_verify' => 3000000, 'fb_update' => true, 'fb_only_unverified' => false, 'fv_address_type' => null, 'fn_days_back' => null, 'fb_skip_international' => true, 'fb_verify_inactive' => false, 'fd_from_date' => null, 'fd_to_date' => null, 'fb_set_activity_date_user' => false, 'fv_set_source_code' => null);
     $args = array_merge($defaults, $in);
     $bind = array();
     $sql = "BEGIN clean_address_banner.Batch_Verify_SPRADDR(";
     foreach ($args as $key => $val) {
         if (NULL === $val) {
             continue;
         }
         if (is_bool($val) || "false" == strtolower($val) || "true" == strtolower($val)) {
             $val = "true" == strtolower($val) || TRUE === $val ? "true" : "false";
             $sql .= "{$key} => {$val},";
         } else {
             $sql .= "{$key} => :{$key},";
             $bind[$key] = $val;
         }
     }
     $sql = substr($sql, 0, -1);
     $sql .= "); END;\t";
     $stmt = \PSU::db('banner')->PrepareSP($sql);
     foreach ($bind as $key => $val) {
         \PSU::db('banner')->InParameter($stmt, $args[$key], $key);
     }
     \PSU::db('banner')->Execute($stmt);
 }
コード例 #20
0
 public function query($args = array())
 {
     $args = \PSU::params($args, $defaults);
     $sql = "\n\t\t\tSELECT DISTINCT pidm\n\t\t\t  FROM v_account\n\t\t";
     $results = \PSU::db('banner')->GetCol($sql, $args);
     return $results;
 }
コード例 #21
0
 /**
  * retrieve deposits for a person
  */
 public function get()
 {
     $args = array('pidm' => $this->pidm);
     $sql = "BEGIN :c_cursor := tb_deposit.f_query_all(:pidm); END;";
     $rset = \PSU::db('banner')->ExecuteCursor($sql, 'c_cursor', $args);
     return $rset ? $rset : array();
 }
コード例 #22
0
 function testWpid()
 {
     $this->assertTrue(PSU::is_wpid('p0intless'), 'good wpid (default flags)');
     $this->assertFalse(PSU::is_wpid('t0intless'), 'bad initial char (default flags)');
     $this->assertFalse(PSU::is_wpid('p0intlss'), 'short wpid (default flags)');
     $this->assertFalse(PSU::is_wpid('p0intlessss'), 'long wpid (default flags)');
     $this->assertFalse(PSU::is_wpid('paintless'), 'missing number (default flags)');
     $this->assertTrue(PSU::is_wpid('p0intless', PSU::MATCH_WPID), 'good wpid (wpid flag)');
     $this->assertFalse(PSU::is_wpid('t0intless', PSU::MATCH_WPID), 'bad initial char (wpid flag)');
     $this->assertFalse(PSU::is_wpid('p0intlss', PSU::MATCH_WPID), 'short wpid (wpid flag)');
     $this->assertFalse(PSU::is_wpid('p0intlessss', PSU::MATCH_WPID), 'long wpid (wpid flag)');
     $this->assertFalse(PSU::is_wpid('paintless', PSU::MATCH_WPID), 'missing number (wpid flag)');
     $this->assertTrue(PSU::is_wpid('t0intless', PSU::MATCH_TEMPID), 'good tempid (tempid flag)');
     $this->assertFalse(PSU::is_wpid('p0intless', PSU::MATCH_TEMPID), 'bad initial char (tempid flag)');
     $this->assertFalse(PSU::is_wpid('t0intlss', PSU::MATCH_TEMPID), 'short wpid (tempid flag)');
     $this->assertFalse(PSU::is_wpid('t0intlessss', PSU::MATCH_TEMPID), 'long wpid (tempid flag)');
     $this->assertFalse(PSU::is_wpid('taintless', PSU::MATCH_TEMPID), 'missing number (tempid flag)');
     $this->assertTrue(PSU::is_wpid('p0intless', PSU::MATCH_BOTH), 'good wpid (both flag)');
     $this->assertTrue(PSU::is_wpid('t0intless', PSU::MATCH_BOTH), 'good tempid (both flag)');
     $this->assertFalse(PSU::is_wpid('z0intless', PSU::MATCH_BOTH), 'bad wpid (both flag)');
     $this->assertFalse(PSU::is_wpid('p0intlss', PSU::MATCH_BOTH), 'short wpid (both flag)');
     $this->assertFalse(PSU::is_wpid('t0intlss', PSU::MATCH_BOTH), 'short tempid (both flag)');
     $this->assertFalse(PSU::is_wpid('p0intlessss', PSU::MATCH_BOTH), 'long wpid (both flag)');
     $this->assertFalse(PSU::is_wpid('t0intlessss', PSU::MATCH_BOTH), 'long tempid (both flag)');
     $this->assertFalse(PSU::is_wpid('paintless', PSU::MATCH_BOTH), 'missing wpid number (both flag)');
     $this->assertFalse(PSU::is_wpid('taintless', PSU::MATCH_BOTH), 'missing tempid number (both flag)');
 }
コード例 #23
0
 public function get()
 {
     $sql = "\n\t\t\tSELECT *\n\t\t\t  FROM (\n\t\t\t\t\t\t\tSELECT f.*,\n\t\t\t\t\t\t\t\t\t\t Dense_Rank() OVER (PARTITION BY file_type ORDER BY id DESC) rank\t\n\t\t\t\t\t\t\t\tFROM payment_plan_feed f\n\t\t\t\t\t\t\t ORDER BY id DESC\n\t\t\t\t\t\t )\n\t\t\t WHERE file_type = :file_type\n\t\t\t   AND rank <= :num\n\t\t";
     $args = array('num' => $this->num, 'file_type' => $this->type);
     $results = \PSU::db('banner')->GetAll($sql, $args);
     return $results;
 }
コード例 #24
0
 /**
  * prepares arguments for DML
  */
 protected function _prep_args()
 {
     // this is the data prepared for binding.
     // these fields are ordered as they are in the table
     $args = array('the_id' => $this->id, 'gate_id' => $this->gate_id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'legacy_code' => $this->legacy_code);
     return $args;
 }
コード例 #25
0
 public function handleParams($property, $key = null, $value = null, $defaults = array())
 {
     if ($defaults) {
         $this->handleParams($property, $defaults);
     }
     //end if
     if (is_object($key) && $key instanceof PSUGraphObject) {
         $this->{$property}[$key->id] = $key;
     } elseif (is_array($key) || strpos($key, '=') !== false) {
         $values = PSU::params($key, $defaults);
         foreach ($values as $k => $v) {
             if ($property == 'options') {
                 $this->{$property}[$k] = new PSUGraphOption($k, $v);
             } else {
                 $this->{$property}[$k] = $v;
             }
             //end else
         }
         //end foreach
         return true;
     } elseif ($key && $value) {
         $this->{$property}[$key] = $value instanceof PSUGraphOption ? $value : new PSUGraphOption($k, $v);
         return true;
     } elseif ($key) {
         return $this->{$property}[$key];
     } else {
         return $this->{$property};
     }
     //end else
 }
コード例 #26
0
function cdn_postprocess($css)
{
    $file = $_SERVER['SCRIPT_FILENAME'];
    $css_dir = dirname($file);
    if (!preg_match_all('/url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)/', $css, $matches, PREG_PATTERN_ORDER)) {
        return $css;
    }
    $paths = $matches[1];
    $css_footer = "\n/*\ncss.prepend.php translations:\n\n";
    $search = array();
    $replace = array();
    foreach ($paths as $index => $path) {
        $orig_path = $path;
        $orig_match = $matches[0][$index];
        if (isset($search[$orig_match])) {
            continue;
        }
        $path = cdn_relative_path($css_dir, $path);
        $path = PSU::cdn($path, $file);
        if ($path != $orig_path) {
            $search[$orig_match] = $orig_match;
            // the complete original match
            $replace[$orig_match] = 'url(' . $path . ')';
        }
    }
    foreach ($search as $key => $path) {
        $css_footer .= "{$path} -> " . $replace[$key] . "\n";
    }
    $css_footer .= "*/";
    $css = str_replace($search, $replace, $css);
    if (false) {
        $css .= $css_footer;
    }
    return $css;
}
コード例 #27
0
 /**
  * url
  *
  * Override the base ETrans url function to specifically work for OL 
  * applicants. Build up the gateway with OL App specific variables, 
  * and then return the formatted URL as provided by the _url ETrans 
  * function  with the specified params.
  *
  * @param int $aidm The aidm of the applicant in question.
  * @param string $app_id The specific application id for the fee
  * @param string $program (Optional) Program of study
  * @return string The formatted URL of the payment gateway
  */
 public function url($aidm, $app_id, $program = 'Online')
 {
     /**
      * Create a new applicant with the provided aidm. The applicant 
      * class checks if the user already has a pidm before hand, and will 
      * return a PSU Person object if that is the case. From there, we 
      * set the applicant identifier that we are using to be that pidm if 
      * they already exist, otherwise we use the aidm as confirmed to 
      * exist by the successful creation of an applicant object.
      */
     $applicant = new PSU\Applicant($aidm);
     $applicant_id = $applicant instanceof PSU\Person ? $applicant->pidm : $applicant->aidm;
     if (!$applicant_id) {
         throw new Exception('Could not find any information attached to AIDM "' . $aidm . '"');
     }
     /**
      * Online application fee specific URL parameters. These match up 
      * with columns in the ecommerce_transaction table.
      */
     $params = array('orderNumber' => $applicant_id, 'amount' => 5000, 'amountDue' => 5000, 'orderType' => 'Admission UG OL App', 'orderDescription' => 'Undergraduate Online Admission App Fee', 'name' => trim($applicant->last_name . ', ' . $applicant->first_name . ' ' . $applicant->middle_name), 'userChoice2' => $program, 'userChoice3' => $app_id);
     /**
      * Rely on the ETrans object to build up a redirect URL to relocate 
      * the user after they have passed through the payment gateway.
      */
     $this->setURLParam('redirectUrl', $this->base_url . '/receipt.html');
     $this->setURLParam('retriesAllowed', 5);
     $this->setURLParam('redirectUrlParameters', implode(',', $this->_redirect_params));
     /**
      * Return the specific URL based on execution location
      */
     return $this->_url(PSU::isdev() ? 'test' : 'prod', $params);
 }
コード例 #28
0
 /**
  * prepares arguments for DML
  */
 protected function _prep_args()
 {
     // this is the data prepared for binding.
     // these fields are ordered as they are in the table
     $args = array('the_id' => $this->id, 'sau_id' => $this->sau_id, 'district_id' => $this->district_id, 'school_type_id' => $this->school_type_id, 'school_approval_level_id' => $this->school_approval_level_id, 'name' => $this->name, 'slug' => $this->slug ?: \PSU::createSlug($this->name), 'grade_span' => $this->grade_span, 'enrollment' => $this->enrollment, 'street_line1' => $this->street_line1, 'street_line2' => $this->street_line2, 'city' => $this->city, 'state' => $this->state, 'zip' => $this->zip, 'phone' => $this->phone, 'fax' => $this->fax, 'legacy_code' => $this->legacy_code);
     return $args;
 }
コード例 #29
0
 private function _get_components()
 {
     $args = array('pidm' => $this->pidm, 'aidy' => $this->aid_year, 'code' => null);
     $sql = "\n\t\t\tSELECT RTVCOMP_DESC,\n\t\t\t\t   NVL(RBRACMP_AMT, 0) RBRACMP_AMT\n\t\t\t  FROM RBRACMP, RTVCOMP\n\t\t\t WHERE RBRACMP_AIDY_CODE = :aidy\n\t\t\t   AND RBRACMP_PIDM      = :pidm\n\t\t\t   AND RBRACMP_COMP_CODE = RTVCOMP_CODE\n\t\t\t   -- 080500-5\n\t\t\t   AND ((  :code IS NULL\n\t\t\t\t   AND NOT EXISTS\n\t\t\t\t\t  (SELECT 'X'\n\t\t\t\t\t\t FROM RTVBTYP\n\t\t\t\t\t\tWHERE RTVBTYP_PELL_IND  = 'Y'\n\t\t\t\t\t\t  AND RBRACMP_BTYP_CODE = RTVBTYP_CODE))\n\t\t\t\t\tOR\n\t\t\t\t\t(  :code = 'PELL'\n\t\t\t\t   AND EXISTS\n\t\t\t\t\t  (SELECT 'X'\n\t\t\t\t\t\t FROM RTVBTYP\n\t\t\t\t\t\tWHERE RTVBTYP_PELL_IND  = 'Y'\n\t\t\t\t\t\t  AND RBRACMP_BTYP_CODE = RTVBTYP_CODE)))\n\t\t\tORDER BY RTVCOMP_PRINT_SEQ_NO\n\t\t";
     $rset = PSU::db('banner')->Execute($sql, $args);
     return $rset;
 }
コード例 #30
0
 public function query($args = array())
 {
     $defaults = array('type_id' => $this->type, 'attribute' => $this->attribute);
     $args = \PSU::params($args, $defaults);
     $sql = "\n\t\t\tSELECT distinct wp_id\n\t\t\t  FROM (\n\t\t\t\t\t\tSELECT wp_id\n\t\t\t\t\t\t\tFROM v_idm_attributes\n\t\t\t\t\t\t WHERE attribute = :attribute\n\t\t\t\t\t\t\t AND type_id = :type_id\n\t\t\t\t\t\t ORDER BY lower(last_name), \n\t\t\t\t\t\t\t\t\t lower(first_name), \n\t\t\t\t\t\t\t\t\t lower(middle_name)\n\t\t\t\t\t\t\t)\n\t\t";
     $results = \PSU::db('banner')->GetCol($sql, $args);
     return $results;
 }