本文整理汇总了PHP中PSU类的典型用法代码示例。如果您正苦于以下问题:PHP PSU类的具体用法?PHP PSU怎么用?PHP PSU使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PSU类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prep_args
/**
* 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: max_aid_year
/**
* 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: get
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 = 'tms_' || 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: submit
/**
* 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' => 'helpdesk@plymouth.edu', '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: get
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: get_rules
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: get
/**
* 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: get_collection
/**
* 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: delete
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: _prep_args
/**
* 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: process
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: get
/**
* 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: get
/**
* 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: conditional_robot_from_config
/**
* 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: get
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;
}