mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-14 20:19:43 +01:00
customize admin start page
This commit is contained in:
@@ -1,45 +1,110 @@
|
||||
<!-- general -->
|
||||
<IF NAME="current_smt == general">
|
||||
|
||||
<!-- hello message -->
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item active">{usernamelang}</li>
|
||||
</ol>
|
||||
<script>
|
||||
function toggleStartBox(name, hide, current) {
|
||||
$.ajax({
|
||||
url: './?cp=r_repair&case=toggle_start_box&toggle=' + hide + '&_ajax_=1&name=' + name + '&{GET_FORM_KEY}',
|
||||
dataType: 'json',
|
||||
cache: false})
|
||||
.done(function (data) {
|
||||
if(data.content){
|
||||
$('#boxesErrors>span').html(data.content);
|
||||
$('#boxesErrors').removeClass('d-none alert-danger').addClass('alert-info');
|
||||
$('#'+name).css('display', hide ? 'none' : 'block');
|
||||
} else {
|
||||
this.fail();
|
||||
}
|
||||
})
|
||||
.fail(function(data) {
|
||||
$('#boxesErrors>span').html((data.content ? data.content : (data.responseJSON ? data.responseJSON.content : '{lang.ERROR_TRY_AGAIN}')));
|
||||
$('#boxesErrors').removeClass('d-none alert-info').addClass('alert-danger');
|
||||
var itemRemoveClass = current == 1 ? 'cb-disable' : 'cb-enable';
|
||||
var itemAddClass = current == 0 ? 'cb-disable' : 'cb-enable';
|
||||
$('#start_box_'+name + ' .' + itemRemoveClass).addClass('selected');
|
||||
$('#start_box_'+name + ' .' + itemAddClass).removeClass('selected');
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<IF NAME="ADM_NOTIFICATIONS">
|
||||
<!-- notifications -->
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-bell-o"></i> {lang.NOTE}
|
||||
</div>
|
||||
<div class="list-group list-group-flush small">
|
||||
<LOOP NAME="ADM_NOTIFICATIONS">
|
||||
<div class="list-group-item list-group-item-action">
|
||||
<div class="media">
|
||||
<IF LOOP="msg_type==error">
|
||||
<span class="d-flex mr-3 rounded-circle fa fa fa-warning" style="font-size: 30px;"></span>
|
||||
<ELSEIF LOOP="msg_type==info">
|
||||
<span class="d-flex mr-3 rounded-circle fa fa-info-circle" style="font-size: 30px;"></span>
|
||||
</IF>
|
||||
<div class="media-body">
|
||||
<strong>{{title}}</strong> <br>
|
||||
{{msg}}
|
||||
<!--<div class="text-muted smaller">Today at 5:43 PM - 5m ago</div>-->
|
||||
<!-- hello message -->
|
||||
<ol class="breadcrumb d-flex">
|
||||
<li class="breadcrumb-item active">{usernamelang}</li>
|
||||
<li class="ml-auto p-0">
|
||||
<button type="button" class="btn btn-primary btn-sm px-1 py-0" data-toggle="modal" data-target="#customizationModal" title="{lang.CUSTOMIZATION}">
|
||||
<i class="fa fa-fw fa-gears"></i>
|
||||
</button>
|
||||
<div class="modal" tabindex="-1" role="dialog" id="customizationModal">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{lang.CUSTOMIZATION} - {lang.R_CPINDEX}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info alert-dismissible m-3 p-0 text-center small d-none" id="boxesErrors">
|
||||
<span>...</span>
|
||||
<button type="button" class="close py-0" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true" class="small" style="cursor:pointer">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<LOOP NAME="startBoxes">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>{{title}}</div>
|
||||
<div class="field switch" id="start_box_{%key%}">
|
||||
<label onclick="toggleStartBox('{%key%}', 0, {{hidden}})" class="cb-enable<IF LOOP="hidden==0"> selected</IF>"><span>{lang.SHOW}</span></label>
|
||||
<label onclick="toggleStartBox('{%key%}', 1, {{hidden}})" class="cb-disable<IF LOOP="hidden==1"> selected</IF>"><span>{lang.HIDE}</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</LOOP>
|
||||
</div>
|
||||
</div>
|
||||
</LOOP>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end notifications -->
|
||||
</IF>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
{extra_adm_start_html}
|
||||
|
||||
<!-- stats boxes -->
|
||||
<!-- Icon Cards -->
|
||||
<div class="row">
|
||||
<IF NAME="ADM_NOTIFICATIONS">
|
||||
<!-- notifications -->
|
||||
<div class="card mb-3" id="notifications" style="display:(startBoxes.notifications.hidden?none:)">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-bell-o"></i> {lang.NOTIFICATIONS}
|
||||
</div>
|
||||
<div class="list-group list-group-flush small">
|
||||
<LOOP NAME="ADM_NOTIFICATIONS">
|
||||
<div class="list-group-item list-group-item-action">
|
||||
<div class="media">
|
||||
<IF LOOP="msg_type==error">
|
||||
<span class="d-flex mr-3 rounded-circle fa fa fa-warning" style="font-size: 30px;"></span>
|
||||
<ELSEIF LOOP="msg_type==info">
|
||||
<span class="d-flex mr-3 rounded-circle fa fa-info-circle" style="font-size: 30px;"></span>
|
||||
</IF>
|
||||
<div class="media-body">
|
||||
<strong>{{title}}</strong> <br>
|
||||
{{msg}}
|
||||
<!--<div class="text-muted smaller">Today at 5:43 PM - 5m ago</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</LOOP>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end notifications -->
|
||||
</IF>
|
||||
|
||||
{extra_adm_start_html}
|
||||
|
||||
<!-- stats boxes -->
|
||||
<div class="card mb-3" id="statsBoxes" style="display:(startBoxes.statsBoxes.hidden?none:)">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-bar-chart"></i> {lang.STATS_BOXES}
|
||||
</div>
|
||||
<div class="row p-1">
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<div class="card text-white bg-primary o-hidden h-100">
|
||||
<div class="card-body">
|
||||
@@ -81,7 +146,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<div class="card text-white bg-danger o-hidden h-100">
|
||||
<div class="card-body">
|
||||
@@ -105,8 +169,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<div class="card text-white bg-info o-hidden h-100">
|
||||
<div class="card-body">
|
||||
@@ -132,20 +194,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end stats boxes -->
|
||||
</div>
|
||||
<!-- end stats boxes -->
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<!-- last visit actions -->
|
||||
<IF NAME="last_visit">
|
||||
<div class="card">
|
||||
<!-- last visit actions -->
|
||||
<IF NAME="last_visit">
|
||||
<div class="card mb-3" id="lastVisitActions" style="display:(startBoxes.lastVisitActions.hidden?none:)">
|
||||
<div class="card-header">
|
||||
{lang.LAST_VISIT} ({last_visit})
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="card">
|
||||
@@ -191,97 +250,89 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</IF>
|
||||
<!-- end last visit actions -->
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- stats_chart -->
|
||||
<IF NAME="stats_chart">
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-area-chart"></i> {lang.STATS}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="chart_stats"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
{stats_chart}
|
||||
</script>
|
||||
|
||||
</IF>
|
||||
<!-- end stats_chart -->
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<!-- hurry hurry actions -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{lang.HURRY_HURRY}
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.STYLE}
|
||||
<div>
|
||||
<select name="style_change" id="style_change" class="custom-select">
|
||||
{hurry_styles_list}
|
||||
</select>
|
||||
<button class="btn btn-outline-primary" onclick="javascript:get_kleeja_link('{hurry_style_link}' + $('#style_change').val()); return false;"><span>{lang.CHANGE}</span></button>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-lg-flex justify-content-between">
|
||||
{lang.LANGUAGE}
|
||||
<div>
|
||||
<select name="lang_change" class="custom-select" id="lang_change">
|
||||
{hurry_langs_list}
|
||||
</select>
|
||||
{lang.FOR}
|
||||
<select name="groups_list" class="custom-select" id="groups_list">
|
||||
{hurry_groups_list}
|
||||
</select>
|
||||
<button class="btn btn-outline-primary mt-2" onclick="javascript:get_kleeja_link('{hurry_lang_link}' + $('#lang_change').val() + '&qg=' + $('#groups_list').val()); return false;"><span>{lang.CHANGE}</span></button>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="list-group-item d-lg-flex justify-content-between">
|
||||
{lang.R_REPAIR}
|
||||
<button class="btn btn-outline-primary" onclick="javascript:get_kleeja_link('{del_cache_link}'); return false;"><span>{lang.DEL_CACHE}</span></button>
|
||||
</li>
|
||||
</ul>
|
||||
</IF>
|
||||
<!-- end last visit actions -->
|
||||
|
||||
<!-- stats_chart -->
|
||||
<IF NAME="stats_chart">
|
||||
<div class="card mb-3" id="statsChart" style="display:(startBoxes.statsChart.hidden?none:)">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-area-chart"></i> {lang.STATS}
|
||||
</div>
|
||||
<!-- hurry hurry actions -->
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- another stats -->
|
||||
<div class="card">
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.LSTDELST}
|
||||
<span>{last_del_fles}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
{lang.AFILES_SIZE_SPACE}
|
||||
<br>
|
||||
<div class="progress" style="width: 100%">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="{per1}" aria-valuemin="0" aria-valuemax="100">{per1}%</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.KLEEJA_VERSION}
|
||||
<span>{kleeja_version}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="card-body">
|
||||
<div id="chart_stats"></div>
|
||||
</div>
|
||||
<!-- end another stats -->
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
{stats_chart}
|
||||
</script>
|
||||
</IF>
|
||||
<!-- end stats_chart -->
|
||||
|
||||
|
||||
<!-- hurry hurry actions -->
|
||||
<div class="card mb-3" id="hurryActions" style="display:(startBoxes.hurryActions.hidden?none:)">
|
||||
<div class="card-header">
|
||||
{lang.HURRY_HURRY}
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.STYLE}
|
||||
<div>
|
||||
<select name="style_change" id="style_change" class="custom-select">
|
||||
{hurry_styles_list}
|
||||
</select>
|
||||
<button class="btn btn-outline-primary" onclick="javascript:get_kleeja_link('{hurry_style_link}' + $('#style_change').val()); return false;"><span>{lang.CHANGE}</span></button>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-lg-flex justify-content-between">
|
||||
{lang.LANGUAGE}
|
||||
<div>
|
||||
<select name="lang_change" class="custom-select" id="lang_change">
|
||||
{hurry_langs_list}
|
||||
</select>
|
||||
{lang.FOR}
|
||||
<select name="groups_list" class="custom-select" id="groups_list">
|
||||
{hurry_groups_list}
|
||||
</select>
|
||||
<button class="btn btn-outline-primary mt-2" onclick="javascript:get_kleeja_link('{hurry_lang_link}' + $('#lang_change').val() + '&qg=' + $('#groups_list').val()); return false;"><span>{lang.CHANGE}</span></button>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li class="list-group-item d-lg-flex justify-content-between">
|
||||
{lang.R_REPAIR}
|
||||
<button class="btn btn-outline-primary" onclick="javascript:get_kleeja_link('{del_cache_link}'); return false;"><span>{lang.DEL_CACHE}</span></button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- hurry hurry actions -->
|
||||
|
||||
|
||||
<!-- extra stats -->
|
||||
<div class="card" id="extraStats" style="display:(startBoxes.extraStats.hidden?none:)">
|
||||
<div class="card-header">{lang.OTHER_INFO}</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.LSTDELST}
|
||||
<span>{last_del_fles}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
{lang.AFILES_SIZE_SPACE}
|
||||
<br>
|
||||
<div class="progress" style="width: 100%">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="{per1}" aria-valuemin="0" aria-valuemax="100">{per1}%</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between">
|
||||
{lang.KLEEJA_VERSION}
|
||||
<span>{kleeja_version}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end extra stats -->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -185,6 +185,42 @@ $stylee = 'admin_info';
|
||||
|
||||
break;
|
||||
|
||||
//toggle admin start boxes
|
||||
case 'toggle_start_box':
|
||||
|
||||
if(! kleeja_check_form_key_get('adm_start_actions', 3600))
|
||||
{
|
||||
header('HTTP/1.1 405 Method Not Allowed');
|
||||
$adminAjaxContent = $lang['INVALID_FORM_KEY'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$items = explode(':', $config['hidden_start_boxes']);
|
||||
$items = array_filter($items);
|
||||
|
||||
$name = g('name');
|
||||
$hide = g('toggle', 'int') == 1;
|
||||
|
||||
if(in_array($name, $items) && ! $hide)
|
||||
{
|
||||
$new_items = array_diff($items, [$name]);
|
||||
}
|
||||
else if($hide)
|
||||
{
|
||||
$new_items = $items;
|
||||
$new_items[] = $name;
|
||||
}
|
||||
|
||||
if($new_items != $items)
|
||||
{
|
||||
update_config('hidden_start_boxes', implode(':', $new_items));
|
||||
}
|
||||
|
||||
$adminAjaxContent = $lang['CONFIGS_UPDATED'];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
endswitch;
|
||||
|
||||
|
||||
|
||||
@@ -39,9 +39,16 @@ $s_google_num = $stat_google_num;
|
||||
$s_last_bing = $stat_last_bing == 0 ? '[ ? ]' : kleeja_date($stat_last_bing);
|
||||
$s_bing_num = $stat_bing_num;
|
||||
$usernamelang = sprintf($lang['KLEEJA_CP_W'], $username);
|
||||
$current_year = date('Y');
|
||||
$progress_session_cleanup = function_exists('ini_get') ? @ini_get('session.upload_progress.cleanup') : @get_cfg_var('session.upload_progress.cleanup');
|
||||
$progress_session_enabled = function_exists('ini_get') ? @ini_get('session.upload_progress.enabled') : @get_cfg_var('session.upload_progress.enabled');
|
||||
$current_year = date('Y');
|
||||
|
||||
$startBoxes = array(
|
||||
'notifications' => array('title' => $lang['NOTIFICATIONS'], 'hidden' => (int) adm_is_hidden_start_boxe('notifications')),
|
||||
'statsBoxes' => array('title' => $lang['STATS_BOXES'], 'hidden' => (int) adm_is_hidden_start_boxe('statsBoxes')),
|
||||
'lastVisitActions' => array('title' => $lang['LAST_VISIT'], 'hidden' => (int) adm_is_hidden_start_boxe('lastVisitActions')),
|
||||
'statsChart' => array('title' => $lang['STATS'], 'hidden' => (int) adm_is_hidden_start_boxe('statsChart')),
|
||||
'hurryActions' => array('title' => $lang['HURRY_HURRY'], 'hidden' => (int) adm_is_hidden_start_boxe('hurryActions')),
|
||||
'extraStats' => array('title' => $lang['OTHER_INFO'], 'hidden' => (int) adm_is_hidden_start_boxe('extraStats')),
|
||||
);
|
||||
|
||||
$extra_adm_start_html = '';
|
||||
|
||||
@@ -57,7 +64,7 @@ $kleeja_version = '<a href="' . basename(ADMIN_PATH) . '?cp=p_check_update" onc
|
||||
$ADM_NOTIFICATIONS = array();
|
||||
|
||||
//useing IE6 ! and he is admin ? omg !
|
||||
$u_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) strtolower($_SERVER['HTTP_USER_AGENT'])) : (function_exists('getenv') ? getenv('HTTP_USER_AGENT') : '');
|
||||
$u_agent = !empty($_SERVER['HTTP_USER_AGENT']) ? htmlspecialchars((string) strtolower($_SERVER['HTTP_USER_AGENT'])) : (function_exists('getenv') ? getenv('HTTP_USER_AGENT') : '');
|
||||
if(is_browser('ie6, ie8, ie7'))
|
||||
{
|
||||
$ADM_NOTIFICATIONS['IE6'] = array('id' => 'IE6', 'msg_type'=> 'error', 'title'=> $lang['NOTE'], 'msg'=> $lang['ADMIN_USING_IE6']);
|
||||
@@ -85,21 +92,10 @@ if(version_compare(strtolower(KLEEJA_VERSION), strtolower($v['version_number']),
|
||||
'msg'=> sprintf($lang['UPDATE_NOW_S'] , KLEEJA_VERSION, $v['version_number']) . '<br />' . '<a href="http://www.kleeja.com/">www.kleeja.com</a>'
|
||||
);
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('admin_update_now', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('admin_update_now', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
}
|
||||
|
||||
|
||||
//for progress bar
|
||||
//if(!$progress_session_enabled)
|
||||
//{
|
||||
// $ADM_NOTIFICATIONS[] = array(
|
||||
// 'id' => 'progress_session_enabled',
|
||||
// 'msg_type'=> 'info', 'title'=> ('advice for php.ini'),
|
||||
// 'msg'=> sprintf(('Kleeja developers advise you to change the option "%1$s" to "%2$s" in PHP.INI on your server.') , 'session.upload_progress.enabled', 'On')
|
||||
// );
|
||||
//}
|
||||
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('default_admin_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
|
||||
@@ -196,11 +192,11 @@ if(function_exists('fileperms') && !defined('KLEEJA_NO_CONFIG_CHECK') && strtoup
|
||||
//no htaccess
|
||||
if(!file_exists(PATH . $config['foldername'] . '/.htaccess'))
|
||||
{
|
||||
$ADM_NOTIFICATIONS['htaccess_u'] = array('id' => 'htaccess_u', 'msg_type'=> 'error', 'title'=> $lang['WARN'], 'msg'=> sprintf($lang['NO_HTACCESS_DIR_UP'], $config['foldername']));
|
||||
$ADM_NOTIFICATIONS['htaccess_u'] = array('id' => 'htaccess_u', 'msg_type'=> 'error', 'title'=> $lang['WARN'], 'msg'=> sprintf($lang['NO_HTACCESS_DIR_UP'], $config['foldername']));
|
||||
}
|
||||
if(!file_exists(PATH . $config['foldername'] . '/thumbs/.htaccess'))
|
||||
{
|
||||
$ADM_NOTIFICATIONS['htaccess_t'] = array('id' => 'htaccess_t', 'msg_type'=> 'error', 'title'=> $lang['WARN'], 'msg'=> sprintf($lang['NO_HTACCESS_DIR_UP_THUMB'], $config['foldername'] . '/thumbs'));
|
||||
$ADM_NOTIFICATIONS['htaccess_t'] = array('id' => 'htaccess_t', 'msg_type'=> 'error', 'title'=> $lang['WARN'], 'msg'=> sprintf($lang['NO_HTACCESS_DIR_UP_THUMB'], $config['foldername'] . '/thumbs'));
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +227,6 @@ $go_menu = array(
|
||||
);
|
||||
|
||||
|
||||
|
||||
# is there a last visit of images and files ?
|
||||
$files_last_visit = filter_exists('f_lastvisit', 'filter_uid', 'lastvisit', $userinfo['id'])
|
||||
? get_filter('f_lastvisit', 'lastvisit', true, 'filter_uid', $userinfo['id']) : false;
|
||||
@@ -322,17 +317,21 @@ if($cf_num > 3)
|
||||
$t_files = $prv_files - $s_files;
|
||||
$t_imgs = $prev_imgs - $s_imgs;
|
||||
|
||||
if(date('d-n-Y') == $prev_date) {
|
||||
if(date('d-n-Y') == $prev_date)
|
||||
{
|
||||
$day = $lang['TODAY'] . ' ~ ' . $lang['NOW'];
|
||||
|
||||
if($todayIsGone) {
|
||||
|
||||
if($todayIsGone)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$todayIsGone = true;
|
||||
} else {
|
||||
$day = $prev_date;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$day = $prev_date;
|
||||
}
|
||||
|
||||
$stats_chart .= ($comma ? ',': '') . "[[$t_files,$t_imgs],'" . ($cf_num > 6 ? str_replace(date('-Y'), '', $day) : $day) . "']";
|
||||
|
||||
|
||||
@@ -135,7 +135,8 @@ function update_filter($id_or_uid, $value, $filter_type = 'general', $filter_sta
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('update_filter_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
$SQL->build($update_query);
|
||||
if ($SQL->affected()) {
|
||||
if ($SQL->affected())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -159,7 +160,8 @@ function get_filter($item, $filter_type = false, $just_value = false, $get_by =
|
||||
|
||||
$valid_filter_columns = array('filter_id', 'filter_uid', 'filter_user', 'filter_status');
|
||||
|
||||
if (!in_array($get_by, $valid_filter_columns)) {
|
||||
if (!in_array($get_by, $valid_filter_columns))
|
||||
{
|
||||
$get_by = 'filter_uid';
|
||||
}
|
||||
|
||||
@@ -178,7 +180,8 @@ function get_filter($item, $filter_type = false, $just_value = false, $get_by =
|
||||
$v = $SQL->fetch($result);
|
||||
|
||||
$SQL->free($result);
|
||||
if ($just_value) {
|
||||
if ($just_value)
|
||||
{
|
||||
return $v['filter_value'];
|
||||
}
|
||||
|
||||
@@ -328,7 +331,7 @@ function sync_total_files($files = true, $start = false)
|
||||
/**
|
||||
* get the *right* now number of the given stat fro stats table
|
||||
* @param string $name Stat name
|
||||
* @return
|
||||
* @return int
|
||||
*/
|
||||
function get_actual_stats($name)
|
||||
{
|
||||
@@ -348,3 +351,33 @@ function get_actual_stats($name)
|
||||
|
||||
return $v[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* check wether a start box is hidden or not
|
||||
* @param string $name box name
|
||||
* @return bool
|
||||
*/
|
||||
function adm_is_hidden_start_boxe($name)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if(! isset($config['hidden_start_boxes']))
|
||||
{
|
||||
add_config('hidden_start_boxes', '');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static $boxes;
|
||||
|
||||
if(empty($boxes))
|
||||
{
|
||||
$boxes = explode(':', $config['hidden_start_boxes']);
|
||||
$boxes = array_filter($boxes);
|
||||
}
|
||||
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('adm_start_boxes_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
return in_array($name, $boxes);
|
||||
}
|
||||
@@ -564,11 +564,11 @@ function kleeja_get_link ($pid, $extra = array())
|
||||
function get_up_tpl_box($box_name, $extra = array())
|
||||
{
|
||||
global $THIS_STYLE_PATH_ABS, $config;
|
||||
static $boxes = false;
|
||||
static $boxes;
|
||||
|
||||
//prevent loads
|
||||
//also this must be cached in future
|
||||
if($boxes !== true)
|
||||
if(empty($boxes))
|
||||
{
|
||||
$tpl_path = $THIS_STYLE_PATH_ABS . 'up_boxes.html';
|
||||
|
||||
@@ -590,7 +590,7 @@ function get_up_tpl_box($box_name, $extra = array())
|
||||
$tpl_code = file_get_contents($tpl_path);
|
||||
$tpl_code = preg_replace("/\n[\n\r\s\t]*/", '', $tpl_code);//remove extra spaces
|
||||
$matches = preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl_code, $match);
|
||||
|
||||
|
||||
$boxes = array();
|
||||
for ($i = 0; $i < $matches; $i++)
|
||||
{
|
||||
|
||||
@@ -263,4 +263,9 @@ return array(
|
||||
'EXTRACT_ZIP_FAILED' => 'صادفتنا مشكلة أثناء فك الأرشيف! تأكد من أنه ملف zip صالح، وأن مجلد "%s" قابل للكتابة.',
|
||||
'NO_PROBLEM_AFTER_ZIP' => 'لقد تم فك الملف بنجاح وهو جاهز للتفعيل.',
|
||||
'SESSION_ENDED' => 'انتهت الجلسة، هل تريد تسجل الدخول من جديد؟',
|
||||
//3.0.3
|
||||
'CUSTOMIZATION' => 'تخصيص',
|
||||
'SHOW' => 'عرض',
|
||||
'HIDE' => 'إخفاء',
|
||||
'STATS_BOXES' => 'صناديق الإحصائيات',
|
||||
);
|
||||
|
||||
@@ -294,5 +294,7 @@ return array(
|
||||
'NOW' => 'الآن',
|
||||
'EMAIL_CHANGE_REQ_PASS' => 'لتغيير بريدك الإلكتروني يجب أن تقوم بكتابة كلمة مرورك الحالية.',
|
||||
'DRAG_AND_DROP' => 'جر وأسقط ملف هنا للرفع…',
|
||||
'OR_MANUAL_SELECT' => 'أو قم بالضغط هنا <em>لإختيار</em> ملف يدوياً..',
|
||||
);
|
||||
'OR_MANUAL_SELECT' => 'أو قم بالضغط هنا <em>لإختيار</em> ملف يدوياً..',
|
||||
//3.0.3
|
||||
'NOTIFICATIONS' => 'تنبيهات',
|
||||
);
|
||||
@@ -260,5 +260,10 @@ return array(
|
||||
'NO_ZIP_ARCHIVE' => 'ZipArchive is not installed on your server, it\'s required.',
|
||||
'EXTRACT_ZIP_FAILED' => 'We encounter a problem while extracting this archive file, make sure it\'s a valid zip file, and that "%s" folder is writable',
|
||||
'NO_PROBLEM_AFTER_ZIP' => 'The file has been extracted successfully and it\'s ready to be enabled',
|
||||
'SESSION_ENDED' => 'Session has ended, do you want to login again?',
|
||||
);
|
||||
'SESSION_ENDED' => 'Session has ended, do you want to login again?',
|
||||
//3.0.3
|
||||
'CUSTOMIZATION' => 'Customization',
|
||||
'SHOW' => 'Show',
|
||||
'HIDE' => 'Hide',
|
||||
'STATS_BOXES' => 'Stats Boxes',
|
||||
);
|
||||
|
||||
@@ -284,8 +284,6 @@ return array(
|
||||
'EMAIL_CHANGE_REQ_PASS' => 'In order to change your email address, It\'s required to type your current password.',
|
||||
'DRAG_AND_DROP' => 'Drop a file inside…',
|
||||
'OR_MANUAL_SELECT' => 'Or click here to <em>Select</em> a file manually..',
|
||||
|
||||
//last line of this file ...
|
||||
'S_TRANSLATED_BY' => 'Translated By <a href="http://kleeja.com" target="_blank">Kleeja Team</a>',
|
||||
|
||||
//3.0.3
|
||||
'NOTIFICATIONS' => 'Notifications',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user