@@ 39-60 (lines=22) @@ | ||
36 | $model = $this->input->post('model'); |
|
37 | $sn = $this->input->post('sn'); |
|
38 | ||
39 | if ($this->equipment_loan_model->loan($logged, $full_name, $ern, $make, $model, $sn)) { |
|
40 | ||
41 | $function = 'new_loan'; |
|
42 | $this->user_model->function_log($function); |
|
43 | ||
44 | // user created |
|
45 | $this->load->view('templates/header'); |
|
46 | $this->load->view('computing-support/equipment-loan/complete'); |
|
47 | $this->load->view('templates/footer'); |
|
48 | } else { |
|
49 | ||
50 | $function = 'new_loan_error'; |
|
51 | $this->user_model->function_log($function); |
|
52 | ||
53 | $data = new stdClass(); |
|
54 | $data->error = 'There was a problem accepting the terms. Please try again.'; |
|
55 | ||
56 | // failed to create user |
|
57 | $this->load->view('templates/header'); |
|
58 | $this->load->view('computing-support/equipment-loan/view', $data); |
|
59 | $this->load->view('templates/footer'); |
|
60 | } |
|
61 | } |
|
62 | } else { |
|
63 | redirect('permissions'); |
@@ 47-65 (lines=19) @@ | ||
44 | $hear = $this->input->post('hear'); |
|
45 | $year = $this->input->post('year'); |
|
46 | ||
47 | if ($this->visitor_model->post($first_name, $last_name, $email, $postcode, $dob, $current, $current_other, $subject, $hear, $year)) { |
|
48 | ||
49 | // user created |
|
50 | $this->load->view('templates/header'); |
|
51 | $this->load->view('marketing/visitor/complete'); |
|
52 | $this->load->view('templates/footer'); |
|
53 | } else { |
|
54 | ||
55 | $function = 'ERROR_visitor_form_submition'; |
|
56 | $this->user_model->function_log($function); |
|
57 | ||
58 | $data = new stdClass(); |
|
59 | $data->error = 'There was a problem submitting this form. Please try again.'; |
|
60 | ||
61 | // failed to create user |
|
62 | $this->load->view('templates/header'); |
|
63 | $this->load->view('marketing/visitor/view', $data); |
|
64 | $this->load->view('templates/footer'); |
|
65 | } |
|
66 | } |
|
67 | } else { |
|
68 |
@@ 163-183 (lines=21) @@ | ||
160 | $status = $this->input->post('status'); |
|
161 | $username = $_SESSION['username']; |
|
162 | ||
163 | if ($this->status_model->create($name, $icon, $url, $category, $status, $username)) { |
|
164 | ||
165 | $function = 'create_status_monitor_'.$sid; |
|
166 | $this->user_model->function_log($function); |
|
167 | ||
168 | $this->load->view('templates/header'); |
|
169 | $this->load->view('computing-support/status/created'); |
|
170 | $this->load->view('templates/footer'); |
|
171 | } else { |
|
172 | ||
173 | $function = 'create_status_monitor_error_'.$sid; |
|
174 | $this->user_model->function_log($function); |
|
175 | ||
176 | $data = new stdClass(); |
|
177 | $data->error = 'There was a problem editing this service. Please try again.'; |
|
178 | ||
179 | // failed to create user |
|
180 | $this->load->view('templates/header'); |
|
181 | $this->load->view('computing-support/status/edit', $data); |
|
182 | $this->load->view('templates/footer'); |
|
183 | } |
|
184 | } |
|
185 | } |
|
186 | } |