A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Hooks has a deprecated constructor

Filename: libraries/Hooks.php

Line Number: 30

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Config has a deprecated constructor

Filename: libraries/Config.php

Line Number: 29

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_URI has a deprecated constructor

Filename: libraries/URI.php

Line Number: 29

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Router has a deprecated constructor

Filename: libraries/Router.php

Line Number: 29

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Output has a deprecated constructor

Filename: libraries/Output.php

Line Number: 29

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Input has a deprecated constructor

Filename: libraries/Input.php

Line Number: 29

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Language has a deprecated constructor

Filename: libraries/Language.php

Line Number: 27

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: codeigniter/Common.php

Line Number: 148

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_Base has a deprecated constructor

Filename: codeigniter/Base5.php

Line Number: 33

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; Controller has a deprecated constructor

Filename: libraries/Controller.php

Line Number: 30

load->model('user_model'); // Determine if user is already logged into system if($this->user_model->login_check() == TRUE) { // Send authenticated users to the dashboard redirect('dashboard'); exit(); } $this->form_validation->set_rules('email', 'E-mail Address', 'trim|strtolower|required|valid_email|callback_email_verify'); $this->form_validation->set_rules('password', 'Password', 'trim|required|alpha_dash'); $this->form_validation->set_error_delimiters('
', '
'); if($this->form_validation->run() == FALSE) { $data['page_content'] = 'entrance'; } else { $email = $_POST['email']; $password = $_POST['password']; // Run authentication if($this->user_model->authenticate($email, $password) == TRUE) { // Determine location destination if($this->session->userdata('return_url') != NULL) { // Redirect to last page redirect($this->session->userdata('return_url')); exit(); } else { // Redirect to dashboard redirect('dashboard'); exit(); } } else { $this->form_validation->set_rules('email', '', 'callback_auth_fail'); $this->form_validation->run(); $data['page_content'] = 'entrance'; } } $this->load->view('_includes/template', $data); } /* FUNCTIONS */ // Account reset function account_reset($email) { $this->load->model('user_model'); $this->load->model('common_model'); $user_id = $this->user_model->user_lookup($email); $passcode = $this->common_model->gen_random_string(); if($this->user_model->account_reset($user_id, $passcode) == TRUE) { // Send account reset message $this->send_reset_msg($email, $passcode); } } // end account_reset // Authentication Fail function auth_fail() { $this->form_validation->set_message('auth_fail', 'Username and Password combination are not valid. Please try again or ' . anchor('login/forgotten', 'reset your account', 'title="Forgotten Password"') . '.'); return FALSE; } // Birthdate validation function birthdate_check($birthdate) { $bd_array = explode('-', $birthdate); $bd_month = $bd_array[0]; $bd_day = $bd_array[1]; $bd_year = $bd_array[2]; $current_year = date('Y', mktime()); if($bd_year >= ($current_year - 13)) { $this->form_validation->set_message('birthdate_check', 'Please review your birthdate. You must be 14 years or older to use this system. Please contact our office at (317) 274-8482 if you have further questions regarding this requirement.'); return FALSE; } else { return TRUE; } } // Check for email in systems function email_check($email) { $this->load->model('user_model'); $email_check = $this->user_model->email_check($email); if($email_check > 0) { $this->form_validation->set_message('email_check', 'The email provided is already in the system.'); return FALSE; } else { return TRUE; } } // end email_check // Verify email in system function email_verify($email) { $this->load->model('user_model'); $email_verify = $this->user_model->email_verify($email); if($email_verify != 1) { $error_msg = 'The e-mail address provided is not in the system. Please enter a different e-mail address or ' . anchor('login/sign_up', 'sign-up for an account', 'title="New User Registration"') . '.'; $this->form_validation->set_message('email_verify', $error_msg); return FALSE; } else { return TRUE; } } // end email_verify // Forgotten password function forgotten() { // Forgotten Password form validation $this->form_validation->set_rules('email', 'E-mail Address', 'trim|strtolower|required|valid_email|callback_email_verify'); $this->form_validation->set_error_delimiters('
', '
'); $data['no_dock'] = TRUE; if ($this->form_validation->run() == FALSE) { $data['page_content'] = 'forgotten_form'; $this->load->view('_includes/template.php', $data); } else { $email = $_POST['email']; $this->account_reset($email); $data['page_content'] = '_includes/success'; $data['success_msg'] = 'forgotten'; $this->load->view('_includes/template.php', $data); } } // end forgotten // Rest Account Password function reset_account($passcode=0) { $this->load->model('user_model'); // Verify valid passcode if($this->user_model->passcode_verify($passcode) == TRUE) { // Reset Account form validation $this->form_validation->set_rules('password', 'Password', 'trim|required|alpha_dash|min_length[8]|max_length[20]|matches[password_conf]'); $this->form_validation->set_rules('password_conf', 'Password Confirmation', 'trim|required'); $this->form_validation->set_error_delimiters('
', '
'); $data['page_title'] = 'Account Password Reset'; // Run validation if ($this->form_validation->run() == FALSE) { $data['page_content'] = 'account_reset_form'; $data['passcode'] = $passcode; } else { $password = $_POST['password']; $this->user_model->reset_password($passcode, $password); $data['page_content'] = '_includes/success'; $data['success_msg'] = 'account_reset'; } } else { $data['error_msg'] = ''; $data['page_content'] = '_includes/error'; } $this->load->view('_includes/template', $data); } // end reset_account // Sandbox testing function sandbox() { } // Send account reset message function send_reset_msg($email, $passcode) { $this->load->library('email'); $data['passcode'] = $passcode; $html_email = $this->load->view('_includes/emails/account_reset_message', $data, true); // Prepare email message $config['mailtype'] = 'html'; $config['priority'] = 1; $this->email->initialize($config); $this->email->to($email); $this->email->from('visit@iupui.edu', 'IUPUI Office of Campus Visits'); $this->email->subject('Account Reset: IUPUI Campus Events and Visit Reservations'); $this->email->message($html_email); $this->email->send(); } // end send_reset_msg // New User Registration function sign_up() { // Load User Model $this->load->model('user_model'); // Sign-up form validation $this->form_validation->set_rules('first_name', 'First Name', 'trim|required|ucwords'); $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required|ucwords'); $this->form_validation->set_rules('email', 'E-mail Address', 'trim|required|valid_email|matches[email_conf]|callback_email_check|strtolower'); $this->form_validation->set_rules('email_conf', 'E-mail Address Confirmation', 'trim|required|strtolower'); $this->form_validation->set_rules('password', 'Password', 'trim|required|alpha_dash|min_length[8]|max_length[20]|matches[password_conf]'); $this->form_validation->set_rules('password_conf', 'Password Confirmation', 'trim|required'); $this->form_validation->set_rules('univ_id', 'University ID', 'trim|numeric|min_length[10]|max_length[10]'); $this->form_validation->set_rules('hispanic', 'Hispanic Heritage', 'required'); $this->form_validation->set_rules('ethnicity[]', 'Ethnicity', ''); $this->form_validation->set_rules('birth_date', 'Date of Birth', 'trim|required|min_length[10]|callback_birthdate_check'); $this->form_validation->set_rules('phone_area', 'Phone Number Area Code', 'trim|required|numeric|exact_length[3]'); $this->form_validation->set_rules('phone_pre', 'Phone Number Prefix', 'trim|required|numeric|exact_length[3]'); $this->form_validation->set_rules('phone_suf', 'Phone Number Suffix', 'trim|required|numeric|exact_length[4]'); $this->form_validation->set_rules('address', 'Address', 'trim|required|ucwords'); $this->form_validation->set_rules('address2', 'Address 2', 'trim|ucwords'); $this->form_validation->set_rules('city', 'City', 'trim|required|ucwords'); $this->form_validation->set_rules('state', 'State', 'required'); $this->form_validation->set_rules('zip_code', 'Zip Code', 'trim|required|min_length[5]|strtoupper'); $this->form_validation->set_rules('country', 'Country', 'trim|required|ucwords'); $this->form_validation->set_rules('contact_pref', 'Contact Preference', 'required'); $this->form_validation->set_rules('enroll_date', 'Enrollment Term', 'trim|required'); $this->form_validation->set_rules('enroll_year', 'Enrollment Year', 'trim|required'); $this->form_validation->set_rules('major', 'Major', ''); $this->form_validation->set_rules('honors', 'IUPUI Honors College', 'required'); $this->form_validation->set_error_delimiters('
', '
'); if ($this->form_validation->run() == FALSE) { $data['state_options'] = $this->user_model->get_states(); $data['no_dock'] = TRUE; $data['page_title'] = 'New User Account'; $data['js_path'] = 'user_profile.js'; // Get form options (select, checkbox, radio) $data['options_hispanic'] = $this->user_model->options_profile('no-yes'); $data['options_ethnicity'] = $this->user_model->options_profile('ethnicity'); $data['options_contact_pref'] = $this->user_model->options_profile('contact_pref'); $data['options_enroll_date'] = $this->user_model->options_profile('enroll_date'); $data['options_enroll_year'] = $this->user_model->options_profile('enroll_year'); $data['options_major'] = $this->user_model->options_profile('major'); $data['options_honors'] = $this->user_model->options_profile('no-yes'); // Load page $data['page_content'] = 'user_registration'; $data['form_action'] = 'Create'; $this->load->view('_includes/template', $data); } else { $this->load->helper('date'); $today = date('Y-m-d', mktime()); $birth_date = human_to_mysql($_POST['birth_date']); $phone = $_POST['phone_area'] . '-' . $_POST['phone_pre'] . '-' . $_POST['phone_suf']; // Enroll year look-up $options_enroll_year = $this->user_model->options_profile('enroll_year'); if(array_key_exists($_POST['enroll_year'], $options_enroll_year)) { $enroll_year = $options_enroll_year[$_POST['enroll_year']]; } else { $enroll_year = date('Y', mktime()); } $enroll_date = date('Y-m-d', mktime(0, 0, 0, $_POST['enroll_date'], 1, $enroll_year)); $user_data = array( 'first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'birth_date' => $birth_date, 'hispanic' => $_POST['hispanic'], 'email' => $_POST['email'], 'password' => md5($_POST['password']), 'univ_id' => $_POST['univ_id'], 'phone' => $phone, 'address' => $_POST['address'], 'address2' => $_POST['address2'], 'city' => $_POST['city'], 'state' => $_POST['state'], 'zip_code' => $_POST['zip_code'], 'country' => $_POST['country'], 'enroll_date' => $enroll_date, 'contact_pref' => $_POST['contact_pref'], 'major' => $_POST['major'], 'honors' => $_POST['honors'], 'create_date' => $today, 'last_update' => $today ); // Add user $this->user_model->add_user($user_data); $user_id = $this->session->userdata('user_id'); // Update user ethnicity if(isset($_POST['ethnicity'])) { $ethnic_data = $_POST['ethnicity']; $this->user_model->update_ethnicity($ethnic_data); } // Get session data $data['user_id'] = $user_id; $data['first_name'] = $this->session->userdata('first_name'); $data['last_name'] = $this->session->userdata('last_name'); $email = $this->session->userdata('email'); // Confirmation $this->load->library('email'); $html_email = $this->load->view('_includes/emails/new_account_message', $data, true); // Prepare email message $config['mailtype'] = 'html'; $this->email->initialize($config); $this->email->to($email); $this->email->from('visit@iupui.edu', 'IUPUI Office of Campus Visits'); $this->email->subject('Account Confirmation: IUPUI Campus Events and Visit Reservations'); $this->email->message($html_email); $this->email->send(); // Landing page $data['page_title'] = 'Account Confirmation'; $data['success_msg'] = 'registration'; $data['page_content'] = '_includes/success'; $this->load->view('_includes/template', $data); } // end form validation check } // end sign_up() } // end Class ?>

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /ip/visit/wwws/reservation/system/libraries/Exceptions.php:166)

Filename: codeigniter/Common.php

Line Number: 356

404 Page Not Found

404 Page Not Found

The page you requested was not found.