Completed
Pull Request — master (#33)
by Christopher
06:22
created
public/api/v1/index.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 // Start of API
24 24
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 25
 
26
-require_once dirname(__FILE__).'/../../../vendor/autoload.php';
26
+require_once dirname(__FILE__) . '/../../../vendor/autoload.php';
27 27
 
28
-include_once dirname(__FILE__).'/../../../config/database.php';
28
+include_once dirname(__FILE__) . '/../../../config/database.php';
29 29
 
30 30
 // Create and configure Slim app
31 31
 $app = new \Slim\App(['settings' => $config]);
32 32
 
33
-spl_autoload_register(function ($classname) {
34
-    require dirname(__FILE__).'/../../../api-classes/'.$classname.'.php';
33
+spl_autoload_register(function($classname) {
34
+    require dirname(__FILE__) . '/../../../api-classes/' . $classname . '.php';
35 35
 });
36 36
 
37 37
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 $container = $app->getContainer();
42 42
 
43
-$container['db'] = function ($c) {
43
+$container['db'] = function($c) {
44 44
     $db_config = $c['settings']['db'];
45 45
     $db = new Database($db_config);
46 46
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 // ~~~~~~~~~~~~~~~ Event ~~~~~~~~~~~~~~~
55 55
 
56
-$app->post('/events', function ($request, $response, $args) {
56
+$app->post('/events', function($request, $response, $args) {
57 57
     $postData = $request->getParsedBody();
58 58
 
59 59
     $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     return $response->withJson($data);
66 66
 });
67 67
 
68
-$app->get('/events/{id}', function ($request, $response, $args) {
68
+$app->get('/events/{id}', function($request, $response, $args) {
69 69
     $id = filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
70 70
 
71 71
     $event = new Event();
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
                     'relationships' => [
92 92
                                         'series' => [
93 93
                                                     'links' => [
94
-                                                                'self'    => '/events/'.$event->getId().'/relationships/series',
95
-                                                                'related' => '/events/'.$event->getId().'/series/'.$series->getId(),
94
+                                                                'self'    => '/events/' . $event->getId() . '/relationships/series',
95
+                                                                'related' => '/events/' . $event->getId() . '/series/' . $series->getId(),
96 96
                                                     ],
97 97
                                                     'data' => [
98 98
                                                       'type' => 'series',
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
                                         ],
102 102
                                         'types' => [
103 103
                                                     'links' => [
104
-                                                                'self'    => '/events/'.$event->getId().'/relationships/types',
105
-                                                                'related' => '/events/'.$event->getId().'/types/'.$type->getId(),
104
+                                                                'self'    => '/events/' . $event->getId() . '/relationships/types',
105
+                                                                'related' => '/events/' . $event->getId() . '/types/' . $type->getId(),
106 106
                                                     ],
107 107
                                                     'data' => [
108 108
                                                       'type' => 'types',
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
                                         ],
112 112
                                         'sub-types' => [
113 113
                                                     'links' => [
114
-                                                                'self'    => '/events/'.$event->getId().'/relationships/sub-types',
115
-                                                                'related' => '/events/'.$event->getId().'/sub-types/'.$sub_type->getId(),
114
+                                                                'self'    => '/events/' . $event->getId() . '/relationships/sub-types',
115
+                                                                'related' => '/events/' . $event->getId() . '/sub-types/' . $sub_type->getId(),
116 116
                                                     ],
117 117
                                                     'data' => [
118 118
                                                                 'type' => 'sub-types',
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                                         ],
122 122
                                         'location' => [
123 123
                                                     'links' => [
124
-                                                                'self'    => '/events/'.$event->getId().'/relationships/locations',
125
-                                                                'related' => '/events/'.$event->getId().'/locations/'.$location->getId(),
124
+                                                                'self'    => '/events/' . $event->getId() . '/relationships/locations',
125
+                                                                'related' => '/events/' . $event->getId() . '/locations/' . $location->getId(),
126 126
                                                     ],
127 127
                                                     'data' => [
128 128
                                                                 'type' => 'locations',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                                           'description' => $series->description,
141 141
                             ],
142 142
                             'links' => [
143
-                                        'self' => '/series/'.$series->getId(),
143
+                                        'self' => '/series/' . $series->getId(),
144 144
                             ],
145 145
                           ],
146 146
                           [
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                                       'description' => $type->description,
152 152
                             ],
153 153
                             'links' => [
154
-                                        'self' => '/types/'.$type->getId(),
154
+                                        'self' => '/types/' . $type->getId(),
155 155
                             ],
156 156
                           ],
157 157
                           [
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                                       'description' => $sub_type->description,
163 163
                             ],
164 164
                             'links' => [
165
-                                        'self' => '/sub-types/'.$sub_type->getId(),
165
+                                        'self' => '/sub-types/' . $sub_type->getId(),
166 166
                             ],
167 167
                           ],
168 168
                           [
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                                       'name' => $location->name,
173 173
                             ],
174 174
                             'links' => [
175
-                                        'self' => '/locations/'.$location->getId(),
175
+                                        'self' => '/locations/' . $location->getId(),
176 176
                             ],
177 177
                           ],
178 178
           ],
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 // ~~~~~~~~~~~~~~~ Series ~~~~~~~~~~~~~~~
188 188
 
189
-$app->post('/series', function ($request, $response, $args) {
189
+$app->post('/series', function($request, $response, $args) {
190 190
     $postData = $request->getParsedBody();
191 191
 
192 192
     $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     return $response->withJson($data);
210 210
 });
211 211
 
212
-$app->get('/series/{id}', function ($request, $response, $args) {
212
+$app->get('/series/{id}', function($request, $response, $args) {
213 213
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
214 214
 
215 215
     $series = new Series();
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     return $response->withJson($data);
227 227
 });
228 228
 
229
-$app->delete('/series/{id}', function ($request, $response, $args) {
229
+$app->delete('/series/{id}', function($request, $response, $args) {
230 230
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
231 231
 
232 232
     $series = new Series();
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
 // ~~~~~~~~~~~~~~~ Type ~~~~~~~~~~~~~~~
246 246
 
247
-$app->post('/types', function ($request, $response, $args) {
247
+$app->post('/types', function($request, $response, $args) {
248 248
     $postData = $request->getParsedBody();
249 249
 
250 250
     $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     return $response->withJson($data);
268 268
 });
269 269
 
270
-$app->get('/types/{id}', function ($request, $response, $args) {
270
+$app->get('/types/{id}', function($request, $response, $args) {
271 271
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
272 272
 
273 273
     $type = new Type();
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     return $response->withJson($data);
285 285
 });
286 286
 
287
-$app->delete('/types/{id}', function ($request, $response, $args) {
287
+$app->delete('/types/{id}', function($request, $response, $args) {
288 288
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
289 289
 
290 290
     $type = new Type();
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
 // ~~~~~~~~~~~~~~~ Sub Type ~~~~~~~~~~~~~~~
304 304
 
305
-$app->post('/sub-types', function ($request, $response, $args) {
305
+$app->post('/sub-types', function($request, $response, $args) {
306 306
     $postData = $request->getParsedBody();
307 307
 
308 308
     $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     return $response->withJson($data);
326 326
 });
327 327
 
328
-$app->get('/sub-types/{id}', function ($request, $response, $args) {
328
+$app->get('/sub-types/{id}', function($request, $response, $args) {
329 329
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
330 330
 
331 331
     $type = new SubType();
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     return $response->withJson($data);
343 343
 });
344 344
 
345
-$app->delete('/sub-types/{id}', function ($request, $response, $args) {
345
+$app->delete('/sub-types/{id}', function($request, $response, $args) {
346 346
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
347 347
 
348 348
     $type = new SubType();
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
 // ~~~~~~~~~~~~~~~ Location ~~~~~~~~~~~~~~~
362 362
 
363
-$app->post('/locations', function ($request, $response, $args) {
363
+$app->post('/locations', function($request, $response, $args) {
364 364
     $postData = $request->getParsedBody();
365 365
 
366 366
     $name = filter_var($postData['name'], FILTER_SANITIZE_STRING);
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     return $response->withJson($data);
381 381
 });
382 382
 
383
-$app->get('/locations/{id}', function ($request, $response, $args) {
383
+$app->get('/locations/{id}', function($request, $response, $args) {
384 384
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
385 385
 
386 386
     $location = new Location();
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     return $response->withJson($data);
397 397
 });
398 398
 
399
-$app->delete('/locations/{id}', function ($request, $response, $args) {
399
+$app->delete('/locations/{id}', function($request, $response, $args) {
400 400
     $id = (int) filter_var($args['id'], FILTER_SANITIZE_NUMBER_INT);
401 401
 
402 402
     $location = new Location();
Please login to merge, or discard this patch.
public/plugins/datatables/extensions/Scroller/examples/data/ssp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
 // parameter represents the DataTables column identifier. In this case simple
30 30
 // indexes
31 31
 $columns = [
32
-    ['db' => 'id',         'dt' => 0],
33
-    ['db' => 'firstname',  'dt' => 1],
34
-    ['db' => 'surname',    'dt' => 2],
35
-    ['db' => 'zip',        'dt' => 3],
36
-    ['db' => 'country',    'dt' => 4],
32
+    ['db' => 'id', 'dt' => 0],
33
+    ['db' => 'firstname', 'dt' => 1],
34
+    ['db' => 'surname', 'dt' => 2],
35
+    ['db' => 'zip', 'dt' => 3],
36
+    ['db' => 'country', 'dt' => 4],
37 37
 ];
38 38
 
39 39
 // SQL server connection information
Please login to merge, or discard this patch.
public/old/swaps.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 // ensure user is allowed to see page
40 40
 
41 41
 if (!isAdmin() && $queryStringUser != $sessionUserId) {
42
-    header('Location: swaps.php?user='.$sessionUserId);
42
+    header('Location: swaps.php?user=' . $sessionUserId);
43 43
 }
44 44
 
45 45
 // fetch swaps
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
               <p>
91 91
                 <strong>
92 92
                   <s class="text-red">
93
-                    <?php echo $swap->getOldUserRole()->getUser()->getFirstName().' '.$swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
93
+                    <?php echo $swap->getOldUserRole()->getUser()->getFirstName() . ' ' . $swap->getOldUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getOldUserRole()->getRole()->getName() ?>)
94 94
                   </s>
95 95
                   &#8594;
96 96
                   <span class="text-green">
97
-                    <?php echo $swap->getNewUserRole()->getUser()->getFirstName().' '.$swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
97
+                    <?php echo $swap->getNewUserRole()->getUser()->getFirstName() . ' ' . $swap->getNewUserRole()->getUser()->getLastName() ?> (<?php echo $swap->getNewUserRole()->getRole()->getName() ?>)
98 98
                   </span>
99 99
                 </strong>
100 100
               </p>
Please login to merge, or discard this patch.
public/old/overview.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     exit;
34 34
 }
35 35
 if (!isAdmin()) {
36
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
36
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
37 37
     exit;
38 38
 }
39 39
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 		  <?php
117 117
             else:
118
-                echo '<div class="box-body">'.$sentSuccess.'</div>';
118
+                echo '<div class="box-body">' . $sentSuccess . '</div>';
119 119
             endif;
120 120
             ?>
121 121
 				</div>
Please login to merge, or discard this patch.
public/old/createEvents.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                                         while ($ob = mysqli_fetch_object($result)) {
89 89
                                             if (!(isset($type) && $ob->id == $type)) {
90 90
                                                 $defaultTime = strftime('%H:%M', strtotime($ob->defaultTime));
91
-                                                echo "<option value='".$ob->id."' title='".$ob->description."' data-time='".($defaultTime == '00:00' ? '' : $defaultTime)."' data-location='".(is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId)."'>".$ob->name.'</option>';
91
+                                                echo "<option value='" . $ob->id . "' title='" . $ob->description . "' data-time='" . ($defaultTime == '00:00' ? '' : $defaultTime) . "' data-location='" . (is_null($ob->defaultLocationId) ? '' : $ob->defaultLocationId) . "'>" . $ob->name . '</option>';
92 92
                                             }
93 93
                                         } ?>
94 94
 									</select>
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
115 115
                                             if (isset($subtype) && $row['id'] == $subtype) {
116 116
                                             } else {
117
-                                                echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
117
+                                                echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
118 118
                                             }
119 119
                                         } ?>
120 120
 									</select>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                                         while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
143 143
                                             if (isset($location) && $row['id'] == $location) {
144 144
                                             } else {
145
-                                                echo "<option value='".$row['id']."'>".$row['name'].'</option>';
145
+                                                echo "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>';
146 146
                                             }
147 147
                                         } ?>
148 148
 									</select>
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                                     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
286 286
                                         if (isset($type) && $row['id'] == $type) {
287 287
                                         } else {
288
-                                            echo "<option value='".$row['id']."' title='".$row['description']."'>".$row['name'].'</option>';
288
+                                            echo "<option value='" . $row['id'] . "' title='" . $row['description'] . "'>" . $row['name'] . '</option>';
289 289
                                         }
290 290
                                     } ?>
291 291
 								</select>
Please login to merge, or discard this patch.
public/old/subTypes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $sql = ("INSERT INTO cr_eventSubTypes (name, description) VALUES ('$name', '$description')");
39 39
         if (!mysqli_query(db(), $sql)) {
40
-            die('Error: '.mysqli_error(db()));
40
+            die('Error: ' . mysqli_error(db()));
41 41
         }
42 42
     } else {
43 43
         // Otherwise we are dealing with edits, not new stuff
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
     $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
89 89
 
90 90
     while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
91
-        echo '<input type="hidden" name="formindex[]" value="'.$row['id'].'" />';
92
-        echo "<input name='name[]' value='".$row['name']."' />";
91
+        echo '<input type="hidden" name="formindex[]" value="' . $row['id'] . '" />';
92
+        echo "<input name='name[]' value='" . $row['name'] . "' />";
93 93
 
94
-        echo " <a href='subTypes.php?method=remove&subType=".$row['id']."'><i class='fa fa-times'></i></a><br />";
94
+        echo " <a href='subTypes.php?method=remove&subType=" . $row['id'] . "'><i class='fa fa-times'></i></a><br />";
95 95
     } ?>
96 96
    </div><!-- /.box-body -->
97 97
    <div class="box-footer">
Please login to merge, or discard this patch.
public/old/recordingUpload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 // only load page if functionality enabled
20 20
 if (siteConfig()['recording']['type'] != 'locomotivecms') {
21 21
     echo '<p>This feature is not enabled</p>';
22
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
22
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
23 23
     exit;
24 24
 }
25 25
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 $client = new Client([
29 29
     // Base URI is used with relative requests
30
-    'base_uri' => siteConfig()['recording']['locomotivecms']['url'].'/locomotive/api/',
30
+    'base_uri' => siteConfig()['recording']['locomotivecms']['url'] . '/locomotive/api/',
31 31
     // You can set any number of default request options.
32 32
     'timeout'  => 2.0,
33 33
 ]);
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
     var_dump($response);
53 53
 } else {
54 54
     echo '<p>Unable to connect to main site</p>';
55
-    echo '<p><a href='.siteSettings()->getSiteUrl().'>&lt; back to homepage</a></p>';
55
+    echo '<p><a href=' . siteSettings()->getSiteUrl() . '>&lt; back to homepage</a></p>';
56 56
     exit;
57 57
 }
Please login to merge, or discard this patch.
public/old/emailGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $statusMessage = 'Sent successfully';
54 54
     } else {
55 55
         foreach ($sent as $errorMessage) {
56
-            $statusMessage .= '<p>'.$errorMessage.'</p>';
56
+            $statusMessage .= '<p>' . $errorMessage . '</p>';
57 57
         }
58 58
     }
59 59
 
Please login to merge, or discard this patch.
public/old/statistics.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     exit;
15 15
 }
16 16
 if (!isAdmin()) {
17
-    header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME']));
17
+    header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME']));
18 18
     exit;
19 19
 }
20 20
 
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
     if ($method == 'truncate') {
27 27
         $sql = "CREATE TABLE tmp_system_statistics as SELECT * from cr_statistics WHERE type='system'";
28 28
         if (!mysqli_query(db(), $sql)) {
29
-            die('Error: '.mysqli_error(db()));
29
+            die('Error: ' . mysqli_error(db()));
30 30
         }
31 31
 
32 32
         $sql = ('TRUNCATE TABLE cr_statistics');
33 33
         if (!mysqli_query(db(), $sql)) {
34
-            die('Error: '.mysqli_error(db()));
34
+            die('Error: ' . mysqli_error(db()));
35 35
         }
36 36
 
37 37
         $sql = ('ALTER TABLE cr_statistics  AUTO_INCREMENT = 50');
38 38
         if (!mysqli_query(db(), $sql)) {
39
-            die('Error: '.mysqli_error(db()));
39
+            die('Error: ' . mysqli_error(db()));
40 40
         }
41 41
 
42 42
         $sql = 'INSERT INTO cr_statistics (userid,date,type,detail1,detail2,detail3,script) ';
43
-        $sql = $sql.'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
43
+        $sql = $sql . 'SELECT userid,date,type,detail1,detail2,detail3,script from tmp_system_statistics order by date';
44 44
         if (!mysqli_query(db(), $sql)) {
45
-            die('Error: '.mysqli_error(db()));
45
+            die('Error: ' . mysqli_error(db()));
46 46
         }
47 47
 
48 48
         $sql = 'DROP TABLE tmp_system_statistics';
49 49
         if (!mysqli_query(db(), $sql)) {
50
-            die('Error: '.mysqli_error(db()));
50
+            die('Error: ' . mysqli_error(db()));
51 51
         }
52 52
 
53 53
         insertStatistics('system', __FILE__, 'statistics deleted');
@@ -103,22 +103,22 @@  discard block
 block discarded – undo
103 103
               <?php
104 104
 
105 105
                         $sql = 'SELECT VERSION( ) AS mysqli_version';
106
-            $result = mysqli_query(db(), $sql) or die('MySQL-Error: '.mysqli_error(db()));
106
+            $result = mysqli_query(db(), $sql) or die('MySQL-Error: ' . mysqli_error(db()));
107 107
             $dbv = mysqli_fetch_array($result, MYSQLI_ASSOC);
108 108
             $mysqli_version = $dbv['mysqli_version'];
109 109
 
110 110
             if (substr($mysqli_version, 0, 1) == 5) {
111
-                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc ".$browserLimit;
111
+                $sql = "SELECT getBrowserInfo(detail3) as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by getBrowserInfo(detail3) order by count desc " . $browserLimit;
112 112
             } else {
113
-                $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc ".$browserLimit;
113
+                $sql = "SELECT detail3 as browser,count(*) as count from cr_statistics where detail1 like 'login%' and detail3!='' group by detail3 order by count desc " . $browserLimit;
114 114
             }
115 115
 
116 116
             $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
117 117
             while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
118 118
                 extract($row);
119 119
                 echo '<tr>';
120
-                echo '<td>'.$browser.'</td>';
121
-                echo '<td>'.$count.'</td>';
120
+                echo '<td>' . $browser . '</td>';
121
+                echo '<td>' . $count . '</td>';
122 122
                 echo '</tr>';
123 123
             } ?>
124 124
 
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
                   $sql .= " AND s.type = 'system'";
146 146
               }
147 147
           }
148
-                $sql .= ' ORDER BY date desc '.$limit;
148
+                $sql .= ' ORDER BY date desc ' . $limit;
149 149
                 $result = mysqli_query(db(), $sql) or die(mysqli_error(db()));
150 150
                 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
151 151
                     extract($row);
152 152
                     echo '<tr>';
153
-                    echo '<td>'.$date.'</td>';
154
-                    echo '<td>'.$name.'</td>';
155
-                    echo '<td>'.$type.'</td>';
156
-                    echo '<td>'.$detail1.'</td>';
157
-                    echo '<td>'.$detail2.'</td>';
153
+                    echo '<td>' . $date . '</td>';
154
+                    echo '<td>' . $name . '</td>';
155
+                    echo '<td>' . $type . '</td>';
156
+                    echo '<td>' . $detail1 . '</td>';
157
+                    echo '<td>' . $detail2 . '</td>';
158 158
                     //echo "<td>".$detail3."</td>";
159 159
                     echo '</tr>';
160 160
                 }
Please login to merge, or discard this patch.