diff --git a/admin/Masmak/admin_ban.html b/admin/Masmak/admin_ban.html index 54d20df..b6576a2 100755 --- a/admin/Masmak/admin_ban.html +++ b/admin/Masmak/admin_ban.html @@ -2,30 +2,30 @@
-
- {lang.BAN_EXP1} -
- {lang.BAN_EXP2} -
+
+ {lang.BAN_EXP1} +
+ {lang.BAN_EXP2} +

-
- - -
+
+ + +
-
+
- + {H_FORM_KEYS} diff --git a/admin/Masmak/admin_calls.html b/admin/Masmak/admin_calls.html index d3789e9..6d6354b 100755 --- a/admin/Masmak/admin_calls.html +++ b/admin/Masmak/admin_calls.html @@ -1,59 +1,59 @@ -
{lang.MESSAGE_NONE}
+
{lang.MESSAGE_NONE}
-
+
- -
- +
+
+ +
@@ -62,8 +62,8 @@
{H_FORM_KEYS} @@ -71,36 +71,36 @@ - diff --git a/admin/Masmak/admin_check_update.html b/admin/Masmak/admin_check_update.html index f9ded86..0191023 100755 --- a/admin/Masmak/admin_check_update.html +++ b/admin/Masmak/admin_check_update.html @@ -1,8 +1,8 @@
diff --git a/admin/Masmak/admin_configs.html b/admin/Masmak/admin_configs.html index 8266c88..69752e2 100755 --- a/admin/Masmak/admin_configs.html +++ b/admin/Masmak/admin_configs.html @@ -7,9 +7,9 @@
-
- - +
+ +
{H_FORM_KEYS} diff --git a/admin/Masmak/admin_files.html b/admin/Masmak/admin_files.html index 4bd0bb6..6a30df3 100755 --- a/admin/Masmak/admin_files.html +++ b/admin/Masmak/admin_files.html @@ -1,8 +1,8 @@ @@ -14,7 +14,7 @@
- +
{lang.NO_RESULT_USE_SYNC} @@ -72,7 +72,7 @@
- + {page_nums} diff --git a/admin/Masmak/admin_footer.html b/admin/Masmak/admin_footer.html index 1fdca1f..84a81a3 100755 --- a/admin/Masmak/admin_footer.html +++ b/admin/Masmak/admin_footer.html @@ -222,8 +222,8 @@ function uncheckAll_exts(form, id, _do_c_) { function confirm_form(r) - { - var msg = !r ? '{lang.ARE_YOU_SURE_DO_THIS}' : r; + { + var msg = !r ? '{lang.ARE_YOU_SURE_DO_THIS}' : r; return confirm(msg); } diff --git a/admin/Masmak/admin_header.html b/admin/Masmak/admin_header.html index f7e928c..ba4ca41 100755 --- a/admin/Masmak/admin_header.html +++ b/admin/Masmak/admin_header.html @@ -3,46 +3,46 @@ - - - + + + - {lang.KLEEJA_CP} - {config.sitename} + {lang.KLEEJA_CP} - {config.sitename} - - + + - - + + - - + + - - + + - - - + + + - + - - + + - + {extra_admin_header_code} @@ -53,31 +53,31 @@
-
\ No newline at end of file +
\ No newline at end of file diff --git a/admin/Masmak/admin_img.html b/admin/Masmak/admin_img.html index c16366e..95b30c3 100755 --- a/admin/Masmak/admin_img.html +++ b/admin/Masmak/admin_img.html @@ -1,13 +1,13 @@ @@ -20,37 +20,37 @@ -
- {lang.NO_RESULT_USE_SYNC} -
+
+ {lang.NO_RESULT_USE_SYNC} +
-
- -
- - - - -

- -

+
+ +
+ + + + +

+ +

-
-
-
+
+
+
@@ -61,18 +61,18 @@
- + - -
- -
+ +
+ +
@@ -85,12 +85,12 @@ diff --git a/admin/Masmak/admin_login.html b/admin/Masmak/admin_login.html index 8c92db9..bc485c1 100755 --- a/admin/Masmak/admin_login.html +++ b/admin/Masmak/admin_login.html @@ -1,110 +1,110 @@ - {lang.LOGIN} - {lang.KLEEJA_CP} - {config.sitename} - - - - - + {lang.LOGIN} - {lang.KLEEJA_CP} - {config.sitename} + + + + + - + - - - + + + - - + + - + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + .form-signin input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; + } + {extra_header_admin_login}
- - -
-
+ + +
+
{errs} -
-
+
+
- + - - - + + + - + - - + + - +

@@ -119,20 +119,20 @@

- + - + - {H_FORM_KEYS} - + {H_FORM_KEYS} + -
+
- +
diff --git a/admin/Masmak/admin_repair.html b/admin/Masmak/admin_repair.html index 46d9fd0..8f3e718 100755 --- a/admin/Masmak/admin_repair.html +++ b/admin/Masmak/admin_repair.html @@ -1,71 +1,71 @@
-
-
{lang.DEL_CACHE}
- {lang.DELETE} -
+
+
{lang.DEL_CACHE}
+ {lang.DELETE} +

-
-
{lang.ALL_FILES}: {all_files}
-

{lang.WHY_SYNCING}

- {lang.RESYNC} -
+
+
{lang.ALL_FILES}: {all_files}
+

{lang.WHY_SYNCING}

+ {lang.RESYNC} +

-
-
{lang.ALL_IMAGES}: {all_images}
-

{lang.WHY_SYNCING}

- {lang.RESYNC} -
+
+
{lang.ALL_IMAGES}: {all_images}
+

{lang.WHY_SYNCING}

+ {lang.RESYNC} +

-
-
{lang.USERS_ST}: {all_users}
-

{lang.WHY_SYNCING}

- {lang.RESYNC} -
+
+
{lang.USERS_ST}: {all_users}
+

{lang.WHY_SYNCING}

+ {lang.RESYNC} +

-
-
{lang.SIZES_ST}: {all_sizes}
-
+
+
{lang.SIZES_ST}: {all_sizes}
+

-
-
{lang.REPAIR_DB_TABLES}
-

{lang.WHY_SYNCING}

- {lang.SUBMIT} -
+
+
{lang.REPAIR_DB_TABLES}
+

{lang.WHY_SYNCING}

+ {lang.SUBMIT} +

-
-
{lang.ADVICE_CRON_LINK}:
-

- -

-
+
+
{lang.ADVICE_CRON_LINK}:
+

+ +

+
diff --git a/admin/Masmak/admin_reports.html b/admin/Masmak/admin_reports.html index 02b7d5f..fd1edf5 100755 --- a/admin/Masmak/admin_reports.html +++ b/admin/Masmak/admin_reports.html @@ -2,61 +2,61 @@ -
{lang.MESSAGE_NONE}
- +
{lang.MESSAGE_NONE}
+
-
+
- -
- +
+
+ +
@@ -67,8 +67,8 @@
@@ -78,42 +78,42 @@ -
-

-
{lang.DELETE_PROCESS_IN_WORK}
+

+
{lang.DELETE_PROCESS_IN_WORK}
\ No newline at end of file diff --git a/admin/Masmak/admin_search.html b/admin/Masmak/admin_search.html index d421fe0..0105da3 100755 --- a/admin/Masmak/admin_search.html +++ b/admin/Masmak/admin_search.html @@ -19,37 +19,37 @@ function check_search_files_form(form) { do_it = true; } - if(!do_it) - { - alert("{lang.NO_SEARCH_WORD}"); - return false; - } + if(!do_it) + { + alert("{lang.NO_SEARCH_WORD}"); + return false; + } } function check_search_users_form(form) { - var do_it = false; - if(form.username.value != '') { + var do_it = false; + if(form.username.value != '') { do_it = true; }else if(form.username.value != '') { do_it = true; } - if(!do_it) - { - alert("{lang.NO_SEARCH_WORD}"); - return false; - } + if(!do_it) + { + alert("{lang.NO_SEARCH_WORD}"); + return false; + } } - - + +
- @@ -232,68 +232,68 @@ - - + + -
- {lang.USERS_NOT_NORMAL_SYS} -
-
+
+ {lang.USERS_NOT_NORMAL_SYS} +
+
- -
- {GE_INFO} -
+ +
+ {GE_INFO} +

-
+
+ - - - -
{lang.NOTHING}
+ + + +
{lang.NOTHING}
@@ -313,54 +313,54 @@ - - + + -
- {errs} -
+
+ {errs} +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
+
- + {H_FORM_KEYS2} @@ -378,72 +378,72 @@ - - + + - -
- {errs} -
-
+ +
+ {errs} +
+
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
- -
- - -
-
+ +
+ + +
+
@@ -471,39 +471,39 @@ - - + + -
    +
      - -
    • -
      - {{acl_title}} -
      -
      -

      - - + +

    • +
      + {{acl_title}} +
      +
      +

      + + - checked="checked" /> -

      -
      -
    • -
      + checked="checked" /> +

      +
+ + - + -
- +
+ {H_FORM_KEYS5} @@ -522,179 +522,179 @@ - - + + - - {lang.ADD_NEW_EXT} - + + {lang.ADD_NEW_EXT} + -
+
- -
- - -
{lang.EXT_DELETED}
- -
{lang.DATA_CHANGED_NO}
-
-
- - -
{lang.NEW_EXT_ADD}
- -
{lang.DATA_CHANGED_NO}
-
-
-
+ +
+ + +
{lang.EXT_DELETED}
+ +
{lang.DATA_CHANGED_NO}
+
+
+ + +
{lang.NEW_EXT_ADD}
+ +
{lang.DATA_CHANGED_NO}
+
+
+
-
+
- - - - - - - +
#{lang.EXT}{lang.SIZE}{lang.DELETE}
+ + + + + + - - - - - + + + - - + + + - -
#{lang.EXT}{lang.SIZE}{lang.DELETE}
{{ext_name}} -
- - {lang.KILOBYTE} -
+ +
{{ext_name}} +
+ + {lang.KILOBYTE} +
-
- - - -
+ + + +
+ + - + -
+
{H_FORM_KEYS7} -
+
- {lang.E_EXTS} {lang.BCONVERTER} + {lang.E_EXTS} {lang.BCONVERTER}
- - + + + @@ -702,33 +702,33 @@ @@ -742,43 +742,43 @@ - - + +
-
- - -

{group_name}

- - -
-
+
+ + +

{group_name}

+ + +
+
-
- {lang.GROUP_IS_DEFAULT} -
- -
-
- -
-
+
+ {lang.GROUP_IS_DEFAULT} +
+ +
+
+ +
+

@@ -786,11 +786,11 @@
- {{option}} + {{option}} -
+
diff --git a/admin/index.php b/admin/index.php index a4fbe15..3ef94c1 100755 --- a/admin/index.php +++ b/admin/index.php @@ -12,16 +12,16 @@ * @ignore */ define('IN_KLEEJA', true); -define ('PATH', '../'); -define ('IN_ADMIN', true); +define('PATH', '../'); +define('IN_ADMIN', true); require_once PATH . 'includes/common.php'; -$go_to = ig('cp') ? g('cp') : 'start'; -$username = $usrcp->name(); -$AJAX_ACP = defined('AJAX_ACP'); -$config['enable_captcha'] = ! defined('STOP_CAPTCHA'); +$go_to = ig('cp') ? g('cp') : 'start'; +$username = $usrcp->name(); +$AJAX_ACP = defined('AJAX_ACP'); +$config['enable_captcha'] = ! defined('STOP_CAPTCHA'); //for security @@ -40,15 +40,15 @@ get_lang('acp'); if ( (empty($_SESSION['ADMINLOGIN']) || $_SESSION['ADMINLOGIN'] != md5(sha1($config['h_key']) . $usrcp->name() . $config['siteurl'])) || (empty($_SESSION['USER_SESS']) || $_SESSION['USER_SESS'] != session_id()) || - (empty($_SESSION['ADMINLOGIN_T']) || $_SESSION['ADMINLOGIN_T'] < time()) + (empty($_SESSION['ADMINLOGIN_T']) || $_SESSION['ADMINLOGIN_T'] < time()) ) { if (ig('go') && g('go') == 'login') { if (ip('submit')) { //login - $ERRORS = []; - $pass_field = 'lpass_' . preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . p('kid'))); + $ERRORS = []; + $pass_field = 'lpass_' . preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . p('kid'))); if (! empty($_SESSION['SHOW_CAPTCHA'])) @@ -101,7 +101,7 @@ if ( //let's see if there is errors if (sizeof($ERRORS)) { - $errs = ''; + $errs = ''; foreach ($ERRORS as $r) { @@ -112,11 +112,11 @@ if ( } //show template login . - $action = './' . basename(ADMIN_PATH) . '?go=login&cp=' . $go_to; - $H_FORM_KEYS = kleeja_add_form_key('admin_login'); - $KEY_FOR_WEE = sha1(microtime() . sha1($config['h_key'])); - $KEY_FOR_PASS = preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . $KEY_FOR_WEE)); - $not_you = sprintf($lang['USERNAME_NOT_YOU'], '', ''); + $action = './' . basename(ADMIN_PATH) . '?go=login&cp=' . $go_to; + $H_FORM_KEYS = kleeja_add_form_key('admin_login'); + $KEY_FOR_WEE = sha1(microtime() . sha1($config['h_key'])); + $KEY_FOR_PASS = preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . $KEY_FOR_WEE)); + $not_you = sprintf($lang['USERNAME_NOT_YOU'], '', ''); $show_captcha = ! empty($_SESSION['SHOW_CAPTCHA']); @@ -191,25 +191,25 @@ else (! defined('LAST_VISIT')) ? define('LAST_VISIT', time() - 3600 * 12) : null; //last visit -$last_visit = defined('LAST_VISIT') && preg_match('/[0-9]{10}/', LAST_VISIT) ? kleeja_date(LAST_VISIT) : false; +$last_visit = defined('LAST_VISIT') && preg_match('/[0-9]{10}/', LAST_VISIT) ? kleeja_date(LAST_VISIT) : false; // //exceptional //it won't be included in the menu list // -$ext_expt = [ +$ext_expt = [ 'start', 'b_lgoutcp', 'i_exts' ]; //confirm message -$ext_confirm = []; +$ext_confirm = []; //formkey extension, CSRF protection -$GET_FORM_KEY_GLOBAL = kleeja_add_form_key_get('GLOBAL_FORM_KEY'); -$ext_formkey = []; +$GET_FORM_KEY_GLOBAL = kleeja_add_form_key_get('GLOBAL_FORM_KEY'); +$ext_formkey = []; //default icons @@ -286,7 +286,7 @@ if (! $go_to || empty($go_to) || ! in_array($go_to, $adm_extensions)) } //make array for menu -$adm_extensions_menu = $adm_topmenu = []; +$adm_extensions_menu = $adm_topmenu = []; //sort the items as alphabetic ! @@ -305,9 +305,9 @@ $kbubbles = []; //for calls and reports foreach (['call'=>'calls', 'reports'=>'reports'] as $table=>$n) { - $query = [ - 'SELECT' => 'COUNT(' . $table[0] . '.id) AS total_rows', - 'FROM' => "`{$dbprefix}" . $table . '` ' . $table[0] + $query = [ + 'SELECT' => 'COUNT(' . $table[0] . '.id) AS total_rows', + 'FROM' => "`{$dbprefix}" . $table . '` ' . $table[0] ]; $fetched = $SQL->fetch_array($SQL->build($query)); @@ -346,19 +346,19 @@ foreach ($adm_extensions as $m) ++$i; - $adm_extensions_menu[$i] = [ - 'm' => $m, - 'i' => $i+1, - 'i2' => $i+2, - 'icon' => ! empty($ext_icons[$m]) ? $ext_icons[$m] : 'puzzle-piece', + $adm_extensions_menu[$i] = [ + 'm' => $m, + 'i' => $i+1, + 'i2' => $i+2, + 'icon' => ! empty($ext_icons[$m]) ? $ext_icons[$m] : 'puzzle-piece', - 'lang' => ! empty($lang['R_' . strtoupper($m)]) ? $lang['R_' . strtoupper($m)] : (! empty($olang['R_' . strtoupper($m)]) ? $olang['R_' . strtoupper($m)] : strtoupper($m)), - 'link' => './' . basename(ADMIN_PATH) . '?cp=' . ($m == 'configs' ? 'options' : $s) . (@in_array($m, $ext_formkey) ? '&' . $GET_FORM_KEY_GLOBAL : ''), - 'confirm' => (@in_array($m, $ext_confirm)) ? true : false, - 'current' => ($s == $go_to) ? true : false, - 'goto' => str_replace('a_configs', 'options', $s), - 'bubble' => ! emptY($kbubbles[$m]) ? '' : '', - 'counter' => ! emptY($kbubbles[$m]) ? $kbubbles[$m] : '' + 'lang' => ! empty($lang['R_' . strtoupper($m)]) ? $lang['R_' . strtoupper($m)] : (! empty($olang['R_' . strtoupper($m)]) ? $olang['R_' . strtoupper($m)] : strtoupper($m)), + 'link' => './' . basename(ADMIN_PATH) . '?cp=' . ($m == 'configs' ? 'options' : $s) . (@in_array($m, $ext_formkey) ? '&' . $GET_FORM_KEY_GLOBAL : ''), + 'confirm' => (@in_array($m, $ext_confirm)) ? true : false, + 'current' => ($s == $go_to) ? true : false, + 'goto' => str_replace('a_configs', 'options', $s), + 'bubble' => ! emptY($kbubbles[$m]) ? '' : '', + 'counter' => ! emptY($kbubbles[$m]) ? $kbubbles[$m] : '' ]; //add another item to array for title='' in href or other thing diff --git a/do.php b/do.php index 02998a3..c8695bb 100755 --- a/do.php +++ b/do.php @@ -13,7 +13,7 @@ * @ignore */ define('IN_KLEEJA', true); -define ('IN_DOWNLOAD', true); +define('IN_DOWNLOAD', true); require_once 'includes/common.php'; @@ -31,19 +31,19 @@ if (ig('id') || ig('filename')) is_array($plugin_run_result = Plugins::getInstance()->run('begin_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook $query = [ - 'SELECT' => 'f.id, f.real_filename, f.name, f.folder, f.size, f.time, f.uploads, f.type', - 'FROM' => "{$dbprefix}files f", - 'LIMIT' => '1', + 'SELECT' => 'f.id, f.real_filename, f.name, f.folder, f.size, f.time, f.uploads, f.type', + 'FROM' => "{$dbprefix}files f", + 'LIMIT' => '1', ]; //if user system is default, we use users table if ((int) $config['user_system'] == 1) { $query['SELECT'] .= ', u.name AS fusername, u.id AS fuserid'; - $query['JOINS'] = [ + $query['JOINS'] = [ [ - 'LEFT JOIN' => "{$dbprefix}users u", - 'ON' => 'u.id=f.user' + 'LEFT JOIN' => "{$dbprefix}users u", + 'ON' => 'u.id=f.user' ] ]; } @@ -54,21 +54,21 @@ if (ig('id') || ig('filename')) if (ig('x')) { - $query['WHERE'] = "f.name='" . $filename_l . '.' . $SQL->escape(g('x')) . "'"; + $query['WHERE'] = "f.name='" . $filename_l . '.' . $SQL->escape(g('x')) . "'"; } else { - $query['WHERE'] = "f.name='" . $filename_l . "'"; + $query['WHERE'] = "f.name='" . $filename_l . "'"; } } else { - $id_l = g('id', 'int'); - $query['WHERE'] = 'f.id=' . $id_l; + $id_l = g('id', 'int'); + $query['WHERE'] = 'f.id=' . $id_l; } is_array($plugin_run_result = Plugins::getInstance()->run('qr_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $result = $SQL->build($query); + $result = $SQL->build($query); if ($SQL->num_rows($result) != 0) { @@ -86,19 +86,19 @@ if (ig('id') || ig('filename')) $uploads = $file_info['uploads']; - $fname2 = str_replace('.', '-', htmlspecialchars($name)); - $name = $real_filename != '' ? str_replace('.' . $type, '', htmlspecialchars($real_filename)) : $name; - $name = strlen($name) > 70 ? substr($name, 0, 70) . '...' : $name; - $fusername = $config['user_system'] == 1 && $file_info['fuserid'] > -1 ? $file_info['fusername'] : false; - $userfolder = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $file_info['fuserid'] . '.html' : 'ucp.php?go=fileuser&id=' . $file_info['fuserid']); + $fname2 = str_replace('.', '-', htmlspecialchars($name)); + $name = $real_filename != '' ? str_replace('.' . $type, '', htmlspecialchars($real_filename)) : $name; + $name = strlen($name) > 70 ? substr($name, 0, 70) . '...' : $name; + $fusername = $config['user_system'] == 1 && $file_info['fuserid'] > -1 ? $file_info['fusername'] : false; + $userfolder = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $file_info['fuserid'] . '.html' : 'ucp.php?go=fileuser&id=' . $file_info['fuserid']); if (ig('filename')) { - $url_file = $config['mod_writer'] ? $config['siteurl'] . 'downf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downf=' . $fname; + $url_file = $config['mod_writer'] ? $config['siteurl'] . 'downf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downf=' . $fname; } else { - $url_file = $config['mod_writer'] ? $config['siteurl'] . 'down-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?down=' . $file_info['id']; + $url_file = $config['mod_writer'] ? $config['siteurl'] . 'down-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?down=' . $file_info['id']; } if (! empty($config['livexts'])) @@ -109,25 +109,25 @@ if (ig('id') || ig('filename')) { if (ig('filename')) { - $url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downexf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downexf=' . $fname; + $url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downexf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downexf=' . $fname; } else { - $url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downex-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?downex=' . $file_info['id']; + $url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downex-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?downex=' . $file_info['id']; } redirect($url_filex, false); } } - $REPORT = ($config['mod_writer']) ? $config['siteurl'] . 'report-' . $file_info['id'] . '.html' : $config['siteurl'] . 'go.php?go=report&id=' . $file_info['id']; - $seconds_w = user_can('enter_acp') ? 0 : $config['sec_down']; - $time = kleeja_date($time); - $size = readable_size($size); + $REPORT = ($config['mod_writer']) ? $config['siteurl'] . 'report-' . $file_info['id'] . '.html' : $config['siteurl'] . 'go.php?go=report&id=' . $file_info['id']; + $seconds_w = user_can('enter_acp') ? 0 : $config['sec_down']; + $time = kleeja_date($time); + $size = readable_size($size); - $file_ext_icon = file_exists('images/filetypes/' . $type . '.png') ? 'images/filetypes/' . $type . '.png' : 'images/filetypes/file.png'; - $sty = 'download'; - $title = $name . ' - ' . $lang['DOWNLAOD']; + $file_ext_icon = file_exists('images/filetypes/' . $type . '.png') ? 'images/filetypes/' . $type . '.png' : 'images/filetypes/file.png'; + $sty = 'download'; + $title = $name . ' - ' . $lang['DOWNLAOD']; } else { @@ -499,10 +499,10 @@ elseif (ig('down') || ig('downf') || //if(!$is_image && !$is_live && $is_ie8) //{ - // header('X-Download-Options: noopen'); + // header('X-Download-Options: noopen'); //} - //header(($is_ie6 ? 'Expires: -1' : 'Expires: Mon, 26 Jul 1997 05:00:00 GMT')); + //header(($is_ie6 ? 'Expires: -1' : 'Expires: Mon, 26 Jul 1997 05:00:00 GMT')); //(($is_ie8) ? '; authoritative=true; X-Content-Type-Options: nosniff;' : '') diff --git a/go.php b/go.php index b1cb390..b312944 100755 --- a/go.php +++ b/go.php @@ -31,8 +31,8 @@ switch ($current_go_case) case 'exts' : case 'guide' : - $stylee = 'guide'; - $titlee = $lang['GUIDE']; + $stylee = 'guide'; + $titlee = $lang['GUIDE']; $tgroups = $ttgroups = []; $tgroups = array_keys($d_groups); @@ -50,15 +50,15 @@ switch ($current_go_case) foreach ($d_groups[$gid]['exts'] as $ext=>$size) { $ttgroups[] = [ - 'ext' => $ext, - 'size' => readable_size($size), - 'group' => $gid, - 'group_name'=> str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + 'ext' => $ext, + 'size' => readable_size($size), + 'group' => $gid, + 'group_name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$gid]['data']['group_name']), - 'most_firstrow'=> $same_group == 0 ? true : false, - 'firstrow' => $same_group ==0 or $same_group != $gid ? true : false, - 'rando' => $rando, + 'most_firstrow' => $same_group == 0 ? true : false, + 'firstrow' => $same_group ==0 or $same_group != $gid ? true : false, + 'rando' => $rando, ]; $same_group = $gid; } @@ -81,32 +81,32 @@ switch ($current_go_case) } //page info - $stylee = 'report'; - $titlee = $lang['REPORT']; - $id_d = ig('id') ? g('id', 'int') : (ip('rid') ? p('rid', 'int') : 0); - $url_id = (int) $config['mod_writer'] == 1 ? $config['siteurl'] . 'download' . $id_d . '.html' : $config['siteurl'] . 'do.php?id=' . $id_d; - $action = $config['siteurl'] . 'go.php?go=report'; - $H_FORM_KEYS = kleeja_add_form_key('report'); - $NOT_USER = ! $usrcp->name() ? true : false; - $s_url = p('surl'); + $stylee = 'report'; + $titlee = $lang['REPORT']; + $id_d = ig('id') ? g('id', 'int') : (ip('rid') ? p('rid', 'int') : 0); + $url_id = (int) $config['mod_writer'] == 1 ? $config['siteurl'] . 'download' . $id_d . '.html' : $config['siteurl'] . 'do.php?id=' . $id_d; + $action = $config['siteurl'] . 'go.php?go=report'; + $H_FORM_KEYS = kleeja_add_form_key('report'); + $NOT_USER = ! $usrcp->name() ? true : false; + $s_url = p('surl'); //Does this file exists ? if (ig('id') || ip('rid')) { $query = [ - 'SELECT' => 'f.real_filename, f.name', - 'FROM' => "{$dbprefix}files f", - 'WHERE' => 'id=' . $id_d + 'SELECT' => 'f.real_filename, f.name', + 'FROM' => "{$dbprefix}files f", + 'WHERE' => 'id=' . $id_d ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_report_go_id', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $result = $SQL->build($query); + $result = $SQL->build($query); if ($SQL->num_rows($result)) { - $row = $SQL->fetch_array($result); - $filename_for_show = $row['real_filename'] == '' ? $row['name'] : $row['real_filename']; + $row = $SQL->fetch_array($result); + $filename_for_show = $row['real_filename'] == '' ? $row['name'] : $row['real_filename']; } else { @@ -131,7 +131,7 @@ switch ($current_go_case) } else { - $ERRORS = []; + $ERRORS = []; is_array($plugin_run_result = Plugins::getInstance()->run('submit_report_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -143,7 +143,7 @@ switch ($current_go_case) if (! kleeja_check_captcha()) { - $ERRORS['captcha'] = $lang['WRONG_VERTY_CODE']; + $ERRORS['captcha'] = $lang['WRONG_VERTY_CODE']; } if ((empty(p('rname')) && $NOT_USER)) @@ -154,7 +154,7 @@ switch ($current_go_case) if (ip('surl') && trim(p('surl')) == '') { - $ERRORS['surl'] = $lang['EMPTY_FIELDS'] . ' : [ ' . $lang['URL_F_FILE'] . ' ]'; + $ERRORS['surl'] = $lang['EMPTY_FIELDS'] . ' : [ ' . $lang['URL_F_FILE'] . ' ]'; } if (ip('rmail') && ! preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", trim(strtolower(p('rmail')))) && $NOT_USER) @@ -177,19 +177,19 @@ switch ($current_go_case) //no error , lets do process if (empty($ERRORS)) { - $name = $NOT_USER ? (string) $SQL->escape(p('rname')) : $usrcp->name(); - $text = (string) $SQL->escape(p('rtext')); - $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('rmail')))) : $usrcp->mail(); - $url = (string) ip('rid') ? $SQL->escape($url_id) : $SQL->real_escape(p('surl')); - $time = (int) time(); - $rid = ip('rid') ? 0 : p('rid', 'int'); - $ip = get_ip(); + $name = $NOT_USER ? (string) $SQL->escape(p('rname')) : $usrcp->name(); + $text = (string) $SQL->escape(p('rtext')); + $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('rmail')))) : $usrcp->mail(); + $url = (string) ip('rid') ? $SQL->escape($url_id) : $SQL->real_escape(p('surl')); + $time = (int) time(); + $rid = ip('rid') ? 0 : p('rid', 'int'); + $ip = get_ip(); - $insert_query = [ - 'INSERT' => 'name ,mail ,url ,text ,time ,ip', - 'INTO' => "{$dbprefix}reports", - 'VALUES' => "'$name', '$mail', '$url', '$text', $time, '$ip'" + $insert_query = [ + 'INSERT' => 'name ,mail ,url ,text ,time ,ip', + 'INTO' => "{$dbprefix}reports", + 'VALUES' => "'$name', '$mail', '$url', '$text', $time, '$ip'" ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -197,10 +197,10 @@ switch ($current_go_case) $SQL->build($insert_query); //update number of reports - $update_query = [ - 'UPDATE' => "{$dbprefix}files", - 'SET' => 'report=report+1', - 'WHERE' => 'id=' . $rid, + $update_query = [ + 'UPDATE' => "{$dbprefix}files", + 'SET' => 'report=report+1', + 'WHERE' => 'id=' . $rid, ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_file_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -225,9 +225,9 @@ switch ($current_go_case) // case 'rules' : - $stylee = 'rules'; - $titlee = $lang['RULES']; - $contents = strlen($ruless) > 3 ? stripslashes($ruless) : $lang['NO_RULES_NOW']; + $stylee = 'rules'; + $titlee = $lang['RULES']; + $contents = strlen($ruless) > 3 ? stripslashes($ruless) : $lang['NO_RULES_NOW']; is_array($plugin_run_result = Plugins::getInstance()->run('rules_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -246,11 +246,11 @@ switch ($current_go_case) } //page info - $stylee = 'call'; - $titlee = $lang['CALL']; - $action = './go.php?go=call'; - $H_FORM_KEYS = kleeja_add_form_key('call'); - $NOT_USER = ! $usrcp->name() ? true : false; + $stylee = 'call'; + $titlee = $lang['CALL']; + $action = './go.php?go=call'; + $H_FORM_KEYS = kleeja_add_form_key('call'); + $NOT_USER = ! $usrcp->name() ? true : false; //no error yet $ERRORS = false; @@ -264,7 +264,7 @@ switch ($current_go_case) if (ip('submit')) { //after sumit - $ERRORS = []; + $ERRORS = []; is_array($plugin_run_result = Plugins::getInstance()->run('submit_call_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -280,9 +280,9 @@ switch ($current_go_case) $ERRORS['captcha'] = $lang['WRONG_VERTY_CODE']; } - if ((empty(p('cname')) && $NOT_USER) || empty(p('ctext')) ) + if ((empty(p('cname')) && $NOT_USER) || empty(p('ctext'))) { - $ERRORS['cname'] = $lang['EMPTY_FIELDS'] . ' : ' . (empty(p('cname')) && $NOT_USER ? ' [ ' . $lang['YOURNAME'] . ' ] ' : '') + $ERRORS['cname'] = $lang['EMPTY_FIELDS'] . ' : ' . (empty(p('cname')) && $NOT_USER ? ' [ ' . $lang['YOURNAME'] . ' ] ' : '') . (empty(p('ctext')) ? ' [ ' . $lang['TEXT'] . ' ] ': ''); } @@ -306,16 +306,16 @@ switch ($current_go_case) //no errors ,lets do process if (empty($ERRORS)) { - $name = $NOT_USER ? (string) $SQL->escape(p('cname')) : $usrcp->name(); - $text = (string) $SQL->escape(p('ctext')); - $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('cmail')))) : $usrcp->mail(); - $timee = (int) time(); - $ip = get_ip(); + $name = $NOT_USER ? (string) $SQL->escape(p('cname')) : $usrcp->name(); + $text = (string) $SQL->escape(p('ctext')); + $mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('cmail')))) : $usrcp->mail(); + $timee = (int) time(); + $ip = get_ip(); - $insert_query = [ - 'INSERT' => 'name ,text ,mail ,time ,ip', - 'INTO' => "`{$dbprefix}call`", - 'VALUES' => "'$name', '$text', '$mail', $timee, '$ip'" + $insert_query = [ + 'INSERT' => 'name ,text ,mail ,time ,ip', + 'INTO' => "`{$dbprefix}call`", + 'VALUES' => "'$name', '$text', '$mail', $timee, '$ip'" ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_call', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -349,7 +349,7 @@ switch ($current_go_case) //f2b3a82060a22a80283ed961d080b79f //aa92468375a456de21d7ca05ef945212 // - $cd = preg_replace('/[^0-9a-z]/i', '', $SQL->escape(g('cd'))); // may.. will protect + $cd = preg_replace('/[^0-9a-z]/i', '', $SQL->escape(g('cd'))); // may.. will protect if (empty($cd)) { @@ -360,16 +360,16 @@ switch ($current_go_case) //to check if (ig('sure') && g('sure') == 'ok') { - $query = [ - 'SELECT'=> 'f.id, f.name, f.folder, f.size, f.type', - 'FROM' => "{$dbprefix}files f", - 'WHERE' => "f.code_del='" . $cd . "'", - 'LIMIT' => '1', + $query = [ + 'SELECT' => 'f.id, f.name, f.folder, f.size, f.type', + 'FROM' => "{$dbprefix}files f", + 'WHERE' => "f.code_del='" . $cd . "'", + 'LIMIT' => '1', ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $result = $SQL->build($query); + $result = $SQL->build($query); if ($SQL->num_rows($result) != 0) { @@ -384,9 +384,9 @@ switch ($current_go_case) $is_img = in_array($row['type'], ['png','gif','jpg','jpeg','tif','tiff', 'bmp']) ? true : false; - $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => 'id=' . $row['id'] + $query_del = [ + 'DELETE' => "{$dbprefix}files", + 'WHERE' => 'id=' . $row['id'] ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -396,9 +396,9 @@ switch ($current_go_case) if ($SQL->affected()) { //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => ($is_img ? 'imgs=imgs-1':'files=files-1') . ',sizes=sizes-' . $row['size'], + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => ($is_img ? 'imgs=imgs-1':'files=files-1') . ',sizes=sizes-' . $row['size'], ]; $SQL->build($update_query); @@ -419,16 +419,16 @@ switch ($current_go_case) { //fix for IE+ $extra_codes = ''; + function confirm_from() + { + if(confirm(\'' . $lang['ARE_YOU_SURE_DO_THIS'] . '\')){ + window.location = "go.php?go=del&sure=ok&cd=' . $cd . '"; + }else{ + window.location = "index.php"; + } + } + window.onload=confirm_from; + '; kleeja_info($lang['ARE_YOU_SURE_DO_THIS'], '', true, false, 0, $extra_codes); } }//else @@ -456,8 +456,8 @@ switch ($current_go_case) //stats of most online users if (empty($config['most_user_online_ever']) || trim($config['most_user_online_ever']) == '') { - $most_online = 1;// 1 == you - $on_muoe = time(); + $most_online = 1;// 1 == you + $on_muoe = time(); } else { @@ -465,15 +465,15 @@ switch ($current_go_case) } //ok .. go on - $titlee = $lang['STATS']; - $stylee = 'stats'; - $files_st = $stat_files; - $imgs_st = $stat_imgs; - $users_st = $stat_users; - $sizes_st = readable_size($stat_sizes); - $lst_dl_st = (int) $config['del_f_day'] <= 0 ? false : kleeja_date($stat_last_f_del); - $lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user; - $on_muoe = kleeja_date($on_muoe); + $titlee = $lang['STATS']; + $stylee = 'stats'; + $files_st = $stat_files; + $imgs_st = $stat_imgs; + $users_st = $stat_users; + $sizes_st = readable_size($stat_sizes); + $lst_dl_st = (int) $config['del_f_day'] <= 0 ? false : kleeja_date($stat_last_f_del); + $lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user; + $on_muoe = kleeja_date($on_muoe); is_array($plugin_run_result = Plugins::getInstance()->run('stats_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook diff --git a/images/filegroups/index.html b/images/filegroups/index.html index 3b794e0..2dbbcb4 100755 --- a/images/filegroups/index.html +++ b/images/filegroups/index.html @@ -1 +1 @@ -Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file +Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file diff --git a/images/filetypes/index.html b/images/filetypes/index.html index 3b794e0..2dbbcb4 100755 --- a/images/filetypes/index.html +++ b/images/filetypes/index.html @@ -1 +1 @@ -Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file +Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file diff --git a/includes/KleejaUploader.php b/includes/KleejaUploader.php index 76bb55d..2b7936f 100755 --- a/includes/KleejaUploader.php +++ b/includes/KleejaUploader.php @@ -86,8 +86,7 @@ interface KleejaUploader /** * here happens the magic, call this on upload submit - * @param int $uploadType upload from files input or links * @return void */ - public function upload($uploadType); + public function upload(); } diff --git a/includes/adm/a_configs.php b/includes/adm/a_configs.php index 5b0aa4e..b981b05 100755 --- a/includes/adm/a_configs.php +++ b/includes/adm/a_configs.php @@ -15,28 +15,28 @@ if (! defined('IN_ADMIN')) //for style .. -$stylee = 'admin_configs'; -$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); +$stylee = 'admin_configs'; +$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); //words -$action = basename(ADMIN_PATH) . '?cp=options&smt=' . $current_smt; -$n_submit = $lang['UPDATE_CONFIG']; -$options = ''; -//$current_type = ig('type') ? g('type') : 'general'; -$CONFIGEXTEND = false; -$H_FORM_KEYS = kleeja_add_form_key('adm_configs'); +$action = basename(ADMIN_PATH) . '?cp=options&smt=' . $current_smt; +$n_submit = $lang['UPDATE_CONFIG']; +$options = ''; +//$current_type = ig('type') ? g('type') : 'general'; +$CONFIGEXTEND = false; +$H_FORM_KEYS = kleeja_add_form_key('adm_configs'); //secondary menu -$query = [ - 'SELECT' => 'DISTINCT(c.type), c.display_order, p.plg_disabled, c.plg_id', - 'FROM' => "{$dbprefix}config c", - 'JOINS' => [ +$query = [ + 'SELECT' => 'DISTINCT(c.type), c.display_order, p.plg_disabled, c.plg_id', + 'FROM' => "{$dbprefix}config c", + 'JOINS' => [ [ 'LEFT JOIN' => "{$dbprefix}plugins p", 'ON' => 'p.plg_id=c.plg_id' ] ], - 'WHERE' => "c.option <> '' AND c.type <> 'groups'", - 'ORDER BY' => 'c.display_order' + 'WHERE' => "c.option <> '' AND c.type <> 'groups'", + 'ORDER BY' => 'c.display_order' ]; $result = $SQL->build($query); @@ -73,20 +73,20 @@ if (ip('submit')) //general varaibles -//$action = basename(ADMIN_PATH) . '?cp=options&type=' .$current_type; -$STAMP_IMG_URL = file_exists(PATH . 'images/watermark.gif') ? PATH . 'images/watermark.gif' : PATH . 'images/watermark.png'; -$stylfiles = $lngfiles = $authtypes = $time_zones = ''; -$optionss = []; -$n_googleanalytics = 'Google Analytics'; +//$action = basename(ADMIN_PATH) . '?cp=options&type=' .$current_type; +$STAMP_IMG_URL = file_exists(PATH . 'images/watermark.gif') ? PATH . 'images/watermark.gif' : PATH . 'images/watermark.png'; +$stylfiles = $lngfiles = $authtypes = $time_zones = ''; +$optionss = []; +$n_googleanalytics = 'Google Analytics'; -$query = [ - 'SELECT' => '*', - 'FROM' => "{$dbprefix}config", - 'ORDER BY' => 'display_order, type ASC' +$query = [ + 'SELECT' => '*', + 'FROM' => "{$dbprefix}config", + 'ORDER BY' => 'display_order, type ASC' ]; -$CONFIGEXTEND = $SQL->escape($current_smt); -$CONFIGEXTENDLANG = $go_menu[$current_smt]['name']; +$CONFIGEXTEND = $SQL->escape($current_smt); +$CONFIGEXTENDLANG = $go_menu[$current_smt]['name']; if ($current_smt != 'all') { @@ -182,12 +182,12 @@ while ($row=$SQL->fetch_array($result)) if (! empty($row['option'])) { $optionss[$row['name']] = [ - 'option' => '
' . "\n" . + 'option' => '
' . "\n" . '' . "\n" . '
' . (empty($row['option']) ? '' : $tpl->admindisplayoption($row['option'])) . '
' . "\n" . '
' . "\n" . '
', - 'type' => $row['type'], - 'display_order' => $row['display_order'], + 'type' => $row['type'], + 'display_order' => $row['display_order'], ]; } @@ -236,7 +236,7 @@ while ($row=$SQL->fetch_array($result)) { rename(PATH . 'htaccess.txt', PATH . '.htaccess'); - if(! file_exists(PATH . '.htaccess')) + if (! file_exists(PATH . '.htaccess')) { chmod(PATH . '.htaccess', K_FILE_CHMOD); } @@ -262,9 +262,9 @@ while ($row=$SQL->fetch_array($result)) is_array($plugin_run_result = Plugins::getInstance()->run('after_submit_adm_config', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook $update_query = [ - 'UPDATE' => "{$dbprefix}config", - 'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'", - 'WHERE' => "name='" . $row['name'] . "'" + 'UPDATE' => "{$dbprefix}config", + 'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'", + 'WHERE' => "name='" . $row['name'] . "'" ]; if ($current_smt != 'all') @@ -320,13 +320,13 @@ if (ip('submit')) /* if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('foldername')) || empty(p('filesnum'))) { - $text = $lang['EMPTY_FIELDS']; - $stylee = "admin_err"; + $text = $lang['EMPTY_FIELDS']; + $stylee = "admin_err"; } elseif (!is_numeric(p('filesnum')) || !is_numeric(p('sec_down'))) { - $text = $lang['NUMFIELD_S']; - $stylee = "admin_err"; + $text = $lang['NUMFIELD_S']; + $stylee = "admin_err"; } else { diff --git a/includes/adm/c_files.php b/includes/adm/c_files.php index 6c82dd4..0df8db3 100755 --- a/includes/adm/c_files.php +++ b/includes/adm/c_files.php @@ -20,19 +20,19 @@ $files_acp_perpage = defined('ACP_FILES_PER_PAGE') ? ACP_FILES_PER_PAGE : 20; //display -$stylee = 'admin_files'; +$stylee = 'admin_files'; -$url_or = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) . (isset($_REQUEST['order_way']) ? '&order_by=1' : '') : ''; -$url_or2 = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) : ''; -$url_lst = isset($_REQUEST['last_visit']) ? '&last_visit=' . htmlspecialchars($_REQUEST['last_visit']) : ''; -$url_sea = ig('search_id') ? '&search_id=' . g('search_id') : ''; -$url_pg = ig('page') ? '&page=' . g('page', 'int') : ''; -$page_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or . $url_sea . $url_lst; -$ord_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_pg . $url_sea . $url_lst; -$page2_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or2 . $url_sea . $url_lst; -$action = $page_action . $url_pg; -$is_search = $affected = false; -$H_FORM_KEYS = kleeja_add_form_key('adm_files'); +$url_or = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) . (isset($_REQUEST['order_way']) ? '&order_by=1' : '') : ''; +$url_or2 = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) : ''; +$url_lst = isset($_REQUEST['last_visit']) ? '&last_visit=' . htmlspecialchars($_REQUEST['last_visit']) : ''; +$url_sea = ig('search_id') ? '&search_id=' . g('search_id') : ''; +$url_pg = ig('page') ? '&page=' . g('page', 'int') : ''; +$page_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or . $url_sea . $url_lst; +$ord_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_pg . $url_sea . $url_lst; +$page2_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or2 . $url_sea . $url_lst; +$action = $page_action . $url_pg; +$is_search = $affected = false; +$H_FORM_KEYS = kleeja_add_form_key('adm_files'); // // Check form key @@ -64,10 +64,10 @@ if (ip('submit')) //TODO use IN(...) foreach ($del as $key => $id) { - $query = [ - 'SELECT' => 'f.id, f.name, f.folder, f.size, f.type', - 'FROM' => "{$dbprefix}files f", - 'WHERE' => 'f.id = ' . intval($id), + $query = [ + 'SELECT' => 'f.id, f.name, f.folder, f.size, f.type', + 'FROM' => "{$dbprefix}files f", + 'WHERE' => 'f.id = ' . intval($id), ]; $result = $SQL->build($query); @@ -75,11 +75,11 @@ if (ip('submit')) while ($row=$SQL->fetch_array($result)) { //delete from folder .. - @kleeja_unlink (PATH . $row['folder'] . '/' . $row['name']); + @kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); //delete thumb - if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'] )) + if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) { - @kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name'] ); + @kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']); } $is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false; @@ -107,16 +107,16 @@ if (ip('submit')) if (isset($ids) && sizeof($ids)) { $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' + 'DELETE' => "{$dbprefix}files", + 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' ]; $SQL->build($query_del); //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num", ]; $SQL->build($update_query); @@ -131,19 +131,19 @@ if (ip('submit')) //show msg now $text = ($affected && (isset($ids) && sizeof($ids)) ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) . '' . "\n"; - $stylee = 'admin_info'; + $stylee = 'admin_info'; } else { // - //Delete all user files [only one user] + //Delete all user files [only one user] // if (ig('deletefiles')) { - $query = [ - 'SELECT' => 'f.id, f.size, f.name, f.folder', - 'FROM' => "{$dbprefix}files f", + $query = [ + 'SELECT' => 'f.id, f.size, f.name, f.folder', + 'FROM' => "{$dbprefix}files f", ]; //get search filter @@ -168,12 +168,12 @@ else while ($row=$SQL->fetch_array($result)) { //delete from folder .. - @kleeja_unlink (PATH . $row['folder'] . '/' . $row['name']); + @kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); //delete thumb if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) { - @kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name']); + @kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']); } $is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false; @@ -200,9 +200,9 @@ else else { //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num", ]; $SQL->build($update_query); @@ -213,9 +213,9 @@ else } //delete all files in just one query - $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' + $query_del = [ + 'DELETE' => "{$dbprefix}files", + 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' ]; $SQL->build($query_del); @@ -228,19 +228,19 @@ else //begin default files page // - $query = [ - 'SELECT' => 'COUNT(f.id) AS total_files', - 'FROM' => "{$dbprefix}files f", - 'ORDER BY' => 'f.id ' + $query = [ + 'SELECT' => 'COUNT(f.id) AS total_files', + 'FROM' => "{$dbprefix}files f", + 'ORDER BY' => 'f.id ' ]; //if user system is default, we use users table if ((int) $config['user_system'] == 1) { - $query['JOINS'] = [ + $query['JOINS'] = [ [ - 'LEFT JOIN' => "{$dbprefix}users u", - 'ON' => 'u.id=f.user' + 'LEFT JOIN' => "{$dbprefix}users u", + 'ON' => 'u.id=f.user' ] ]; } @@ -251,14 +251,14 @@ else if (ig('search_id')) { //get search filter - $filter = get_filter(g('search_id'), 'file_search', false, 'filter_uid'); - $deletelink = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deletefiles=' . g('search_id'); - $is_search = true; - $query['WHERE'] = build_search_query(unserialize(htmlspecialchars_decode($filter['filter_value']))); + $filter = get_filter(g('search_id'), 'file_search', false, 'filter_uid'); + $deletelink = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deletefiles=' . g('search_id'); + $is_search = true; + $query['WHERE'] = build_search_query(unserialize(htmlspecialchars_decode($filter['filter_value']))); } elseif (isset($_REQUEST['last_visit'])) { - $query['WHERE'] = 'f.time > ' . intval($_REQUEST['last_visit']); + $query['WHERE'] = 'f.time > ' . intval($_REQUEST['last_visit']); } //to-be-deleted @@ -304,9 +304,9 @@ else //pager - $currentPage= ig('page') ? g('page', 'int') : 1; - $Pager = new Pagination($files_acp_perpage, $nums_rows, $currentPage); - $start = $Pager->getStartRow(); + $currentPage = ig('page') ? g('page', 'int') : 1; + $Pager = new Pagination($files_acp_perpage, $nums_rows, $currentPage); + $start = $Pager->getStartRow(); $no_results = false; @@ -315,11 +315,11 @@ else if ($nums_rows > 0) { - $query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : ''); - $query['LIMIT'] = "$start, $files_acp_perpage"; - $result = $SQL->build($query); - $sizes = false; - $num = 0; + $query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : ''); + $query['LIMIT'] = "$start, $files_acp_perpage"; + $result = $SQL->build($query); + $sizes = false; + $num = 0; //if Kleeja integtared we dont want make alot of queries $ids_and_names = []; @@ -352,23 +352,23 @@ else $file_name = $row['real_filename'] == '' ? $row['name'] : $row['real_filename']; //make new lovely arrays !! - $arr[] = [ - 'id' => $row['id'], - 'name' => '' . + $arr[] = [ + 'id' => $row['id'], + 'name' => '' . shorten_text($file_name, 25) . '', - 'fullname' => $file_name, - 'size' => readable_size($row['size']), - 'ups' => $row['uploads'], - 'direct' => $row['id_form'] == 'direct' ? true : false, - 'time_human' => kleeja_date($row['time']), - 'time' => kleeja_date($row['time'], false), - 'type' => $row['type'], - 'typeicon' => file_exists(PATH . 'images/filetypes/' . $row['type'] . '.png') ? PATH . 'images/filetypes/' . $row['type'] . '.png' : PATH . 'images/filetypes/file.png', - 'folder' => $row['folder'], - 'report' => $row['report'] > 4 ? '' . $row['report'] . '':$row['report'], - 'user' => $row['user'] == '-1' ? $lang['GUST'] : '' . $row['username'] . '', - 'ip' => '' . $row['user_ip'] . '', - 'showfilesbyip' => basename(ADMIN_PATH) . '?cp=h_search&s_input=1&s_value=' . $row['user_ip'] + 'fullname' => $file_name, + 'size' => readable_size($row['size']), + 'ups' => $row['uploads'], + 'direct' => $row['id_form'] == 'direct' ? true : false, + 'time_human' => kleeja_date($row['time']), + 'time' => kleeja_date($row['time'], false), + 'type' => $row['type'], + 'typeicon' => file_exists(PATH . 'images/filetypes/' . $row['type'] . '.png') ? PATH . 'images/filetypes/' . $row['type'] . '.png' : PATH . 'images/filetypes/file.png', + 'folder' => $row['folder'], + 'report' => $row['report'] > 4 ? '' . $row['report'] . '':$row['report'], + 'user' => $row['user'] == '-1' ? $lang['GUST'] : '' . $row['username'] . '', + 'ip' => '' . $row['user_ip'] . '', + 'showfilesbyip' => basename(ADMIN_PATH) . '?cp=h_search&s_input=1&s_value=' . $row['user_ip'] ]; is_array($plugin_run_result = Plugins::getInstance()->run('arr_files_admin', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -400,7 +400,7 @@ else //some vars - $total_pages = $Pager->getTotalPages(); - $page_nums = $Pager->print_nums($page_action); - $current_page = $Pager->getCurrentPage(); + $total_pages = $Pager->getTotalPages(); + $page_nums = $Pager->print_nums($page_action); + $current_page = $Pager->getCurrentPage(); } diff --git a/includes/adm/d_img_ctrl.php b/includes/adm/d_img_ctrl.php index 8527881..f385c0e 100755 --- a/includes/adm/d_img_ctrl.php +++ b/includes/adm/d_img_ctrl.php @@ -18,13 +18,13 @@ $images_acp_perpage = defined('ACP_IMAGES_PER_PAGE') ? ACP_IMAGES_PER_PAGE : 20; //display -$stylee = 'admin_img'; -$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '') . +$stylee = 'admin_img'; +$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '') . (ig('last_visit') ? '&last_visit=' . g('last_visit', 'int') : '') . (ig('smt') ? '&smt=' . g('smt') : ''); -$action_search = basename(ADMIN_PATH) . '?cp=h_search'; -$H_FORM_KEYS = kleeja_add_form_key('adm_img_ctrl'); -$is_search = false; +$action_search = basename(ADMIN_PATH) . '?cp=h_search'; +$H_FORM_KEYS = kleeja_add_form_key('adm_img_ctrl'); +$is_search = false; // // Check form key @@ -51,10 +51,10 @@ if (ip('submit')) //TODO better way foreach ($del as $key => $id) { - $query = [ - 'SELECT' => '*', - 'FROM' => "{$dbprefix}files", - 'WHERE' => '`id` = ' . intval($id), + $query = [ + 'SELECT' => '*', + 'FROM' => "{$dbprefix}files", + 'WHERE' => '`id` = ' . intval($id), ]; $result = $SQL->build($query); @@ -64,12 +64,12 @@ if (ip('submit')) //delete from folder .. @kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); //delete thumb - if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'] )) + if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) { - @kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name'] ); + @kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']); } $ids[] = $row['id']; - $num++; + $num++; $sizes += $row['size']; } @@ -84,16 +84,16 @@ if (ip('submit')) if (isset($ids) && sizeof($ids)) { $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' + 'DELETE' => "{$dbprefix}files", + 'WHERE' => '`id` IN (' . implode(',', $ids) . ')' ]; $SQL->build($query_del); //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes, imgs=imgs-$num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes, imgs=imgs-$num", ]; $SQL->build($update_query); @@ -106,27 +106,27 @@ if (ip('submit')) } //after submit - $text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) . + $text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) . '' . "\n"; - $stylee = 'admin_info'; + $stylee = 'admin_info'; } else { - $query = [ - 'SELECT' => 'COUNT(f.id) AS total_files', - 'FROM' => "{$dbprefix}files f", - 'ORDER BY' => 'f.id DESC' + $query = [ + 'SELECT' => 'COUNT(f.id) AS total_files', + 'FROM' => "{$dbprefix}files f", + 'ORDER BY' => 'f.id DESC' ]; //if user system is default, we use users table if ((int) $config['user_system'] == 1) { - $query['JOINS'] = [ + $query['JOINS'] = [ [ - 'LEFT JOIN' => "{$dbprefix}users u", - 'ON' => 'u.id=f.user' + 'LEFT JOIN' => "{$dbprefix}users u", + 'ON' => 'u.id=f.user' ] ]; } @@ -136,7 +136,7 @@ else // // There is a bug with IN statement in MySQL and they said it will solved at 6.0 version // forums.mysql.com/read.php?10,243691,243888#msg-243888 - // $query['WHERE'] = "f.type IN ('" . implode("', '", $img_types) . "')"; + // $query['WHERE'] = "f.type IN ('" . implode("', '", $img_types) . "')"; // $query['WHERE'] = "(f.type = '" . implode("' OR f.type = '", $img_types) . "')"; @@ -146,7 +146,7 @@ else if (ig('last_visit')) { - $query['WHERE'] .= ' AND f.time > ' . g('last_visit', 'int'); + $query['WHERE'] .= ' AND f.time > ' . g('last_visit', 'int'); } else { @@ -172,18 +172,18 @@ else } //pager - $currentPage= ig('page') ? g('page', 'int') : 1; - $Pager = new Pagination($images_acp_perpage, $nums_rows, $currentPage); - $start = $Pager->getStartRow(); + $currentPage = ig('page') ? g('page', 'int') : 1; + $Pager = new Pagination($images_acp_perpage, $nums_rows, $currentPage); + $start = $Pager->getStartRow(); $no_results = $affected = $sizes = false; if ($nums_rows > 0) { - $query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : ''); - $query['LIMIT'] = "$start, $images_acp_perpage"; - $result = $SQL->build($query); + $query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : ''); + $query['LIMIT'] = "$start, $images_acp_perpage"; + $result = $SQL->build($query); $tdnum = $num = 0; //if Kleeja integrated we dont want make alot of queries @@ -216,19 +216,19 @@ else //make new lovely arrays !! - $arr[] = [ - 'id' => $row['id'], - 'tdnum' => $tdnum == 0 ? '
    ': '', - 'tdnum2' => $tdnum == 4 ? '
' : '', - 'name' => shorten_text($file_name, 25), - 'ip' => htmlspecialchars($row['user_ip']), - 'href' => $url, - 'size' => readable_size($row['size']), - 'ups' => $row['uploads'], - 'time' => date('d-m-Y h:i a', $row['time']), - 'user' => (int) $row['user'] == -1 ? $lang['GUST'] : $row['username'], - 'is_user' => (int) $row['user'] == -1 ? 0 : 1, - 'thumb_link'=> $url_thumb + $arr[] = [ + 'id' => $row['id'], + 'tdnum' => $tdnum == 0 ? '
    ': '', + 'tdnum2' => $tdnum == 4 ? '
' : '', + 'name' => shorten_text($file_name, 25), + 'ip' => htmlspecialchars($row['user_ip']), + 'href' => $url, + 'size' => readable_size($row['size']), + 'ups' => $row['uploads'], + 'time' => date('d-m-Y h:i a', $row['time']), + 'user' => (int) $row['user'] == -1 ? $lang['GUST'] : $row['username'], + 'is_user' => (int) $row['user'] == -1 ? 0 : 1, + 'thumb_link' => $url_thumb ]; //fix ... @@ -260,9 +260,9 @@ else } //pages - $total_pages = $Pager->getTotalPages(); - $page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . + $total_pages = $Pager->getTotalPages(); + $page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('last_visit') ? '&last_vists=' . g('last_visit', 'int') : '') . (ig('smt') ? '&smt=' . g('smt') : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"'); - $current_page = $Pager->getCurrentPage(); + $current_page = $Pager->getCurrentPage(); } diff --git a/includes/adm/e_calls.php b/includes/adm/e_calls.php index 232bee8..bc03d6f 100755 --- a/includes/adm/e_calls.php +++ b/includes/adm/e_calls.php @@ -15,12 +15,12 @@ if (! defined('IN_ADMIN')) //for style .. -$stylee = 'admin_calls'; -$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); -$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt; -$msg_sent = ig('sent') ? g('sent', 'int') : false; -$H_FORM_KEYS = kleeja_add_form_key('adm_calls'); -$there_queue = preg_match('!:del_[a-z0-9]{0,3}calls:!i', $config['queue']); +$stylee = 'admin_calls'; +$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); +$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt; +$msg_sent = ig('sent') ? g('sent', 'int') : false; +$H_FORM_KEYS = kleeja_add_form_key('adm_calls'); +$there_queue = preg_match('!:del_[a-z0-9]{0,3}calls:!i', $config['queue']); // // Check form key @@ -49,10 +49,10 @@ if ($current_smt == 'del_d30' || $current_smt == 'del_all') } -$query = [ - 'SELECT' => 'c.*', - 'FROM' => "`{$dbprefix}call` c", - 'ORDER BY' => 'c.id DESC' +$query = [ + 'SELECT' => 'c.*', + 'FROM' => "`{$dbprefix}call` c", + 'ORDER BY' => 'c.id DESC' ]; @@ -64,10 +64,10 @@ if ($current_smt == 'show_h24') $result = $SQL->build($query); //pagination -$nums_rows = $SQL->num_rows($result); -$currentPage = ig('page') ? g('page', 'int') : 1; -$Pager = new Pagination($perpage, $nums_rows, $currentPage); -$start = $Pager->getStartRow(); +$nums_rows = $SQL->num_rows($result); +$currentPage = ig('page') ? g('page', 'int') : 1; +$Pager = new Pagination($perpage, $nums_rows, $currentPage); +$start = $Pager->getStartRow(); $no_results = false; @@ -75,22 +75,22 @@ $del_nums = []; if ($nums_rows > 0) { - $query['LIMIT'] = "$start,$perpage"; - $result = $SQL->build($query); + $query['LIMIT'] = "$start,$perpage"; + $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { //make new lovely arrays !! - $arr[] = [ - 'id' => $row['id'], - 'name' => $row['name'], - 'mail' => $row['mail'], - 'text' => htmlspecialchars($row['text']), - 'human_time'=> kleeja_date($row['time']), - 'time' => kleeja_date($row['time'], false), - 'ip' => $row['ip'], - 'sent' => $row['id'] == $msg_sent, - 'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['ip'] . '&do_search=Search' + $arr[] = [ + 'id' => $row['id'], + 'name' => $row['name'], + 'mail' => $row['mail'], + 'text' => htmlspecialchars($row['text']), + 'human_time' => kleeja_date($row['time']), + 'time' => kleeja_date($row['time'], false), + 'ip' => $row['ip'], + 'sent' => $row['id'] == $msg_sent, + 'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['ip'] . '&do_search=Search' ]; $del[$row['id']] = p('del_' . $row['id']); @@ -141,22 +141,22 @@ else //if deleted if (sizeof($del_nums)) { - $query_del = [ - 'DELETE' => "`{$dbprefix}call`", - 'WHERE' => "id IN('" . implode("', '", $del_nums) . "')" + $query_del = [ + 'DELETE' => "`{$dbprefix}call`", + 'WHERE' => "id IN('" . implode("', '", $del_nums) . "')" ]; $SQL->build($query_del); } -$total_pages = $Pager->getTotalPages(); -$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"'); +$total_pages = $Pager->getTotalPages(); +$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"'); //after submit if (ip('submit')) { - $text = ($SQL->affected() ? $lang['CALLS_UPDATED'] : $lang['NO_UP_CHANGE_S']); - $text .= '' . "\n"; + $text = ($SQL->affected() ? $lang['CALLS_UPDATED'] : $lang['NO_UP_CHANGE_S']); + $text .= '' . "\n"; kleeja_admin_info($text, true, '', true, $action); } diff --git a/includes/adm/f_reports.php b/includes/adm/f_reports.php index 2b16621..328de7a 100755 --- a/includes/adm/f_reports.php +++ b/includes/adm/f_reports.php @@ -14,12 +14,12 @@ if (! defined('IN_ADMIN')) } //for style .. -$stylee = 'admin_reports'; -$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); -$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt; -$msg_sent = ig('sent') ? g('sent', 'int') : false; -$H_FORM_KEYS = kleeja_add_form_key('adm_reports'); -$there_queue = preg_match('!:del_[a-z0-9]{0,3}reports:!i', $config['queue']); +$stylee = 'admin_reports'; +$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); +$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt; +$msg_sent = ig('sent') ? g('sent', 'int') : false; +$H_FORM_KEYS = kleeja_add_form_key('adm_reports'); +$there_queue = preg_match('!:del_[a-z0-9]{0,3}reports:!i', $config['queue']); // @@ -49,9 +49,9 @@ if ($current_smt == 'del_d30' || $current_smt == 'del_all') } $query = [ - 'SELECT' => '*', - 'FROM' => "{$dbprefix}reports r", - 'ORDER BY' => 'r.id DESC' + 'SELECT' => '*', + 'FROM' => "{$dbprefix}reports r", + 'ORDER BY' => 'r.id DESC' ]; if ($current_smt == 'show_h24') @@ -63,34 +63,34 @@ if ($current_smt == 'show_h24') $result = $SQL->build($query); //pagination -$nums_rows = $SQL->num_rows($result); -$currentPage = ig('page') ? g('page', 'int') : 1; -$Pager = new Pagination($perpage, $nums_rows, $currentPage); -$start = $Pager->getStartRow(); +$nums_rows = $SQL->num_rows($result); +$currentPage = ig('page') ? g('page', 'int') : 1; +$Pager = new Pagination($perpage, $nums_rows, $currentPage); +$start = $Pager->getStartRow(); -$no_results = false; -$del_nums = []; +$no_results = false; +$del_nums = []; if ($nums_rows > 0) { - $query['LIMIT'] = "$start, $perpage"; - $result = $SQL->build($query); + $query['LIMIT'] = "$start, $perpage"; + $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { //make new lovely arrays !! - $arr[] = [ - 'id' => $row['id'], - 'name' => $row['name'], - 'mail' => $row['mail'], - 'url' => $row['url'], - 'text' => $row['text'], - 'human_time'=> kleeja_date($row['time']), - 'time' => kleeja_date($row['time'], false), - 'ip' => $row['ip'], - 'sent' => $row['id'] == $msg_sent, - 'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . htmlspecialchars($row['ip']) . '&do_search=Search' + $arr[] = [ + 'id' => $row['id'], + 'name' => $row['name'], + 'mail' => $row['mail'], + 'url' => $row['url'], + 'text' => $row['text'], + 'human_time' => kleeja_date($row['time']), + 'time' => kleeja_date($row['time'], false), + 'ip' => $row['ip'], + 'sent' => $row['id'] == $msg_sent, + 'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . htmlspecialchars($row['ip']) . '&do_search=Search' ]; $del[$row['id']] = p('del_' . $row['id']); @@ -140,22 +140,22 @@ else //if deleted if (sizeof($del_nums)) { - $query_del = [ - 'DELETE' => "{$dbprefix}reports", - 'WHERE' => "id IN('" . implode("', '", $del_nums) . "')" + $query_del = [ + 'DELETE' => "{$dbprefix}reports", + 'WHERE' => "id IN('" . implode("', '", $del_nums) . "')" ]; $SQL->build($query_del); } -$total_pages = $Pager->getTotalPages(); -$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"'); +$total_pages = $Pager->getTotalPages(); +$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"'); //after submit if (ip('submit')) { - $text = ($SQL->affected() ? $lang['REPORTS_UPDATED'] : $lang['NO_UP_CHANGE_S']); - $text .= '' . "\n"; + $text = ($SQL->affected() ? $lang['REPORTS_UPDATED'] : $lang['NO_UP_CHANGE_S']); + $text .= '' . "\n"; kleeja_admin_info($text, true, '', true, $action); } diff --git a/includes/adm/g_users.php b/includes/adm/g_users.php index af9c03c..c2b2def 100755 --- a/includes/adm/g_users.php +++ b/includes/adm/g_users.php @@ -15,28 +15,28 @@ if (! defined('IN_ADMIN')) //for style .. -$stylee = 'admin_users'; -$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); +$stylee = 'admin_users'; +$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general')); -$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : ''); -$action .= (ig('search_id') ? '&search_id=' . g('search') : ''); -$action .= (ig('qg') ? '&qg=' . g('qg', 'int') : '') . '&smt=' . $current_smt; -$action_all = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt . (ig('page') ? '&page=' . g('page', 'int') : ''); +$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : ''); +$action .= (ig('search_id') ? '&search_id=' . g('search') : ''); +$action .= (ig('qg') ? '&qg=' . g('qg', 'int') : '') . '&smt=' . $current_smt; +$action_all = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt . (ig('page') ? '&page=' . g('page', 'int') : ''); $cp_users_url = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'); //if not normal user system -$user_not_normal = (int) $config['user_system'] != 1 ? true : false; -$is_search = $affected = false; -$GET_FORM_KEY = kleeja_add_form_key_get('adm_users'); -$H_FORM_KEYS = kleeja_add_form_key('adm_users'); -$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser'); -$H_FORM_KEYS3 = kleeja_add_form_key('adm_users_newgroup'); -$H_FORM_KEYS4 = kleeja_add_form_key('adm_users_delgroup'); -$H_FORM_KEYS5 = kleeja_add_form_key('adm_users_editacl'); -$H_FORM_KEYS6 = kleeja_add_form_key('adm_users_editdata'); -$H_FORM_KEYS7 = kleeja_add_form_key('adm_users_editexts'); -$H_FORM_KEYS8 = kleeja_add_form_key('adm_users_edituser'); +$user_not_normal = (int) $config['user_system'] != 1 ? true : false; +$is_search = $affected = false; +$GET_FORM_KEY = kleeja_add_form_key_get('adm_users'); +$H_FORM_KEYS = kleeja_add_form_key('adm_users'); +$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser'); +$H_FORM_KEYS3 = kleeja_add_form_key('adm_users_newgroup'); +$H_FORM_KEYS4 = kleeja_add_form_key('adm_users_delgroup'); +$H_FORM_KEYS5 = kleeja_add_form_key('adm_users_editacl'); +$H_FORM_KEYS6 = kleeja_add_form_key('adm_users_editdata'); +$H_FORM_KEYS7 = kleeja_add_form_key('adm_users_editexts'); +$H_FORM_KEYS8 = kleeja_add_form_key('adm_users_edituser'); // // Check form key @@ -124,9 +124,9 @@ if (ig('deleteuserfile')) } $query = [ - 'SELECT' => 'size, name, folder', - 'FROM' => "{$dbprefix}files", - 'WHERE' => 'user=' . g('deleteuserfile', 'int'), + 'SELECT' => 'size, name, folder', + 'FROM' => "{$dbprefix}files", + 'WHERE' => 'user=' . g('deleteuserfile', 'int'), ]; $result = $SQL->build($query); @@ -135,11 +135,11 @@ if (ig('deleteuserfile')) while ($row=$SQL->fetch_array($result)) { //delete from folder .. - kleeja_unlink (PATH . $row['folder'] . '/' . $row['name']); + kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); //delete thumb if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) { - kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name']); + kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']); } $num++; @@ -155,9 +155,9 @@ if (ig('deleteuserfile')) else { //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes, files=files-$num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes, files=files-$num", ]; $SQL->build($update_query); @@ -168,9 +168,9 @@ if (ig('deleteuserfile')) } //delete all files in just one query - $d_query = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => 'user=' . g('deleteuserfile', 'int'), + $d_query = [ + 'DELETE' => "{$dbprefix}files", + 'WHERE' => 'user=' . g('deleteuserfile', 'int'), ]; $SQL->build($d_query); @@ -196,9 +196,9 @@ if (ig('del_user')) } //delete all files in just one query - $d_query = [ - 'DELETE' => "{$dbprefix}users", - 'WHERE' => 'id=' . g('del_user', 'int'), + $d_query = [ + 'DELETE' => "{$dbprefix}users", + 'WHERE' => 'id=' . g('del_user', 'int'), ]; $SQL->build($d_query); @@ -236,17 +236,17 @@ elseif (ip('newuser')) //no errors, lets do process if (empty($ERRORS)) { - $name = (string) $SQL->escape(trim(p('lname'))); - $user_salt = (string) substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); - $pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt); - $mail = (string) trim(strtolower(p('lmail'))); - $clean_name = (string) $usrcp->cleanusername($name); - $group = (int) p('lgroup'); + $name = (string) $SQL->escape(trim(p('lname'))); + $user_salt = (string) substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); + $pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt); + $mail = (string) trim(strtolower(p('lmail'))); + $clean_name = (string) $usrcp->cleanusername($name); + $group = (int) p('lgroup'); - $insert_query = [ - 'INSERT' => 'name ,password, password_salt ,group_id, mail,founder, session_id, clean_name', - 'INTO' => "{$dbprefix}users", - 'VALUES' => "'$name', '$pass', '$user_salt', $group , '$mail', 0 , '', '$clean_name'" + $insert_query = [ + 'INSERT' => 'name ,password, password_salt ,group_id, mail,founder, session_id, clean_name', + 'INTO' => "{$dbprefix}users", + 'VALUES' => "'$name', '$pass', '$user_salt', $group , '$mail', 0 , '', '$clean_name'" ]; if ($SQL->build($insert_query)) @@ -254,9 +254,9 @@ elseif (ip('newuser')) $last_user_id = $SQL->insert_id(); //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "users=users+1, lastuser='$name'", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "users=users+1, lastuser='$name'", ]; $SQL->build($update_query); @@ -272,7 +272,7 @@ elseif (ip('newuser')) } else { - $errs = ''; + $errs = ''; foreach ($ERRORS as $r) { @@ -299,9 +299,9 @@ if (ip('edituser')) } $query = [ - 'SELECT' => 'name, mail, clean_name, group_id, founder, show_my_filecp', - 'FROM' => "{$dbprefix}users", - 'WHERE' => 'id=' . $userid, + 'SELECT' => 'name, mail, clean_name, group_id, founder, show_my_filecp', + 'FROM' => "{$dbprefix}users", + 'WHERE' => 'id=' . $userid, ]; $result = $SQL->build($query); @@ -349,22 +349,22 @@ if (ip('edituser')) } elseif (trim(p('l_pass')) != '') { - $user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); - $pass = "password = '" . $usrcp->kleeja_hash_password(trim(p('l_pass')) . $user_salt) . "', password_salt='" . $user_salt . "',"; + $user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); + $pass = "password = '" . $usrcp->kleeja_hash_password(trim(p('l_pass')) . $user_salt) . "', password_salt='" . $user_salt . "',"; } //no errors, lets do process if (empty($ERRORS)) { - $update_query = [ - 'UPDATE' => "{$dbprefix}users", - 'SET' => ($new_name ? "name = '" . $SQL->escape(p('l_name')) . "', clean_name='" . $SQL->escape($new_clean_name) . "', " : '') . + $update_query = [ + 'UPDATE' => "{$dbprefix}users", + 'SET' => ($new_name ? "name = '" . $SQL->escape(p('l_name')) . "', clean_name='" . $SQL->escape($new_clean_name) . "', " : '') . ($new_mail ? "mail = '" . $SQL->escape(p('l_mail')) . "'," : '') . $pass . (ip('l_founder') ? 'founder=' . p('l_founder', 'int') . ',' : '') . 'group_id=' . p('l_group', 'int') . ',' . 'show_my_filecp=' . p('l_show_filecp', 'int'), - 'WHERE' => 'id=' . $userid + 'WHERE' => 'id=' . $userid ]; $SQL->build($update_query); @@ -380,7 +380,7 @@ if (ip('edituser')) } else { - $errs = ''; + $errs = ''; foreach ($ERRORS as $r) { @@ -421,10 +421,10 @@ if (ip('newgroup')) if (empty($ERRORS)) { //Insert the group .. - $insert_query = [ - 'INSERT' => 'group_name', - 'INTO' => "{$dbprefix}groups", - 'VALUES' => "'" . trim($SQL->escape(p('gname'))) . "'" + $insert_query = [ + 'INSERT' => 'group_name', + 'INTO' => "{$dbprefix}groups", + 'VALUES' => "'" . trim($SQL->escape(p('gname'))) . "'" ]; $SQL->build($insert_query); @@ -444,19 +444,19 @@ if (ip('newgroup')) //copy acls from the other group to this group $query = [ - 'SELECT' => 'acl_name, acl_can', - 'FROM' => "{$dbprefix}groups_acl", - 'WHERE' => 'group_id=' . $org_group_id, - 'ORDER BY' => 'acl_name ASC' + 'SELECT' => 'acl_name, acl_can', + 'FROM' => "{$dbprefix}groups_acl", + 'WHERE' => 'group_id=' . $org_group_id, + 'ORDER BY' => 'acl_name ASC' ]; $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { - $insert_query = [ - 'INSERT' => 'acl_name, acl_can, group_id', - 'INTO' => "{$dbprefix}groups_acl", - 'VALUES' => "'" . $row['acl_name'] . "', " . $row['acl_can'] . ', ' . $new_group_id + $insert_query = [ + 'INSERT' => 'acl_name, acl_can, group_id', + 'INTO' => "{$dbprefix}groups_acl", + 'VALUES' => "'" . $row['acl_name'] . "', " . $row['acl_can'] . ', ' . $new_group_id ]; $SQL->build($insert_query); } @@ -464,19 +464,19 @@ if (ip('newgroup')) //copy configs from the other group to this group $query = [ - 'SELECT' => 'd.name, d.value', - 'FROM' => "{$dbprefix}groups_data d", - 'WHERE' => 'd.group_id=' . $org_group_id, - 'ORDER BY' => 'd.name ASC' + 'SELECT' => 'd.name, d.value', + 'FROM' => "{$dbprefix}groups_data d", + 'WHERE' => 'd.group_id=' . $org_group_id, + 'ORDER BY' => 'd.name ASC' ]; $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { - $insert_query = [ - 'INSERT' => 'name, value, group_id', - 'INTO' => "{$dbprefix}groups_data", - 'VALUES' => "'" . $row['name'] . "', '" . $SQL->escape($row['value']) . "', " . $new_group_id + $insert_query = [ + 'INSERT' => 'name, value, group_id', + 'INTO' => "{$dbprefix}groups_data", + 'VALUES' => "'" . $row['name'] . "', '" . $SQL->escape($row['value']) . "', " . $new_group_id ]; $SQL->build($insert_query); } @@ -484,19 +484,19 @@ if (ip('newgroup')) //copy exts from the other group to this group $query = [ - 'SELECT' => 'e.ext, e.size', - 'FROM' => "{$dbprefix}groups_exts e", - 'WHERE' => 'e.group_id=' . $org_group_id, - 'ORDER BY' => 'e.ext_id ASC' + 'SELECT' => 'e.ext, e.size', + 'FROM' => "{$dbprefix}groups_exts e", + 'WHERE' => 'e.group_id=' . $org_group_id, + 'ORDER BY' => 'e.ext_id ASC' ]; $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { - $insert_query = [ - 'INSERT' => 'ext, size, group_id', - 'INTO' => "{$dbprefix}groups_exts", - 'VALUES' => "'" . $row['ext'] . "', " . $row['size'] . ', ' . $new_group_id + $insert_query = [ + 'INSERT' => 'ext, size, group_id', + 'INTO' => "{$dbprefix}groups_exts", + 'VALUES' => "'" . $row['ext'] . "', " . $row['size'] . ', ' . $new_group_id ]; $SQL->build($insert_query); } @@ -508,7 +508,7 @@ if (ip('newgroup')) } else { - $errs = ''; + $errs = ''; foreach ($ERRORS as $r) { @@ -552,47 +552,47 @@ if (ip('delgroup')) } //delete the exts - $query_del = [ - 'DELETE' => "{$dbprefix}groups_exts", - 'WHERE' => 'group_id=' . $from_group + $query_del = [ + 'DELETE' => "{$dbprefix}groups_exts", + 'WHERE' => 'group_id=' . $from_group ]; $SQL->build($query_del); //then, delete the configs - $query_del = [ - 'DELETE' => "{$dbprefix}groups_data", - 'WHERE' => 'group_id=' . $from_group + $query_del = [ + 'DELETE' => "{$dbprefix}groups_data", + 'WHERE' => 'group_id=' . $from_group ]; $SQL->build($query_del); //then, delete acls - $query_del = [ - 'DELETE' => "{$dbprefix}groups_acl", - 'WHERE' => 'group_id=' . $from_group + $query_del = [ + 'DELETE' => "{$dbprefix}groups_acl", + 'WHERE' => 'group_id=' . $from_group ]; $SQL->build($query_del); //then, delete the group itself - $query_del = [ - 'DELETE' => "{$dbprefix}groups", - 'WHERE' => 'group_id=' . $from_group + $query_del = [ + 'DELETE' => "{$dbprefix}groups", + 'WHERE' => 'group_id=' . $from_group ]; $SQL->build($query_del); //then, move users to the dest. group $update_query = [ - 'UPDATE' => "{$dbprefix}users", - 'SET' => 'group_id=' . $to_group, - 'WHERE' => 'group_id=' . $from_group + 'UPDATE' => "{$dbprefix}users", + 'SET' => 'group_id=' . $to_group, + 'WHERE' => 'group_id=' . $from_group ]; $SQL->build($update_query); //get those groups name - $group_name_from = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + $group_name_from = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$from_group]['data']['group_name']); - $group_name_to =str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + $group_name_to =str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$to_group]['data']['group_name']); @@ -611,19 +611,19 @@ switch ($current_smt): case 'general': $query = [ - 'SELECT' => 'COUNT(group_id) AS total_groups', - 'FROM' => "{$dbprefix}groups", - 'ORDER BY' => 'group_id ASC' + 'SELECT' => 'COUNT(group_id) AS total_groups', + 'FROM' => "{$dbprefix}groups", + 'ORDER BY' => 'group_id ASC' ]; $result = $SQL->build($query); - $nums_rows = 0; - $n_fetch = $SQL->fetch_array($result); - $nums_rows = $n_fetch['total_groups']; - $no_results = false; - $e_groups = $c_groups = []; - $l_groups = []; + $nums_rows = 0; + $n_fetch = $SQL->fetch_array($result); + $nums_rows = $n_fetch['total_groups']; + $no_results = false; + $e_groups = $c_groups = []; + $l_groups = []; $groups_background_color = [ 1 => ['background' => 'dark', 'icon' => ' fa-star'], @@ -635,21 +635,21 @@ case 'general': if ($nums_rows > 0) { - $query['SELECT'] = 'group_id, group_name, group_is_default, group_is_essential'; + $query['SELECT'] = 'group_id, group_name, group_is_default, group_is_essential'; $result = $SQL->build($query); while ($row=$SQL->fetch_array($result)) { $r = [ - 'id' => $row['group_id'], - 'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + 'id' => $row['group_id'], + 'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $row['group_name']), 'style' => ! empty($groups_background_color[$row['group_id']]) ? $groups_background_color[$row['group_id']] : ['background' => 'secondary', 'icon' => ''], - 'is_default' => (int) $row['group_is_default'] ? true : false + 'is_default' => (int) $row['group_is_default'] ? true : false ]; if ((int) $row['group_is_essential'] == 1) @@ -681,15 +681,15 @@ case 'group_acl': kleeja_admin_err('ERROR-NO-ID', true, '', true, basename(ADMIN_PATH) . '?cp=g_users'); } - $group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + $group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$req_group]['data']['group_name']); $query = [ - 'SELECT' => 'acl_name, acl_can', - 'FROM' => "{$dbprefix}groups_acl", - 'WHERE' => 'group_id=' . $req_group, - 'ORDER BY' => 'acl_name ASC' + 'SELECT' => 'acl_name, acl_can', + 'FROM' => "{$dbprefix}groups_acl", + 'WHERE' => 'group_id=' . $req_group, + 'ORDER BY' => 'acl_name ASC' ]; $result = $SQL->build($query); @@ -716,9 +716,9 @@ case 'group_acl': } $acls[] = [ - 'acl_title' => ! empty( $lang['ACLS_' . strtoupper($row['acl_name'])] ) ? $lang['ACLS_' . strtoupper($row['acl_name'])] : $olang['ACLS_' . strtoupper($row['acl_name'])], - 'acl_name' => $row['acl_name'], - 'acl_can' => (int) $row['acl_can'] + 'acl_title' => ! empty($lang['ACLS_' . strtoupper($row['acl_name'])]) ? $lang['ACLS_' . strtoupper($row['acl_name'])] : $olang['ACLS_' . strtoupper($row['acl_name'])], + 'acl_name' => $row['acl_name'], + 'acl_can' => (int) $row['acl_can'] ]; } $SQL->freeresult($result); @@ -730,9 +730,9 @@ case 'group_acl': if (sizeof($submitted_on_acls)) { $update_query = [ - 'UPDATE' => "{$dbprefix}groups_acl", - 'SET' => 'acl_can=1', - 'WHERE' => "acl_name IN ('" . implode("', '", $submitted_on_acls) . "') AND group_id=" . $req_group + 'UPDATE' => "{$dbprefix}groups_acl", + 'SET' => 'acl_can=1', + 'WHERE' => "acl_name IN ('" . implode("', '", $submitted_on_acls) . "') AND group_id=" . $req_group ]; $SQL->build($update_query); @@ -742,9 +742,9 @@ case 'group_acl': if (sizeof($submitted_off_acls)) { $update_query2 = [ - 'UPDATE' => "{$dbprefix}groups_acl", - 'SET' => 'acl_can=0', - 'WHERE' => "acl_name IN ('" . implode("', '", $submitted_off_acls) . "') AND group_id=" . $req_group + 'UPDATE' => "{$dbprefix}groups_acl", + 'SET' => 'acl_can=0', + 'WHERE' => "acl_name IN ('" . implode("', '", $submitted_off_acls) . "') AND group_id=" . $req_group ]; $SQL->build($update_query2); @@ -795,7 +795,7 @@ case 'group_data': else { update_config('language', $got_lang, true, $req_group); - $group_name = str_replace( + $group_name = str_replace( ['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$req_group]['data']['group_name'] @@ -812,16 +812,16 @@ case 'group_data': } - $group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], + $group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], $d_groups[$req_group]['data']['group_name']); - $gdata = $d_groups[$req_group]['data']; + $gdata = $d_groups[$req_group]['data']; $query = [ - 'SELECT' => 'c.name, c.option', - 'FROM' => "{$dbprefix}config c", - 'WHERE' => "c.type='groups'", - 'ORDER BY' => 'c.display_order ASC' + 'SELECT' => 'c.name, c.option', + 'FROM' => "{$dbprefix}config c", + 'WHERE' => "c.type='groups'", + 'ORDER BY' => 'c.display_order ASC' ]; $result = $SQL->build($query); @@ -840,9 +840,9 @@ case 'group_data': $new[$row['name']] = p($row['name'], 'str', $row['value']); $update_query = [ - 'UPDATE' => "{$dbprefix}groups_data", - 'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'", - 'WHERE' => "name='" . $row['name'] . "' AND group_id=" . $req_group + 'UPDATE' => "{$dbprefix}groups_data", + 'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'", + 'WHERE' => "name='" . $row['name'] . "' AND group_id=" . $req_group ]; $SQL->build($update_query); @@ -872,7 +872,7 @@ case 'group_data': } $data[] = [ - 'option' => + 'option' => str_replace( ['', '', '
', '
+ -

+

- - {page_nums} - + + {page_nums} + -

+

- - -
-
- - {H_FORM_KEYS} - - - - - - -
+ + +
+
+ + {H_FORM_KEYS} + + + + + + +
-
+
diff --git a/styles/default/footer.html b/styles/default/footer.html index a759ffd..4a83f78 100755 --- a/styles/default/footer.html +++ b/styles/default/footer.html @@ -1,38 +1,38 @@ -
+
- - (extras.footer?
:) - - - + + (extras.footer?
:) + + +
@@ -68,7 +68,7 @@ $(document).ready(function(){ $('#loadbox').css('display', 'block'); $('#uploader').css('display', 'none'); - }); + }); $("#uploader input:file").change(function (){ diff --git a/styles/default/get_pass.html b/styles/default/get_pass.html index f8a7efc..ed1dfc4 100755 --- a/styles/default/get_pass.html +++ b/styles/default/get_pass.html @@ -1,63 +1,63 @@
- -

● {title}

- + +

● {title}

+ - -
- + +
+ - - -
-
-
    -
  • {%value%}
  • -
-
-
- -
+ + +
+
+
    +
  • {%value%}
  • +
+
+
+ +
- -
-
-

{lang.E_GET_LOSTPASS}

-
- - -
-
+ + +
+

{lang.E_GET_LOSTPASS}

+
+ + +
+
-
+
- - -
-

{lang.VERTY_CODE}

-
-
- {lang.REFRESH_CAPTCHA} - -
-
-

{lang.NOTE_CODE}

-
-
- - -
+ + +
+

{lang.VERTY_CODE}

+
+
+ {lang.REFRESH_CAPTCHA} + +
+
+

{lang.NOTE_CODE}

+
+
+ + +
- {H_FORM_KEYS} + {H_FORM_KEYS} - + -
- + + -
+
diff --git a/styles/default/guide.html b/styles/default/guide.html index 7d954f7..ce81050 100755 --- a/styles/default/guide.html +++ b/styles/default/guide.html @@ -1,49 +1,49 @@
- -

● {lang.GUIDE_EXP}

- + +

● {lang.GUIDE_EXP}

+ - -
- + +
+ - - - - - - - - - - - - - - -
 
-
{{group_name}}
+ + + + + + + + + + + + + + + - - + + +
+ {lang.EXT} : + {{ext}} + — + {lang.SIZE} : + {{size}} +
+ + + + -
 
+
{{group_name}}
- - -
- {lang.EXT} : - {{ext}} - — - {lang.SIZE} : - {{size}} -
- -
- +
+ -
+
diff --git a/styles/default/header.html b/styles/default/header.html index 82d53c0..abcbcf0 100755 --- a/styles/default/header.html +++ b/styles/default/header.html @@ -2,84 +2,84 @@ - {title}(title? - :){config.sitename} - - - - - - - - - - - + {title}(title? - :){config.sitename} + + + + + + + + + + + - - + + - + - - {EXTRA_CODE_META} + + {EXTRA_CODE_META} onload="document.login_form.lname.focus();">
- - - + + + -
+
- -
- -
+ +
+ +
-
+
- -
+ +
- - -
-
{extras.header}
-
- -
+ + +
+
{extras.header}
+
+ +
-
+
- - \ No newline at end of file + + \ No newline at end of file diff --git a/styles/default/images/index.html b/styles/default/images/index.html index 3b794e0..2dbbcb4 100755 --- a/styles/default/images/index.html +++ b/styles/default/images/index.html @@ -1 +1 @@ -Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file +Powered by Kleeja


403 - Access forbidden!


Powered by Kleeja >>> the best uploader ... >> Bugs | Plugins | Styles |
\ No newline at end of file diff --git a/styles/default/index_body.html b/styles/default/index_body.html index 3e1837b..d22111f 100755 --- a/styles/default/index_body.html +++ b/styles/default/index_body.html @@ -1,119 +1,95 @@
- -
{lang.WELCOME} {lang.WELCOME} .. [ {username} ]
-
{welcome_msg}
- + +
{lang.WELCOME} {lang.WELCOME} .. [ {username} ]
+
{welcome_msg}
+ -
+
- - -
- -
    -
  • {lang.INFORMATION} : {{i}}
  • -
-
-
-
+ + +
+ +
    +
  • {lang.INFORMATION} : {{i}}
  • +
+
+
+
-
- - -
+
- -
+ + -
    - -
  • {lang.DOWNLOAD_F}
  • - + +
    - - -
  • {lang.DOWNLOAD_T}
  • -
    - +
      + +
    • {lang.DOWNLOAD_F}
    • + - + +
    -
+ +
+
+ + + + +
{terms_msg}
+
+
+ +
+
+ - -
-
- - - - -
{terms_msg}
-
-
- -
-
- + - - -
-
- - - - -
{terms_msg}
-
-
- -
-
-
- - - - -
- +
+ - - -
-

{lang.VERTY_CODE}

-
-
- {lang.REFRESH_CAPTCHA} - -
-
-

{lang.NOTE_CODE}

-
-
- -
- - + + +
+

{lang.VERTY_CODE}

+
+
+ {lang.REFRESH_CAPTCHA} + +
+
+

{lang.NOTE_CODE}

+
+
+ +
- -
-
{lang.WAIT_LOADING}
-

- loading ... -



-
+ - - -
+ +
+
{lang.WAIT_LOADING}
+

+ loading ... +



+
+ + + +

{lang.NUMBER_ONLINE} : [ {current_online_users} ]

{{name}}

-
-
-
+ +
+
diff --git a/styles/default/info.html b/styles/default/info.html index 01063bd..b6be1fd 100755 --- a/styles/default/info.html +++ b/styles/default/info.html @@ -1,15 +1,15 @@
-
- -
-
-
    -
  • {text} !
  • -
-
-
- -
+
+ +
+
+
    +
  • {text} !
  • +
+
+
+ +
\ No newline at end of file diff --git a/styles/default/login.html b/styles/default/login.html index 1084b21..f7f625d 100755 --- a/styles/default/login.html +++ b/styles/default/login.html @@ -1,63 +1,63 @@
- - -
-
-
    - -
  • {%value%}
  • -
    -
-
-
- -
+ + +
+
+
    + +
  • {%value%}
  • +
    +
+
+
+ +
- -
- -
+
- - -
-

{lang.VERTY_CODE}

-
-
- {lang.REFRESH_CAPTCHA} - -
-
-

{lang.NOTE_CODE}

-
-
- + + +
+

{lang.VERTY_CODE}

+
+
+ {lang.REFRESH_CAPTCHA} + +
+
+

{lang.NOTE_CODE}

+
+
+ -
+
-
- + +
diff --git a/styles/default/profile.html b/styles/default/profile.html index 3550851..a5032d6 100755 --- a/styles/default/profile.html +++ b/styles/default/profile.html @@ -1,90 +1,90 @@
- -

● {title}

- + +

● {title}

+ - -
- - - - -
-
-
    -
  • - - {lang.INFORMATION} : {%value%}
    -
    -
  • -
-
-
- -
+ +
+ + + + +
+
+
    +
  • + + {lang.INFORMATION} : {%value%}
    +
    +
  • +
+
+
+ +
- - -
-
-
-
{lang.EDIT_U_DATA}
-
- - - - -
-
- -
-
{lang.EMAIL}
-
- - - - -
-
- -
-
{lang.PASS_ON_CHANGE}
-
- - - - - - - {H_FORM_KEYS} -
-
-
-
{lang.EDIT_U_AVATER}
-
+ + + +
+
+
{lang.EDIT_U_DATA}
+
+ + + + +
+
+ +
+
{lang.EMAIL}
+
+ + + + +
+
+ +
+
{lang.PASS_ON_CHANGE}
+
+ + + + + + + {H_FORM_KEYS} +
+
+
+
{lang.EDIT_U_AVATER}
+
{link_avater}
-
-
-
- - -
- -
- - - - - - - -
- -
+
+
+
+ + +
+ +
+ + + + + + + +
+ +
\ No newline at end of file diff --git a/styles/default/register.html b/styles/default/register.html index 9dcc1be..7b5c3eb 100755 --- a/styles/default/register.html +++ b/styles/default/register.html @@ -1,69 +1,69 @@
- -

● {title}

- + +

● {title}

+ - -
- + +
+ - - -
-
-
    - -
  • {%value%}
  • -
    -
-
-
- -
+ + +
+
+
    + +
  • {%value%}
  • +
    +
+
+
+ +
- -
- -
- - - - - - - - -
- -
- - - -
-

{lang.VERTY_CODE}

-
-
- {lang.REFRESH_CAPTCHA} - -
-
-

{lang.NOTE_CODE}

-
-
- + + + +
+ + + + + + + + +
+ +
+ + + +
+

{lang.VERTY_CODE}

+
+
+ {lang.REFRESH_CAPTCHA} + +
+
+

{lang.NOTE_CODE}

+
+
+ -
+
- {H_FORM_KEYS} + {H_FORM_KEYS} - + -
- - -
+ + + +
\ No newline at end of file diff --git a/styles/default/report.html b/styles/default/report.html index 3ea3d8b..594d2de 100755 --- a/styles/default/report.html +++ b/styles/default/report.html @@ -1,78 +1,78 @@
- -

● {title}

- + +

● {title}

+ - -
- - - - -
-
-
    - -
  • {%value%}
  • -
    -
-
-
- -
- - -
+ +
+ + + + +
+
+
    + +
  • {%value%}
  • +
    +
+
+
+ +
+ + + -
- - - - - - - - - - - - - - - -
+
+ + + + + + + + + + + + + + + +
-
+
- - -
-

{lang.VERTY_CODE}

-
-
- {lang.REFRESH_CAPTCHA} - -
-
-

{lang.NOTE_CODE}

-
-
- - -
- - - - + + +
+

{lang.VERTY_CODE}

+
+
+ {lang.REFRESH_CAPTCHA} + +
+
+

{lang.NOTE_CODE}

+
+
+ + +
+ + + + - {H_FORM_KEYS} + {H_FORM_KEYS} - - -
- - + + + + +
diff --git a/styles/default/rules.html b/styles/default/rules.html index 3139dbe..9cda99d 100755 --- a/styles/default/rules.html +++ b/styles/default/rules.html @@ -1,20 +1,20 @@
- -

● {title}

- + +

● {title}

+ - -
- + +
+ - -
-
{lang.E_RULES} :
-
{contents}
-
- + +
+
{lang.E_RULES} :
+
{contents}
+
+
\ No newline at end of file diff --git a/styles/default/stats.html b/styles/default/stats.html index 4a4037f..72eac93 100755 --- a/styles/default/stats.html +++ b/styles/default/stats.html @@ -1,35 +1,35 @@
- -

● {title}

- + +

● {title}

+ - -
- + +
+ - -
-
    -
  • {lang.FILES_ST} : [ {files_st} {lang.FILE} {lang.AND} {imgs_st} {lang.IMAGE} ]
  • - -
  • {lang.USERS_ST} : [ {users_st} {lang.USER} ]
  • -
  • {lang.LAST_REG} : [ {lst_reg} ]
  • -
    -
  • {lang.SIZES_ST} : [ {sizes_st} ]
  • - -
  • {lang.LSTDELST} : {lst_dl_st}
  • -
    - -
  • {lang.MOST_EVER_ONLINE} : [ {most_online} ] {lang.ON} [ {on_muoe} ]
  • -
    -
-

-

{lang.LAST_1_H}

-

-
- + +
+
    +
  • {lang.FILES_ST} : [ {files_st} {lang.FILE} {lang.AND} {imgs_st} {lang.IMAGE} ]
  • + +
  • {lang.USERS_ST} : [ {users_st} {lang.USER} ]
  • +
  • {lang.LAST_REG} : [ {lst_reg} ]
  • +
    +
  • {lang.SIZES_ST} : [ {sizes_st} ]
  • + +
  • {lang.LSTDELST} : {lst_dl_st}
  • +
    + +
  • {lang.MOST_EVER_ONLINE} : [ {most_online} ] {lang.ON} [ {on_muoe} ]
  • +
    +
+

+

{lang.LAST_1_H}

+

+
+
diff --git a/styles/default/up_boxes.html b/styles/default/up_boxes.html index 31d39bc..fa05f48 100755 --- a/styles/default/up_boxes.html +++ b/styles/default/up_boxes.html @@ -2,14 +2,14 @@
-
- - - - - - -
{b_title}
+
+ + + + + + +
{b_title}
@@ -17,45 +17,45 @@ - - - - - -
{b_title}
+ + + + + +
{b_title}
- - - - - -
{b_bbc_title}
+ + + + + +
{b_bbc_title}
- - - - - -
HTML
- + + + + + +
HTML
+ - - - - - -
{b_title}
- - - - - - -
{b_bbc_title}
+ + + + + +
{b_title}
+ + + + + + +
{b_bbc_title}
@@ -64,11 +64,11 @@ - - - - - -
{b_title}
+ + + + + +
{b_title}
diff --git a/ucp.php b/ucp.php index 8599160..c92fd1e 100755 --- a/ucp.php +++ b/ucp.php @@ -32,11 +32,11 @@ switch (g('go')) case 'login' : //page info - $stylee = 'login'; - $titlee = $lang['LOGIN']; - $action = 'ucp.php?go=login' . (ig('return') ? '&return=' . g('return') : ''); - $forget_pass_link = ! empty($forgetpass_script_path) && (int) $config['user_system'] != 1 ? $forgetpass_script_path : 'ucp.php?go=get_pass'; - $H_FORM_KEYS = kleeja_add_form_key('login'); + $stylee = 'login'; + $titlee = $lang['LOGIN']; + $action = 'ucp.php?go=login' . (ig('return') ? '&return=' . g('return') : ''); + $forget_pass_link = ! empty($forgetpass_script_path) && (int) $config['user_system'] != 1 ? $forgetpass_script_path : 'ucp.php?go=get_pass'; + $H_FORM_KEYS = kleeja_add_form_key('login'); //no error yet $ERRORS = false; @@ -51,13 +51,13 @@ switch (g('go')) { is_array($plugin_run_result = Plugins::getInstance()->run('login_logon_before', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $errorpage = true; - $text = $lang['LOGINED_BEFORE'] . ' ..
' . $lang['LOGOUT'] . ''; + $errorpage = true; + $text = $lang['LOGINED_BEFORE'] . ' ..
' . $lang['LOGOUT'] . ''; kleeja_info($text); } elseif (ip('submit')) { - $ERRORS = []; + $ERRORS = []; is_array($plugin_run_result = Plugins::getInstance()->run('login_after_submit', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -118,10 +118,10 @@ switch (g('go')) case 'register' : //page info - $stylee = 'register'; - $titlee = $lang['REGISTER']; - $action = 'ucp.php?go=register'; - $H_FORM_KEYS = kleeja_add_form_key('register'); + $stylee = 'register'; + $titlee = $lang['REGISTER']; + $action = 'ucp.php?go=register'; + $H_FORM_KEYS = kleeja_add_form_key('register'); //no error yet $ERRORS = false; @@ -231,17 +231,17 @@ switch (g('go')) //no errors, lets do process if (empty($ERRORS)) { - $name = (string) $SQL->escape(trim(p('lname'))); - $user_salt = (string) substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); - $pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt); - $mail = (string) strtolower(trim($SQL->escape(p('lmail')))); - $session_id = (string) session_id(); - $clean_name = (string) $usrcp->cleanusername($name); + $name = (string) $SQL->escape(trim(p('lname'))); + $user_salt = (string) substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); + $pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt); + $mail = (string) strtolower(trim($SQL->escape(p('lmail')))); + $session_id = (string) session_id(); + $clean_name = (string) $usrcp->cleanusername($name); - $insert_query = [ - 'INSERT' => 'name ,password, password_salt ,mail, register_time, session_id, clean_name, group_id', - 'INTO' => "{$dbprefix}users", - 'VALUES' => "'$name', '$pass', '$user_salt', '$mail', " . time() . ", '$session_id','$clean_name', " . $config['default_group'] + $insert_query = [ + 'INSERT' => 'name ,password, password_salt ,mail, register_time, session_id, clean_name, group_id', + 'INTO' => "{$dbprefix}users", + 'VALUES' => "'$name', '$pass', '$user_salt', '$mail', " . time() . ", '$session_id','$clean_name', " . $config['default_group'] ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_user_register', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -252,9 +252,9 @@ switch (g('go')) $text = $lang['REGISTER_SUCCESFUL'] . '
' . $lang['HOME'] . ''; //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "users=users+1, lastuser='$name'", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "users=users+1, lastuser='$name'", ]; is_array($plugin_run_result = Plugins::getInstance()->run('ok_added_users_register', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -302,13 +302,13 @@ switch (g('go')) is_array($plugin_run_result = Plugins::getInstance()->run('begin_fileuser', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $stylee = 'fileuser'; - $H_FORM_KEYS = kleeja_add_form_key('fileuser'); + $stylee = 'fileuser'; + $H_FORM_KEYS = kleeja_add_form_key('fileuser'); - $user_id_get = ig('id') ? g('id', 'int') : false; - $user_id = (! $user_id_get && $usrcp->id()) ? $usrcp->id() : $user_id_get; - $user_himself = $usrcp->id() == $user_id; - $action = $config['siteurl'] . 'ucp.php?go=fileuser' . (ig('page') ? '&page=' . g('page', 'int') : ''); + $user_id_get = ig('id') ? g('id', 'int') : false; + $user_id = (! $user_id_get && $usrcp->id()) ? $usrcp->id() : $user_id_get; + $user_himself = $usrcp->id() == $user_id; + $action = $config['siteurl'] . 'ucp.php?go=fileuser' . (ig('page') ? '&page=' . g('page', 'int') : ''); //no logon before if (! $usrcp->name() && ! ig('id')) @@ -351,30 +351,30 @@ switch (g('go')) kleeja_info($lang['USERFILE_CLOSED'], $lang['CLOSED_FEATURE']); } - $query = [ - 'SELECT' => 'f.id, f.name, f.real_filename, f.folder, f.type, f.uploads, f.time, f.size', - 'FROM' => "{$dbprefix}files f", - 'WHERE' => 'f.user=' . $user_id, - 'ORDER BY' => 'f.id DESC' + $query = [ + 'SELECT' => 'f.id, f.name, f.real_filename, f.folder, f.type, f.uploads, f.time, f.size', + 'FROM' => "{$dbprefix}files f", + 'WHERE' => 'f.user=' . $user_id, + 'ORDER BY' => 'f.id DESC' ]; //pager - $perpage = 16; - $result_p = $SQL->build($query); - $nums_rows = $SQL->num_rows($result_p); - $currentPage = ig('page') ? g('page', 'int') : 1; - $Pager = new Pagination($perpage, $nums_rows, $currentPage); - $start = $Pager->getStartRow(); + $perpage = 16; + $result_p = $SQL->build($query); + $nums_rows = $SQL->num_rows($result_p); + $currentPage = ig('page') ? g('page', 'int') : 1; + $Pager = new Pagination($perpage, $nums_rows, $currentPage); + $start = $Pager->getStartRow(); - $your_fileuser = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $usrcp->id() . '.html' : 'ucp.php?go=fileuser&id=' . $usrcp->id()); - $total_pages = $Pager->getTotalPages(); - $linkgoto = $config['siteurl'] . ( + $your_fileuser = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $usrcp->id() . '.html' : 'ucp.php?go=fileuser&id=' . $usrcp->id()); + $total_pages = $Pager->getTotalPages(); + $linkgoto = $config['siteurl'] . ( $config['mod_writer'] ? 'fileuser-' . $user_id . ($currentPage > 1 && $currentPage <= $total_pages ? '-' . $currentPage : '') . '.html' - : 'ucp.php?go=fileuser' . ( ig('id') ? ( g('id', 'int') == $usrcp->id() ? '' : '&id=' . g('id') ) : null ) + : 'ucp.php?go=fileuser' . (ig('id') ? (g('id', 'int') == $usrcp->id() ? '' : '&id=' . g('id')) : null) ); - $page_nums = $Pager->print_nums(str_replace('.html', '', $linkgoto)); + $page_nums = $Pager->print_nums(str_replace('.html', '', $linkgoto)); $no_results = true; @@ -385,7 +385,7 @@ switch (g('go')) $user_name = ! $data_user['name'] ? false : $data_user['name']; //set page title - $titlee = $lang['FILEUSER'] . ': ' . $user_name; + $titlee = $lang['FILEUSER'] . ': ' . $user_name; //there is result ? show them if ($nums_rows != 0) { @@ -398,7 +398,7 @@ switch (g('go')) is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_files_in_fileuser', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $result = $SQL->build($query); + $result = $SQL->build($query); $i = ($currentPage * $perpage) - $perpage; $tdnumi = $num = $files_num = $imgs_num = 0; @@ -420,18 +420,18 @@ switch (g('go')) $file_name = $row['real_filename'] == '' ? $row['name'] : $row['real_filename']; //make new lovely arrays !! - $arr[] = [ - 'id' => $row['id'], - 'name_file' => shorten_text($file_name, 25), - 'file_type' => $row['type'], - 'uploads' => $row['uploads'], - 'tdnum' => $tdnumi == 0 ? '
    ': '', - 'tdnum2' => $tdnumi == 4 ? '
' : '', - 'href' => $url, - 'size' => readable_size($row['size']), - 'time' => ! empty($row['time']) ? kleeja_date($row['time']) : '...', - 'thumb_link'=> $is_image ? $url_thumb : $url_fileuser, - 'is_image' => $is_image, + $arr[] = [ + 'id' => $row['id'], + 'name_file' => shorten_text($file_name, 25), + 'file_type' => $row['type'], + 'uploads' => $row['uploads'], + 'tdnum' => $tdnumi == 0 ? '
    ': '', + 'tdnum2' => $tdnumi == 4 ? '
' : '', + 'href' => $url, + 'size' => readable_size($row['size']), + 'time' => ! empty($row['time']) ? kleeja_date($row['time']) : '...', + 'thumb_link' => $is_image ? $url_thumb : $url_fileuser, + 'is_image' => $is_image, ]; $tdnumi = $tdnumi == 2 ? 0 : $tdnumi+1; @@ -449,12 +449,12 @@ switch (g('go')) if ($_POST['del_' . $row['id']]) { //delete from folder .. - @kleeja_unlink($row['folder'] . '/' . $row['name'] ); + @kleeja_unlink($row['folder'] . '/' . $row['name']); //delete thumb - if (file_exists($row['folder'] . '/thumbs/' . $row['name'] )) + if (file_exists($row['folder'] . '/thumbs/' . $row['name'])) { - @kleeja_unlink($row['folder'] . '/thumbs/' . $row['name'] ); + @kleeja_unlink($row['folder'] . '/thumbs/' . $row['name']); } $ids[] = $row['id']; @@ -479,12 +479,12 @@ switch (g('go')) //delete all files foreach ($arr as $row) { - @kleeja_unlink($row['folder'] . '/' . $row['name'] ); + @kleeja_unlink($row['folder'] . '/' . $row['name']); //delete thumb - if (file_exists($row['folder'] . '/thumbs/' . $row['name'] )) + if (file_exists($row['folder'] . '/thumbs/' . $row['name'])) { - @kleeja_unlink($row['folder'] . '/thumbs/' . $row['name'] ); + @kleeja_unlink($row['folder'] . '/thumbs/' . $row['name']); } $ids[] = $row['id']; @@ -515,8 +515,8 @@ switch (g('go')) if (isset($ids) && ! empty($ids)) { $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => 'id IN (' . implode(',', $ids) . ')' + 'DELETE' => "{$dbprefix}files", + 'WHERE' => 'id IN (' . implode(',', $ids) . ')' ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_files_in_filecp', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -525,9 +525,9 @@ switch (g('go')) if (($files_num <= $stat_files) && ($imgs_num <= $stat_imgs)) { //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num", ]; $SQL->build($update_query); @@ -549,8 +549,8 @@ switch (g('go')) if (isset($ids) && ! empty($ids)) { $query_del = [ - 'DELETE' => "{$dbprefix}files", - 'WHERE' => 'id IN (' . implode(',', $ids) . ')' + 'DELETE' => "{$dbprefix}files", + 'WHERE' => 'id IN (' . implode(',', $ids) . ')' ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_files_in_filecp', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -559,9 +559,9 @@ switch (g('go')) if (($files_num <= $stat_files) && ($imgs_num <= $stat_imgs)) { //update number of stats - $update_query = [ - 'UPDATE' => "{$dbprefix}stats", - 'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num", + $update_query = [ + 'UPDATE' => "{$dbprefix}stats", + 'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num", ]; $SQL->build($update_query); @@ -598,15 +598,15 @@ switch (g('go')) kleeja_info($lang['USER_PLACE'], $lang['PLACE_NO_YOU']); } - $stylee = 'profile'; - $titlee = $lang['PROFILE']; - $action = 'ucp.php?go=profile'; - $name = $usrcp->name(); - $mail = $usrcp->mail(); + $stylee = 'profile'; + $titlee = $lang['PROFILE']; + $action = 'ucp.php?go=profile'; + $name = $usrcp->name(); + $mail = $usrcp->mail(); extract($usrcp->get_data('show_my_filecp, password_salt')); - $data_forum = (int) $config['user_system'] == 1 ? true : false; - $link_avater = sprintf($lang['EDIT_U_AVATER_LINK'], '', ''); - $H_FORM_KEYS = kleeja_add_form_key('profile'); + $data_forum = (int) $config['user_system'] == 1 ? true : false; + $link_avater = sprintf($lang['EDIT_U_AVATER_LINK'], '', ''); + $H_FORM_KEYS = kleeja_add_form_key('profile'); //no error yet $ERRORS = false; @@ -648,7 +648,7 @@ switch (g('go')) // if (ip('submit_data')) { - $ERRORS = []; + $ERRORS = []; is_array($plugin_run_result = Plugins::getInstance()->run('submit_profile', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -701,17 +701,17 @@ switch (g('go')) //no errors , do it if (empty($ERRORS)) { - $user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); - $mail = $new_mail ? "mail='" . $SQL->escape(strtolower(trim(p('pmail')))) . "'" : ''; - $showmyfile = p('show_my_filecp', 'int') != $show_my_filecp ? ($mail == '' ? '': ',') . "show_my_filecp='" . p('show_my_filecp', 'int') . "'" : ''; - $pass = ! empty(p('ppass_new')) ? ($showmyfile != '' || $mail != '' ? ',' : '') . "password='" . $usrcp->kleeja_hash_password($SQL->escape(p('ppass_new')) . $user_salt) . + $user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); + $mail = $new_mail ? "mail='" . $SQL->escape(strtolower(trim(p('pmail')))) . "'" : ''; + $showmyfile = p('show_my_filecp', 'int') != $show_my_filecp ? ($mail == '' ? '': ',') . "show_my_filecp='" . p('show_my_filecp', 'int') . "'" : ''; + $pass = ! empty(p('ppass_new')) ? ($showmyfile != '' || $mail != '' ? ',' : '') . "password='" . $usrcp->kleeja_hash_password($SQL->escape(p('ppass_new')) . $user_salt) . "', password_salt='" . $user_salt . "'" : ''; - $id = (int) $usrcp->id(); + $id = (int) $usrcp->id(); - $update_query = [ - 'UPDATE' => "{$dbprefix}users", - 'SET' => $mail . $showmyfile . $pass, - 'WHERE' => 'id=' . $id, + $update_query = [ + 'UPDATE' => "{$dbprefix}users", + 'SET' => $mail . $showmyfile . $pass, + 'WHERE' => 'id=' . $id, ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_data_in_profile', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -747,10 +747,10 @@ switch (g('go')) } //page info - $stylee = 'get_pass'; - $titlee = $lang['GET_LOSTPASS']; - $action = 'ucp.php?go=get_pass'; - $H_FORM_KEYS = kleeja_add_form_key('get_pass'); + $stylee = 'get_pass'; + $titlee = $lang['GET_LOSTPASS']; + $action = 'ucp.php?go=get_pass'; + $H_FORM_KEYS = kleeja_add_form_key('get_pass'); //no error yet $ERRORS = false; @@ -778,9 +778,9 @@ switch (g('go')) $npass = $npass['new_password']; //password now will be same as new password $update_query = [ - 'UPDATE'=> "{$dbprefix}users", - 'SET' => "password = '" . $npass . "', new_password = '', hash_key = ''", - 'WHERE' => 'id=' . $u_id, + 'UPDATE' => "{$dbprefix}users", + 'SET' => "password = '" . $npass . "', new_password = '', hash_key = ''", + 'WHERE' => 'id=' . $u_id, ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_newpass_activation', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -816,7 +816,7 @@ switch (g('go')) } else { // submit - $ERRORS = []; + $ERRORS = []; is_array($plugin_run_result = Plugins::getInstance()->run('submit_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook //check for form key @@ -849,14 +849,14 @@ switch (g('go')) //no errors, lets do it if (empty($ERRORS)) { - $query = [ - 'SELECT'=> 'u.*', - 'FROM' => "{$dbprefix}users u", - 'WHERE' => "u.mail='" . $SQL->escape(strtolower(trim(p('rmail')))) . "'" + $query = [ + 'SELECT' => 'u.*', + 'FROM' => "{$dbprefix}users u", + 'WHERE' => "u.mail='" . $SQL->escape(strtolower(trim(p('rmail')))) . "'" ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_mail_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook - $result = $SQL->build($query); + $result = $SQL->build($query); $row = $SQL->fetch_array($result); @@ -869,17 +869,17 @@ switch (g('go')) $newpass .= substr($chars, (mt_rand() % strlen($chars)), 1); } - $hash_key = md5($newpass . time()); - $pass = (string) $usrcp->kleeja_hash_password($SQL->escape($newpass) . $row['password_salt']); - $to = $row['mail']; - $subject = $lang['GET_LOSTPASS'] . ':' . $config['sitename']; - $activation_link = $config['siteurl'] . 'ucp.php?go=get_pass&activation_key=' . urlencode($hash_key) . '&uid=' . $row['id']; - $message = "\n " . $lang['WELCOME'] . ' ' . $row['name'] . "\r\n " . sprintf($lang['GET_LOSTPASS_MSG'], $activation_link, $newpass) . "\r\n\r\n kleeja.com"; + $hash_key = md5($newpass . time()); + $pass = (string) $usrcp->kleeja_hash_password($SQL->escape($newpass) . $row['password_salt']); + $to = $row['mail']; + $subject = $lang['GET_LOSTPASS'] . ':' . $config['sitename']; + $activation_link = $config['siteurl'] . 'ucp.php?go=get_pass&activation_key=' . urlencode($hash_key) . '&uid=' . $row['id']; + $message = "\n " . $lang['WELCOME'] . ' ' . $row['name'] . "\r\n " . sprintf($lang['GET_LOSTPASS_MSG'], $activation_link, $newpass) . "\r\n\r\n kleeja.com"; - $update_query = [ - 'UPDATE'=> "{$dbprefix}users", - 'SET' => "new_password = '" . $SQL->escape($pass) . "', hash_key = '" . $hash_key . "'", - 'WHERE' => 'id=' . $row['id'], + $update_query = [ + 'UPDATE' => "{$dbprefix}users", + 'SET' => "new_password = '" . $SQL->escape($pass) . "', hash_key = '" . $hash_key . "'", + 'WHERE' => 'id=' . $row['id'], ]; is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_newpass_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -896,7 +896,7 @@ switch (g('go')) } else { - $text = $lang['OK_SEND_NEWPASS'] . '
' . $lang['LOGIN'] . ''; + $text = $lang['OK_SEND_NEWPASS'] . '
' . $lang['LOGIN'] . ''; kleeja_info($text); }