@@ -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 | ?> |
@@ -23,16 +23,16 @@ discard block |
||
23 | 23 | </tr> |
24 | 24 | </thead> |
25 | 25 | <tbody> |
26 | - <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {}else { |
|
27 | - $sid = $status_item['id'];?> |
|
26 | + <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {} else { |
|
27 | + $sid = $status_item['id']; ?> |
|
28 | 28 | <tr> |
29 | - <td> <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> <?= $status_item['name'];?></td> |
|
29 | + <td> <i class="fa <?= $status_item['icon']; ?>" aria-hidden="true"></i> <?= $status_item['name']; ?></td> |
|
30 | 30 | <td class="col-md-1" style="text-transform: capitalize;"> <?= $status_item['category'] ?></td> |
31 | 31 | |
32 | 32 | <?php |
33 | 33 | switch ($status_item['status']) { |
34 | 34 | case 0: |
35 | - echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
35 | + echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
36 | 36 | break; |
37 | 37 | case 1: |
38 | 38 | echo "<td class='col-md-2 success' style='font-weight:bold; text-align: center;'>OK</td>"; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | case 2: |
41 | 41 | switch ($status_item['auto_status']) { |
42 | 42 | case 0: |
43 | - echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault (Auto) <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
43 | + echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault (Auto) <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
44 | 44 | break; |
45 | 45 | case 1: |
46 | 46 | echo "<td class='col-md-2 success' style='font-weight:bold; text-align: center;'>OK (Auto)</td>"; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | break; |
53 | 53 | case 3: |
54 | - echo "<td class='col-md-2 warning' style='font-weight:bold; text-align: center; position: relative'>Intermediate <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
54 | + echo "<td class='col-md-2 warning' style='font-weight:bold; text-align: center; position: relative'>Intermediate <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
55 | 55 | break; |
56 | 56 | default: |
57 | 57 | echo "<td class='col-md-2 info' style='font-weight:bold; text-align: center;'>No data</td>"; |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {?> |
91 | 91 | <?php $sid = $status_item['id']; ?> |
92 | 92 | <tr> |
93 | - <td> <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> <?= $status_item['name'];?></td> |
|
93 | + <td> <i class="fa <?= $status_item['icon']; ?>" aria-hidden="true"></i> <?= $status_item['name']; ?></td> |
|
94 | 94 | <td class="col-md-1" style="text-transform: capitalize;"> <?= $status_item['category'] ?></td> |
95 | 95 | |
96 | 96 | <?php |
97 | 97 | switch ($status_item['status']) { |
98 | 98 | case 0: |
99 | - echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
99 | + echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
100 | 100 | break; |
101 | 101 | case 1: |
102 | 102 | echo "<td class='col-md-2 success' style='font-weight:bold; text-align: center;'>OK</td>"; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | case 2: |
105 | 105 | switch ($status_item['auto_status']) { |
106 | 106 | case 0: |
107 | - echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault (Auto) <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
107 | + echo "<td class='col-md-2 danger' style='font-weight:bold; text-align: center; position: relative'>Fault (Auto) <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
108 | 108 | break; |
109 | 109 | case 1: |
110 | 110 | echo "<td class='col-md-2 success' style='font-weight:bold; text-align: center;'>OK (Auto)</td>"; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | break; |
117 | 117 | case 3: |
118 | - echo "<td class='col-md-2 warning' style='font-weight:bold; text-align: center; position: relative'>Intermediate <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='". $status_item['comments'] ."'></i></td>"; |
|
118 | + echo "<td class='col-md-2 warning' style='font-weight:bold; text-align: center; position: relative'>Intermediate <i class='fa fa-info-circle fa-lg' style='position: absolute; left: 10px; top: 12px;' data-toggle='tooltip' data-placement='bottom' title='".$status_item['comments']."'></i></td>"; |
|
119 | 119 | break; |
120 | 120 | default: |
121 | 121 | echo "<td class='col-md-2 info' style='font-weight:bold; text-align: center;'>No data</td>"; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | </tr> |
24 | 24 | </thead> |
25 | 25 | <tbody> |
26 | - <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {}else { |
|
26 | + <?php foreach ($status as $status_item): if ($status_item['category'] == 'network') {} else { |
|
27 | 27 | $sid = $status_item['id'];?> |
28 | 28 | <tr> |
29 | 29 | <td> <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> <?= $status_item['name'];?></td> |