Miscellaneous changes

* PHP code style fixes
* Updated database schema for upgrade
This commit is contained in:
H.Rouatbi
2024-10-07 17:15:05 +01:00
parent 552423c700
commit 3cdfa9ce5a
47 changed files with 5007 additions and 4639 deletions

2
.gitignore vendored
View File

@@ -31,5 +31,5 @@ Project_Default.xml
.project .project
.vscode/launch.json .vscode/launch.json
.htaccess .htaccess
.php_cs.cache .php-cs-fixer.cache
kleeja.db kleeja.db

View File

@@ -5,13 +5,13 @@ $finder = PhpCsFixer\Finder::create()
->in(__DIR__) ->in(__DIR__)
; ;
return PhpCsFixer\Config::create() return (new PhpCsFixer\Config())
->setRules([ ->setRules([
'binary_operator_spaces' => ['default' => 'align'], 'binary_operator_spaces' => ['default' => 'align'],
'phpdoc_align' => true, 'phpdoc_align' => true,
'array_indentation' => true, 'array_indentation' => true,
'blank_line_before_statement' => ['statements' => [ 'blank_line_before_statement' => ['statements' => [
'break', 'case', 'continue', 'default', 'die', 'for', 'foreach', 'if'] 'break', 'case', 'continue', 'default', 'exit', 'for', 'foreach', 'if']
], ],
'braces' => ['position_after_control_structures' => 'next'], 'braces' => ['position_after_control_structures' => 'next'],
'cast_spaces' => true, 'cast_spaces' => true,
@@ -22,7 +22,7 @@ return PhpCsFixer\Config::create()
'include' => true, 'include' => true,
'indentation_type' => true, 'indentation_type' => true,
'array_syntax' => ['syntax' => 'short'], 'array_syntax' => ['syntax' => 'short'],
'lowercase_constants' => true, 'constant_case' => ['case' => 'lower'],
'method_chaining_indentation' => true, 'method_chaining_indentation' => true,
'method_argument_space' => true, 'method_argument_space' => true,
'no_closing_tag' => true, 'no_closing_tag' => true,

View File

@@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 3.1.7
* add the ability to toggle multipart download for groups
* introduce custom admin path option
* compatibility with PHP 8.X
* add group max storage limit feature
* add the ability to delete files by extension
* change the default style to Bootstrap
* fix pagination issue with incorrect link generation
* introduce ajax upload (show upload progress bar and upload speed)
* fix the issue where correct username, password, and security code still shows "The security code is incorrect!"
* various bug fixes and improvements
## 3.1.6
* compatibility with `m3u` files
* change dashboard box colors
* fix rtl issue in bootstrap template
* kleeja new domain is `kleeja.net`
## 3.1.5 ## 3.1.5
* fix hiding error msgs when updating kleeja * fix hiding error msgs when updating kleeja
* hide update all buttun , when empty update's list * hide update all buttun , when empty update's list

20
do.php
View File

@@ -184,9 +184,9 @@ if (ig('id') || ig('filename'))
// x : used only for html links, where x = extension, downf is filename without extension // x : used only for html links, where x = extension, downf is filename without extension
elseif (ig('down') || ig('downf') || elseif (ig('down') || ig('downf') ||
ig('img') || ig('imgf') || ig('img') || ig('imgf') ||
ig('thmb') || ig('thmbf') || ig('thmb') || ig('thmbf') ||
ig('downex') || ig('downexf')) ig('downex') || ig('downexf'))
{ {
is_array($plugin_run_result = Plugins::getInstance()->run('begin_down_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('begin_down_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
@@ -505,9 +505,13 @@ elseif (ig('down') || ig('downf') ||
//send file headers //send file headers
header('Pragma: public'); header('Pragma: public');
if ($resuming_on) {
if ($resuming_on)
{
header('Accept-Ranges: bytes'); header('Accept-Ranges: bytes');
} else { }
else
{
header('Accept-Ranges: none'); header('Accept-Ranges: none');
} }
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
@@ -539,14 +543,16 @@ elseif (ig('down') || ig('downf') ||
list($range, $range_end) = explode('-', $range, 2); list($range, $range_end) = explode('-', $range, 2);
$range = round(floatval($range), 0); $range = round(floatval($range), 0);
$range_end = ! $range_end ? $size - 1 : round(floatval($range_end), 0); $range_end = ! $range_end ? $size - 1 : round(floatval($range_end), 0);
if ($range < 0 || $range >= $size || $range > $range_end || $range_end >= $size ) { if ($range < 0 || $range >= $size || $range > $range_end || $range_end >= $size)
{
header('HTTP/1.1 416 Requested Range Not Satisfiable'); header('HTTP/1.1 416 Requested Range Not Satisfiable');
header("Content-Range: bytes */$size"); header("Content-Range: bytes */$size");
fclose($fp); fclose($fp);
exit; exit;
} }
$partial_length = $range_end - $range + 1; $partial_length = $range_end - $range + 1;
header('HTTP/1.1 206 Partial Content'); header('HTTP/1.1 206 Partial Content');
header("Content-Length: $partial_length"); header("Content-Length: $partial_length");

153
go.php
View File

@@ -53,9 +53,11 @@ switch ($current_go_case)
'ext' => $ext, 'ext' => $ext,
'size' => readable_size($size), 'size' => readable_size($size),
'group' => $gid, 'group' => $gid,
'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[$gid]['data']['group_name']), [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
$d_groups[$gid]['data']['group_name']
),
'most_firstrow' => $same_group == 0 ? true : false, 'most_firstrow' => $same_group == 0 ? true : false,
'firstrow' => $same_group ==0 or $same_group != $gid ? true : false, 'firstrow' => $same_group ==0 or $same_group != $gid ? true : false,
'rando' => $rando, 'rando' => $rando,
@@ -67,10 +69,10 @@ switch ($current_go_case)
is_array($plugin_run_result = Plugins::getInstance()->run('guide_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('guide_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
//Page of reporting //Page of reporting
// //
case 'report' : case 'report' :
@@ -218,10 +220,10 @@ switch ($current_go_case)
is_array($plugin_run_result = Plugins::getInstance()->run('report_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('report_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
//Pages of rules //Pages of rules
// //
case 'rules' : case 'rules' :
@@ -231,10 +233,10 @@ switch ($current_go_case)
is_array($plugin_run_result = Plugins::getInstance()->run('rules_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('rules_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
//Page of call-us //Page of call-us
// //
case 'call' : case 'call' :
@@ -330,10 +332,10 @@ switch ($current_go_case)
is_array($plugin_run_result = Plugins::getInstance()->run('call_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('call_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
//Page for requesting delete file //Page for requesting delete file
// //
case 'del' : case 'del' :
@@ -376,6 +378,7 @@ switch ($current_go_case)
while ($row=$SQL->fetch_array($result)) while ($row=$SQL->fetch_array($result))
{ {
@kleeja_unlink($row['folder'] . '/' . $row['name']); @kleeja_unlink($row['folder'] . '/' . $row['name']);
//delete thumb //delete thumb
if (file_exists($row['folder'] . '/thumbs/' . $row['name'])) if (file_exists($row['folder'] . '/thumbs/' . $row['name']))
{ {
@@ -426,7 +429,9 @@ switch ($current_go_case)
} }
$SQL->freeresult($result); $SQL->freeresult($result);
} else { }
else
{
kleeja_info($lang['NOT_FOUND']); kleeja_info($lang['NOT_FOUND']);
} }
} }
@@ -448,10 +453,10 @@ switch ($current_go_case)
} }
}//else }//else
break; break;
// //
//Page of Kleeja stats //Page of Kleeja stats
// //
case 'stats' : case 'stats' :
@@ -492,11 +497,11 @@ switch ($current_go_case)
is_array($plugin_run_result = Plugins::getInstance()->run('stats_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('stats_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
// Page for redirect to downloading a file // Page for redirect to downloading a file
// [!] depreacted from 1rc6+, see do.php // [!] depreacted from 1rc6+, see do.php
// //
case 'down': case 'down':
@@ -515,10 +520,10 @@ switch ($current_go_case)
exit; exit;
break; break;
// //
// for queue // for queue
// //
case 'queue': case 'queue':
@@ -551,10 +556,10 @@ switch ($current_go_case)
exit; exit;
break; break;
// //
//this is a part of ACP, only admins can access this part of page //this is a part of ACP, only admins can access this part of page
// //
case 'resync': case 'resync':
@@ -572,73 +577,73 @@ switch ($current_go_case)
switch (g('case')): switch (g('case')):
// //
//re-sync total files number .. //re-sync total files number ..
// //
case 'sync_files': case 'sync_files':
//no start ? or there //no start ? or there
$start = ! ig('start') ? false : g('start', 'int'); $start = ! ig('start') ? false : g('start', 'int');
$end = sync_total_files(true, $start); $end = sync_total_files(true, $start);
//no end, then sync'ing is done... //no end, then sync'ing is done...
if (! $end) if (! $end)
{ {
delete_cache('data_stats'); delete_cache('data_stats');
$text = $title = sprintf($lang['SYNCING_DONE'], $lang['ALL_FILES']); $text = $title = sprintf($lang['SYNCING_DONE'], $lang['ALL_FILES']);
$link_to_go = './'.$customadminpath.'/?cp=r_repair#!cp=r_repair'; $link_to_go = './' . $customadminpath . '/?cp=r_repair#!cp=r_repair';
} }
else else
{ {
$text = $title = sprintf($lang['SYNCING'], $lang['ALL_FILES']) . ' (' . (! $start ? 0 : $start) . '->' . (! $end ? '?' : $end) . ')'; $text = $title = sprintf($lang['SYNCING'], $lang['ALL_FILES']) . ' (' . (! $start ? 0 : $start) . '->' . (! $end ? '?' : $end) . ')';
$link_to_go = './go.php?go=resync&case=sync_files&start=' . $end; $link_to_go = './go.php?go=resync&case=sync_files&start=' . $end;
} }
//to be sure ! //to be sure !
$text .= '<script type="text/javascript"> setTimeout("location.href=\'' . $link_to_go . '\';", 3000);</script>' . "\n"; $text .= '<script type="text/javascript"> setTimeout("location.href=\'' . $link_to_go . '\';", 3000);</script>' . "\n";
kleeja_info($text, $title, true, $link_to_go, 2); kleeja_info($text, $title, true, $link_to_go, 2);
break; break;
// //
//re-sync total images number .. //re-sync total images number ..
// //
case 'sync_images': case 'sync_images':
//no start ? or there //no start ? or there
$start = ! ig('start') ? false : g('start', 'int'); $start = ! ig('start') ? false : g('start', 'int');
$end = sync_total_files(false, $start); $end = sync_total_files(false, $start);
//no end, then sync'ing is done... //no end, then sync'ing is done...
if (! $end) if (! $end)
{ {
delete_cache('data_stats'); delete_cache('data_stats');
$text = $title = sprintf($lang['SYNCING_DONE'], $lang['ALL_IMAGES']) . ' (' . (! $start ? 0 : $start) . '->' . (! $end ? '?' : $end) . ')'; $text = $title = sprintf($lang['SYNCING_DONE'], $lang['ALL_IMAGES']) . ' (' . (! $start ? 0 : $start) . '->' . (! $end ? '?' : $end) . ')';
$link_to_go = './'.$customadminpath.'/?cp=r_repair#!cp=r_repair'; $link_to_go = './' . $customadminpath . '/?cp=r_repair#!cp=r_repair';
} }
else else
{ {
$text = $title = sprintf($lang['SYNCING'], $lang['ALL_IMAGES']); $text = $title = sprintf($lang['SYNCING'], $lang['ALL_IMAGES']);
$link_to_go = './go.php?go=resync&case=sync_images&start=' . $end; $link_to_go = './go.php?go=resync&case=sync_images&start=' . $end;
} }
//to be sure ! //to be sure !
$text .= '<script type="text/javascript"> setTimeout("location.href=\'' . $link_to_go . '\';", 3000);</script>' . "\n"; $text .= '<script type="text/javascript"> setTimeout("location.href=\'' . $link_to_go . '\';", 3000);</script>' . "\n";
kleeja_info($text, $title, true, $link_to_go, 2); kleeja_info($text, $title, true, $link_to_go, 2);
break; break;
endswitch; endswitch;
break; break;
/** /**
* Ajax get uploading progress * Ajax get uploading progress
*/ */
case 'uploading_progress': case 'uploading_progress':
header('Content-type: application/json; charset=UTF-8'); header('Content-type: application/json; charset=UTF-8');
@@ -656,10 +661,10 @@ switch ($current_go_case)
// } // }
if (! function_exists('ini_get')) if (! function_exists('ini_get'))
{ {
exit(json_encode($result_data)); exit(json_encode($result_data));
} }
$key = ini_get('session.upload_progress.prefix') . $field_value; $key = ini_get('session.upload_progress.prefix') . $field_value;
@@ -678,8 +683,8 @@ switch ($current_go_case)
// //
// Default , if you are a developer , you can embed your page here with this hook // Default , if you are a developer , you can embed your page here with this hook
// by using g('go') and your codes. // by using g('go') and your codes.
// //
default: default:
@@ -692,7 +697,7 @@ switch ($current_go_case)
kleeja_err($lang['ERROR_NAVIGATATION']); kleeja_err($lang['ERROR_NAVIGATATION']);
} }
break; break;
}//end switch }//end switch
is_array($plugin_run_result = Plugins::getInstance()->run('end_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('end_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook

View File

@@ -130,7 +130,7 @@ class FetchFile
$error = true; $error = true;
kleeja_log(sprintf("cUrl error (#%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch)))); kleeja_log(sprintf("cUrl error (#%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch))));
} }
curl_close($ch); curl_close($ch);
fclose($out); fclose($out);
@@ -145,7 +145,7 @@ class FetchFile
$error = true; $error = true;
kleeja_log(sprintf("FetchFile error (curl: #%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch)))); kleeja_log(sprintf("FetchFile error (curl: #%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch))));
} }
curl_close($ch); curl_close($ch);
return isset($error) ? false : $data; return isset($error) ? false : $data;

View File

@@ -18,7 +18,6 @@ if (! defined('IN_COMMON'))
interface KleejaUploader interface KleejaUploader
{ {
/** /**
* set the allowed extensions of uploaded files * set the allowed extensions of uploaded files
* @param array $allowed_file_extensions an array of allowed extensions, and sizes ['gif'=>122, 'png'=>2421 ..] * @param array $allowed_file_extensions an array of allowed extensions, and sizes ['gif'=>122, 'png'=>2421 ..]

View File

@@ -275,9 +275,10 @@ foreach ($types as $typekey => $type)
if ($option['type'] == $typekey) if ($option['type'] == $typekey)
{ {
$options .= str_replace( $options .= str_replace(
['<input ', '<select ', '<td>', '</td>', '<label>', '<tr>', '</tr>'], ['<input ', '<select ', '<td>', '</td>', '<label>', '<tr>', '</tr>'],
['<input class="form-control" ', '<select class="form-control" ', '<div class="form-group">', '</div>', '<label class="form-check-label">', '', ''], ['<input class="form-control" ', '<select class="form-control" ', '<div class="form-group">', '</div>', '<label class="form-check-label">', '', ''],
$option['option']); $option['option']
);
} }
} }
} }
@@ -285,7 +286,6 @@ foreach ($types as $typekey => $type)
//after submit //after submit
if (ip('submit')) if (ip('submit'))
{ {
//some configs need refresh page .. //some configs need refresh page ..
$need_refresh_configs = ['language']; $need_refresh_configs = ['language'];

View File

@@ -77,6 +77,7 @@ if (ip('submit'))
{ {
//delete from folder .. //delete from folder ..
@kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); @kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']);
//delete thumb //delete thumb
if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name']))
{ {
@@ -98,8 +99,9 @@ if (ip('submit'))
$sizes += $row['size']; $sizes += $row['size'];
//Subtract size from storage of the user //Subtract size from storage of the user
if ($row['user'] != -1) { if ($row['user'] != -1)
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-".$row['size']." WHERE id=".$row['user']); {
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-" . $row['size'] . ' WHERE id=' . $row['user']);
} }
} }
} }
@@ -141,7 +143,6 @@ if (ip('submit'))
} }
elseif ($current_smt == '') elseif ($current_smt == '')
{ {
// //
//Delete all user files [only one user] //Delete all user files [only one user]
// //
@@ -258,12 +259,12 @@ elseif ($current_smt == '')
{ {
//get search filter //get search filter
$filter = get_filter(g('search_id'), 'file_search', false, 'filter_uid'); $filter = get_filter(g('search_id'), 'file_search', false, 'filter_uid');
if (! $filter) if (! $filter)
{ {
kleeja_admin_err($lang['ERROR_TRY_AGAIN'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search', 1); kleeja_admin_err($lang['ERROR_TRY_AGAIN'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search', 1);
} }
$deletelink = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deletefiles=' . g('search_id'); $deletelink = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deletefiles=' . g('search_id');
$is_search = true; $is_search = true;
$query['WHERE'] = build_search_query(unserialize(htmlspecialchars_decode($filter['filter_value']))); $query['WHERE'] = build_search_query(unserialize(htmlspecialchars_decode($filter['filter_value'])));
@@ -446,7 +447,7 @@ elseif ($current_smt == 'delete_by_extension')
'WHERE' => 'type = \'' . $ext . '\'' 'WHERE' => 'type = \'' . $ext . '\''
]; ];
$result = $SQL->build($query); $result = $SQL->build($query);
$deleted_files = []; $deleted_files = [];
$fileSizes = 0; $fileSizes = 0;
@@ -470,8 +471,9 @@ elseif ($current_smt == 'delete_by_extension')
$deleted_files[] = $file['id']; $deleted_files[] = $file['id'];
//Subtract size from storage of the user //Subtract size from storage of the user
if ($file['user'] != -1) { if ($file['user'] != -1)
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-".$file['size']." WHERE id=".$file['user']); {
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-" . $file['size'] . ' WHERE id=' . $file['user']);
} }
} }

View File

@@ -63,6 +63,7 @@ if (ip('submit'))
{ {
//delete from folder .. //delete from folder ..
@kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']); @kleeja_unlink(PATH . $row['folder'] . '/' . $row['name']);
//delete thumb //delete thumb
if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name'])) if (file_exists(PATH . $row['folder'] . '/thumbs/' . $row['name']))
{ {
@@ -73,8 +74,9 @@ if (ip('submit'))
$sizes += $row['size']; $sizes += $row['size'];
//Subtract size from storage of the user //Subtract size from storage of the user
if ($row['user'] != -1) { if ($row['user'] != -1)
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-".$row['size']." WHERE id=".$row['user']); {
$SQL->query("UPDATE {$dbprefix}users SET storage_size=storage_size-" . $row['size'] . ' WHERE id=' . $row['user']);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -53,7 +53,7 @@ if (ip('search_file'))
//delete all searches greater than 3 days //delete all searches greater than 3 days
$query_del = [ $query_del = [
'DELETE' => "{$dbprefix}filters", 'DELETE' => "{$dbprefix}filters",
'WHERE' => "filter_type='file_search' AND filter_user=" . $userinfo['id'] . " AND filter_time > " . (time() - 3600 * 24 * 3) 'WHERE' => "filter_type='file_search' AND filter_user=" . $userinfo['id'] . ' AND filter_time > ' . (time() - 3600 * 24 * 3)
]; ];
$SQL->build($query_del); $SQL->build($query_del);
@@ -96,10 +96,10 @@ if (ip('search_user'))
//delete all searches greater than 3 days //delete all searches greater than 3 days
$query_del = [ $query_del = [
'DELETE' => "{$dbprefix}filters", 'DELETE' => "{$dbprefix}filters",
'WHERE' => "filter_type='user_search' AND filter_user=" . $userinfo['id'] . " AND filter_time > " . (time() - 3600 * 24 * 3) 'WHERE' => "filter_type='user_search' AND filter_user=" . $userinfo['id'] . ' AND filter_time > ' . (time() - 3600 * 24 * 3)
]; ];
$SQL->build($query_del); $SQL->build($query_del);
//add as a user_search filter //add as a user_search filter

View File

@@ -90,13 +90,13 @@ switch ($case):
$installed_plugins[$row['plg_name']]['icon'] = file_exists( $installed_plugins[$row['plg_name']]['icon'] = file_exists(
PATH . KLEEJA_PLUGINS_FOLDER . '/' . $row['plg_name'] . '/icon.png' PATH . KLEEJA_PLUGINS_FOLDER . '/' . $row['plg_name'] . '/icon.png'
) )
? PATH . KLEEJA_PLUGINS_FOLDER . '/' . $row['plg_name'] . '/icon.png' ? PATH . KLEEJA_PLUGINS_FOLDER . '/' . $row['plg_name'] . '/icon.png'
: $STYLE_PATH_ADMIN . 'images/plugin.png'; : $STYLE_PATH_ADMIN . 'images/plugin.png';
$installed_plugins[$row['plg_name']]['has_settings_page'] = ! empty( $installed_plugins[$row['plg_name']]['has_settings_page'] = ! empty(
$installed_plugins[$row['plg_name']]['extra_info']['settings_page'] $installed_plugins[$row['plg_name']]['extra_info']['settings_page']
) && ! preg_match('/^https?:\/\//', $installed_plugins[$row['plg_name']]['extra_info']['settings_page']); ) && ! preg_match('/^https?:\/\//', $installed_plugins[$row['plg_name']]['extra_info']['settings_page']);
foreach (['plugin_title', 'plugin_description'] as $localized_info) foreach (['plugin_title', 'plugin_description'] as $localized_info)
@@ -197,7 +197,7 @@ switch ($case):
if ($case == 'store' && (in_array($plugin_info['name'], $available_plugins_names) || if ($case == 'store' && (in_array($plugin_info['name'], $available_plugins_names) ||
! empty($installed_plugins[$plugin_info['name']])) ! empty($installed_plugins[$plugin_info['name']]))
) { ) {
continue; continue;
} }
@@ -233,8 +233,9 @@ switch ($case):
$store_plugins_count = sizeof($store_plugins); $store_plugins_count = sizeof($store_plugins);
break; break;
// //
//upload a plugin //upload a plugin
// //
case 'upload': case 'upload':
$ERRORS = []; $ERRORS = [];
@@ -291,8 +292,9 @@ switch ($case):
} }
break; break;
// //
//install a plugin //install a plugin
// //
case 'install': case 'install':
@@ -369,12 +371,12 @@ switch ($case):
if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_min'], '<')) if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_min'], '<'))
{ {
kleeja_admin_info( kleeja_admin_info(
$lang['PACKAGE_N_CMPT_KLJ'] . '<br>k:' . KLEEJA_VERSION . '|<|p.min:' . $plugin_info['plugin_kleeja_version_min'], $lang['PACKAGE_N_CMPT_KLJ'] . '<br>k:' . KLEEJA_VERSION . '|<|p.min:' . $plugin_info['plugin_kleeja_version_min'],
true, true,
'', '',
true, true,
ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') ADMIN_PATH . '?cp=' . basename(__FILE__, '.php')
); );
exit; exit;
} }
@@ -435,8 +437,9 @@ switch ($case):
} }
break; break;
// //
//uninstall a plugin //uninstall a plugin
// //
case 'uninstall': case 'uninstall':
@@ -516,8 +519,9 @@ switch ($case):
} }
break; break;
// //
// disable a plugin // disable a plugin
// //
case 'disable': case 'disable':
case 'enable': case 'enable':
@@ -639,7 +643,7 @@ switch ($case):
if ( if (
version_compare(strtolower($store_plugins[$plugin_name]['kj_min_version']), KLEEJA_VERSION, '<=') version_compare(strtolower($store_plugins[$plugin_name]['kj_min_version']), KLEEJA_VERSION, '<=')
&& version_compare(strtolower($store_plugins[$plugin_name]['kj_max_version']), KLEEJA_VERSION, '>=') && version_compare(strtolower($store_plugins[$plugin_name]['kj_max_version']), KLEEJA_VERSION, '>=')
) { ) {
$plugin_name_link = $store_plugins[$plugin_name]['url']; $plugin_name_link = $store_plugins[$plugin_name]['url'];
$plugin_archive = FetchFile::make($plugin_name_link) $plugin_archive = FetchFile::make($plugin_name_link)

View File

@@ -50,61 +50,61 @@ if (ip('newstyle'))
} }
switch ($case): switch ($case):
default: default:
case 'local': case 'local':
case 'store': case 'store':
//get styles //get styles
$available_styles = []; $available_styles = [];
if ($dh = @opendir(PATH . 'styles')) if ($dh = @opendir(PATH . 'styles'))
{
while (false !== ($folder_name = readdir($dh)))
{ {
if (is_dir(PATH . 'styles/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name)) while (false !== ($folder_name = readdir($dh)))
{ {
//info if (is_dir(PATH . 'styles/' . $folder_name) && preg_match('/[a-z0-9_.]{3,}/', $folder_name))
$style_info_arr = [
'name' => $folder_name,
'desc' => '',
'copyright' => '',
'version' => ''
];
if (($style_info = kleeja_style_info($folder_name)) != false)
{ {
foreach (['name', 'desc', 'copyright', 'version'] as $InfoKey) //info
$style_info_arr = [
'name' => $folder_name,
'desc' => '',
'copyright' => '',
'version' => ''
];
if (($style_info = kleeja_style_info($folder_name)) != false)
{ {
if (array_key_exists($InfoKey, $style_info)) foreach (['name', 'desc', 'copyright', 'version'] as $InfoKey)
{ {
if (is_array($style_info[$InfoKey])) if (array_key_exists($InfoKey, $style_info))
{ {
$style_info_arr[$InfoKey] = ! empty($style_info[$InfoKey][$config['language']]) if (is_array($style_info[$InfoKey]))
? htmlspecialchars($style_info[$InfoKey][$config['language']]) {
: htmlspecialchars($style_info[$InfoKey]['en']); $style_info_arr[$InfoKey] = ! empty($style_info[$InfoKey][$config['language']])
} ? htmlspecialchars($style_info[$InfoKey][$config['language']])
else : htmlspecialchars($style_info[$InfoKey]['en']);
{ }
$style_info_arr[$InfoKey] = htmlspecialchars($style_info[$InfoKey]); else
{
$style_info_arr[$InfoKey] = htmlspecialchars($style_info[$InfoKey]);
}
} }
} }
} }
$available_styles[$folder_name] = [
'name' => $folder_name,
'is_default' => $config['style'] == $folder_name ? true : false,
'link_mk_default' => basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&amp;style_choose=' . $folder_name,
'icon' => file_exists(PATH . 'styles/' . $folder_name . '/screenshot.png')
? PATH . 'styles/' . $folder_name . '/screenshot.png'
: $STYLE_PATH_ADMIN . 'images/style.png',
'info' => $style_info_arr
];
} }
$available_styles[$folder_name] = [
'name' => $folder_name,
'is_default' => $config['style'] == $folder_name ? true : false,
'link_mk_default' => basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&amp;style_choose=' . $folder_name,
'icon' => file_exists(PATH . 'styles/' . $folder_name . '/screenshot.png')
? PATH . 'styles/' . $folder_name . '/screenshot.png'
: $STYLE_PATH_ADMIN . 'images/style.png',
'info' => $style_info_arr
];
} }
}
@closedir($dh); @closedir($dh);
} }
//do not proceed if not store case //do not proceed if not store case
if (! in_array($case, ['store', 'check'])) if (! in_array($case, ['store', 'check']))
@@ -174,142 +174,142 @@ case 'store':
$store_styles_count = sizeof($store_styles); $store_styles_count = sizeof($store_styles);
break; break;
case 'select': case 'select':
$style_name = preg_replace('/[^a-z0-9_\-\.]/i', '', g('style')); $style_name = preg_replace('/[^a-z0-9_\-\.]/i', '', g('style'));
//if empty, let's ignore it //if empty, let's ignore it
if (empty($style_name)) if (empty($style_name))
{
redirect(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
}
//
//check if this style depend on other style and
//check kleeja version that required by this style
//
if (($style_info = kleeja_style_info($style_name)) != false)
{
if (isset($style_info['depend_on']) && ! is_dir(PATH . 'styles/' . $style_info['depend_on']))
{ {
kleeja_admin_err(sprintf($lang['DEPEND_ON_NO_STYLE_ERR'], $style_info['depend_on'])); redirect(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
} }
if (isset($style_info['kleeja_version']) && version_compare(strtolower($style_info['kleeja_version']), strtolower(KLEEJA_VERSION), '>')) //
//check if this style depend on other style and
//check kleeja version that required by this style
//
if (($style_info = kleeja_style_info($style_name)) != false)
{ {
kleeja_admin_err(sprintf($lang['KLJ_VER_NO_STYLE_ERR'], $style_info['kleeja_version'])); if (isset($style_info['depend_on']) && ! is_dir(PATH . 'styles/' . $style_info['depend_on']))
}
//is this style require some plugins to be installed
if (isset($style_info['plugins_required']))
{
$plugins_required = explode(',', $style_info['plugins_required']);
$plugins_required = array_map('trim', $plugins_required);
$query = [
'SELECT' => 'plg_name, plg_disabled',
'FROM' => "{$dbprefix}plugins",
];
$result = $SQL->build($query);
if ($SQL->num_rows($result) != 0)
{ {
$plugins_required = array_flip($plugins_required); kleeja_admin_err(sprintf($lang['DEPEND_ON_NO_STYLE_ERR'], $style_info['depend_on']));
while ($row = $SQL->fetch_array($result)) }
if (isset($style_info['kleeja_version']) && version_compare(strtolower($style_info['kleeja_version']), strtolower(KLEEJA_VERSION), '>'))
{
kleeja_admin_err(sprintf($lang['KLJ_VER_NO_STYLE_ERR'], $style_info['kleeja_version']));
}
//is this style require some plugins to be installed
if (isset($style_info['plugins_required']))
{
$plugins_required = explode(',', $style_info['plugins_required']);
$plugins_required = array_map('trim', $plugins_required);
$query = [
'SELECT' => 'plg_name, plg_disabled',
'FROM' => "{$dbprefix}plugins",
];
$result = $SQL->build($query);
if ($SQL->num_rows($result) != 0)
{ {
if (in_array($row['plg_name'], $plugins_required) and $row['plg_disabled'] != 1) $plugins_required = array_flip($plugins_required);
while ($row = $SQL->fetch_array($result))
{ {
unset($plugins_required[$row['plg_name']]); if (in_array($row['plg_name'], $plugins_required) and $row['plg_disabled'] != 1)
{
unset($plugins_required[$row['plg_name']]);
}
} }
} }
}
$SQL->freeresult($result); $SQL->freeresult($result);
$plugins_required = array_flip($plugins_required); $plugins_required = array_flip($plugins_required);
if (sizeof($plugins_required)) if (sizeof($plugins_required))
{ {
kleeja_admin_err(sprintf($lang['PLUGINS_REQ_NO_STYLE_ERR'], implode(', ', $plugins_required))); kleeja_admin_err(sprintf($lang['PLUGINS_REQ_NO_STYLE_ERR'], implode(', ', $plugins_required)));
}
} }
} }
}
//make it as default //make it as default
update_config('style', $style_name); update_config('style', $style_name);
update_config('style_depend_on', isset($style_info['depend_on']) ? $style_info['depend_on'] : ''); update_config('style_depend_on', isset($style_info['depend_on']) ? $style_info['depend_on'] : '');
//delete all cache to get new style //delete all cache to get new style
delete_cache('', true); delete_cache('', true);
//show msg //show msg
kleeja_admin_info(sprintf($lang['STYLE_NOW_IS_DEFAULT'], $style_name), $action); kleeja_admin_info(sprintf($lang['STYLE_NOW_IS_DEFAULT'], $style_name), $action);
break; break;
case 'upload': case 'upload':
if (intval($userinfo['founder']) !== 1) if (intval($userinfo['founder']) !== 1)
{
$ERRORS[] = $lang['HV_NOT_PRVLG_ACCESS'];
}
$ERRORS = [];
//is uploaded?
if (empty($_FILES['style_file']['tmp_name']))
{
$ERRORS[] = $lang['CHOSE_F'];
}
//extract it to plugins folder
if (! sizeof($ERRORS))
{
if (class_exists('ZipArchive'))
{ {
$zip = new ZipArchive; $ERRORS[] = $lang['HV_NOT_PRVLG_ACCESS'];
}
if ($zip->open($_FILES['style_file']['tmp_name']) === true)
$ERRORS = [];
//is uploaded?
if (empty($_FILES['style_file']['tmp_name']))
{
$ERRORS[] = $lang['CHOSE_F'];
}
//extract it to plugins folder
if (! sizeof($ERRORS))
{
if (class_exists('ZipArchive'))
{ {
if (! $zip->extractTo(PATH . 'styles')) $zip = new ZipArchive;
if ($zip->open($_FILES['style_file']['tmp_name']) === true)
{ {
$ERRORS[] = sprintf($lang['EXTRACT_ZIP_FAILED'], 'styles'); if (! $zip->extractTo(PATH . 'styles'))
{
$ERRORS[] = sprintf($lang['EXTRACT_ZIP_FAILED'], 'styles');
}
$zip->close();
}
else
{
$ERRORS[] = sprintf($lang['EXTRACT_ZIP_FAILED'], 'styles');
} }
$zip->close();
} }
else else
{ {
$ERRORS[] = sprintf($lang['EXTRACT_ZIP_FAILED'], 'styles'); $ERRORS[] = $lang['NO_ZIP_ARCHIVE'];
} }
} }
if (! empty($_FILES['style_file']['tmp_name']))
{
@unlink($_FILES['style_file']['tmp_name']);
}
if (! sizeof($ERRORS))
{
kleeja_admin_info($lang['NO_PROBLEM_AFTER_ZIP'], true, '', true, $action);
}
else else
{ {
$ERRORS[] = $lang['NO_ZIP_ARCHIVE']; kleeja_admin_err('- ' . implode('<br>- ', $ERRORS), $action);
} }
}
if (! empty($_FILES['style_file']['tmp_name'])) break;
{
@unlink($_FILES['style_file']['tmp_name']);
}
if (! sizeof($ERRORS))
{
kleeja_admin_info($lang['NO_PROBLEM_AFTER_ZIP'], true, '', true, $action);
}
else
{
kleeja_admin_err('- ' . implode('<br>- ', $ERRORS), $action);
}
break;
case 'dfolder': case 'dfolder':
@@ -341,160 +341,160 @@ case 'upload':
kleeja_admin_err($lang['ERROR_TRY_AGAIN'], $action); kleeja_admin_err($lang['ERROR_TRY_AGAIN'], $action);
break; break;
case 'download': case 'download':
if (intval($userinfo['founder']) !== 1) if (intval($userinfo['founder']) !== 1)
{
header('HTTP/1.0 401 Unauthorized');
kleeja_admin_err($lang['HV_NOT_PRVLG_ACCESS']);
}
$style_name = g('style');
$is_update = false;
if (! is_writable(PATH . 'styles'))
{
@chmod(PATH . 'styles', K_DIR_CHMOD);
}
//if style exists before, then trigger update action. rename folder to rollback in case of failure
if (file_exists(PATH . 'styles/' . $style_name))
{
$is_update = true;
if (! rename(
PATH . 'styles/' . $style_name,
PATH . 'styles/' . $style_name . '_backup'
))
{ {
if (file_exists(PATH . 'styles/' . $style_name)) header('HTTP/1.0 401 Unauthorized');
{ kleeja_admin_err($lang['HV_NOT_PRVLG_ACCESS']);
kleeja_unlink(PATH . 'styles/' . $style_name);
}
}
}
// plugins avilable in kleeja store
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
$catalog_styles = FetchFile::make($store_link)->get();
if ($catalog_styles)
{
$catalog_styles = json_decode($catalog_styles, true);
$store_styles = [];
// make an arry for all plugins in kleeja store that not included in our server
foreach ($catalog_styles as $style_info)
{
if ($style_info['type'] != 'style')
{
continue;
}
$store_styles[$style_info['name']] = [
'name' => $style_info['name'] ,
'plg_version' => $style_info['file']['version'] ,
'url' => $style_info['file']['url'] ,
'kj_min_version' => $style_info['kleeja_version']['min'] ,
'kj_max_version' => $style_info['kleeja_version']['max'] ,
];
} }
// this style is hosted in our store $style_name = g('style');
if (isset($store_styles[$style_name]))
$is_update = false;
if (! is_writable(PATH . 'styles'))
{ {
// check if the version of the plugin is compatible with our kleeja version or not @chmod(PATH . 'styles', K_DIR_CHMOD);
if ( }
version_compare(strtolower($store_styles[$style_name]['kj_min_version']), KLEEJA_VERSION, '<=')
&& version_compare(strtolower($store_styles[$style_name]['kj_max_version']), KLEEJA_VERSION, '>=')
) {
$style_name_link = $store_styles[$style_name]['url'];
$style_archive = FetchFile::make($style_name_link) //if style exists before, then trigger update action. rename folder to rollback in case of failure
->setDestinationPath(PATH . 'cache/' . $style_name . '.zip') if (file_exists(PATH . 'styles/' . $style_name))
->isBinaryFile(true) {
->get(); $is_update = true;
if ($style_archive) if (! rename(
PATH . 'styles/' . $style_name,
PATH . 'styles/' . $style_name . '_backup'
))
{
if (file_exists(PATH . 'styles/' . $style_name))
{ {
if (file_exists(PATH . 'cache/' . $style_name . '.zip')) kleeja_unlink(PATH . 'styles/' . $style_name);
}
}
}
// plugins avilable in kleeja store
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
$catalog_styles = FetchFile::make($store_link)->get();
if ($catalog_styles)
{
$catalog_styles = json_decode($catalog_styles, true);
$store_styles = [];
// make an arry for all plugins in kleeja store that not included in our server
foreach ($catalog_styles as $style_info)
{
if ($style_info['type'] != 'style')
{
continue;
}
$store_styles[$style_info['name']] = [
'name' => $style_info['name'] ,
'plg_version' => $style_info['file']['version'] ,
'url' => $style_info['file']['url'] ,
'kj_min_version' => $style_info['kleeja_version']['min'] ,
'kj_max_version' => $style_info['kleeja_version']['max'] ,
];
}
// this style is hosted in our store
if (isset($store_styles[$style_name]))
{
// check if the version of the plugin is compatible with our kleeja version or not
if (
version_compare(strtolower($store_styles[$style_name]['kj_min_version']), KLEEJA_VERSION, '<=')
&& version_compare(strtolower($store_styles[$style_name]['kj_max_version']), KLEEJA_VERSION, '>=')
) {
$style_name_link = $store_styles[$style_name]['url'];
$style_archive = FetchFile::make($style_name_link)
->setDestinationPath(PATH . 'cache/' . $style_name . '.zip')
->isBinaryFile(true)
->get();
if ($style_archive)
{ {
$zip = new ZipArchive(); if (file_exists(PATH . 'cache/' . $style_name . '.zip'))
if ($zip->open(PATH . 'cache/' . $style_name . '.zip') === true)
{ {
if ($zip->extractTo(PATH . 'styles')) $zip = new ZipArchive();
if ($zip->open(PATH . 'cache/' . $style_name . '.zip') === true)
{ {
// we dont need the zip file anymore if ($zip->extractTo(PATH . 'styles'))
kleeja_unlink(PATH . 'cache/' . $style_name . '.zip');
// uploaded style's archive has different name, so we change it
rename(
PATH . 'styles/' . trim($zip->getNameIndex(0), '/'),
PATH . 'styles/' . $style_name
);
$zip->close();
// download or update msg
$adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $style_name);
//in case of update, delete back up version
if (file_exists(PATH . 'styles/' . $style_name . '_backup'))
{ {
kleeja_unlink(PATH . 'styles/' . $style_name . '_backup'); // we dont need the zip file anymore
kleeja_unlink(PATH . 'cache/' . $style_name . '.zip');
// uploaded style's archive has different name, so we change it
rename(
PATH . 'styles/' . trim($zip->getNameIndex(0), '/'),
PATH . 'styles/' . $style_name
);
$zip->close();
// download or update msg
$adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $style_name);
//in case of update, delete back up version
if (file_exists(PATH . 'styles/' . $style_name . '_backup'))
{
kleeja_unlink(PATH . 'styles/' . $style_name . '_backup');
}
}
else
{
$adminAjaxContent = '1003:::' . sprintf($lang['EXTRACT_ZIP_FAILED'], PATH . 'styles');
} }
} }
else }
{ else
$adminAjaxContent = '1003:::' . sprintf($lang['EXTRACT_ZIP_FAILED'], PATH . 'styles'); {
} $adminAjaxContent = '1004:::' . $lang['DOWNLOADED_FILE_NOT_FOUND'];
} }
} }
else else
{ {
$adminAjaxContent = '1004:::' . $lang['DOWNLOADED_FILE_NOT_FOUND']; $adminAjaxContent = '1005:::' . $lang['STORE_SERVER_ERROR'];
} }
} }
else else
{ {
$adminAjaxContent = '1005:::' . $lang['STORE_SERVER_ERROR']; $adminAjaxContent = '1006:::' . $lang['PACKAGE_N_CMPT_KLJ'];
} }
} }
else else
{ {
$adminAjaxContent = '1006:::' . $lang['PACKAGE_N_CMPT_KLJ']; $adminAjaxContent = '1007:::' . sprintf($lang['PACKAGE_REMOTE_FILE_MISSING'], $style_name);
} }
} }
else else
{ {
$adminAjaxContent = '1007:::' . sprintf($lang['PACKAGE_REMOTE_FILE_MISSING'], $style_name); $adminAjaxContent = '1008:::' . $lang['STORE_SERVER_ERROR'];
} }
}
else
{
$adminAjaxContent = '1008:::' . $lang['STORE_SERVER_ERROR'];
}
//in case of update failure, rollback to current plugin version //in case of update failure, rollback to current plugin version
if (strpos($adminAjaxContent, '1:::') === false) if (strpos($adminAjaxContent, '1:::') === false)
{
if (file_exists(PATH . 'styles/' . $style_name . '_backup'))
{ {
rename( if (file_exists(PATH . 'styles/' . $style_name . '_backup'))
PATH . 'styles/' . $style_name . '_backup', {
PATH . 'styles/' . $style_name rename(
); PATH . 'styles/' . $style_name . '_backup',
PATH . 'styles/' . $style_name
);
}
} }
}
break; break;
endswitch; endswitch;

View File

@@ -55,7 +55,7 @@ if ($current_smt == 'check')
if (! ($version_data = $cache->get('kleeja_repo_version'))) if (! ($version_data = $cache->get('kleeja_repo_version')))
{ {
$version_data = []; $version_data = [];
$github_data = FetchFile::make(KLEEJA_VERSION_CHECK_LINK)->setTimeOut(100)->get(); $github_data = FetchFile::make(KLEEJA_VERSION_CHECK_LINK)->setTimeOut(100)->get();
if (! empty($github_data)) if (! empty($github_data))

View File

@@ -45,183 +45,183 @@ $text = '';
switch ($case): switch ($case):
default: default:
// Get real number from database right now // Get real number from database right now
$all_files = get_actual_stats('files'); $all_files = get_actual_stats('files');
$all_images = get_actual_stats('imgs'); $all_images = get_actual_stats('imgs');
$all_users = get_actual_stats('users'); $all_users = get_actual_stats('users');
$all_sizes = readable_size(get_actual_stats('sizes')); $all_sizes = readable_size(get_actual_stats('sizes'));
//links //links
$del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=clearc&amp;' . $GET_FORM_KEY; $del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=clearc&amp;' . $GET_FORM_KEY;
$resync_files_link = $config['siteurl'] . 'go.php?go=resync&amp;case=sync_files'; $resync_files_link = $config['siteurl'] . 'go.php?go=resync&amp;case=sync_files';
$resync_images_link = $config['siteurl'] . 'go.php?go=resync&amp;case=sync_images'; $resync_images_link = $config['siteurl'] . 'go.php?go=resync&amp;case=sync_images';
$resync_users_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=sync_users&amp;' . $GET_FORM_KEY; $resync_users_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=sync_users&amp;' . $GET_FORM_KEY;
$resync_sizes_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=sync_sizes&amp;' . $GET_FORM_KEY; $resync_sizes_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=sync_sizes&amp;' . $GET_FORM_KEY;
$repair_tables_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=tables&amp;' . $GET_FORM_KEY; $repair_tables_link = basename(ADMIN_PATH) . '?cp=r_repair&amp;case=tables&amp;' . $GET_FORM_KEY;
$queue_cron_job_url = $config['siteurl'] . 'go.php?go=queue'; $queue_cron_job_url = $config['siteurl'] . 'go.php?go=queue';
$stylee = 'admin_repair'; $stylee = 'admin_repair';
break; break;
// //
//fix tables .. //fix tables ..
// //
case 'tables': case 'tables':
$query = 'SHOW TABLE STATUS'; $query = 'SHOW TABLE STATUS';
$result = $SQL->query($query); $result = $SQL->query($query);
while ($row=$SQL->fetch_array($result)) while ($row=$SQL->fetch_array($result))
{
$queryf = 'REPAIR TABLE `' . $row['Name'] . '`';
$resultf = $SQL->query($queryf);
if ($resultf)
{
$text .= '<li>' . $lang['REPAIRE_TABLE'] . $row['Name'] . '</li>';
}
}
$SQL->freeresult($result);
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//
//re-sync sizes ..
//
case 'sync_sizes':
$query_s = [
'SELECT' => 'size',
'FROM' => "{$dbprefix}files"
];
$result_s = $SQL->build($query_s);
$files_number = $files_sizes = 0;
while ($row=$SQL->fetch_array($result_s))
{
$files_number++;
$files_sizes = $files_sizes+$row['size'];
}
$SQL->freeresult($result_s);
$update_query = [
'UPDATE' => "{$dbprefix}stats",
'SET' => 'files=' . $files_number . ', sizes=' . $files_sizes
];
if ($SQL->build($update_query))
{
$text .= '<li>' . $lang['REPAIRE_F_STAT'] . '</li>';
}
delete_cache('data_stats');
$stylee = 'admin_info';
break;
//
//re-sync total users number ..
//
case 'sync_users':
$query_w = [
'SELECT' => 'name',
'FROM' => "{$dbprefix}users"
];
$result_w = $SQL->build($query_w);
$user_number = 0;
while ($row=$SQL->fetch_array($result_w))
{
$user_number++;
}
$SQL->freeresult($result_w);
$update_query = [
'UPDATE' => "{$dbprefix}stats",
'SET' => 'users=' . $user_number
];
$result = $SQL->build($update_query);
delete_cache('data_stats');
$text = sprintf($lang['SYNCING'], $lang['USERS_ST']);
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//
//clear all cache ..
//
case 'clearc':
//clear cache
delete_cache('', true);
//show done, msg
$text .= '<li>' . $lang['REPAIRE_CACHE'] . '</li>';
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//toggle admin start boxes
case 'toggle_start_box':
if (! kleeja_check_form_key_get('adm_start_actions'))
{
header('HTTP/1.1 405 Method Not Allowed');
$adminAjaxContent = $lang['INVALID_FORM_KEY'];
}
else
{
$items = explode(':', $config['hidden_start_boxes']);
$new_items = $items = array_filter($items);
$name = g('name');
$hide = g('toggle', 'int') == 1;
if (in_array($name, $items) && ! $hide)
{ {
$new_items = array_diff($items, [$name]); $queryf = 'REPAIR TABLE `' . $row['Name'] . '`';
} $resultf = $SQL->query($queryf);
elseif ($hide)
{ if ($resultf)
$new_items[] = $name; {
$text .= '<li>' . $lang['REPAIRE_TABLE'] . $row['Name'] . '</li>';
}
} }
if ($new_items != $items) $SQL->freeresult($result);
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//
//re-sync sizes ..
//
case 'sync_sizes':
$query_s = [
'SELECT' => 'size',
'FROM' => "{$dbprefix}files"
];
$result_s = $SQL->build($query_s);
$files_number = $files_sizes = 0;
while ($row=$SQL->fetch_array($result_s))
{ {
update_config('hidden_start_boxes', implode(':', $new_items)); $files_number++;
$files_sizes = $files_sizes+$row['size'];
} }
$adminAjaxContent = $lang['CONFIGS_UPDATED']; $SQL->freeresult($result_s);
}
break; $update_query = [
'UPDATE' => "{$dbprefix}stats",
'SET' => 'files=' . $files_number . ', sizes=' . $files_sizes
];
if ($SQL->build($update_query))
{
$text .= '<li>' . $lang['REPAIRE_F_STAT'] . '</li>';
}
delete_cache('data_stats');
$stylee = 'admin_info';
break;
//
//re-sync total users number ..
//
case 'sync_users':
$query_w = [
'SELECT' => 'name',
'FROM' => "{$dbprefix}users"
];
$result_w = $SQL->build($query_w);
$user_number = 0;
while ($row=$SQL->fetch_array($result_w))
{
$user_number++;
}
$SQL->freeresult($result_w);
$update_query = [
'UPDATE' => "{$dbprefix}stats",
'SET' => 'users=' . $user_number
];
$result = $SQL->build($update_query);
delete_cache('data_stats');
$text = sprintf($lang['SYNCING'], $lang['USERS_ST']);
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//
//clear all cache ..
//
case 'clearc':
//clear cache
delete_cache('', true);
//show done, msg
$text .= '<li>' . $lang['REPAIRE_CACHE'] . '</li>';
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=r_repair' . '\');", 2000);</script>' . "\n";
$stylee = 'admin_info';
break;
//toggle admin start boxes
case 'toggle_start_box':
if (! kleeja_check_form_key_get('adm_start_actions'))
{
header('HTTP/1.1 405 Method Not Allowed');
$adminAjaxContent = $lang['INVALID_FORM_KEY'];
}
else
{
$items = explode(':', $config['hidden_start_boxes']);
$new_items = $items = array_filter($items);
$name = g('name');
$hide = g('toggle', 'int') == 1;
if (in_array($name, $items) && ! $hide)
{
$new_items = array_diff($items, [$name]);
}
elseif ($hide)
{
$new_items[] = $name;
}
if ($new_items != $items)
{
update_config('hidden_start_boxes', implode(':', $new_items));
}
$adminAjaxContent = $lang['CONFIGS_UPDATED'];
}
break;
endswitch; endswitch;

View File

@@ -84,7 +84,7 @@ if (! file_exists(PATH . '.htaccess') && (int) $config['mod_writer'] == 1)
} }
//updating //updating
$v = @unserialize($config['new_version']); $v = @unserialize($config['new_version']);
$new_version = isset($v['version_number']) ? $v['version_number'] : ''; $new_version = isset($v['version_number']) ? $v['version_number'] : '';
if (version_compare(strtolower(KLEEJA_VERSION), strtolower($new_version), '<')) if (version_compare(strtolower(KLEEJA_VERSION), strtolower($new_version), '<'))
@@ -266,9 +266,11 @@ $hurry_groups_list .= '<option value="' . $config['default_group'] . '">' . $lan
foreach ($d_groups as $id=>$ddt) foreach ($d_groups as $id=>$ddt)
{ {
$hurry_groups_list .= '<option value="' . $id . '">' . $hurry_groups_list .= '<option value="' . $id . '">' .
str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'], str_replace(
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']], ['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
$d_groups[$id]['data']['group_name']) . [$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
$d_groups[$id]['data']['group_name']
) .
'</option>'; '</option>';
} }

View File

@@ -62,14 +62,17 @@ class cache
$data_for_save .= 'if(time() > ' . (time() + $time) . ') return false;' . "\n\n"; $data_for_save .= 'if(time() > ' . (time() + $time) . ') return false;' . "\n\n";
$data_for_save .= '$data = ' . var_export($data, true) . ";\n\n//end of cache"; $data_for_save .= '$data = ' . var_export($data, true) . ";\n\n//end of cache";
try { try
{
$fd = fopen(PATH . 'cache/' . $name . '.php', 'w'); $fd = fopen(PATH . 'cache/' . $name . '.php', 'w');
flock($fd, LOCK_EX); // exclusive look flock($fd, LOCK_EX); // exclusive look
fwrite($fd, $data_for_save); fwrite($fd, $data_for_save);
flock($fd, LOCK_UN); flock($fd, LOCK_UN);
fclose($fd); fclose($fd);
return true; return true;
} catch (Exception $e) { }
catch (Exception $e)
{
return false; return false;
} }
} }

View File

@@ -46,7 +46,7 @@ function kleeja_cpatcha_image()
$height = 25; $height = 25;
//Generate a random number of lines to make the image dirty //Generate a random number of lines to make the image dirty
$lines = rand(3,5); $lines = rand(3, 5);
//Create the image resource //Create the image resource
$image = imagecreate($width, $height); $image = imagecreate($width, $height);
@@ -72,7 +72,7 @@ function kleeja_cpatcha_image()
// he search in the Linux fonts cache , but when you add './' he will know it's our font. // he search in the Linux fonts cache , but when you add './' he will know it's our font.
// //
imagettftext($image, 16, $angle, rand(50, $x), $y+rand(1, 3), $white, dirname(__FILE__) . '/arial.ttf', $security_code); imagettftext($image, 16, $angle, rand(50, $x), $y+rand(1, 3), $white, dirname(__FILE__) . '/arial.ttf', $security_code);
//imagettftext ($image, 7, 0, $width-30, $height-4, $white,'./arial.ttf', 'Kleeja'); //imagettftext ($image, 7, 0, $width-30, $height-4, $white,'./arial.ttf', 'Kleeja');
} }
else else
{ {
@@ -81,18 +81,20 @@ function kleeja_cpatcha_image()
} }
//Throw in some lines to make it a little bit harder for any bots to break //Throw in some lines to make it a little bit harder for any bots to break
imagerectangle($image, 0, 0, $width-1, $height-1, $grey); imagerectangle($image, 0, 0, $width-1, $height-1, $grey);
for( $i=0; $i<$lines; $i++ ) {
imageline($image, rand(0,$width), rand(0,$height), rand(0,$width), rand(0,$height), $grey); for ($i=0; $i<$lines; $i++)
{
imageline($image, rand(0, $width), rand(0, $height), rand(0, $width), rand(0, $height), $grey);
} }
//Tell the browser what kind of file is come in and prevent client side caching //Tell the browser what kind of file is come in and prevent client side caching
header("Expires: Wed, 1 Jan 1997 00:00:00 GMT"); header('Expires: Wed, 1 Jan 1997 00:00:00 GMT');
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header("Cache-Control: no-store, no-cache, must-revalidate"); header('Cache-Control: no-store, no-cache, must-revalidate');
header("Cache-Control: post-check=0, pre-check=0", FALSE); header('Cache-Control: post-check=0, pre-check=0', false);
header("Pragma: no-cache"); header('Pragma: no-cache');
header('Content-Type: image/png'); header('Content-Type: image/png');
//Output the newly created image in jpeg format //Output the newly created image in jpeg format

View File

@@ -59,10 +59,10 @@ error_reporting(defined('DEV_STAGE') ? E_ALL : E_ALL ^ E_NOTICE);
/** /**
* functions for start * functions for start
* @param mixed $error_number * @param mixed $error_number
* @param mixed $error_string * @param mixed $error_string
* @param mixed $error_file * @param mixed $error_file
* @param mixed $error_line * @param mixed $error_line
*/ */
function kleeja_show_error($error_number, $error_string = '', $error_file = '', $error_line = '') function kleeja_show_error($error_number, $error_string = '', $error_file = '', $error_line = '')
{ {
@@ -77,7 +77,7 @@ function kleeja_show_error($error_number, $error_string = '', $error_file = '',
kleeja_log('[' . $error_name . '] ' . basename($error_file) . ':' . $error_line . ' ' . $error_string); kleeja_log('[' . $error_name . '] ' . basename($error_file) . ':' . $error_line . ' ' . $error_string);
} }
break; break;
default: default:
header('HTTP/1.1 503 Service Temporarily Unavailable'); header('HTTP/1.1 503 Service Temporarily Unavailable');
@@ -98,7 +98,7 @@ function kleeja_show_error($error_number, $error_string = '', $error_file = '',
exit; exit;
break; break;
} }
} }
set_error_handler('kleeja_show_error'); set_error_handler('kleeja_show_error');
@@ -125,7 +125,7 @@ $starttm = get_microtime();
if (! is_bot() && PHP_SESSION_ACTIVE !== session_status() && ! headers_sent()) if (! is_bot() && PHP_SESSION_ACTIVE !== session_status() && ! headers_sent())
{ {
if(function_exists('ini_set')) if (function_exists('ini_set'))
{ {
ini_set('session.use_cookies', 1); ini_set('session.use_cookies', 1);
ini_set('session.lazy_write', 1); ini_set('session.lazy_write', 1);
@@ -135,7 +135,7 @@ if (! is_bot() && PHP_SESSION_ACTIVE !== session_status() && ! headers_sent())
} }
if(! session_start()) if (! session_start())
{ {
// big_error is not defined yet, and the file *function_display.php* is not included yet // big_error is not defined yet, and the file *function_display.php* is not included yet
kleeja_show_error('', 'Session Error!', 'There is a problem with PHP session. We can not start it.'); kleeja_show_error('', 'Session Error!', 'There is a problem with PHP session. We can not start it.');
@@ -150,19 +150,21 @@ if ((empty($dbname) || empty($dbuser)) && ($dbtype !== 'sqlite'))
{ {
$install_file_url = (defined('IN_ADMIN') ? '.' : '') . './install/index.php'; $install_file_url = (defined('IN_ADMIN') ? '.' : '') . './install/index.php';
if (file_exists(PATH . '/install/index.php')) { if (file_exists(PATH . '/install/index.php'))
{
header("Location: {$install_file_url}"); header("Location: {$install_file_url}");
exit; exit;
} }
kleeja_show_error( kleeja_show_error(
'', '',
"There is no (install) folder, and the config file is not correct", 'There is no (install) folder, and the config file is not correct',
'includes/common.php', 'includes/common.php',
__LINE__ __LINE__
); );
exit;
exit;
} }
// solutions for hosts running under suexec, add define('HAS_SUEXEC', true) to config.php. // solutions for hosts running under suexec, add define('HAS_SUEXEC', true) to config.php.
@@ -192,22 +194,32 @@ include PATH . 'includes/FetchFile.php';
if (defined('IN_ADMIN')) if (defined('IN_ADMIN'))
{ {
$currentDirectoryPath = dirname($_SERVER['PHP_SELF']); $currentDirectoryPath = dirname($_SERVER['PHP_SELF']);
$currentDirectoryPathParts = explode('/', $currentDirectoryPath); $currentDirectoryPathParts = explode('/', $currentDirectoryPath);
$currentDir = array_pop($currentDirectoryPathParts); $currentDir = array_pop($currentDirectoryPathParts);
$adminDirErrorMsg = ''; $adminDirErrorMsg = '';
if ($customadminpath == 'admin' && $currentDir != $customadminpath) {
if ($customadminpath == 'admin' && $currentDir != $customadminpath)
{
$adminDirErrorMsg = 'You are trying to access the admin area through a directory that is not configured. Please either revert to the default admin directory name, or see our documentation for customizing the admin directory.'; $adminDirErrorMsg = 'You are trying to access the admin area through a directory that is not configured. Please either revert to the default admin directory name, or see our documentation for customizing the admin directory.';
} else { }
if ($currentDir != $customadminpath) { else
{
if ($currentDir != $customadminpath)
{
$adminDirErrorMsg = 'You are trying to access the admin area through a directory different from the one configured. Please refer to the Customize Administrator\'s Guide documentation for instructions on how to update it.'; $adminDirErrorMsg = 'You are trying to access the admin area through a directory different from the one configured. Please refer to the Customize Administrator\'s Guide documentation for instructions on how to update it.';
} else { }
if ($customadminpath != 'admin' && is_dir(PATH . 'admin')) { else
{
if ($customadminpath != 'admin' && is_dir(PATH . 'admin'))
{
$adminDirErrorMsg = 'You are trying to access the admin area through a custom directory, but we also detected that there is a default directory \'admin\'. This may indicate that files from a recent update were uploaded to the default admin path location instead of the custom location, resulting in these files becoming outdated. Please make sure your custom admin folder contains the latest files, and delete the default admin directory to continue.'; $adminDirErrorMsg = 'You are trying to access the admin area through a custom directory, but we also detected that there is a default directory \'admin\'. This may indicate that files from a recent update were uploaded to the default admin path location instead of the custom location, resulting in these files becoming outdated. Please make sure your custom admin folder contains the latest files, and delete the default admin directory to continue.';
} }
} }
} }
if ($adminDirErrorMsg) {
if ($adminDirErrorMsg)
{
kleeja_show_error('', 'Critical Error', $adminDirErrorMsg); kleeja_show_error('', 'Critical Error', $adminDirErrorMsg);
} }
include PATH . 'includes/functions_adm.php'; include PATH . 'includes/functions_adm.php';
@@ -258,7 +270,7 @@ $config = array_merge($config, (array) $d_groups[$usrcp->group_id()]['configs'])
//admin path //admin path
define('ADMIN_PATH', rtrim($config['siteurl'], '/') . '/'. $customadminpath .'/index.php'); define('ADMIN_PATH', rtrim($config['siteurl'], '/') . '/' . $customadminpath . '/index.php');
//no tpl caching in dev stage //no tpl caching in dev stage
@@ -368,10 +380,10 @@ if (isset($_GET['go']) && $_GET['go'] == 'login')
//install.php exists //install.php exists
if ( if (
file_exists(PATH . 'install') && file_exists(PATH . 'install') &&
! defined('IN_ADMIN') && ! defined('IN_ADMIN') &&
! defined('IN_LOGIN') && ! defined('IN_LOGIN') &&
! defined('DEV_STAGE') && ! defined('DEV_STAGE') &&
! (defined('IN_GO') && in_array(g('go'), ['queue'])) && ! (defined('IN_GO') && in_array(g('go'), ['queue'])) &&
! (defined('IN_UCP') && in_array(g('go'), ['captcha', 'login'])) ! (defined('IN_UCP') && in_array(g('go'), ['captcha', 'login']))
) { ) {
@@ -384,18 +396,18 @@ if (
$login_page = ''; $login_page = '';
if ( if (
$config['siteclose'] == '1' && $config['siteclose'] == '1' &&
! user_can('enter_acp') && ! user_can('enter_acp') &&
! defined('IN_LOGIN') && ! defined('IN_LOGIN') &&
! defined('IN_ADMIN') && ! defined('IN_ADMIN') &&
! (defined('IN_GO') && in_array(g('go'), ['queue'])) && ! (defined('IN_GO') && in_array(g('go'), ['queue'])) &&
! (defined('IN_UCP') && in_array(g('go'), ['captcha', 'login', 'register', 'logout'])) ! (defined('IN_UCP') && in_array(g('go'), ['captcha', 'login', 'register', 'logout']))
) { ) {
//if download, images ? //if download, images ?
if ( if (
(defined('IN_DOWNLOAD') && (ig('img') || ig('thmb') || ig('thmbf') || ig('imgf'))) (defined('IN_DOWNLOAD') && (ig('img') || ig('thmb') || ig('thmbf') || ig('imgf')))
|| g('go', 'str', '') == 'queue' || g('go', 'str', '') == 'queue'
) { ) {
@$SQL->close(); @$SQL->close();
$fullname = 'images/site_closed.jpg'; $fullname = 'images/site_closed.jpg';
$filesize = filesize($fullname); $filesize = filesize($fullname);

View File

@@ -137,7 +137,7 @@ function get_ban()
/** /**
* Check if the given plugin installed ? * Check if the given plugin installed ?
* @param $plugin_name * @param $plugin_name
* @return bool * @return bool
*/ */
function kleeja_plugin_exists($plugin_name) function kleeja_plugin_exists($plugin_name)
@@ -211,7 +211,7 @@ function kleeja_get_page()
/** /**
* Fix email string to be UTF8 * Fix email string to be UTF8
* @param $text * @param $text
* @return string * @return string
*/ */
function _sm_mk_utf8($text) function _sm_mk_utf8($text)
@@ -268,7 +268,6 @@ function send_mail($to, $body, $subject, $fromAddress, $fromName, $bcc = '')
*/ */
function delete_cache($name, $all=false) function delete_cache($name, $all=false)
{ {
//Those files are exceptions and not for deletion //Those files are exceptions and not for deletion
$exceptions = ['.htaccess', 'index.html', 'php.ini', 'web.config']; $exceptions = ['.htaccess', 'index.html', 'php.ini', 'web.config'];
@@ -389,7 +388,7 @@ function kleeja_unlink($filePath, $cache_file = false)
*/ */
function get_mime_for_header($ext) function get_mime_for_header($ext)
{ {
$mime_types = include __DIR__.'/mime_types.php'; $mime_types = include __DIR__ . '/mime_types.php';
//return mime //return mime
$ext = strtolower($ext); $ext = strtolower($ext);
@@ -487,7 +486,7 @@ function get_config($name)
$result = $SQL->build($query); $result = $SQL->build($query);
$v = $SQL->fetch($result); $v = $SQL->fetch($result);
$return = isset($v['value']) ? $v['value'] : NULL; $return = isset($v['value']) ? $v['value'] : null;
is_array($plugin_run_result = Plugins::getInstance()->run('get_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('get_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
return $return; return $return;
@@ -555,7 +554,7 @@ function add_config($name, $value, $order = '0', $html = '', $type = '0', $plg_i
/** /**
* add an array of new configs * add an array of new configs
* @param $configs * @param $configs
* @return bool * @return bool
*/ */
function add_config_r($configs) function add_config_r($configs)
@@ -759,7 +758,8 @@ function delete_olang($words = '', $lang = 'en', $plg_id = 0)
{ {
if (is_array($lang)) if (is_array($lang))
{ {
foreach ($lang as $index=>$current_lang) { foreach ($lang as $index=>$current_lang)
{
$lang[$index] = $SQL->escape($lang[$index]); $lang[$index] = $SQL->escape($lang[$index]);
} }
$lang_sql = "(lang_id = '" . implode("' OR lang_id = '", $lang) . "')"; $lang_sql = "(lang_id = '" . implode("' OR lang_id = '", $lang) . "')";
@@ -900,6 +900,7 @@ function klj_clean_old_files($from = 0)
{ {
@kleeja_unlink($row['folder'] . '/' . $row['name']); @kleeja_unlink($row['folder'] . '/' . $row['name']);
} }
//delete thumb //delete thumb
if (file_exists($row['folder'] . '/thumbs/' . $row['name'])) if (file_exists($row['folder'] . '/thumbs/' . $row['name']))
{ {
@@ -1103,8 +1104,8 @@ function kleeja_log($text)
/** /**
* Return the first and last seek of range to be flushed. * Return the first and last seek of range to be flushed.
* @param string $range * @param string $range
* @param $fileSize * @param $fileSize
* @return array * @return array
*/ */
function kleeja_set_range($range, $fileSize) function kleeja_set_range($range, $fileSize)
@@ -1253,10 +1254,10 @@ function add_to_serve_rules($rules, $unique_id = '')
} }
$current_serve_content = preg_replace( $current_serve_content = preg_replace(
'/return\s{0,4}\[/', '/return\s{0,4}\[/',
'return [' . PHP_EOL . $rules, 'return [' . PHP_EOL . $rules,
$current_serve_content $current_serve_content
); );
if (! is_writable(PATH . 'plugins_rules.php')) if (! is_writable(PATH . 'plugins_rules.php'))
@@ -1285,7 +1286,7 @@ function remove_from_serve_rules($unique_id)
'/^#start_' . preg_quote($unique_id) . '.*' . '#end_' . preg_quote($unique_id) . '$/sm', '/^#start_' . preg_quote($unique_id) . '.*' . '#end_' . preg_quote($unique_id) . '$/sm',
'', '',
$current_serve_content $current_serve_content
); );
if ($new_serve_content === $current_serve_content) if ($new_serve_content === $current_serve_content)
{ {

View File

@@ -18,13 +18,13 @@ if (! defined('IN_COMMON'))
* Print cp error function handler * Print cp error function handler
* *
* For admin * For admin
* @param mixed $msg * @param mixed $msg
* @param mixed $navigation * @param mixed $navigation
* @param mixed $title * @param mixed $title
* @param mixed $exit * @param mixed $exit
* @param mixed $redirect * @param mixed $redirect
* @param mixed $rs * @param mixed $rs
* @param mixed $style * @param mixed $style
*/ */
function kleeja_admin_err($msg, $navigation = true, $title='', $exit = true, $redirect = false, $rs = 3, $style = 'admin_err') function kleeja_admin_err($msg, $navigation = true, $title='', $exit = true, $redirect = false, $rs = 3, $style = 'admin_err')
{ {
@@ -258,6 +258,7 @@ function build_search_query($search)
//if searched by a username //if searched by a username
$usernamee = ''; $usernamee = '';
if (! empty($search['username']) && (int) $config['user_system'] == 1) if (! empty($search['username']) && (int) $config['user_system'] == 1)
{ {
$query = [ $query = [
@@ -276,7 +277,7 @@ function build_search_query($search)
$SQL->freeresult($result); $SQL->freeresult($result);
if(! empty($usernamee)) if (! empty($usernamee))
{ {
$usernamee = 'AND (' . $usernamee . ')'; $usernamee = 'AND (' . $usernamee . ')';
} }

View File

@@ -205,7 +205,7 @@ function readable_size($size)
/** /**
* show an error message * show an error message
* *
* @param $message * @param $message
* @param string $title * @param string $title
* @param bool $exit * @param bool $exit
* @param bool|string $redirect a link to redirect after showing the message, or false * @param bool|string $redirect a link to redirect after showing the message, or false
@@ -240,7 +240,7 @@ function kleeja_err($message, $title = '', $exit = true, $redirect = false, $rs
/** /**
* show an information message * show an information message
* *
* @param $message * @param $message
* @param string $title * @param string $title
* @param bool $exit * @param bool $exit
* @param bool|string $redirect a link to redirect after showing the message, or false * @param bool|string $redirect a link to redirect after showing the message, or false
@@ -291,7 +291,7 @@ function kleeja_debug()
echo '<p>&nbsp;</p>'; echo '<p>&nbsp;</p>';
echo '<p><h2><strong><em>SQL</em> Information :</strong></h2></p> '; echo '<p><h2><strong><em>SQL</em> Information :</strong></h2></p> ';
if (!empty($SQL->debugr)) if (! empty($SQL->debugr))
{ {
foreach ($SQL->debugr as $key=>$val) foreach ($SQL->debugr as $key=>$val)
{ {
@@ -495,7 +495,7 @@ function kleeja_check_form_key($form_name, $require_time = 300)
* Link generator * Link generator
* TODO to be edited * TODO to be edited
* Files can be many links styles, so this will generate the current style of link * Files can be many links styles, so this will generate the current style of link
* @param $pid * @param $pid
* @param array $extra * @param array $extra
* @return string * @return string
*/ */
@@ -514,8 +514,8 @@ function kleeja_get_link ($pid, $extra = [])
if ($config['mod_writer'] && ! empty($extra['::NAME::'])) if ($config['mod_writer'] && ! empty($extra['::NAME::']))
{ {
if ( if (
(($pid == 'image' || $pid == 'thumb') && $config['id_form_img'] != 'direct') || (($pid == 'image' || $pid == 'thumb') && $config['id_form_img'] != 'direct') ||
($pid == 'file' && $config['id_form'] != 'direct') ($pid == 'file' && $config['id_form'] != 'direct')
) { ) {
$extra['::NAME::'] = str_replace('.', '-', $extra['::NAME::']); $extra['::NAME::'] = str_replace('.', '-', $extra['::NAME::']);
} }
@@ -671,6 +671,7 @@ function kleeja_style_info($style_name)
} }
$t = array_map('trim', @explode('=', $m, 2)); $t = array_map('trim', @explode('=', $m, 2));
// ':' mean something secondary as in sub-array // ':' mean something secondary as in sub-array
if (strpos($t[0], ':') !== false) if (strpos($t[0], ':') !== false)
{ {
@@ -730,52 +731,53 @@ function is_browser($b)
case 'ie': case 'ie':
$return = strpos(strtolower($u_agent), trim('msie ' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('msie ' . $r)) !== false ? true : false;
break; break;
case 'firefox': case 'firefox':
$return = strpos(str_replace('/', ' ', strtolower($u_agent)), trim('firefox ' . $r)) !== false ? true : false; $return = strpos(str_replace('/', ' ', strtolower($u_agent)), trim('firefox ' . $r)) !== false ? true : false;
break; break;
case 'safari': case 'safari':
$return = strpos(strtolower($u_agent), trim('safari/' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('safari/' . $r)) !== false ? true : false;
break; break;
case 'chrome': case 'chrome':
$return = strpos(strtolower($u_agent), trim('chrome ' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('chrome ' . $r)) !== false ? true : false;
break; break;
case 'flock': case 'flock':
$return = strpos(strtolower($u_agent), trim('flock ' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('flock ' . $r)) !== false ? true : false;
break; break;
case 'opera': case 'opera':
$return = strpos(strtolower($u_agent), trim('opera ' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('opera ' . $r)) !== false ? true : false;
break; break;
case 'konqueror': case 'konqueror':
$return = strpos(strtolower($u_agent), trim('konqueror/' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('konqueror/' . $r)) !== false ? true : false;
break; break;
case 'mozilla': case 'mozilla':
$return = strpos(strtolower($u_agent), trim('gecko/' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('gecko/' . $r)) !== false ? true : false;
break; break;
case 'webkit': case 'webkit':
$return = strpos(strtolower($u_agent), trim('applewebkit/' . $r)) !== false ? true : false; $return = strpos(strtolower($u_agent), trim('applewebkit/' . $r)) !== false ? true : false;
break; break;
/**
* Mobile Phones are so popular those days, so we have to support them ... /**
* This is still in our test lab. * Mobile Phones are so popular those days, so we have to support them ...
* @see http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones * This is still in our test lab.
**/ * @see http://en.wikipedia.org/wiki/List_of_user_agents_for_mobile_phones
**/
case 'mobile': case 'mobile':
$mobile_agents = ['iPhone;', 'iPod;', 'blackberry', 'Android', 'HTC' , 'IEMobile', 'LG/', 'LG-', $mobile_agents = ['iPhone;', 'iPod;', 'blackberry', 'Android', 'HTC' , 'IEMobile', 'LG/', 'LG-',
'LGE-', 'MOT-', 'Nokia', 'SymbianOS', 'nokia_', 'PalmSource', 'webOS', 'SAMSUNG-', 'LGE-', 'MOT-', 'Nokia', 'SymbianOS', 'nokia_', 'PalmSource', 'webOS', 'SAMSUNG-',
@@ -792,7 +794,7 @@ function is_browser($b)
} }
} }
break; break;
} }
is_array($plugin_run_result = Plugins::getInstance()->run('is_browser_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('is_browser_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
@@ -847,7 +849,7 @@ function kleeja_date($time, $human_time = true, $format = false)
if (! empty($config['time_zone']) && strpos($config['time_zone'], '/') !== false) if (! empty($config['time_zone']) && strpos($config['time_zone'], '/') !== false)
{ {
if(strpos($config['time_zone'], 'Buraydah') !== false) if (strpos($config['time_zone'], 'Buraydah') !== false)
{ {
$config['time_zone'] = 'Asia/Riyadh'; $config['time_zone'] = 'Asia/Riyadh';
} }
@@ -951,7 +953,8 @@ function time_zones()
*/ */
function configField($name, $type = 'text', $select_options = []) function configField($name, $type = 'text', $select_options = [])
{ {
switch ($type) { switch ($type)
{
default: default:
case 'text': case 'text':
return '<input type="text" id="kj_meta_seo_home_meta_keywords" name="' . $name . '"' . return '<input type="text" id="kj_meta_seo_home_meta_keywords" name="' . $name . '"' .

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -19,8 +19,8 @@ class Pagination
protected $totalPages, $startRow , $currentPage; protected $totalPages, $startRow , $currentPage;
/** /**
* @param $rowsPerPage * @param $rowsPerPage
* @param $numRows * @param $numRows
* @param int $currentPage * @param int $currentPage
*/ */
public function __construct($rowsPerPage, $numRows, $currentPage = 1) public function __construct($rowsPerPage, $numRows, $currentPage = 1)
@@ -91,7 +91,7 @@ class Pagination
/** /**
* @param $link * @param $link
* @param string $link_plus * @param string $link_plus
* @return string * @return string
*/ */

View File

@@ -51,6 +51,7 @@ class PasswordHash
$this->portable_hashes = $portable_hashes; $this->portable_hashes = $portable_hashes;
$this->random_state = microtime(); $this->random_state = microtime();
if (function_exists('getmypid')) if (function_exists('getmypid'))
{ {
$this->random_state .= getmypid(); $this->random_state .= getmypid();
@@ -114,7 +115,8 @@ class PasswordHash
break; break;
} }
$output .= $this->itoa64[($value >> 18) & 0x3f]; $output .= $this->itoa64[($value >> 18) & 0x3f];
} while ($i < $count); }
while ($i < $count);
return $output; return $output;
} }
@@ -138,6 +140,7 @@ class PasswordHash
} }
$id = substr($setting, 0, 3); $id = substr($setting, 0, 3);
// We use "$P$", phpBB3 uses "$H$" for the same thing // We use "$P$", phpBB3 uses "$H$" for the same thing
if ($id !== '$P$' && $id !== '$H$') if ($id !== '$P$' && $id !== '$H$')
{ {
@@ -170,7 +173,8 @@ class PasswordHash
do do
{ {
$hash = md5($hash . $password, true); $hash = md5($hash . $password, true);
} while (--$count); }
while (--$count);
$output = substr($setting, 0, 12); $output = substr($setting, 0, 12);
$output .= $this->encode64($hash, 16); $output .= $this->encode64($hash, 16);
@@ -191,7 +195,7 @@ class PasswordHash
$itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$output = '$2a$'; $output = '$2a$';
$output .= chr((int)(ord('0') + $this->iteration_count_log2 / 10)); $output .= chr((int) (ord('0') + $this->iteration_count_log2 / 10));
$output .= chr(ord('0') + $this->iteration_count_log2 % 10); $output .= chr(ord('0') + $this->iteration_count_log2 % 10);
$output .= '$'; $output .= '$';
@@ -218,7 +222,8 @@ class PasswordHash
$c1 |= $c2 >> 6; $c1 |= $c2 >> 6;
$output .= $itoa64[$c1]; $output .= $itoa64[$c1];
$output .= $itoa64[$c2 & 0x3f]; $output .= $itoa64[$c2 & 0x3f];
} while (1); }
while (1);
return $output; return $output;
} }
@@ -243,8 +248,10 @@ class PasswordHash
$random = $this->get_random_bytes(6); $random = $this->get_random_bytes(6);
} }
$hash = $hash =
$this->crypt_private($password, $this->crypt_private(
$this->gensalt_private($random)); $password,
$this->gensalt_private($random)
);
if (strlen($hash) === 34) if (strlen($hash) === 34)
{ {

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,8 @@
//no direct access //no direct access
if (! defined('IN_COMMON')) { if (! defined('IN_COMMON'))
{
exit; exit;
} }
@@ -22,7 +23,7 @@ class kleeja_style
/** /**
* Function to load a template file. * Function to load a template file.
* @param $template_name * @param $template_name
* @param null|mixed $style_path * @param null|mixed $style_path
*/ */
protected function _load_template($template_name, $style_path = null) protected function _load_template($template_name, $style_path = null)
@@ -30,7 +31,8 @@ class kleeja_style
global $config, $THIS_STYLE_PATH_ABS, $STYLE_PATH_ADMIN_ABS, $DEFAULT_PATH_ADMIN_ABS; global $config, $THIS_STYLE_PATH_ABS, $STYLE_PATH_ADMIN_ABS, $DEFAULT_PATH_ADMIN_ABS;
if (! ($template_path = $this->template_exists($template_name, $style_path))) { if (! ($template_path = $this->template_exists($template_name, $style_path)))
{
big_error('No Template !', 'Requested <b>"' . $template_name . '"</b> template doesnt exist!'); big_error('No Template !', 'Requested <b>"' . $template_name . '"</b> template doesnt exist!');
} }
@@ -39,7 +41,8 @@ class kleeja_style
$html = "<!-- file generated by kleeja {kleeja.net} -->\n" . $html; $html = "<!-- file generated by kleeja {kleeja.net} -->\n" . $html;
//use 'b' to force binary mode //use 'b' to force binary mode
if ($filename = @fopen(PATH . 'cache/tpl_' . $this->re_name_tpl($template_name, $style_path) . '.php', 'wb')) { if ($filename = @fopen(PATH . 'cache/tpl_' . $this->re_name_tpl($template_name, $style_path) . '.php', 'wb'))
{
is_array($plugin_run_result = Plugins::getInstance()->run('style_load_template_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('style_load_template_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
@@ -54,7 +57,7 @@ class kleeja_style
/** /**
* check if a template exists or not * check if a template exists or not
* @param $template_name * @param $template_name
* @param null $style_path * @param null $style_path
*/ */
public function template_exists($template_name, $style_path = null) public function template_exists($template_name, $style_path = null)
@@ -67,10 +70,13 @@ class kleeja_style
$style_path = str_replace(DIRECTORY_SEPARATOR, '/', $style_path ?? ''); $style_path = str_replace(DIRECTORY_SEPARATOR, '/', $style_path ?? '');
//admin template always begin with admin_ //admin template always begin with admin_
if (substr($template_name, 0, 6) == 'admin_') { if (substr($template_name, 0, 6) == 'admin_')
{
$current_style_path = ! empty($style_path) ? $style_path : $STYLE_PATH_ADMIN_ABS; $current_style_path = ! empty($style_path) ? $style_path : $STYLE_PATH_ADMIN_ABS;
$is_admin_template = true; $is_admin_template = true;
} else { }
else
{
$current_style_path = ! empty($style_path) ? $style_path : $THIS_STYLE_PATH_ABS; $current_style_path = ! empty($style_path) ? $style_path : $THIS_STYLE_PATH_ABS;
} }
@@ -82,21 +88,29 @@ class kleeja_style
$is_tpl_exist = file_exists($template_path); $is_tpl_exist = file_exists($template_path);
if (! $is_tpl_exist) { if (! $is_tpl_exist)
if (trim($config['style_depend_on']) != '') { {
if (trim($config['style_depend_on']) != '')
{
$template_path_alternative = str_replace('/' . $config['style'] . '/', '/' . $config['style_depend_on'] . '/', $template_path); $template_path_alternative = str_replace('/' . $config['style'] . '/', '/' . $config['style_depend_on'] . '/', $template_path);
if (file_exists($template_path_alternative)) { if (file_exists($template_path_alternative))
{
$template_path = $template_path_alternative; $template_path = $template_path_alternative;
$is_tpl_exist = true; $is_tpl_exist = true;
} }
} elseif ($is_admin_template) { }
elseif ($is_admin_template)
{
$template_path = $DEFAULT_PATH_ADMIN_ABS . $template_name . '.html'; $template_path = $DEFAULT_PATH_ADMIN_ABS . $template_name . '.html';
$is_tpl_exist = true; $is_tpl_exist = true;
} elseif ($config['style'] != 'default' && ! $is_admin_template) { }
elseif ($config['style'] != 'default' && ! $is_admin_template)
{
$template_path_alternative = str_replace('/' . $config['style'] . '/', '/default/', $template_path); $template_path_alternative = str_replace('/' . $config['style'] . '/', '/default/', $template_path);
if (file_exists($template_path_alternative)) { if (file_exists($template_path_alternative))
{
$template_path = $template_path_alternative; $template_path = $template_path_alternative;
$is_tpl_exist = true; $is_tpl_exist = true;
} }
@@ -150,7 +164,7 @@ class kleeja_style
/** /**
* if tag * if tag
* @param $matches * @param $matches
* @return string * @return string
*/ */
protected function _if_callback($matches) protected function _if_callback($matches)
@@ -160,14 +174,16 @@ class kleeja_style
foreach ([ foreach ([
'NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || ', 'ISSET' => ' isset', 'EMPTY' => ' empty' 'NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || ', 'ISSET' => ' isset', 'EMPTY' => ' empty'
] as $attribute=>$separator) { ] as $attribute=> $separator)
if (isset($atts[$attribute])) { {
if (isset($atts[$attribute]))
{
$haveParentheses = in_array($attribute, ['ISSET', 'EMPTY']); $haveParentheses = in_array($attribute, ['ISSET', 'EMPTY']);
$condition .= $separator . ($haveParentheses ? '(' : '') . $condition .= $separator . ($haveParentheses ? '(' : '') .
$this->parse_condition($atts[$attribute], ! empty($atts['LOOP'])) . $this->parse_condition($atts[$attribute], ! empty($atts['LOOP'])) .
($haveParentheses ? ')' : '') ($haveParentheses ? ')' : '')
; ;
} }
} }
@@ -181,25 +197,30 @@ class kleeja_style
$char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>']; $char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>'];
$reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>']; $reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>'];
if (trim($condition) == '') { if (trim($condition) == '')
{
return ''; return '';
} }
$con = str_replace('$this->vars', '[----this-vars----]', $condition); $con = str_replace('$this->vars', '[----this-vars----]', $condition);
if (preg_match('/(.*)(' . implode('|', $char) . ')(.*)/i', $con, $arr)) { if (preg_match('/(.*)(' . implode('|', $char) . ')(.*)/i', $con, $arr))
{
$arr[1] = trim($arr[1]); $arr[1] = trim($arr[1]);
$var1 = $arr[1][0] != '$' ? call_user_func(['kleeja_style', '_var_callback'], (! $is_loop ? '{' . $arr[1] . '}' : '{{' . $arr[1] . '}}')) : $arr[1]; $var1 = $arr[1][0] != '$' ? call_user_func(['kleeja_style', '_var_callback'], (! $is_loop ? '{' . $arr[1] . '}' : '{{' . $arr[1] . '}}')) : $arr[1];
$opr = str_replace($char, $reps, $arr[2]); $opr = str_replace($char, $reps, $arr[2]);
$var2 = trim($arr[3]); $var2 = trim($arr[3]);
//check for type //check for type
if (strpos($var2, '$')!==0 && ! preg_match('/[0-9]/', $var2)) { if (strpos($var2, '$')!==0 && ! preg_match('/[0-9]/', $var2))
{
$var2 = '"' . str_replace('"', '\"', $var2) . '"'; $var2 = '"' . str_replace('"', '\"', $var2) . '"';
} }
$con = "$var1 $opr $var2"; $con = "$var1 $opr $var2";
} elseif ($con[0] !== '$' && strpos($con, '(') === false) { }
elseif ($con[0] !== '$' && strpos($con, '(') === false)
{
$con = call_user_func(['kleeja_style', '_var_callback'], (! $is_loop ? '{' . $con . '}' : '{{' . $con . '}}')); $con = call_user_func(['kleeja_style', '_var_callback'], (! $is_loop ? '{' . $con . '}' : '{{' . $con . '}}'));
} }
@@ -209,14 +230,15 @@ class kleeja_style
/** /**
* make variable printable * make variable printable
* @param $matches * @param $matches
* @return string * @return string
*/ */
protected function _vars_callback($matches) protected function _vars_callback($matches)
{ {
$variable = call_user_func(['kleeja_style', '_var_callback'], $matches); $variable = call_user_func(['kleeja_style', '_var_callback'], $matches);
if (strpos($matches[0], '{lang') !== false || strpos($matches[0], '{olang') !== false) { if (strpos($matches[0], '{lang') !== false || strpos($matches[0], '{olang') !== false)
{
return '<?=' . $variable . ' ?? \'' . $matches[0] . '\'?>'; return '<?=' . $variable . ' ?? \'' . $matches[0] . '\'?>';
} }
@@ -226,18 +248,20 @@ class kleeja_style
/** /**
* variable replace * variable replace
* @param $matches * @param $matches
* @return string * @return string
*/ */
protected function _var_callback($matches) protected function _var_callback($matches)
{ {
if (! is_array($matches)) { if (! is_array($matches))
{
preg_match(kleeja_style::reg('var'), $matches, $matches); preg_match(kleeja_style::reg('var'), $matches, $matches);
} }
$var = trim(! empty($matches[2]) ? str_replace('.', '\'][\'', $matches[2]) : ''); $var = trim(! empty($matches[2]) ? str_replace('.', '\'][\'', $matches[2]) : '');
if (empty($var)) { if (empty($var))
{
return ''; return '';
} }
@@ -246,7 +270,7 @@ class kleeja_style
/** /**
* att variable replace * att variable replace
* @param $matches * @param $matches
* @return string * @return string
*/ */
protected function _var_callback_att($matches) protected function _var_callback_att($matches)
@@ -257,7 +281,7 @@ class kleeja_style
/** /**
* get reg var * get reg var
* @param $var * @param $var
* @return mixed * @return mixed
*/ */
protected function reg($var) protected function reg($var)
@@ -269,7 +293,7 @@ class kleeja_style
/** /**
* get tag attributes * get tag attributes
* @param $tag * @param $tag
* @return array * @return array
*/ */
protected function _get_attributes($tag) protected function _get_attributes($tag)
@@ -278,7 +302,8 @@ class kleeja_style
$attributes = []; $attributes = [];
for ($i = 0; $i < count($attribute[1]); $i++) { for ($i = 0; $i < count($attribute[1]); $i++)
{
$att = strtoupper($attribute[1][$i]); $att = strtoupper($attribute[1][$i]);
$attributes[$att] = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_var_callback'], $attribute[2][$i]); $attributes[$att] = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_var_callback'], $attribute[2][$i]);
@@ -299,8 +324,8 @@ class kleeja_style
/** /**
* load parser and return page content * load parser and return page content
* @param $template_name * @param $template_name
* @param null $style_path optional, good for plugins * @param null $style_path optional, good for plugins
* @return mixed|string * @return mixed|string
*/ */
public function display($template_name, $style_path = null) public function display($template_name, $style_path = null)
@@ -310,7 +335,8 @@ class kleeja_style
$this->vars = $GLOBALS; $this->vars = $GLOBALS;
//is there ? //is there ?
if (! file_exists(PATH . 'cache/tpl_' . $this->re_name_tpl($template_name, $style_path) . '.php') || ! $this->caching) { if (! file_exists(PATH . 'cache/tpl_' . $this->re_name_tpl($template_name, $style_path) . '.php') || ! $this->caching)
{
$this->_load_template($template_name, $style_path); $this->_load_template($template_name, $style_path);
} }
@@ -324,7 +350,7 @@ class kleeja_style
/** /**
* generate admin option block * generate admin option block
* @param $html * @param $html
* @return string * @return string
*/ */
public function admindisplayoption($html) public function admindisplayoption($html)
@@ -338,9 +364,12 @@ class kleeja_style
ob_start(); ob_start();
if ($eval_on) { if ($eval_on)
{
eval(' ?' . '>' . $parsed_html . '<' . '?php '); eval(' ?' . '>' . $parsed_html . '<' . '?php ');
} else { }
else
{
$path = PATH . 'cache/tpl_' . md5($parsed_html) . '.php'; $path = PATH . 'cache/tpl_' . md5($parsed_html) . '.php';
file_put_contents($path, $parsed_html); file_put_contents($path, $parsed_html);
include_once $path; include_once $path;
@@ -354,7 +383,7 @@ class kleeja_style
/** /**
* change name of template to be valid * change name of template to be valid
* @param $name * @param $name
* @param null|mixed $style_path * @param null|mixed $style_path
* @return mixed * @return mixed
*/ */

View File

@@ -65,9 +65,9 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
//get file info //get file info
list($source_width, $source_height, $source_type) = getimagesize($source_path); list($source_width, $source_height, $source_type) = getimagesize($source_path);
$source_gdim = false; $source_gdim = false;
switch ($source_type) switch ($source_type)
{ {
case IMAGETYPE_GIF: case IMAGETYPE_GIF:
@@ -123,10 +123,14 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
imagecopyresampled( imagecopyresampled(
$temp_gdim, $temp_gdim,
$source_gdim, $source_gdim,
0, 0, 0,
0, 0, 0,
$temp_width, $temp_height, 0,
$source_width, $source_height 0,
$temp_width,
$temp_height,
$source_width,
$source_height
); );
// Copy cropped region from temporary image into the desired GD image // Copy cropped region from temporary image into the desired GD image
@@ -137,9 +141,12 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
imagecopy( imagecopy(
$desired_gdim, $desired_gdim,
$temp_gdim, $temp_gdim,
0, 0, 0,
$x0, $y0, 0,
$dw, $dh $x0,
$y0,
$dw,
$dh
); );
// Create thumbnail // Create thumbnail
@@ -159,7 +166,7 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
case 'gif': case 'gif':
$return = @imagegif($desired_gdim, $dest_image); $return = @imagegif($desired_gdim, $dest_image);
break; break;
case 'bmp': case 'bmp':
$return = @imagebmp($desired_gdim, $dest_image); $return = @imagebmp($desired_gdim, $dest_image);
@@ -234,21 +241,24 @@ function helper_thumb_imagick($name, $ext, $filename, $new_w, $new_h)
//guess the right thumb height, weights //guess the right thumb height, weights
list($thumb_w, $thumb_h) = scale_image_imagick( list($thumb_w, $thumb_h) = scale_image_imagick(
$im->getImageWidth(), $im->getImageWidth(),
$im->getImageHeight(), $im->getImageHeight(),
$new_w, $new_w,
$new_h); $new_h
);
//an exception for gif image //an exception for gif image
//generating thumb with 10 frames only, big gif is a devil //generating thumb with 10 frames only, big gif is a devil
if ($ext == 'gif') if ($ext == 'gif')
{ {
$i = 0; $i = 0;
//$gif_new = new Imagick(); //$gif_new = new Imagick();
foreach ($im as $frame) foreach ($im as $frame)
{ {
$frame->thumbnailImage($thumb_w, $thumb_h); $frame->thumbnailImage($thumb_w, $thumb_h);
$frame->setImagePage($thumb_w, $thumb_h, 0, 0); $frame->setImagePage($thumb_w, $thumb_h, 0, 0);
// $gif_new->addImage($frame->getImage()); // $gif_new->addImage($frame->getImage());
if ($i >= 10) if ($i >= 10)
{ {

View File

@@ -18,8 +18,8 @@ if (! defined('IN_COMMON'))
* return nothing because if it work then ok , and if not then ok too :) * return nothing because if it work then ok , and if not then ok too :)
* @todo text support * @todo text support
* *
* @param $name * @param $name
* @param $ext * @param $ext
* @return bool|void * @return bool|void
*/ */
function helper_watermark($name, $ext) function helper_watermark($name, $ext)
@@ -64,12 +64,12 @@ function helper_watermark($name, $ext)
helper_watermark_imagick($name, $ext, $logo_path); helper_watermark_imagick($name, $ext, $logo_path);
return; return;
} }
//now, lets work and detect our image extension //now, lets work and detect our image extension
list($bwidth, $bheight, $src_img_type) = getimagesize($name); list($bwidth, $bheight, $src_img_type) = getimagesize($name);
$src_img = false; $src_img = false;
switch ($src_img_type) switch ($src_img_type)
{ {
case IMAGETYPE_GIF: case IMAGETYPE_GIF:
@@ -182,6 +182,7 @@ function helper_watermark_imagick($name, $ext, $logo)
if ($ext == 'gif') if ($ext == 'gif')
{ {
$i = 0; $i = 0;
//$gif_new = new Imagick(); //$gif_new = new Imagick();
foreach ($im as $frame) foreach ($im as $frame)
{ {

View File

@@ -9,7 +9,8 @@
//no for directly open //no for directly open
if (! defined('IN_COMMON')) { if (! defined('IN_COMMON'))
{
exit(); exit();
} }
@@ -234,24 +235,27 @@ class defaultUploader implements KleejaUploader
// show del code link box // show del code link box
$extra_del = ''; $extra_del = '';
if ($config['del_url_file']) { if ($config['del_url_file'])
{
$extra_del = get_up_tpl_box( $extra_del = get_up_tpl_box(
'del_file_code', 'del_file_code',
[ [
'b_title' => $lang['URL_F_DEL'], 'b_title' => $lang['URL_F_DEL'],
'b_code_link' => kleeja_get_link('del', ['::CODE::'=>$fileInfo['DeleteCode']]) 'b_code_link' => kleeja_get_link('del', ['::CODE::'=>$fileInfo['DeleteCode']])
] ]
); );
} }
//show imgs //show imgs
if ($is_img) { if ($is_img)
{
$img_html_result = ''; $img_html_result = '';
// get default thumb dimensions // get default thumb dimensions
$thmb_dim_w = $thmb_dim_h = 150; $thmb_dim_w = $thmb_dim_h = 150;
if (strpos($config['thmb_dims'], '*') !== false) { if (strpos($config['thmb_dims'], '*') !== false)
{
list($thmb_dim_w, $thmb_dim_h) = array_map('trim', explode('*', $config['thmb_dims'])); list($thmb_dim_w, $thmb_dim_h) = array_map('trim', explode('*', $config['thmb_dims']));
} }
@@ -268,15 +272,16 @@ class defaultUploader implements KleejaUploader
$img_html_result .= get_up_tpl_box( $img_html_result .= get_up_tpl_box(
'image_thumb', 'image_thumb',
[ [
'b_title' => $lang['URL_F_THMB'], 'b_title' => $lang['URL_F_THMB'],
'b_url_link' => kleeja_get_link('image', $file_info), 'b_url_link' => kleeja_get_link('image', $file_info),
'b_img_link' => kleeja_get_link('thumb', $file_info) 'b_img_link' => kleeja_get_link('thumb', $file_info)
] ]
); );
// watermark on image // watermark on image
if ($config['write_imgs'] != 0 && in_array($fileInfo['fileExtension'], ['gif', 'png', 'jpg', 'jpeg', 'bmp'])) { if ($config['write_imgs'] != 0 && in_array($fileInfo['fileExtension'], ['gif', 'png', 'jpg', 'jpeg', 'bmp']))
{
helper_watermark($fileInfo['saveToFolder'] . '/' . $fileInfo['generatedFileName'], $fileInfo['fileExtension']); helper_watermark($fileInfo['saveToFolder'] . '/' . $fileInfo['generatedFileName'], $fileInfo['fileExtension']);
} }
@@ -284,10 +289,10 @@ class defaultUploader implements KleejaUploader
$img_html_result .= get_up_tpl_box( $img_html_result .= get_up_tpl_box(
'image', 'image',
[ [
'b_title' => $lang['URL_F_IMG'], 'b_title' => $lang['URL_F_IMG'],
'b_bbc_title' => $lang['URL_F_BBC'], 'b_bbc_title' => $lang['URL_F_BBC'],
'b_url_link' => kleeja_get_link('image', $file_info), 'b_url_link' => kleeja_get_link('image', $file_info),
] ]
); );
//add del link box to the result if there is any //add del link box to the result if there is any
@@ -302,15 +307,17 @@ class defaultUploader implements KleejaUploader
htmlspecialchars($fileInfo['originalFileName']) . '</div>' . "\n" . htmlspecialchars($fileInfo['originalFileName']) . '</div>' . "\n" .
$img_html_result $img_html_result
); );
} else { }
else
{
//then show other files //then show other files
$else_html_result = get_up_tpl_box( $else_html_result = get_up_tpl_box(
'file', 'file',
[ [
'b_title' => $lang['URL_F_FILE'], 'b_title' => $lang['URL_F_FILE'],
'b_bbc_title' => $lang['URL_F_BBC'], 'b_bbc_title' => $lang['URL_F_BBC'],
'b_url_link' => kleeja_get_link('file', $file_info), 'b_url_link' => kleeja_get_link('file', $file_info),
] ]
); );
@@ -356,28 +363,34 @@ class defaultUploader implements KleejaUploader
// check folder our real folder // check folder our real folder
if (! file_exists($current_uploading_folder)) { if (! file_exists($current_uploading_folder))
if (! make_folder($current_uploading_folder)) { {
if (! make_folder($current_uploading_folder))
{
$this->addErrorMessage($lang['CANT_DIR_CRT']); $this->addErrorMessage($lang['CANT_DIR_CRT']);
} }
} }
if ($return_now) { if ($return_now)
{
return; return;
} }
// is captcha on, and there is uploading going on // is captcha on, and there is uploading going on
if ($captcha_enabled) { if ($captcha_enabled)
{
//captcha is wrong //captcha is wrong
if (! kleeja_check_captcha()) { if (! kleeja_check_captcha())
{
$this->addErrorMessage($lang['WRONG_VERTY_CODE']); $this->addErrorMessage($lang['WRONG_VERTY_CODE']);
return; return;
} }
} }
// to prevent flooding, user must wait, waiting-time is grapped from Kleeja settings, admin is exceptional // to prevent flooding, user must wait, waiting-time is grapped from Kleeja settings, admin is exceptional
if (! user_can('enter_acp') && user_is_flooding($current_user_id)) { if (! user_can('enter_acp') && user_is_flooding($current_user_id))
{
$this->addErrorMessage(sprintf( $this->addErrorMessage(sprintf(
$lang['YOU_HAVE_TO_WAIT'], $lang['YOU_HAVE_TO_WAIT'],
$config['usersectoupload'] $config['usersectoupload']
@@ -387,8 +400,10 @@ class defaultUploader implements KleejaUploader
//detect flooding, TODO fix it or remove it //detect flooding, TODO fix it or remove it
if (isset($_SESSION['FIILES_NOT_DUPLI'])) { if (isset($_SESSION['FIILES_NOT_DUPLI']))
if (! empty($_SESSION['FIILES_NOT_DUPLI']) && $_SESSION['FIILES_NOT_DUPLI'] == sha1(serialize(array_column($_FILES, 'name')))) { {
if (! empty($_SESSION['FIILES_NOT_DUPLI']) && $_SESSION['FIILES_NOT_DUPLI'] == sha1(serialize(array_column($_FILES, 'name'))))
{
unset($_SESSION['FIILES_NOT_DUPLI']); unset($_SESSION['FIILES_NOT_DUPLI']);
$this->addErrorMessage($lang['U_R_FLOODER']); $this->addErrorMessage($lang['U_R_FLOODER']);
@@ -397,7 +412,8 @@ class defaultUploader implements KleejaUploader
} }
// flooding code, making sure every ok session is cleared // flooding code, making sure every ok session is cleared
if (sizeof($_FILES) > 0) { if (sizeof($_FILES) > 0)
{
$_SESSION['FIILES_NOT_DUPLI'] = sha1(serialize(array_column($_FILES, 'name'))); $_SESSION['FIILES_NOT_DUPLI'] = sha1(serialize(array_column($_FILES, 'name')));
} }
@@ -405,16 +421,20 @@ class defaultUploader implements KleejaUploader
//now close session to let user open any other page in Kleeja //now close session to let user open any other page in Kleeja
session_write_close(); session_write_close();
if (! empty($_FILES['file']['tmp_name'])) { if (! empty($_FILES['file']['tmp_name']))
{
$_FILES['file'][0] = $_FILES['file']; $_FILES['file'][0] = $_FILES['file'];
} }
// loop the uploaded files // loop the uploaded files
for ($i=0; $i<=$this->getUploadFieldsLimit(); $i++) { for ($i=0; $i<=$this->getUploadFieldsLimit(); $i++)
{
//no file! //no file!
if (empty($_FILES['file_' . $i . '_']['tmp_name']) && empty($_FILES['file'][$i]['tmp_name'])) { if (empty($_FILES['file_' . $i . '_']['tmp_name']) && empty($_FILES['file'][$i]['tmp_name']))
if (! isset($_FILES['file_' . $i . '_'], $_FILES['file'][$i])) { {
if (! isset($_FILES['file_' . $i . '_'], $_FILES['file'][$i]))
{
continue; continue;
} }
@@ -428,8 +448,10 @@ class defaultUploader implements KleejaUploader
$upload_max_size = ini_get('upload_max_filesize'); $upload_max_size = ini_get('upload_max_filesize');
if ($error !== UPLOAD_ERR_OK) { if ($error !== UPLOAD_ERR_OK)
switch ($error) { {
switch ($error)
{
case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE: case UPLOAD_ERR_FORM_SIZE:
$this->addErrorMessage( $this->addErrorMessage(
@@ -469,7 +491,6 @@ class defaultUploader implements KleejaUploader
$this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], htmlspecialchars($filename))); $this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], htmlspecialchars($filename)));
break; break;
} }
} }
@@ -482,7 +503,8 @@ class defaultUploader implements KleejaUploader
// well, no file uploaded, ask user to choose a file before submit // well, no file uploaded, ask user to choose a file before submit
if ($this->total_uploaded_files == 0 && sizeof($this->messages) == 0) { if ($this->total_uploaded_files == 0 && sizeof($this->messages) == 0)
{
$this->addErrorMessage($lang['CHOSE_F']); $this->addErrorMessage($lang['CHOSE_F']);
} }
} }
@@ -490,9 +512,9 @@ class defaultUploader implements KleejaUploader
/** /**
* upload a file from $_FILES * upload a file from $_FILES
* @param integer $fieldNumber as in file[i] * @param integer $fieldNumber as in file[i]
* @param $current_uploading_folder * @param $current_uploading_folder
* @param $current_user_id * @param $current_user_id
*/ */
public function uploadTypeFile($fieldNumber, $current_uploading_folder, $current_user_id) public function uploadTypeFile($fieldNumber, $current_uploading_folder, $current_user_id)
{ {
@@ -512,7 +534,8 @@ class defaultUploader implements KleejaUploader
$fileInfo['currentUserId'] = $current_user_id; $fileInfo['currentUserId'] = $current_user_id;
if (! isset($_FILES['file_' . $fieldNumber . '_']) && isset($_FILES['file'][$fieldNumber])) { if (! isset($_FILES['file_' . $fieldNumber . '_']) && isset($_FILES['file'][$fieldNumber]))
{
$_FILES['file_' . $fieldNumber . '_'] = $_FILES['file'][$fieldNumber]; $_FILES['file_' . $fieldNumber . '_'] = $_FILES['file'][$fieldNumber];
} }
@@ -521,13 +544,14 @@ class defaultUploader implements KleejaUploader
? urldecode(str_replace([';',','], '', $_FILES['file_' . $fieldNumber . '_']['name'])) ? urldecode(str_replace([';',','], '', $_FILES['file_' . $fieldNumber . '_']['name']))
: ''; : '';
if (empty($fileInfo['originalFileName'])) { if (empty($fileInfo['originalFileName']))
{
$this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name']))); $this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name'])));
return; return;
} }
// get the extension of file // get the extension of file
$originalFileName = explode('.', $fileInfo['originalFileName']); $originalFileName = explode('.', $fileInfo['originalFileName']);
$fileInfo['fileExtension'] = strtolower(array_pop($originalFileName)); $fileInfo['fileExtension'] = strtolower(array_pop($originalFileName));
@@ -546,7 +570,8 @@ class defaultUploader implements KleejaUploader
// file exists before? change it a little // file exists before? change it a little
if (file_exists($current_uploading_folder . '/' . $fileInfo['generatedFileName'])) { if (file_exists($current_uploading_folder . '/' . $fileInfo['generatedFileName']))
{
$fileInfo['generatedFileName'] = change_filename_decoding( $fileInfo['generatedFileName'] = change_filename_decoding(
$fileInfo['generatedFileName'], $fileInfo['generatedFileName'],
$fieldNumber, $fieldNumber,
@@ -559,9 +584,11 @@ class defaultUploader implements KleejaUploader
// now, let process it // now, let process it
if (! in_array(strtolower($fileInfo['fileExtension']), array_keys($this->getAllowedFileExtensions()))) { if (! in_array(strtolower($fileInfo['fileExtension']), array_keys($this->getAllowedFileExtensions())))
{
// guest // guest
if ($current_user_id == '-1') { if ($current_user_id == '-1')
{
$this->addErrorMessage( $this->addErrorMessage(
sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension']) sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension'])
. '<br> <a href="' . ($config['mod_writer'] ? 'register.html' : 'ucp.php?go=register') . . '<br> <a href="' . ($config['mod_writer'] ? 'register.html' : 'ucp.php?go=register') .
@@ -569,24 +596,29 @@ class defaultUploader implements KleejaUploader
); );
} }
// a member // a member
else { else
{
$this->addErrorMessage(sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension'])); $this->addErrorMessage(sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension']));
} }
} }
// bad chars in the filename // bad chars in the filename
elseif (preg_match("#[\\\/\:\*\?\<\>\|\"]#", $fileInfo['generatedFileName'])) { elseif (preg_match("#[\\\/\:\*\?\<\>\|\"]#", $fileInfo['generatedFileName']))
{
$this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name']))); $this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name'])));
} }
// check file extension for bad stuff // check file extension for bad stuff
elseif (ext_check_safe($_FILES['file_' . $fieldNumber . '_']['name']) == false) { elseif (ext_check_safe($_FILES['file_' . $fieldNumber . '_']['name']) == false)
{
$this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name']))); $this->addErrorMessage(sprintf($lang['WRONG_F_NAME'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name'])));
} }
// check the mime-type for the file // check the mime-type for the file
elseif (check_mime_type($_FILES['file_' . $fieldNumber . '_']['type'], $fileInfo['fileExtension'], $_FILES['file_' . $fieldNumber . '_']['tmp_name']) == false) { elseif (check_mime_type($_FILES['file_' . $fieldNumber . '_']['type'], $fileInfo['fileExtension'], $_FILES['file_' . $fieldNumber . '_']['tmp_name']) == false)
{
$this->addErrorMessage(sprintf($lang['NOT_SAFE_FILE'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name']))); $this->addErrorMessage(sprintf($lang['NOT_SAFE_FILE'], htmlspecialchars($_FILES['file_' . $fieldNumber . '_']['name'])));
} }
// check file size // check file size
elseif ($this->getAllowedFileExtensions()[$fileInfo['fileExtension']] > 0 && $fileInfo['fileSize'] >= $this->getAllowedFileExtensions()[$fileInfo['fileExtension']]) { elseif ($this->getAllowedFileExtensions()[$fileInfo['fileExtension']] > 0 && $fileInfo['fileSize'] >= $this->getAllowedFileExtensions()[$fileInfo['fileExtension']])
{
$this->addErrorMessage( $this->addErrorMessage(
sprintf( sprintf(
$lang['SIZE_F_BIG'], $lang['SIZE_F_BIG'],
@@ -600,19 +632,24 @@ class defaultUploader implements KleejaUploader
$this->addErrorMessage($lang['TOTAL_SIZE_EXCEEDED']); $this->addErrorMessage($lang['TOTAL_SIZE_EXCEEDED']);
} }
// no errors, so upload it // no errors, so upload it
else { else
{
is_array($plugin_run_result = Plugins::getInstance()->run('defaultUploader_uploadTypeFile_2nd', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('defaultUploader_uploadTypeFile_2nd', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
// now, upload the file // now, upload the file
$file = move_uploaded_file($_FILES['file_' . $fieldNumber . '_']['tmp_name'], $current_uploading_folder . '/' . $fileInfo['generatedFileName']); $file = move_uploaded_file($_FILES['file_' . $fieldNumber . '_']['tmp_name'], $current_uploading_folder . '/' . $fileInfo['generatedFileName']);
if ($file) { if ($file)
{
$this->saveToDatabase($fileInfo); $this->saveToDatabase($fileInfo);
if ($remaining_storage != -1) if ($remaining_storage != -1)
{ {
$remaining_storage -= $fileInfo['fileSize']; $remaining_storage -= $fileInfo['fileSize'];
} }
} else { }
else
{
$this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], $fileInfo['originalFileName'])); $this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], $fileInfo['originalFileName']));
} }
} }

View File

@@ -9,17 +9,18 @@
//no for directly open //no for directly open
if (! defined('IN_COMMON')) { if (! defined('IN_COMMON'))
{
exit(); exit();
} }
class usrcp class usrcp
{ {
private $user_id = -1; private $user_id = -1;
private $group_id = 2; private $group_id = 2;
private $user_name = null; private $user_name = null;
private $user_mail = null; private $user_mail = null;
private $last_visit = null; private $last_visit = null;
public function data($name, $pass, $hashed = false, $expire = 86400, $loginadm = false) public function data($name, $pass, $hashed = false, $expire = 86400, $loginadm = false)
@@ -33,7 +34,8 @@ class usrcp
is_array($plugin_run_result = Plugins::getInstance()->run('data_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('data_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if ($return_now) { if ($return_now)
{
return $login_status; return $login_status;
} }
@@ -48,7 +50,8 @@ class usrcp
is_array($plugin_run_result = Plugins::getInstance()->run('auth_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('auth_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if ($return_now) { if ($return_now)
{
return $auth_status; return $auth_status;
} }
@@ -73,18 +76,24 @@ class usrcp
'LIMIT' => '1' 'LIMIT' => '1'
]; ];
if ($hashed) { if ($hashed)
{
$query['WHERE'] = 'id=' . intval($name) . " and password='" . $SQL->escape($pass) . "'"; $query['WHERE'] = 'id=' . intval($name) . " and password='" . $SQL->escape($pass) . "'";
} else { }
else
{
$query['WHERE'] = "clean_name='" . $SQL->real_escape($this->cleanusername($name)) . "'"; $query['WHERE'] = "clean_name='" . $SQL->real_escape($this->cleanusername($name)) . "'";
} }
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_usrdata_n_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_usrdata_n_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
$result = $SQL->build($query); $result = $SQL->build($query);
if ($SQL->num_rows($result)) { if ($SQL->num_rows($result))
while ($row=$SQL->fetch_array($result)) { {
if (empty($row['password'])) { while ($row=$SQL->fetch_array($result))
{
if (empty($row['password']))
{
//more security //more security
return false; return false;
} }
@@ -92,10 +101,13 @@ class usrcp
$phppass = $hashed ? $pass : $pass . $row['password_salt']; $phppass = $hashed ? $pass : $pass . $row['password_salt'];
//CHECK IF IT'S MD5 PASSWORD //CHECK IF IT'S MD5 PASSWORD
if (strlen($row['password']) == '32' && empty($row['password_salt']) && defined('CONVERTED_SCRIPT')) { if (strlen($row['password']) == '32' && empty($row['password_salt']) && defined('CONVERTED_SCRIPT'))
{
$passmd5 = md5($pass); $passmd5 = md5($pass);
////update old md5 hash to phpass hash ////update old md5 hash to phpass hash
if ($row['password'] == $passmd5) { if ($row['password'] == $passmd5)
{
////new salt ////new salt
$new_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7); $new_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
////new password hash ////new password hash
@@ -111,34 +123,39 @@ class usrcp
]; ];
$SQL->build($update_query); $SQL->build($update_query);
} else { //if the password is wrong }
else //if the password is wrong
{
return false; return false;
} }
} }
if (($phppass != $row['password'] && $hashed) || ($this->kleeja_hash_password($phppass, $row['password']) != true && $hashed == false)) { if (($phppass != $row['password'] && $hashed) || ($this->kleeja_hash_password($phppass, $row['password']) != true && $hashed == false))
{
return false; return false;
} }
//all user fileds info //all user fileds info
$userinfo = $row; $userinfo = $row;
$this->user_id = $row['id']; $this->user_id = $row['id'];
$this->group_id = $row['group_id']; $this->group_id = $row['group_id'];
$this->user_name = $row['name']; $this->user_name = $row['name'];
$this->user_mail = $row['mail']; $this->user_mail = $row['mail'];
$this->last_visit = $row['last_visit']; $this->last_visit = $row['last_visit'];
$user_y = base64_encode(serialize(['id'=>$row['id'], 'name'=>$row['name'], 'mail'=>$row['mail'], 'last_visit'=>$row['last_visit']])); $user_y = base64_encode(serialize(['id'=>$row['id'], 'name'=>$row['name'], 'mail'=>$row['mail'], 'last_visit'=>$row['last_visit']]));
if (! $hashed && ! $loginadm) { if (! $hashed && ! $loginadm)
{
$hash_key_expire = sha1(md5($config['h_key'] . $row['password']) . $expire); $hash_key_expire = sha1(md5($config['h_key'] . $row['password']) . $expire);
$this->kleeja_set_cookie('ulogu', $this->en_de_crypt($row['id'] . '|' . $row['password'] . '|' . $expire . '|' . $hash_key_expire . '|' . $row['group_id'] . '|' . $user_y), $expire); $this->kleeja_set_cookie('ulogu', $this->en_de_crypt($row['id'] . '|' . $row['password'] . '|' . $expire . '|' . $hash_key_expire . '|' . $row['group_id'] . '|' . $user_y), $expire);
} }
//if last visit > 1 minute then update it //if last visit > 1 minute then update it
if (empty($row['last_visit']) || time() - $row['last_visit'] > 60) { if (empty($row['last_visit']) || time() - $row['last_visit'] > 60)
$this->last_visit = time(); {
$this->last_visit = time();
$update_last_visit = [ $update_last_visit = [
'UPDATE' => "{$dbprefix}users", 'UPDATE' => "{$dbprefix}users",
'SET' => 'last_visit=' . $this->last_visit, 'SET' => 'last_visit=' . $this->last_visit,
@@ -154,7 +171,9 @@ class usrcp
unset($pass); unset($pass);
return true; return true;
} else { }
else
{
return false; return false;
} }
} }
@@ -167,7 +186,8 @@ class usrcp
{ {
global $dbprefix, $SQL; global $dbprefix, $SQL;
if (! $user_id) { if (! $user_id)
{
$user_id = $this->id(); $user_id = $this->id();
} }
@@ -233,14 +253,15 @@ class usrcp
is_array($plugin_run_result = Plugins::getInstance()->run('logout_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('logout_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
//acp //acp
if (user_can('enter_acp') && ! empty($_SESSION['ADMINLOGIN'])) { if (user_can('enter_acp') && ! empty($_SESSION['ADMINLOGIN']))
{
$this->logout_cp(); $this->logout_cp();
} }
$this->user_id = -1; $this->user_id = -1;
$this->group_id = 2; $this->group_id = 2;
$this->user_name = null; $this->user_name = null;
$this->user_mail = null; $this->user_mail = null;
$this->last_visit = null; $this->last_visit = null;
//is ther any cookies //is ther any cookies
@@ -254,7 +275,8 @@ class usrcp
{ {
is_array($plugin_run_result = Plugins::getInstance()->run('logout_cp_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('logout_cp_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if (! empty($_SESSION['ADMINLOGIN'])) { if (! empty($_SESSION['ADMINLOGIN']))
{
unset($_SESSION['ADMINLOGIN'], $_SESSION['USER_SESS'] /*, $_SESSION['LAST_VISIT']*/); unset($_SESSION['ADMINLOGIN'], $_SESSION['USER_SESS'] /*, $_SESSION['LAST_VISIT']*/);
} }
@@ -272,7 +294,8 @@ class usrcp
['a','a','a','a','a','a','a','a','a','a','e','e','e','e','e','e','e','i','i','i','i','i','i','i','i','o','o','o','o','o','o','o','o','o','o','o','u','u','u','u','u','u','c','c','n','n','y','e'] ['a','a','a','a','a','a','a','a','a','a','e','e','e','e','e','e','e','i','i','i','i','i','i','i','i','o','o','o','o','o','o','o','o','o','o','o','u','u','u','u','u','u','c','c','n','n','y','e']
]; ];
if (empty($arabic_t)) { if (empty($arabic_t))
{
//Arabic chars must be stay in utf8 format, so we encoded them //Arabic chars must be stay in utf8 format, so we encoded them
$arabic_t = unserialize(base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' . $arabic_t = unserialize(base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' .
'LIjtpOjU7czoyOiLZjCI7aTo2O3M6Mjoi2Y8iO2k6NztzOjI6ItmOIjtpOjg7czoyOiLZkCI7aTo5O3M6Mjoi2ZIiO2k6MTA7czoyOiLYoiI7aToxMTtzOjI6ItimIjt9aToxO' . 'LIjtpOjU7czoyOiLZjCI7aTo2O3M6Mjoi2Y8iO2k6NztzOjI6ItmOIjtpOjg7czoyOiLZkCI7aTo5O3M6Mjoi2ZIiO2k6MTA7czoyOiLYoiI7aToxMTtzOjI6ItimIjt9aToxO' .
@@ -321,7 +344,8 @@ class usrcp
// //
//when user add define('FORCE_COOKIES', true) in config.php we will make our settings of cookies //when user add define('FORCE_COOKIES', true) in config.php we will make our settings of cookies
// //
if (defined('FORCE_COOKIES')) { if (defined('FORCE_COOKIES'))
{
$config['cookie_domain'] = ! empty($_SERVER['HTTP_HOST']) ? strtolower($_SERVER['HTTP_HOST']) : (! empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : @getenv('SERVER_NAME')); $config['cookie_domain'] = ! empty($_SERVER['HTTP_HOST']) ? strtolower($_SERVER['HTTP_HOST']) : (! empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : @getenv('SERVER_NAME'));
$config['cookie_domain'] = str_replace('www.', '.', substr($config['cookie_domain'], 0, strpos($config['cookie_domain'], ':'))); $config['cookie_domain'] = str_replace('www.', '.', substr($config['cookie_domain'], 0, strpos($config['cookie_domain'], ':')));
$config['cookie_path'] = '/'; $config['cookie_path'] = '/';
@@ -344,27 +368,32 @@ class usrcp
global $config; global $config;
static $txt = []; static $txt = [];
if (empty($txt)) { if (empty($txt))
if (empty($config['h_key'])) { {
if (empty($config['h_key']))
{
$config['h_key'] = sha1(microtime()); $config['h_key'] = sha1(microtime());
} }
$chars = str_split($config['h_key']); $chars = str_split($config['h_key']);
foreach (range('a', 'z') as $k=>$v) { foreach (range('a', 'z') as $k=>$v)
if (! isset($chars[$k])) { {
if (! isset($chars[$k]))
{
break; break;
} }
$txt[$v] = $chars[$k] . $k . '-'; $txt[$v] = $chars[$k] . $k . '-';
} }
} }
switch ($type) { switch ($type)
{
case 1: case 1:
$data = str_replace('=', '_', base64_encode($data)); $data = str_replace('=', '_', base64_encode($data));
$data = strtr($data, $txt); $data = strtr($data, $txt);
break; break;
case 2: case 2:
$txtx = array_flip($txt); $txtx = array_flip($txt);
@@ -372,7 +401,7 @@ class usrcp
$data = strtr($data, $txtx); $data = strtr($data, $txtx);
$data = base64_decode(str_replace('_', '=', $data)); $data = base64_decode(str_replace('_', '=', $data));
break; break;
} }
return $data; return $data;
@@ -405,28 +434,34 @@ class usrcp
]; ];
//if login up //if login up
if ($this->kleeja_get_cookie('ulogu')) { if ($this->kleeja_get_cookie('ulogu'))
{
$user_data = false; $user_data = false;
list($user_id, $hashed_password, $expire_at, $hashed_expire, $group_id, $u_info) = @explode('|', $this->en_de_crypt($this->kleeja_get_cookie('ulogu'), 2)); list($user_id, $hashed_password, $expire_at, $hashed_expire, $group_id, $u_info) = @explode('|', $this->en_de_crypt($this->kleeja_get_cookie('ulogu'), 2));
//if not expire //if not expire
if (($hashed_expire == sha1(md5($config['h_key'] . $hashed_password) . $expire_at)) && ($expire_at > time())) { if (($hashed_expire == sha1(md5($config['h_key'] . $hashed_password) . $expire_at)) && ($expire_at > time()))
if (! empty($u_info)) { {
if (! empty($u_info))
{
$userinfo = unserialize(base64_decode($u_info)); $userinfo = unserialize(base64_decode($u_info));
$userinfo['group_id'] = $group_id; $userinfo['group_id'] = $group_id;
$userinfo['password'] = $hashed_password; $userinfo['password'] = $hashed_password;
$user_data = $this->data($user_id, $hashed_password, true, $expire_at); $user_data = $this->data($user_id, $hashed_password, true, $expire_at);
} }
} }
if ($user_data == false) { if ($user_data == false)
{
$this->logout(); $this->logout();
} else { }
$this->user_id = $userinfo['id']; else
$this->group_id = $userinfo['group_id']; {
$this->user_name = $userinfo['name']; $this->user_id = $userinfo['id'];
$this->user_mail = $userinfo['mail']; $this->group_id = $userinfo['group_id'];
$this->user_name = $userinfo['name'];
$this->user_mail = $userinfo['mail'];
$this->last_visit = $userinfo['last_visit']; $this->last_visit = $userinfo['last_visit'];
return $user_data; return $user_data;
} }
@@ -434,4 +469,4 @@ class usrcp
return false; //nothing return false; //nothing
} }
} }

View File

@@ -54,8 +54,10 @@ $action = $config['siteurl'];
$uploadingMethodClassBaseName = basename($uploadingMethodClass, '.php'); $uploadingMethodClassBaseName = basename($uploadingMethodClass, '.php');
$uploader = new $uploadingMethodClassBaseName; $uploader = new $uploadingMethodClassBaseName;
if (! $uploader instanceof KleejaUploader) { if (! $uploader instanceof KleejaUploader)
{
kleeja_err('Your upload Method class is not implemented our KleejaUploader Interface'); kleeja_err('Your upload Method class is not implemented our KleejaUploader Interface');
exit; exit;
} }

View File

@@ -65,7 +65,7 @@ function getjquerylink()
/** /**
* Parsing installing templates * Parsing installing templates
* @param mixed $tplname * @param mixed $tplname
*/ */
function gettpl($tplname) function gettpl($tplname)
{ {
@@ -108,11 +108,12 @@ function kleeja_eval($code)
/** /**
* Export config * Export config
* @param mixed $srv * @param mixed $srv
* @param mixed $usr * @param mixed $usr
* @param mixed $pass * @param mixed $pass
* @param mixed $nm * @param mixed $nm
* @param mixed $prf * @param mixed $prf
* @param mixed $type
*/ */
function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysqli') function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysqli')
{ {
@@ -120,7 +121,7 @@ function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysqli')
$data .= '//for more information about this file, visit: ' . "\n"; $data .= '//for more information about this file, visit: ' . "\n";
$data .= '//https://github.com/kleeja-official/kleeja/wiki/config.php-file' . "\n\n"; $data .= '//https://github.com/kleeja-official/kleeja/wiki/config.php-file' . "\n\n";
if(!empty($type) && $type != 'mysqli') if (! empty($type) && $type != 'mysqli')
{ {
if ($type == 'sqlite' && strpos($nm, '.') === false) if ($type == 'sqlite' && strpos($nm, '.') === false)
{ {
@@ -168,7 +169,7 @@ function get_microtime()
/** /**
* Get config value from database directly, if not return false. * Get config value from database directly, if not return false.
* @param mixed $name * @param mixed $name
*/ */
function inst_get_config($name) function inst_get_config($name)
{ {
@@ -183,7 +184,7 @@ function inst_get_config($name)
return false; return false;
} }
if(isset($dbtype) && $dbtype == 'sqlite') if (isset($dbtype) && $dbtype == 'sqlite')
{ {
@touch(PATH . $dbname); @touch(PATH . $dbname);
} }

View File

@@ -8,12 +8,14 @@
*/ */
// not for directly open // not for directly open
if (! defined('IN_COMMON')) { if (! defined('IN_COMMON'))
{
exit(); exit();
} }
if (empty($install_sqls) || ! is_array($install_sqls)) { if (empty($install_sqls) || ! is_array($install_sqls))
{
$install_sqls = []; $install_sqls = [];
} }

View File

@@ -34,6 +34,10 @@ $update_schema[9]['sql'] = [
// ]; // ];
$update_schema[10]['sql'] = [ $update_schema[10]['sql'] = [
'about_files' => "ALTER TABLE `{$dbprefix}files` ADD `about` LONGTEXT NULL DEFAULT NULL AFTER `real_filename`;", 'about_files' => "ALTER TABLE `{$dbprefix}files` ADD `about` LONGTEXT NULL DEFAULT NULL AFTER `real_filename`;",
'enable_multipart' => "INSERT INTO `{$dbprefix}groups_data` (`group_id`, `name`, `value`) SELECT `group_id`, 'enable_multipart', 1 FROM `{$dbprefix}groups`;", 'enable_multipart' => "INSERT INTO `{$dbprefix}groups_data` (`group_id`, `name`, `value`) SELECT `group_id`, 'enable_multipart', 1 FROM `{$dbprefix}groups`;",
'user_storage_size' => "ALTER TABLE `{$dbprefix}users` ADD `storage_size` bigint(20) NOT NULL DEFAULT '0' AFTER `hash_key`;",
'group_max_storage' => "INSERT INTO `{$dbprefix}groups_data` (`group_id`, `name`, `value`) SELECT `group_id`, 'max_storage', 0 FROM `{$dbprefix}groups`;",
'multipart_config' => 'INSERT INTO `' . $dbprefix . 'config` (`name`, `value`, `option`, `display_order`, `type`, `plg_id`, `dynamic`) VALUES (\'enable_multipart\', 1, \'<label>{lang.YES}<input type=\"radio\" id=\"enable_multipart\" name=\"enable_multipart\" value=\"1\" <IF NAME=\"con.enable_multipart==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"enable_multipart\" name=\"enable_multipart\" value=\"0\" <IF NAME=\"con.enable_multipart==0\"> checked=\"checked\"</IF> /></label>\', 45, \'groups\', 0, 0);',
'max_storage_config' => 'INSERT INTO `' . $dbprefix . 'config` (`name`, `value`, `option`, `display_order`, `type`, `plg_id`, `dynamic`) VALUES (\'max_storage\', 0, \'<input type=\"text\" id=\"max_storage\" name=\"max_storage\" value=\"{con.max_storage}\" size=\"20\" style=\"direction:ltr\" />\', 11, \'groups\', 0, 0);',
]; ];

View File

@@ -76,61 +76,61 @@ if (! ip('lang'))
*/ */
switch (g('step', 'str')) switch (g('step', 'str'))
{ {
default: default:
case 'language': case 'language':
if (ig('ln')) if (ig('ln'))
{
echo '<meta http-equiv="refresh" content="0;url=./?step=what_is_kleeja&lang=' . g('ln', 'str', 'en') . '">';
exit;
}
echo gettpl('lang.html');
break;
case 'what_is_kleeja':
echo gettpl('what_is_kleeja.html');
break;
case 'official':
echo gettpl('official.html');
break;
case 'choose' :
$install_or_no = $php_ver = true;
//check version of PHP
if (! function_exists('version_compare')
|| version_compare(PHP_VERSION, MIN_PHP_VERSION, '<'))
{
$php_ver = false;
}
if (file_exists(PATH . 'config.php'))
{
include_once PATH . 'config.php';
if (! empty($dbuser) && ! empty($dbname))
{ {
$d = inst_get_config('language'); echo '<meta http-equiv="refresh" content="0;url=./?step=what_is_kleeja&lang=' . g('ln', 'str', 'en') . '">';
if (! empty($d)) exit;
}
echo gettpl('lang.html');
break;
case 'what_is_kleeja':
echo gettpl('what_is_kleeja.html');
break;
case 'official':
echo gettpl('official.html');
break;
case 'choose' :
$install_or_no = $php_ver = true;
//check version of PHP
if (! function_exists('version_compare')
|| version_compare(PHP_VERSION, MIN_PHP_VERSION, '<'))
{
$php_ver = false;
}
if (file_exists(PATH . 'config.php'))
{
include_once PATH . 'config.php';
if (! empty($dbuser) && ! empty($dbname))
{ {
$install_or_no = false; $d = inst_get_config('language');
if (! empty($d))
{
$install_or_no = false;
}
} }
} }
}
echo gettpl('choose.html'); echo gettpl('choose.html');
break; break;
} }

View File

@@ -83,10 +83,10 @@ else
// //navigate .. // //navigate ..
switch (g('step')) switch (g('step'))
{ {
default: default:
case 'license': case 'license':
$contentof_license = 'GPL version 2 $contentof_license = 'GPL version 2
GNU General Public License, Free Software Foundation GNU General Public License, Free Software Foundation
The GNU General Public License is a Free Software license. Like any Free Software license, it grants to you the four following freedoms: The GNU General Public License is a Free Software license. Like any Free Software license, it grants to you the four following freedoms:
1. The freedom to run the program for any purpose. 1. The freedom to run the program for any purpose.
@@ -98,328 +98,332 @@ You must conspicuously and appropriately publish on each copy distributed an app
If you modify your copy or copies of the program or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License. If you modify your copy or copies of the program or any portion of it, or develop a program based upon it, you may distribute the resulting work provided you do so under the GNU General Public License. Any translation of the GNU General Public License must be accompanied by the GNU General Public License.
If you copy or distribute the program, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code. If you copy or distribute the program, you must accompany it with the complete corresponding machine-readable source code or with a written offer, valid for at least three years, to furnish the complete corresponding machine-readable source code.
Any of the above conditions can be waived if you get permission from the copyright holder.'; Any of the above conditions can be waived if you get permission from the copyright holder.';
$contentof_license = nl2br($contentof_license); $contentof_license = nl2br($contentof_license);
echo gettpl('license.html'); echo gettpl('license.html');
break; break;
case 'f': case 'f':
$check_ok = true; $check_ok = true;
$advices = $ziparchive_lib = false; $advices = $ziparchive_lib = false;
if (! class_exists('ZipArchive')) if (! class_exists('ZipArchive'))
{
$ziparchive_lib = true;
}
if ($ziparchive_lib)
{
$advices = true;
}
echo gettpl('check.html');
break;
case 'c':
// after submit, generate config file
if (ip('dbsubmit'))
{
//create config file, or export it to browser on failure
do_config_export(p('db_server'), p('db_user'), p('db_pass'), p('db_name'), p('db_prefix'), p('db_type'));
}
$no_config = ! file_exists(PATH . 'config.php') || ig('force') ? false : true;
$writeable_path = is_writable(PATH) ? true : false;
$sqlite3_exists = class_exists('SQLite3');
echo gettpl('configs.html');
break;
case 'check':
$submit_disabled = $no_connection = $mysql_ver = false;
//config.php
if (! empty($dbname))
{
if (isset($dbtype) && $dbtype == 'sqlite')
{ {
@touch(PATH . $dbname); $ziparchive_lib = true;
} }
//connect .. for check if ($ziparchive_lib)
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
if (! $SQL->is_connected())
{ {
$no_connection = true; $advices = true;
} }
else
echo gettpl('check.html');
break;
case 'c':
// after submit, generate config file
if (ip('dbsubmit'))
{ {
if (defined('SQL_LAYER') && SQL_LAYER == 'mysqli') //create config file, or export it to browser on failure
do_config_export(p('db_server'), p('db_user'), p('db_pass'), p('db_name'), p('db_prefix'), p('db_type'));
}
$no_config = ! file_exists(PATH . 'config.php') || ig('force') ? false : true;
$writeable_path = is_writable(PATH) ? true : false;
$sqlite3_exists = class_exists('SQLite3');
echo gettpl('configs.html');
break;
case 'check':
$submit_disabled = $no_connection = $mysql_ver = false;
//config.php
if (! empty($dbname))
{
if (isset($dbtype) && $dbtype == 'sqlite')
{ {
if (! empty($SQL->version()) && version_compare($SQL->version(), MIN_MYSQL_VERSION, '<')) @touch(PATH . $dbname);
{
$mysql_ver = $SQL->version();
}
}
}
}
//try to chmod them
if (function_exists('chmod'))
{
@chmod(PATH . 'cache', 0755);
@chmod(PATH . 'plugins', 0755);
@chmod(PATH . 'styles', 0755);
@chmod(PATH . 'uploads', 0755);
@chmod(PATH . 'uploads/thumbs', 0755);
}
echo gettpl('check_all.html');
break;
case 'data' :
if (ip('datasubmit'))
{
//check data ...
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('sitemail'))
|| empty(p('username')) || empty(p('password')) || empty(p('password2')) || empty(p('email')))
{
echo $lang['EMPTY_FIELDS'];
echo gettpl('footer.html');
exit();
}
//fix bug #r1777 (alta3rq revision)
if (! empty(p('password')) && ! empty(p('password2')) && p('password') != p('password2'))
{
echo $lang['PASS_NEQ_PASS2'];
echo gettpl('footer.html');
exit();
}
if (strpos(p('email'), '@') === false)
{
echo $lang['WRONG_EMAIL'];
echo gettpl('footer.html');
exit();
}
//connect .. for check
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
include_once PATH . 'includes/usr.php';
include_once PATH . 'includes/functions_alternative.php';
$usrcp = new usrcp;
$user_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
$user_pass = $usrcp->kleeja_hash_password(p('password') . $user_salt);
$user_name = $SQL->escape(p('username'));
$user_mail = $SQL->escape(p('email'));
$config_sitename = $SQL->escape(p('sitename'));
$config_siteurl = $SQL->escape(p('siteurl'));
$config_sitemail = $SQL->escape(p('sitemail'));
$config_time_zone = $SQL->escape(p('time_zone'));
//$config_style = ip('style') ? $SQL->escape(p('style')) : '';
$config_urls_type = in_array(p('urls_type'), ['id', 'filename', 'direct']) ? p('urls_type') : 'id';
$clean_name = $usrcp->cleanusername($SQL->escape($user_name));
/// ok .. we will get sqls now ..
include 'includes/install_sqls.php';
include 'includes/default_values.php';
$err = $dots = 0;
$errors = '';
//do important alter before
$SQL->query($install_sqls['ALTER_DATABASE_UTF']);
$sqls_done = $sql_err = [];
foreach ($install_sqls as $name=>$sql_content)
{
if ($name == 'DROP_TABLES' || $name == 'ALTER_DATABASE_UTF')
{
continue;
} }
if ($SQL->query($sql_content)) //connect .. for check
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
if (! $SQL->is_connected())
{ {
if ($name == 'call') $no_connection = true;
{
$sqls_done[] = $lang['INST_CRT_CALL'];
}
elseif ($name == 'reports')
{
$sqls_done[] = $lang['INST_CRT_REPRS'];
}
elseif ($name == 'stats')
{
$sqls_done[] = $lang['INST_CRT_STS'];
}
elseif ($name == 'users')
{
$sqls_done[] = $lang['INST_CRT_USRS'];
}
elseif ($name == 'users')
{
$sqls_done[] = $lang['INST_CRT_ADM'];
}
elseif ($name == 'files')
{
$sqls_done[] = $lang['INST_CRT_FLS'];
}
elseif ($name == 'config')
{
$sqls_done[] = $lang['INST_CRT_CNF'];
}
elseif ($name == 'exts')
{
$sqls_done[] = $lang['INST_CRT_EXT'];
}
elseif ($name == 'online')
{
$sqls_done[] = $lang['INST_CRT_ONL'];
}
elseif ($name == 'hooks')
{
$sqls_done[] = $lang['INST_CRT_HKS'];
}
elseif ($name == 'plugins')
{
$sqls_done[] = $lang['INST_CRT_PLG'];
}
elseif ($name == 'lang')
{
$sqls_done[] = $lang['INST_CRT_LNG'];
}
else
{
$sqls_done[] = $name . '...';
}
} }
else else
{ {
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n"; if (defined('SQL_LAYER') && SQL_LAYER == 'mysqli')
$sql_err[] = $lang['INST_SQL_ERR'] . ' : ' . $name . '[basic]'; {
$err++; if (! empty($SQL->version()) && version_compare($SQL->version(), MIN_MYSQL_VERSION, '<'))
{
$mysql_ver = $SQL->version();
}
}
} }
}//for }
if ($err == 0) //try to chmod them
if (function_exists('chmod'))
{ {
//add configs @chmod(PATH . 'cache', 0755);
foreach ($config_values as $cn) @chmod(PATH . 'plugins', 0755);
@chmod(PATH . 'styles', 0755);
@chmod(PATH . 'uploads', 0755);
@chmod(PATH . 'uploads/thumbs', 0755);
}
echo gettpl('check_all.html');
break;
case 'data' :
if (ip('datasubmit'))
{
//check data ...
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('sitemail'))
|| empty(p('username')) || empty(p('password')) || empty(p('password2')) || empty(p('email')))
{ {
if (empty($cn[6])) echo $lang['EMPTY_FIELDS'];
{ echo gettpl('footer.html');
$cn[6] = 0;
}
$sql = "INSERT INTO `{$dbprefix}config` (`name`, `value`, `option`, `display_order`, `type`, `plg_id`, `dynamic`) VALUES ('$cn[0]', '$cn[1]', '$cn[2]', '$cn[3]', '$cn[4]', '$cn[5]', '$cn[6]');"; exit();
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [configs_values] ' . $cn;
$err++;
}
} }
//add groups configs //fix bug #r1777 (alta3rq revision)
foreach ($config_values as $cn) if (! empty(p('password')) && ! empty(p('password2')) && p('password') != p('password2'))
{ {
if ($cn[4] != 'groups' or ! $cn[4]) echo $lang['PASS_NEQ_PASS2'];
echo gettpl('footer.html');
exit();
}
if (strpos(p('email'), '@') === false)
{
echo $lang['WRONG_EMAIL'];
echo gettpl('footer.html');
exit();
}
//connect .. for check
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
include_once PATH . 'includes/usr.php';
include_once PATH . 'includes/functions_alternative.php';
$usrcp = new usrcp;
$user_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
$user_pass = $usrcp->kleeja_hash_password(p('password') . $user_salt);
$user_name = $SQL->escape(p('username'));
$user_mail = $SQL->escape(p('email'));
$config_sitename = $SQL->escape(p('sitename'));
$config_siteurl = $SQL->escape(p('siteurl'));
$config_sitemail = $SQL->escape(p('sitemail'));
$config_time_zone = $SQL->escape(p('time_zone'));
//$config_style = ip('style') ? $SQL->escape(p('style')) : '';
$config_urls_type = in_array(p('urls_type'), ['id', 'filename', 'direct']) ? p('urls_type') : 'id';
$clean_name = $usrcp->cleanusername($SQL->escape($user_name));
/// ok .. we will get sqls now ..
include 'includes/install_sqls.php';
include 'includes/default_values.php';
$err = $dots = 0;
$errors = '';
//do important alter before
$SQL->query($install_sqls['ALTER_DATABASE_UTF']);
$sqls_done = $sql_err = [];
foreach ($install_sqls as $name=>$sql_content)
{
if ($name == 'DROP_TABLES' || $name == 'ALTER_DATABASE_UTF')
{ {
continue; continue;
} }
$itxt = ''; if ($SQL->query($sql_content))
foreach ([1, 2, 3] as $im)
{ {
$itxt .= ($itxt == '' ? '' : ',') . "($im, '$cn[0]', '$cn[1]')"; if ($name == 'call')
{
$sqls_done[] = $lang['INST_CRT_CALL'];
}
elseif ($name == 'reports')
{
$sqls_done[] = $lang['INST_CRT_REPRS'];
}
elseif ($name == 'stats')
{
$sqls_done[] = $lang['INST_CRT_STS'];
}
elseif ($name == 'users')
{
$sqls_done[] = $lang['INST_CRT_USRS'];
}
elseif ($name == 'users')
{
$sqls_done[] = $lang['INST_CRT_ADM'];
}
elseif ($name == 'files')
{
$sqls_done[] = $lang['INST_CRT_FLS'];
}
elseif ($name == 'config')
{
$sqls_done[] = $lang['INST_CRT_CNF'];
}
elseif ($name == 'exts')
{
$sqls_done[] = $lang['INST_CRT_EXT'];
}
elseif ($name == 'online')
{
$sqls_done[] = $lang['INST_CRT_ONL'];
}
elseif ($name == 'hooks')
{
$sqls_done[] = $lang['INST_CRT_HKS'];
}
elseif ($name == 'plugins')
{
$sqls_done[] = $lang['INST_CRT_PLG'];
}
elseif ($name == 'lang')
{
$sqls_done[] = $lang['INST_CRT_LNG'];
}
else
{
$sqls_done[] = $name . '...';
}
} }
else
$sql = "INSERT INTO `{$dbprefix}groups_data` (`group_id`, `name`, `value`) VALUES " . $itxt . ';';
if (! $SQL->query($sql))
{ {
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n"; $errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [groups_configs_values] ' . $cn; $sql_err[] = $lang['INST_SQL_ERR'] . ' : ' . $name . '[basic]';
$err++; $err++;
} }
} }//for
//add exts if ($err == 0)
foreach ($ext_values as $gid=>$exts)
{ {
$itxt = ''; //add configs
foreach ($config_values as $cn)
foreach ($exts as $t=>$v)
{ {
$itxt .= ($itxt == '' ? '' : ',') . "('$t', $gid, $v)"; if (empty($cn[6]))
{
$cn[6] = 0;
}
$sql = "INSERT INTO `{$dbprefix}config` (`name`, `value`, `option`, `display_order`, `type`, `plg_id`, `dynamic`) VALUES ('$cn[0]', '$cn[1]', '$cn[2]', '$cn[3]', '$cn[4]', '$cn[5]', '$cn[6]');";
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [configs_values] ' . $cn;
$err++;
}
} }
$sql = "INSERT INTO `{$dbprefix}groups_exts` (`ext`, `group_id`, `size`) VALUES " . $itxt . ';'; //add groups configs
foreach ($config_values as $cn)
if (! $SQL->query($sql))
{ {
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n"; if ($cn[4] != 'groups' or ! $cn[4])
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [ext_values] ' . $gid; {
$err++; continue;
}
$itxt = '';
foreach ([1, 2, 3] as $im)
{
$itxt .= ($itxt == '' ? '' : ',') . "($im, '$cn[0]', '$cn[1]')";
}
$sql = "INSERT INTO `{$dbprefix}groups_data` (`group_id`, `name`, `value`) VALUES " . $itxt . ';';
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [groups_configs_values] ' . $cn;
$err++;
}
} }
}
//add acls //add exts
foreach ($acls_values as $cn=>$ct) foreach ($ext_values as $gid=>$exts)
{
$it = 1;
$itxt = '';
foreach ($ct as $ctk)
{ {
$itxt .= ($itxt == '' ? '' : ',') . "('$cn', '$it', '$ctk')"; $itxt = '';
foreach ($exts as $t=>$v)
{
$itxt .= ($itxt == '' ? '' : ',') . "('$t', $gid, $v)";
}
$sql = "INSERT INTO `{$dbprefix}groups_exts` (`ext`, `group_id`, `size`) VALUES " . $itxt . ';';
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [ext_values] ' . $gid;
$err++;
}
}
//add acls
foreach ($acls_values as $cn=>$ct)
{
$it = 1;
$itxt = '';
foreach ($ct as $ctk)
{
$itxt .= ($itxt == '' ? '' : ',') . "('$cn', '$it', '$ctk')";
$it++;
}
$sql = "INSERT INTO `{$dbprefix}groups_acl` (`acl_name`, `group_id`, `acl_can`) VALUES " . $itxt . ';';
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [acl_values] ' . $cn;
$err++;
}
$it++; $it++;
} }
$sql = "INSERT INTO `{$dbprefix}groups_acl` (`acl_name`, `group_id`, `acl_can`) VALUES " . $itxt . ';';
if (! $SQL->query($sql))
{
$errors .= implode(':', $SQL->get_error()) . '' . "\n___\n";
$sql_err[] = $lang['INST_SQL_ERR'] . ' : [acl_values] ' . $cn;
$err++;
}
$it++;
} }
echo gettpl('sqls_done.html');
}
else
{
$urlsite = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('install', '', dirname($_SERVER['PHP_SELF']));
echo gettpl('data.html');
} }
echo gettpl('sqls_done.html'); break;
}
else
{
$urlsite = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('install', '', dirname($_SERVER['PHP_SELF']));
echo gettpl('data.html');
}
break; case 'end' :
case 'end' :
echo gettpl('end.html'); echo gettpl('end.html');
//for safe .. //for safe ..
//@rename("install.php", "install.lock"); //@rename("install.php", "install.lock");
break; break;
} }

View File

@@ -10,8 +10,8 @@
{{if($GLOBALS['complete_update']):}} {{if($GLOBALS['complete_update']):}}
<div class="hr"></div> <div class="hr"></div>
<div class="notice"> <div class="notice">
<h6><img src="style/images/info2.png" class="img" alt="" /> {{echo $lang['INST_NOTES_UPDATE']}} :</h6> <h6><img src="style/images/info2.png" class="img" alt="" /> {{echo $lang['KLEEJA_TEAM_MSG_NAME']}}</h6>
<p><img src="style/images/inst_notes.png" class="img" alt="" />{{echo $lang['INST_NOTE_RC6_TO_1.0.0']}}</p> <p><img src="style/images/inst_notes.png" class="img" alt="" />{{echo $lang['KLEEJA_TEAM_MSG_TEXT']}}</p>
</div> </div>
{{else:}} {{else:}}
<div class="notice TN"> <div class="notice TN">

View File

@@ -19,7 +19,8 @@ define('IN_COMMON', true);
define('STOP_PLUGINS', true); define('STOP_PLUGINS', true);
define('PATH', '../'); define('PATH', '../');
if (file_exists(PATH . 'config.php')) { if (file_exists(PATH . 'config.php'))
{
include_once PATH . 'config.php'; include_once PATH . 'config.php';
} }
@@ -27,9 +28,12 @@ include_once PATH . 'includes/plugins.php';
include_once PATH . 'includes/functions.php'; include_once PATH . 'includes/functions.php';
include_once PATH . 'includes/functions_alternative.php'; include_once PATH . 'includes/functions_alternative.php';
if (isset($dbtype) && $dbtype == 'sqlite') { if (isset($dbtype) && $dbtype == 'sqlite')
{
include PATH . 'includes/sqlite.php'; include PATH . 'includes/sqlite.php';
} else { }
else
{
include PATH . 'includes/mysqli.php'; include PATH . 'includes/mysqli.php';
} }
@@ -44,7 +48,8 @@ $SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
// //
$config['db_version'] = inst_get_config('db_version'); $config['db_version'] = inst_get_config('db_version');
if ($config['db_version'] == false) { if ($config['db_version'] == false)
{
$SQL->query("INSERT INTO `{$dbprefix}config` (`name` ,`value`) VALUES ('db_version', '')"); $SQL->query("INSERT INTO `{$dbprefix}config` (`name` ,`value`) VALUES ('db_version', '')");
} }
@@ -55,7 +60,8 @@ $IN_UPDATE = true;
/** /**
* print header * print header
*/ */
if (! ip('action_file_do')) { if (! ip('action_file_do'))
{
echo gettpl('header.html'); echo gettpl('header.html');
} }
@@ -63,74 +69,86 @@ if (! ip('action_file_do')) {
/** /**
* Navigation .. * Navigation ..
*/ */
switch (g('step', 'str', 'action_file')) { switch (g('step', 'str', 'action_file'))
default: {
case 'update_now': default:
case 'update_now':
$complete_update = true; $complete_update = true;
$update_msgs_arr = []; $update_msgs_arr = [];
$current_db_version = $config['db_version']; $current_db_version = $config['db_version'];
$all_db_updates = array_keys($update_schema); $all_db_updates = array_keys($update_schema);
$available_db_updates = array_filter($all_db_updates, function ($v) use ($current_db_version) { $available_db_updates = array_filter($all_db_updates, function ($v) use ($current_db_version) {
return $v > $current_db_version; return $v > $current_db_version;
}); });
sort($available_db_updates); sort($available_db_updates);
if (! sizeof($available_db_updates)) { if (! sizeof($available_db_updates))
$update_msgs_arr[] = '<span style="color:green;">' . $lang['INST_UPDATE_CUR_VER_IS_UP'] . '</span>'; {
$complete_update = false; $update_msgs_arr[] = '<span style="color:green;">' . $lang['INST_UPDATE_CUR_VER_IS_UP'] . '</span>';
} $complete_update = false;
}
// //
//is there any sqls //is there any sqls
// //
if ($complete_update) { if ($complete_update)
//loop through available updates {
foreach ($available_db_updates as $db_update_version) { //loop through available updates
$SQL->hideErrors(); foreach ($available_db_updates as $db_update_version)
{
$SQL->hideErrors();
//sqls //sqls
if (isset($update_schema[$db_update_version]['sql']) if (isset($update_schema[$db_update_version]['sql'])
&& sizeof($update_schema[$db_update_version]['sql']) > 0) { && sizeof($update_schema[$db_update_version]['sql']) > 0)
$err = ''; {
$complete_update = true;
foreach ($update_schema[$db_update_version]['sql'] as $name=>$sql_content) {
$err = ''; $err = '';
$SQL->query($sql_content);
$err = $SQL->get_error();
if (strpos($err[1], 'Duplicate') !== false || $err[0] == '1062' || $err[0] == '1060') { $complete_update = true;
$complete_update = false;
}
}
}
//functions foreach ($update_schema[$db_update_version]['sql'] as $name=>$sql_content)
if ($complete_update) { {
if (isset($update_schema[$db_update_version]['functions']) && sizeof($update_schema[$db_update_version]['functions']) > 0) { $err = '';
foreach ($update_schema[$db_update_version]['functions'] as $n) { $SQL->query($sql_content);
if (is_callable($n)) { $err = $SQL->get_error();
$n();
if (strpos($err[1], 'Duplicate') !== false || $err[0] == '1062' || $err[0] == '1060')
{
$complete_update = false;
} }
} }
} }
//functions
if ($complete_update)
{
if (isset($update_schema[$db_update_version]['functions']) && sizeof($update_schema[$db_update_version]['functions']) > 0)
{
foreach ($update_schema[$db_update_version]['functions'] as $n)
{
if (is_callable($n))
{
$n();
}
}
}
}
$sql = "UPDATE `{$dbprefix}config` SET `value` = '" . KLEEJA_DB_VERSION . "' WHERE `name` = 'db_version'";
$SQL->query($sql);
$update_msgs_arr[] = '<span style="color:green;">' . $lang['INST_UPDATE_IS_FINISH'] . '</span>';
} }
$sql = "UPDATE `{$dbprefix}config` SET `value` = '" . KLEEJA_DB_VERSION . "' WHERE `name` = 'db_version'";
$SQL->query($sql);
} }
}
delete_cache('', true); delete_cache('', true);
echo gettpl('update_end.html'); echo gettpl('update_end.html');
break; break;
} }
/** /**

View File

@@ -281,5 +281,5 @@ return [
'DEL_BY_EXT' => 'Delete Files By Extension', 'DEL_BY_EXT' => 'Delete Files By Extension',
'SELECT_EXT' => 'Select an Extension', 'SELECT_EXT' => 'Select an Extension',
'NO_FILE_WITH_EXT' => 'there is no files exists with the selected extension', 'NO_FILE_WITH_EXT' => 'there is no files exists with the selected extension',
'X_FILE_WITH_EXT' => 'there is (x) files exists with the selected extension', 'X_FILE_WITH_EXT' => 'there is (x) files exists with the selected extension',
]; ];

View File

@@ -5,280 +5,280 @@
// //
return [ return [
'U_NOT_ADMIN' => 'شما دسترسي مديريتي نداريد.', 'U_NOT_ADMIN' => 'شما دسترسي مديريتي نداريد.',
'UPDATE_CONFIG' => 'بروزرساني تنظيمات', 'UPDATE_CONFIG' => 'بروزرساني تنظيمات',
'NO_CHANGE' => 'بدون تغيير', 'NO_CHANGE' => 'بدون تغيير',
'CHANGE_MD5' => 'تغيير بوسيله MD5', 'CHANGE_MD5' => 'تغيير بوسيله MD5',
'CHANGE_TIME' => 'تغيير بوسيله زمان', 'CHANGE_TIME' => 'تغيير بوسيله زمان',
'SITENAME' => 'نام سایت', 'SITENAME' => 'نام سایت',
'SITEMAIL' => 'ادرس پست الکترونيکي', 'SITEMAIL' => 'ادرس پست الکترونيکي',
'SITEMAIL2' => 'ادرس پست الکترونيکي گزارشات', 'SITEMAIL2' => 'ادرس پست الکترونيکي گزارشات',
'SITEURL' => 'ادرس اينترنتي سايت به همراه / در پايان', 'SITEURL' => 'ادرس اينترنتي سايت به همراه / در پايان',
'FOLDERNAME' => 'نام پوشه , فايل هاي اپلودي', 'FOLDERNAME' => 'نام پوشه , فايل هاي اپلودي',
'PREFIXNAME' => 'پيشوند فايل ها <small>( همچنين ميتوانيد از {rand:4} , {date:d_Y} هم استفاده کنيد.)</small>', 'PREFIXNAME' => 'پيشوند فايل ها <small>( همچنين ميتوانيد از {rand:4} , {date:d_Y} هم استفاده کنيد.)</small>',
'FILESNUM' => 'تعداد فيلد هاي اپلود ', 'FILESNUM' => 'تعداد فيلد هاي اپلود ',
'FILESNUM_SHOW' => 'نمايش همه فيلد هاي اپلود', 'FILESNUM_SHOW' => 'نمايش همه فيلد هاي اپلود',
'SITECLOSE' => 'بستن سايت', 'SITECLOSE' => 'بستن سايت',
'CLOSEMSG' => 'پیامی که هنگام بستن سایت نمایش داده میشود', 'CLOSEMSG' => 'پیامی که هنگام بستن سایت نمایش داده میشود',
'DECODE' => 'تغيير نام فايل', 'DECODE' => 'تغيير نام فايل',
'SEC_DOWN' => 'زمان (ثانيه) قبل از دانلود', 'SEC_DOWN' => 'زمان (ثانيه) قبل از دانلود',
'STATFOOTER' => 'نمايش امار صفحه در فوتر', 'STATFOOTER' => 'نمايش امار صفحه در فوتر',
'GZIP' => 'استفاده از gzip', 'GZIP' => 'استفاده از gzip',
'GOOGLEANALYTICS' => '<a href="http://www.google.com/analytics" target="_kleeja"><span style="color:orange">Google</span> Analytics</a>', 'GOOGLEANALYTICS' => '<a href="http://www.google.com/analytics" target="_kleeja"><span style="color:orange">Google</span> Analytics</a>',
'WELCOME_MSG' => 'پيام خوش امد گويي', 'WELCOME_MSG' => 'پيام خوش امد گويي',
'USER_SYSTEM' => 'سيستم کاربران (سيستم متصل به اپلود سنتر)', 'USER_SYSTEM' => 'سيستم کاربران (سيستم متصل به اپلود سنتر)',
'TOTAL_SIZE' => 'بيشترين حجم اپلود (مگابایت)', 'TOTAL_SIZE' => 'بيشترين حجم اپلود (مگابایت)',
'THUMBS_IMGS' => 'فعال کردن پيشنمايش تصاوير (تصاوير بند انگشتي)', 'THUMBS_IMGS' => 'فعال کردن پيشنمايش تصاوير (تصاوير بند انگشتي)',
'WRITE_IMGS' => 'فعال کردن نشانه گذاري تصاوير', 'WRITE_IMGS' => 'فعال کردن نشانه گذاري تصاوير',
'ID_FORM' => 'نحوه ادرس دهي فايل', 'ID_FORM' => 'نحوه ادرس دهي فايل',
'IDF' => 'شناسه فايل در ديتا بيس', 'IDF' => 'شناسه فايل در ديتا بيس',
'IDFF' => 'نام فايل', 'IDFF' => 'نام فايل',
'IDFD' => 'مستقيم', 'IDFD' => 'مستقيم',
'ID_FORM_IMG' => 'قالب پیوندهای تصویری <small>(مستقیم ، مشمول حمایت یا آمار ما نیست ..)</small>', 'ID_FORM_IMG' => 'قالب پیوندهای تصویری <small>(مستقیم ، مشمول حمایت یا آمار ما نیست ..)</small>',
'IDF_IMG' => 'مقدماتی (example.com/do.php?img=123)', 'IDF_IMG' => 'مقدماتی (example.com/do.php?img=123)',
'IDFF_IMG' => 'نام فایل (example.com/do.php?imgf=filename.png)', 'IDFF_IMG' => 'نام فایل (example.com/do.php?imgf=filename.png)',
'IDFD_IMG' => 'لینک مستقیم (example.com/uploads/filename.png)', 'IDFD_IMG' => 'لینک مستقیم (example.com/uploads/filename.png)',
'DEL_URL_FILE' => 'فعال کردن قابليت ارائه لينک حذف فايل', 'DEL_URL_FILE' => 'فعال کردن قابليت ارائه لينک حذف فايل',
'ALLOW_STAT_PG' => 'فعال کردن صفحه امار ها', 'ALLOW_STAT_PG' => 'فعال کردن صفحه امار ها',
'ALLOW_ONLINE' => 'فعال کردن قابليت -چه کسي انلاين است؟ -', 'ALLOW_ONLINE' => 'فعال کردن قابليت -چه کسي انلاين است؟ -',
'DEL_F_DAY' => 'حذف فايل هاي بلا استفاده پس از ', 'DEL_F_DAY' => 'حذف فايل هاي بلا استفاده پس از ',
'MOD_WRITER' => 'دستورات بازنويسي', 'MOD_WRITER' => 'دستورات بازنويسي',
'MOD_WRITER_EX' => 'لينک هاي HTML..', 'MOD_WRITER_EX' => 'لينک هاي HTML..',
'NUMFIELD_S' => 'شما بايد براي برخي از فيلد ها فقط از اعداد استفاده نماييد.', 'NUMFIELD_S' => 'شما بايد براي برخي از فيلد ها فقط از اعداد استفاده نماييد.',
'CONFIGS_UPDATED' => 'تنظيمات با موفقيت بروز شدند', 'CONFIGS_UPDATED' => 'تنظيمات با موفقيت بروز شدند',
'E_EXTS' => 'نکته : حجم ها بر اساس کيلو بايت ميباشند.</i>', 'E_EXTS' => 'نکته : حجم ها بر اساس کيلو بايت ميباشند.</i>',
'UPDATED_EXTS' => 'پسوند ها با موفقيت بروز شدند.', 'UPDATED_EXTS' => 'پسوند ها با موفقيت بروز شدند.',
'EXT_DELETED' => 'پسوند با موفقيت حذف شد.', 'EXT_DELETED' => 'پسوند با موفقيت حذف شد.',
'REPLY' => '[ پاسخ ]', 'REPLY' => '[ پاسخ ]',
'REPLY_REPORT' => 'پاسخ در گزارش', 'REPLY_REPORT' => 'پاسخ در گزارش',
'U_REPORT_ON' => 'براي گزارش شما درمورد ', 'U_REPORT_ON' => 'براي گزارش شما درمورد ',
'BY_EMAIL' => 'بوسيله ايميل ', 'BY_EMAIL' => 'بوسيله ايميل ',
'ADMIN_REPLIED' => 'پاسخ مديريت', 'ADMIN_REPLIED' => 'پاسخ مديريت',
'IS_SEND_MAIL' => 'پاسخ ارسال شد.', 'IS_SEND_MAIL' => 'پاسخ ارسال شد.',
'REPORTS_UPDATED' => 'گزارشات بروز شدند.', 'REPORTS_UPDATED' => 'گزارشات بروز شدند.',
'REPLY_CALL' => 'پاسخ به پيام', 'REPLY_CALL' => 'پاسخ به پيام',
'REPLIED_ON_CAL' => 'درباره پيام شما ', 'REPLIED_ON_CAL' => 'درباره پيام شما ',
'CALLS_UPDATED' => 'پيام ها با موفقيت بروز رساني شدند.', 'CALLS_UPDATED' => 'پيام ها با موفقيت بروز رساني شدند.',
'FOUNDER' => 'موسس', 'FOUNDER' => 'موسس',
'USER_UPDATED' => 'اطلاعات کاربران با موفقيت بروز شدند.', 'USER_UPDATED' => 'اطلاعات کاربران با موفقيت بروز شدند.',
'REPAIRE_TABLE' => '[جداول] تعمير شدند. ', 'REPAIRE_TABLE' => '[جداول] تعمير شدند. ',
'REPAIRE_CACHE' => 'کش با موفقيت پاک شد / بروز رساني شد.', 'REPAIRE_CACHE' => 'کش با موفقيت پاک شد / بروز رساني شد.',
'KLEEJA_CP' => '[ کليجا ] مديريت', 'KLEEJA_CP' => '[ کليجا ] مديريت',
'GENERAL_STAT' => 'امار عمومي', 'GENERAL_STAT' => 'امار عمومي',
'SEARCH_STAT' => 'آمار موتورهای جستجو', 'SEARCH_STAT' => 'آمار موتورهای جستجو',
'OTHER_INFO' => 'ديگر اطلاعات', 'OTHER_INFO' => 'ديگر اطلاعات',
'AFILES_NUM' => 'مجموع فايل ها', 'AFILES_NUM' => 'مجموع فايل ها',
'AFILES_SIZE_SPACE' => 'فضاي مصرف شده تا کنون', 'AFILES_SIZE_SPACE' => 'فضاي مصرف شده تا کنون',
'AUSERS_NUM' => 'مجموع کاربران', 'AUSERS_NUM' => 'مجموع کاربران',
'LAST_GOOGLE' => 'اخرين بازديد از گوگل', 'LAST_GOOGLE' => 'اخرين بازديد از گوگل',
'GOOGLE_NUM' => 'ورودي هاي گوگل', 'GOOGLE_NUM' => 'ورودي هاي گوگل',
'LAST_BING' => 'اخرين بازديد از بينگ', 'LAST_BING' => 'اخرين بازديد از بينگ',
'BING_NUM' => 'ورودي هاي بينگ', 'BING_NUM' => 'ورودي هاي بينگ',
'KLEEJA_CP_W' => 'سلام! به پنل مديريت خوش امديد!', 'KLEEJA_CP_W' => 'سلام! به پنل مديريت خوش امديد!',
'PHP_VER' => 'ورژن PHP ', 'PHP_VER' => 'ورژن PHP ',
'MYSQL_VER' => 'ورژن MYSQL', 'MYSQL_VER' => 'ورژن MYSQL',
'R_CONFIGS' => 'تنظيمات عمومي', 'R_CONFIGS' => 'تنظيمات عمومي',
'R_CPINDEX' => 'صفحه اصلي مديريت', 'R_CPINDEX' => 'صفحه اصلي مديريت',
'R_EXTS' => 'تنظيمات پسوند ها', 'R_EXTS' => 'تنظيمات پسوند ها',
'R_FILES' => 'کنترل فايل ها', 'R_FILES' => 'کنترل فايل ها',
'R_REPORTS' => 'گزارشات', 'R_REPORTS' => 'گزارشات',
'R_CALLS' => 'پيام ها', 'R_CALLS' => 'پيام ها',
'R_USERS' => 'کاربران و گروه ها', 'R_USERS' => 'کاربران و گروه ها',
'R_REPAIR' => 'تعميرات', 'R_REPAIR' => 'تعميرات',
'R_LGOUTCP' => 'پاک سازي دوره ها', 'R_LGOUTCP' => 'پاک سازي دوره ها',
'R_BAN' => 'کنترل منع', 'R_BAN' => 'کنترل منع',
'BAN_EXP1' => 'ويرايش اي پي هاي منع شده و افزودن ...', 'BAN_EXP1' => 'ويرايش اي پي هاي منع شده و افزودن ...',
'BAN_EXP2' => 'براي بن کردن يک رنج اي پي از * استفاده نماييد و براي جداسازي اي پي ها از (|) استفاده نماييد.', 'BAN_EXP2' => 'براي بن کردن يک رنج اي پي از * استفاده نماييد و براي جداسازي اي پي ها از (|) استفاده نماييد.',
'UPDATE_BAN' => 'ذخيره تغييرات', 'UPDATE_BAN' => 'ذخيره تغييرات',
'BAN_UPDATED' => 'تغييرات با موفقيت ذخيره شدند', 'BAN_UPDATED' => 'تغييرات با موفقيت ذخيره شدند',
'R_RULES' => 'قوانين', 'R_RULES' => 'قوانين',
'RULES_EXP' => 'شما ميتوانيد توسط اين قسمت قوانين سيستم خود را بروز رساني و يا اضافه نماييد.', 'RULES_EXP' => 'شما ميتوانيد توسط اين قسمت قوانين سيستم خود را بروز رساني و يا اضافه نماييد.',
'UPDATE_RULES' => 'بروز رساني', 'UPDATE_RULES' => 'بروز رساني',
'RULES_UPDATED' => 'قوانين با موفقيت بروز شدند.', 'RULES_UPDATED' => 'قوانين با موفقيت بروز شدند.',
'R_SEARCH' => 'جست و جوي پيشرفته', 'R_SEARCH' => 'جست و جوي پيشرفته',
'SEARCH_FILES' => 'جست وجو براي فايل هاي', 'SEARCH_FILES' => 'جست وجو براي فايل هاي',
'SEARCH_SUBMIT' => 'جست وجو', 'SEARCH_SUBMIT' => 'جست وجو',
'LAST_DOWN' => 'اخرين دانلود ', 'LAST_DOWN' => 'اخرين دانلود ',
'WAS_B4' => 'قبل از ', 'WAS_B4' => 'قبل از ',
'SEARCH_USERS' => 'جست وجو براي کاربر', 'SEARCH_USERS' => 'جست وجو براي کاربر',
'R_IMG_CTRL' => 'کنترل تصاوير', 'R_IMG_CTRL' => 'کنترل تصاوير',
'ENABLE_USERFILE' => 'فعال سازي فايل هاي کاربران', 'ENABLE_USERFILE' => 'فعال سازي فايل هاي کاربران',
'MAX_STORAGE' => 'حداکثر ذخیره سازی (بایت)', 'MAX_STORAGE' => 'حداکثر ذخیره سازی (بایت)',
'R_EXTRA' => 'قالب هاي اضافي', 'R_EXTRA' => 'قالب هاي اضافي',
'EX_HEADER_N' => 'هدر اضافي... هدري که در زير هدر اصلي نمايش داده خواهد شد.', 'EX_HEADER_N' => 'هدر اضافي... هدري که در زير هدر اصلي نمايش داده خواهد شد.',
'EX_FOOTER_N' => 'فوتر اضافي...فوتري که در بالاي فوتر اصلي نمايش داده خواهد شد.', 'EX_FOOTER_N' => 'فوتر اضافي...فوتري که در بالاي فوتر اصلي نمايش داده خواهد شد.',
'UPDATE_EXTRA' => 'بروز رساني افزوده هاي قالب', 'UPDATE_EXTRA' => 'بروز رساني افزوده هاي قالب',
'EXTRA_UPDATED' => 'افزوده هاي قالب با موفقيت بروز شدند.', 'EXTRA_UPDATED' => 'افزوده هاي قالب با موفقيت بروز شدند.',
'R_STYLES' => 'استايل ها', 'R_STYLES' => 'استايل ها',
'NO_TPL_SHOOSED' => 'شما هيچ قالبي انتخاب نکرديد...', 'NO_TPL_SHOOSED' => 'شما هيچ قالبي انتخاب نکرديد...',
'R_PLUGINS' => 'افزونه ها', 'R_PLUGINS' => 'افزونه ها',
'ADD_NEW_PLUGIN' => 'افزودن افزونه', 'ADD_NEW_PLUGIN' => 'افزودن افزونه',
'ITEM_DELETED' => '"%s" با موفقیت حذف شد ...', 'ITEM_DELETED' => '"%s" با موفقیت حذف شد ...',
'PLGUIN_DISABLED_ENABLED' => 'افزونه فعال / غير فعال شد.', 'PLGUIN_DISABLED_ENABLED' => 'افزونه فعال / غير فعال شد.',
'NO_PLUGINS' => 'در حال حاضر افزونه اي نصب نيست.', 'NO_PLUGINS' => 'در حال حاضر افزونه اي نصب نيست.',
'NO_STYLES' => 'هیچ سبکی در دسترس نیست ..', 'NO_STYLES' => 'هیچ سبکی در دسترس نیست ..',
'NEW_PLUGIN_ADDED' => 'افزونه اضافه شد... <br /> توجه : برخي از افزونه هاي به همراه فايل هاي اضافي ارائه ميشوند که اين فايل ها نياز دارند به روت اصلي کليجا انتقال داده شوند.', 'NEW_PLUGIN_ADDED' => 'افزونه اضافه شد... <br /> توجه : برخي از افزونه هاي به همراه فايل هاي اضافي ارائه ميشوند که اين فايل ها نياز دارند به روت اصلي کليجا انتقال داده شوند.',
'PLUGIN_EXISTS_BEFORE' => 'اين افزونه با ورژن بالاتر از قبل موجود ميباشد.!', 'PLUGIN_EXISTS_BEFORE' => 'اين افزونه با ورژن بالاتر از قبل موجود ميباشد.!',
'R_CHECK_UPDATE' => 'چک کردن براي بروز رساني', 'R_CHECK_UPDATE' => 'چک کردن براي بروز رساني',
'ERROR_CHECK_VER' => 'خطا ! مشل در بروز رساني , لطفا بعدا تلاش نماييد.', 'ERROR_CHECK_VER' => 'خطا ! مشل در بروز رساني , لطفا بعدا تلاش نماييد.',
'UPDATE_KLJ_NOW' => 'شما بايد ورژن خود را بروز رساني کنيد. براي اطلاعات بيشتر به سايت مرجع مراجعه نماييد.', 'UPDATE_KLJ_NOW' => 'شما بايد ورژن خود را بروز رساني کنيد. براي اطلاعات بيشتر به سايت مرجع مراجعه نماييد.',
'U_LAST_VER_KLJ' => 'شما از اخرين نسخه کليجا استفاده ميکنيد.', 'U_LAST_VER_KLJ' => 'شما از اخرين نسخه کليجا استفاده ميکنيد.',
'U_USE_PRE_RE' => 'شما از نسخه بتا استفاده ميکنيد ,براي گزارش هر گونه خطا يا باگ <a href="http://www.kleeja.com/bugs/">اينجا را</a> کليک نماييد.', 'U_USE_PRE_RE' => 'شما از نسخه بتا استفاده ميکنيد ,براي گزارش هر گونه خطا يا باگ <a href="http://www.kleeja.com/bugs/">اينجا را</a> کليک نماييد.',
'STYLE_IS_DEFAULT' => 'استايل پيش فرض', 'STYLE_IS_DEFAULT' => 'استايل پيش فرض',
'MAKE_AS_DEFAULT' => 'انتخاب به عنوان پيش فرض', 'MAKE_AS_DEFAULT' => 'انتخاب به عنوان پيش فرض',
'STYLE_NOW_IS_DEFAULT' => 'قالب "%s" به عنوان , قالب پيش فرض انتخاب شد.', 'STYLE_NOW_IS_DEFAULT' => 'قالب "%s" به عنوان , قالب پيش فرض انتخاب شد.',
'UPDATE_NOW_S' => 'نسخه کليجا شما قديمي ميباشد.لطفا ان را بروز رساني کنيد. ورژن فعلي شما %1$s ميباشد و جديدترين نسخه حاضر %2$s است', 'UPDATE_NOW_S' => 'نسخه کليجا شما قديمي ميباشد.لطفا ان را بروز رساني کنيد. ورژن فعلي شما %1$s ميباشد و جديدترين نسخه حاضر %2$s است',
'ADD_NEW_EXT' => 'افزودن پسوند جديد', 'ADD_NEW_EXT' => 'افزودن پسوند جديد',
'ADD_NEW_EXT_EXP' => 'پسوند مورد نظر را وارد کنيد تا به اين گروه افزوده شود.', 'ADD_NEW_EXT_EXP' => 'پسوند مورد نظر را وارد کنيد تا به اين گروه افزوده شود.',
'EMPTY_EXT_FIELD' => 'فيلد پسوند خالي ميباشد.', 'EMPTY_EXT_FIELD' => 'فيلد پسوند خالي ميباشد.',
'NEW_EXT_ADD' => 'پسوند جديد افزوده شد. ', 'NEW_EXT_ADD' => 'پسوند جديد افزوده شد. ',
'NEW_EXT_EXISTS_B4' => 'پسوند %s از قبل موجود ميباشد.', 'NEW_EXT_EXISTS_B4' => 'پسوند %s از قبل موجود ميباشد.',
'CONFIG_WRITEABLE' => 'فايل config.php در حال حاضر پرميشن کامل براي دسترسي دارد. به شدت توصيه ميکنيم سطح دسترسي را به 640 و يا حداقل 644 تغيير دهيد.', 'CONFIG_WRITEABLE' => 'فايل config.php در حال حاضر پرميشن کامل براي دسترسي دارد. به شدت توصيه ميکنيم سطح دسترسي را به 640 و يا حداقل 644 تغيير دهيد.',
'USERS_NOT_NORMAL_SYS' => 'سيستم فعلي شما , يک سيستم معمولي نميباشد.', 'USERS_NOT_NORMAL_SYS' => 'سيستم فعلي شما , يک سيستم معمولي نميباشد.',
'DIMENSIONS_THMB' => 'ابعاد تصاوير بند انگشتي', 'DIMENSIONS_THMB' => 'ابعاد تصاوير بند انگشتي',
'ADMIN_DELETE_FILE_OK' => 'انجام شد! ', 'ADMIN_DELETE_FILE_OK' => 'انجام شد! ',
'ADMIN_DELETE_FILES' => 'حذف کليه ي فايل هاي کاربر!', 'ADMIN_DELETE_FILES' => 'حذف کليه ي فايل هاي کاربر!',
'BCONVERTER' => 'مبدل بايت',
'NO_HTACCESS_DIR_UP' => 'فايل .htaccess در پوشه "%s" موجود نميباشد! و اين براي امنيت سايت شما بسيار خطر ساز است.',
'NO_HTACCESS_DIR_UP_THUMB' => 'فايل .htaccess در پوشه تصاوير بند انگشتي موجود نميباشد! اين براي امنيت سايت شما بسيار خطر ساز است.',
'COOKIE_DOMAIN' => 'کوکي دامنه',
'COOKIE_NAME' => 'پيشوند کوکي',
'COOKIE_PATH' => 'مسير کوکي',
'COOKIE_SECURE' => 'کوکي محافظت شده',
'SHOWFILESBYIP' => 'نمایش فایل های IP',
'DELETEALLRES' => 'حذف همه نتايج',
'ADMIN_DELETE_FILES_OK' => 'فايل %s با موفقيت حذف شد.',
'ADMIN_DELETE_FILES_NOF' => 'فايلي براي حذف موجود نميباشد.',
'NOT_EXSIT_USER' => 'متاسفانه ...کاربري که شما به دنبال ان هستيد در ديتا بيس ما وجود ندارد!!!',
'ADMIN_DELETE_NO_FILE' => 'اين کاربر , فايلي براي حذف ندارد!!!',
'CONFIG_KLJ_MENUS_OTHER' => 'ديگر تنظيمات',
'CONFIG_KLJ_MENUS_GENERAL' => 'تنظيمات عمومي',
'CONFIG_KLJ_MENUS_ALL' => 'نمايش همه تنظيمات',
'CONFIG_KLJ_MENUS_UPLOAD' => 'تنظيمات اپلود',
'CONFIG_KLJ_MENUS_INTERFACE'=> 'تنظيمات ظاهري و طراحي',
'CONFIG_KLJ_MENUS_ADVANCED' => 'تنظيمات پيشرفته',
'DELF_CAUTION' => '<span class="delf_caution">اخطار : ممکن است در هنگام استفاده از اعداد کوچک , خطر ساز باشد.</span>',
'PACKAGE_N_CMPT_KLJ' => 'این افزونه / سبک با نسخه kleja که استفاده می کنید سازگار نیست! .',
'PHPINI_FILESIZE_SMALL' => 'بيشترين حجم اجازه داده شده براي اپلود به سرويس شما "%1$s" انتخاب شده است در حالي که بيشترين حجم قالب اپلود براي پي اچ پي در سرور شما "%2$s" ميباشد.',
'PHPINI_MPOSTSIZE_SMALL' => 'شما اپلود فايل هاي "%1$s" را مجاز کرديد, اکنون بايد مقدار بيشتري براي post_max_size انتخاب کنيد ',
'NUMPER_REPORT' => 'تعداد گزارشات',
'NO_UP_CHANGE_S' => 'تغييري رخ نداده است...',
'ADD_HEADER_EXTRA' => 'هدر اضافي',
'ADD_FOOTER_EXTRA' => 'فوتر اضافي',
'ADMIN_USING_IE6' => 'شما از مرورگر اينترنت اکسپلورر 6 استفاده ميکنيد, لطفا از مرورگر ديگري استفاده کنيد.',
'T_CLEANING_FILES_NOW' => 'حذف فايل هاي بلا استفاده, اين فرايند ممکن است مدتي به طول بي انجامد.',
'DEPEND_ON_NO_STYLE_ERR' => 'اين استايل بر پايه استايل "%s" ميباشد, که ظاهرا شما ان را نداريد.',
'PLUGINS_REQ_NO_STYLE_ERR' => 'اين استايل نياز به افزونه [ s% ] دارد, ان را نصب نماييد.',
'KLJ_VER_NO_STYLE_ERR' => 'اين استايل نياز به نسخه %s کليجا يا بالاتر را دارد.',
'STYLE_DEPEND_ON' => 'پايه ',
'MESSAGE_NONE' => 'پيامي وجود ندارد...',
'KLEEJA_TEAM' => 'تيم توسعه کليجا',
'ERR_SEND_MAIL' => 'خطا در ارسال ميل, لطفا بعدا تلاش کنيد...!',
'FIND_IP_FILES' => 'يافت شد',
'ALPHABETICAL_ORDER_FILES' => 'مرتب سازي فايل ها بر اساس الفبا',
'ORDER_SIZE' => 'مرتب سازي فايل ها بر اساس حجم از بزرگ به کوچک',
'ORDER_TOTAL_DOWNLOADS' => 'مرتب سازي فايل ها بر اساس تعداد دانلود ها',
'LIVEXTS' => 'پسوند هاي زنده',
'COMMA_X' => '<p class="live_xts">جدا شده توسط کاما (<font style="font-size:large"> , </font>)</p>',
'NO_SEARCH_WORD' => 'شما چيزي در فرم جست و جو تايپ نکرديد!',
'USERSECTOUPLOAD' => 'زمان (ثانيه) بين هر اپلود با اپلود بعدي.',
'ENABLE_MULTIPART' => 'دانلود چند قسمتی را فعال کنید',
'ADM_UNWANTED_FILES' => 'ظاهرا شما از نسخه قديمي بروز رساني کرده ايد و به دليل تفاوت نوع فايل ها شما با مشکل دوگانگي فايل مواجه ميشويد. </ br> براي رفع اين مشکل , کليه ي فايل هاي پوشه "includes/adm" را پاک کرده و مجددا اپلود نماييد.',
'HTML_URLS_ENABLED_NO_HTCC' => 'شما ادرس دهي بر اساس قوانين htaccess را انتخا کرده ايد. اما ظاهرا وارد کردن قوانين را فراموش کرده ايد. براي اطلاعات بيشتر به سايت پشتيبان مراجعه نماييد.',
'PLUGIN_CONFIRM_ADD' => 'اخطار!!! اين افزونه تغييراتي در اسکريپت اصلي خواهد داد و اين ممکن است براي امنيت در اينده خطر ساز باشد, لذا از صحت افزونه اطمينان حاصل کنيد.',
'WELCOME' => 'خوش امديد',
'ENABLE_CAPTCHA' => 'فعال کردن کپچا در کليجا!',
'NO_THUMB_FOLDER' => 'ظاهرا شما قابليت تصاوير بند انگشتي را فعال کرديد, اما پوشه %s موجو نميباشد.ان را به صورت دستي ايجاد کنيد.',
'DELETE_EARLIER_30DAYS' => 'حذف فايل هاي قديمي تر از 30 روز',
'DELETE_ALL' => 'حذف همه',
'DELETE_PROCESS_QUEUED' => 'فعاليت حذف به ليست انتظار افزوده شد تا از لود سرور جلوگيري شود.',
'DELETE_PROCESS_IN_WORK' => 'فرايند حذف در حال انجام ميباشد.',
'SHOW_FROM_24H' => 'نمايش 24 ساعت گذشته',
'THUMB_DIS_LONGTIME' => 'قابليت تصاوير بند انگشتي غير فعال شده است.اين باعث ميشه که کليجا همه عکس هاي شما را کم حجم کند تا در اينجا قابل نمايش باشد.',
'R_GROUPS' => 'مديريت گروه ها', 'BCONVERTER' => 'مبدل بايت',
'ESSENTIAL_GROUPS' => 'گروه هاي اصلي', 'NO_HTACCESS_DIR_UP' => 'فايل .htaccess در پوشه "%s" موجود نميباشد! و اين براي امنيت سايت شما بسيار خطر ساز است.',
'CUSTOM_GROUPS' => 'گروه هاي شخصي سازي شده', 'NO_HTACCESS_DIR_UP_THUMB' => 'فايل .htaccess در پوشه تصاوير بند انگشتي موجود نميباشد! اين براي امنيت سايت شما بسيار خطر ساز است.',
'EDIT_DATA' => 'ويرايش اطلاعات', 'COOKIE_DOMAIN' => 'کوکي دامنه',
'EDIT_ACL' => 'مجوزها را ویرایش کنید', 'COOKIE_NAME' => 'پيشوند کوکي',
'HE_CAN' => 'توانا', 'COOKIE_PATH' => 'مسير کوکي',
'HE_CAN_NOT' => 'ناتوان', 'COOKIE_SECURE' => 'کوکي محافظت شده',
//ACLS roles 'SHOWFILESBYIP' => 'نمایش فایل های IP',
'ACLS_ENTER_ACP' => 'دسترسي به ACP', 'DELETEALLRES' => 'حذف همه نتايج',
'ACLS_ACCESS_FILEUSER' => 'دسترسي به فايل هاي خودش.', 'ADMIN_DELETE_FILES_OK' => 'فايل %s با موفقيت حذف شد.',
'ACLS_ACCESS_FILEUSERS' => 'جست وجوي هرگونه فايل / پوشه کاربر', 'ADMIN_DELETE_FILES_NOF' => 'فايلي براي حذف موجود نميباشد.',
'ACLS_ACCESS_CALL' => 'دسترسي به پوشه "تماس با ما "', 'NOT_EXSIT_USER' => 'متاسفانه ...کاربري که شما به دنبال ان هستيد در ديتا بيس ما وجود ندارد!!!',
'ACLS_ACCESS_REPORT' => 'نمايش صفحه "گزارشات"', 'ADMIN_DELETE_NO_FILE' => 'اين کاربر , فايلي براي حذف ندارد!!!',
'ACLS_ACCESS_STATS' => 'دسترسي به صفحه امار ها', 'CONFIG_KLJ_MENUS_OTHER' => 'ديگر تنظيمات',
'CONFIG_KLJ_MENUS_GENERAL' => 'تنظيمات عمومي',
'CONFIG_KLJ_MENUS_ALL' => 'نمايش همه تنظيمات',
'CONFIG_KLJ_MENUS_UPLOAD' => 'تنظيمات اپلود',
'CONFIG_KLJ_MENUS_INTERFACE' => 'تنظيمات ظاهري و طراحي',
'CONFIG_KLJ_MENUS_ADVANCED' => 'تنظيمات پيشرفته',
'DELF_CAUTION' => '<span class="delf_caution">اخطار : ممکن است در هنگام استفاده از اعداد کوچک , خطر ساز باشد.</span>',
'PACKAGE_N_CMPT_KLJ' => 'این افزونه / سبک با نسخه kleja که استفاده می کنید سازگار نیست! .',
'PHPINI_FILESIZE_SMALL' => 'بيشترين حجم اجازه داده شده براي اپلود به سرويس شما "%1$s" انتخاب شده است در حالي که بيشترين حجم قالب اپلود براي پي اچ پي در سرور شما "%2$s" ميباشد.',
'PHPINI_MPOSTSIZE_SMALL' => 'شما اپلود فايل هاي "%1$s" را مجاز کرديد, اکنون بايد مقدار بيشتري براي post_max_size انتخاب کنيد ',
'NUMPER_REPORT' => 'تعداد گزارشات',
'NO_UP_CHANGE_S' => 'تغييري رخ نداده است...',
'ADD_HEADER_EXTRA' => 'هدر اضافي',
'ADD_FOOTER_EXTRA' => 'فوتر اضافي',
'ADMIN_USING_IE6' => 'شما از مرورگر اينترنت اکسپلورر 6 استفاده ميکنيد, لطفا از مرورگر ديگري استفاده کنيد.',
'T_CLEANING_FILES_NOW' => 'حذف فايل هاي بلا استفاده, اين فرايند ممکن است مدتي به طول بي انجامد.',
'DEPEND_ON_NO_STYLE_ERR' => 'اين استايل بر پايه استايل "%s" ميباشد, که ظاهرا شما ان را نداريد.',
'PLUGINS_REQ_NO_STYLE_ERR' => 'اين استايل نياز به افزونه [ s% ] دارد, ان را نصب نماييد.',
'KLJ_VER_NO_STYLE_ERR' => 'اين استايل نياز به نسخه %s کليجا يا بالاتر را دارد.',
'STYLE_DEPEND_ON' => 'پايه ',
'MESSAGE_NONE' => 'پيامي وجود ندارد...',
'KLEEJA_TEAM' => 'تيم توسعه کليجا',
'ERR_SEND_MAIL' => 'خطا در ارسال ميل, لطفا بعدا تلاش کنيد...!',
'FIND_IP_FILES' => 'يافت شد',
'ALPHABETICAL_ORDER_FILES' => 'مرتب سازي فايل ها بر اساس الفبا',
'ORDER_SIZE' => 'مرتب سازي فايل ها بر اساس حجم از بزرگ به کوچک',
'ORDER_TOTAL_DOWNLOADS' => 'مرتب سازي فايل ها بر اساس تعداد دانلود ها',
'LIVEXTS' => 'پسوند هاي زنده',
'COMMA_X' => '<p class="live_xts">جدا شده توسط کاما (<font style="font-size:large"> , </font>)</p>',
'NO_SEARCH_WORD' => 'شما چيزي در فرم جست و جو تايپ نکرديد!',
'USERSECTOUPLOAD' => 'زمان (ثانيه) بين هر اپلود با اپلود بعدي.',
'ENABLE_MULTIPART' => 'دانلود چند قسمتی را فعال کنید',
'ADM_UNWANTED_FILES' => 'ظاهرا شما از نسخه قديمي بروز رساني کرده ايد و به دليل تفاوت نوع فايل ها شما با مشکل دوگانگي فايل مواجه ميشويد. </ br> براي رفع اين مشکل , کليه ي فايل هاي پوشه "includes/adm" را پاک کرده و مجددا اپلود نماييد.',
'HTML_URLS_ENABLED_NO_HTCC' => 'شما ادرس دهي بر اساس قوانين htaccess را انتخا کرده ايد. اما ظاهرا وارد کردن قوانين را فراموش کرده ايد. براي اطلاعات بيشتر به سايت پشتيبان مراجعه نماييد.',
'PLUGIN_CONFIRM_ADD' => 'اخطار!!! اين افزونه تغييراتي در اسکريپت اصلي خواهد داد و اين ممکن است براي امنيت در اينده خطر ساز باشد, لذا از صحت افزونه اطمينان حاصل کنيد.',
'WELCOME' => 'خوش امديد',
'ENABLE_CAPTCHA' => 'فعال کردن کپچا در کليجا!',
'NO_THUMB_FOLDER' => 'ظاهرا شما قابليت تصاوير بند انگشتي را فعال کرديد, اما پوشه %s موجو نميباشد.ان را به صورت دستي ايجاد کنيد.',
'DELETE_EARLIER_30DAYS' => 'حذف فايل هاي قديمي تر از 30 روز',
'DELETE_ALL' => 'حذف همه',
'DELETE_PROCESS_QUEUED' => 'فعاليت حذف به ليست انتظار افزوده شد تا از لود سرور جلوگيري شود.',
'DELETE_PROCESS_IN_WORK' => 'فرايند حذف در حال انجام ميباشد.',
'SHOW_FROM_24H' => 'نمايش 24 ساعت گذشته',
'THUMB_DIS_LONGTIME' => 'قابليت تصاوير بند انگشتي غير فعال شده است.اين باعث ميشه که کليجا همه عکس هاي شما را کم حجم کند تا در اينجا قابل نمايش باشد.',
'GROUP_IS_DEFAULT' => 'اين گروه به صورت پيشفرض براي ثبت نام ها ميباشد.', 'R_GROUPS' => 'مديريت گروه ها',
'ADD_NEW_GROUP' => 'افزودن گروه جديد', 'ESSENTIAL_GROUPS' => 'گروه هاي اصلي',
'DELETE_GROUP' => 'حذف گروه', 'CUSTOM_GROUPS' => 'گروه هاي شخصي سازي شده',
'GROUP_NAME' => 'نام گروه', 'EDIT_DATA' => 'ويرايش اطلاعات',
'COPY_FROM' => 'کپي از', 'EDIT_ACL' => 'مجوزها را ویرایش کنید',
'USERNAME_NOT_YOU' => 'تو نه ؟ %1$sخروج%2$s', 'HE_CAN' => 'توانا',
'DEFAULT_GROUP' => 'گروه پيش فرض', 'HE_CAN_NOT' => 'ناتوان',
'G_USERS_MOVE_TO' => 'انتقال کاربران گروه به', //ACLS roles
'TAKEN_NAMES' => 'اين نام از قبل انتخاب شده است. نام ديگري انتخاب کنيد.', 'ACLS_ENTER_ACP' => 'دسترسي به ACP',
'GROUP_DELETED' => 'گروه "%1$s" حذف شد و کاربران ان به گروه "%2$s" انتقال يافتند.', 'ACLS_ACCESS_FILEUSER' => 'دسترسي به فايل هاي خودش.',
'NO_MOVE_SAME_GRP' => 'شما نميتوانيد کاربران را به گروه مشابه انتقال دهيد.', 'ACLS_ACCESS_FILEUSERS' => 'جست وجوي هرگونه فايل / پوشه کاربر',
'DEFAULT_GRP_NO_DEL' => 'نميتوانيد اين گروه را حذف کنيد, زيرا اين گروه , گروه پيش فرض ميباشد.گروه را احالت پيشفرض خارج کنيد و مجددا تلاش نماييد.', 'ACLS_ACCESS_CALL' => 'دسترسي به پوشه "تماس با ما "',
'GROUP_ADDED' => 'گروه "%s" با موفقيت افزوده شد...', 'ACLS_ACCESS_REPORT' => 'نمايش صفحه "گزارشات"',
'SEARCH4FILES_BYIP' => 'جست و جو فايل براساس IP', 'ACLS_ACCESS_STATS' => 'دسترسي به صفحه امار ها',
'SEARCH4FILES_BYUSER' => 'جست و جو فايل هاي اين کاربر',
'USER_DELETED' => 'کاربر با موفقيت حذف شد...', 'GROUP_IS_DEFAULT' => 'اين گروه به صورت پيشفرض براي ثبت نام ها ميباشد.',
'USER_ADDED' => 'کاربر با موفقيت افزوده شد...', 'ADD_NEW_GROUP' => 'افزودن گروه جديد',
'DIRECT_FILE_NOTE' => 'اين فايل مستقيم ميباشد.فايل هاي مستقيم هيچ اماري ندارند...', 'DELETE_GROUP' => 'حذف گروه',
'IMAGEFOLDER' => 'پوشه زنده (live)', 'GROUP_NAME' => 'نام گروه',
'IMAGEFOLDEREXTS' => 'پسوند هاي پوشه Live', 'COPY_FROM' => 'کپي از',
'IMAGEFOLDERE' => 'تغيير نام فايل', 'USERNAME_NOT_YOU' => 'تو نه ؟ %1$sخروج%2$s',
'LAST_VIEW' => 'اخرين نمايش', 'DEFAULT_GROUP' => 'گروه پيش فرض',
'HURRY_HURRY' => 'دسترسی سریع', 'G_USERS_MOVE_TO' => 'انتقال کاربران گروه به',
'RESYNC' => 'هماهنگ سازي مجدد (sync)', 'TAKEN_NAMES' => 'اين نام از قبل انتخاب شده است. نام ديگري انتخاب کنيد.',
'DEL_CACHE' => 'تخليه ي کش [فايل هاي موقت]', 'GROUP_DELETED' => 'گروه "%1$s" حذف شد و کاربران ان به گروه "%2$s" انتقال يافتند.',
'SYNCING' => 'همگام سازي در حال انجام : (%s), لطفا صبر کنيد ', 'NO_MOVE_SAME_GRP' => 'شما نميتوانيد کاربران را به گروه مشابه انتقال دهيد.',
'SYNCING_DONE' => 'همگام سازي براي (%s) انجام شد.', 'DEFAULT_GRP_NO_DEL' => 'نميتوانيد اين گروه را حذف کنيد, زيرا اين گروه , گروه پيش فرض ميباشد.گروه را احالت پيشفرض خارج کنيد و مجددا تلاش نماييد.',
'WHY_SYNCING' => 'کليجا از قابليت افزايش خودکار ( شمارشگر خودکار)استفاده ميکند. اين باعث بهبود نحوه عملکرد ميشود. پس از بروز رساني کليجا و يا هنگامي که اسکريپت از شما درخواست دارد از اين فعاليت استفاده کنيد.', 'GROUP_ADDED' => 'گروه "%s" با موفقيت افزوده شد...',
'REPAIR_DB_TABLES' => 'تعمير جداول ديتا بيس', 'SEARCH4FILES_BYIP' => 'جست و جو فايل براساس IP',
'NO_RESULT_USE_SYNC' => 'هيچ نتيجه اي حاصل نشد, اگر کليجا را تازه نصب کرده ايد مشکلي نيست. <br /> اگر شما تازه اسکريپت را اپگريد کرده ايد به صفحه "تعميرات " رفته و فايل ها و تصاوير را بروز رساني کنيد.', 'SEARCH4FILES_BYUSER' => 'جست و جو فايل هاي اين کاربر',
'ADVICE_CRON_LINK' => 'ترجیح می دهید هر ساعت یا دو بار پیوند صف معین را به صورت Cron قرار دهید', 'USER_DELETED' => 'کاربر با موفقيت حذف شد...',
'UPLOAD_LOCAL_PC' => 'از دستگاه خود بارگیری کنید', 'USER_ADDED' => 'کاربر با موفقيت افزوده شد...',
'NO_ZIP_ARCHIVE' => 'به نظر می رسد که ZipArchive در سرور شما موجود نیست ، آن را نصب کنید زیرا این یک الزام است.', 'DIRECT_FILE_NOTE' => 'اين فايل مستقيم ميباشد.فايل هاي مستقيم هيچ اماري ندارند...',
'EXTRACT_ZIP_FAILED' => 'هنگام باز کردن بایگانی مشکلی پیش آمد! اطمینان حاصل کنید که این یک فایل zip معتبر است و پوشه "%s" قابل نوشتن است.', 'IMAGEFOLDER' => 'پوشه زنده (live)',
'NO_PROBLEM_AFTER_ZIP' => رونده با موفقیت از حالت فشرده خارج شد و آماده فعال سازی است.', 'IMAGEFOLDEREXTS' => سوند هاي پوشه Live',
'SESSION_ENDED' => 'جلسه به پایان رسید. آیا می خواهید دوباره وارد شوید؟', 'IMAGEFOLDERE' => 'تغيير نام فايل',
'CUSTOMIZATION' => 'شخصی سازی', 'LAST_VIEW' => 'اخرين نمايش',
'SHOW' => 'نشان دادن', 'HURRY_HURRY' => 'دسترسی سریع',
'HIDE' => 'پنهان شدن', 'RESYNC' => 'هماهنگ سازي مجدد (sync)',
'VIEW' => 'مرور', 'DEL_CACHE' => 'تخليه ي کش [فايل هاي موقت]',
'INSTALL' => 'نصب', 'SYNCING' => 'همگام سازي در حال انجام : (%s), لطفا صبر کنيد ',
'CLOSE' => 'نزدیک', 'SYNCING_DONE' => 'همگام سازي براي (%s) انجام شد.',
'STATS_BOXES' => 'جعبه های آماری', 'WHY_SYNCING' => 'کليجا از قابليت افزايش خودکار ( شمارشگر خودکار)استفاده ميکند. اين باعث بهبود نحوه عملکرد ميشود. پس از بروز رساني کليجا و يا هنگامي که اسکريپت از شما درخواست دارد از اين فعاليت استفاده کنيد.',
'ITEM_UPDATED' => '"%s" با موفقیت به روز شد ..', 'REPAIR_DB_TABLES' => 'تعمير جداول ديتا بيس',
'ITEM_DOWNLOADED' => '"%s" با موفقیت بارگذاری شد! بعدا می توانید آن را فعال کنید.', 'NO_RESULT_USE_SYNC' => 'هيچ نتيجه اي حاصل نشد, اگر کليجا را تازه نصب کرده ايد مشکلي نيست. <br /> اگر شما تازه اسکريپت را اپگريد کرده ايد به صفحه "تعميرات " رفته و فايل ها و تصاوير را بروز رساني کنيد.',
'DOWNLOADED_FILE_NOT_FOUND' => 'پرونده ای که آپلود کردید وجود ندارد ، یافت نشد!', 'ADVICE_CRON_LINK' => 'ترجیح می دهید هر ساعت یا دو بار پیوند صف معین را به صورت Cron قرار دهید',
'PACKAGE_REMOTE_FILE_MISSING' => 'بسته "٪ s" در فروشگاه خارجی كليجا در دسترس نیست!', 'UPLOAD_LOCAL_PC' => 'از دستگاه خود بارگیری کنید',
'STORE_SERVER_ERROR' => 'هنگام برقراری ارتباط با سرور فروشگاه خارجی كليجا با خطایی مواجه شدیم ...', 'NO_ZIP_ARCHIVE' => 'به نظر می رسد که ZipArchive در سرور شما موجود نیست ، آن را نصب کنید زیرا این یک الزام است.',
'INSTALLED_PLUGINS' => 'افزونه های نصب شده', 'EXTRACT_ZIP_FAILED' => 'هنگام باز کردن بایگانی مشکلی پیش آمد! اطمینان حاصل کنید که این یک فایل zip معتبر است و پوشه "%s" قابل نوشتن است.',
'LOCAL_PLUGINS' => 'برنامه های افزودنی محلی (نصب نشده است)', 'NO_PROBLEM_AFTER_ZIP' => 'پرونده با موفقیت از حالت فشرده خارج شد و آماده فعال سازی است.',
'KLEEJA_STORE' => 'فروشگاه كليجا', 'SESSION_ENDED' => 'جلسه به پایان رسید. آیا می خواهید دوباره وارد شوید؟',
'KLJ_VER_NO_PLUGIN' => 'این افزونه / سبک می تواند بر روی نسخه كليجا%1$s تا%2$s کار کند.', 'CUSTOMIZATION' => 'شخصی سازی',
'VERSION' => 'رهایی', 'SHOW' => 'نشان دادن',
'DEVELOPER' => 'توسعه دهنده', 'HIDE' => 'پنهان شدن',
'ALL_PLUGINS_UPDATED' => 'همه برنامه های افزودنی به روز هستند جذاب!', 'VIEW' => 'مرور',
'ALL_STYLES_UPDATED' => 'همه سبک ها به روز شده اند. جذاب!', 'INSTALL' => 'نصب',
'UPDATE_ERR_FETCH_PACKAGE' => 'ما در بارگیری نسخه از سرور مشکل داشتیم!', 'CLOSE' => 'نزدیک',
'UPDATE_BACKUP_CREATE_FAILED' => 'ما نتوانستیم فایل پشتیبان را در پوشه حافظه نهان ایجاد کنیم!', 'STATS_BOXES' => 'جعبه های آماری',
'UPDATE_PROCESS_FAILED' => 'روند بروزرسانی انجام نشد!', 'ITEM_UPDATED' => '"%s" با موفقیت به روز شد ..',
'UPDATE_PROCESS_DONE' => 'كليجا با موفقیت به نسخه `%s` به روز شد ...', 'ITEM_DOWNLOADED' => '"%s" با موفقیت بارگذاری شد! بعدا می توانید آن را فعال کنید.',
'UPDATE_PROCESS_STEP1' => 'بسته بندی آخرین نسخه كليجا را به ارمغان آورد ...', 'DOWNLOADED_FILE_NOT_FOUND' => 'پرونده ای که آپلود کردید وجود ندارد ، یافت نشد!',
'UPDATE_PROCESS_STEP2' => 'یک ظرف تهیه پشتیبان ایجاد کنید و آخرین بسته پشتیبان را از حالت فشرده خارج کنید ...', 'PACKAGE_REMOTE_FILE_MISSING' => 'بسته "٪ s" در فروشگاه خارجی كليجا در دسترس نیست!',
'UPDATE_PROCESS_STEP3' => 'به نسخه جدید (فایلهای به روزرسانی و پایگاه داده) ارتقا دهید ...', 'STORE_SERVER_ERROR' => 'هنگام برقراری ارتباط با سرور فروشگاه خارجی كليجا با خطایی مواجه شدیم ...',
'RELEASE_NOTE' => 'اطلاعات نسخه', 'INSTALLED_PLUGINS' => 'افزونه های نصب شده',
'UPDATE_ALL' => 'همه رو آپدیت کن', 'LOCAL_PLUGINS' => 'برنامه های افزودنی محلی (نصب نشده است)',
'CANT_DEL_DEFAULT_STYLE' => 'شما نمی توانید سبک پیش فرض را حذف کنید! سبک دیگری را تنظیم کنید که می توانید حذف کنید.', 'KLEEJA_STORE' => 'فروشگاه كليجا',
'NOTIFICATIONS' => 'هشدارها', 'KLJ_VER_NO_PLUGIN' => 'این افزونه / سبک می تواند بر روی نسخه كليجا%1$s تا%2$s کار کند.',
'KJ_TWEETS' => 'توییتهای كليجا', 'VERSION' => 'رهایی',
'DEVELOPER' => 'توسعه دهنده',
'ALL_PLUGINS_UPDATED' => 'همه برنامه های افزودنی به روز هستند جذاب!',
'ALL_STYLES_UPDATED' => 'همه سبک ها به روز شده اند. جذاب!',
'UPDATE_ERR_FETCH_PACKAGE' => 'ما در بارگیری نسخه از سرور مشکل داشتیم!',
'UPDATE_BACKUP_CREATE_FAILED' => 'ما نتوانستیم فایل پشتیبان را در پوشه حافظه نهان ایجاد کنیم!',
'UPDATE_PROCESS_FAILED' => 'روند بروزرسانی انجام نشد!',
'UPDATE_PROCESS_DONE' => 'كليجا با موفقیت به نسخه `%s` به روز شد ...',
'UPDATE_PROCESS_STEP1' => 'بسته بندی آخرین نسخه كليجا را به ارمغان آورد ...',
'UPDATE_PROCESS_STEP2' => 'یک ظرف تهیه پشتیبان ایجاد کنید و آخرین بسته پشتیبان را از حالت فشرده خارج کنید ...',
'UPDATE_PROCESS_STEP3' => 'به نسخه جدید (فایلهای به روزرسانی و پایگاه داده) ارتقا دهید ...',
'RELEASE_NOTE' => 'اطلاعات نسخه',
'UPDATE_ALL' => 'همه رو آپدیت کن',
'CANT_DEL_DEFAULT_STYLE' => 'شما نمی توانید سبک پیش فرض را حذف کنید! سبک دیگری را تنظیم کنید که می توانید حذف کنید.',
'NOTIFICATIONS' => 'هشدارها',
'KJ_TWEETS' => 'توییتهای كليجا',
]; ];

View File

@@ -5,241 +5,241 @@
// //
return [ return [
//language information //language information
'DIR' => 'rtl', 'DIR' => 'rtl',
'LANG_SMALL_NAME' => 'fa-ir', 'LANG_SMALL_NAME' => 'fa-ir',
'HOME' => 'خانه', 'HOME' => 'خانه',
'INDEX' => 'صفحه اصلی', 'INDEX' => 'صفحه اصلی',
'SITE_CLOSED' => 'سایت بسته است', 'SITE_CLOSED' => 'سایت بسته است',
'STOP_FOR_SIZE' => 'سایت در دسترس نمی باشد', 'STOP_FOR_SIZE' => 'سایت در دسترس نمی باشد',
'SIZES_EXCCEDED' => 'با عرض پوزش حجم سرور کنونی ما پر شده است ، لطفا بعدا مراجعه کنید', 'SIZES_EXCCEDED' => 'با عرض پوزش حجم سرور کنونی ما پر شده است ، لطفا بعدا مراجعه کنید',
'SAFE_CODE' => 'فعال کردن کد امنیتی برای دانلود', 'SAFE_CODE' => 'فعال کردن کد امنیتی برای دانلود',
'LAST_VISIT' => 'آخرین بازدید شما', 'LAST_VISIT' => 'آخرین بازدید شما',
'FLS_LST_VST_SEARCH' => 'نمایش آخرین فایلها بعد از آخرین بازدید شما؟', 'FLS_LST_VST_SEARCH' => 'نمایش آخرین فایلها بعد از آخرین بازدید شما؟',
'IMG_LST_VST_SEARCH' => 'نمایش آخرین عکسها بعد از آخرین بازدید شما؟', 'IMG_LST_VST_SEARCH' => 'نمایش آخرین عکسها بعد از آخرین بازدید شما؟',
'NEXT' => 'بعدی &raquo;', 'NEXT' => 'بعدی &raquo;',
'PREV' => '&laquo; قبلی', 'PREV' => '&laquo; قبلی',
'INFORMATION' => 'توضیحات', 'INFORMATION' => 'توضیحات',
'WELCOME' => 'خوش آمدید', 'WELCOME' => 'خوش آمدید',
'KLEEJA_VERSION' => 'ورژن کلیجا', 'KLEEJA_VERSION' => 'ورژن کلیجا',
'NUMBER_ONLINE' => 'افراد آنلاین', 'NUMBER_ONLINE' => 'افراد آنلاین',
'USERS_SYSTEM' => 'سیستم کاربران', 'USERS_SYSTEM' => 'سیستم کاربران',
'ERROR_NAVIGATATION' => 'خطا در انتقال آدرس...', 'ERROR_NAVIGATATION' => 'خطا در انتقال آدرس...',
'USER_LOGIN' => ' ورود - فقط برای اعضا ', 'USER_LOGIN' => ' ورود - فقط برای اعضا ',
'LOGIN' => 'ورود کاربران', 'LOGIN' => 'ورود کاربران',
'USERNAME' => 'نام کاربری', 'USERNAME' => 'نام کاربری',
'PASSWORD' => 'كلمه عبور', 'PASSWORD' => 'كلمه عبور',
'LOSS_PASSWORD' => 'کلمه عبور را فراموش کرده اید؟', 'LOSS_PASSWORD' => 'کلمه عبور را فراموش کرده اید؟',
'LOGINED_BEFORE' => 'شما قبلا وارد اکانت خود شده اید', 'LOGINED_BEFORE' => 'شما قبلا وارد اکانت خود شده اید',
'LOGOUT' => 'خروج ', 'LOGOUT' => 'خروج ',
'EMPTY_FIELDS' => 'خطا...لطفا همه فیلدها را پر کنید!!!', 'EMPTY_FIELDS' => 'خطا...لطفا همه فیلدها را پر کنید!!!',
'LOGIN_SUCCESFUL' => 'شما با موفقیت وارد شدید.', 'LOGIN_SUCCESFUL' => 'شما با موفقیت وارد شدید.',
'LOGIN_ERROR' => 'خطا...ورود ناموفق بود!!!', 'LOGIN_ERROR' => 'خطا...ورود ناموفق بود!!!',
'REGISTER_CLOSED' => 'با عرض پوزش ، ثبت نام غیر فعال است!', 'REGISTER_CLOSED' => 'با عرض پوزش ، ثبت نام غیر فعال است!',
'PLACE_NO_YOU' => 'دسترسی به این بخش ممنوع میباشد', 'PLACE_NO_YOU' => 'دسترسی به این بخش ممنوع میباشد',
'NOT_EXSIT_USER' => 'کاربر مورد نظر وجود ندارد و یا یوزر این کاربر پاک شده است...!', 'NOT_EXSIT_USER' => 'کاربر مورد نظر وجود ندارد و یا یوزر این کاربر پاک شده است...!',
'REGISTERED_BEFORE' => 'شما قبلا عضو شدید.', 'REGISTERED_BEFORE' => 'شما قبلا عضو شدید.',
'REGISTER' => 'عضویت', 'REGISTER' => 'عضویت',
'EMAIL' => 'ادرس پست الکترونیکی', 'EMAIL' => 'ادرس پست الکترونیکی',
'VERTY_CODE' => 'کد امنیتی:', 'VERTY_CODE' => 'کد امنیتی:',
'NOTE_CODE' => 'حروف و اعدادی که در شکل می بینید دقیقا وارد کنید', 'NOTE_CODE' => 'حروف و اعدادی که در شکل می بینید دقیقا وارد کنید',
'WRONG_EMAIL' => 'آدرس پست الکترونیک اشتباه است!', 'WRONG_EMAIL' => 'آدرس پست الکترونیک اشتباه است!',
'WRONG_NAME' => 'نام کاربری باید حداقل 4 حرف باشد!', # CHECK 'WRONG_NAME' => 'نام کاربری باید حداقل 4 حرف باشد!', // CHECK
'EXIST_NAME' => 'این نام قبلا توسط کسی انتخاب شده است.', 'EXIST_NAME' => 'این نام قبلا توسط کسی انتخاب شده است.',
'EXIST_EMAIL' => 'این ایمیل قبلا توسط شخصی در سیستم ما ثبت شده است!', 'EXIST_EMAIL' => 'این ایمیل قبلا توسط شخصی در سیستم ما ثبت شده است!',
'WRONG_VERTY_CODE' => 'کد امنیتی نادرست است!', 'WRONG_VERTY_CODE' => 'کد امنیتی نادرست است!',
'REGISTER_SUCCESFUL' => 'باتشکر از شما,ثبت نام با موفقیت انجام شد.', 'REGISTER_SUCCESFUL' => 'باتشکر از شما,ثبت نام با موفقیت انجام شد.',
'LOGOUT_SUCCESFUL' => 'با موفقیت خارج شدید.', 'LOGOUT_SUCCESFUL' => 'با موفقیت خارج شدید.',
'LOGOUT_ERROR' => 'اشکالی در خروج بوجود آمده!', 'LOGOUT_ERROR' => 'اشکالی در خروج بوجود آمده!',
'DEL_SELECTED' => 'حذف موارد انتخاب شده', 'DEL_SELECTED' => 'حذف موارد انتخاب شده',
'DEL_ALL' => 'همه پرونده های من را حذف کنید', 'DEL_ALL' => 'همه پرونده های من را حذف کنید',
'ALL_DELETED' => 'همه پرونده های شما حذف شده اند', 'ALL_DELETED' => 'همه پرونده های شما حذف شده اند',
'NO_FILES_DELETE' => 'شما پرونده ای برای حذف ندارید', 'NO_FILES_DELETE' => 'شما پرونده ای برای حذف ندارید',
'FILES_UPDATED' => 'فایل با موفقیت بروزشد.', 'FILES_UPDATED' => 'فایل با موفقیت بروزشد.',
'PUBLIC_USER_FILES' => 'پوشه فایل های کاربر', 'PUBLIC_USER_FILES' => 'پوشه فایل های کاربر',
'FILEUSER' => 'فایل های کاربران', 'FILEUSER' => 'فایل های کاربران',
'YOUR_FILEUSER' => 'پوشه شما', 'YOUR_FILEUSER' => 'پوشه شما',
'COPY_AND_GET_DUD' => 'شما می توانید این آدرس را کپی کنید و آن را در اختیار دوستانتان قرار دهید تا آنها هم فایل های شما را مشاهده کنند ', 'COPY_AND_GET_DUD' => 'شما می توانید این آدرس را کپی کنید و آن را در اختیار دوستانتان قرار دهید تا آنها هم فایل های شما را مشاهده کنند ',
'NO_FILE_USER' => 'فایلی در اکانت شما یافت نشد!', 'NO_FILE_USER' => 'فایلی در اکانت شما یافت نشد!',
'CLOSED_FEATURE' => 'این ویژگی غیر فعال است', 'CLOSED_FEATURE' => 'این ویژگی غیر فعال است',
'USERFILE_CLOSED' => 'نمایش پوشه های کاربران غیر فعال است!', 'USERFILE_CLOSED' => 'نمایش پوشه های کاربران غیر فعال است!',
'PFILE_4_FORUM' => 'به قسمت مشخصات کاربری بروید تا بتوانید مشخصات خود را ویرایش کنید', 'PFILE_4_FORUM' => 'به قسمت مشخصات کاربری بروید تا بتوانید مشخصات خود را ویرایش کنید',
'USER_PLACE' => 'قسمت کاربری', 'USER_PLACE' => 'قسمت کاربری',
'PROFILE' => 'پروفایل', 'PROFILE' => 'پروفایل',
'EDIT_U_DATA' => 'بروزرسانی مشخصات کاربری', 'EDIT_U_DATA' => 'بروزرسانی مشخصات کاربری',
'PASS_ON_CHANGE' => 'ویرایش پسورد', 'PASS_ON_CHANGE' => 'ویرایش پسورد',
'OLD' => 'کلمه عبور قبلی', 'OLD' => 'کلمه عبور قبلی',
'NEW' => 'کلمه عبور جدید', 'NEW' => 'کلمه عبور جدید',
'NEW_AGAIN' => 'دوباره', 'NEW_AGAIN' => 'دوباره',
'UPDATE' => 'بروزرسانی', 'UPDATE' => 'بروزرسانی',
'PASS_O_PASS2' => 'ابتدا كلمه عبور قبلی و سپس کلمه عبور جدید را وارد کنید.', 'PASS_O_PASS2' => 'ابتدا كلمه عبور قبلی و سپس کلمه عبور جدید را وارد کنید.',
'DATA_CHANGED_O_LO' => 'اطلاعات شما با موفقیت بروز شدند!', 'DATA_CHANGED_O_LO' => 'اطلاعات شما با موفقیت بروز شدند!',
'CURRENT_PASS_WRONG' => 'کلمه عبور فعلی نادرست وارد شده است! برای تغییر و بروزرسانی اطلاعات باید کلمه عبور را به دقت وارد نمایید.', 'CURRENT_PASS_WRONG' => 'کلمه عبور فعلی نادرست وارد شده است! برای تغییر و بروزرسانی اطلاعات باید کلمه عبور را به دقت وارد نمایید.',
'DATA_CHANGED_NO' => 'اطلاعات جدیدی وارد نشده است.', 'DATA_CHANGED_NO' => 'اطلاعات جدیدی وارد نشده است.',
'LOST_PASS_FORUM' => 'برای تغییر رمز عبور به انجمن بروید.', 'LOST_PASS_FORUM' => 'برای تغییر رمز عبور به انجمن بروید.',
'GET_LOSTPASS' => 'بازیابی کلمه عبور', 'GET_LOSTPASS' => 'بازیابی کلمه عبور',
'E_GET_LOSTPASS' => 'آدرس پست الکترونیک خود را واردکنید تا کلمه عبور جدید را دریافت کنید.', 'E_GET_LOSTPASS' => 'آدرس پست الکترونیک خود را واردکنید تا کلمه عبور جدید را دریافت کنید.',
'WRONG_DB_EMAIL' => 'آدرس ایمیلی که وارد کرده اید ، در دیتابیس ما یافت نشد', 'WRONG_DB_EMAIL' => 'آدرس ایمیلی که وارد کرده اید ، در دیتابیس ما یافت نشد',
'GET_LOSTPASS_MSG' => "شما درخواست ریست کلمه عبور خود را داده اید,برای جلوگیری از اسپم لطفا بر روی لینک زیر کلیک نمایید : \r\n %1\$s \r\n کلمه عبور جدید: %2\$s", 'GET_LOSTPASS_MSG' => "شما درخواست ریست کلمه عبور خود را داده اید,برای جلوگیری از اسپم لطفا بر روی لینک زیر کلیک نمایید : \r\n %1\$s \r\n کلمه عبور جدید: %2\$s",
'CANT_SEND_NEWPASS' => 'خطا...سرور نمی تواند کلمه عبور جدید را ارسال کند!', 'CANT_SEND_NEWPASS' => 'خطا...سرور نمی تواند کلمه عبور جدید را ارسال کند!',
'OK_SEND_NEWPASS' => 'ما کلمه عبور جدید را برایتان ارسال کردیم', 'OK_SEND_NEWPASS' => 'ما کلمه عبور جدید را برایتان ارسال کردیم',
'OK_APPLY_NEWPASS' => 'کلمه عبور جدید شما ست شد ، اکنون می توانید وارد اکانت کاربری خود شوید.', 'OK_APPLY_NEWPASS' => 'کلمه عبور جدید شما ست شد ، اکنون می توانید وارد اکانت کاربری خود شوید.',
'GUIDE' => 'راهنمای پسوند ها', 'GUIDE' => 'راهنمای پسوند ها',
'GUIDE_EXP' => 'پسوند های مجاز به همراه محدودیت حجم...', 'GUIDE_EXP' => 'پسوند های مجاز به همراه محدودیت حجم...',
'EXT' => 'پسوند', 'EXT' => 'پسوند',
'SIZE' => 'حجم', 'SIZE' => 'حجم',
'REPORT' => 'گزارش', 'REPORT' => 'گزارش',
'YOURNAME' => 'نام شما', 'YOURNAME' => 'نام شما',
'URL' => 'ادرس', 'URL' => 'ادرس',
'REASON' => 'دلیل (توضیحات)', 'REASON' => 'دلیل (توضیحات)',
'NO_ID' => 'فایلی انتخاب نشده است..!!!', 'NO_ID' => 'فایلی انتخاب نشده است..!!!',
'TOTAL_SIZE_EXCEEDED' => 'از اندازه کل فراتر رفته است', 'TOTAL_SIZE_EXCEEDED' => 'از اندازه کل فراتر رفته است',
'STORAGE_USAGE' => '<b>%s</b> از <b>%s</b>', 'STORAGE_USAGE' => '<b>%s</b> از <b>%s</b>',
'NO_ME300RES' => 'توضیحات نمی تواند بیشتر از 300 کاراکتر باشند!!', 'NO_ME300RES' => 'توضیحات نمی تواند بیشتر از 300 کاراکتر باشند!!',
'THNX_REPORTED' => 'ما گزارش شما را دریافت کردیم ، متشکریم.', 'THNX_REPORTED' => 'ما گزارش شما را دریافت کردیم ، متشکریم.',
'RULES' => 'قوانین', 'RULES' => 'قوانین',
'NO_RULES_NOW' => 'هنوز قانونی وارد نشده', 'NO_RULES_NOW' => 'هنوز قانونی وارد نشده',
'E_RULES' => 'قوانین', 'E_RULES' => 'قوانین',
'CALL' => 'تماس با ما', 'CALL' => 'تماس با ما',
'SEND' => 'ارسال', 'SEND' => 'ارسال',
'TEXT' => 'توضیحات', 'TEXT' => 'توضیحات',
'NO_ME300TEXT' => 'نظرات نمی توانند از 300 کاراکتر بیشتر باشند!!!', 'NO_ME300TEXT' => 'نظرات نمی توانند از 300 کاراکتر بیشتر باشند!!!',
'THNX_CALLED' => 'ارسال شد، به زودی جوابی از جانب ما دریافت می کنید.', 'THNX_CALLED' => 'ارسال شد، به زودی جوابی از جانب ما دریافت می کنید.',
'NO_DEL_F' => 'با عرض پوزش ، حذف آدرس توسط مدیرسایت غیرفعال شده است.', 'NO_DEL_F' => 'با عرض پوزش ، حذف آدرس توسط مدیرسایت غیرفعال شده است.',
'E_DEL_F' => 'ادرس حذف فایل', 'E_DEL_F' => 'ادرس حذف فایل',
'WRONG_URL' => 'آدرس را اشتباه وارد کردید..', 'WRONG_URL' => 'آدرس را اشتباه وارد کردید..',
'DELETE_SUCCESFUL' => 'با موفقیت حذف شد.', 'DELETE_SUCCESFUL' => 'با موفقیت حذف شد.',
'STATS' => 'امار', 'STATS' => 'امار',
'STATS_CLOSED' => 'آمار سایت توسط مدیریت غیر فعال شده است', 'STATS_CLOSED' => 'آمار سایت توسط مدیریت غیر فعال شده است',
'FILES_ST' => 'اپلود شده', 'FILES_ST' => 'اپلود شده',
'FILE' => 'فایل', 'FILE' => 'فایل',
'IMAGE' => 'تصویر', 'IMAGE' => 'تصویر',
'USERS_ST' => 'مجموع کاربران', 'USERS_ST' => 'مجموع کاربران',
'USER' => 'کاربر', 'USER' => 'کاربر',
'USED_SPACE' => 'فضای مورد استفاده', 'USED_SPACE' => 'فضای مورد استفاده',
'SIZES_ST' => 'مجموع حجم فایل های اپلود شده', 'SIZES_ST' => 'مجموع حجم فایل های اپلود شده',
//'LSTFLE_ST' => 'اخرین اپلود', //'LSTFLE_ST' => 'اخرین اپلود',
'LSTDELST' => 'آخرین عملیات چک کردن فایلهای دانلود نشده', 'LSTDELST' => 'آخرین عملیات چک کردن فایلهای دانلود نشده',
'LAST_1_H' => 'امار ساعت گذشته', 'LAST_1_H' => 'امار ساعت گذشته',
'DOWNLAOD' => 'دانلود', 'DOWNLAOD' => 'دانلود',
'DOWNLOAD' => 'دانلود', 'DOWNLOAD' => 'دانلود',
'FILE_FOUNDED' => 'فایلهای یافت شده..', 'FILE_FOUNDED' => 'فایلهای یافت شده..',
'WAIT' => 'لطفا صبر کنید..', 'WAIT' => 'لطفا صبر کنید..',
'CLICK_DOWN' => 'برای دریافت فایل کلیک کنید', 'CLICK_DOWN' => 'برای دریافت فایل کلیک کنید',
'JS_MUST_ON' => 'لطفا جاوا اسکریپت را در مرورگر خود فعال نمایید.', 'JS_MUST_ON' => 'لطفا جاوا اسکریپت را در مرورگر خود فعال نمایید.',
'FILE_INFO' => 'اطلاعات فایل', 'FILE_INFO' => 'اطلاعات فایل',
'FILENAME' => 'نام فایل', 'FILENAME' => 'نام فایل',
'FILESIZE' => 'حجم فایل', 'FILESIZE' => 'حجم فایل',
'FILETYPE' => 'نوع فایل', 'FILETYPE' => 'نوع فایل',
'FILEDATE' => 'تاریخ فایل', 'FILEDATE' => 'تاریخ فایل',
'LAST_DOWN' => 'اخرین دانلود ', 'LAST_DOWN' => 'اخرین دانلود ',
'FILEUPS' => 'تعداد دانلود ها', 'FILEUPS' => 'تعداد دانلود ها',
'FILEREPORT' => 'گزارش فایل های خلاف قوانین', 'FILEREPORT' => 'گزارش فایل های خلاف قوانین',
'FILE_NO_FOUNDED' => 'فایل پیدا نشد...!!', 'FILE_NO_FOUNDED' => 'فایل پیدا نشد...!!',
'IMG_NO_FOUNDED' => 'عکس پیدا نشد...!!', 'IMG_NO_FOUNDED' => 'عکس پیدا نشد...!!',
'NOT_IMG' => 'این فایل , عکس نیست!', 'NOT_IMG' => 'این فایل , عکس نیست!',
'MORE_F_FILES' => 'شما به حداکثر میزان فیلد های خود رسیده اید.', 'MORE_F_FILES' => 'شما به حداکثر میزان فیلد های خود رسیده اید.',
'DOWNLOAD_F' => '[ اپلود فایل ]', 'DOWNLOAD_F' => '[ اپلود فایل ]',
'DOWNLOAD_T' => '[ دانلود از ادرس ]', 'DOWNLOAD_T' => '[ دانلود از ادرس ]',
'PAST_URL_HERE' => '[ لینک را اینجا وارد کنید ]', 'PAST_URL_HERE' => '[ لینک را اینجا وارد کنید ]',
'SAME_FILE_EXIST' => 'فایل "%s" موجود میباشد, نام ان را تغییر دهید و مجدداد تلاش نمایید.', 'SAME_FILE_EXIST' => 'فایل "%s" موجود میباشد, نام ان را تغییر دهید و مجدداد تلاش نمایید.',
'NO_FILE_SELECTED' => 'ابتدا فایلی را انتخاب نمایید!!', 'NO_FILE_SELECTED' => 'ابتدا فایلی را انتخاب نمایید!!',
'WRONG_F_NAME' => 'نام فایل "%s" محتوی کلمات غیر مجاز می باشد', 'WRONG_F_NAME' => 'نام فایل "%s" محتوی کلمات غیر مجاز می باشد',
'FORBID_EXT' => 'پسوند "%s" پشتیبانی نمیشود!', 'FORBID_EXT' => 'پسوند "%s" پشتیبانی نمیشود!',
'SIZE_F_BIG' => 'حجم فایل"%1$s" باید کوچکتر از %2$s باشد.', 'SIZE_F_BIG' => 'حجم فایل"%1$s" باید کوچکتر از %2$s باشد.',
'URL_F_DEL' => 'آدرس حذف کردن فایل', 'URL_F_DEL' => 'آدرس حذف کردن فایل',
'URL_F_THMB' => 'آدرس تصویر بند انگشتی', 'URL_F_THMB' => 'آدرس تصویر بند انگشتی',
'URL_F_FILE' => 'ادرس فایل', 'URL_F_FILE' => 'ادرس فایل',
'URL_F_IMG' => 'ادرس عکس', 'URL_F_IMG' => 'ادرس عکس',
'URL_F_BBC' => 'آدرس انجمن', 'URL_F_BBC' => 'آدرس انجمن',
'IMG_DOWNLAODED' => 'عکس با موفقیت آپلود شد.', 'IMG_DOWNLAODED' => 'عکس با موفقیت آپلود شد.',
'FILE_DOWNLAODED' => 'فایل با موفقیت آپلود شد.', 'FILE_DOWNLAODED' => 'فایل با موفقیت آپلود شد.',
'CANT_UPLAOD' => 'خطا! به دلیل نامعلوم عملیات اپلود فایل "%s" ناموفق بود!', 'CANT_UPLAOD' => 'خطا! به دلیل نامعلوم عملیات اپلود فایل "%s" ناموفق بود!',
'CANT_DIR_CRT' => 'پوشه به صورت خودکار ایجاد نشد, شما باید ان را به صورت دستی ایجاد نمایید.', 'CANT_DIR_CRT' => 'پوشه به صورت خودکار ایجاد نشد, شما باید ان را به صورت دستی ایجاد نمایید.',
'AGREE_RULES' => 'قوانین را میپذیرم.', 'AGREE_RULES' => 'قوانین را میپذیرم.',
'URL_CANT_GET' => 'خطا در دریافت فایل از ادرس..!', 'URL_CANT_GET' => 'خطا در دریافت فایل از ادرس..!',
'ADMINCP' => 'کنترل پنل ', 'ADMINCP' => 'کنترل پنل ',
'GO_BACK_BROWSER' => 'بازگشت', 'GO_BACK_BROWSER' => 'بازگشت',
'U_R_BANNED' => 'متاسفانه شما محروم شده اید و نمی توانید از سایت استفاده کنید.', 'U_R_BANNED' => 'متاسفانه شما محروم شده اید و نمی توانید از سایت استفاده کنید.',
'U_R_FLOODER' => 'سیستم امنیتی سایت فعال شده است...', 'U_R_FLOODER' => 'سیستم امنیتی سایت فعال شده است...',
'YES' => 'بلی', 'YES' => 'بلی',
'NO' => 'خیر', 'NO' => 'خیر',
'LANGUAGE' => 'زبان', 'LANGUAGE' => 'زبان',
'NORMAL' => 'معمولی', 'NORMAL' => 'معمولی',
'STYLE' => 'استایل', 'STYLE' => 'استایل',
'GROUP' => 'دسته', 'GROUP' => 'دسته',
'UPDATE_FILES' => 'بروزرسانی فایل ها', 'UPDATE_FILES' => 'بروزرسانی فایل ها',
'BY' => 'بوسیله', 'BY' => 'بوسیله',
'FILDER' => 'پوشه', 'FILDER' => 'پوشه',
'DELETE' => 'حذف', 'DELETE' => 'حذف',
'GUST' => 'میهمان', 'GUST' => 'میهمان',
'NAME' => 'نام', 'NAME' => 'نام',
'CLICKHERE' => 'کلیک کنید', 'CLICKHERE' => 'کلیک کنید',
'IP' => 'ای پی', 'IP' => 'ای پی',
'TIME' => 'زمان', 'TIME' => 'زمان',
'RETURN_HOME' => 'بازگشت به صفحه اصلی', 'RETURN_HOME' => 'بازگشت به صفحه اصلی',
'TODAY' => 'امروز', 'TODAY' => 'امروز',
'DAYS' => 'روز', 'DAYS' => 'روز',
'SUBMIT' => 'ارسال', 'SUBMIT' => 'ارسال',
'EDIT' => 'ویرایش', 'EDIT' => 'ویرایش',
'DISABLE' => 'غیرفعال', 'DISABLE' => 'غیرفعال',
'ENABLE' => 'فعال', 'ENABLE' => 'فعال',
'OPEN' => 'باز', 'OPEN' => 'باز',
'NOTE' => 'توضیحات', 'NOTE' => 'توضیحات',
'WARN' => 'اخطار', 'WARN' => 'اخطار',
'BITE' => 'بایت', 'BITE' => 'بایت',
'KILOBYTE' => 'كيلوبايت', 'KILOBYTE' => 'كيلوبايت',
'NOT_SAFE_FILE' => 'سیستم كليجا تشخیص داده است که پرونده "%s" ناامن است و حاوی کد مخرب است .. !!', 'NOT_SAFE_FILE' => 'سیستم كليجا تشخیص داده است که پرونده "%s" ناامن است و حاوی کد مخرب است .. !!',
'ARE_YOU_SURE_DO_THIS' => 'مطمئن هستید؟', 'ARE_YOU_SURE_DO_THIS' => 'مطمئن هستید؟',
'SITE_FOR_MEMBER_ONLY' => 'این مرکز فقط برای اعضا میباشد, لطفا عضو شوید یا با نام کاربری خود وارد شوید.', 'SITE_FOR_MEMBER_ONLY' => 'این مرکز فقط برای اعضا میباشد, لطفا عضو شوید یا با نام کاربری خود وارد شوید.',
'SHOW_MY_FILECP' => 'نمایش فایل های من', 'SHOW_MY_FILECP' => 'نمایش فایل های من',
'PASS_CHANGE' => 'تغییر کلمه عبور', 'PASS_CHANGE' => 'تغییر کلمه عبور',
'EDIT_U_AVATER' => 'ُتغییر اواتار شما', 'EDIT_U_AVATER' => 'ُتغییر اواتار شما',
'EDIT_U_AVATER_LINK' => ' برای تغییر اواتار خود %1$s" کلیک کنید "%2$s , سپس در این سایت با ایمیل خود ثبت نام کنید و اواتار خود را تغییر دهید.', 'EDIT_U_AVATER_LINK' => ' برای تغییر اواتار خود %1$s" کلیک کنید "%2$s , سپس در این سایت با ایمیل خود ثبت نام کنید و اواتار خود را تغییر دهید.',
'MOST_EVER_ONLINE' => 'بیشترین اعضایی که آنلاین بودند ', 'MOST_EVER_ONLINE' => 'بیشترین اعضایی که آنلاین بودند ',
'ON' => 'در', 'ON' => 'در',
'LAST_REG' => 'جدیدترین عضو', 'LAST_REG' => 'جدیدترین عضو',
'NEW_USER' => 'عضو جدید', 'NEW_USER' => 'عضو جدید',
'COPYRIGHTS_X' => 'تمامی حقوق محفوظ است', 'COPYRIGHTS_X' => 'تمامی حقوق محفوظ است',
'CHECK_ALL' => 'علامت زدن همه', 'CHECK_ALL' => 'علامت زدن همه',
'BROSWERF' => 'فایل های کاربران', 'BROSWERF' => 'فایل های کاربران',
'REMME' => 'مرا به خاطر بسپار', 'REMME' => 'مرا به خاطر بسپار',
'REMME_EXP' => 'اگر سیستم شما توسط دیگران مورد استفاده قرار نمیگیرد, این گزینه فعال کنید.', 'REMME_EXP' => 'اگر سیستم شما توسط دیگران مورد استفاده قرار نمیگیرد, این گزینه فعال کنید.',
'HOUR' => 'ساعت', 'HOUR' => 'ساعت',
'5HOURS' => '5 ساعت', '5HOURS' => '5 ساعت',
'DAY' => '1 روز', 'DAY' => '1 روز',
'WEEK' => '1 هفته', 'WEEK' => '1 هفته',
'MONTH' => '1 ماه', 'MONTH' => '1 ماه',
'YEAR' => '1 سال', 'YEAR' => '1 سال',
'INVALID_FORM_KEY' => 'دوره زمانی شما پایان یافته است یا اطلاعات نادرست است.', 'INVALID_FORM_KEY' => 'دوره زمانی شما پایان یافته است یا اطلاعات نادرست است.',
'INVALID_GET_KEY' => 'متاسفانه , فایل درخواستی شما منقضی شده است و به دلایل امنیتی بلاک شده است, لطفا بعدا تلاش نمایید.', 'INVALID_GET_KEY' => 'متاسفانه , فایل درخواستی شما منقضی شده است و به دلایل امنیتی بلاک شده است, لطفا بعدا تلاش نمایید.',
'REFRESH_CAPTCHA' => 'برای دریافت تصویر جدید CAPTCHA کلیک کنید', 'REFRESH_CAPTCHA' => 'برای دریافت تصویر جدید CAPTCHA کلیک کنید',
'CHOSE_F' => 'لطفا حداقل یک فایل را انتخاب نمایید.', 'CHOSE_F' => 'لطفا حداقل یک فایل را انتخاب نمایید.',
'FILES_DELETED' => 'فایل ها با موفقیت حذف شدند.', 'FILES_DELETED' => 'فایل ها با موفقیت حذف شدند.',
'ALL_FILES' => 'مجموع فایل ها', 'ALL_FILES' => 'مجموع فایل ها',
'ALL_IMAGES' => 'مجموع تصاویر', 'ALL_IMAGES' => 'مجموع تصاویر',
'WAIT_LOADING' => 'لطفا صبر کنید, فایل ها در حال اپلود شدن بر روی سرور میباشند !', 'WAIT_LOADING' => 'لطفا صبر کنید, فایل ها در حال اپلود شدن بر روی سرور میباشند !',
'LOADING' => 'در حال بارگذاري', 'LOADING' => 'در حال بارگذاري',
'NOTICECLOSED' => 'توجه : وبسایت بسته است', 'NOTICECLOSED' => 'توجه : وبسایت بسته است',
'UNKNOWN' => 'نامشخص', 'UNKNOWN' => 'نامشخص',
'WE_UPDATING_KLEEJA_NOW' => 'برای پاره ای از تغییرات سایت بسته میباشد, به زودی باز خواهیم گشت.', 'WE_UPDATING_KLEEJA_NOW' => 'برای پاره ای از تغییرات سایت بسته میباشد, به زودی باز خواهیم گشت.',
'ERROR_TRY_AGAIN' => 'خطا, لطفا مجدد سعی نمایید.', 'ERROR_TRY_AGAIN' => 'خطا, لطفا مجدد سعی نمایید.',
'VIEW' => 'نمایش', 'VIEW' => 'نمایش',
'NONE' => 'هیچ کدام', 'NONE' => 'هیچ کدام',
'NOTHING' => 'هیچ فایل یا تصویر جدیدی وجود ندارد!!', 'NOTHING' => 'هیچ فایل یا تصویر جدیدی وجود ندارد!!',
'YOU_HAVE_TO_WAIT' => 'لطفا %s ثانیه صبر نمایید, سپس فایل خود را مجددا اپلود نمایید.', 'YOU_HAVE_TO_WAIT' => 'لطفا %s ثانیه صبر نمایید, سپس فایل خود را مجددا اپلود نمایید.',
'REPEAT_PASS' => 'تکرار کلمه عبور', 'REPEAT_PASS' => 'تکرار کلمه عبور',
'PASS_NEQ_PASS2' => 'کلمه های عبور با هم , همخوانی ندارند.', 'PASS_NEQ_PASS2' => 'کلمه های عبور با هم , همخوانی ندارند.',
'ADMINS' => 'مدیران', 'ADMINS' => 'مدیران',
'GUESTS' => 'میهمان ها', 'GUESTS' => 'میهمان ها',
'USERS' => 'کاربران', 'USERS' => 'کاربران',
'DELETE_INSTALL_FOLDER' => 'برای شروع کار با کلیجا لطفا پوشه "install" را حذف کنید.', 'DELETE_INSTALL_FOLDER' => 'برای شروع کار با کلیجا لطفا پوشه "install" را حذف کنید.',
'HV_NOT_PRVLG_ACCESS' => 'شما اجازه دسترسی به این صفحه را ندارید.', 'HV_NOT_PRVLG_ACCESS' => 'شما اجازه دسترسی به این صفحه را ندارید.',
'W_PERIODS_0' => 'یک لحظه',
'W_PERIODS_0' => 'یک لحظه',
'W_PERIODS_1' => 'دقیق', 'W_PERIODS_1' => 'دقیق',
'W_PERIODS_2' => 'ساعت', 'W_PERIODS_2' => 'ساعت',
'W_PERIODS_3' => 'روز', 'W_PERIODS_3' => 'روز',
@@ -265,25 +265,25 @@ return [
'W_PERIODS_P_5' => 'ماه ها', 'W_PERIODS_P_5' => 'ماه ها',
'W_PERIODS_P_6' => 'سال ها', 'W_PERIODS_P_6' => 'سال ها',
'W_PERIODS_P_7' => 'دهه ها', 'W_PERIODS_P_7' => 'دهه ها',
'W_FROM' => '', 'W_FROM' => '',
'W_AGO' => 'قبل', 'W_AGO' => 'قبل',
'TIME_PM' => 'عصر', 'TIME_PM' => 'عصر',
'TIME_AM' => 'صبح', 'TIME_AM' => 'صبح',
'NOT_YET' => 'هنوز نه!', 'NOT_YET' => 'هنوز نه!',
'NOT_FOUND' => 'فایل مورد نظر وجود ندارد!', 'NOT_FOUND' => 'فایل مورد نظر وجود ندارد!',
'TIME_ZONE' => 'منطقه زمانی', 'TIME_ZONE' => 'منطقه زمانی',
'OR' => 'یا', 'OR' => 'یا',
'AND' => 'و', 'AND' => 'و',
'CHANGE' => 'تغییر', 'CHANGE' => 'تغییر',
'FOR' => 'برای', 'FOR' => 'برای',
'ALL' => 'همه', 'ALL' => 'همه',
'NOW' => 'اکنون', 'NOW' => 'اکنون',
'EMAIL_CHANGE_REQ_PASS' => 'برای تغییر ایمیل خود ، باید گذرواژه فعلی خود را تایپ کنید.', 'EMAIL_CHANGE_REQ_PASS' => 'برای تغییر ایمیل خود ، باید گذرواژه فعلی خود را تایپ کنید.',
'DRAG_AND_DROP' => 'برای بارگذاری یک پرونده اینجا را بکشید و رها کنید&hellip;', 'DRAG_AND_DROP' => 'برای بارگذاری یک پرونده اینجا را بکشید و رها کنید&hellip;',
'OR_MANUAL_SELECT' => 'یا برای انتخاب دستی <em>اینجا را کلیک کنید</em>.', 'OR_MANUAL_SELECT' => 'یا برای انتخاب دستی <em>اینجا را کلیک کنید</em>.',
'ABOUT_FILE' => 'اطلاعات فایل', 'ABOUT_FILE' => 'اطلاعات فایل',
'FILE_NO_INFO' => 'اطلاعاتی در مورد این فایل یافت نشد', 'FILE_NO_INFO' => 'اطلاعاتی در مورد این فایل یافت نشد',
'SAVE' => 'ذخیره', 'SAVE' => 'ذخیره',
]; ];

View File

@@ -6,106 +6,106 @@
return [ return [
'DIR' => 'rtl', 'DIR' => 'rtl',
'INST_INSTALL_WIZARD' => 'نصب برنامه', 'INST_INSTALL_WIZARD' => 'نصب برنامه',
'INST_INSTALL_CLEAN_VER' => 'نصب جديد', 'INST_INSTALL_CLEAN_VER' => 'نصب جديد',
'INST_UPDATE_P_VER' => 'بروزرساني ', 'INST_UPDATE_P_VER' => 'بروزرساني ',
'INST_AGR_LICENSE' => 'من قوانين رو ميپذيرم', 'INST_AGR_LICENSE' => 'من قوانين رو ميپذيرم',
'INST_NEXT' => 'بعدي', 'INST_NEXT' => 'بعدي',
'INST_PREVIOUS' => 'بازگشت', 'INST_PREVIOUS' => 'بازگشت',
'INST_SITE_INFO' => 'اطلاعات وب سايت', 'INST_SITE_INFO' => 'اطلاعات وب سايت',
'INST_ADMIN_INFO' => 'اطلاعات مدير', 'INST_ADMIN_INFO' => 'اطلاعات مدير',
'INST_CHANG_CONFIG' => 'لطفا فايل config.php را بررسي کنيد. بايد دسترسي فايل 777 باشد و اطلاعات ديتا بيس شما در ان وارد شده باشد.', 'INST_CHANG_CONFIG' => 'لطفا فايل config.php را بررسي کنيد. بايد دسترسي فايل 777 باشد و اطلاعات ديتا بيس شما در ان وارد شده باشد.',
'INST_CONNCET_ERR' => 'ناتوان در اتصال به سرور...', 'INST_CONNCET_ERR' => 'ناتوان در اتصال به سرور...',
'INST_CONNCET_ERR_SQLITE' => 'اطمینان حاصل کنید که یک پرونده در پوشه اصلی كليجا با نام وجود دارد:%s.', 'INST_CONNCET_ERR_SQLITE' => 'اطمینان حاصل کنید که یک پرونده در پوشه اصلی كليجا با نام وجود دارد:%s.',
'INST_NO_WRTABLE' => 'پوشه مورد نظر حق دسترسي نوشتن را ندارد. (در اکثر موارد بايد دسترسي 777 باشد)', 'INST_NO_WRTABLE' => 'پوشه مورد نظر حق دسترسي نوشتن را ندارد. (در اکثر موارد بايد دسترسي 777 باشد)',
'INST_GOOD_GO' => 'به نظر ميرسيد همه چيز صحيح است... ادامه...!', 'INST_GOOD_GO' => 'به نظر ميرسيد همه چيز صحيح است... ادامه...!',
'INST_MSGINS' => 'به سرويس آپلودسنتر ما خوش آمديد ، شما مي توانيد تمامي فايل هايي را که از نظر ما مجاز است ، بر روي اين سرور آپلود کنيد', 'INST_MSGINS' => 'به سرويس آپلودسنتر ما خوش آمديد ، شما مي توانيد تمامي فايل هايي را که از نظر ما مجاز است ، بر روي اين سرور آپلود کنيد',
'INST_CRT_CALL' => 'جدول نظرات ایجاد شد.', 'INST_CRT_CALL' => 'جدول نظرات ایجاد شد.',
'INST_CRT_ONL' => 'جدول کاربران انلاين ساخته شد.', 'INST_CRT_ONL' => 'جدول کاربران انلاين ساخته شد.',
'INST_CRT_REPRS' => 'جدول گزارشات ساخته شد.', 'INST_CRT_REPRS' => 'جدول گزارشات ساخته شد.',
'INST_CRT_STS' => 'جدول امار ساخته شد.', 'INST_CRT_STS' => 'جدول امار ساخته شد.',
'INST_CRT_USRS' => 'جدول کاربران ساخته شد.', 'INST_CRT_USRS' => 'جدول کاربران ساخته شد.',
'INST_CRT_ADM' => 'جزئيات مدير ساخته شد.', 'INST_CRT_ADM' => 'جزئيات مدير ساخته شد.',
'INST_CRT_FLS' => 'جدول فايل ها ساخته شد.', 'INST_CRT_FLS' => 'جدول فايل ها ساخته شد.',
'INST_CRT_CNF' => 'جدول تنظيمات ساخته شد.', 'INST_CRT_CNF' => 'جدول تنظيمات ساخته شد.',
'INST_CRT_EXT' => 'جدول افزونه ها ساخته شد.', 'INST_CRT_EXT' => 'جدول افزونه ها ساخته شد.',
'INST_CRT_HKS' => 'جدول پلاگين ها ساخته شد.', 'INST_CRT_HKS' => 'جدول پلاگين ها ساخته شد.',
'INST_CRT_LNG' => 'جدول زبان ها ساخته شد.', 'INST_CRT_LNG' => 'جدول زبان ها ساخته شد.',
'INST_CRT_PLG' => 'جدول افزونه ها ساخته شد.', 'INST_CRT_PLG' => 'جدول افزونه ها ساخته شد.',
'INST_SQL_ERR' => 'خطا در بروزرساني پايگاه داده..!', 'INST_SQL_ERR' => 'خطا در بروزرساني پايگاه داده..!',
'INST_FINISH_SQL' => 'کليجا با موفقيت نصب شد.', 'INST_FINISH_SQL' => 'کليجا با موفقيت نصب شد.',
'INST_NOTES' => 'نکات نصب ..!', 'INST_NOTES' => 'نکات نصب ..!',
'INST_END' => 'مراحل نصب با موفقيت انجام شد. لطفا براي راه اندازي سايت پوشه INSTALL را حذف نماييد..!', 'INST_END' => 'مراحل نصب با موفقيت انجام شد. لطفا براي راه اندازي سايت پوشه INSTALL را حذف نماييد..!',
'INST_NOTE_D' => 'هرگونه مشکل يا سوال خود را با تيم پيشبرد کليجا درميان گذاريد يا در وب سايت رپيدليچ پارسي مطرح نماييد..!', 'INST_NOTE_D' => 'هرگونه مشکل يا سوال خود را با تيم پيشبرد کليجا درميان گذاريد يا در وب سايت رپيدليچ پارسي مطرح نماييد..!',
'INST_FINISH_ERRSQL' => 'متاسفانه ! مشکلي در عمليات بوجود امده است, لطفا دوباره مجددا تلاش نماييد.', 'INST_FINISH_ERRSQL' => 'متاسفانه ! مشکلي در عمليات بوجود امده است, لطفا دوباره مجددا تلاش نماييد.',
'INST_KLEEJADEVELOPERS' => 'با تشکر از استفاده ي شما از كليجا اميدواريم ساعات خوشي داشته باشيد', 'INST_KLEEJADEVELOPERS' => 'با تشکر از استفاده ي شما از كليجا اميدواريم ساعات خوشي داشته باشيد',
'SITENAME' => 'عنوان وب سايت', 'SITENAME' => 'عنوان وب سايت',
'SITEURL' => 'ادرس وب سايت', 'SITEURL' => 'ادرس وب سايت',
'SITEMAIL' => 'ايميل وب سايت', 'SITEMAIL' => 'ايميل وب سايت',
'USERNAME' => 'نام کاربري مديريت', 'USERNAME' => 'نام کاربري مديريت',
'PASSWORD' => 'کلمه عبور', 'PASSWORD' => 'کلمه عبور',
'PASSWORD2' => 'تايپ مجدد کلمه عبور', 'PASSWORD2' => 'تايپ مجدد کلمه عبور',
'EMAIL' => 'پست الکترونيکي', 'EMAIL' => 'پست الکترونيکي',
'INDEX' => 'صفحه اصلي', 'INDEX' => 'صفحه اصلي',
'ADMINCP' => 'کنترل پنل', 'ADMINCP' => 'کنترل پنل',
'EMPTY_FIELDS' => 'لطفا همه اطلاعات ضروري را تکميل نماييد.', 'EMPTY_FIELDS' => 'لطفا همه اطلاعات ضروري را تکميل نماييد.',
'WRONG_EMAIL' => 'ادرس پست الکترونيکي که وارد کرده ايد معتبر نيست!', 'WRONG_EMAIL' => 'ادرس پست الکترونيکي که وارد کرده ايد معتبر نيست!',
'DB_INFO_NW' => 'اطلاعات ديتابيس خود را با دقت وارد کرده..سپس بر روي گزينه بعدي کليک نماييد و نصاب براي شما فايل config.php را خواهد ساخت.سپس ان را در دايرکتوري اصلي اپلود نماييد..!',
'DB_INFO' => 'اطلاعات ديتابيس را وارد نماييد..!',
'DB_SERVER' => 'هاست (ميزبان)',
'DB_TYPE' => 'نوع ديتابيس',
'DB_TYPE_MYSQLI' => 'MySQL Improved',
'DB_TYPE_SQLITE' => 'SQLite',
'DB_USER' => 'نام کاربري ديتابيس',
'DB_PASSWORD' => 'کلمه عبور ديتابيس',
'DB_NAME' => 'نام ديتابيس',
'DB_PREFIX' => 'پيشوند جداول (Tables prefix)',
'VALIDATING_FORM_WRONG' => 'لطفا همه فيلدهاي مورد نياز را کامل کنيد..!',
'CONFIG_EXISTS' => 'فايل config.php يافت شد,ادامه...',
'INST_SUBMIT_CONFIGOK' => 'فايل را در پوشه اصلي اپلود نماييد.',
'INST_EXPORT' => 'برون ريزي فايل (دريافت فايل اماده)',
'INST_OTHER_INFO' => 'ديگر اطلاعات',
'URLS_TYPES' => 'نحوه ادرس دهي فايل ها',
'DEFAULT' => 'پيش فرض',
'FILENAME_URL' => 'بر اساس نام فايل',
'DIRECT_URL' => 'لينک مستقيم',
'LIKE_THIS' => 'مثال: ',
'FUNCTIONS_CHECK' => 'چک کردن توابع ضروري', 'DB_INFO_NW' => 'اطلاعات ديتابيس خود را با دقت وارد کرده..سپس بر روي گزينه بعدي کليک نماييد و نصاب براي شما فايل config.php را خواهد ساخت.سپس ان را در دايرکتوري اصلي اپلود نماييد..!',
'RE_CHECK' => 'چک کردن مجدد', 'DB_INFO' => 'اطلاعات ديتابيس را وارد نماييد..!',
'FUNCTION_IS_NOT_EXISTS' => 'تابع % غيرفعال است.', 'DB_SERVER' => 'هاست (ميزبان)',
'FUNCTION_IS_EXISTS' => 'تابع %s فعال است .', 'DB_TYPE' => 'نوع ديتابيس',
'FUNCTION_DISC_UNLINK' => 'تابع Unlink براي حذف و برزرساني کش فايل ها به کار ميرود.', 'DB_TYPE_MYSQLI' => 'MySQL Improved',
'FUNCTION_DISC_GD' => 'تابع imagecreatetruecolor تابعي از کتابخانه GD هست ، که تصاوير بندانگشتي مي سازد و عکس ها را کنترل مي کند', 'DB_TYPE_SQLITE' => 'SQLite',
'FUNCTION_DISC_FOPEN' => 'تابع fopen کنترل استايل ها و فايل ها را در کليجا به عهده دارد.', 'DB_USER' => 'نام کاربري ديتابيس',
'FUNCTION_DISC_MUF' => 'تابع move_uploaded_file باري آپلود فايل ها مورد استفاده قرار مي گيرد و يکي از مهمترين توابع اين برنامه (کليجا) است.', 'DB_PASSWORD' => 'کلمه عبور ديتابيس',
'DB_NAME' => 'نام ديتابيس',
'ADVICES_CHECK' => 'چک کردن پيشرفته (اختياري)', 'DB_PREFIX' => 'پيشوند جداول (Tables prefix)',
'ZIPARCHIVE_LIB' => '<span style = "color: red؛ padding: 0 6px"> كتابخانه ZipArchive بر روي سرور شما در دسترس نيست!', 'VALIDATING_FORM_WRONG' => 'لطفا همه فيلدهاي مورد نياز را کامل کنيد..!',
'CONFIG_EXISTS' => 'فايل config.php يافت شد,ادامه...',
//UPDATE 'INST_SUBMIT_CONFIGOK' => 'فايل را در پوشه اصلي اپلود نماييد.',
'INST_UPDATE_CUR_VER_IS_UP' => 'نسخه فعلي شما از اين اپديت , بروز تر است..!', 'INST_EXPORT' => 'برون ريزي فايل (دريافت فايل اماده)',
'INST_OTHER_INFO' => 'ديگر اطلاعات',
'URLS_TYPES' => 'نحوه ادرس دهي فايل ها',
'DEFAULT' => 'پيش فرض',
'FILENAME_URL' => 'بر اساس نام فايل',
'DIRECT_URL' => 'لينک مستقيم',
'LIKE_THIS' => 'مثال: ',
'INST_UPDATE_IS_FINISH' => 'نصب با موفقيت به پايان رسيد!لطفا پوشه INSTALL را پاک کنيد.', 'FUNCTIONS_CHECK' => 'چک کردن توابع ضروري',
'RE_CHECK' => 'چک کردن مجدد',
'FUNCTION_IS_NOT_EXISTS' => 'تابع % غيرفعال است.',
'FUNCTION_IS_EXISTS' => 'تابع %s فعال است .',
'FUNCTION_DISC_UNLINK' => 'تابع Unlink براي حذف و برزرساني کش فايل ها به کار ميرود.',
'FUNCTION_DISC_GD' => 'تابع imagecreatetruecolor تابعي از کتابخانه GD هست ، که تصاوير بندانگشتي مي سازد و عکس ها را کنترل مي کند',
'FUNCTION_DISC_FOPEN' => 'تابع fopen کنترل استايل ها و فايل ها را در کليجا به عهده دارد.',
'FUNCTION_DISC_MUF' => 'تابع move_uploaded_file باري آپلود فايل ها مورد استفاده قرار مي گيرد و يکي از مهمترين توابع اين برنامه (کليجا) است.',
'INST_PHP_LESSMIN' => 'شما به php %1$s يا بالاتر احتياج داريد ، نسخه فعلي شما %2$s است', 'ADVICES_CHECK' => 'چک کردن پيشرفته (اختياري)',
'INST_MYSQL_LESSMIN' => 'شما به MySQL %1$s يا بالاتر احتياج داريد ، نسخه فعلي شما %2$است', 'ZIPARCHIVE_LIB' => '<span style = "color: red؛ padding: 0 6px"> كتابخانه ZipArchive بر روي سرور شما در دسترس نيست!',
'IS_IT_OFFICIAL' => 'آيا اين نسخه را مستقيما از سايت اصلي دانلود کرديد؟',
'IS_IT_OFFICIAL_DESC' => 'ما گزارش هايي از نقاط مختلف دريافت کرديم که باگ ها و مشکلات زيادي در سيستم کليجا وجود دارد، اما همگي آنها ناشي از اين بوده که فايل ، از سايت اصلي ما دريافت نشده<br /><br /> <fon style="color:#154188;border-bottom:1px dashed #154188;padding:4px 0;"> بنابر اين ، آيا شما مطمئنيد که اين فايل را از سايت اصلي دانلود کرده ايد؟</font>',
'INST_WHAT_IS_KLEEJA_T' => 'كليجا چیست؟',
'INST_WHAT_IS_KLEEJA' => 'کليجا رايگان است ، برنامه ايست که بوسيله آن مي توانيد سايت آپلودسنتر عکس و فايل داشته باشيد ، هدف از ايجاد پروژه کليجا ، کمک به وبمستران براي داشتن سيستم آپلودسنتر قوي و آراسته بوده است.کليجا سورس کد هاي قابل خواندن وآساني دارد و سيستمي قوي و کاربرگراست ، همچنين از سيستم template base پشتيباني مي کند و شما مي توانيد به راحتي استايل هاي آن را ويرايش کنيد ',
'INST_SPECIAL_KLEEJA' => 'برخي از ويژگي هاي کليجا..!',
'INST_WHAT_IS_KLEEJA_ONE' => 'کليجا سيستم مديريتي و کاربرگرايي فوق العاده قوي برخوردار است ،سيستم مديريتي آن بسيار ساده است و بوسيله آن مي توان کنترل کاملي روي وبسايت داشت ، همچنين مي توان به راحتي براي آن پوسته ساخت، يا پوسته هاي آن را ويرايش کرد. نکته ي حائز اهميت بعدي ، امکان نصب انواع اضافات و پلاگين هاست که با مراجعه به <a target="_blank" href="http://www.kleeja.com/about/">سايت اصلي </a>مي توان آنها را دانلود و استفاده کرد',
'YES' => 'بلي',
'NO' => 'خير',
'KLEEJA_TEAM_MSG_NAME' => 'تيم پيشبرنده کليجا', //UPDATE
'KLEEJA_TEAM_MSG_TEXT' => "از اینکه كليجا را برای قدرت بخشیدن به وب سایت خود انتخاب کردید متشکریم،\n ما واقعاً امیدواریم که از تجربه بی نظیری که كليجا به شما ارائه می دهد لذت ببرید.\nفراموش نکنید که برای به روزرسانی های آینده به https://kleeja.net مراجعه کنید، برای گزارش اشکالات / مشکلات لطفاً از <a href=\"https://github.com/kleeja-official/kleeja/issues\">صفحه مشکلات</a> ما دیدن کنید", 'INST_UPDATE_CUR_VER_IS_UP' => 'نسخه فعلي شما از اين اپديت , بروز تر است..!',
'INST_UPDATE_IS_FINISH' => 'نصب با موفقيت به پايان رسيد!لطفا پوشه INSTALL را پاک کنيد.',
'INST_PHP_LESSMIN' => 'شما به php %1$s يا بالاتر احتياج داريد ، نسخه فعلي شما %2$s است',
'INST_MYSQL_LESSMIN' => 'شما به MySQL %1$s يا بالاتر احتياج داريد ، نسخه فعلي شما %2$است',
'IS_IT_OFFICIAL' => 'آيا اين نسخه را مستقيما از سايت اصلي دانلود کرديد؟',
'IS_IT_OFFICIAL_DESC' => 'ما گزارش هايي از نقاط مختلف دريافت کرديم که باگ ها و مشکلات زيادي در سيستم کليجا وجود دارد، اما همگي آنها ناشي از اين بوده که فايل ، از سايت اصلي ما دريافت نشده<br /><br /> <fon style="color:#154188;border-bottom:1px dashed #154188;padding:4px 0;"> بنابر اين ، آيا شما مطمئنيد که اين فايل را از سايت اصلي دانلود کرده ايد؟</font>',
'INST_WHAT_IS_KLEEJA_T' => 'كليجا چیست؟',
'INST_WHAT_IS_KLEEJA' => 'کليجا رايگان است ، برنامه ايست که بوسيله آن مي توانيد سايت آپلودسنتر عکس و فايل داشته باشيد ، هدف از ايجاد پروژه کليجا ، کمک به وبمستران براي داشتن سيستم آپلودسنتر قوي و آراسته بوده است.کليجا سورس کد هاي قابل خواندن وآساني دارد و سيستمي قوي و کاربرگراست ، همچنين از سيستم template base پشتيباني مي کند و شما مي توانيد به راحتي استايل هاي آن را ويرايش کنيد ',
'INST_SPECIAL_KLEEJA' => 'برخي از ويژگي هاي کليجا..!',
'INST_WHAT_IS_KLEEJA_ONE' => 'کليجا سيستم مديريتي و کاربرگرايي فوق العاده قوي برخوردار است ،سيستم مديريتي آن بسيار ساده است و بوسيله آن مي توان کنترل کاملي روي وبسايت داشت ، همچنين مي توان به راحتي براي آن پوسته ساخت، يا پوسته هاي آن را ويرايش کرد. نکته ي حائز اهميت بعدي ، امکان نصب انواع اضافات و پلاگين هاست که با مراجعه به <a target="_blank" href="http://www.kleeja.com/about/">سايت اصلي </a>مي توان آنها را دانلود و استفاده کرد',
'YES' => 'بلي',
'NO' => 'خير',
'KLEEJA_TEAM_MSG_NAME' => 'تيم پيشبرنده کليجا',
'KLEEJA_TEAM_MSG_TEXT' => "از اینکه كليجا را برای قدرت بخشیدن به وب سایت خود انتخاب کردید متشکریم،\n ما واقعاً امیدواریم که از تجربه بی نظیری که كليجا به شما ارائه می دهد لذت ببرید.\nفراموش نکنید که برای به روزرسانی های آینده به https://kleeja.net مراجعه کنید، برای گزارش اشکالات / مشکلات لطفاً از <a href=\"https://github.com/kleeja-official/kleeja/issues\">صفحه مشکلات</a> ما دیدن کنید",
]; ];

View File

@@ -47,7 +47,7 @@ if (file_exists('plugins_rules.php'))
} }
$base_folder = str_replace('/serve.php', '', parse_url('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'], PHP_URL_PATH)); $base_folder = str_replace('/serve.php', '', parse_url('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'], PHP_URL_PATH));
$request_uri = preg_replace('/^'. preg_quote($base_folder, '/') . '\//', '', strtok($_SERVER['REQUEST_URI'], '?')); $request_uri = preg_replace('/^' . preg_quote($base_folder, '/') . '\//', '', strtok($_SERVER['REQUEST_URI'], '?'));
foreach ($rules as $rule_regex => $rule_result) foreach ($rules as $rule_regex => $rule_result)
{ {

63
ucp.php
View File

@@ -115,7 +115,7 @@ switch (g('go'))
// //
//register page //register page
// //
case 'register' : case 'register' :
//page info //page info
$stylee = 'register'; $stylee = 'register';
@@ -253,9 +253,9 @@ switch (g('go'))
// //
//logout action //logout action
// //
case 'logout' : case 'logout' :
is_array($plugin_run_result = Plugins::getInstance()->run('begin_logout', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('begin_logout', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if ($usrcp->logout()) if ($usrcp->logout())
{ {
@@ -267,16 +267,16 @@ switch (g('go'))
kleeja_err($lang['LOGOUT_ERROR']); kleeja_err($lang['LOGOUT_ERROR']);
} }
is_array($plugin_run_result = Plugins::getInstance()->run('end_logout', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('end_logout', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
//files user page //files user page
// //
case 'fileuser' : case 'fileuser' :
is_array($plugin_run_result = Plugins::getInstance()->run('begin_fileuser', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('begin_fileuser', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
$stylee = 'fileuser'; $stylee = 'fileuser';
$H_FORM_KEYS = kleeja_add_form_key('fileuser'); $H_FORM_KEYS = kleeja_add_form_key('fileuser');
@@ -321,7 +321,7 @@ switch (g('go'))
kleeja_err($lang['NOT_EXSIT_USER'], $lang['PLACE_NO_YOU']); kleeja_err($lang['NOT_EXSIT_USER'], $lang['PLACE_NO_YOU']);
} }
//this user closed his folder, and it's not the current user folder //this user closed his folder, and it's not the current user folder
if (! $data_user['show_my_filecp'] && ($usrcp->id() != $user_id) && ! user_can('enter_acp')) if (! $data_user['show_my_filecp'] && ($usrcp->id() != $user_id) && ! user_can('enter_acp'))
{ {
kleeja_info($lang['USERFILE_CLOSED'], $lang['CLOSED_FEATURE']); kleeja_info($lang['USERFILE_CLOSED'], $lang['CLOSED_FEATURE']);
@@ -343,16 +343,18 @@ switch (g('go'))
$start = $Pager->getStartRow(); $start = $Pager->getStartRow();
$your_fileuser = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $usrcp->id() . '.html' : 'ucp.php?go=fileuser&amp;id=' . $usrcp->id()); $your_fileuser = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $usrcp->id() . '.html' : 'ucp.php?go=fileuser&amp;id=' . $usrcp->id());
if($user_himself) if($user_himself)
{ {
$used_storage = $userinfo['storage_size']; $used_storage = $userinfo['storage_size'];
$max_storage = $d_groups[$usrcp->group_id()]['configs']['max_storage']; $max_storage = $d_groups[$usrcp->group_id()]['configs']['max_storage'];
$is_limited = $max_storage>0; $is_limited = $max_storage>0;
if($is_limited) if($is_limited)
{ {
$storage_per = ($used_storage*100)/$max_storage; $storage_per = ($used_storage*100)/$max_storage;
$storage_per = round($storage_per, 2); $storage_per = round($storage_per, 2);
$storage_per = min($storage_per,100); $storage_per = min($storage_per, 100);
$max_storage = readable_size($max_storage); $max_storage = readable_size($max_storage);
} }
$used_storage = readable_size($used_storage); $used_storage = readable_size($used_storage);
@@ -360,10 +362,10 @@ switch (g('go'))
} }
$total_pages = $Pager->getTotalPages(); $total_pages = $Pager->getTotalPages();
$linkgoto = $config['siteurl'] . ( $linkgoto = $config['siteurl'] . (
$config['mod_writer'] $config['mod_writer']
? 'fileuser-' . $user_id . '.html' ? 'fileuser-' . $user_id . '.html'
: 'ucp.php?go=fileuser' . (ig('id') ? (g('id', 'int') == $usrcp->id() ? '' : '&amp;id=' . g('id')) : null) : 'ucp.php?go=fileuser' . (ig('id') ? (g('id', 'int') == $usrcp->id() ? '' : '&amp;id=' . g('id')) : null)
); );
$page_nums = $Pager->print_nums(str_replace('.html', '', $linkgoto)); $page_nums = $Pager->print_nums(str_replace('.html', '', $linkgoto));
@@ -378,6 +380,7 @@ switch (g('go'))
//set page title //set page title
$titlee = $lang['FILEUSER'] . ': ' . $user_name; $titlee = $lang['FILEUSER'] . ': ' . $user_name;
//there is result ? show them //there is result ? show them
if ($nums_rows != 0) if ($nums_rows != 0)
{ {
@@ -520,7 +523,7 @@ switch (g('go'))
]; ];
$SQL->build($update_query); $SQL->build($update_query);
//update storage //update storage
$update_query = [ $update_query = [
'UPDATE' => "{$dbprefix}users", 'UPDATE' => "{$dbprefix}users",
@@ -563,7 +566,7 @@ switch (g('go'))
]; ];
$SQL->build($update_query); $SQL->build($update_query);
//update storage //update storage
$update_query = [ $update_query = [
'UPDATE' => "{$dbprefix}users", 'UPDATE' => "{$dbprefix}users",
@@ -597,7 +600,7 @@ switch (g('go'))
break; break;
case 'profile' : case 'profile' :
//not a user //not a user
if (! $usrcp->name()) if (! $usrcp->name())
@@ -711,15 +714,15 @@ switch (g('go'))
$SQL->build($update_query); $SQL->build($update_query);
//Need to update cookies //Need to update cookies
$prev_cookie = @explode('|', $usrcp->en_de_crypt($usrcp->kleeja_get_cookie('ulogu'), 2)); $prev_cookie = @explode('|', $usrcp->en_de_crypt($usrcp->kleeja_get_cookie('ulogu'), 2));
$prev_cookie[1] = !empty(p('ppass_new')) ? $insertnewpass : $prev_cookie[1]; $prev_cookie[1] = ! empty(p('ppass_new')) ? $insertnewpass : $prev_cookie[1];
$prev_cookie[3] = sha1(md5($config['h_key'] . $prev_cookie[1]) . $prev_cookie[2]); $prev_cookie[3] = sha1(md5($config['h_key'] . $prev_cookie[1]) . $prev_cookie[2]);
$usinfo = unserialize(base64_decode($prev_cookie[5])); $usinfo = unserialize(base64_decode($prev_cookie[5]));
$mail = $new_mail ? $SQL->escape(strtolower(trim(p('pmail')))) : $usinfo['mail']; $mail = $new_mail ? $SQL->escape(strtolower(trim(p('pmail')))) : $usinfo['mail'];
$prev_cookie[5] = base64_encode(serialize(['id'=>$prev_cookie[0], 'name'=>$usinfo['name'], 'mail'=>$mail, 'last_visit'=>$usinfo['last_visit']])); $prev_cookie[5] = base64_encode(serialize(['id'=>$prev_cookie[0], 'name'=>$usinfo['name'], 'mail'=>$mail, 'last_visit'=>$usinfo['last_visit']]));
$usrcp->kleeja_set_cookie('ulogu', $usrcp->en_de_crypt(implode('|',$prev_cookie)), $prev_cookie[2]); $usrcp->kleeja_set_cookie('ulogu', $usrcp->en_de_crypt(implode('|', $prev_cookie)), $prev_cookie[2]);
} }
kleeja_info($text, '', true, $action); kleeja_info($text, '', true, $action);
} }
}//else submit }//else submit
@@ -731,7 +734,7 @@ switch (g('go'))
// //
//reset password page //reset password page
// //
case 'get_pass' : case 'get_pass' :
//if not default system, let's give him a link for integrated script //if not default system, let's give him a link for integrated script
if ((int) $config['user_system'] != 1) if ((int) $config['user_system'] != 1)
@@ -816,6 +819,7 @@ switch (g('go'))
$ERRORS = []; $ERRORS = [];
is_array($plugin_run_result = Plugins::getInstance()->run('submit_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook 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 //check for form key
if (! kleeja_check_form_key('get_pass')) if (! kleeja_check_form_key('get_pass'))
{ {
@@ -902,31 +906,32 @@ switch (g('go'))
} }
} }
is_array($plugin_run_result = Plugins::getInstance()->run('end_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('end_get_pass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
break; break;
// //
// Wrapper for captcha file // Wrapper for captcha file
// //
case 'captcha': case 'captcha':
include PATH . 'includes/captcha.php'; include PATH . 'includes/captcha.php';
exit; exit;
break;; break;
;
// //
//add your own code here //add your own code here
// //
default: default:
$no_request = true; $no_request = true;
is_array($plugin_run_result = Plugins::getInstance()->run('default_usrcp_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook is_array($plugin_run_result = Plugins::getInstance()->run('default_usrcp_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
if ($no_request): if ($no_request):
kleeja_err($lang['ERROR_NAVIGATATION']); kleeja_err($lang['ERROR_NAVIGATATION']);
endif; endif;
break; break;