@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | public function cancel($id) { |
147 | 147 | |
148 | 148 | $this->db->where('id', $id); |
149 | - $this->db->from('temporary_account'); |
|
149 | + $this->db->from('temporary_account'); |
|
150 | 150 | $data = array( |
151 | 151 | 'status' => '3', |
152 | 152 | ); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function reject($id) { |
157 | 157 | |
158 | 158 | $this->db->where('id', $id); |
159 | - $this->db->from('temporary_account'); |
|
159 | + $this->db->from('temporary_account'); |
|
160 | 160 | $data = array( |
161 | 161 | 'status' => '2', |
162 | 162 | 'status_at' => date("Y-m-d H:i:s", time()), |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | public function approve($id) { |
169 | 169 | |
170 | 170 | $this->db->where('id', $id); |
171 | - $this->db->from('temporary_account'); |
|
171 | + $this->db->from('temporary_account'); |
|
172 | 172 | $data = array( |
173 | 173 | 'status' => '1', |
174 | 174 | 'status_at' => date("Y-m-d H:i:s", time()), |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | public function created_account($id) { |
182 | 182 | |
183 | 183 | $this->db->where('id', $id); |
184 | - $this->db->from('temporary_account'); |
|
184 | + $this->db->from('temporary_account'); |
|
185 | 185 | $data = array( |
186 | 186 | 'created' => '1', |
187 | 187 | ); |
@@ -10,14 +10,14 @@ discard block |
||
10 | 10 | public function create($logged, $faculty, $department, $requester, $first_name, $last_name, $email, $username, $expiry) { |
11 | 11 | |
12 | 12 | $firstchar = substr($this->input->post('first_name'), 0, 1); |
13 | - $builtUsername = strtolower($firstchar) . strtolower($this->input->post('last_name')); |
|
13 | + $builtUsername = strtolower($firstchar).strtolower($this->input->post('last_name')); |
|
14 | 14 | |
15 | 15 | //check user name is new |
16 | - $username = $this->config->item('ldapshortdomain') . $builtUsername; |
|
16 | + $username = $this->config->item('ldapshortdomain').$builtUsername; |
|
17 | 17 | // specify the LDAP server to connect to |
18 | 18 | $conn = ldap_connect($this->config->item('ldapserver')) or die("Oh no can't create LDAP connection"); |
19 | 19 | // bind to the LDAP server specified above |
20 | - if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
20 | + if (!ldap_bind($conn, $this->config->item('ldapbindun'), "@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
21 | 21 | echo "Invalid credentials."; |
22 | 22 | // Search for user in directory |
23 | 23 | $cred = explode('\\', $username); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $info = ldap_count_entries($conn, $result); |
29 | 29 | |
30 | 30 | if ($info != 0) { |
31 | - $builtUsername = $builtUsername . "2"; |
|
31 | + $builtUsername = $builtUsername."2"; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | function randomPassword() { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | //Format hh:mm:ss |
51 | 51 | $timeFromForm = "00:00:00"; |
52 | - $dateWithTime = $dateFromForm . " " . $timeFromForm; |
|
52 | + $dateWithTime = $dateFromForm." ".$timeFromForm; |
|
53 | 53 | |
54 | 54 | function convertDateToUnix($input) { |
55 | 55 | $format = 'd-m-Y H:i:s'; |
@@ -16,8 +16,9 @@ |
||
16 | 16 | // specify the LDAP server to connect to |
17 | 17 | $conn = ldap_connect($this->config->item('ldapserver')) or die("Oh no can't create LDAP connection"); |
18 | 18 | // bind to the LDAP server specified above |
19 | - if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) |
|
20 | - echo "Invalid credentials."; |
|
19 | + if (!ldap_bind($conn, $this->config->item('ldapbindun'),"@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass'))) { |
|
20 | + echo "Invalid credentials."; |
|
21 | + } |
|
21 | 22 | // Search for user in directory |
22 | 23 | $cred = explode('\\', $username); |
23 | 24 | list($domain, $user) = $cred; |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | class Status_model extends CI_Model { |
4 | 4 | |
5 | 5 | public function __construct() { |
6 | - parent::__construct(); |
|
6 | + parent::__construct(); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | public function view() { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $data = array( |
20 | 20 | 'id', 'name', 'status', 'url', 'auto_status' |
21 | - ); |
|
21 | + ); |
|
22 | 22 | |
23 | 23 | $query = $this->db->get('status'); |
24 | 24 | return $query->result_array(); |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | $data = array( |
60 | 60 | 'sid' => $service_id, |
61 | 61 | 'auto_status' => $service_status |
62 | - ); |
|
62 | + ); |
|
63 | 63 | |
64 | - return $this->db->insert('status_logs', $data); |
|
64 | + return $this->db->insert('status_logs', $data); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function percentage($sid) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $this->db->where('sid', $sid); |
71 | 71 | $this->db->order_by('id', 'DESC'); |
72 | 72 | $this->db->limit('5000'); |
73 | - $this->db->from('status_logs'); |
|
73 | + $this->db->from('status_logs'); |
|
74 | 74 | $total = $this->db->get()->num_rows(); |
75 | 75 | |
76 | 76 | $this->db->select('sid'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->db->where('auto_status', 1); |
79 | 79 | $this->db->order_by('id', 'DESC'); |
80 | 80 | $this->db->limit('5000'); |
81 | - $this->db->from('status_logs'); |
|
81 | + $this->db->from('status_logs'); |
|
82 | 82 | $up = $this->db->get()->num_rows(); |
83 | 83 | |
84 | 84 | if (empty($total)) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | $this->db->select('sid'); |
101 | 101 | $this->db->where('sid', $sid); |
102 | - $this->db->from('status_logs'); |
|
102 | + $this->db->from('status_logs'); |
|
103 | 103 | $this->db->delete(); |
104 | 104 | |
105 | 105 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $this->db->select(); |
110 | 110 | $this->db->where('id', $sid); |
111 | - $this->db->from('status'); |
|
111 | + $this->db->from('status'); |
|
112 | 112 | $query = $this->db->get(); |
113 | 113 | return $query->result_array(); |
114 | 114 | } |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | 'auto_status' => $status, |
130 | 130 | 'last_update' => date("Y-m-d H:i:s", time()), |
131 | 131 | 'by' => $username, |
132 | - ); |
|
132 | + ); |
|
133 | 133 | |
134 | 134 | $this->db->where('id', $id); |
135 | - return $this->db->update('status', $data); |
|
135 | + return $this->db->update('status', $data); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | public function create($name, $icon, $url, $category, $status) { |
@@ -146,21 +146,21 @@ discard block |
||
146 | 146 | 'auto_status' => $status, |
147 | 147 | 'last_update' => date("Y-m-d H:i:s", time()), |
148 | 148 | 'by' => $username, |
149 | - ); |
|
149 | + ); |
|
150 | 150 | |
151 | - return $this->db->insert('status', $data); |
|
151 | + return $this->db->insert('status', $data); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | public function delete($sid) { |
155 | 155 | |
156 | 156 | $this->db->select('sid'); |
157 | 157 | $this->db->where('sid', $sid); |
158 | - $this->db->from('status_logs'); |
|
158 | + $this->db->from('status_logs'); |
|
159 | 159 | $this->db->delete(); |
160 | 160 | |
161 | 161 | $this->db->select('id'); |
162 | 162 | $this->db->where('id', $sid); |
163 | - $this->db->from('status'); |
|
163 | + $this->db->from('status'); |
|
164 | 164 | $this->db->delete(); |
165 | 165 | |
166 | 166 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | defined('BASEPATH') OR exit('No direct script access allowed'); |
3 | 3 | |
4 | 4 | echo "\nERROR: ", |
5 | - $heading, |
|
6 | - "\n\n", |
|
7 | - $message, |
|
8 | - "\n\n"; |
|
9 | 5 | \ No newline at end of file |
6 | + $heading, |
|
7 | + "\n\n", |
|
8 | + $message, |
|
9 | + "\n\n"; |
|
10 | 10 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | defined('BASEPATH') OR exit('No direct script access allowed'); |
3 | 3 | |
4 | 4 | echo "\nDatabase error: ", |
5 | - $heading, |
|
6 | - "\n\n", |
|
7 | - $message, |
|
8 | - "\n\n"; |
|
9 | 5 | \ No newline at end of file |
6 | + $heading, |
|
7 | + "\n\n", |
|
8 | + $message, |
|
9 | + "\n\n"; |
|
10 | 10 | \ No newline at end of file |
@@ -56,13 +56,13 @@ |
||
56 | 56 | <tbody> |
57 | 57 | <tr> |
58 | 58 | <td><i class="fa fa-paperclip" aria-hidden="true"></i> <a href="<?= base_url('computing-support/new-account'); ?>">New Staff Account</a> |
59 | - - <a href="<?= base_url('/computing-support/new-account/pending');?>">Pending</a> |
|
59 | + - <a href="<?= base_url('/computing-support/new-account/pending'); ?>">Pending</a> |
|
60 | 60 | - <a href="<?= base_url('/computing-support/new-account/history'); ?>">History</a> |
61 | 61 | <td></td><td></td><td></td> |
62 | 62 | </tr> |
63 | 63 | <tr> |
64 | 64 | <td><i class="fa fa-paperclip" aria-hidden="true"></i> <a href="<?= base_url('computing-support/new-account/disable-account'); ?>">Disable Staff Account</a> |
65 | - - <a href="<?= base_url('/computing-support/new-account/disable-account/pending');?>">Pending</a> |
|
65 | + - <a href="<?= base_url('/computing-support/new-account/disable-account/pending'); ?>">Pending</a> |
|
66 | 66 | - <a href="<?= base_url('/computing-support/new-account/disable-account/history'); ?>">History</a> |
67 | 67 | </td> |
68 | 68 | <td></td><td></td><td></td> |
@@ -47,7 +47,7 @@ |
||
47 | 47 | <tbody> |
48 | 48 | <tr> |
49 | 49 | <td><i class="fa fa-paperclip" aria-hidden="true"></i> <a href="<?= base_url('admin/jobs-logs/ad-user-sync'); ?>">AD User Sync</a> |
50 | - - <a href="<?= base_url('core/jobs/ad-users-sync');?>">Run Now</a> |
|
50 | + - <a href="<?= base_url('core/jobs/ad-users-sync'); ?>">Run Now</a> |
|
51 | 51 | <td></td><td></td><td></td> |
52 | 52 | </tr> |
53 | 53 | </tbody> |
@@ -41,8 +41,8 @@ |
||
41 | 41 | </thead> |
42 | 42 | <tbody> |
43 | 43 | <tr> |
44 | - <td><i class="fa fa-paperclip" aria-hidden="true"></i> <a href="<?= base_url('marketing/visitor');?>">Open Day Visitor Form</a> |
|
45 | - - <a href="<?= base_url('marketing/visitor/history');?>">History</a> |
|
44 | + <td><i class="fa fa-paperclip" aria-hidden="true"></i> <a href="<?= base_url('marketing/visitor'); ?>">Open Day Visitor Form</a> |
|
45 | + - <a href="<?= base_url('marketing/visitor/history'); ?>">History</a> |
|
46 | 46 | <td></td><td></td><td></td> |
47 | 47 | </tr> |
48 | 48 | <tr> |
@@ -6,7 +6,7 @@ |
||
6 | 6 | $query = $this->db->get('users_ad'); |
7 | 7 | if ($query->num_rows() > 0) { |
8 | 8 | foreach ($query->result_array() as $row) { |
9 | - $row_set[] = htmlentities(stripslashes($row['first_name'] . ' ' . $row['last_name'])); //build an array |
|
9 | + $row_set[] = htmlentities(stripslashes($row['first_name'].' '.$row['last_name'])); //build an array |
|
10 | 10 | } |
11 | 11 | } |
12 | 12 | ?> |
@@ -7,7 +7,7 @@ |
||
7 | 7 | $query = $this->db->get('users_ad'); |
8 | 8 | if ($query->num_rows() > 0) { |
9 | 9 | foreach ($query->result_array() as $row) { |
10 | - $row_set[] = htmlentities(stripslashes($row['first_name'] . ' ' . $row['last_name']. ' (' . $row['username']. ')')); //build an array |
|
10 | + $row_set[] = htmlentities(stripslashes($row['first_name'].' '.$row['last_name'].' ('.$row['username'].')')); //build an array |
|
11 | 11 | } |
12 | 12 | } |
13 | 13 | ?> |