| | |
| | | $new_string = ''; |
| | | |
| | | for($c = 0; $c < mb_strlen($string); $c++) { |
| | | $char = $string{$c}; |
| | | $char = mb_substr($string, $c, 1); |
| | | |
| | | if($in_string === true && $escaped === false && $char === $quote) { |
| | | // this marks a string end (e.g. for concatenation) |
| | |
| | | |
| | | // Export the language file |
| | | if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])) { |
| | | |
| | | //* CSRF Check |
| | | $app->auth->csrf_token_check(); |
| | | |
| | | $lines = file($_FILES['file']['tmp_name']); |
| | | // initial check |
| | | $parts = explode('|', $lines[0]); |
| | |
| | | $app->tpl->setVar('msg', $msg); |
| | | $app->tpl->setVar('error', $error); |
| | | |
| | | //* SET csrf token |
| | | $csrf_token = $app->auth->csrf_token_get('language_import'); |
| | | $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); |
| | | $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); |
| | | |
| | | //* load language file |
| | | $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_import.lng'; |
| | | include $lng_file; |