Passed
Push — wip_sessions ( dba0a8...2f1ef6 )
by Nils
05:51
created
api/Model/Database.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         try {
32 32
             $this->connection = new \mysqli(DB_HOST, DB_USER, DB_PASSWD_CLEAR, DB_NAME);
33 33
 
34
-            if ( mysqli_connect_errno()) {
34
+            if (mysqli_connect_errno()) {
35 35
                 throw new Exception("Could not connect to database.");   
36 36
             }
37 37
         } catch (Exception $e) {
@@ -39,37 +39,37 @@  discard block
 block discarded – undo
39 39
         }           
40 40
     }
41 41
 
42
-    public function select($query = "" , $params = [])
42
+    public function select($query = "", $params = [])
43 43
     {
44 44
         try {
45
-            $stmt = $this->executeStatement( $query , $params );
45
+            $stmt = $this->executeStatement($query, $params);
46 46
             $result = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);               
47 47
             $stmt->close();
48 48
 
49 49
             return $result;
50
-        } catch(Exception $e) {
51
-            throw New Exception( $e->getMessage() );
50
+        } catch (Exception $e) {
51
+            throw New Exception($e->getMessage());
52 52
         }
53 53
     }
54 54
 
55
-    private function executeStatement($query = "" , $params = [])
55
+    private function executeStatement($query = "", $params = [])
56 56
     {
57 57
         try {
58
-            $stmt = $this->connection->prepare( $query );
58
+            $stmt = $this->connection->prepare($query);
59 59
 
60
-            if($stmt === false) {
61
-                throw New Exception("Unable to do prepared statement: " . $query);
60
+            if ($stmt === false) {
61
+                throw New Exception("Unable to do prepared statement: ".$query);
62 62
             }
63 63
 
64
-            if( $params ) {
64
+            if ($params) {
65 65
                 $stmt->bind_param($params[0], $params[1]);
66 66
             }
67 67
 
68 68
             $stmt->execute();
69 69
 
70 70
             return $stmt;
71
-        } catch(Exception $e) {
72
-            throw New Exception( $e->getMessage() );
71
+        } catch (Exception $e) {
72
+            throw New Exception($e->getMessage());
73 73
         }   
74 74
     }
75 75
 }
76 76
\ No newline at end of file
Please login to merge, or discard this patch.
api/inc/bootstrap.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,22 +26,22 @@  discard block
 block discarded – undo
26 26
 
27 27
 use TeampassClasses\SuperGlobal\SuperGlobal;
28 28
 
29
-define("API_ROOT_PATH", __DIR__ . "/..");
29
+define("API_ROOT_PATH", __DIR__."/..");
30 30
 
31 31
 // include main configuration file
32
-require API_ROOT_PATH . '/../sources/main.functions.php';
32
+require API_ROOT_PATH.'/../sources/main.functions.php';
33 33
 
34 34
 // init
35 35
 loadClasses('DB');
36 36
 $superGlobal = new SuperGlobal();
37 37
 
38 38
 // include the base controller file
39
-require API_ROOT_PATH . "/Controller/Api/BaseController.php";
39
+require API_ROOT_PATH."/Controller/Api/BaseController.php";
40 40
 
41 41
 // include the use model file
42
-require API_ROOT_PATH . "/Model/UserModel.php";
43
-require API_ROOT_PATH . "/Model/ItemModel.php";
44
-require API_ROOT_PATH . "/Model/FolderModel.php";
42
+require API_ROOT_PATH."/Model/UserModel.php";
43
+require API_ROOT_PATH."/Model/ItemModel.php";
44
+require API_ROOT_PATH."/Model/FolderModel.php";
45 45
 
46 46
 /**
47 47
  * Launch expected action for ITEM
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function itemAction(array $actions, array $userData)
54 54
 {
55
-    require API_ROOT_PATH . "/Controller/Api/ItemController.php";
55
+    require API_ROOT_PATH."/Controller/Api/ItemController.php";
56 56
     
57 57
     $objFeedController = new ItemController();
58
-    $strMethodName = $actions[0] . 'Action';
58
+    $strMethodName = $actions[0].'Action';
59 59
     $objFeedController->{$strMethodName}($userData);
60 60
 }
61 61
 
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
  */
69 69
 function folderAction(array $actions, array $userData)
70 70
 {
71
-    require API_ROOT_PATH . "/Controller/Api/FolderController.php";
71
+    require API_ROOT_PATH."/Controller/Api/FolderController.php";
72 72
 
73 73
     $objFeedController = new FolderController();
74
-    $strMethodName = $actions[0] . 'Action';
74
+    $strMethodName = $actions[0].'Action';
75 75
     $objFeedController->{$strMethodName}($userData);
76 76
 }
77 77
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
  */
83 83
 function apiIsEnabled(): string
84 84
 {
85
-    include API_ROOT_PATH . '/../includes/config/tp.config.php';
85
+    include API_ROOT_PATH.'/../includes/config/tp.config.php';
86 86
 
87 87
     if (isset($SETTINGS) === true && isset($SETTINGS['api']) === true && (int) $SETTINGS['api'] === 1) {
88 88
         return json_encode(
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
  */
112 112
 function verifyAuth(): string
113 113
 {
114
-    include_once API_ROOT_PATH . '/inc/jwt_utils.php';
114
+    include_once API_ROOT_PATH.'/inc/jwt_utils.php';
115 115
     $bearer_token = get_bearer_token();
116 116
 
117 117
     if (empty($bearer_token) === false && is_jwt_valid($bearer_token) === true) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
  */
142 142
 function getDataFromToken(): string
143 143
 {
144
-    include_once API_ROOT_PATH . '/inc/jwt_utils.php';
144
+    include_once API_ROOT_PATH.'/inc/jwt_utils.php';
145 145
     $bearer_token = get_bearer_token();
146 146
 
147 147
     if (empty($bearer_token) === false) {
Please login to merge, or discard this patch.
api/inc/jwt_utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
83 83
 }
84 84
 
85
-function get_authorization_header(){
85
+function get_authorization_header() {
86 86
 	$superGlobal = new SuperGlobal();
87 87
 	$headers = null;
88 88
 	
Please login to merge, or discard this patch.
api/Model/AuthModel.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 use Firebase\JWT\JWT;
28 28
 use Firebase\JWT\Key;
29 29
 
30
-require_once API_ROOT_PATH . "/Model/Database.php";
30
+require_once API_ROOT_PATH."/Model/Database.php";
31 31
 
32 32
 
33 33
 class AuthModel extends Database
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function getUserAuth(string $login, string $password, string $apikey): array
46 46
     {
47 47
         // Sanitize
48
-        include_once API_ROOT_PATH . '/../sources/main.functions.php';
48
+        include_once API_ROOT_PATH.'/../sources/main.functions.php';
49 49
         $inputData = dataSanitizer(
50 50
             [
51 51
                 'login' => isset($login) === true ? $login : '',
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 'password' => 'trim|escape',
58 58
                 'apikey' => 'trim|escape',
59 59
             ],
60
-            API_ROOT_PATH . '/..'
60
+            API_ROOT_PATH.'/..'
61 61
         );
62 62
         if (empty($inputData['login']) === true || empty($inputData['apikey']) === true) {
63 63
             return ["error" => "Login failed0.", "info" => "Empty entry"];
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         // Check apikey
67 67
         if (empty($inputData['password']) === true) {
68 68
             // case where it is a generic key
69
-            $apiInfo = $this->select("SELECT count(*) FROM " . prefixTable('api') . " WHERE value='".$inputData['apikey']."' AND label='".$inputData['login']."'");
69
+            $apiInfo = $this->select("SELECT count(*) FROM ".prefixTable('api')." WHERE value='".$inputData['apikey']."' AND label='".$inputData['login']."'");
70 70
             if ((int) $apiInfo[0]['count(*)'] === 0) {
71 71
                 return ["error" => "Login failed1.", "info" => "apikey : Not valid"];
72 72
             }
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
             // Check if user exists
78 78
             $userInfoRes = $this->select(
79 79
                 "SELECT u.id, u.pw, u.public_key, u.private_key, u.personal_folder, u.fonction_id, u.groupes_visibles, u.groupes_interdits, a.value AS user_api_key
80
-                FROM " . prefixTable('users') . " AS u
81
-                INNER JOIN " . prefixTable('api') . " AS a ON (a.user_id=u.id)
80
+                FROM " . prefixTable('users')." AS u
81
+                INNER JOIN " . prefixTable('api')." AS a ON (a.user_id=u.id)
82 82
                 WHERE login='".$inputData['login']."'");
83 83
             if (count($userInfoRes) === 0) {
84 84
                 return ["error" => "Login failed3.", "info" => "apikey : Not valid"];
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     private function createUserJWT(int $id, string $login, int $pf_enabled, string $pubkey, string $privkey, string $folders, string $items): array
133 133
     {
134
-        include API_ROOT_PATH . '/../includes/config/tp.config.php';
134
+        include API_ROOT_PATH.'/../includes/config/tp.config.php';
135 135
         
136 136
 		$payload = [
137 137
             'username' => $login,
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         // Get folders from the roles
177 177
         if (empty($userFunctionId) === false) {
178
-            $rows = $this->select("SELECT * FROM " . prefixTable('roles_values') . " WHERE role_id IN (".$userFunctionId.") AND type IN ('W', 'ND', 'NE', 'NDNE', 'R')");
178
+            $rows = $this->select("SELECT * FROM ".prefixTable('roles_values')." WHERE role_id IN (".$userFunctionId.") AND type IN ('W', 'ND', 'NE', 'NDNE', 'R')");
179 179
             foreach ($rows as $record) {
180 180
                 if ($record['type'] === 'R') {
181 181
                     array_push($readOnlyFolders, $record['folder_id']);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         
197 197
         // Does this user is allowed to see other items
198 198
         $inc = 0;
199
-        $rows = $this->select("SELECT id, id_tree FROM " . prefixTable('items') . " WHERE restricted_to LIKE '".$userInfo['id']."'".
199
+        $rows = $this->select("SELECT id, id_tree FROM ".prefixTable('items')." WHERE restricted_to LIKE '".$userInfo['id']."'".
200 200
             (empty($userFunctionId) === false ? ' AND id_tree NOT IN ('.$userFunctionId.')' : ''));
201 201
         foreach ($rows as $record) {
202 202
             // Exclude restriction on item if folder is fully accessible
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
 
207 207
         // Check for the users roles if some specific rights exist on items
208 208
         $rows = $this->select("SELECT i.id_tree, r.item_id
209
-            FROM " . prefixTable('items') . " as i
210
-            INNER JOIN " . prefixTable('restriction_to_roles') . " as r ON (r.item_id=i.id)
209
+            FROM " . prefixTable('items')." as i
210
+            INNER JOIN " . prefixTable('restriction_to_roles')." as r ON (r.item_id=i.id)
211 211
             WHERE ".(empty($userFunctionId) === false ? ' id_tree NOT IN ('.$userFunctionId.') AND ' : '')." i.id_tree != ''
212 212
             ORDER BY i.id_tree ASC");
213 213
         foreach ($rows as $record) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         // Add all personal folders
222 222
         $rows = $this->select(
223 223
             'SELECT id
224
-            FROM ' . prefixTable('nested_tree') . '
224
+            FROM ' . prefixTable('nested_tree').'
225 225
             WHERE title = '.$userInfo['id'].' AND personal_folder = 1'.
226 226
             (empty($userFunctionId) === false ? ' AND id NOT IN ('.$userFunctionId.')' : '').
227 227
             ' LIMIT 0,1'
Please login to merge, or discard this patch.
scripts/background_tasks___user_task.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 DB::debugmode(false);
69 69
 $rows = DB::query(
70 70
     'SELECT *
71
-    FROM ' . prefixTable('processes') . '
71
+    FROM ' . prefixTable('processes').'
72 72
     WHERE is_in_progress = %i AND process_type = %s
73 73
     ORDER BY increment_id ASC LIMIT 0,10',
74 74
     0,
Please login to merge, or discard this patch.
scripts/background_tasks___functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
  */
91 91
 function provideLog(string $message, array $SETTINGS)
92 92
 {
93
-    echo '\n' . (string) date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], time()) . ' - '.$message . '\n';
93
+    echo '\n'.(string) date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], time()).' - '.$message.'\n';
94 94
 }
95 95
 
96
-function performVisibleFoldersHtmlUpdate (int $user_id)
96
+function performVisibleFoldersHtmlUpdate(int $user_id)
97 97
 {
98 98
     $html = [];
99 99
 
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 
104 104
     // get current folders visible for user
105 105
     $cache_tree = DB::queryFirstRow(
106
-        'SELECT increment_id, data FROM ' . prefixTable('cache_tree') . ' WHERE user_id = %i',
106
+        'SELECT increment_id, data FROM '.prefixTable('cache_tree').' WHERE user_id = %i',
107 107
         $user_id
108 108
     );
109
-    $folders = json_decode($cache_tree['data'], true);//print_r($folders);
109
+    $folders = json_decode($cache_tree['data'], true); //print_r($folders);
110 110
     foreach ($folders as $folder) {
111 111
         $idFolder = (int) explode("li_", $folder['id'])[1];
112 112
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
         // get folder info
121 121
         $folder = DB::queryFirstRow(
122
-            'SELECT title, parent_id, personal_folder FROM ' . prefixTable('nested_tree') . ' WHERE id = %i',
122
+            'SELECT title, parent_id, personal_folder FROM '.prefixTable('nested_tree').' WHERE id = %i',
123 123
             $idFolder
124 124
         );
125 125
 
Please login to merge, or discard this patch.
pages/statistics.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('statistics') === false) {
66 66
     // Not allowed page
67 67
     $session->set('system-error_code', ERR_NOT_ALLOWED);
68
-    include $SETTINGS['cpassman_dir'] . '/error.php';
68
+    include $SETTINGS['cpassman_dir'].'/error.php';
69 69
     exit;
70 70
 }
71 71
 
Please login to merge, or discard this patch.
pages/profile.js.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('profile') === false) {
72 72
     // Not allowed page
73 73
     $session->set('system-error_code', ERR_NOT_ALLOWED);
74
-    include $SETTINGS['cpassman_dir'] . '/error.php';
74
+    include $SETTINGS['cpassman_dir'].'/error.php';
75 75
     exit;
76 76
 }
77 77
 ?>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     })
96 96
 
97 97
     // Select user properties
98
-    $('#profile-user-language option[value=<?php echo $session->get('user-language');?>').attr('selected','selected');
98
+    $('#profile-user-language option[value=<?php echo $session->get('user-language'); ?>').attr('selected','selected');
99 99
 
100 100
 
101 101
     // AVATAR IMPORT
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                     $('#profile-user-email').val(data.email)
263 263
 
264 264
                     // reload page in case of language change
265
-                    if ($('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language');?>') {
265
+                    if ($('#profile-user-language').val().toLowerCase() !== '<?php echo $session->get('user-language'); ?>') {
266 266
                         // prepare reload
267 267
                         $(this).delay(3000).queue(function() {
268 268
                             document.location.href = "index.php?page=profile";
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                         // Inform user
274 274
                         toastr.remove();
275 275
                         toastr.info(
276
-                            '<?php echo $lang->get('alert_page_will_reload') . ' ... ' . $lang->get('please_wait'); ?>',
276
+                            '<?php echo $lang->get('alert_page_will_reload').' ... '.$lang->get('please_wait'); ?>',
277 277
                             '', {
278 278
                                 timeOut: 3000,
279 279
                                 progressBar: true
@@ -377,27 +377,27 @@  discard block
 block discarded – undo
377 377
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
378 378
         "ratings": [
379 379
             {
380
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
380
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
381 381
                 "className": "meterWarn",
382 382
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
383 383
             },
384 384
             {
385
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
385
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
386 386
                 "className": "meterWarn",
387 387
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
388 388
             },
389 389
             {
390
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
390
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
391 391
                 "className": "meterGood",
392 392
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
393 393
             },
394 394
             {
395
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
395
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
396 396
                 "className": "meterGood",
397 397
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
398 398
             },
399 399
             {
400
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
400
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
401 401
                 "className": "meterExcel",
402 402
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
403 403
             }
@@ -490,27 +490,27 @@  discard block
 block discarded – undo
490 490
         "defaultText": "<?php echo $lang->get('index_pw_level_txt'); ?>",
491 491
         "ratings": [
492 492
             {
493
-                "minScore": <?php echo TP_PW_STRENGTH_1;?>,
493
+                "minScore": <?php echo TP_PW_STRENGTH_1; ?>,
494 494
                 "className": "meterWarn",
495 495
                 "text": "<?php echo $lang->get('complex_level1'); ?>"
496 496
             },
497 497
             {
498
-                "minScore": <?php echo TP_PW_STRENGTH_2;?>,
498
+                "minScore": <?php echo TP_PW_STRENGTH_2; ?>,
499 499
                 "className": "meterWarn",
500 500
                 "text": "<?php echo $lang->get('complex_level2'); ?>"
501 501
             },
502 502
             {
503
-                "minScore": <?php echo TP_PW_STRENGTH_3;?>,
503
+                "minScore": <?php echo TP_PW_STRENGTH_3; ?>,
504 504
                 "className": "meterGood",
505 505
                 "text": "<?php echo $lang->get('complex_level3'); ?>"
506 506
             },
507 507
             {
508
-                "minScore": <?php echo TP_PW_STRENGTH_4;?>,
508
+                "minScore": <?php echo TP_PW_STRENGTH_4; ?>,
509 509
                 "className": "meterGood",
510 510
                 "text": "<?php echo $lang->get('complex_level4'); ?>"
511 511
             },
512 512
             {
513
-                "minScore": <?php echo TP_PW_STRENGTH_5;?>,
513
+                "minScore": <?php echo TP_PW_STRENGTH_5; ?>,
514 514
                 "className": "meterExcel",
515 515
                 "text": "<?php echo $lang->get('complex_level5'); ?>"
516 516
             }
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         }
527 527
     });
528 528
 
529
-    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
529
+    $('#profile-keys_download-date').text('<?php echo null === $session->get('user-keys_recovery_time') ? $lang->get('none') : date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $session->get('user-keys_recovery_time')); ?>');
530 530
 
531 531
     $("#open-dialog-keys-download").on('click', function(event) {
532 532
         event.preventDefault();
Please login to merge, or discard this patch.
pages/utilities.logs.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('utilities.logs') === false) {
66 66
     // Not allowed page
67 67
     $session->set('system-error_code', ERR_NOT_ALLOWED);
68
-    include $SETTINGS['cpassman_dir'] . '/error.php';
68
+    include $SETTINGS['cpassman_dir'].'/error.php';
69 69
     exit;
70 70
 }
71 71
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                                             echo null !== $session->get('user-admin') && (int) $session->get('user-admin') === 1 ? '' : ' hidden';
203 203
                                             ?>">
204 204
                         <div class="form-group">
205
-                            <h5><i class="fas fa-broom mr-2"></i><?php echo $lang->get('purge') . ' ' . $lang->get('date_range'); ?></h5>
205
+                            <h5><i class="fas fa-broom mr-2"></i><?php echo $lang->get('purge').' '.$lang->get('date_range'); ?></h5>
206 206
                             <div class="input-group">
207 207
                                 <div class="input-group-prepend">
208 208
                                     <span class="input-group-text">
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                                     <select class="form-control" id="purge-filter-user">
226 226
                                         <option value="-1"><?php echo $lang->get('all'); ?></option>
227 227
                                     <?php
228
-                                    $rows = DB::query('SELECT id, name, lastname FROM ' . prefixTable('users') . ' WHERE admin = 0');
228
+                                    $rows = DB::query('SELECT id, name, lastname FROM '.prefixTable('users').' WHERE admin = 0');
229 229
 foreach ($rows as $record) {
230 230
     echo '
231 231
                                         <option value="'.$record['id'].'">'.$record['name'].' '.$record['lastname'].'</option>';
Please login to merge, or discard this patch.