Passed
Push — master ( 63a7db...fb547d )
by William
02:47
created
dashboard/application/models/computing-support/New_account_model.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
     public function create($first_name, $last_name, $ern, $position, $faculty, $department, $room, $ext, $con_start, $con_end, $password, $site) {
10 10
 
11 11
         $firstchar = substr($this->input->post('first_name'), 0, 1);
12
-        $builtUsername = strtolower($firstchar) . strtolower($this->input->post('last_name'));
12
+        $builtUsername = strtolower($firstchar).strtolower($this->input->post('last_name'));
13 13
         //check user name is new
14 14
 
15
-        $username = $this->config->item('ldapshortdomain') . $builtUsername;
15
+        $username = $this->config->item('ldapshortdomain').$builtUsername;
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')))
19
+        if (!ldap_bind($conn, $this->config->item('ldapbindun'), "@".$this->config->item('ldapdomain'), $this->config->item('ldapbindpass')))
20 20
             echo "Invalid credentials.";
21 21
         // Search for user in directory
22 22
         $cred = explode('\\', $username);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $info = ldap_count_entries($conn, $result);
28 28
 
29 29
         if ($info != 0) {
30
-            $builtUsername = $builtUsername . "2";
30
+            $builtUsername = $builtUsername."2";
31 31
         }
32 32
 
33 33
 
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
         $this->email->message('A new staff account has been requested by yourself
39 39
                       
40 40
         Account Details:
41
-        Name: ' . $this->input->post('first_name') . ' ' . $this->input->post('last_name') . '
42
-        Position: ' . $this->input->post('position') . '
43
-        ERN: ' . $this->input->post('ern') . '
44
-        Faculty: ' . $this->input->post('faculty') . '
45
-        Department: ' . $this->input->post('department') . '
46
-        Room: ' . $this->input->post('room') . '
47
-        Phone: ' . $this->input->post('ext') . '
48
-        Site: ' . $this->input->post('site') . '
41
+        Name: ' . $this->input->post('first_name').' '.$this->input->post('last_name').'
42
+        Position: ' . $this->input->post('position').'
43
+        ERN: ' . $this->input->post('ern').'
44
+        Faculty: ' . $this->input->post('faculty').'
45
+        Department: ' . $this->input->post('department').'
46
+        Room: ' . $this->input->post('room').'
47
+        Phone: ' . $this->input->post('ext').'
48
+        Site: ' . $this->input->post('site').'
49 49
                            
50
-        Username: ' . $builtUsername . '
51
-        Password: ' . $this->input->post('password') . '
50
+        Username: ' . $builtUsername.'
51
+        Password: ' . $this->input->post('password').'
52 52
 
53 53
 
54 54
         If this account was made by mistake please contact Computing Support.
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Temporary_account_model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
dashboard/application/views/human-resources/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,13 +56,13 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
dashboard/application/views/admin/jobs-logs/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
dashboard/application/views/marketing/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
dashboard/application/views/computing-support/equipment-loan/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
dashboard/application/views/computing-support/new-account/disable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
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
 ?>
Please login to merge, or discard this patch.
dashboard/application/views/computing-support/status/view.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
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> &nbsp; <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> &nbsp; <?= $status_item['name'];?></td>
29
+                            <td> &nbsp; <i class="fa <?= $status_item['icon']; ?>" aria-hidden="true"></i> &nbsp; <?= $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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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> &nbsp; <i class="fa <?= $status_item['icon'];?>" aria-hidden="true"></i> &nbsp; <?= $status_item['name'];?></td>
93
+                            <td> &nbsp; <i class="fa <?= $status_item['icon']; ?>" aria-hidden="true"></i> &nbsp; <?= $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
 block discarded – undo
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
 block discarded – undo
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>";
Please login to merge, or discard this patch.
dashboard/application/views/computing-support/status/edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             <div class="form-group">
46 46
                 <label for="category">Category *</label>
47 47
                 <?php if (isset($get_current[0]['category'])) { $category_value = $get_current[0]['category']; } else { $category_value = NULL; } ?>
48
-                <?php $options = array('web' => 'Web', 'communication' => 'Communication', 'file' => 'File', 'remote' => 'Remote','network' => 'Network', 'wireless' => 'Wireless');
48
+                <?php $options = array('web' => 'Web', 'communication' => 'Communication', 'file' => 'File', 'remote' => 'Remote', 'network' => 'Network', 'wireless' => 'Wireless');
49 49
                 echo form_dropdown('category', $options, $category_value, 'class="form-control"'); ?>
50 50
             </div>
51 51
             <div class="form-group">
Please login to merge, or discard this patch.