@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('api') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | <?php |
| 151 | 151 | $rows = DB::query( |
| 152 | 152 | 'SELECT increment_id, label, timestamp, user_id, value |
| 153 | - FROM ' . prefixTable('api') . ' |
|
| 153 | + FROM ' . prefixTable('api').' |
|
| 154 | 154 | WHERE type = %s |
| 155 | 155 | ORDER BY timestamp ASC', |
| 156 | 156 | 'key' |
@@ -169,10 +169,10 @@ discard block |
||
| 169 | 169 | foreach ($rows as $record) { |
| 170 | 170 | //$apiKey = (int) $record['user_id'] === -1 ? doDataDecryption($record['value'], base64_encode(SECUREFILE.':'.$record['timestamp'])) : $record['value']; |
| 171 | 171 | echo ' |
| 172 | - <tr data-id="' . $record['increment_id'] . '"> |
|
| 173 | - <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . langHdl('del_button') . '"></i></td> |
|
| 174 | - <td><span class="edit-api-key pointer">' . $record['label'] . '</span></td> |
|
| 175 | - <td>' . $record['value']. '</td> |
|
| 172 | + <tr data-id="' . $record['increment_id'].'"> |
|
| 173 | + <td width="50px"><i class="fas fa-trash infotip pointer delete-api-key" title="' . langHdl('del_button').'"></i></td> |
|
| 174 | + <td><span class="edit-api-key pointer">' . $record['label'].'</span></td> |
|
| 175 | + <td>' . $record['value'].'</td> |
|
| 176 | 176 | </tr>'; |
| 177 | 177 | } ?> |
| 178 | 178 | </tbody> |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | <div class="col-12 mt-4" id="table-api-ip"> |
| 208 | 208 | <?php |
| 209 | 209 | $rows = DB::query( |
| 210 | - 'SELECT increment_id, label, timestamp value FROM ' . prefixTable('api') . ' |
|
| 210 | + 'SELECT increment_id, label, timestamp value FROM '.prefixTable('api').' |
|
| 211 | 211 | WHERE type = %s |
| 212 | 212 | ORDER BY timestamp ASC', |
| 213 | 213 | 'ip' |
@@ -225,10 +225,10 @@ discard block |
||
| 225 | 225 | <?php |
| 226 | 226 | foreach ($rows as $record) { |
| 227 | 227 | echo ' |
| 228 | - <tr data-id="' . $record['increment_id'] . '"> |
|
| 229 | - <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . langHdl('del_button') . '"></i></td> |
|
| 230 | - <td><span class="edit-api-ip pointer" data-field="label">' . $record['label'] . '</span></td> |
|
| 231 | - <td><span class="edit-api-ip pointer" data-field="value">' . $record['value'] . '</span></td> |
|
| 228 | + <tr data-id="' . $record['increment_id'].'"> |
|
| 229 | + <td width="50px"><i class="fas fa-trash infotip pointer delete-api-ip" title="' . langHdl('del_button').'"></i></td> |
|
| 230 | + <td><span class="edit-api-ip pointer" data-field="label">' . $record['label'].'</span></td> |
|
| 231 | + <td><span class="edit-api-ip pointer" data-field="value">' . $record['value'].'</span></td> |
|
| 232 | 232 | </tr>'; |
| 233 | 233 | } ?> |
| 234 | 234 | </tbody> |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('emails') === false) { |
| 71 | 71 | // Not allowed page |
| 72 | 72 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 73 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 73 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | ?> |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('backups') === false) { |
| 70 | 70 | // Not allowed page |
| 71 | 71 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 72 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 72 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 73 | 73 | exit; |
| 74 | 74 | } |
| 75 | 75 | ?> |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | // ERROR |
| 139 | 139 | toastr.remove(); |
| 140 | 140 | toastr.error( |
| 141 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 141 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 142 | 142 | '<?php echo langHdl('error'); ?>', { |
| 143 | 143 | timeOut: 5000, |
| 144 | 144 | progressBar: true |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | // error |
| 166 | 166 | toastr.remove(); |
| 167 | 167 | toastr.error( |
| 168 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 168 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 169 | 169 | '<?php echo langHdl('error'); ?>', { |
| 170 | 170 | timeOut: 5000, |
| 171 | 171 | progressBar: true |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | // ERROR |
| 237 | 237 | toastr.remove(); |
| 238 | 238 | toastr.error( |
| 239 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 239 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 240 | 240 | '<?php echo langHdl('error'); ?>', { |
| 241 | 241 | timeOut: 5000, |
| 242 | 242 | progressBar: true |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | container: "onthefly-restore-file", |
| 278 | 278 | max_file_size: '<?php |
| 279 | 279 | if (strrpos($SETTINGS['upload_maxfilesize'], 'mb') === false) { |
| 280 | - echo $SETTINGS['upload_maxfilesize'] . 'mb'; |
|
| 280 | + echo $SETTINGS['upload_maxfilesize'].'mb'; |
|
| 281 | 281 | } else { |
| 282 | 282 | echo $SETTINGS['upload_maxfilesize']; |
| 283 | 283 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('search') === false) { |
| 64 | 64 | // Not allowed page |
| 65 | 65 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 66 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 66 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('mfa') === false) { |
| 71 | 71 | // Not allowed page |
| 72 | 72 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 73 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 73 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | ?> |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | if ($checkUserAccess->checkSession() === false || $checkUserAccess->userAccessPage('options') === false) { |
| 71 | 71 | // Not allowed page |
| 72 | 72 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 73 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 73 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | ?> |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $superGlobal = new SuperGlobal(); |
| 39 | 39 | $get = []; |
| 40 | 40 | $get['post_type'] = $superGlobal->get('post_type', 'GET'); |
| 41 | -if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo' ) { |
|
| 41 | +if (isset($SETTINGS['duo']) === true && (int) $SETTINGS['duo'] === 1 && $get['post_type'] === 'duo') { |
|
| 42 | 42 | $get['duo_state'] = $superGlobal->get('state', 'GET'); |
| 43 | 43 | $get['duo_code'] = $superGlobal->get('duo_code', 'GET'); |
| 44 | 44 | } |
@@ -48,8 +48,7 @@ discard block |
||
| 48 | 48 | <div class="login-box"> |
| 49 | 49 | <div class="login-logo"><div style="margin:30px;">', |
| 50 | 50 | isset($SETTINGS['custom_logo']) === true && empty($SETTINGS['custom_logo']) === false ? |
| 51 | - '<img src="' . (string) $SETTINGS['custom_logo'] . '" alt="" style="text-align:center; max-width:100px;" />' : |
|
| 52 | - '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">', |
|
| 51 | + '<img src="'.(string) $SETTINGS['custom_logo'].'" alt="" style="text-align:center; max-width:100px;" />' : '<img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo">', |
|
| 53 | 52 | ' |
| 54 | 53 | </div> |
| 55 | 54 | <div style="font-weight:bold;"> |
@@ -69,14 +68,14 @@ discard block |
||
| 69 | 68 | |
| 70 | 69 | <div class="card-body login-card-body1"> |
| 71 | 70 | <div class="input-group has-feedback mb-2"> |
| 72 | - <div class="input-group-prepend infotip" title="' . langHdl('login') . '"> |
|
| 71 | + <div class="input-group-prepend infotip" title="' . langHdl('login').'"> |
|
| 73 | 72 | <span class="input-group-text"><i class="fa-solid fa-user fa-fw"></i></span> |
| 74 | 73 | </div>'; |
| 75 | 74 | if ( |
| 76 | 75 | isset($SETTINGS['enable_http_request_login']) === true |
| 77 | 76 | && (int) $SETTINGS['enable_http_request_login'] === 1 |
| 78 | 77 | && $superGlobal->get('PHP_AUTH_USER', 'SERVER') !== null |
| 79 | - && ! (isset($SETTINGS['maintenance_mode']) === true |
|
| 78 | + && !(isset($SETTINGS['maintenance_mode']) === true |
|
| 80 | 79 | && (int) $SETTINGS['maintenance_mode'] === 1) |
| 81 | 80 | ) { |
| 82 | 81 | if (strpos($superGlobal->get('PHP_AUTH_USER', 'SERVER'), '@') !== false) { |
@@ -90,32 +89,32 @@ discard block |
||
| 90 | 89 | <input type="text" id="login" class="form-control" placeholder="', filter_var($username, FILTER_SANITIZE_FULL_SPECIAL_CHARS), '" readonly>'; |
| 91 | 90 | } else { |
| 92 | 91 | echo ' |
| 93 | - <input type="text" id="login" class="form-control" placeholder="' . langHdl('index_login') . '" value="'.(null !== $superGlobal->get('login', 'SESSION') && empty($superGlobal->get('login', 'SESSION')) === false ? filter_var($superGlobal->get('login', 'SESSION'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">'; |
|
| 92 | + <input type="text" id="login" class="form-control" placeholder="' . langHdl('index_login').'" value="'.(null !== $superGlobal->get('login', 'SESSION') && empty($superGlobal->get('login', 'SESSION')) === false ? filter_var($superGlobal->get('login', 'SESSION'), FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '').'">'; |
|
| 94 | 93 | } |
| 95 | 94 | |
| 96 | 95 | echo ' |
| 97 | 96 | </div>'; |
| 98 | -if (! (isset($SETTINGS['enable_http_request_login']) === true |
|
| 97 | +if (!(isset($SETTINGS['enable_http_request_login']) === true |
|
| 99 | 98 | && (int) $SETTINGS['enable_http_request_login'] === 1 |
| 100 | 99 | && $superGlobal->get('PHP_AUTH_USER', 'SERVER') !== null |
| 101 | - && ! (isset($SETTINGS['maintenance_mode']) === true |
|
| 100 | + && !(isset($SETTINGS['maintenance_mode']) === true |
|
| 102 | 101 | && (int) $SETTINGS['maintenance_mode'] === 1))) { |
| 103 | 102 | echo ' |
| 104 | 103 | <div class="input-group has-feedback mb-2"> |
| 105 | - <div class="input-group-prepend infotip" title="' . langHdl('password') . '"> |
|
| 104 | + <div class="input-group-prepend infotip" title="' . langHdl('password').'"> |
|
| 106 | 105 | <span class="input-group-text"><i class="fa-solid fa-lock fa-fw"></i></span> |
| 107 | 106 | </div> |
| 108 | - <input type="password" id="pw" class="form-control submit-button" placeholder="' . langHdl('index_password') . '"> |
|
| 107 | + <input type="password" id="pw" class="form-control submit-button" placeholder="' . langHdl('index_password').'"> |
|
| 109 | 108 | </div>'; |
| 110 | 109 | } |
| 111 | 110 | |
| 112 | 111 | echo ' |
| 113 | 112 | <div class="input-group has-feedback mb-2"> |
| 114 | - <div class="input-group-prepend infotip" title="' . langHdl('session_expiration_in_minutes') . '"> |
|
| 113 | + <div class="input-group-prepend infotip" title="' . langHdl('session_expiration_in_minutes').'"> |
|
| 115 | 114 | <span class="input-group-text"><i class="fa-solid fa-clock fa-fw"></i></span> |
| 116 | 115 | </div> |
| 117 | 116 | <input type="text" id="session_duration" class="form-control submit-button" |
| 118 | - placeholder="' . langHdl('index_session_duration') .' (' . langHdl('minutes') . ')" |
|
| 117 | + placeholder="' . langHdl('index_session_duration').' ('.langHdl('minutes').')" |
|
| 119 | 118 | value="', isset($SETTINGS['default_session_expiration_time']) === true ? $SETTINGS['default_session_expiration_time'] : '', '"> |
| 120 | 119 | </div>'; |
| 121 | 120 | // 2FA auth selector |
@@ -125,7 +124,7 @@ discard block |
||
| 125 | 124 | <input type="hidden" id="duo_state" value="', isset($get['duo_state']) === true && is_null($get['duo_state']) === false ? $get['duo_state'] : '', '"> |
| 126 | 125 | <div class="row mb-3 hidden" id="2fa_methods_selector"> |
| 127 | 126 | <div class="col-12"> |
| 128 | - <h8 class="login-box-msg">' . langHdl('2fa_authentication_selector') . '</h8> |
|
| 127 | + <h8 class="login-box-msg">' . langHdl('2fa_authentication_selector').'</h8> |
|
| 129 | 128 | <div class="2fa-methods text-center mt-2">', |
| 130 | 129 | isset($SETTINGS['google_authentication']) === true && (int) $SETTINGS['google_authentication'] === 1 ? |
| 131 | 130 | ' |
@@ -159,14 +158,14 @@ discard block |
||
| 159 | 158 | echo ' |
| 160 | 159 | <div id="div-2fa-google" class="mb-3 div-2fa-method hidden"> |
| 161 | 160 | <div class="input-group has-feedback mb-2"> |
| 162 | - <div class="input-group-prepend infotip" title="' . langHdl('mfa_unique_code') . '"> |
|
| 161 | + <div class="input-group-prepend infotip" title="' . langHdl('mfa_unique_code').'"> |
|
| 163 | 162 | <span class="input-group-text"><i class="fa-solid fa-key fa-fw"></i></span> |
| 164 | 163 | </div> |
| 165 | - <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . langHdl('ga_identification_code') . '" /> |
|
| 164 | + <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . langHdl('ga_identification_code').'" /> |
|
| 166 | 165 | <span class="input-group-append"> |
| 167 | 166 | <button type="button" class="btn btn-info btn-flat" onclick="send_user_new_temporary_ga_code()"> |
| 168 | 167 | <i class="fa-solid fa-envelope form-control-feedback pointer infotip" |
| 169 | - title="' . langHdl('i_need_to_generate_new_ga_code') . '"></i> |
|
| 168 | + title="' . langHdl('i_need_to_generate_new_ga_code').'"></i> |
|
| 170 | 169 | </button> |
| 171 | 170 | </span> |
| 172 | 171 | </div> |
@@ -184,7 +183,7 @@ discard block |
||
| 184 | 183 | <script> |
| 185 | 184 | var seconds = 1; |
| 186 | 185 | function updateLogonButton(timeToGo){ |
| 187 | - document.getElementById("but_identify_user").value = "' . langHdl('duration_login_attempt') . ' " + timeToGo; |
|
| 186 | + document.getElementById("but_identify_user").value = "' . langHdl('duration_login_attempt').' " + timeToGo; |
|
| 188 | 187 | } |
| 189 | 188 | $( window ).on( "load", function() { |
| 190 | 189 | updateLogonButton(seconds); |
@@ -193,7 +192,7 @@ discard block |
||
| 193 | 192 | if (seconds >= 0) { |
| 194 | 193 | updateLogonButton(seconds); |
| 195 | 194 | } else if(seconds === 0) { |
| 196 | - launchIdentify("", "' . $nextUrl . '"); |
|
| 195 | + launchIdentify("", "' . $nextUrl.'"); |
|
| 197 | 196 | } |
| 198 | 197 | updateLogonButton(seconds); |
| 199 | 198 | }, |
@@ -214,15 +213,15 @@ discard block |
||
| 214 | 213 | <div class="col-8"> |
| 215 | 214 | <div id="yubiko-new-key" class="alert alert-info hidden"> |
| 216 | 215 | <p> |
| 217 | - <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . langHdl('yubico_user_id') . '"> |
|
| 216 | + <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . langHdl('yubico_user_id').'"> |
|
| 218 | 217 | </p> |
| 219 | 218 | <p> |
| 220 | - <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . langHdl('yubico_user_key') . '"> |
|
| 219 | + <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . langHdl('yubico_user_key').'"> |
|
| 221 | 220 | </p> |
| 222 | 221 | </div> |
| 223 | - <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . langHdl('press_your_yubico_key') . '"> |
|
| 222 | + <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . langHdl('press_your_yubico_key').'"> |
|
| 224 | 223 | <div class="row"> |
| 225 | - <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . langHdl('register_new_yubiko_key') . '</span> |
|
| 224 | + <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . langHdl('register_new_yubiko_key').'</span> |
|
| 226 | 225 | </div> |
| 227 | 226 | </div> |
| 228 | 227 | </div>'; |
@@ -231,22 +230,22 @@ discard block |
||
| 231 | 230 | echo ' |
| 232 | 231 | <div class="row mb-3 mt-5"> |
| 233 | 232 | <div class="col-12"> |
| 234 | - <button id="but_identify_user" class="btn btn-primary btn-block">' . langHdl('log_in') . '</button> |
|
| 233 | + <button id="but_identify_user" class="btn btn-primary btn-block">' . langHdl('log_in').'</button> |
|
| 235 | 234 | |
| 236 | 235 | <!-- In case of upgrade, the user has to provide his One Time Code --> |
| 237 | 236 | <div class="card-body user-one-time-code-card-body hidden"> |
| 238 | - <h5 class="login-box-msg">' . langHdl('provide_personal_one_time_code') . '</h5> |
|
| 237 | + <h5 class="login-box-msg">' . langHdl('provide_personal_one_time_code').'</h5> |
|
| 239 | 238 | |
| 240 | 239 | <div class="input-group has-feedback mb-2 mt-4"> |
| 241 | 240 | <div class="input-group-prepend"> |
| 242 | 241 | <span class="input-group-text"><i class="fa-solid fa-unlock-alt"></i></span> |
| 243 | 242 | </div> |
| 244 | - <input type="password" id="user-one-time-code" class="form-control" placeholder="' . langHdl('one_time_code') . '"> |
|
| 243 | + <input type="password" id="user-one-time-code" class="form-control" placeholder="' . langHdl('one_time_code').'"> |
|
| 245 | 244 | </div> |
| 246 | 245 | |
| 247 | 246 | <div class="row mb-3"> |
| 248 | 247 | <div class="col-12"> |
| 249 | - <button id="but_confirm_otc" class="btn btn-primary btn-block">' . langHdl('confirm') . '</button> |
|
| 248 | + <button id="but_confirm_otc" class="btn btn-primary btn-block">' . langHdl('confirm').'</button> |
|
| 250 | 249 | </div> |
| 251 | 250 | </div> |
| 252 | 251 | </div> |
@@ -261,10 +260,10 @@ discard block |
||
| 261 | 260 | // In case of password change |
| 262 | 261 | echo ' |
| 263 | 262 | <div class="card-body confirm-password-card-body hidden"> |
| 264 | - <h5 class="login-box-msg">' . langHdl('new_password_required') . '</h5> |
|
| 263 | + <h5 class="login-box-msg">' . langHdl('new_password_required').'</h5> |
|
| 265 | 264 | |
| 266 | 265 | <div class="alert alert-info"> |
| 267 | - <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('password_strength') . ' |
|
| 266 | + <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('password_strength').' |
|
| 268 | 267 | <span id="confirm-password-level" class="ml-2 font-weight-bold"></span></div> |
| 269 | 268 | </div> |
| 270 | 269 | |
@@ -274,20 +273,20 @@ discard block |
||
| 274 | 273 | <div class="input-group-prepend"> |
| 275 | 274 | <span class="input-group-text"><i class="fas fa-key"></i></span> |
| 276 | 275 | </div> |
| 277 | - <input type="password" id="current-user-password" class="form-control" placeholder="' . langHdl('current_password') . '"> |
|
| 276 | + <input type="password" id="current-user-password" class="form-control" placeholder="' . langHdl('current_password').'"> |
|
| 278 | 277 | </div> |
| 279 | 278 | </div> |
| 280 | 279 | <div class="input-group has-feedback mb-2 mt-4"> |
| 281 | 280 | <div class="input-group-prepend"> |
| 282 | 281 | <span class="input-group-text"><i class="fas fa-key"></i></span> |
| 283 | 282 | </div> |
| 284 | - <input type="password" id="new-user-password" class="form-control" placeholder="' . langHdl('index_new_pw') . '"> |
|
| 283 | + <input type="password" id="new-user-password" class="form-control" placeholder="' . langHdl('index_new_pw').'"> |
|
| 285 | 284 | </div> |
| 286 | 285 | <div class="input-group has-feedback mb-2"> |
| 287 | 286 | <div class="input-group-prepend"> |
| 288 | 287 | <span class="input-group-text"><i class="fas fa-key"></i></span> |
| 289 | 288 | </div> |
| 290 | - <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . langHdl('index_change_pw_confirmation') . '"> |
|
| 289 | + <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . langHdl('index_change_pw_confirmation').'"> |
|
| 291 | 290 | </div> |
| 292 | 291 | <div class="row mb-3"> |
| 293 | 292 | <div class="col-md-12 offset-sm-4 text-center"> |
@@ -298,7 +297,7 @@ discard block |
||
| 298 | 297 | </div> |
| 299 | 298 | <div class="row mb-3"> |
| 300 | 299 | <div class="col-12"> |
| 301 | - <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . langHdl('confirm') . '</button> |
|
| 300 | + <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . langHdl('confirm').'</button> |
|
| 302 | 301 | </div> |
| 303 | 302 | </div> |
| 304 | 303 | </div> |
@@ -306,20 +305,20 @@ discard block |
||
| 306 | 305 | |
| 307 | 306 | <div class="card-body hidden" id="card-user-treat-psk"> |
| 308 | 307 | <div class="alert alert-info"> |
| 309 | - <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('user_has_psk_info') . '</div> |
|
| 308 | + <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('user_has_psk_info').'</div> |
|
| 310 | 309 | </div> |
| 311 | 310 | <div class="input-group has-feedback mb-2"> |
| 312 | 311 | <div class="input-group-prepend"> |
| 313 | 312 | <span class="input-group-text"><i class="fas fa-key"></i></span> |
| 314 | 313 | </div> |
| 315 | - <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . langHdl('home_personal_saltkey') . '"> |
|
| 314 | + <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . langHdl('home_personal_saltkey').'"> |
|
| 316 | 315 | </div> |
| 317 | 316 | <div class="row mb-3 mt-4"> |
| 318 | 317 | <div class="col-12"> |
| 319 | - <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . langHdl('launch') . '</button> |
|
| 318 | + <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . langHdl('launch').'</button> |
|
| 320 | 319 | </div> |
| 321 | 320 | <div class="col-12 mt-3"> |
| 322 | - <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . langHdl('i_cannot_remember') . '</button> |
|
| 321 | + <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . langHdl('i_cannot_remember').'</button> |
|
| 323 | 322 | </div> |
| 324 | 323 | </div> |
| 325 | 324 | </div> |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | WHERE code = %s', |
| 77 | 77 | filter_input(INPUT_GET, 'code', FILTER_SANITIZE_FULL_SPECIAL_CHARS) |
| 78 | 78 | ); |
| 79 | - if (DB::count() > 0 && (int) $data['timestamp'] === (int) filter_input(INPUT_GET, 'stamp', FILTER_VALIDATE_INT)) { |
|
| 79 | + if (DB::count() > 0 && (int) $data['timestamp'] === (int) filter_input(INPUT_GET, 'stamp', FILTER_VALIDATE_INT)) { |
|
| 80 | 80 | // otv is too old |
| 81 | 81 | if ($data['time_limit'] < time() || ($data['views'] + 1) > $data['max_views']) { |
| 82 | 82 | $html = 'Link is too old!'; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | <tr><th>URL:</th><td>'.$url.'</td></tr> |
| 180 | 180 | </table></div> |
| 181 | 181 | <p class="mt-3 text-info"><i class="fas fa-info mr-2"></i>Copy carefully the data you need.<br>This page is visible until <b>'. |
| 182 | - date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $dataItem['time_limit']).'</b> OR <b>'.($dataItem['max_views'] - ($dataItem['views']+1)).' more time(s)</b>.</div> |
|
| 182 | + date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $dataItem['time_limit']).'</b> OR <b>'.($dataItem['max_views'] - ($dataItem['views'] + 1)).' more time(s)</b>.</div> |
|
| 183 | 183 | </div>'; |
| 184 | 184 | // log |
| 185 | 185 | logItems( |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | ) { |
| 67 | 67 | // Not allowed page |
| 68 | 68 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 69 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 69 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -130,21 +130,21 @@ discard block |
||
| 130 | 130 | // Prepare variables |
| 131 | 131 | $post_key = filter_var($dataReceived['encryptionKey'], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 132 | 132 | |
| 133 | - require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 133 | + require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 134 | 134 | $return = ''; |
| 135 | 135 | |
| 136 | 136 | //Get all tables |
| 137 | 137 | $tables = array(); |
| 138 | 138 | $result = DB::query('SHOW TABLES'); |
| 139 | 139 | foreach ($result as $row) { |
| 140 | - $tables[] = $row['Tables_in_' . DB_NAME]; |
|
| 140 | + $tables[] = $row['Tables_in_'.DB_NAME]; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | //cycle through |
| 144 | 144 | foreach ($tables as $table) { |
| 145 | 145 | if (empty($pre) || substr_count($table, $pre) > 0) { |
| 146 | 146 | // Do query |
| 147 | - $result = DB::queryRaw('SELECT * FROM ' . $table); |
|
| 147 | + $result = DB::queryRaw('SELECT * FROM '.$table); |
|
| 148 | 148 | DB::queryRaw( |
| 149 | 149 | 'SELECT * |
| 150 | 150 | FROM INFORMATION_SCHEMA.COLUMNS |
@@ -156,19 +156,19 @@ discard block |
||
| 156 | 156 | $numFields = DB::count(); |
| 157 | 157 | |
| 158 | 158 | // prepare a drop table |
| 159 | - $return .= 'DROP TABLE ' . $table . ';'; |
|
| 160 | - $row2 = DB::queryfirstrow('SHOW CREATE TABLE ' . $table); |
|
| 161 | - $return .= "\n\n" . $row2['Create Table'] . ";\n\n"; |
|
| 159 | + $return .= 'DROP TABLE '.$table.';'; |
|
| 160 | + $row2 = DB::queryfirstrow('SHOW CREATE TABLE '.$table); |
|
| 161 | + $return .= "\n\n".$row2['Create Table'].";\n\n"; |
|
| 162 | 162 | |
| 163 | 163 | //prepare all fields and datas |
| 164 | 164 | for ($i = 0; $i < $numFields; ++$i) { |
| 165 | 165 | while ($row = $result->fetch_row()) { |
| 166 | - $return .= 'INSERT INTO ' . $table . ' VALUES('; |
|
| 166 | + $return .= 'INSERT INTO '.$table.' VALUES('; |
|
| 167 | 167 | for ($j = 0; $j < $numFields; ++$j) { |
| 168 | 168 | $row[$j] = is_null($row[$j]) === false ? addslashes($row[$j]) : ''; |
| 169 | 169 | $row[$j] = preg_replace("/\n/", '\\n', $row[$j]); |
| 170 | 170 | if (isset($row[$j])) { |
| 171 | - $return .= '"' . $row[$j] . '"'; |
|
| 171 | + $return .= '"'.$row[$j].'"'; |
|
| 172 | 172 | } else { |
| 173 | 173 | $return .= 'NULL'; |
| 174 | 174 | } |
@@ -188,8 +188,8 @@ discard block |
||
| 188 | 188 | $token = GenerateCryptKey(20, false, true, true, false, true, $SETTINGS); |
| 189 | 189 | |
| 190 | 190 | //save file |
| 191 | - $filename = time() . '-' . $token . '.sql'; |
|
| 192 | - $handle = fopen($SETTINGS['path_to_files_folder'] . '/' . $filename, 'w+'); |
|
| 191 | + $filename = time().'-'.$token.'.sql'; |
|
| 192 | + $handle = fopen($SETTINGS['path_to_files_folder'].'/'.$filename, 'w+'); |
|
| 193 | 193 | if ($handle !== false) { |
| 194 | 194 | //write file |
| 195 | 195 | fwrite($handle, $return); |
@@ -201,17 +201,17 @@ discard block |
||
| 201 | 201 | // Encrypt the file |
| 202 | 202 | prepareFileWithDefuse( |
| 203 | 203 | 'encrypt', |
| 204 | - $SETTINGS['path_to_files_folder'] . '/' . $filename, |
|
| 205 | - $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $filename, |
|
| 204 | + $SETTINGS['path_to_files_folder'].'/'.$filename, |
|
| 205 | + $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$filename, |
|
| 206 | 206 | $SETTINGS, |
| 207 | 207 | $post_key |
| 208 | 208 | ); |
| 209 | 209 | |
| 210 | 210 | // Do clean |
| 211 | - unlink($SETTINGS['path_to_files_folder'] . '/' . $filename); |
|
| 211 | + unlink($SETTINGS['path_to_files_folder'].'/'.$filename); |
|
| 212 | 212 | rename( |
| 213 | - $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $filename, |
|
| 214 | - $SETTINGS['path_to_files_folder'] . '/' . $filename |
|
| 213 | + $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$filename, |
|
| 214 | + $SETTINGS['path_to_files_folder'].'/'.$filename |
|
| 215 | 215 | ); |
| 216 | 216 | } |
| 217 | 217 | |
@@ -231,9 +231,9 @@ discard block |
||
| 231 | 231 | array( |
| 232 | 232 | 'error' => false, |
| 233 | 233 | 'message' => '', |
| 234 | - 'download' => 'sources/downloadFile.php?name=' . urlencode($filename) . |
|
| 235 | - '&sub=files&file=' . $filename . '&type=sql&key=' . $_SESSION['key'] . '&key_tmp=' . |
|
| 236 | - $_SESSION['key_tmp'] . '&pathIsFiles=1', |
|
| 234 | + 'download' => 'sources/downloadFile.php?name='.urlencode($filename). |
|
| 235 | + '&sub=files&file='.$filename.'&type=sql&key='.$_SESSION['key'].'&key_tmp='. |
|
| 236 | + $_SESSION['key_tmp'].'&pathIsFiles=1', |
|
| 237 | 237 | ), |
| 238 | 238 | 'encode' |
| 239 | 239 | ); |
@@ -282,12 +282,12 @@ discard block |
||
| 282 | 282 | $post_key = filter_var($dataReceived['encryptionKey'], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 283 | 283 | $post_backupFile = filter_var($dataReceived['backupFile'], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
| 284 | 284 | |
| 285 | - include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 285 | + include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 286 | 286 | |
| 287 | 287 | // Get filename from database |
| 288 | 288 | $data = DB::queryFirstRow( |
| 289 | 289 | 'SELECT valeur |
| 290 | - FROM ' . prefixTable('misc') . ' |
|
| 290 | + FROM ' . prefixTable('misc').' |
|
| 291 | 291 | WHERE increment_id = %i', |
| 292 | 292 | $post_backupFile |
| 293 | 293 | ); |
@@ -306,8 +306,8 @@ discard block |
||
| 306 | 306 | // Decrypt the file |
| 307 | 307 | $ret = prepareFileWithDefuse( |
| 308 | 308 | 'decrypt', |
| 309 | - $SETTINGS['path_to_files_folder'] . '/' . $post_backupFile, |
|
| 310 | - $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $post_backupFile, |
|
| 309 | + $SETTINGS['path_to_files_folder'].'/'.$post_backupFile, |
|
| 310 | + $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$post_backupFile, |
|
| 311 | 311 | $SETTINGS, |
| 312 | 312 | $post_key |
| 313 | 313 | ); |
@@ -324,10 +324,10 @@ discard block |
||
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | // Do clean |
| 327 | - fileDelete($SETTINGS['path_to_files_folder'] . '/' . $post_backupFile, $SETTINGS); |
|
| 328 | - $post_backupFile = $SETTINGS['path_to_files_folder'] . '/defuse_temp_' . $post_backupFile; |
|
| 327 | + fileDelete($SETTINGS['path_to_files_folder'].'/'.$post_backupFile, $SETTINGS); |
|
| 328 | + $post_backupFile = $SETTINGS['path_to_files_folder'].'/defuse_temp_'.$post_backupFile; |
|
| 329 | 329 | } else { |
| 330 | - $post_backupFile = $SETTINGS['path_to_files_folder'] . '/' . $post_backupFile; |
|
| 330 | + $post_backupFile = $SETTINGS['path_to_files_folder'].'/'.$post_backupFile; |
|
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | //read sql file |