mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-16 04:59:42 +01:00
The final problem 🧣
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<li class="nav-item<IF NAME="go_to==start"> activex</IF>" data-toggle="tooltip" data-placement="right" title="{lang.R_CPINDEX}">
|
||||
<a class="first-level nav-link <IF NAME="go_to==start">nav-link-collapse</IF>" href="./"><i class="fa fa-fw fa-dashboard"></i> {lang.R_CPINDEX}</a>
|
||||
<ul class="sidenav-second-level<IF NAME="go_to!=start"> collapse</IF>" id="collapseIndex">
|
||||
<IF NAME="go_to==start">{go_menu_html}</IF>
|
||||
<IF NAME="go_to==start" AND="" ISSET="go_menu_html">{go_menu_html}</IF>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<a class="first-level nav-link<IF LOOP="current"><IF NAME="go_menu_html"> nav-link-collapse</IF></IF>" title="{{title}}" href="{{link}}"<IF LOOP="confirm"> onclick="return confirm_form();"</IF>>
|
||||
<i class="fa fa-fw fa-{{icon}}"></i> {{title}} {{bubble}}
|
||||
</a>
|
||||
<IF NAME="go_menu_html">
|
||||
<IF ISSET="go_menu_html">
|
||||
<ul class="sidenav-second-level<IF LOOP="current"><ELSE> collapse</IF>" id="collapseItem{{i}}">
|
||||
<IF LOOP="current">{go_menu_html}</IF>
|
||||
</ul>
|
||||
@@ -120,4 +120,4 @@
|
||||
</nav>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
|
||||
@@ -55,9 +55,10 @@
|
||||
{{plg_dsc}}
|
||||
<ELSE>
|
||||
{{extra_info.plugin_description}}
|
||||
</IF>
|
||||
</ELSE>
|
||||
<br>
|
||||
<small>{{extra_info.plugin_developer}}</small>
|
||||
</IF>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -155,7 +156,7 @@
|
||||
</div>
|
||||
</UNLESS>
|
||||
|
||||
<IF NAME="store_plugins_count gt 1" AND="case == check">
|
||||
<IF NAME="store_plugins_count gt 1" NAME="case == check">
|
||||
<div class="d-flex justify-content-end my-3">
|
||||
<button id="updateAllBtn" type="button" onclick="updateAll()" class="btn btn-primary px-5">
|
||||
<i class="fa fa-flash"></i> {lang.UPDATE_ALL}
|
||||
|
||||
@@ -137,7 +137,7 @@ else
|
||||
{
|
||||
|
||||
//
|
||||
//Delete all user files [only one user]
|
||||
//Delete all user files [only one user]
|
||||
//
|
||||
if (ig('deletefiles'))
|
||||
{
|
||||
@@ -250,7 +250,7 @@ else
|
||||
//posts search ..
|
||||
if (ig('search_id'))
|
||||
{
|
||||
//get search filter
|
||||
//get search filter
|
||||
$filter = get_filter(g('search_id'), 'file_search', false, 'filter_uid');
|
||||
$deletelink = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deletefiles=' . g('search_id');
|
||||
$is_search = true;
|
||||
@@ -277,7 +277,7 @@ else
|
||||
{
|
||||
//display files or display pics and files only in search
|
||||
$img_types = ['gif','jpg','png','bmp','jpeg','GIF','JPG','PNG','BMP','JPEG'];
|
||||
$query['WHERE'] = $query['WHERE'] . (empty($query['WHERE']) ? '' : ' AND ') . "f.type NOT IN ('" . implode("', '", $img_types) . "')";
|
||||
$query['WHERE'] = (empty($query['WHERE']) ? '' : $query['WHERE'] . ' AND ') . "f.type NOT IN ('" . implode("', '", $img_types) . "')";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -303,7 +303,7 @@ else
|
||||
}
|
||||
|
||||
|
||||
//pager
|
||||
//pager
|
||||
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||
$Pager = new Pagination($files_acp_perpage, $nums_rows, $currentPage);
|
||||
$start = $Pager->getStartRow();
|
||||
|
||||
@@ -94,24 +94,25 @@ switch ($case):
|
||||
) && ! preg_match('/^https?:\/\//', $installed_plugins[$row['plg_name']]['extra_info']['settings_page']);
|
||||
|
||||
|
||||
foreach (['plugin_title', 'plugin_description'] as $localizedInfo)
|
||||
foreach (['plugin_title', 'plugin_description'] as $localized_info)
|
||||
{
|
||||
if (is_array($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo]))
|
||||
if (! empty($installed_plugins[$row['plg_name']]['extra_info'][$localized_info]) &&
|
||||
is_array($installed_plugins[$row['plg_name']]['extra_info'][$localized_info]))
|
||||
{
|
||||
if (! empty($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo][$config['language']]))
|
||||
if (! empty($installed_plugins[$row['plg_name']]['extra_info'][$localized_info][$config['language']]))
|
||||
{
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo][$config['language']], 100);
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localized_info][$config['language']], 100);
|
||||
}
|
||||
elseif (! empty($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo]['en']))
|
||||
elseif (! empty($installed_plugins[$row['plg_name']]['extra_info'][$localized_info]['en']))
|
||||
{
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo]['en'], 100);
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localized_info]['en'], 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo][0], 100);
|
||||
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localized_info][0], 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,6 +838,8 @@ function kleeja_date($time, $human_time = true, $format = false)
|
||||
{
|
||||
global $lang, $config;
|
||||
|
||||
$time = intval($time);
|
||||
|
||||
if (! defined('TIME_FORMAT'))
|
||||
{
|
||||
define('TIME_FORMAT', 'd-m-Y h:i a'); // to be moved to configs later
|
||||
|
||||
@@ -169,11 +169,18 @@ class kleeja_style
|
||||
$atts = call_user_func(['kleeja_style', '_get_attributes'], $matches[0]);
|
||||
$condition = '';
|
||||
|
||||
foreach (['NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || '] as $attribute=>$separator)
|
||||
foreach ([
|
||||
'NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || ', 'ISSET' => ' isset', 'EMPTY' => ' empty'
|
||||
] as $attribute=>$separator)
|
||||
{
|
||||
if (! empty($atts[$attribute]))
|
||||
if (isset($atts[$attribute]))
|
||||
{
|
||||
$condition .= $separator . $this->parse_condition($atts[$attribute], ! empty($atts['LOOP']));
|
||||
$haveParentheses = in_array($attribute, ['ISSET', 'EMPTY']);
|
||||
|
||||
$condition .= $separator . ($haveParentheses ? '(' : '') .
|
||||
$this->parse_condition($atts[$attribute], ! empty($atts['LOOP'])) .
|
||||
($haveParentheses ? ')' : '')
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +194,11 @@ class kleeja_style
|
||||
$char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>'];
|
||||
$reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>'];
|
||||
|
||||
if(trim($condition) == '')
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$con = str_replace('$this->vars', '[----this-vars----]', $condition);
|
||||
|
||||
if (preg_match('/(.*)(' . implode('|', $char) . ')(.*)/i', $con, $arr))
|
||||
@@ -243,7 +255,13 @@ class kleeja_style
|
||||
preg_match(kleeja_style::reg('var'), $matches, $matches);
|
||||
}
|
||||
|
||||
$var = ! empty($matches[2]) ? str_replace('.', '\'][\'', $matches[2]) : '';
|
||||
$var = trim(! empty($matches[2]) ? str_replace('.', '\'][\'', $matches[2]) : '');
|
||||
|
||||
if(empty($var))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
return ! empty($matches[1]) && trim($matches[1]) == '{{' ? '$value[\'' . $var . '\']' : '$this->vars[\'' . $var . '\']';
|
||||
}
|
||||
|
||||
@@ -266,7 +284,7 @@ class kleeja_style
|
||||
protected function reg($var)
|
||||
{
|
||||
$vars = get_class_vars(__CLASS__);
|
||||
return ($vars['reg'][$var]);
|
||||
return $vars['reg'][$var];
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +295,7 @@ class kleeja_style
|
||||
*/
|
||||
protected function _get_attributes($tag)
|
||||
{
|
||||
preg_match_all('/([a-z]+)="(.+)"/iU', $tag, $attribute);
|
||||
preg_match_all('/([a-z]+)="(.+)?"/iU', $tag, $attribute);
|
||||
|
||||
$attributes = [];
|
||||
|
||||
@@ -285,14 +303,7 @@ class kleeja_style
|
||||
{
|
||||
$att = strtoupper($attribute[1][$i]);
|
||||
|
||||
if (preg_match('/NAME|LOOP/', $att))
|
||||
{
|
||||
$attributes[$att] = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_var_callback'], $attribute[2][$i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$attributes[$att] = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_var_callback_att'], $attribute[2][$i]);
|
||||
}
|
||||
$attributes[$att] = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_var_callback'], $attribute[2][$i]);
|
||||
}
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user