/** * BannerJobs * * BannerJobs constructor with db connection. * * @since version 1.0.0 * @param ADOdb $adodb ADOdb database connection */ function __construct() { $this->_conf = PSUDatabase::connect('other/jobsub', 'return'); if (!$this->_conf) { exit("No configuration for this program found."); } }
public function __construct($prefix) { $this->prefix = $prefix; $file = 'other/psumc' . (PSU::isdev() ? '_dev' : ''); $mc = PSUDatabase::connect($file, 'return'); $this->connect($mc['hostname'], $mc['port']); }
/** * __construct * * constructor for ZimbraAdmin API * * @since version 1.0 * @access public * @param string $username username to use in the construction of object * @param string $which type to construct, defaults to prod */ public function __construct($username = '******', $which = 'prod') { $file = "other/zimbra" . ($which == 'prod' ? '' : '_dev'); $credentials = PSUDatabase::connect($file, 'return'); $this->_admin_username = $credentials['username']; $this->_admin_password = $credentials['password']; parent::__construct($username, $which); $this->_protocol = 'https://'; }
/** * ems * * constructor initializes sql connection to the ems * * @param integer $list_id list id to be set. Defaults to 0 */ function ems($list_id = 0) { if (isset($_SERVER['URANUS'])) { $this->db = PSUDatabase::connect('mysql/sendstudio_dev'); } else { $this->db = PSUDatabase::connect('mysql/sendstudio'); } $this->setListID($list_id); }
/** * __construct * * constructor sets up connectivity to servers * * @since version 1.0 * @acess public * @param string $username username * @param string $which defaults to prod */ public function __construct($username, $which = 'prod') { if ($which == 'dev') { $which = 'zimbra_dev'; $this->_dev = true; } else { $which = 'zimbra'; } // load the following configuration settings via PSU's credential storage mechanism require_once 'PSUDatabase.class.php'; $conf = PSUDatabase::connect('other/' . $which, 'return'); $this->_preAuthKey = PSUSecurity::password_decode($conf['key']); $this->_protocol = $conf['protocol']; $this->_server = $conf['server']; // end of PSU proprietary configuration load /* **** if not PSU, do something similar to the following: $this->_preAuthKey = '<insert key string acquired from Zimbra server>'; $this->_protocol = 'https://'; // could also be http:// $this->_server = 'zimbra.hostname.edu'; *** */ $this->_username = $username; $this->_timestamp = time() . '000'; }
/** * connect * * handle connetions to the database * * @access public */ function connect() { require_once 'PSUDatabase.class.php'; $this->db = PSUDatabase::connect('mysql/faculty'); }
/** * constructor that accepts in either a pidm or a username, or a PSUPerson object * * @since version 1.0.0 * @param string $id PSUPerson, username, or pidm */ public function __construct($id) { if (is_object($id) && get_class($id) === 'PSUPerson') { $this->person = $id; } else { $this->person = PSUPerson::get($id); } if (!$this->person || !$this->person->hasSystemAccount()) { return; } $this->username = $this->person->username; $this->db = PSUDatabase::connect('mssql/printers2'); $this->load(); }
/** * _load_voicemail * * loads voicemail info * * @access protected */ protected function _load_voicemail() { $db = PSUDatabase::connect('mysql/aster-misuser'); if ($db->IsConnected() && ($voicemail = $db->GetOne("SELECT mailbox FROM voicemail_users WHERE customer_id =" . $this->person->pidm))) { $this->person->voicemail = substr($voicemail, -4); } //end if }
/** * Magic method to access our common database instances and other "globals." Object * aliases get stored in $this->dbconn under their connection strings. */ public function __get($dbname) { $dbname = strtolower($dbname_get = $dbname); // attempt to translate aliases to their connection strings $connection_string = isset($this->databases[$dbname]) ? $this->databases[$dbname] : $dbname; // do we have a connection using that connection string? we did some transformations // to $dbname, which may be forcing us through a new __get. // // PSU::get('PSC1'); // sets $this->PSC1 and $this->psc1 // PSU::get('oracle/psc1_psu/fixcase'); // sets $this->oracle/psc1_psu/fixcase // if (!empty($connection_string) && isset($this->dbconn[$connection_string])) { // add the alias to reduce overhead on the next run return $this->{$dbname_get} = $this->{$dbname} = $this->dbconn[$connection_string]; } // check for non-db hooks. may take parameters, separated by slashes. use $dbname_get // because parameters may be case-sensitive. $tokens = explode('/', $dbname_get); $shortcut = array_shift($tokens); if (isset($this->shortcuts[$shortcut])) { // load required libraries, rather than making user include libraries before // asking the registry for the classes. switch ($shortcut) { case 'ad': require_once 'PSUadLDAP.class.php'; break; case 'facebook': require_once 'facebook-platform/facebook.php'; if (empty($tokens)) { $tokens = self::fbAPI(); } //end if break; case 'lms': require_once 'webct.class.php'; break; case 'idmobject': require_once 'IDMObject.class.php'; break; case 'log': require_once 'PSULog.class.php'; break; case 'luminisportal': require_once 'portal.class.php'; break; case 'mc': require_once 'PSUMemcache.class.php'; break; case 'zimbraadmin': require_once 'zimbraAdmin.class.php'; break; case 'phpmailer': require_once 'phpmailer/class-phpmailer.php'; require_once 'phpmailer/class-smtp.php'; break; } $callback = $this->shortcuts[$shortcut]; // are we instantiating via the constructor? if (is_array($callback) && is_string($callback[0])) { if ($callback[1] == '__construct' || $callback[1] == $callback[0]) { // yes, constructor is being used. instantiate via reflection. $r = new ReflectionClass($callback[0]); if (count($tokens) > 0) { return $this->{$dbname_get} = $r->newInstanceArgs($tokens); } else { return $this->{$dbname_get} = $r->newInstance(); } } } if (count($tokens) > 0) { return $this->{$dbname_get} = call_user_func_array($callback, $tokens); } else { return $this->{$dbname_get} = call_user_func($callback); } } // if this is a known alias, instantiate the database if (isset($this->databases[$dbname])) { return $this->{$dbname_get} = $this->{$dbname} = $this->dbconn[$connection_string] = PSUDatabase::connect($connection_string); } // not a known alias, is it a database connection string for psudatabase? if (false !== strpos($dbname_get, '/')) { return $this->{$dbname_get} = $this->{$dbname} = $this->dbconn[$dbname_get] = PSUDatabase::connect($dbname_get); } // not a known alias, not a database connection string throw new Exception('unknown database alias provided: ' . $dbname_get); }
$GLOBALS['BASE_DIR'] = dirname(__FILE__); $GLOBALS['BASE_URL'] = 'https://' . $_SERVER['HTTP_HOST'] . '/webapp/remote-files'; $GLOBALS['COMMON_JS'] = 'https://www.plymouth.edu/includes/js'; // DEBUG: change to better path once we go live? $GLOBALS['LOCAL_INCLUDES'] = $GLOBALS['BASE_DIR'] . '/includes'; $GLOBALS['MAX_RENAME_LENGTH'] = 100; $GLOBALS['DEFAULT_HOST'] = 'titan'; // ************ Internal Includes ************* // require_once $GLOBALS['LOCAL_INCLUDES'] . '/SCPlib.class.php'; require_once $GLOBALS['LOCAL_INCLUDES'] . '/RFPermissions.class.php'; require_once $GLOBALS['LOCAL_INCLUDES'] . '/RFSmarty.class.php'; require_once $GLOBALS['LOCAL_INCLUDES'] . '/functions.php'; require_once $GLOBALS['BASE_DIR'] . '/rfutil/rfutil.inc.php'; IDMObject::authN(); $GLOBALS['BANNER'] = PSUDatabase::connect('oracle/psc1_psu/fixcase'); $GLOBALS['RemoteFiles'] = PSUDatabase::connect('mysql/myplymouth'); $GLOBALS['BannerIDM'] = new IDMObject($GLOBALS['BANNER']); $GLOBALS['PHPSESSID'] = $_COOKIE['PHPSESSID']; // make sure our session variables are set up if (!isset($_SESSION['javascript'])) { $_SESSION['javascript'] = true; } if (isset($_GET['go'])) { $go = $_GET['go']; if (empty($go)) { $go = $GLOBALS['DEFAULT_HOST']; } elseif (!ctype_lower($go)) { $go = $GLOBALS['DEFAULT_HOST']; $_SESSION['errors'][] = 'An invalid server name was provided via go.plymouth.edu.'; } PSUHTML::redirect($GLOBALS['BASE_URL'] . "/" . $go . ":");
require_once 'BannerStudent.class.php'; //student class require_once 'PSUECommerce.class.php'; require_once 'PSUECommerceInterface.class.php'; require_once 'PSUECommerceTransaction.class.php'; require_once 'ecommerce/ETrans.class.php'; require_once 'channel.class.php'; /*******************[End Common Includes]**********************/ /*******************[Local Includes]**********************/ require_once $GLOBALS['LOCAL_INCLUDES'] . '/ECommerceSmarty.class.php'; /*******************[End Local Includes]**********************/ /*******************[Database Connections]*****************/ $which = 'test'; if ($_GET['which'] == 'psc1') { $which = 'psc1'; } elseif (preg_match('/https?\\:\\/\\/www\\./', $GLOBALS['BASE_URL']) && $_GET['which'] != 'test') { $which = 'psc1'; } //end else $GLOBALS['BANNER'] = PSUDatabase::connect('oracle/' . $which . '_psu/fixcase'); /*******************[End Database Connections]*****************/ $GLOBALS['BannerStudent'] = new BannerStudent($GLOBALS['BANNER']); $GLOBALS['BannerIDM'] = new IDMObject(); if (strchr($_SERVER['SCRIPT_NAME'], '/admin/')) { $_SESSION['username'] = IDMObject::authN(); if (!IDMObject::authZ('permission', 'mis')) { exit("You do not have sufficient permissions to view this page."); } //end if } //end if
exit; } // Local Includes $GLOBALS['LOCAL_INCLUDES'] = $GLOBALS['BASE_DIR'] . '/includes'; $GLOBALS['TEMPORARY_FILES'] = '/web/temp'; // Directory to hold Smarty's compiled templates $GLOBALS['SMARTY_COMPILE'] = $GLOBALS['TEMPORARY_FILES'] . '/phonebook'; if (!is_writable($GLOBALS['SMARTY_COMPILE'])) { mkdir($GLOBALS['SMARTY_COMPILE'], 0700); } /*******************[End Site Constants]*******************/ $GLOBALS['TITLE'] = 'Public Directory'; /*******************[Authorization]*****************/ $can_see_images = false; if ($_SESSION['pidm']) { /**** TODO: make this based off of APE *****/ $GLOBALS['BANNER'] = PSUDatabase::connect('oracle/psc1_psu/fixcase'); if (IDMObject::authZ('department', 'University Police')) { $can_see_images = true; } //end if /**** END TODO: make this based off of APE *****/ IDMObject::loadAuthZ($_SESSION['pidm']); if (IDMObject::authZ('permission', 'view_idcard_images')) { $can_see_images = true; } //end if } //end if /*******************[End Authorization]*****************/ $tpl = new PSUTemplate();
/** * _initConnection * * setup configuration parameters to initiate the LDAP connection * *@param string $which */ private function _initConnection($which) { $this->which = '_' . $which; // gets the needed configuration variables for connecting to the portal ldap // includes hostname, password, and username require_once 'PSUDatabase.class.php'; if ($this->which == '_prod') { $conf = PSUDatabase::connect('ldap/portal', 'return'); } else { $conf = PSUDatabase::connect('ldap/portal' . $this->which, 'return'); } //end else $this->_ldap = $conf; }
$GLOBALS['PARTS_MARKUP_MAX'] = $config->get('systems-workorder', 'parts_markup_max'); $GLOBALS['SHOP_EMAIL'] = "*****@*****.**"; $GLOBALS['IP'] = explode(".", $_SERVER['REMOTE_ADDR']); $sql = "SELECT ip FROM shop_authorized_ips"; $GLOBALS['HD_IPS'] = \PSU::db('systems')->GetCol($sql); $GLOBALS['IS_HD'] = in_array($_SERVER['REMOTE_ADDR'], $GLOBALS['HD_IPS']); /*******************[Includes]**********************/ require_once 'xtemplate.php'; //XTemplates require_once "adldap/adLDAP.php"; // AD integration require_once "functions.php"; // local functions /*******************[End Includes]**********************/ if (!isset($GLOBALS['AD'])) { $conf = PSUDatabase::connect('ldap/password', 'return'); $conf['password'] = PSUSecurity::password_decode($conf['password']); $options['account_suffix'] = "@plymouth.edu"; $options['base_dn'] = $conf['dn']; $options['domain_controllers'] = array($conf['hostname'], $conf['hostname2']); $options['ad_username'] = $conf['username']; $options['ad_password'] = $conf['password']; $options['real_primarygroup'] = true; $options['use_ssl'] = true; $options['recursive_groups'] = true; $GLOBALS['AD'] = new adLDAP($options); } $GLOBALS['SYSTEMS_DB'] = PSU::db('systems'); // do whatever you do to authenticate the user....set the // username into a session variable. // at PSU we use phpCAS:
/** * duplicates * * constructor sets instance of database connection * * @access public * @since version 0.1.0 */ function __construct($db = false) { if ($db) { $this->_db = $db; $result = true; } else { $GLOBALS['BANNER'] = PSUDatabase::connect('oracle/psc1_psu/fixcase'); } //end else }
/** * _connectTLCDB * * sets up a db connection with the mysql calllog portion * *@return boolean */ function _connectTLCDB() { if (is_object($this->tlc_db)) { return true; } //end if require_once 'PSUDatabase.class.php'; $this->tlc_db = PSUDatabase::connect('mysql/calllog'); return true; }
throw new Exception('You are not authorized to reset profiles.'); } // did we get all the needed data? if (!isset($_GET['username']) || !isset($_GET['profile'])) { throw new Exception('Username or profile type was missing in request.'); } $args = array('username' => $_GET['username'], 'profile' => $_GET['profile'] == 0 ? 0 : 1); // validate the username $pidm = $GLOBALS['BannerIDM']->getIdentifier($args['username'], 'username', 'pid'); if ($pidm === false) { throw new Exception('An invalid username was specified (pidm not found).'); } // // everything's good, insert the record // $systems = PSUDatabase::connect('mysql/systems'); $sql = "INSERT INTO profile_reset (uname, profile) VALUES (?, ?)"; $systems->Execute($sql, $args); $profile_type = $args['profile'] == 0 ? 'Vista roaming' : 'Terminal Services'; $GLOBALS['LOG']->write('Profile reset (' . $profile_type . ')', $args['username']); $response['message'] = sprintf("%s profile queued for deletion, this may take up to three minutes.", $profile_type); $response['status'] = 'success'; } catch (Exception $e) { $response['message'] = $e->getMessage(); } // // ajax requests end here // if (isset($_GET['method']) && $_GET['method'] == 'js') { header('Content-type: application/json'); die(json_encode($response));
<?php require_once 'PSUDatabase.class.php'; require_once 'xtemplate.php'; require_once 'BannerCourse.class.php'; $GLOBALS['QUERY_BANNER'] = PSUDatabase::connect('oracle/psc1_psu'); if (!$GLOBALS['BannerCourse']) { $GLOBALS['BannerCourse'] = new BannerCourse($GLOBALS['QUERY_BANNER']); } //endif function courseQueryResults($parameters = '', $termcode = '', $department = '', $crn = '', $subj_code = '', $number = '', $section = '', $online = '', $session = '') { $tpl = new XTemplate('/web/pscpages/includes/templates/course_query_form.tpl'); if (is_array($parameters)) { $termcode = $parameters['termcode']; $department = $parameters['department']; $crn = $parameters['crn']; $subj_code = $parameters['subj_code']; $number = $parameters['number']; $section = $parameters['section']; $online = $parameters['online']; $session = $parameters['session']; } //end if $courses = array(); $query = "SELECT sect.ssbsect_crn \t\t\t\t\t\tas crn,\n\t\t\t\t\t\t\t\t sect.ssbsect_subj_code \t\t\tas subject_code,\n\t\t\t\t\t\t\t\t sect.ssbsect_crse_numb \t\t\tas course_number,\n\t\t\t\t\t\t\t\t sect.ssbsect_seq_numb \t\t\t\tas course_section,\n\t\t\t\t\t\t\t\t crse.scbcrse_title \t\t\t\t\tas course_title,\n\t\t\t\t\t\t\t\t sect.ssbsect_crse_title \t\t\tas section_title,\n\t\t\t\t\t\t\t\t ssts.stvssts_desc\t\t\t\t\t\tas course_status,\n\t\t\t\t\t\t\t\t sect.ssbsect_ssts_code\t\t\t\tas csta_code,\n\t\t\t\t\t\t\t\t sect.ssbsect_gmod_code \t\t\tas grading_mode,\n\t\t\t\t\t\t\t\t substr(decode(sect.ssbsect_sess_code,null,null,f_student_get_desc('STVSESS',sect.ssbsect_sess_code,30)),1,30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas session_data,\n\t\t\t\t\t\t\t\t sect.ssbsect_credit_hrs \t\t\tas credit_hours,\n\t\t\t\t\t\t\t\t crse.scbcrse_credit_hr_high \t\tas credit_high,\n\t\t\t\t\t\t\t\t crse.scbcrse_credit_hr_low\t\t\tas credit_low,\n\t\t\t\t\t\t\t\t crse.scbcrse_credit_hr_ind\t\t\tas credit_ind,\n\t\t\t\t\t\t\t\t sect.ssbsect_bill_hrs \t\t\t\tas billing_hours,\n\t\t\t\t\t\t\t\t sect.ssbsect_prior_enrl \t\t\tas prior_enroll,\n\t\t\t\t\t\t\t\t sect.ssbsect_proj_enrl \t\t\tas projected_enroll,\n\t\t\t\t\t\t\t\t sect.ssbsect_max_enrl \t\t\t\tas max_enroll,\n\t\t\t\t\t\t\t\t sect.ssbsect_enrl \t\t\t\t\t\tas current_enroll,\n\t\t\t\t\t\t\t\t sect.ssbsect_seats_avail \t\tas seats_available,\n\t\t\t\t\t\t\t\t sect.ssbsect_tot_credit_hrs \tas total_credit_hours,\n\t\t\t\t\t\t\t\t sect.ssbsect_wait_capacity \tas wait_capacity,\n\t\t\t\t\t\t\t\t sect.ssbsect_wait_count \t\t\tas wait_count,\n\t\t\t\t\t\t\t\t sect.ssbsect_wait_avail \t\t\tas wait_available,\n\t\t\t\t\t\t\t\t sect.ssbsect_lec_hr \t\t\t\t\tas lecture_hours,\n\t\t\t\t\t\t\t\t sect.ssbsect_lab_hr \t\t\t\t\tas lab_hours,\n\t\t\t\t\t\t\t\t sect.ssbsect_oth_hr \t\t\t\t\tas other_hours,\n\t\t\t\t\t\t\t\t sect.ssbsect_cont_hr \t\t\t\tas contact_hours,\n\t\t\t\t\t\t\t\t substr(decode(crse.scbcrse_dept_code,null,null,f_student_get_desc('STVDEPT',crse.scbcrse_dept_code,30)),1,30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas department,\n\t\t\t\t\t\t\t\t substr(decode(sect.ssbsect_ptrm_code,null,null,f_student_get_desc('STVPTRM',sect.ssbsect_ptrm_code,30)),1,30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas term_length,\n\t\t\t\t\t\t\t\t iden.spriden_pidm as instructor_pidm,\n\t\t\t\t\t\t\t\t nvl(iden.spriden_last_name,'STAFF')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas instructor_last,\n\t\t\t\t\t\t\t\t iden.spriden_first_name\t\t\tas instructor_first,\n\t\t\t\t\t\t\t\t substr(iden.spriden_mi,1,1)\tas instructor_mi,\n\t\t\t\t\t\t\t\t sect.ssbsect_insm_code\t\t\t\tas insm_code,\n\t\t\t\t\t\t\t\t substr(decode(sect.ssbsect_sess_code,null,null,f_student_get_desc('STVSESS',sect.ssbsect_sess_code,30)),1,30)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas session_ind\n\t\t\t\t\t\tFROM ssbsect sect,\n\t\t\t\t\t\t\t\t scbcrse crse,\n\t\t\t\t\t\t\t\t spriden iden,\n\t\t\t\t\t\t\t\t stvssts ssts\n\t\t\t\t\t WHERE sect.ssbsect_term_code='{$termcode}'\n\t\t AND crse.scbcrse_subj_code=sect.ssbsect_subj_code\n\t\t AND crse.scbcrse_crse_numb=sect.ssbsect_crse_numb\n\t\t AND crse.scbcrse_eff_term=(SELECT max(crse2.scbcrse_eff_term)\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM scbcrse crse2\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE crse2.scbcrse_subj_code=crse.scbcrse_subj_code\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t AND crse2.scbcrse_crse_numb=crse.scbcrse_crse_numb\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t AND crse2.scbcrse_eff_term<='{$termcode}')\n\t\t AND crse.scbcrse_coll_code='PL'\n\t\t AND iden.rowid(+) = f_get_instr_spriden_rowid(sect.ssbsect_crn , '{$termcode}','Y',null)\n\t\t AND ssts.stvssts_code=sect.ssbsect_ssts_code"; if ($department) { $query .= " AND crse.scbcrse_dept_code='" . strtoupper($department) . "'"; } if ($crn) { $query .= " AND sect.ssbsect_crn like '" . strtoupper($crn) . "%'";
/** * _connect * * connect to the mail database * * @access private */ private function _connect() { $this->_db = PSUDatabase::connect('mysql/email'); }
//application functions require_once $GLOBALS['LOCAL_INCLUDES'] . '/APE.class.php'; //APE class require_once $GLOBALS['LOCAL_INCLUDES'] . '/APEAuthZ.class.php'; //APE class require_once $GLOBALS['LOCAL_INCLUDES'] . '/APESmarty.class.php'; //APE class /*******************[End Local Includes]**********************/ /*******************[Database Connections]*****************/ $GLOBALS['BANNER'] = PSUDatabase::connect('oracle/psc1_psu/fixcase'); $GLOBALS['ITS4'] = PSUDatabase::connect('mysql/data_mart-admin'); $GLOBALS['CALLLOG'] = PSUDatabase::connect('mysql/calllog'); $GLOBALS['USER_DB'] = PSUDatabase::connect('mysql/user_info-admin'); //$GLOBALS['EPO'] = PSUDatabase::connect('mssql/epo_mercury'); $GLOBALS['ASTER'] = PSUDatabase::connect('mysql/aster-misuser'); $GLOBALS['MYPLYMOUTH'] = PSUDatabase::connect('mysql/myplymouth'); /*******************[End Database Connections]*****************/ // which portal we are working in, for now there is only one, and we hardcode it! $GLOBALS['Workflow'] = new Workflow(); $GLOBALS['BannerGeneral'] = new BannerGeneral($GLOBALS['BANNER']); $GLOBALS['BannerStudent'] = new BannerStudent($GLOBALS['BANNER']); $GLOBALS['PWMAN'] = new PasswordManager($GLOBALS['MYPLYMOUTH'], $_ = false, $GLOBALS['USER_DB']); $GLOBALS['LOG'] = new PSULog('ape', $_SESSION['username']); $GLOBALS['ZimbraAdmin'] = new zimbraAdmin(); /*******************[Authorization Stuff]*****************/ $GLOBALS['user_roles'] = PSU::get('idmobject')->getAllBannerRoles($_SESSION['username']); $path_parts = pathinfo($_SERVER['SCRIPT_FILENAME']); if (!IDMObject::authZ('role', 'staff') && !IDMObject::authZ('role', 'ape') && !APEAuthZ::infodesk() && !APEAuthZ::family() && !APEAuthZ::student() && !APEAuthZ::advancement() && !$_SESSION['impersonate']) { echo 'You (' . $_SESSION['username'] . ') do not have access to use this application. If ' . $_SESSION['username'] . ' is not your username, please log in to <a href="http://go.plymouth.edu/logout">myPlymouth</a> and try again.'; exit; }
/** * __construct * * fixes all the of options for passing up to the parent constructer * * @param array $options */ function __construct($options = array()) { $conf = PSUDatabase::connect('ldap/password', 'return'); $conf['password'] = PSUSecurity::password_decode($conf['password']); if (empty($options)) { $options['account_suffix'] = "@plymouth.edu"; $options['base_dn'] = $conf['dn']; $options['domain_controllers'] = array($conf['hostname'], $conf['hostname2']); $options['ad_username'] = $conf['username']; $options['ad_password'] = $conf['password']; $options['real_primarygroup'] = true; $options['use_ssl'] = true; $options['recursive_groups'] = true; } parent::__construct($options); }
/** * connect * * ADOdb connection * * @since version 1.0.0 * @access public * @param string $connection connection string * @return boolean */ function connect($connection = 'oracle/psc1_psu') { require_once 'PSUDatabase.class.php'; $this->_ADOdb = PSUDatabase::connect($connection); return $this->_ADOdb->IsConnected(); }