mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-17 21:49:41 +01:00
kleeja 3.1
3.1.0
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -13,6 +13,10 @@ uploads/thumbs/*
|
|||||||
!uploads/thumbs/index.html
|
!uploads/thumbs/index.html
|
||||||
!uploads/thumbs/php.ini
|
!uploads/thumbs/php.ini
|
||||||
!uploads/thumbs/.htaccess
|
!uploads/thumbs/.htaccess
|
||||||
|
styles/*
|
||||||
|
!styles/bootstrap/*
|
||||||
|
!styles/default/*
|
||||||
|
!styles/index.html
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*/.DS_Store
|
*/.DS_Store
|
||||||
*/*/.DS_Store
|
*/*/.DS_Store
|
||||||
|
|||||||
27
CHANGELOG.md
27
CHANGELOG.md
@@ -4,6 +4,29 @@ 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.0
|
||||||
|
- add the ability to auto-update kleeja from admin panel with one click!
|
||||||
|
- add plugins/styles store (one click download, install and update or even delete)
|
||||||
|
- a plugins/styles catalog (any developer can add his/her plugins/styles now)
|
||||||
|
- fix `fields doesn't have a default value` error #104
|
||||||
|
- fix e modifier is deprecated #103
|
||||||
|
- fix update check redirect error #97
|
||||||
|
- improve ban control page #94
|
||||||
|
- add the ability to ban by username
|
||||||
|
- add support of mkv files #83
|
||||||
|
- add support of most known-to-humans timezones #78
|
||||||
|
- fix download counter to skip unwanted visits.
|
||||||
|
- fix pagination error in user files page
|
||||||
|
- fix some issues with some plugins (kj_ftp, for example.)
|
||||||
|
- replace Kleeja team page with current github contributors 😇
|
||||||
|
- add ability to hide/show widgets in home page of admin panel.
|
||||||
|
- fix issues with downloaded persian/arabic filesnames #53
|
||||||
|
- fix `remember me` issue on login page.
|
||||||
|
- add solution for hosts running under suexec (by adding `define('HAS_SUEXEC', true);` to config.php)
|
||||||
|
- fix issue with auto-deleting old files feature.
|
||||||
|
- removed feature : Uploading from URLs (leech).
|
||||||
|
|
||||||
|
|
||||||
## 3.0.2
|
## 3.0.2
|
||||||
- new styles, drag and drop and progressbar and bootstrap black.
|
- new styles, drag and drop and progressbar and bootstrap black.
|
||||||
- cleaning the header and footer after removing the plugin.
|
- cleaning the header and footer after removing the plugin.
|
||||||
@@ -101,13 +124,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- remove backup feature, no need for it.
|
- remove backup feature, no need for it.
|
||||||
|
|
||||||
|
|
||||||
## 1.5.4
|
## 1.5.4
|
||||||
- When the database old, tell the user to update.
|
- When the database old, tell the user to update.
|
||||||
- fix bug in ACP where secondary menu not appear
|
- fix bug in ACP where secondary menu not appear
|
||||||
- add link to user folder at do.php?id=.. page
|
- add link to user folder at do.php?id=.. page
|
||||||
|
|
||||||
|
|
||||||
## 1.5.3
|
## 1.5.3
|
||||||
- add turkish language.
|
- add turkish language.
|
||||||
- disable ajax by default at ACP ( you can add AJAX_ACP in config.php to turn ajax on )
|
- disable ajax by default at ACP ( you can add AJAX_ACP in config.php to turn ajax on )
|
||||||
- some style improvments at ACP
|
- some style improvments at ACP
|
||||||
|
|||||||
@@ -2,33 +2,94 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.R_BAN}</li>
|
<li class="breadcrumb-item active">{lang.R_BAN}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{lang.BAN_EXP1}
|
{lang.BAN_EXP1}
|
||||||
<br>
|
</div>
|
||||||
{lang.BAN_EXP2}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<div class="d-flex justify-content-end my-2">
|
||||||
|
<a class="btn btn-primary btn-sm" href="#" data-toggle="modal" data-target="#new_item_form">
|
||||||
<form method="post" action="{action}" id="ban_form">
|
<i class="fa fa-plus"></i> {lang.NEW}
|
||||||
|
</a>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<!-- textarea -->
|
|
||||||
<textarea name="ban_text" class="form-control" rows="2" cols="20" style="width:99%; height: 100px;direction:ltr;">{ban}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<input type="submit" name="submit" value="{lang.UPDATE_BAN}" class="btn btn-primary">
|
|
||||||
|
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
<IF NAME="show_message">
|
||||||
</form>
|
<div class="alert alert-info alert-dismissible fade show small my-2" role="alert">
|
||||||
|
{show_message}
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
|
<span aria-hidden="true" class="small" style="cursor:pointer">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
setTimeout(function() {
|
||||||
|
$('.alert-dismissible').fadeOut();
|
||||||
|
}, 5000);
|
||||||
|
</script>
|
||||||
|
</IF>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="table-responsive-sm">
|
||||||
|
<table class="table table-striped table-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">#</th>
|
||||||
|
<th scope="col">{lang.IP} / {lang.USERNAME}</th>
|
||||||
|
<th scope="col"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<LOOP NAME="banned_items">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{{id}}</th>
|
||||||
|
<td>{{content}}</td>
|
||||||
|
<td class="d-flex justify-content-end">
|
||||||
|
<a class="btn btn-outline-danger btn-sm" href="{delete_item}{{del_key}}" title="{lang.DELETE}" onclick="javascript:return confirm_form();">
|
||||||
|
<i class="fa fa-remove" title="{lang.DELETE}"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</LOOP>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- new banned item modal -->
|
||||||
|
<div id="new_item_form" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="addNewBannedItem"
|
||||||
|
aria-hidden="true">
|
||||||
|
|
||||||
|
<form method="post" action="{new_item_action}">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="addNewBannedItem">{lang.IP} / {lang.USERNAME}</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<label class="form-control">
|
||||||
|
<input type="text" class="form-control" id="k" name="k" placeholder="{lang.IP} {lang.OR} {lang.USERNAME}" value="">
|
||||||
|
</label>
|
||||||
|
<small>
|
||||||
|
{lang.BAN_EXP2}
|
||||||
|
</small>
|
||||||
|
{H_FORM_KEYS}
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
|
||||||
|
<input type="submit" name="submit" class="btn btn-primary" value="{lang.SUBMIT}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- end new banned item modal -->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,59 +1,59 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.R_CALLS}</li>
|
<li class="breadcrumb-item active">{lang.R_CALLS}</li>
|
||||||
<IF NAME="current_smt == 'show_h24'"><li class="breadcrumb-item active"> {lang.SHOW_FROM_24H}</li></IF>
|
<IF NAME="current_smt == 'show_h24'"><li class="breadcrumb-item active"> {lang.SHOW_FROM_24H}</li></IF>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="no_results">
|
<IF NAME="no_results">
|
||||||
<div class="alert alert-info">{lang.MESSAGE_NONE}</div>
|
<div class="alert alert-info">{lang.MESSAGE_NONE}</div>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
|
|
||||||
|
|
||||||
<form method="post" name="callform" action="{action}" id="calls_form">
|
<form method="post" name="callform" action="{action}" id="calls_form">
|
||||||
|
|
||||||
|
|
||||||
<div id="accordion" role="tablist" aria-multiselectable="true">
|
<div id="accordion" role="tablist" aria-multiselectable="true">
|
||||||
|
|
||||||
<LOOP NAME="arr">
|
<LOOP NAME="arr">
|
||||||
<div class="card mb-1" id="su[{{id}}]">
|
<div class="card mb-1" id="su[{{id}}]">
|
||||||
<div class="card-header" role="tab" id="heading{{id}}">
|
<div class="card-header" role="tab" id="heading{{id}}">
|
||||||
|
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
<input type="checkbox" class="custom-checkbox" name="del_{{id}}" value="{{id}}" onclick="change_color(this,'su[{{id}}]', 'bg-warning card', 'card');" rel="_del" />
|
<input type="checkbox" class="custom-checkbox" name="del_{{id}}" value="{{id}}" onclick="change_color(this,'su[{{id}}]', 'bg-warning card', 'card');" rel="_del" />
|
||||||
|
|
||||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{id}}" aria-expanded="false" aria-controls="collapse{{id}}">
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{id}}" aria-expanded="false" aria-controls="collapse{{id}}">
|
||||||
{{name}}
|
{{name}}
|
||||||
<IF LOOP="sent"><i class="fa fa-reply" title="{lang.IS_SEND_MAIL}" data-toggle="tooltip"></i></IF>
|
<IF LOOP="sent"><i class="fa fa-reply" title="{lang.IS_SEND_MAIL}" data-toggle="tooltip"></i></IF>
|
||||||
</a>
|
</a>
|
||||||
<small class="pull-(lang.DIR==ltr?right:left)">{{human_time}}</small>
|
<small class="pull-(lang.DIR==ltr?right:left)">{{human_time}}</small>
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse{{id}}" class="collapse" role="tabpanel" aria-labelledby="heading{{id}}">
|
<div id="collapse{{id}}" class="collapse" role="tabpanel" aria-labelledby="heading{{id}}">
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{text}}
|
{{text}}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
____<br>
|
____<br>
|
||||||
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
||||||
<span class="text-muted">{lang.IP}:</span> <a href="{{ip_finder}}" target="_blank">{{ip}}</a><br>
|
<span class="text-muted">{lang.IP}:</span> <a href="{{ip_finder}}" target="_blank">{{ip}}</a><br>
|
||||||
<span class="text-muted">{lang.TIME}:</span> {{time}}<br>
|
<span class="text-muted">{lang.TIME}:</span> {{time}}<br>
|
||||||
<IF LOOP="mail">
|
<IF LOOP="mail">
|
||||||
<hr>
|
<hr>
|
||||||
<a class="btn btn-primary" data-toggle="modal" data-target="#contactForm{{id}}" href="#">
|
<a class="btn btn-primary" data-toggle="modal" data-target="#contactForm{{id}}" href="#">
|
||||||
{lang.REPLY_CALL}
|
{lang.REPLY_CALL}
|
||||||
</a>
|
</a>
|
||||||
</IF>
|
</IF>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- pagination -->
|
<!-- pagination -->
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col col-md-auto">[ <a href="javascript:void(0);" onclick="checkAll(document.callform, '_del', 'su', 'card bg-warning mb-1', 'card mb-1');">{lang.CHECK_ALL}</a> ]</div>
|
<div class="col col-md-auto">[ <a href="javascript:void(0);" onclick="checkAll(document.callform, '_del', 'su', 'card bg-warning mb-1', 'card mb-1');">{lang.CHECK_ALL}</a> ]</div>
|
||||||
<div class="col col-md-auto"><input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" /></div>
|
<div class="col col-md-auto"><input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
@@ -71,36 +71,36 @@
|
|||||||
|
|
||||||
<!-- contact form modals -->
|
<!-- contact form modals -->
|
||||||
<LOOP NAME="arr">
|
<LOOP NAME="arr">
|
||||||
<div class="modal" id="contactForm{{id}}">
|
<div class="modal" id="contactForm{{id}}">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form method="post" action="{action}" id="send_form" role="form">
|
<form method="post" action="{action}" id="send_form" role="form">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">{lang.REPLY_CALL}</h5>
|
<h5 class="modal-title">{lang.REPLY_CALL}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{{text}}
|
{{text}}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
____<br>
|
____<br>
|
||||||
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<textarea name="v_{{id}}" cols="80" class="form-control" rows="3" placeholder="{lang.TEXT}"></textarea>
|
<textarea name="v_{{id}}" cols="80" class="form-control" rows="3" placeholder="{lang.TEXT}"></textarea>
|
||||||
<input type="hidden" name="reply_submit" value="1">
|
<input type="hidden" name="reply_submit" value="1">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="reply_submit" class="btn btn-primary btn-sm"><span>{lang.REPLY}</span></button>
|
<button type="submit" name="reply_submit" class="btn btn-primary btn-sm"><span>{lang.REPLY}</span></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</LOOP>
|
</LOOP>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.R_CHECK_UPDATE}</li>
|
<li class="breadcrumb-item active">{lang.R_CHECK_UPDATE}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<div class="alert" id="updateInfo">
|
<div class="alert" id="updateInfo">
|
||||||
@@ -69,7 +69,9 @@ function checkVersion() {
|
|||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
if(data.content) {
|
if(data.content) {
|
||||||
var info = data.content.split(":::");
|
var info = data.content.split(":::");
|
||||||
$('#updateInfo').addClass(info[0] != 0 ? 'alert-warning' : 'alert-info');
|
$('#updateInfo').addClass(
|
||||||
|
info[0] != 0 ? 'alert-warning' : 'alert-info'
|
||||||
|
);
|
||||||
$('#updateInfoStatus').html(info[1]);
|
$('#updateInfoStatus').html(info[1]);
|
||||||
<UNLESS NAME="showMessage">
|
<UNLESS NAME="showMessage">
|
||||||
if(info[0] == 2) {
|
if(info[0] == 2) {
|
||||||
@@ -128,9 +130,10 @@ function updateNow(step) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function(data) {
|
.fail(function(data) {
|
||||||
|
var tryAgainMsg = '{lang.ERROR_TRY_AGAIN}';
|
||||||
$('#update'+step+' .update-status').html('<i class="fa fa-warning text-danger"></i>');
|
$('#update'+step+' .update-status').html('<i class="fa fa-warning text-danger"></i>');
|
||||||
$('#update'+step+' .update-message').removeClass('d-none').addClass('d-block').html(
|
$('#update'+step+' .update-message').removeClass('d-none').addClass('d-block').html(
|
||||||
(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : '{lang.ERROR_TRY_AGAIN}'))
|
<IGNORE>(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : tryAgainMsg))</IGNORE>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
|
|
||||||
|
<form method="post" action="{action}" id="opt_form" class="form p-3">
|
||||||
|
|
||||||
|
|
||||||
<form method="post" action="{action}" id="opt_form" class="form">
|
|
||||||
<!-- admin configs tr extra begin -->
|
<!-- admin configs tr extra begin -->
|
||||||
{options}
|
{options}
|
||||||
<!-- admin configs tr extra -->
|
<!-- admin configs tr extra -->
|
||||||
@@ -10,11 +7,11 @@
|
|||||||
|
|
||||||
<!-- button -->
|
<!-- button -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<br>
|
<br>
|
||||||
<input type="hidden" name="submit" value="1" />
|
<input type="hidden" name="submit" value="1" />
|
||||||
<button type="submit" id="submit" name="_submit_" class="btn btn-primary"><span>{n_submit}</span></button>
|
<button type="submit" id="submit" name="_submit_" class="btn btn-primary"><span>{n_submit}</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.R_FILES} (<span>{current_page}/{total_pages}</span>)</li>
|
<li class="breadcrumb-item active">{lang.R_FILES} (<span>{current_page}/{total_pages}</span>)</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<IF NAME="is_search">
|
<IF NAME="is_search">
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<form method="post" name="filesform" action="{action}" id="files_form">
|
<form method="post" name="filesform" action="{action}" id="files_form">
|
||||||
|
|
||||||
<IF NAME="no_results">
|
<IF NAME="no_results">
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
{lang.NO_RESULT_USE_SYNC}
|
{lang.NO_RESULT_USE_SYNC}
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}">
|
<input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- pagination -->
|
<!-- pagination -->
|
||||||
{page_nums}
|
{page_nums}
|
||||||
|
|
||||||
|
|||||||
@@ -222,8 +222,8 @@ function uncheckAll_exts(form, id, _do_c_) {
|
|||||||
|
|
||||||
|
|
||||||
function confirm_form(r)
|
function confirm_form(r)
|
||||||
{
|
{
|
||||||
var msg = !r ? '{lang.ARE_YOU_SURE_DO_THIS}' : r;
|
var msg = !r ? '{lang.ARE_YOU_SURE_DO_THIS}' : r;
|
||||||
return confirm(msg);
|
return confirm(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,6 +232,8 @@ function get_kleeja_link(link) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<IF ISSET="extra_admin_footer_code">
|
||||||
{extra_admin_footer_code}
|
{extra_admin_footer_code}
|
||||||
|
</IF>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,47 +3,49 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
<title>{lang.KLEEJA_CP} - {config.sitename}</title>
|
<title>{lang.KLEEJA_CP} - {config.sitename}</title>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{STYLE_PATH_ADMIN}images/favicon.ico" />
|
<link rel="shortcut icon" href="{STYLE_PATH_ADMIN}images/favicon.ico" />
|
||||||
<link rel="icon" type="image/png" href="{STYLE_PATH_ADMIN}images/favicon.png" />
|
<link rel="icon" type="image/png" href="{STYLE_PATH_ADMIN}images/favicon.png" />
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap core CSS -->
|
||||||
<link href="{STYLE_PATH_ADMIN}css/bootstrap.min.css" rel="stylesheet">
|
<link href="{STYLE_PATH_ADMIN}css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom fonts for this template -->
|
<!-- Custom fonts for this template -->
|
||||||
<link href="{STYLE_PATH_ADMIN}css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
<link href="{STYLE_PATH_ADMIN}css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
<!-- Plugin CSS -->
|
<!-- Plugin CSS -->
|
||||||
<link href="{STYLE_PATH_ADMIN}css/dataTables.bootstrap4.css" rel="stylesheet">
|
<link href="{STYLE_PATH_ADMIN}css/dataTables.bootstrap4.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
<!-- Custom styles for this template -->
|
||||||
<link href="{STYLE_PATH_ADMIN}css/sb-admin.css" rel="stylesheet">
|
<link href="{STYLE_PATH_ADMIN}css/sb-admin.css" rel="stylesheet">
|
||||||
<link href="{STYLE_PATH_ADMIN}css/custom.css" rel="stylesheet">
|
<link href="{STYLE_PATH_ADMIN}css/custom.css" rel="stylesheet">
|
||||||
|
|
||||||
<IF NAME="lang.DIR==rtl">
|
<IF NAME="lang.DIR==rtl">
|
||||||
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/bootstrap.rtl.min.css" />
|
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/bootstrap.rtl.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/sb-admin-rtl.css" />
|
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/sb-admin-rtl.css" />
|
||||||
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-family: "Tahoma",Arial,sans-serif;}
|
body{font-family: "Tahoma",Arial,sans-serif;}
|
||||||
body{
|
body{
|
||||||
direction: rtl; /* placing it here fixes the issue with jquery white page bug */
|
direction: rtl; /* placing it here fixes the issue with jquery white page bug */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var STYLE_PATH_ADMIN = '{STYLE_PATH_ADMIN}';
|
var STYLE_PATH_ADMIN = '{STYLE_PATH_ADMIN}';
|
||||||
var go_to = '{go_to}';
|
var go_to = '{go_to}';
|
||||||
</script>
|
</script>
|
||||||
|
<IF ISSET="extra_admin_header_code">
|
||||||
{extra_admin_header_code}
|
{extra_admin_header_code}
|
||||||
|
</IF>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="fixed-nav sticky-footer bg-{admin_theme_color}" id="page-top">
|
<body class="fixed-nav sticky-footer bg-{admin_theme_color}" id="page-top">
|
||||||
@@ -53,42 +55,42 @@
|
|||||||
<!-- Navigation -->
|
<!-- Navigation -->
|
||||||
<nav class="navbar navbar-expand-lg navbar-{admin_theme_color} bg-{admin_theme_color} fixed-top" id="mainNav">
|
<nav class="navbar navbar-expand-lg navbar-{admin_theme_color} bg-{admin_theme_color} fixed-top" id="mainNav">
|
||||||
|
|
||||||
<a class="navbar-brand" href="./"><img src="{STYLE_PATH_ADMIN}/images/kleeja.png" alt="Kleeja" style="margin:2px 8px;vertical-align:middle;width:24px"/> Kleeja <small>{assigned_klj_ver}</small></a>
|
<a class="navbar-brand" href="./"><img src="{STYLE_PATH_ADMIN}/images/kleeja.png" alt="Kleeja" style="margin:2px 8px;vertical-align:middle;width:24px"/> Kleeja <small>{assigned_klj_ver}</small></a>
|
||||||
|
|
||||||
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarAcp" aria-controls="navbarAcp" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarAcp" aria-controls="navbarAcp" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarAcp">
|
<div class="collapse navbar-collapse" id="navbarAcp">
|
||||||
|
|
||||||
<!-- side menu -->
|
<!-- side menu -->
|
||||||
<ul class="navbar-nav navbar-sidenav">
|
<ul class="navbar-nav navbar-sidenav">
|
||||||
<li class="nav-item<IF NAME="go_to==start"> activex</IF>" data-toggle="tooltip" data-placement="right" title="{lang.R_CPINDEX}">
|
<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>
|
<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">
|
<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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<LOOP NAME="adm_extensions_menu">
|
<LOOP NAME="adm_extensions_menu">
|
||||||
<li class="nav-item ({{current}}?activex:)" id="menu_item{{i}}" data-toggle="tooltip" data-placement="right" title="{{title}}">
|
<li class="nav-item ({{current}}?activex:)" id="menu_item{{i}}" data-toggle="tooltip" data-placement="right" title="{{title}}">
|
||||||
<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>>
|
<a class="first-level nav-link<IF LOOP="current"><IF ISSET="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}}
|
<i class="fa fa-fw fa-{{icon}}"></i> {{title}} {{bubble}}
|
||||||
</a>
|
</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}}">
|
<ul class="sidenav-second-level<IF LOOP="current"><ELSE> collapse</IF>" id="collapseItem{{i}}">
|
||||||
<IF LOOP="current">{go_menu_html}</IF>
|
<IF LOOP="current">{go_menu_html}</IF>
|
||||||
</ul>
|
</ul>
|
||||||
</IF>
|
</IF>
|
||||||
</li>
|
</li>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- top menu -->
|
<!-- top menu -->
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
|
|
||||||
|
|
||||||
<LOOP NAME="adm_topmenu">
|
<LOOP NAME="adm_topmenu">
|
||||||
@@ -101,23 +103,23 @@
|
|||||||
</LOOP>
|
</LOOP>
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="./?cp={go_to}&change_theme=<IF NAME="admin_theme_color==dark">light<ELSE>dark</IF>&{GET_FORM_KEY_GLOBAL}"><i class="fa fa-fw fa-lightbulb-o"></i></a>
|
<a class="nav-link" href="./?cp={go_to}&change_theme=<IF NAME="admin_theme_color==dark">light<ELSE>dark</IF>&{GET_FORM_KEY_GLOBAL}"><i class="fa fa-fw fa-lightbulb-o"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="https://www.kleeja.com" target="_blank" title="kleeja.com"><i class="fa fa-fw fa-support"></i></a>
|
<a class="nav-link" href="https://www.kleeja.com" target="_blank" title="kleeja.com"><i class="fa fa-fw fa-support"></i></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="./?cp=b_lgoutcp&{GET_FORM_KEY_GLOBAL}" onclick="javascript:return confirm_form();"><i class="fa fa-fw fa-sign-out"></i> {lang.R_LGOUTCP} [ {username} ]</a>
|
<a class="nav-link" href="./?cp=b_lgoutcp&{GET_FORM_KEY_GLOBAL}" onclick="javascript:return confirm_form();"><i class="fa fa-fw fa-sign-out"></i> {lang.R_LGOUTCP} [ {username} ]</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{config.siteurl}"><i class="fa fa-fw fa-sign-out"></i> {lang.RETURN_HOME}</a>
|
<a class="nav-link" href="{config.siteurl}"><i class="fa fa-fw fa-sign-out"></i> {lang.RETURN_HOME}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active justify-content-between">
|
<li class="breadcrumb-item active justify-content-between">
|
||||||
{lang.R_IMG_CTRL} ({current_page}/{total_pages})
|
{lang.R_IMG_CTRL} ({current_page}/{total_pages})
|
||||||
</li>
|
</li>
|
||||||
<li class="pull-(lang.DIR==ltr?right:left)">
|
<li class="pull-(lang.DIR==ltr?right:left)">
|
||||||
<div id="imgs_loading"><img src="{STYLE_PATH_ADMIN}images/ajax-loader-small.gif" /></div>
|
<div id="imgs_loading"><img src="{STYLE_PATH_ADMIN}images/ajax-loader-small.gif" /></div>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<IF NAME="config.thumbs_imgs"><ELSE>
|
<IF NAME="config.thumbs_imgs"><ELSE>
|
||||||
@@ -20,37 +20,37 @@
|
|||||||
<form method="post" name="imgform" action="{action}" id="imgs_form">
|
<form method="post" name="imgform" action="{action}" id="imgs_form">
|
||||||
|
|
||||||
<IF NAME="no_results">
|
<IF NAME="no_results">
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<h2>{lang.NO_RESULT_USE_SYNC}</h2>
|
{lang.NO_RESULT_USE_SYNC}
|
||||||
</div>
|
</div>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
|
|
||||||
|
|
||||||
<!-- start data div -->
|
<!-- start data div -->
|
||||||
|
|
||||||
|
|
||||||
<div class="row text-center text-lg-left xthumbs">
|
<div class="row text-center text-lg-left xthumbs">
|
||||||
<LOOP NAME="arr">
|
<LOOP NAME="arr">
|
||||||
<div class="col-lg-3 col-md-4 col-xs-6 img-thumb-item" data-toggle="tooltip" data-html="true" title="<span>{lang.FILENAME} : </span>{{name}}<br />
|
<div class="col-lg-3 col-md-4 col-xs-6 img-thumb-item" data-toggle="tooltip" data-html="true" title="<span>{lang.FILENAME} : </span>{{name}}<br />
|
||||||
<span>{lang.FILEUPS} : </span> {{ups}}<br />
|
<span>{lang.FILEUPS} : </span> {{ups}}<br />
|
||||||
<span>{lang.FILESIZE} : </span> {{size}}<br />
|
<span>{lang.FILESIZE} : </span> {{size}}<br />
|
||||||
<span>{lang.FILEDATE} : </span> {{time}}<br />
|
<span>{lang.FILEDATE} : </span> {{time}}<br />
|
||||||
<span>{lang.BY} : </span> {{user}}<br />
|
<span>{lang.BY} : </span> {{user}}<br />
|
||||||
<span>{lang.IP} : </span> {{ip}}">
|
<span>{lang.IP} : </span> {{ip}}">
|
||||||
<a href="{{href}}" target="_blank" data-img-url="{{href}}" class="d-block mb-4 h-100" data-toggle="modal" data-target=".image-model">
|
<a href="{{href}}" target="_blank" data-img-url="{{href}}" class="d-block mb-4 h-100" data-toggle="modal" data-target=".image-model">
|
||||||
<img class="img-fluid img-thumbnail" src="{{thumb_link}}" alt="" style="min-height:200px;" id="su[{{id}}]" onError="this.onerror=null;this.src='{STYLE_PATH_ADMIN}images/image-not-found.png';">
|
<img class="img-fluid img-thumbnail" src="{{thumb_link}}" alt="" style="min-height:200px;" id="su[{{id}}]" onError="this.onerror=null;this.src='{STYLE_PATH_ADMIN}images/image-not-found.png';">
|
||||||
</a>
|
</a>
|
||||||
<div class="ktip" style="display: none;">
|
<div class="ktip" style="display: none;">
|
||||||
<span id="user_{{id}}">{{user}}</span>
|
<span id="user_{{id}}">{{user}}</span>
|
||||||
<span id="ip_{{id}}">{{ip}}</span>
|
<span id="ip_{{id}}">{{ip}}</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="kcheck">
|
<p class="kcheck">
|
||||||
<input id="del_{{id}}" name="del_{{id}}" type="checkbox" value="{{id}}" rel="_del" onclick="change_color(this, 'su[{{id}}]', 'img-thumbnail img-fluid bg-danger', 'img-thumbnail img-fluid');" />
|
<input id="del_{{id}}" name="del_{{id}}" type="checkbox" value="{{id}}" rel="_del" onclick="change_color(this, 'su[{{id}}]', 'img-thumbnail img-fluid bg-danger', 'img-thumbnail img-fluid');" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- end data div -->
|
<!-- end data div -->
|
||||||
|
|
||||||
@@ -61,36 +61,36 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col col-md-auto check_all">[ <a href="javascript:void(0);" onclick="checkAll(document.imgform, '_del', 'su', 'img-thumbnail img-fluid bg-danger', 'img-thumbnail img-fluid');">{lang.CHECK_ALL}</a> ]</div>
|
<div class="col col-md-auto check_all">[ <a href="javascript:void(0);" onclick="checkAll(document.imgform, '_del', 'su', 'img-thumbnail img-fluid bg-danger', 'img-thumbnail img-fluid');">{lang.CHECK_ALL}</a> ]</div>
|
||||||
|
|
||||||
<div class="col col-md-auto" id="search-one-item" style="display:none">
|
<div class="col col-md-auto" id="search-one-item" style="display:none">
|
||||||
<select class="custom-select">
|
<select class="custom-select">
|
||||||
<option value="0">{lang.SEARCH_SUBMIT} : </option>
|
<option value="0">{lang.SEARCH_SUBMIT} : </option>
|
||||||
<option value="1">{lang.SEARCH4FILES_BYIP}</option>
|
<option value="1">{lang.SEARCH4FILES_BYIP}</option>
|
||||||
<option value="2">{lang.SEARCH4FILES_BYUSER}</option>
|
<option value="2">{lang.SEARCH4FILES_BYUSER}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-auto">
|
<div class="col col-md-auto">
|
||||||
<input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" />
|
<input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal fade image-model" tabindex="-1" role="dialog" aria-labelledby="ImagePreviewModel" aria-hidden="true">
|
<div class="modal fade image-model" tabindex="-1" role="dialog" aria-labelledby="ImagePreviewModel" aria-hidden="true">
|
||||||
<div class="modal-dialog ">
|
<div class="modal-dialog ">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
<img src="{STYLE_PATH_ADMIN}images/placeholder.jpg" class="img-fluid" style="height: auto" onclick="window.open(this.src, '_blank');"/>
|
<img src="{STYLE_PATH_ADMIN}images/placeholder.jpg" class="img-fluid" style="height: auto" onclick="window.open(this.src, '_blank');"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,110 +1,110 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{lang.LANG_SMALL_NAME}">
|
<html lang="{lang.LANG_SMALL_NAME}">
|
||||||
<head>
|
<head>
|
||||||
<title>{lang.LOGIN} - {lang.KLEEJA_CP} - {config.sitename}</title>
|
<title>{lang.LOGIN} - {lang.KLEEJA_CP} - {config.sitename}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<link rel="shortcut icon" href="{STYLE_PATH_ADMIN}images/favicon.ico" />
|
<link rel="shortcut icon" href="{STYLE_PATH_ADMIN}images/favicon.ico" />
|
||||||
<link rel="icon" href="{STYLE_PATH_ADMIN}images/favicon.png" />
|
<link rel="icon" href="{STYLE_PATH_ADMIN}images/favicon.png" />
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="{STYLE_PATH_ADMIN}css/bootstrap.min.css" />
|
<link rel="stylesheet" type="text/css" media="screen" href="{STYLE_PATH_ADMIN}css/bootstrap.min.css" />
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="lang.DIR==rtl">
|
<IF NAME="lang.DIR==rtl">
|
||||||
<link rel="stylesheet" type="text/css" media="all" href="{STYLE_PATH_ADMIN}css/bootstrap.rtl.min.css" />
|
<link rel="stylesheet" type="text/css" media="all" href="{STYLE_PATH_ADMIN}css/bootstrap.rtl.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/sb-admin-rtl.css" />
|
<link rel="stylesheet" type="text/css" href="{STYLE_PATH_ADMIN}css/sb-admin-rtl.css" />
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-family: "Tahoma",Arial,sans-serif;}
|
body{font-family: "Tahoma",Arial,sans-serif;}
|
||||||
.container{
|
.container{
|
||||||
direction: rtl; /* placing it here fixes the issue with jquery white page bug */
|
direction: rtl; /* placing it here fixes the issue with jquery white page bug */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body {
|
body {
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
background:#ffffff;
|
background:#ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-signin {
|
.form-signin {
|
||||||
max-width: 330px;
|
max-width: 330px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 50px auto;
|
margin: 50px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.form-signin-logo{
|
.form-signin-logo{
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-signin-heading{
|
.form-signin-heading{
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
color: darkslategray;
|
color: darkslategray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.form-signin .form-signin-heading, .form-signin-logo,
|
.form-signin .form-signin-heading, .form-signin-logo,
|
||||||
.form-signin .checkbox {
|
.form-signin .checkbox {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.form-signin .checkbox {
|
.form-signin .checkbox {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.form-signin .form-control {
|
.form-signin .form-control {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.form-signin .form-control:focus {
|
.form-signin .form-control:focus {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.form-signin input[type="text"] {
|
.form-signin input[type="text"] {
|
||||||
|
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
}
|
}
|
||||||
.form-signin input[type="password"] {
|
.form-signin input[type="password"] {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{extra_header_admin_login}
|
{extra_header_admin_login}
|
||||||
</head>
|
</head>
|
||||||
<body id="login_body">
|
<body id="login_body">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<form action="{action}" method="post" style="clear: both;" id="login_form" class="form-signin">
|
<form action="{action}" method="post" style="clear: both;" id="login_form" class="form-signin">
|
||||||
<IF NAME="err">
|
<IF NAME="err">
|
||||||
<hr>
|
<hr>
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
{errs}
|
{errs}
|
||||||
</div>
|
</div>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
<!--{lang.KLEEJA_CP}-->
|
<!--{lang.KLEEJA_CP}-->
|
||||||
|
|
||||||
<img src="{STYLE_PATH_ADMIN}images/kleeja.png" class="form-signin-logo">
|
<img src="{STYLE_PATH_ADMIN}images/kleeja.png" class="form-signin-logo">
|
||||||
<h2 class="form-signin-heading">{lang.WELCOME}</h2>
|
<h2 class="form-signin-heading">{lang.WELCOME}</h2>
|
||||||
|
|
||||||
|
|
||||||
<input type="text" class="form-control" placeholder="{lang.USERNAME}" readonly="readonly" value="{username}">
|
<input type="text" class="form-control" placeholder="{lang.USERNAME}" readonly="readonly" value="{username}">
|
||||||
|
|
||||||
<input type="hidden" name="lname" id="lname" value="{username}" />
|
<input type="hidden" name="lname" id="lname" value="{username}" />
|
||||||
<input type="password" name="lpass_{KEY_FOR_PASS}" class="form-control" placeholder="{lang.PASSWORD}" autofocus>
|
<input type="password" name="lpass_{KEY_FOR_PASS}" class="form-control" placeholder="{lang.PASSWORD}" autofocus>
|
||||||
|
|
||||||
<!-- captcha -->
|
<!-- captcha -->
|
||||||
<IF NAME="show_captcha">
|
<IF NAME="show_captcha">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<p class="form-control-static">
|
<p class="form-control-static">
|
||||||
@@ -119,20 +119,20 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</IF>
|
</IF>
|
||||||
<!-- end captcha -->
|
<!-- end captcha -->
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit" name="submit">{lang.LOGIN}</button>
|
<button class="btn btn-lg btn-primary btn-block" type="submit" name="submit">{lang.LOGIN}</button>
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
<input type="hidden" name="kid" value="{KEY_FOR_WEE}" />
|
<input type="hidden" name="kid" value="{KEY_FOR_WEE}" />
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<small><a href="{config.siteurl}" title="{lang.RETURN_HOME}" class="muted"> « {lang.RETURN_HOME}</a></small>
|
<small><a href="{config.siteurl}" title="{lang.RETURN_HOME}" class="muted"> « {lang.RETURN_HOME}</a></small>
|
||||||
<small>({not_you})</small>
|
<small>({not_you})</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -37,35 +37,42 @@
|
|||||||
<LOOP NAME="installed_plugins">
|
<LOOP NAME="installed_plugins">
|
||||||
<div class="col-sm-12 col-md-3 mt-2">
|
<div class="col-sm-12 col-md-3 mt-2">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<img class="card-img-top" src="{{icon}}" alt="{{plg_name}}">
|
<img class="card-img-top img-responsive" src="{{icon}}" alt="{{plg_name}}">
|
||||||
<div class="card-body">
|
<div class="card-img-overlay p-3">
|
||||||
<h4 class="card-title" style="max-height: 30px; min-height: 30px; overflow-y: auto">
|
<div class="font-weight-normal px-2 rounded text-white" style="line-height:2; background: rgba(18, 16, 16, 0.4);">
|
||||||
<IF LOOP="plg_disabled">
|
<IF LOOP="plg_disabled">
|
||||||
{{plg_name}}
|
{{plg_name}}
|
||||||
<i class="fa fa-toggle-off"></i>
|
<i class="fa fa-toggle-off"></i>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
{{extra_info.plugin_title}} {{extra_info.plugin_version}}
|
{{extra_info.plugin_title}} {{extra_info.plugin_version}}
|
||||||
</IF>
|
</IF>
|
||||||
</h4>
|
</div>
|
||||||
<p class="card-text" style="max-height: 100px; min-height: 100px; overflow-y: auto">
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
<p class="card-text " style="font-size:13px; max-height: 100px; min-height: 50px; overflow-y: auto">
|
||||||
<IF LOOP="plg_disabled">
|
<IF LOOP="plg_disabled">
|
||||||
{{plg_dsc}}
|
{{plg_dsc}}
|
||||||
<ELSE>
|
<ELSE>
|
||||||
{{extra_info.plugin_description}}
|
{{extra_info.plugin_description}}
|
||||||
</IF>
|
</ELSE>
|
||||||
<br>
|
<br>
|
||||||
<small>{{extra_info.plugin_developer}}</small>
|
<small>{{extra_info.plugin_developer}}</small>
|
||||||
|
</IF>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer">
|
<div class="card-footer btn-group">
|
||||||
<IF LOOP="plg_disabled">
|
<IF LOOP="plg_disabled">
|
||||||
<a class="btn btn-outline-primary btn-sm" href="{plugin_enable_link}{{plg_name}}" title="{lang.ENABLE}"><i class="fa fa-toggle-on" title="{lang.ENABLE}"></i> {lang.ENABLE}</a>
|
<a class="btn btn-outline-secondary btn-sm" href="{plugin_enable_link}{{plg_name}}" title="{lang.ENABLE}"><i class="fa fa-toggle-on" title="{lang.ENABLE}"></i> {lang.ENABLE}</a>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
<a class="btn btn-outline-primary btn-sm" href="{plugin_disable_link}{{plg_name}}" title="{lang.DISABLE}"><i class="fa fa-toggle-off" title="{lang.DISABLE}"></i> {lang.DISABLE}</a>
|
<IF LOOP="has_settings_page">
|
||||||
|
<a class="btn btn-outline-secondary btn-sm" href="./?{{extra_info.settings_page}}" title="{lang.R_CONFIGS}"><i class="fa fa-gear" title="{lang.R_CONFIGS}"></i></a>
|
||||||
|
</IF>
|
||||||
|
<a class="btn btn-outline-secondary btn-sm" href="{plugin_disable_link}{{plg_name}}" title="{lang.DISABLE}"><i class="fa fa-toggle-off" title="{lang.DISABLE}"></i> {lang.DISABLE}</a>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
<a class="btn btn-outline-primary btn-sm" href="{plugin_uninstall_link}{{plg_name}}" title="{lang.DELETE}" onclick="javascript:return confirm_form();"><i class="fa fa-remove" title="{lang.DELETE}"></i> {lang.DELETE}</a>
|
<a class="btn btn-outline-secondary btn-sm" href="{plugin_uninstall_link}{{plg_name}}" title="{lang.DELETE}" onclick="javascript:return confirm_form();"><i class="fa fa-remove" title="{lang.DELETE}"></i> {lang.DELETE}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -149,7 +156,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</UNLESS>
|
</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">
|
<div class="d-flex justify-content-end my-3">
|
||||||
<button id="updateAllBtn" type="button" onclick="updateAll()" class="btn btn-primary px-5">
|
<button id="updateAllBtn" type="button" onclick="updateAll()" class="btn btn-primary px-5">
|
||||||
<i class="fa fa-flash"></i> {lang.UPDATE_ALL}
|
<i class="fa fa-flash"></i> {lang.UPDATE_ALL}
|
||||||
@@ -164,7 +171,6 @@
|
|||||||
<div class="media-body d-flex justify-content-between">
|
<div class="media-body d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
<h5 class="mt-0 mb-2">{{title}}</h5>
|
<h5 class="mt-0 mb-2">{{title}}</h5>
|
||||||
|
|
||||||
<div style="direction: ltr;">
|
<div style="direction: ltr;">
|
||||||
<IF NAME="case == check">{{current_version}} → </IF>{{version}}
|
<IF NAME="case == check">{{current_version}} → </IF>{{version}}
|
||||||
</div>
|
</div>
|
||||||
@@ -232,7 +238,9 @@ function downloadPlugin(name, nextPlugins) {
|
|||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
if(data.content) {
|
if(data.content) {
|
||||||
var info = data.content.split(":::");
|
var info = data.content.split(":::");
|
||||||
$('#installLoading-'+name).removeClass('badge-light').addClass(info[0] != 1 ? 'badge-warning' : 'badge-success');
|
$('#installLoading-'+name).removeClass('badge-light').addClass(
|
||||||
|
info[0] != 1 ? 'badge-warning' : 'badge-success'
|
||||||
|
);
|
||||||
$('#installLoading-'+name).html(info[1]);
|
$('#installLoading-'+name).html(info[1]);
|
||||||
} else {
|
} else {
|
||||||
this.fail();
|
this.fail();
|
||||||
@@ -244,9 +252,10 @@ function downloadPlugin(name, nextPlugins) {
|
|||||||
}, 500);
|
}, 500);
|
||||||
})
|
})
|
||||||
.fail(function(data) {
|
.fail(function(data) {
|
||||||
|
var tryAgainMsg = '{lang.ERROR_TRY_AGAIN}';
|
||||||
$('#downloadBtn-' + name).prop('disabled', false);
|
$('#downloadBtn-' + name).prop('disabled', false);
|
||||||
$('#installLoading-'+name).removeClass('badge-light').addClass('badge-danger').html(
|
$('#installLoading-'+name).removeClass('badge-light').addClass('badge-danger').html(
|
||||||
(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : '{lang.ERROR_TRY_AGAIN}'))
|
<IGNORE>(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : tryAgainMsg))</IGNORE>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,71 +1,71 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item">{lang.R_REPAIR}</li>
|
<li class="breadcrumb-item">{lang.R_REPAIR}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<div class="card card-inverse card-primary">
|
<div class="card card-inverse card-primary">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.DEL_CACHE}</h3>
|
<h5 class="card-title">{lang.DEL_CACHE}</h5>
|
||||||
<a href="{del_cache_link}" class="btn btn-secondary">{lang.DELETE}</a>
|
<a href="{del_cache_link}" class="btn btn-secondary">{lang.DELETE}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.ALL_FILES}: {all_files}</h3>
|
<h5 class="card-title">{lang.ALL_FILES}: {all_files}</h5>
|
||||||
<p class="card-text">{lang.WHY_SYNCING}</p>
|
<p class="card-text">{lang.WHY_SYNCING}</p>
|
||||||
<a href="{resync_files_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
<a href="{resync_files_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.ALL_IMAGES}: {all_images}</h3>
|
<h5 class="card-title">{lang.ALL_IMAGES}: {all_images}</h5>
|
||||||
<p class="card-text">{lang.WHY_SYNCING}</p>
|
<p class="card-text">{lang.WHY_SYNCING}</p>
|
||||||
<a href="{resync_images_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
<a href="{resync_images_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.USERS_ST}: {all_users}</h3>
|
<h5 class="card-title">{lang.USERS_ST}: {all_users}</h5>
|
||||||
<p class="card-text">{lang.WHY_SYNCING}</p>
|
<p class="card-text">{lang.WHY_SYNCING}</p>
|
||||||
<a href="{resync_users_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
<a href="{resync_users_link}" class="btn btn-secondary">{lang.RESYNC}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.SIZES_ST}: {all_sizes}</h3>
|
<h5 class="card-title">{lang.SIZES_ST}: {all_sizes}</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.REPAIR_DB_TABLES}</h3>
|
<h5 class="card-title">{lang.REPAIR_DB_TABLES}</h5>
|
||||||
<p class="card-text">{lang.WHY_SYNCING}</p>
|
<p class="card-text">{lang.WHY_SYNCING}</p>
|
||||||
<a href="{repair_tables_link}" class="btn btn-secondary">{lang.SUBMIT}</a>
|
<a href="{repair_tables_link}" class="btn btn-secondary">{lang.SUBMIT}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="card card-primary card-inverse">
|
<div class="card card-primary card-inverse">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="card-title">{lang.ADVICE_CRON_LINK}:</h4>
|
<h5 class="card-title">{lang.ADVICE_CRON_LINK}:</h5>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<input class="form-control" value="{queue_cron_job_url}" readonly="readonly" />
|
<input class="form-control" value="{queue_cron_job_url}" readonly="readonly" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,61 +2,61 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.R_REPORTS}</li>
|
<li class="breadcrumb-item active">{lang.R_REPORTS}</li>
|
||||||
<IF NAME="current_smt == show_h24"><li class="breadcrumb-item active"> {lang.SHOW_FROM_24H}</li></IF>
|
<IF NAME="current_smt == 'show_h24'"><li class="breadcrumb-item active"> {lang.SHOW_FROM_24H}</li></IF>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="no_results">
|
<IF NAME="no_results">
|
||||||
<div class="alert alert-info">{lang.MESSAGE_NONE}</div>
|
<div class="alert alert-info">{lang.MESSAGE_NONE}</div>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form method="post" name="reportform" action="{action}" id="reports_form">
|
<form method="post" name="reportform" action="{action}" id="reports_form">
|
||||||
|
|
||||||
|
|
||||||
<div id="accordion" role="tablist" aria-multiselectable="true">
|
<div id="accordion" role="tablist" aria-multiselectable="true">
|
||||||
|
|
||||||
<LOOP NAME="arr">
|
<LOOP NAME="arr">
|
||||||
<div class="card mb-1" id="su[{{id}}]">
|
<div class="card mb-1" id="su[{{id}}]">
|
||||||
<div class="card-header" role="tab" id="heading{{id}}">
|
<div class="card-header" role="tab" id="heading{{id}}">
|
||||||
|
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
<input type="checkbox" class="custom-checkbox" name="del_{{id}}" value="{{id}}" onclick="change_color(this,'su[{{id}}]', 'bg-warning card', 'card');" rel="_del" />
|
<input type="checkbox" class="custom-checkbox" name="del_{{id}}" value="{{id}}" onclick="change_color(this,'su[{{id}}]', 'bg-warning card', 'card');" rel="_del" />
|
||||||
|
|
||||||
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{id}}" aria-expanded="false" aria-controls="collapse{{id}}">
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{id}}" aria-expanded="false" aria-controls="collapse{{id}}">
|
||||||
{{name}}
|
{{name}}
|
||||||
<IF LOOP="sent"><i class="fa fa-reply" title="{lang.IS_SEND_MAIL}" data-toggle="tooltip"></i></IF>
|
<IF LOOP="sent"><i class="fa fa-reply" title="{lang.IS_SEND_MAIL}" data-toggle="tooltip"></i></IF>
|
||||||
</a>
|
</a>
|
||||||
<small class="pull-(lang.DIR==ltr?right:left)">{{human_time}}</small>
|
<small class="pull-(lang.DIR==ltr?right:left)">{{human_time}}</small>
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="collapse{{id}}" class="collapse" role="tabpanel" aria-labelledby="heading{{id}}">
|
<div id="collapse{{id}}" class="collapse" role="tabpanel" aria-labelledby="heading{{id}}">
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{text}}
|
{{text}}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
____<br>
|
____<br>
|
||||||
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
||||||
<span class="text-muted">{lang.IP}:</span> <a href="{{ip_finder}}" target="_blank">{{ip}}</a><br>
|
<span class="text-muted">{lang.IP}:</span> <a href="{{ip_finder}}" target="_blank">{{ip}}</a><br>
|
||||||
<span class="text-muted">{lang.TIME}:</span> {{time}}<br>
|
<span class="text-muted">{lang.TIME}:</span> {{time}}<br>
|
||||||
<span class="text-muted">{lang.URL}:</span> <a target="_blank" href="{{url}}">{lang.CLICKHERE}<a/><br>
|
<span class="text-muted">{lang.URL}:</span> <a target="_blank" href="{{url}}">{lang.CLICKHERE}<a/><br>
|
||||||
<IF LOOP="mail">
|
<IF LOOP="mail">
|
||||||
<hr>
|
<hr>
|
||||||
<a class="btn btn-primary" data-toggle="modal" data-target="#contactForm{{id}}" href="#">
|
<a class="btn btn-primary" data-toggle="modal" data-target="#contactForm{{id}}" href="#">
|
||||||
{lang.REPLY_REPORT}
|
{lang.REPLY_REPORT}
|
||||||
</a>
|
</a>
|
||||||
</IF>
|
</IF>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between">
|
||||||
<div class="col col-md-auto">[ <a href="javascript:void(0);" onclick="checkAll(document.reportform, '_del', 'su', 'card bg-warning mb-1', 'card mb-1');">{lang.CHECK_ALL}</a> ]</div>
|
<div class="col col-md-auto">[ <a href="javascript:void(0);" onclick="checkAll(document.reportform, '_del', 'su', 'card bg-warning mb-1', 'card mb-1');">{lang.CHECK_ALL}</a> ]</div>
|
||||||
<div class="col col-md-auto"><input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" /></div>
|
<div class="col col-md-auto"><input type="submit" class="btn btn-outline-primary" name="submit" value="{lang.DEL_SELECTED}" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -78,42 +78,42 @@
|
|||||||
|
|
||||||
<!-- contact form modals -->
|
<!-- contact form modals -->
|
||||||
<LOOP NAME="arr">
|
<LOOP NAME="arr">
|
||||||
<div class="modal" id="contactForm{{id}}">
|
<div class="modal" id="contactForm{{id}}">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form method="post" action="{action}" id="send_form" role="form">
|
<form method="post" action="{action}" id="send_form" role="form">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">{lang.REPLY_REPORT}</h5>
|
<h5 class="modal-title">{lang.REPLY_REPORT}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
{{text}}
|
{{text}}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
____<br>
|
____<br>
|
||||||
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
<IF LOOP="mail"><span class="text-muted">{lang.EMAIL}:</span> {{mail}}<br></IF>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<textarea name="v_{{id}}" cols="80" class="form-control" rows="3" placeholder="{lang.TEXT}"></textarea>
|
<textarea name="v_{{id}}" cols="80" class="form-control" rows="3" placeholder="{lang.TEXT}"></textarea>
|
||||||
<input type="hidden" name="reply_submit" value="1">
|
<input type="hidden" name="reply_submit" value="1">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" name="reply_submit" class="btn btn-primary btn-sm"><span>{lang.REPLY}</span></button>
|
<button type="submit" name="reply_submit" class="btn btn-primary btn-sm"><span>{lang.REPLY}</span></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</LOOP>
|
</LOOP>
|
||||||
|
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
<IF NAME="there_queue">
|
<IF NAME="there_queue">
|
||||||
<br><hr>
|
<br><hr>
|
||||||
<div class="alert alert-info">{lang.DELETE_PROCESS_IN_WORK}</div>
|
<div class="alert alert-info">{lang.DELETE_PROCESS_IN_WORK}</div>
|
||||||
</IF>
|
</IF>
|
||||||
|
|||||||
@@ -19,37 +19,37 @@ function check_search_files_form(form) {
|
|||||||
do_it = true;
|
do_it = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!do_it)
|
if(!do_it)
|
||||||
{
|
{
|
||||||
alert("{lang.NO_SEARCH_WORD}");
|
alert("{lang.NO_SEARCH_WORD}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function check_search_users_form(form)
|
function check_search_users_form(form)
|
||||||
{
|
{
|
||||||
var do_it = false;
|
var do_it = false;
|
||||||
if(form.username.value != '') {
|
if(form.username.value != '') {
|
||||||
do_it = true;
|
do_it = true;
|
||||||
}else if(form.username.value != '') {
|
}else if(form.username.value != '') {
|
||||||
do_it = true;
|
do_it = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!do_it)
|
if(!do_it)
|
||||||
{
|
{
|
||||||
alert("{lang.NO_SEARCH_WORD}");
|
alert("{lang.NO_SEARCH_WORD}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<IF NAME="current_smt==files">
|
<IF NAME="current_smt==files">
|
||||||
|
|
||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.SEARCH_FILES}</li>
|
<li class="breadcrumb-item active">{lang.SEARCH_FILES}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<form method="post" action="{action}" onsubmit="return check_search_files_form(this);" id="adv_search">
|
<form method="post" action="{action}" onsubmit="return check_search_files_form(this);" id="adv_search">
|
||||||
@@ -128,7 +128,7 @@ function check_search_users_form(form)
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<input type="submit" name="search_file" value="{lang.SEARCH_SUBMIT}" class="btn btn-primary btn-lg"/>
|
<input type="submit" name="search_file" value="{lang.SEARCH_SUBMIT}" class="btn btn-primary btn-lg"/>
|
||||||
|
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
@@ -141,14 +141,14 @@ function check_search_users_form(form)
|
|||||||
<!-- start users search -->
|
<!-- start users search -->
|
||||||
<IF NAME="default_user_system">
|
<IF NAME="default_user_system">
|
||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.SEARCH_USERS}</li>
|
<li class="breadcrumb-item active">{lang.SEARCH_USERS}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<form method="post" action="{action}" onsubmit="return check_search_users_form(this);" id="user_search">
|
<form method="post" action="{action}" onsubmit="return check_search_users_form(this);" id="user_search">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="username">{lang.USERNAME}</label>
|
<label for="username">{lang.USERNAME}</label>
|
||||||
|
|||||||
@@ -3,21 +3,24 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function toggleStartBox(name, hide, current) {
|
function toggleStartBox(name, hide, current) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: './?cp=r_repair&case=toggle_start_box&toggle=' + hide + '&_ajax_=1&name=' + name + '&{GET_FORM_KEY}',
|
url: './?cp=r_repair&case=toggle_start_box&toggle=' + hide + '&_ajax_=1&name=' + name + '&{GET_FORM_KEY}',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
cache: false})
|
cache: false})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
if(data.content){
|
if(data.content){
|
||||||
$('#boxesErrors>span').html(data.content);
|
$('#boxesErrors>span').html(data.content);
|
||||||
$('#boxesErrors').removeClass('d-none alert-danger').addClass('alert-info');
|
$('#boxesErrors').removeClass('d-none alert-danger').addClass('alert-info');
|
||||||
$('#'+name).css('display', hide ? 'none' : 'block');
|
$('#'+name).css('display', hide ? 'none' : 'block');
|
||||||
} else {
|
} else {
|
||||||
this.fail();
|
this.fail();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.fail(function(data) {
|
.fail(function(data) {
|
||||||
$('#boxesErrors>span').html((data.content ? data.content : (data.responseJSON ? data.responseJSON.content : '{lang.ERROR_TRY_AGAIN}')));
|
var tryAgainMsg = '{lang.ERROR_TRY_AGAIN}';
|
||||||
|
$('#boxesErrors>span').html(
|
||||||
|
<IGNORE>(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : tryAgainMsg))</IGNORE>
|
||||||
|
);
|
||||||
$('#boxesErrors').removeClass('d-none alert-info').addClass('alert-danger');
|
$('#boxesErrors').removeClass('d-none alert-info').addClass('alert-danger');
|
||||||
var itemRemoveClass = current == 1 ? 'cb-disable' : 'cb-enable';
|
var itemRemoveClass = current == 1 ? 'cb-disable' : 'cb-enable';
|
||||||
var itemAddClass = current == 0 ? 'cb-disable' : 'cb-enable';
|
var itemAddClass = current == 0 ? 'cb-disable' : 'cb-enable';
|
||||||
@@ -31,69 +34,69 @@ function toggleStartBox(name, hide, current) {
|
|||||||
|
|
||||||
<!-- hello message -->
|
<!-- hello message -->
|
||||||
<ol class="breadcrumb d-flex">
|
<ol class="breadcrumb d-flex">
|
||||||
<li class="breadcrumb-item active">{usernamelang}</li>
|
<li class="breadcrumb-item active">{usernamelang}</li>
|
||||||
<li class="ml-auto p-0">
|
<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}">
|
<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>
|
<i class="fa fa-fw fa-gears"></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="modal" tabindex="-1" role="dialog" id="customizationModal">
|
<div class="modal" tabindex="-1" role="dialog" id="customizationModal">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title">{lang.CUSTOMIZATION} - {lang.R_CPINDEX}</h5>
|
<h5 class="modal-title">{lang.CUSTOMIZATION} - {lang.R_CPINDEX}</h5>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="alert alert-info alert-dismissible m-3 p-0 text-center small d-none" id="boxesErrors">
|
<div class="alert alert-info alert-dismissible m-3 p-0 text-center small d-none" id="boxesErrors">
|
||||||
<span>...</span>
|
<span>...</span>
|
||||||
<button type="button" class="close py-0" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="close py-0" data-dismiss="alert" aria-label="Close">
|
||||||
<span aria-hidden="true" class="small" style="cursor:pointer">×</span>
|
<span aria-hidden="true" class="small" style="cursor:pointer">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<LOOP NAME="startBoxes">
|
<LOOP NAME="startBoxes">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div>{{title}}</div>
|
<div>{{title}}</div>
|
||||||
<div class="field switch" id="start_box_{%key%}">
|
<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%}', 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>
|
<label onclick="toggleStartBox('{%key%}', 1, {{hidden}})" class="cb-disable<IF LOOP="hidden==1"> selected</IF>"><span>{lang.HIDE}</span></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="ADM_NOTIFICATIONS">
|
<IF NAME="ADM_NOTIFICATIONS">
|
||||||
<!-- notifications -->
|
<!-- notifications -->
|
||||||
<div class="card mb-3" id="notifications" style="display:(startBoxes.notifications.hidden?none:)">
|
<div class="card mb-3" id="notifications" style="display:(startBoxes.notifications.hidden?none:)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-bell-o"></i> {lang.NOTIFICATIONS}
|
<i class="fa fa-bell-o"></i> {lang.NOTIFICATIONS}
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group list-group-flush small">
|
<div class="list-group list-group-flush small">
|
||||||
<LOOP NAME="ADM_NOTIFICATIONS">
|
<LOOP NAME="ADM_NOTIFICATIONS">
|
||||||
<div class="list-group-item list-group-item-action">
|
<div class="list-group-item list-group-item-action">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<IF LOOP="msg_type==error">
|
<IF LOOP="msg_type==error">
|
||||||
<span class="d-flex mr-3 rounded-circle fa fa fa-warning" style="font-size: 30px;"></span>
|
<span class="d-flex mr-3 rounded-circle fa fa fa-warning" style="font-size: 30px;"></span>
|
||||||
<ELSEIF LOOP="msg_type==info">
|
<ELSEIF LOOP="msg_type==info">
|
||||||
<span class="d-flex mr-3 rounded-circle fa fa-info-circle" style="font-size: 30px;"></span>
|
<span class="d-flex mr-3 rounded-circle fa fa-info-circle" style="font-size: 30px;"></span>
|
||||||
</IF>
|
</IF>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<strong>{{title}}</strong> <br>
|
<strong>{{title}}</strong> <br>
|
||||||
{{msg}}
|
{{msg}}
|
||||||
<!--<div class="text-muted smaller">Today at 5:43 PM - 5m ago</div>-->
|
<!--<div class="text-muted smaller">Today at 5:43 PM - 5m ago</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end notifications -->
|
<!-- end notifications -->
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
@@ -101,171 +104,171 @@ function toggleStartBox(name, hide, current) {
|
|||||||
|
|
||||||
<!-- stats boxes -->
|
<!-- stats boxes -->
|
||||||
<div class="card mb-3" id="statsBoxes" style="display:(startBoxes.statsBoxes.hidden?none:)">
|
<div class="card mb-3" id="statsBoxes" style="display:(startBoxes.statsBoxes.hidden?none:)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-bar-chart"></i> {lang.STATS_BOXES}
|
<i class="fa fa-bar-chart"></i> {lang.STATS_BOXES}
|
||||||
</div>
|
</div>
|
||||||
<div class="row p-1">
|
<div class="row p-1">
|
||||||
<div class="col-xl-3 col-sm-6 mb-3">
|
<div class="col-xl-3 col-sm-6 mb-3">
|
||||||
<div class="card text-white bg-primary o-hidden h-100">
|
<div class="card text-white bg-primary o-hidden h-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-body-icon">
|
<div class="card-body-icon">
|
||||||
<i class="fa fa-fw fa-comments"></i>
|
<i class="fa fa-fw fa-comments"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-5">
|
<div class="mr-5">
|
||||||
{kbubbles.calls} {lang.R_CALLS}
|
{kbubbles.calls} {lang.R_CALLS}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="./?cp=e_calls" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=e_calls" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.VIEW}</span>
|
<span class="float-left">{lang.VIEW}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="./?cp=e_calls&smt=show_h24" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=e_calls&smt=show_h24" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.SHOW_FROM_24H}</span>
|
<span class="float-left">{lang.SHOW_FROM_24H}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-3 col-sm-6 mb-3">
|
<div class="col-xl-3 col-sm-6 mb-3">
|
||||||
<div class="card text-white bg-success o-hidden h-100">
|
<div class="card text-white bg-success o-hidden h-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-body-icon">
|
<div class="card-body-icon">
|
||||||
<i class="fa fa-fw fa-flag"></i>
|
<i class="fa fa-fw fa-flag"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-5">
|
<div class="mr-5">
|
||||||
{kbubbles.reports} {lang.R_REPORTS}
|
{kbubbles.reports} {lang.R_REPORTS}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="./?cp=f_reports" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=f_reports" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.VIEW}</span>
|
<span class="float-left">{lang.VIEW}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="./?cp=f_reports&smt=show_h24" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=f_reports&smt=show_h24" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.SHOW_FROM_24H}</span>
|
<span class="float-left">{lang.SHOW_FROM_24H}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xl-3 col-sm-6 mb-3">
|
<div class="col-xl-3 col-sm-6 mb-3">
|
||||||
<div class="card text-white bg-danger o-hidden h-100">
|
<div class="card text-white bg-danger o-hidden h-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-body-icon">
|
<div class="card-body-icon">
|
||||||
<i class="fa fa-fw fa-files-o"></i>
|
<i class="fa fa-fw fa-files-o"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-5">
|
<div class="mr-5">
|
||||||
<small>{lang.AFILES_NUM}</small>
|
<small>{lang.AFILES_NUM}</small>
|
||||||
<br>
|
<br>
|
||||||
{files_number} <small>({stat_files} {lang.FILE} + {stat_imgs} {lang.IMAGE})</small>
|
{files_number} <small>({stat_files} {lang.FILE} + {stat_imgs} {lang.IMAGE})</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="./?cp=c_files" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=c_files" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.R_FILES}</span>
|
<span class="float-left">{lang.R_FILES}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="./?cp=d_img_ctrl" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=d_img_ctrl" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.R_IMG_CTRL}</span>
|
<span class="float-left">{lang.R_IMG_CTRL}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xl-3 col-sm-6 mb-3">
|
<div class="col-xl-3 col-sm-6 mb-3">
|
||||||
<div class="card text-white bg-info o-hidden h-100">
|
<div class="card text-white bg-info o-hidden h-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="card-body-icon">
|
<div class="card-body-icon">
|
||||||
<i class="fa fa-fw fa-users"></i>
|
<i class="fa fa-fw fa-users"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-5">
|
<div class="mr-5">
|
||||||
{users_number} {lang.AUSERS_NUM}
|
{users_number} {lang.AUSERS_NUM}
|
||||||
<IF NAME="config.user_system==1">
|
<IF NAME="config.user_system==1">
|
||||||
<br><small>{lang.LAST_REG}: {lst_reg}</small>
|
<br><small>{lang.LAST_REG}: {lst_reg}</small>
|
||||||
</IF>
|
</IF>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="./?cp=g_users" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=g_users" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.R_USERS}</span>
|
<span class="float-left">{lang.R_USERS}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="./?cp=h_search&smt=users" class="card-footer text-white clearfix small z-1">
|
<a href="./?cp=h_search&smt=users" class="card-footer text-white clearfix small z-1">
|
||||||
<span class="float-left">{lang.SEARCH_USERS}</span>
|
<span class="float-left">{lang.SEARCH_USERS}</span>
|
||||||
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
<span class="float-right"><i class="fa fa-angle-right"></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end stats boxes -->
|
<!-- end stats boxes -->
|
||||||
|
|
||||||
|
|
||||||
<!-- last visit actions -->
|
<!-- last visit actions -->
|
||||||
<IF NAME="last_visit">
|
<IF NAME="last_visit">
|
||||||
<div class="card mb-3" id="lastVisitActions" style="display:(startBoxes.lastVisitActions.hidden?none:)">
|
<div class="card mb-3" id="lastVisitActions" style="display:(startBoxes.lastVisitActions.hidden?none:)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
{lang.LAST_VISIT} ({last_visit})
|
{lang.LAST_VISIT} ({last_visit})
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.FLS_LST_VST_SEARCH}:</h3>
|
<h3 class="card-title">{lang.FLS_LST_VST_SEARCH}:</h3>
|
||||||
|
|
||||||
<IF NAME="files_last_visit"><a href="{h_lst_files}{files_last_visit}" class="btn btn-primary">{lang.LAST_VIEW}</a> {lang.OR} </IF>
|
<IF NAME="files_last_visit"><a href="{h_lst_files}{files_last_visit}" class="btn btn-primary">{lang.LAST_VIEW}</a> {lang.OR} </IF>
|
||||||
<select class="show_since_time custom-select" tabindex="3" onchange="javascript:get_kleeja_link('{h_lst_files}' + (Math.round((new Date()).getTime() / 1000) - $(this).val()), '#content');">">
|
<select class="show_since_time custom-select" tabindex="3" onchange="javascript:get_kleeja_link('{h_lst_files}' + (Math.round((new Date()).getTime() / 1000) - $(this).val()), '#content');">">
|
||||||
<option>{lang.TIME}...</option>
|
<option>{lang.TIME}...</option>
|
||||||
<option value="3600">{lang.HOUR}</option>
|
<option value="3600">{lang.HOUR}</option>
|
||||||
<option value="18000">{lang.5HOURS}</option>
|
<option value="18000">{lang.5HOURS}</option>
|
||||||
<option value="864000">{lang.DAY}</option>
|
<option value="864000">{lang.DAY}</option>
|
||||||
<option value="6048000">{lang.WEEK}</option>
|
<option value="6048000">{lang.WEEK}</option>
|
||||||
<option value="25920000">{lang.MONTH}</option>
|
<option value="25920000">{lang.MONTH}</option>
|
||||||
<option value="31536000">{lang.YEAR}</option>
|
<option value="31536000">{lang.YEAR}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h3 class="card-title">{lang.IMG_LST_VST_SEARCH}:</h3>
|
<h3 class="card-title">{lang.IMG_LST_VST_SEARCH}:</h3>
|
||||||
|
|
||||||
<IF NAME="image_last_visit"><a href="{h_lst_imgs}{image_last_visit}" class="btn btn-primary">{lang.LAST_VIEW}</a> {lang.OR} </IF>
|
<IF NAME="image_last_visit"><a href="{h_lst_imgs}{image_last_visit}" class="btn btn-primary">{lang.LAST_VIEW}</a> {lang.OR} </IF>
|
||||||
|
|
||||||
<select class="show_since_time custom-select" tabindex="3" onchange="javascript:get_kleeja_link('{h_lst_imgs}' + (Math.round((new Date()).getTime() / 1000) - $(this).val()), '#content');">">
|
<select class="show_since_time custom-select" tabindex="3" onchange="javascript:get_kleeja_link('{h_lst_imgs}' + (Math.round((new Date()).getTime() / 1000) - $(this).val()), '#content');">">
|
||||||
<option>{lang.TIME}...</option>
|
<option>{lang.TIME}...</option>
|
||||||
<option value="3600">{lang.HOUR}</option>
|
<option value="3600">{lang.HOUR}</option>
|
||||||
<option value="18000">{lang.5HOURS}</option>
|
<option value="18000">{lang.5HOURS}</option>
|
||||||
<option value="864000">{lang.DAY}</option>
|
<option value="864000">{lang.DAY}</option>
|
||||||
<option value="6048000">{lang.WEEK}</option>
|
<option value="6048000">{lang.WEEK}</option>
|
||||||
<option value="25920000">{lang.MONTH}</option>
|
<option value="25920000">{lang.MONTH}</option>
|
||||||
<option value="31536000">{lang.YEAR}</option>
|
<option value="31536000">{lang.YEAR}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</IF>
|
</IF>
|
||||||
<!-- end last visit actions -->
|
<!-- end last visit actions -->
|
||||||
|
|
||||||
<!-- stats_chart -->
|
<!-- stats_chart -->
|
||||||
<IF NAME="stats_chart">
|
<IF NAME="stats_chart">
|
||||||
<div class="card mb-3" id="statsChart" style="display:(startBoxes.statsChart.hidden?none:)">
|
<div class="card mb-3" id="statsChart" style="display:(startBoxes.statsChart.hidden?none:)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<i class="fa fa-area-chart"></i> {lang.STATS}
|
<i class="fa fa-area-chart"></i> {lang.STATS}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div id="chart_stats"></div>
|
<div id="chart_stats"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{stats_chart}
|
{stats_chart}
|
||||||
</script>
|
</script>
|
||||||
</IF>
|
</IF>
|
||||||
<!-- end stats_chart -->
|
<!-- end stats_chart -->
|
||||||
@@ -273,55 +276,55 @@ function toggleStartBox(name, hide, current) {
|
|||||||
|
|
||||||
<!-- hurry hurry actions -->
|
<!-- hurry hurry actions -->
|
||||||
<div class="card mb-3" id="hurryActions" style="display:(startBoxes.hurryActions.hidden?none:)">
|
<div class="card mb-3" id="hurryActions" style="display:(startBoxes.hurryActions.hidden?none:)">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
{lang.HURRY_HURRY}
|
{lang.HURRY_HURRY}
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-lg-flex justify-content-between">
|
<li class="list-group-item d-lg-flex justify-content-between">
|
||||||
{lang.LANGUAGE}
|
{lang.LANGUAGE}
|
||||||
<div>
|
<div>
|
||||||
<select name="lang_change" class="custom-select" id="lang_change">
|
<select name="lang_change" class="custom-select" id="lang_change">
|
||||||
{hurry_langs_list}
|
{hurry_langs_list}
|
||||||
</select>
|
</select>
|
||||||
{lang.FOR}
|
{lang.FOR}
|
||||||
<select name="groups_list" class="custom-select" id="groups_list">
|
<select name="groups_list" class="custom-select" id="groups_list">
|
||||||
{hurry_groups_list}
|
{hurry_groups_list}
|
||||||
</select>
|
</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>
|
<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>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-lg-flex justify-content-between">
|
<li class="list-group-item d-lg-flex justify-content-between">
|
||||||
{lang.R_REPAIR}
|
{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>
|
<button class="btn btn-outline-primary" onclick="javascript:get_kleeja_link('{del_cache_link}'); return false;"><span>{lang.DEL_CACHE}</span></button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- hurry hurry actions -->
|
<!-- hurry hurry actions -->
|
||||||
|
|
||||||
|
|
||||||
<!-- extra stats -->
|
<!-- extra stats -->
|
||||||
<div class="card" id="extraStats" style="display:(startBoxes.extraStats.hidden?none:)">
|
<div class="card" id="extraStats" style="display:(startBoxes.extraStats.hidden?none:)">
|
||||||
<div class="card-header">{lang.OTHER_INFO}</div>
|
<div class="card-header">{lang.OTHER_INFO}</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.LSTDELST}
|
{lang.LSTDELST}
|
||||||
<span>{last_del_fles}</span>
|
<span>{last_del_fles}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
{lang.AFILES_SIZE_SPACE}
|
{lang.AFILES_SIZE_SPACE}
|
||||||
<br>
|
<br>
|
||||||
<div class="progress" style="width: 100%">
|
<div class="progress" style="width: 100%">
|
||||||
<div class="progress-bar" role="progressbar" aria-valuenow="{per1}" aria-valuemin="0" aria-valuemax="100">{per1}%</div>
|
<div class="progress-bar" role="progressbar" aria-valuenow="{per1}" aria-valuemin="0" aria-valuemax="100">{per1}%</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.KLEEJA_VERSION}
|
{lang.KLEEJA_VERSION}
|
||||||
<span>{kleeja_version}</span>
|
<span>{kleeja_version}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- end extra stats -->
|
<!-- end extra stats -->
|
||||||
|
|
||||||
@@ -329,155 +332,155 @@ function toggleStartBox(name, hide, current) {
|
|||||||
|
|
||||||
<ELSEIF NAME="current_smt == other">
|
<ELSEIF NAME="current_smt == other">
|
||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.OTHER_INFO}</li>
|
<li class="breadcrumb-item active">{lang.OTHER_INFO}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.PHP_VER}
|
{lang.PHP_VER}
|
||||||
<span>{php_version}</span>
|
<span>{php_version}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.MYSQL_VER}
|
{lang.MYSQL_VER}
|
||||||
|
|
||||||
<span>{mysql_version}</span>
|
<span>{mysql_version}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.KLEEJA_VERSION}
|
{lang.KLEEJA_VERSION}
|
||||||
<span>{kleeja_version}</span>
|
<span>{kleeja_version}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
max_execution_time
|
max_execution_time
|
||||||
<span>{max_execution_time}</span>
|
<span>{max_execution_time}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
upload_max_filesize
|
upload_max_filesize
|
||||||
<span>{upload_max_filesize}</span>
|
<span>{upload_max_filesize}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
post_max_size
|
post_max_size
|
||||||
<span>{post_max_size}</span>
|
<span>{post_max_size}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
memory_limit
|
memory_limit
|
||||||
<span>{memory_limit}</span>
|
<span>{memory_limit}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
<!-- search engines stats -->
|
<!-- search engines stats -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
{lang.SEARCH_STAT} / <b>Google</b>
|
{lang.SEARCH_STAT} / <b>Google</b>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.LAST_GOOGLE}
|
{lang.LAST_GOOGLE}
|
||||||
<span>{s_last_google}</span>
|
<span>{s_last_google}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.GOOGLE_NUM}
|
{lang.GOOGLE_NUM}
|
||||||
<span>{s_google_num}</span>
|
<span>{s_google_num}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
{lang.SEARCH_STAT} / <b>Bing</b>
|
{lang.SEARCH_STAT} / <b>Bing</b>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.LAST_BING}
|
{lang.LAST_BING}
|
||||||
<span>{s_last_bing}</span>
|
<span>{s_last_bing}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
{lang.BING_NUM}
|
{lang.BING_NUM}
|
||||||
<span>{s_bing_num}</span>
|
<span>{s_bing_num}</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- end search engines stats -->
|
<!-- end search engines stats -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ELSEIF NAME="current_smt == team">
|
<ELSEIF NAME="current_smt == team">
|
||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item active">{lang.KLEEJA_TEAM}</li>
|
<li class="breadcrumb-item active">{lang.KLEEJA_TEAM}</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<ul class="list-group" id="gtresults">
|
<ul class="list-group" id="gtresults">
|
||||||
<li class="list-group-item list-group-item-action d-flex justify-content-between" style="display: none !important" id="ghTemplate">
|
<li class="list-group-item list-group-item-action d-flex justify-content-between" style="display: none !important" id="ghTemplate">
|
||||||
<div class="d-flex w-40 justify-content-between">
|
<div class="d-flex w-40 justify-content-between">
|
||||||
<img src="%avatarUrl%" alt="" class="img-thumbnail mx-2 rounded" style="width: 48px; height: 48px"> <a href="%htmlUrl%" target="_tab"><h5 class="mb-1">%login%</h5></a>
|
<img src="%avatarUrl%" alt="" class="img-thumbnail mx-2 rounded" style="width: 48px; height: 48px"> <a href="%htmlUrl%" target="_tab"><h5 class="mb-1">%login%</h5></a>
|
||||||
</div>
|
</div>
|
||||||
<small><a href="https://github.com/awssat/kleeja/graphs/contributors" target="_blank">%contributions% <i class="fa fa-fw fa-code"></i></a></small>
|
<small><a href="https://github.com/awssat/kleeja/graphs/contributors" target="_blank">%contributions% <i class="fa fa-fw fa-code"></i></a></small>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="translator_copyrights">
|
<IF NAME="translator_copyrights">
|
||||||
<hr>
|
<hr>
|
||||||
<small>{translator_copyrights}</small>
|
<small>{translator_copyrights}</small>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<p style="direction: ltr">
|
<p style="direction: ltr">
|
||||||
<small>You can support Kleeja by reporting or fixing a bug, designing a style, building a plugin (see <a href="https://github.com/awssat/kleeja" target="_tab">github.com/awssat/kleeja</a>)</small>
|
<small>You can support Kleeja by reporting or fixing a bug, designing a style, building a plugin (see <a href="https://github.com/awssat/kleeja" target="_tab">github.com/awssat/kleeja</a>)</small>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="text-muted text-center">Kleeja proudly made in Buraydah City <br> ❤ Trusted since 2007 <br><small>{kleeja_version}</small></div>
|
<div class="text-muted text-center">Kleeja proudly made in Buraydah City <br> ❤ Trusted since 2007 <br><small>{kleeja_version}</small></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://api.github.com/repos/awssat/kleeja/contributors",
|
url: "https://api.github.com/repos/awssat/kleeja/contributors",
|
||||||
dataType: 'json'})
|
dataType: 'json'})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
var template = $('#ghTemplate')[0].outerHTML;
|
var template = $('#ghTemplate')[0].outerHTML;
|
||||||
$.each(data, function (i, item) {
|
$.each(data, function (i, item) {
|
||||||
$("#gtresults").append(template.replace('%id%', item['id']).replace('%login%', item['login']).replace(
|
$("#gtresults").append(template.replace('%id%', item['id']).replace('%login%', item['login']).replace(
|
||||||
'ghTemplate',
|
'ghTemplate',
|
||||||
'gt' + item['id']).replace('%avatarUrl%', item['avatar_url']).replace('%contributions%', item[
|
'gt' + item['id']).replace('%avatarUrl%', item['avatar_url']).replace('%contributions%', item[
|
||||||
'contributions']).replace('%htmlUrl%', item['html_url']));
|
'contributions']).replace('%htmlUrl%', item['html_url']));
|
||||||
$('#gt' + item['id']).removeAttr('style');
|
$('#gt' + item['id']).removeAttr('style');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, 400);
|
}, 400);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ELSEIF NAME="current_smt == kj_tweets">
|
<ELSEIF NAME="current_smt == kj_tweets">
|
||||||
|
|
||||||
<a style="margin: 5px;" class="twitter-timeline" data-lang="en" data-dnt="true" data-theme="light" data-link-color="#E95F28" href="https://twitter.com/kleeja?ref_src=twsrc%5Etfw">Tweets by kleeja</a>
|
<a style="margin: 5px;" class="twitter-timeline" data-lang="en" data-dnt="true" data-theme="light" data-link-color="#E95F28" href="https://twitter.com/kleeja?ref_src=twsrc%5Etfw">Tweets by kleeja</a>
|
||||||
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
||||||
|
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
<!-- Breadcrumbs -->
|
<!-- Breadcrumbs -->
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
<li class="breadcrumb-item"><a href="./">{lang.R_CPINDEX}</a></li>
|
||||||
<li class="breadcrumb-item">{lang.R_STYLES}</li>
|
<li class="breadcrumb-item">{lang.R_STYLES}</li>
|
||||||
|
|
||||||
<li class="float-right">
|
<li class="float-right">
|
||||||
<a class="btn btn-primary btn-sm" href="#" data-toggle="modal" data-target="#style_add_new">
|
<a class="btn btn-primary btn-sm" href="#" data-toggle="modal" data-target="#style_add_new">
|
||||||
<i class="fa fa-upload"></i> {lang.UPLOAD_LOCAL_PC}
|
<i class="fa fa-upload"></i> {lang.UPLOAD_LOCAL_PC}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<ul class="nav nav-tabs mb-3">
|
<ul class="nav nav-tabs mb-3">
|
||||||
@@ -26,25 +26,25 @@
|
|||||||
|
|
||||||
<IF NAME="case == local">
|
<IF NAME="case == local">
|
||||||
<ul class="list-unstyled list-group">
|
<ul class="list-unstyled list-group">
|
||||||
<LOOP NAME="available_styles">
|
<LOOP NAME="available_styles">
|
||||||
<li class="media justify-content-between d-lg-flex list-group-item">
|
<li class="media justify-content-between d-lg-flex list-group-item">
|
||||||
<img class="mr-3" src="{{icon}}" alt="{{name}}" style="width: 250px">
|
<img class="mr-3" src="{{icon}}" alt="{{name}}" style="width: 250px">
|
||||||
<div class="media-body col-xs-12" style="padding: 10px">
|
<div class="media-body col-xs-12" style="padding: 10px">
|
||||||
<h5 class="mt-0 mb-1">{{info.name}} <small class="text-muted">{{info.version}}</small> </h5>
|
<h5 class="mt-0 mb-1">{{info.name}} <small class="text-muted">{{info.version}}</small> </h5>
|
||||||
|
|
||||||
<p>{{info.desc}}</p>
|
<p>{{info.desc}}</p>
|
||||||
<p class="text-muted">{{info.copyright}}</p>
|
<p class="text-muted">{{info.copyright}}</p>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<IF LOOP="is_default">
|
<IF LOOP="is_default">
|
||||||
<span class="badge badge-pill badge-dark"><i class="fa fa-certificate text-warning" title="{lang.STYLE_IS_DEFAULT}"></i> {lang.STYLE_IS_DEFAULT}</span>
|
<span class="badge badge-pill badge-dark"><i class="fa fa-certificate text-warning" title="{lang.STYLE_IS_DEFAULT}"></i> {lang.STYLE_IS_DEFAULT}</span>
|
||||||
<ELSE>
|
<ELSE>
|
||||||
<a href="{style_select_link}{{name}}" class="btn btn-primary" title="{lang.MAKE_AS_DEFAULT}"><i class="fa fa-check-square-o" title="{lang.MAKE_AS_DEFAULT}"></i> {lang.MAKE_AS_DEFAULT}</a>
|
<a href="{style_select_link}{{name}}" class="btn btn-primary" title="{lang.MAKE_AS_DEFAULT}"><i class="fa fa-check-square-o" title="{lang.MAKE_AS_DEFAULT}"></i> {lang.MAKE_AS_DEFAULT}</a>
|
||||||
<a href="{style_delete_link}{{name}}" onclick="javascript:return confirm_form();" class="btn btn-danger" title="{lang.DELETE}"><i class="fa fa-trash" title="{lang.DELETE}"></i> {lang.DELETE}</a>
|
<a href="{style_delete_link}{{name}}" onclick="javascript:return confirm_form();" class="btn btn-danger" title="{lang.DELETE}"><i class="fa fa-trash" title="{lang.DELETE}"></i> {lang.DELETE}</a>
|
||||||
</IF>
|
</IF>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- ...... -->
|
<!-- ...... -->
|
||||||
@@ -159,9 +159,10 @@ function downloadStyle(name, nextStyles) {
|
|||||||
}, 500);
|
}, 500);
|
||||||
})
|
})
|
||||||
.fail(function(data) {
|
.fail(function(data) {
|
||||||
|
var tryAgainMsg = '{lang.ERROR_TRY_AGAIN}';
|
||||||
$('#downloadBtn-' + name).prop('disabled', false);
|
$('#downloadBtn-' + name).prop('disabled', false);
|
||||||
$('#installLoading-'+name).removeClass('badge-light').addClass('badge-danger').html(
|
$('#installLoading-'+name).removeClass('badge-light').addClass('badge-danger').html(
|
||||||
(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : '{lang.ERROR_TRY_AGAIN}'))
|
<IGNORE>(data.content ? data.content : (data.responseJSON ? data.responseJSON.content : tryAgainMsg))</IGNORE>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -12,16 +12,16 @@
|
|||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
define('IN_KLEEJA', true);
|
define('IN_KLEEJA', true);
|
||||||
define ('PATH', '../');
|
define('PATH', '../');
|
||||||
define ('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
require_once PATH . 'includes/common.php';
|
require_once PATH . 'includes/common.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$go_to = ig('cp') ? g('cp') : 'start';
|
$go_to = ig('cp') ? g('cp') : 'start';
|
||||||
$username = $usrcp->name();
|
$username = $usrcp->name();
|
||||||
$AJAX_ACP = defined('AJAX_ACP');
|
$AJAX_ACP = defined('AJAX_ACP');
|
||||||
$config['enable_captcha'] = ! defined('STOP_CAPTCHA');
|
$config['enable_captcha'] = ! defined('STOP_CAPTCHA');
|
||||||
|
|
||||||
|
|
||||||
//for security
|
//for security
|
||||||
@@ -38,17 +38,17 @@ get_lang('acp');
|
|||||||
//need to login again
|
//need to login again
|
||||||
//
|
//
|
||||||
if (
|
if (
|
||||||
(empty($_SESSION['ADMINLOGIN']) || $_SESSION['ADMINLOGIN'] != md5(sha1($config['h_key']) . $usrcp->name() . $config['siteurl'])) ||
|
(empty($_SESSION['ADMINLOGIN']) || $_SESSION['ADMINLOGIN'] != md5(sha1($config['h_key']) . $usrcp->name() . $config['siteurl'])) ||
|
||||||
(empty($_SESSION['USER_SESS']) || $_SESSION['USER_SESS'] != session_id()) ||
|
(empty($_SESSION['USER_SESS']) || $_SESSION['USER_SESS'] != KJ_SESSION) ||
|
||||||
(empty($_SESSION['ADMINLOGIN_T']) || $_SESSION['ADMINLOGIN_T'] < time())
|
(empty($_SESSION['ADMINLOGIN_T']) || $_SESSION['ADMINLOGIN_T'] < time())
|
||||||
) {
|
) {
|
||||||
if (ig('go') && g('go') == 'login')
|
if (ig('go') && g('go') == 'login')
|
||||||
{
|
{
|
||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
//login
|
//login
|
||||||
$ERRORS = [];
|
$ERRORS = [];
|
||||||
$pass_field = 'lpass_' . preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . p('kid')));
|
$pass_field = 'lpass_' . preg_replace('/[^0-9]/', '', sha1(KJ_SESSION . sha1($config['h_key']) . p('kid')));
|
||||||
|
|
||||||
|
|
||||||
if (! empty($_SESSION['SHOW_CAPTCHA']))
|
if (! empty($_SESSION['SHOW_CAPTCHA']))
|
||||||
@@ -79,7 +79,7 @@ if (
|
|||||||
{
|
{
|
||||||
if ($f = $usrcp->data(p('lname'), p($pass_field), false, 3600*6, true))
|
if ($f = $usrcp->data(p('lname'), p($pass_field), false, 3600*6, true))
|
||||||
{
|
{
|
||||||
$_SESSION['USER_SESS'] = session_id();
|
$_SESSION['USER_SESS'] = KJ_SESSION;
|
||||||
$_SESSION['ADMINLOGIN'] = md5(sha1($config['h_key']) . $usrcp->name() . $config['siteurl']);
|
$_SESSION['ADMINLOGIN'] = md5(sha1($config['h_key']) . $usrcp->name() . $config['siteurl']);
|
||||||
//to make sure, sometime setting time from functions doesn't work
|
//to make sure, sometime setting time from functions doesn't work
|
||||||
$_SESSION['ADMINLOGIN_T'] = time() + 18000;
|
$_SESSION['ADMINLOGIN_T'] = time() + 18000;
|
||||||
@@ -101,7 +101,7 @@ if (
|
|||||||
//let's see if there is errors
|
//let's see if there is errors
|
||||||
if (sizeof($ERRORS))
|
if (sizeof($ERRORS))
|
||||||
{
|
{
|
||||||
$errs = '';
|
$errs = '';
|
||||||
|
|
||||||
foreach ($ERRORS as $r)
|
foreach ($ERRORS as $r)
|
||||||
{
|
{
|
||||||
@@ -112,11 +112,11 @@ if (
|
|||||||
}
|
}
|
||||||
|
|
||||||
//show template login .
|
//show template login .
|
||||||
$action = './' . basename(ADMIN_PATH) . '?go=login&cp=' . $go_to;
|
$action = './' . basename(ADMIN_PATH) . '?go=login&cp=' . $go_to;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('admin_login');
|
$H_FORM_KEYS = kleeja_add_form_key('admin_login');
|
||||||
$KEY_FOR_WEE = sha1(microtime() . sha1($config['h_key']));
|
$KEY_FOR_WEE = sha1(microtime() . sha1($config['h_key']));
|
||||||
$KEY_FOR_PASS = preg_replace('/[^0-9]/', '', sha1($klj_session . sha1($config['h_key']) . $KEY_FOR_WEE));
|
$KEY_FOR_PASS = preg_replace('/[^0-9]/', '', sha1(KJ_SESSION . sha1($config['h_key']) . $KEY_FOR_WEE));
|
||||||
$not_you = sprintf($lang['USERNAME_NOT_YOU'], '<a href="' . $config['siteurl'] . 'ucp.php?go=logout">', '</a>');
|
$not_you = sprintf($lang['USERNAME_NOT_YOU'], '<a href="' . $config['siteurl'] . 'ucp.php?go=logout">', '</a>');
|
||||||
|
|
||||||
$show_captcha = ! empty($_SESSION['SHOW_CAPTCHA']);
|
$show_captcha = ! empty($_SESSION['SHOW_CAPTCHA']);
|
||||||
|
|
||||||
@@ -191,25 +191,25 @@ else
|
|||||||
|
|
||||||
(! defined('LAST_VISIT')) ? define('LAST_VISIT', time() - 3600 * 12) : null;
|
(! defined('LAST_VISIT')) ? define('LAST_VISIT', time() - 3600 * 12) : null;
|
||||||
//last visit
|
//last visit
|
||||||
$last_visit = defined('LAST_VISIT') && preg_match('/[0-9]{10}/', LAST_VISIT) ? kleeja_date(LAST_VISIT) : false;
|
$last_visit = defined('LAST_VISIT') && preg_match('/[0-9]{10}/', LAST_VISIT) ? kleeja_date(LAST_VISIT) : false;
|
||||||
|
|
||||||
//
|
//
|
||||||
//exceptional
|
//exceptional
|
||||||
//it won't be included in the menu list
|
//it won't be included in the menu list
|
||||||
//
|
//
|
||||||
$ext_expt = [
|
$ext_expt = [
|
||||||
'start',
|
'start',
|
||||||
'b_lgoutcp',
|
'b_lgoutcp',
|
||||||
'i_exts'
|
'i_exts'
|
||||||
];
|
];
|
||||||
|
|
||||||
//confirm message
|
//confirm message
|
||||||
$ext_confirm = [];
|
$ext_confirm = [];
|
||||||
|
|
||||||
|
|
||||||
//formkey extension, CSRF protection
|
//formkey extension, CSRF protection
|
||||||
$GET_FORM_KEY_GLOBAL = kleeja_add_form_key_get('GLOBAL_FORM_KEY');
|
$GET_FORM_KEY_GLOBAL = kleeja_add_form_key_get('GLOBAL_FORM_KEY');
|
||||||
$ext_formkey = [];
|
$ext_formkey = [];
|
||||||
|
|
||||||
|
|
||||||
//default icons
|
//default icons
|
||||||
@@ -272,7 +272,7 @@ is_array($plugin_run_result = Plugins::getInstance()->run('begin_admin_page', ge
|
|||||||
/**
|
/**
|
||||||
* Exception of 406 ! dirty hosting
|
* Exception of 406 ! dirty hosting
|
||||||
* 'configs' word listed as dangrous requested word
|
* 'configs' word listed as dangrous requested word
|
||||||
* so we replaced this word with 'options' instead.
|
* so we replaced this word with 'options' instead.
|
||||||
*/
|
*/
|
||||||
if ($go_to == 'options')
|
if ($go_to == 'options')
|
||||||
{
|
{
|
||||||
@@ -285,8 +285,8 @@ if (! $go_to || empty($go_to) || ! in_array($go_to, $adm_extensions))
|
|||||||
$go_to = 'start';
|
$go_to = 'start';
|
||||||
}
|
}
|
||||||
|
|
||||||
//make array for menu
|
//make array for menu
|
||||||
$adm_extensions_menu = $adm_topmenu = [];
|
$adm_extensions_menu = $adm_topmenu = [];
|
||||||
|
|
||||||
|
|
||||||
//sort the items as alphabetic !
|
//sort the items as alphabetic !
|
||||||
@@ -298,16 +298,16 @@ $cr_time = LAST_VISIT > 0 ? LAST_VISIT : time() - 3600*12;
|
|||||||
// check calls and reports numbers
|
// check calls and reports numbers
|
||||||
if (ig('check_msgs') || ! ig('_ajax_')):
|
if (ig('check_msgs') || ! ig('_ajax_')):
|
||||||
|
|
||||||
//small bubble system
|
//small bubble system
|
||||||
//any item can show what is inside it as unread messages
|
//any item can show what is inside it as unread messages
|
||||||
$kbubbles = [];
|
$kbubbles = [];
|
||||||
|
|
||||||
//for calls and reports
|
//for calls and reports
|
||||||
foreach (['call'=>'calls', 'reports'=>'reports'] as $table=>$n)
|
foreach (['call'=>'calls', 'reports'=>'reports'] as $table=>$n)
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'COUNT(' . $table[0] . '.id) AS total_rows',
|
'SELECT' => 'COUNT(' . $table[0] . '.id) AS total_rows',
|
||||||
'FROM' => "`{$dbprefix}" . $table . '` ' . $table[0]
|
'FROM' => "`{$dbprefix}" . $table . '` ' . $table[0]
|
||||||
];
|
];
|
||||||
|
|
||||||
$fetched = $SQL->fetch_array($SQL->build($query));
|
$fetched = $SQL->fetch_array($SQL->build($query));
|
||||||
@@ -346,19 +346,19 @@ foreach ($adm_extensions as $m)
|
|||||||
|
|
||||||
|
|
||||||
++$i;
|
++$i;
|
||||||
$adm_extensions_menu[$i] = [
|
$adm_extensions_menu[$i] = [
|
||||||
'm' => $m,
|
'm' => $m,
|
||||||
'i' => $i+1,
|
'i' => $i+1,
|
||||||
'i2' => $i+2,
|
'i2' => $i+2,
|
||||||
'icon' => ! empty($ext_icons[$m]) ? $ext_icons[$m] : 'puzzle-piece',
|
'icon' => ! empty($ext_icons[$m]) ? $ext_icons[$m] : 'puzzle-piece',
|
||||||
|
|
||||||
'lang' => ! empty($lang['R_' . strtoupper($m)]) ? $lang['R_' . strtoupper($m)] : (! empty($olang['R_' . strtoupper($m)]) ? $olang['R_' . strtoupper($m)] : strtoupper($m)),
|
'lang' => ! empty($lang['R_' . strtoupper($m)]) ? $lang['R_' . strtoupper($m)] : (! empty($olang['R_' . strtoupper($m)]) ? $olang['R_' . strtoupper($m)] : strtoupper($m)),
|
||||||
'link' => './' . basename(ADMIN_PATH) . '?cp=' . ($m == 'configs' ? 'options' : $s) . (@in_array($m, $ext_formkey) ? '&' . $GET_FORM_KEY_GLOBAL : ''),
|
'link' => './' . basename(ADMIN_PATH) . '?cp=' . ($m == 'configs' ? 'options' : $s) . (@in_array($m, $ext_formkey) ? '&' . $GET_FORM_KEY_GLOBAL : ''),
|
||||||
'confirm' => (@in_array($m, $ext_confirm)) ? true : false,
|
'confirm' => (@in_array($m, $ext_confirm)) ? true : false,
|
||||||
'current' => ($s == $go_to) ? true : false,
|
'current' => ($s == $go_to) ? true : false,
|
||||||
'goto' => str_replace('a_configs', 'options', $s),
|
'goto' => str_replace('a_configs', 'options', $s),
|
||||||
'bubble' => ! emptY($kbubbles[$m]) ? '<span class="badge badge-pill badge-warning bubble_' . $m . '"' . ($kbubbles[$m] == 0 ? ' style="display:none"' : '') . '>' . $kbubbles[$m] . '</span>' : '',
|
'bubble' => ! emptY($kbubbles[$m]) ? '<span class="badge badge-pill badge-warning bubble_' . $m . '"' . ($kbubbles[$m] == 0 ? ' style="display:none"' : '') . '>' . $kbubbles[$m] . '</span>' : '',
|
||||||
'counter' => ! emptY($kbubbles[$m]) ? $kbubbles[$m] : ''
|
'counter' => ! emptY($kbubbles[$m]) ? $kbubbles[$m] : ''
|
||||||
];
|
];
|
||||||
|
|
||||||
//add another item to array for title='' in href or other thing
|
//add another item to array for title='' in href or other thing
|
||||||
@@ -375,7 +375,7 @@ $assigned_klj_ver = preg_replace('!#([a-z0-9]+)!', '', KLEEJA_VERSION);
|
|||||||
//for plugins
|
//for plugins
|
||||||
$styleePath = null;
|
$styleePath = null;
|
||||||
|
|
||||||
//get it
|
//get it
|
||||||
if (file_exists(ADM_FILES_PATH . '/' . $go_to . '.php'))
|
if (file_exists(ADM_FILES_PATH . '/' . $go_to . '.php'))
|
||||||
{
|
{
|
||||||
$include = true;
|
$include = true;
|
||||||
@@ -427,7 +427,7 @@ if (isset($go_menu))
|
|||||||
foreach ($go_menu as $m=>$d)
|
foreach ($go_menu as $m=>$d)
|
||||||
{
|
{
|
||||||
$go_menu_html .= '<li class="' . ($d['current'] ? 'active' : '') . '" id="c_' . $d['goto'] . '">' .
|
$go_menu_html .= '<li class="' . ($d['current'] ? 'active' : '') . '" id="c_' . $d['goto'] . '">' .
|
||||||
'<a' . ($m == 'site' ? ' target="_blank" ' : ' ') . 'href="' . $d['link'] . '" ' . ($d['confirm'] ? ' onclick="javascript:return confirm_form();"' : '') . '>' .
|
'<a' . ($m == 'site' ? ' target="_blank" ' : ' ') . 'href="' . $d['link'] . '" ' . (! empty($d['confirm']) ? ' onclick="javascript:return confirm_form();"' : '') . '>' .
|
||||||
$d['name'] . '</a></li>';
|
$d['name'] . '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
132
do.php
132
do.php
@@ -4,7 +4,7 @@
|
|||||||
* @package Kleeja
|
* @package Kleeja
|
||||||
* @copyright (c) 2007 Kleeja.com
|
* @copyright (c) 2007 Kleeja.com
|
||||||
* @license ./docs/license.txt
|
* @license ./docs/license.txt
|
||||||
* hi
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
define('IN_KLEEJA', true);
|
define('IN_KLEEJA', true);
|
||||||
define ('IN_DOWNLOAD', true);
|
define('IN_DOWNLOAD', true);
|
||||||
require_once 'includes/common.php';
|
require_once 'includes/common.php';
|
||||||
|
|
||||||
|
|
||||||
@@ -31,19 +31,19 @@ if (ig('id') || ig('filename'))
|
|||||||
is_array($plugin_run_result = Plugins::getInstance()->run('begin_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('begin_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.real_filename, f.name, f.folder, f.size, f.time, f.uploads, f.type',
|
'SELECT' => 'f.id, f.real_filename, f.name, f.folder, f.size, f.time, f.uploads, f.type',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'LIMIT' => '1',
|
'LIMIT' => '1',
|
||||||
];
|
];
|
||||||
|
|
||||||
//if user system is default, we use users table
|
//if user system is default, we use users table
|
||||||
if ((int) $config['user_system'] == 1)
|
if ((int) $config['user_system'] == 1)
|
||||||
{
|
{
|
||||||
$query['SELECT'] .= ', u.name AS fusername, u.id AS fuserid';
|
$query['SELECT'] .= ', u.name AS fusername, u.id AS fuserid';
|
||||||
$query['JOINS'] = [
|
$query['JOINS'] = [
|
||||||
[
|
[
|
||||||
'LEFT JOIN' => "{$dbprefix}users u",
|
'LEFT JOIN' => "{$dbprefix}users u",
|
||||||
'ON' => 'u.id=f.user'
|
'ON' => 'u.id=f.user'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -54,21 +54,21 @@ if (ig('id') || ig('filename'))
|
|||||||
|
|
||||||
if (ig('x'))
|
if (ig('x'))
|
||||||
{
|
{
|
||||||
$query['WHERE'] = "f.name='" . $filename_l . '.' . $SQL->escape(g('x')) . "'";
|
$query['WHERE'] = "f.name='" . $filename_l . '.' . $SQL->escape(g('x')) . "'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$query['WHERE'] = "f.name='" . $filename_l . "'";
|
$query['WHERE'] = "f.name='" . $filename_l . "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$id_l = g('id', 'int');
|
$id_l = g('id', 'int');
|
||||||
$query['WHERE'] = 'f.id=' . $id_l;
|
$query['WHERE'] = 'f.id=' . $id_l;
|
||||||
}
|
}
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_download_id_filename', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
if ($SQL->num_rows($result) != 0)
|
if ($SQL->num_rows($result) != 0)
|
||||||
{
|
{
|
||||||
@@ -86,19 +86,19 @@ if (ig('id') || ig('filename'))
|
|||||||
$uploads = $file_info['uploads'];
|
$uploads = $file_info['uploads'];
|
||||||
|
|
||||||
|
|
||||||
$fname2 = str_replace('.', '-', htmlspecialchars($name));
|
$fname2 = str_replace('.', '-', htmlspecialchars($name));
|
||||||
$name = $real_filename != '' ? str_replace('.' . $type, '', htmlspecialchars($real_filename)) : $name;
|
$name = $real_filename != '' ? str_replace('.' . $type, '', htmlspecialchars($real_filename)) : $name;
|
||||||
$name = strlen($name) > 70 ? substr($name, 0, 70) . '...' : $name;
|
$name = strlen($name) > 70 ? substr($name, 0, 70) . '...' : $name;
|
||||||
$fusername = $config['user_system'] == 1 && $file_info['fuserid'] > -1 ? $file_info['fusername'] : false;
|
$fusername = $config['user_system'] == 1 && $file_info['fuserid'] > -1 ? $file_info['fusername'] : false;
|
||||||
$userfolder = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $file_info['fuserid'] . '.html' : 'ucp.php?go=fileuser&id=' . $file_info['fuserid']);
|
$userfolder = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $file_info['fuserid'] . '.html' : 'ucp.php?go=fileuser&id=' . $file_info['fuserid']);
|
||||||
|
|
||||||
if (ig('filename'))
|
if (ig('filename'))
|
||||||
{
|
{
|
||||||
$url_file = $config['mod_writer'] ? $config['siteurl'] . 'downf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downf=' . $fname;
|
$url_file = $config['mod_writer'] ? $config['siteurl'] . 'downf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downf=' . $fname;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$url_file = $config['mod_writer'] ? $config['siteurl'] . 'down-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?down=' . $file_info['id'];
|
$url_file = $config['mod_writer'] ? $config['siteurl'] . 'down-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?down=' . $file_info['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($config['livexts']))
|
if (! empty($config['livexts']))
|
||||||
@@ -109,25 +109,25 @@ if (ig('id') || ig('filename'))
|
|||||||
{
|
{
|
||||||
if (ig('filename'))
|
if (ig('filename'))
|
||||||
{
|
{
|
||||||
$url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downexf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downexf=' . $fname;
|
$url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downexf-' . $fname2 . '.html' : $config['siteurl'] . 'do.php?downexf=' . $fname;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downex-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?downex=' . $file_info['id'];
|
$url_filex = $config['mod_writer'] ? $config['siteurl'] . 'downex-' . $file_info['id'] . '.html' : $config['siteurl'] . 'do.php?downex=' . $file_info['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect($url_filex, false);
|
redirect($url_filex, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$REPORT = ($config['mod_writer']) ? $config['siteurl'] . 'report-' . $file_info['id'] . '.html' : $config['siteurl'] . 'go.php?go=report&id=' . $file_info['id'];
|
$REPORT = ($config['mod_writer']) ? $config['siteurl'] . 'report-' . $file_info['id'] . '.html' : $config['siteurl'] . 'go.php?go=report&id=' . $file_info['id'];
|
||||||
$seconds_w = user_can('enter_acp') ? 0 : $config['sec_down'];
|
$seconds_w = user_can('enter_acp') ? 0 : $config['sec_down'];
|
||||||
$time = kleeja_date($time);
|
$time = kleeja_date($time);
|
||||||
$size = readable_size($size);
|
$size = readable_size($size);
|
||||||
|
|
||||||
$file_ext_icon = file_exists('images/filetypes/' . $type . '.png') ? 'images/filetypes/' . $type . '.png' : 'images/filetypes/file.png';
|
$file_ext_icon = file_exists('images/filetypes/' . $type . '.png') ? 'images/filetypes/' . $type . '.png' : 'images/filetypes/file.png';
|
||||||
$sty = 'download';
|
$sty = 'download';
|
||||||
$title = $name . ' - ' . $lang['DOWNLAOD'];
|
$title = $name . ' - ' . $lang['DOWNLAOD'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -275,7 +275,7 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
//is internet explore 8 ?
|
//is internet explore 8 ?
|
||||||
$is_ie8 = is_browser('ie8');
|
$is_ie8 = is_browser('ie8');
|
||||||
//is internet explore 6 ?
|
//is internet explore 6 ?
|
||||||
$is_ie6 = is_browser('ie6');
|
// $is_ie6 = is_browser('ie6');
|
||||||
|
|
||||||
$livexts = explode(',', $config['livexts']);
|
$livexts = explode(',', $config['livexts']);
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
$is_live = in_array($t, $livexts) ? true : false;
|
$is_live = in_array($t, $livexts) ? true : false;
|
||||||
|
|
||||||
|
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//fix bug where a user can override files wait counter
|
//fix bug where a user can override files wait counter
|
||||||
if (! $is_image && (ig('img') || ig('thmb')))
|
if (! $is_image && (ig('img') || ig('thmb')))
|
||||||
@@ -333,29 +333,32 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
//check if the vistor is new in this page before updating kleeja counter
|
//check if the vistor is new in this page before updating kleeja counter
|
||||||
if (! preg_match('/,' . $ii . ',/i', $usrcp->kleeja_get_cookie('oldvistor')) && ! isset($_SERVER['HTTP_RANGE']))
|
if (! preg_match('/,' . $ii . ',/i', $usrcp->kleeja_get_cookie('oldvistor')) && ! isset($_SERVER['HTTP_RANGE']))
|
||||||
{
|
{
|
||||||
//updates number of uploads ..
|
if ($usrcp->group_id() != 1)
|
||||||
$update_query = [
|
|
||||||
'UPDATE' => "{$dbprefix}files",
|
|
||||||
'SET' => 'uploads=uploads+1, last_down=' . time(),
|
|
||||||
'WHERE' => $is_id_filename ? "name='" . $filename . "'" : 'id=' . $id,
|
|
||||||
];
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_uploads_down', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
$SQL->build($update_query);
|
|
||||||
|
|
||||||
//
|
|
||||||
//Define as old vistor
|
|
||||||
//if this vistor has other views then add this view too
|
|
||||||
//old vistor just for 1 day
|
|
||||||
//
|
|
||||||
if ($usrcp->kleeja_get_cookie('oldvistor'))
|
|
||||||
{
|
{
|
||||||
$usrcp->kleeja_set_cookie('oldvistor', $usrcp->kleeja_get_cookie('oldvistor') . $ii . ',', time() + 86400);
|
//updates number of uploads ..
|
||||||
}
|
$update_query = [
|
||||||
else
|
'UPDATE' => "{$dbprefix}files",
|
||||||
{
|
'SET' => 'uploads=uploads+1, last_down=' . time(),
|
||||||
//first time
|
'WHERE' => $is_id_filename ? "name='" . $filename . "'" : 'id=' . $id,
|
||||||
$usrcp->kleeja_set_cookie('oldvistor', ',' . $ii . ',', time() + 86400);
|
];
|
||||||
|
|
||||||
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_uploads_down', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
$SQL->build($update_query);
|
||||||
|
|
||||||
|
//
|
||||||
|
//Define as old vistor
|
||||||
|
//if this vistor has other views then add this view too
|
||||||
|
//old vistor just for 1 day
|
||||||
|
//
|
||||||
|
if ($usrcp->kleeja_get_cookie('oldvistor'))
|
||||||
|
{
|
||||||
|
$usrcp->kleeja_set_cookie('oldvistor', $usrcp->kleeja_get_cookie('oldvistor') . $ii . ',', time() + 86400);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//first time
|
||||||
|
$usrcp->kleeja_set_cookie('oldvistor', ',' . $ii . ',', time() + 86400);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -414,13 +417,20 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! ($size = @kleeja_filesize($path_file)))
|
if (! ($size = @filesize($path_file)))
|
||||||
{
|
{
|
||||||
$size = $d_size;
|
$size = $d_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = empty($rn) ? $n : $rn;
|
$name = empty($rn) ? $n : $rn;
|
||||||
|
|
||||||
|
$dots_in_name = substr_count($name, '.') - 1;
|
||||||
|
|
||||||
|
if ($dots_in_name > 0)
|
||||||
|
{
|
||||||
|
$name = preg_replace('/\./', '_', $name, $dots_in_name);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_browser('mozilla'))
|
if (is_browser('mozilla'))
|
||||||
{
|
{
|
||||||
$h_name = "filename*=UTF-8''" . rawurlencode(htmlspecialchars_decode($name));
|
$h_name = "filename*=UTF-8''" . rawurlencode(htmlspecialchars_decode($name));
|
||||||
@@ -487,7 +497,12 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
header('Pragma: public');
|
header('Pragma: public');
|
||||||
header('Accept-Ranges: bytes');
|
header('Accept-Ranges: bytes');
|
||||||
header('Content-Description: File Transfer');
|
header('Content-Description: File Transfer');
|
||||||
header("Content-Type: $mime_type");
|
|
||||||
|
//dirty fix
|
||||||
|
if (! is_browser('chrome') && $ext != 'apk')
|
||||||
|
{
|
||||||
|
header("Content-Type: $mime_type");
|
||||||
|
}
|
||||||
header('Date: ' . gmdate('D, d M Y H:i:s', empty($ftime) ? time() : $ftime) . ' GMT');
|
header('Date: ' . gmdate('D, d M Y H:i:s', empty($ftime) ? time() : $ftime) . ' GMT');
|
||||||
//header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $ftime) . ' GMT');
|
//header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $ftime) . ' GMT');
|
||||||
//header('Content-Encoding: none');
|
//header('Content-Encoding: none');
|
||||||
@@ -499,13 +514,9 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
|
|
||||||
//if(!$is_image && !$is_live && $is_ie8)
|
//if(!$is_image && !$is_live && $is_ie8)
|
||||||
//{
|
//{
|
||||||
// header('X-Download-Options: noopen');
|
// header('X-Download-Options: noopen');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//header(($is_ie6 ? 'Expires: -1' : 'Expires: Mon, 26 Jul 1997 05:00:00 GMT'));
|
|
||||||
//(($is_ie8) ? '; authoritative=true; X-Content-Type-Options: nosniff;' : '')
|
|
||||||
|
|
||||||
|
|
||||||
//add multipart download and resume support
|
//add multipart download and resume support
|
||||||
if (isset($_SERVER['HTTP_RANGE']) && $resuming_on)
|
if (isset($_SERVER['HTTP_RANGE']) && $resuming_on)
|
||||||
{
|
{
|
||||||
@@ -524,6 +535,7 @@ elseif (ig('down') || ig('downf') ||
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
header('HTTP/1.1 200 OK');
|
||||||
$partial_length = $size;
|
$partial_length = $size;
|
||||||
header("Content-Length: $partial_length");
|
header("Content-Length: $partial_length");
|
||||||
}
|
}
|
||||||
|
|||||||
190
go.php
190
go.php
@@ -31,8 +31,8 @@ switch ($current_go_case)
|
|||||||
case 'exts' :
|
case 'exts' :
|
||||||
case 'guide' :
|
case 'guide' :
|
||||||
|
|
||||||
$stylee = 'guide';
|
$stylee = 'guide';
|
||||||
$titlee = $lang['GUIDE'];
|
$titlee = $lang['GUIDE'];
|
||||||
|
|
||||||
$tgroups = $ttgroups = [];
|
$tgroups = $ttgroups = [];
|
||||||
$tgroups = array_keys($d_groups);
|
$tgroups = array_keys($d_groups);
|
||||||
@@ -50,15 +50,15 @@ switch ($current_go_case)
|
|||||||
foreach ($d_groups[$gid]['exts'] as $ext=>$size)
|
foreach ($d_groups[$gid]['exts'] as $ext=>$size)
|
||||||
{
|
{
|
||||||
$ttgroups[] = [
|
$ttgroups[] = [
|
||||||
'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']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$gid]['data']['group_name']),
|
$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,
|
||||||
];
|
];
|
||||||
$same_group = $gid;
|
$same_group = $gid;
|
||||||
}
|
}
|
||||||
@@ -81,32 +81,32 @@ switch ($current_go_case)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//page info
|
//page info
|
||||||
$stylee = 'report';
|
$stylee = 'report';
|
||||||
$titlee = $lang['REPORT'];
|
$titlee = $lang['REPORT'];
|
||||||
$id_d = ig('id') ? g('id', 'int') : (ip('rid') ? p('rid', 'int') : 0);
|
$id_d = ig('id') ? g('id', 'int') : (ip('rid') ? p('rid', 'int') : 0);
|
||||||
$url_id = (int) $config['mod_writer'] == 1 ? $config['siteurl'] . 'download' . $id_d . '.html' : $config['siteurl'] . 'do.php?id=' . $id_d;
|
$url_id = (int) $config['mod_writer'] == 1 ? $config['siteurl'] . 'download' . $id_d . '.html' : $config['siteurl'] . 'do.php?id=' . $id_d;
|
||||||
$action = $config['siteurl'] . 'go.php?go=report';
|
$action = $config['siteurl'] . 'go.php?go=report';
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('report');
|
$H_FORM_KEYS = kleeja_add_form_key('report');
|
||||||
$NOT_USER = ! $usrcp->name() ? true : false;
|
$NOT_USER = ! $usrcp->name() ? true : false;
|
||||||
$s_url = p('surl');
|
$s_url = p('surl');
|
||||||
|
|
||||||
//Does this file exists ?
|
//Does this file exists ?
|
||||||
if (ig('id') || ip('rid'))
|
if (ig('id') || ip('rid'))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.real_filename, f.name',
|
'SELECT' => 'f.real_filename, f.name',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'WHERE' => 'id=' . $id_d
|
'WHERE' => 'id=' . $id_d
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_report_go_id', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_report_go_id', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
if ($SQL->num_rows($result))
|
if ($SQL->num_rows($result))
|
||||||
{
|
{
|
||||||
$row = $SQL->fetch_array($result);
|
$row = $SQL->fetch_array($result);
|
||||||
$filename_for_show = $row['real_filename'] == '' ? $row['name'] : $row['real_filename'];
|
$filename_for_show = $row['real_filename'] == '' ? $row['name'] : $row['real_filename'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -131,7 +131,7 @@ switch ($current_go_case)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ERRORS = [];
|
$ERRORS = [];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('submit_report_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('submit_report_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ switch ($current_go_case)
|
|||||||
|
|
||||||
if (! kleeja_check_captcha())
|
if (! kleeja_check_captcha())
|
||||||
{
|
{
|
||||||
$ERRORS['captcha'] = $lang['WRONG_VERTY_CODE'];
|
$ERRORS['captcha'] = $lang['WRONG_VERTY_CODE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((empty(p('rname')) && $NOT_USER))
|
if ((empty(p('rname')) && $NOT_USER))
|
||||||
@@ -154,7 +154,7 @@ switch ($current_go_case)
|
|||||||
|
|
||||||
if (ip('surl') && trim(p('surl')) == '')
|
if (ip('surl') && trim(p('surl')) == '')
|
||||||
{
|
{
|
||||||
$ERRORS['surl'] = $lang['EMPTY_FIELDS'] . ' : [ ' . $lang['URL_F_FILE'] . ' ]';
|
$ERRORS['surl'] = $lang['EMPTY_FIELDS'] . ' : [ ' . $lang['URL_F_FILE'] . ' ]';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ip('rmail') && ! preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", trim(strtolower(p('rmail')))) && $NOT_USER)
|
if (ip('rmail') && ! preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i", trim(strtolower(p('rmail')))) && $NOT_USER)
|
||||||
@@ -177,19 +177,19 @@ switch ($current_go_case)
|
|||||||
//no error , lets do process
|
//no error , lets do process
|
||||||
if (empty($ERRORS))
|
if (empty($ERRORS))
|
||||||
{
|
{
|
||||||
$name = $NOT_USER ? (string) $SQL->escape(p('rname')) : $usrcp->name();
|
$name = $NOT_USER ? (string) $SQL->escape(p('rname')) : $usrcp->name();
|
||||||
$text = (string) $SQL->escape(p('rtext'));
|
$text = (string) $SQL->escape(p('rtext'));
|
||||||
$mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('rmail')))) : $usrcp->mail();
|
$mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('rmail')))) : $usrcp->mail();
|
||||||
$url = (string) ip('rid') ? $SQL->escape($url_id) : $SQL->real_escape(p('surl'));
|
$url = (string) ip('rid') ? $SQL->escape($url_id) : $SQL->real_escape(p('surl'));
|
||||||
$time = (int) time();
|
$time = (int) time();
|
||||||
$rid = ip('rid') ? 0 : p('rid', 'int');
|
$rid = ip('rid') ? 0 : p('rid', 'int');
|
||||||
$ip = get_ip();
|
$ip = get_ip();
|
||||||
|
|
||||||
|
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'name ,mail ,url ,text ,time ,ip',
|
'INSERT' => 'name ,mail ,url ,text ,time ,ip',
|
||||||
'INTO' => "{$dbprefix}reports",
|
'INTO' => "{$dbprefix}reports",
|
||||||
'VALUES' => "'$name', '$mail', '$url', '$text', $time, '$ip'"
|
'VALUES' => "'$name', '$mail', '$url', '$text', $time, '$ip'"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -197,10 +197,10 @@ switch ($current_go_case)
|
|||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
|
|
||||||
//update number of reports
|
//update number of reports
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}files",
|
'UPDATE' => "{$dbprefix}files",
|
||||||
'SET' => 'report=report+1',
|
'SET' => 'report=report+1',
|
||||||
'WHERE' => 'id=' . $rid,
|
'WHERE' => 'id=' . $rid,
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_file_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_no_file_report', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -225,9 +225,9 @@ switch ($current_go_case)
|
|||||||
//
|
//
|
||||||
case 'rules' :
|
case 'rules' :
|
||||||
|
|
||||||
$stylee = 'rules';
|
$stylee = 'rules';
|
||||||
$titlee = $lang['RULES'];
|
$titlee = $lang['RULES'];
|
||||||
$contents = strlen($ruless) > 3 ? stripslashes($ruless) : $lang['NO_RULES_NOW'];
|
$contents = strlen($ruless) > 3 ? stripslashes($ruless) : $lang['NO_RULES_NOW'];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('rules_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('rules_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -246,11 +246,11 @@ switch ($current_go_case)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//page info
|
//page info
|
||||||
$stylee = 'call';
|
$stylee = 'call';
|
||||||
$titlee = $lang['CALL'];
|
$titlee = $lang['CALL'];
|
||||||
$action = './go.php?go=call';
|
$action = './go.php?go=call';
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('call');
|
$H_FORM_KEYS = kleeja_add_form_key('call');
|
||||||
$NOT_USER = ! $usrcp->name() ? true : false;
|
$NOT_USER = ! $usrcp->name() ? true : false;
|
||||||
//no error yet
|
//no error yet
|
||||||
$ERRORS = false;
|
$ERRORS = false;
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ switch ($current_go_case)
|
|||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
//after sumit
|
//after sumit
|
||||||
$ERRORS = [];
|
$ERRORS = [];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('submit_call_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('submit_call_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -280,9 +280,9 @@ switch ($current_go_case)
|
|||||||
$ERRORS['captcha'] = $lang['WRONG_VERTY_CODE'];
|
$ERRORS['captcha'] = $lang['WRONG_VERTY_CODE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((empty(p('cname')) && $NOT_USER) || empty(p('ctext')) )
|
if ((empty(p('cname')) && $NOT_USER) || empty(p('ctext')))
|
||||||
{
|
{
|
||||||
$ERRORS['cname'] = $lang['EMPTY_FIELDS'] . ' : ' . (empty(p('cname')) && $NOT_USER ? ' [ ' . $lang['YOURNAME'] . ' ] ' : '')
|
$ERRORS['cname'] = $lang['EMPTY_FIELDS'] . ' : ' . (empty(p('cname')) && $NOT_USER ? ' [ ' . $lang['YOURNAME'] . ' ] ' : '')
|
||||||
. (empty(p('ctext')) ? ' [ ' . $lang['TEXT'] . ' ] ': '');
|
. (empty(p('ctext')) ? ' [ ' . $lang['TEXT'] . ' ] ': '');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,16 +306,16 @@ switch ($current_go_case)
|
|||||||
//no errors ,lets do process
|
//no errors ,lets do process
|
||||||
if (empty($ERRORS))
|
if (empty($ERRORS))
|
||||||
{
|
{
|
||||||
$name = $NOT_USER ? (string) $SQL->escape(p('cname')) : $usrcp->name();
|
$name = $NOT_USER ? (string) $SQL->escape(p('cname')) : $usrcp->name();
|
||||||
$text = (string) $SQL->escape(p('ctext'));
|
$text = (string) $SQL->escape(p('ctext'));
|
||||||
$mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('cmail')))) : $usrcp->mail();
|
$mail = $NOT_USER ? (string) strtolower(trim($SQL->escape(p('cmail')))) : $usrcp->mail();
|
||||||
$timee = (int) time();
|
$timee = (int) time();
|
||||||
$ip = get_ip();
|
$ip = get_ip();
|
||||||
|
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'name ,text ,mail ,time ,ip',
|
'INSERT' => 'name ,text ,mail ,time ,ip',
|
||||||
'INTO' => "`{$dbprefix}call`",
|
'INTO' => "`{$dbprefix}call`",
|
||||||
'VALUES' => "'$name', '$text', '$mail', $timee, '$ip'"
|
'VALUES' => "'$name', '$text', '$mail', $timee, '$ip'"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_call', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_insert_new_call', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -349,7 +349,7 @@ switch ($current_go_case)
|
|||||||
//f2b3a82060a22a80283ed961d080b79f
|
//f2b3a82060a22a80283ed961d080b79f
|
||||||
//aa92468375a456de21d7ca05ef945212
|
//aa92468375a456de21d7ca05ef945212
|
||||||
//
|
//
|
||||||
$cd = preg_replace('/[^0-9a-z]/i', '', $SQL->escape(g('cd'))); // may.. will protect
|
$cd = preg_replace('/[^0-9a-z]/i', '', $SQL->escape(g('cd'))); // may.. will protect
|
||||||
|
|
||||||
if (empty($cd))
|
if (empty($cd))
|
||||||
{
|
{
|
||||||
@@ -360,16 +360,16 @@ switch ($current_go_case)
|
|||||||
//to check
|
//to check
|
||||||
if (ig('sure') && g('sure') == 'ok')
|
if (ig('sure') && g('sure') == 'ok')
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT'=> 'f.id, f.name, f.folder, f.size, f.type',
|
'SELECT' => 'f.id, f.name, f.folder, f.size, f.type',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'WHERE' => "f.code_del='" . $cd . "'",
|
'WHERE' => "f.code_del='" . $cd . "'",
|
||||||
'LIMIT' => '1',
|
'LIMIT' => '1',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
if ($SQL->num_rows($result) != 0)
|
if ($SQL->num_rows($result) != 0)
|
||||||
{
|
{
|
||||||
@@ -384,9 +384,9 @@ switch ($current_go_case)
|
|||||||
|
|
||||||
$is_img = in_array($row['type'], ['png','gif','jpg','jpeg','tif','tiff', 'bmp']) ? true : false;
|
$is_img = in_array($row['type'], ['png','gif','jpg','jpeg','tif','tiff', 'bmp']) ? true : false;
|
||||||
|
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => 'id=' . $row['id']
|
'WHERE' => 'id=' . $row['id']
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_file_with_code_del', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -396,9 +396,9 @@ switch ($current_go_case)
|
|||||||
if ($SQL->affected())
|
if ($SQL->affected())
|
||||||
{
|
{
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => ($is_img ? 'imgs=imgs-1':'files=files-1') . ',sizes=sizes-' . $row['size'],
|
'SET' => ($is_img ? 'imgs=imgs-1':'files=files-1') . ',sizes=sizes-' . $row['size'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -419,16 +419,16 @@ switch ($current_go_case)
|
|||||||
{
|
{
|
||||||
//fix for IE+
|
//fix for IE+
|
||||||
$extra_codes = '<script type="text/javascript">
|
$extra_codes = '<script type="text/javascript">
|
||||||
function confirm_from()
|
function confirm_from()
|
||||||
{
|
{
|
||||||
if(confirm(\'' . $lang['ARE_YOU_SURE_DO_THIS'] . '\')){
|
if(confirm(\'' . $lang['ARE_YOU_SURE_DO_THIS'] . '\')){
|
||||||
window.location = "go.php?go=del&sure=ok&cd=' . $cd . '";
|
window.location = "go.php?go=del&sure=ok&cd=' . $cd . '";
|
||||||
}else{
|
}else{
|
||||||
window.location = "index.php";
|
window.location = "index.php";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.onload=confirm_from;
|
window.onload=confirm_from;
|
||||||
</script>';
|
</script>';
|
||||||
kleeja_info($lang['ARE_YOU_SURE_DO_THIS'], '', true, false, 0, $extra_codes);
|
kleeja_info($lang['ARE_YOU_SURE_DO_THIS'], '', true, false, 0, $extra_codes);
|
||||||
}
|
}
|
||||||
}//else
|
}//else
|
||||||
@@ -456,8 +456,8 @@ switch ($current_go_case)
|
|||||||
//stats of most online users
|
//stats of most online users
|
||||||
if (empty($config['most_user_online_ever']) || trim($config['most_user_online_ever']) == '')
|
if (empty($config['most_user_online_ever']) || trim($config['most_user_online_ever']) == '')
|
||||||
{
|
{
|
||||||
$most_online = 1;// 1 == you
|
$most_online = 1;// 1 == you
|
||||||
$on_muoe = time();
|
$on_muoe = time();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -465,15 +465,15 @@ switch ($current_go_case)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ok .. go on
|
//ok .. go on
|
||||||
$titlee = $lang['STATS'];
|
$titlee = $lang['STATS'];
|
||||||
$stylee = 'stats';
|
$stylee = 'stats';
|
||||||
$files_st = $stat_files;
|
$files_st = $stat_files;
|
||||||
$imgs_st = $stat_imgs;
|
$imgs_st = $stat_imgs;
|
||||||
$users_st = $stat_users;
|
$users_st = $stat_users;
|
||||||
$sizes_st = readable_size($stat_sizes);
|
$sizes_st = readable_size($stat_sizes);
|
||||||
$lst_dl_st = (int) $config['del_f_day'] <= 0 ? false : kleeja_date($stat_last_f_del);
|
$lst_dl_st = (int) $config['del_f_day'] <= 0 ? false : kleeja_date($stat_last_f_del);
|
||||||
$lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user;
|
$lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user;
|
||||||
$on_muoe = kleeja_date($on_muoe);
|
$on_muoe = kleeja_date($on_muoe);
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('stats_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('stats_go_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
||||||
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
||||||
191
includes/FetchFile.php
Normal file
191
includes/FetchFile.php
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package Kleeja
|
||||||
|
* @copyright (c) 2007 Kleeja.com
|
||||||
|
* @license http://www.kleeja.com/license
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//no for directly open
|
||||||
|
if (! defined('IN_COMMON'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
class FetchFile
|
||||||
|
{
|
||||||
|
private $url;
|
||||||
|
private $timeout = 60;
|
||||||
|
private $destinationPath = '';
|
||||||
|
private $maxRedirects = 3;
|
||||||
|
private $binary = false;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct($url)
|
||||||
|
{
|
||||||
|
$this->url = $url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function make($url)
|
||||||
|
{
|
||||||
|
return new static($url);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTimeOut($seconds)
|
||||||
|
{
|
||||||
|
$this->timeout = $seconds;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDestinationPath($path)
|
||||||
|
{
|
||||||
|
$this->destinationPath = $path;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMaxRedirects($limit)
|
||||||
|
{
|
||||||
|
$this->maxRedirects = $limit;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isBinaryFile($val)
|
||||||
|
{
|
||||||
|
$this->binary = $val;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get()
|
||||||
|
{
|
||||||
|
$fetchType = '';
|
||||||
|
|
||||||
|
$allow_url_fopen = function_exists('ini_get')
|
||||||
|
? strtolower(@ini_get('allow_url_fopen'))
|
||||||
|
: strtolower(@get_cfg_var('allow_url_fopen'));
|
||||||
|
|
||||||
|
if (function_exists('curl_init'))
|
||||||
|
{
|
||||||
|
$fetchType = 'curl';
|
||||||
|
}
|
||||||
|
elseif (in_array($allow_url_fopen, ['on', 'true', '1']))
|
||||||
|
{
|
||||||
|
$fetchType = 'fopen';
|
||||||
|
}
|
||||||
|
|
||||||
|
session_write_close();
|
||||||
|
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_fetch_file_start', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
if (! empty($fetchType))
|
||||||
|
{
|
||||||
|
$result = $this->{$fetchType}();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->finishUp();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function finishUp()
|
||||||
|
{
|
||||||
|
if (defined('KJ_SESSION'))
|
||||||
|
{
|
||||||
|
session_id(constant('KJ_SESSION'));
|
||||||
|
}
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function curl()
|
||||||
|
{
|
||||||
|
$ch = curl_init($this->url);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
|
||||||
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Kleeja)');
|
||||||
|
curl_setopt($ch, CURLOPT_FAILONERROR, false);
|
||||||
|
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
||||||
|
|
||||||
|
|
||||||
|
if ($this->binary)
|
||||||
|
{
|
||||||
|
curl_setopt($ch, CURLOPT_ENCODING, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
//let's open new file to save it in.
|
||||||
|
if (! empty($this->destinationPath))
|
||||||
|
{
|
||||||
|
$out = fopen($this->destinationPath, 'w');
|
||||||
|
curl_setopt($ch, CURLOPT_FILE, $out);
|
||||||
|
$result = curl_exec($ch);
|
||||||
|
|
||||||
|
if ($result === false)
|
||||||
|
{
|
||||||
|
kleeja_log(sprintf("cUrl error (#%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch))));
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_close($ch);
|
||||||
|
fclose($out);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$data = curl_exec($ch);
|
||||||
|
|
||||||
|
if ($data === false)
|
||||||
|
{
|
||||||
|
kleeja_log(sprintf("FetchFile error (curl: #%d): %s\n", curl_errno($ch), htmlspecialchars(curl_error($ch))));
|
||||||
|
}
|
||||||
|
curl_close($ch);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function fopen()
|
||||||
|
{
|
||||||
|
// Setup a stream context
|
||||||
|
$stream_context = stream_context_create(
|
||||||
|
[
|
||||||
|
'http' => [
|
||||||
|
'method' => 'GET',
|
||||||
|
'user_agent' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Kleeja)',
|
||||||
|
'max_redirects' => $this->maxRedirects + 1,
|
||||||
|
'timeout' => $this->timeout
|
||||||
|
]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$content = @file_get_contents($this->url, false, $stream_context);
|
||||||
|
|
||||||
|
|
||||||
|
// Did we get anything?
|
||||||
|
if ($content !== false)
|
||||||
|
{
|
||||||
|
if (! empty($this->destinationPath))
|
||||||
|
{
|
||||||
|
$fp2 = fopen($this->destinationPath, 'w' . ($this->binary ? 'b' : ''));
|
||||||
|
@fwrite($fp2, $content);
|
||||||
|
@fclose($fp2);
|
||||||
|
unset($content);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $content;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$error = error_get_last();
|
||||||
|
kleeja_log(sprintf("FetchFile error (stream: #%s): %s\n", $error['type'], $error['message']));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -86,8 +86,7 @@ interface KleejaUploader
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* here happens the magic, call this on upload submit
|
* here happens the magic, call this on upload submit
|
||||||
* @param int $uploadType upload from files input or links
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function upload($uploadType);
|
public function upload();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,28 +15,28 @@ if (! defined('IN_ADMIN'))
|
|||||||
|
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_configs';
|
$stylee = 'admin_configs';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
//words
|
//words
|
||||||
$action = basename(ADMIN_PATH) . '?cp=options&smt=' . $current_smt;
|
$action = basename(ADMIN_PATH) . '?cp=options&smt=' . $current_smt;
|
||||||
$n_submit = $lang['UPDATE_CONFIG'];
|
$n_submit = $lang['UPDATE_CONFIG'];
|
||||||
$options = '';
|
$options = '';
|
||||||
//$current_type = ig('type') ? g('type') : 'general';
|
//$current_type = ig('type') ? g('type') : 'general';
|
||||||
$CONFIGEXTEND = false;
|
$CONFIGEXTEND = false;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_configs');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_configs');
|
||||||
|
|
||||||
//secondary menu
|
//secondary menu
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'DISTINCT(c.type), c.display_order, p.plg_disabled, c.plg_id',
|
'SELECT' => 'DISTINCT(c.type), c.display_order, p.plg_disabled, c.plg_id',
|
||||||
'FROM' => "{$dbprefix}config c",
|
'FROM' => "{$dbprefix}config c",
|
||||||
'JOINS' => [
|
'JOINS' => [
|
||||||
[
|
[
|
||||||
'LEFT JOIN' => "{$dbprefix}plugins p",
|
'LEFT JOIN' => "{$dbprefix}plugins p",
|
||||||
'ON' => 'p.plg_id=c.plg_id'
|
'ON' => 'p.plg_id=c.plg_id'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'WHERE' => "c.option <> '' AND c.type <> 'groups'",
|
'WHERE' => "c.option <> '' AND c.type <> 'groups'",
|
||||||
'ORDER BY' => 'c.display_order'
|
'ORDER BY' => 'c.display_order'
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -73,20 +73,20 @@ if (ip('submit'))
|
|||||||
|
|
||||||
|
|
||||||
//general varaibles
|
//general varaibles
|
||||||
//$action = basename(ADMIN_PATH) . '?cp=options&type=' .$current_type;
|
//$action = basename(ADMIN_PATH) . '?cp=options&type=' .$current_type;
|
||||||
$STAMP_IMG_URL = file_exists(PATH . 'images/watermark.gif') ? PATH . 'images/watermark.gif' : PATH . 'images/watermark.png';
|
$STAMP_IMG_URL = file_exists(PATH . 'images/watermark.gif') ? PATH . 'images/watermark.gif' : PATH . 'images/watermark.png';
|
||||||
$stylfiles = $lngfiles = $authtypes = $time_zones = '';
|
$stylfiles = $lngfiles = $authtypes = $time_zones = '';
|
||||||
$optionss = [];
|
$optionss = [];
|
||||||
$n_googleanalytics = '<a href="http://www.google.com/analytics">Google Analytics</a>';
|
$n_googleanalytics = '<a href="http://www.google.com/analytics">Google Analytics</a>';
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}config",
|
'FROM' => "{$dbprefix}config",
|
||||||
'ORDER BY' => 'display_order, type ASC'
|
'ORDER BY' => 'display_order, type ASC'
|
||||||
];
|
];
|
||||||
|
|
||||||
$CONFIGEXTEND = $SQL->escape($current_smt);
|
$CONFIGEXTEND = $SQL->escape($current_smt);
|
||||||
$CONFIGEXTENDLANG = $go_menu[$current_smt]['name'];
|
$CONFIGEXTENDLANG = $go_menu[$current_smt]['name'];
|
||||||
|
|
||||||
if ($current_smt != 'all')
|
if ($current_smt != 'all')
|
||||||
{
|
{
|
||||||
@@ -151,29 +151,9 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
@closedir($dh);
|
@closedir($dh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($row['name'] == 'user_system')
|
elseif (in_array($row['name'], ['user_system', 'www_url']))
|
||||||
{
|
{
|
||||||
//get auth types
|
continue;
|
||||||
//fix previous choices in old kleeja
|
|
||||||
if (in_array($con['user_system'], ['2', '3', '4']))
|
|
||||||
{
|
|
||||||
$con['user_system'] = str_replace(['2', '3', '4'], ['phpbb', 'vb', 'mysmartbb'], $con['user_system']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$authtypes .= '<option value="1"' . ($con['user_system']=='1' ? ' selected="selected"' : '') . '>' . $lang['NORMAL'] . '</option>' . "\n";
|
|
||||||
|
|
||||||
if ($dh = @opendir(PATH . 'includes/auth_integration'))
|
|
||||||
{
|
|
||||||
while (($file = readdir($dh)) !== false)
|
|
||||||
{
|
|
||||||
if (strpos($file, '.php') !== false)
|
|
||||||
{
|
|
||||||
$file = trim(str_replace('.php', '', $file));
|
|
||||||
$authtypes .= '<option value="' . $file . '"' . ($con['user_system'] == $file ? ' selected="selected"' : '') . '>' . $file . '</option>' . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@closedir($dh);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('while_fetch_adm_config', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('while_fetch_adm_config', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -182,12 +162,12 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
if (! empty($row['option']))
|
if (! empty($row['option']))
|
||||||
{
|
{
|
||||||
$optionss[$row['name']] = [
|
$optionss[$row['name']] = [
|
||||||
'option' => '<div class="form-group">' . "\n" .
|
'option' => '<div class="form-group">' . "\n" .
|
||||||
'<label for="' . $row['name'] . '">' . (! empty($lang[strtoupper($row['name'])]) ? $lang[strtoupper($row['name'])] : $olang[strtoupper($row['name'])]) . '</label>' . "\n" .
|
'<label for="' . $row['name'] . '">' . (! empty($lang[strtoupper($row['name'])]) ? $lang[strtoupper($row['name'])] : $olang[strtoupper($row['name'])]) . '</label>' . "\n" .
|
||||||
'<div class="box">' . (empty($row['option']) ? '' : $tpl->admindisplayoption($row['option'])) . '</div>' . "\n" .
|
'<div class="box">' . (empty($row['option']) ? '' : $tpl->admindisplayoption($row['option'])) . '</div>' . "\n" .
|
||||||
'</div>' . "\n" . '<div class="clear"></div>',
|
'</div>' . "\n" . '<div class="clear"></div>',
|
||||||
'type' => $row['type'],
|
'type' => $row['type'],
|
||||||
'display_order' => $row['display_order'],
|
'display_order' => $row['display_order'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,6 +215,14 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
if (! file_exists(PATH . '.htaccess') && file_exists(PATH . 'htaccess.txt') && function_exists('rename'))
|
if (! file_exists(PATH . '.htaccess') && file_exists(PATH . 'htaccess.txt') && function_exists('rename'))
|
||||||
{
|
{
|
||||||
rename(PATH . 'htaccess.txt', PATH . '.htaccess');
|
rename(PATH . 'htaccess.txt', PATH . '.htaccess');
|
||||||
|
|
||||||
|
if (! file_exists(PATH . '.htaccess'))
|
||||||
|
{
|
||||||
|
chmod(PATH . '.htaccess', K_FILE_CHMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
//re-do after chmod
|
||||||
|
rename(PATH . 'htaccess.txt', PATH . '.htaccess');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,7 +230,6 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
{
|
{
|
||||||
$got_lang = preg_replace('[^a-zA-Z0-9]', '', $new[$row['name']]);
|
$got_lang = preg_replace('[^a-zA-Z0-9]', '', $new[$row['name']]);
|
||||||
|
|
||||||
|
|
||||||
//all groups
|
//all groups
|
||||||
foreach ($d_groups as $group_id => $group_info)
|
foreach ($d_groups as $group_id => $group_info)
|
||||||
{
|
{
|
||||||
@@ -255,9 +242,9 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
is_array($plugin_run_result = Plugins::getInstance()->run('after_submit_adm_config', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('after_submit_adm_config', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}config",
|
'UPDATE' => "{$dbprefix}config",
|
||||||
'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'",
|
'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'",
|
||||||
'WHERE' => "name='" . $row['name'] . "'"
|
'WHERE' => "name='" . $row['name'] . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($current_smt != 'all')
|
if ($current_smt != 'all')
|
||||||
@@ -313,13 +300,13 @@ if (ip('submit'))
|
|||||||
/*
|
/*
|
||||||
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('foldername')) || empty(p('filesnum')))
|
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('foldername')) || empty(p('filesnum')))
|
||||||
{
|
{
|
||||||
$text = $lang['EMPTY_FIELDS'];
|
$text = $lang['EMPTY_FIELDS'];
|
||||||
$stylee = "admin_err";
|
$stylee = "admin_err";
|
||||||
}
|
}
|
||||||
elseif (!is_numeric(p('filesnum')) || !is_numeric(p('sec_down')))
|
elseif (!is_numeric(p('filesnum')) || !is_numeric(p('sec_down')))
|
||||||
{
|
{
|
||||||
$text = $lang['NUMFIELD_S'];
|
$text = $lang['NUMFIELD_S'];
|
||||||
$stylee = "admin_err";
|
$stylee = "admin_err";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,19 +20,19 @@ $files_acp_perpage = defined('ACP_FILES_PER_PAGE') ? ACP_FILES_PER_PAGE : 20;
|
|||||||
|
|
||||||
|
|
||||||
//display
|
//display
|
||||||
$stylee = 'admin_files';
|
$stylee = 'admin_files';
|
||||||
|
|
||||||
$url_or = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) . (isset($_REQUEST['order_way']) ? '&order_by=1' : '') : '';
|
$url_or = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) . (isset($_REQUEST['order_way']) ? '&order_by=1' : '') : '';
|
||||||
$url_or2 = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) : '';
|
$url_or2 = isset($_REQUEST['order_by']) ? '&order_by=' . htmlspecialchars($_REQUEST['order_by']) : '';
|
||||||
$url_lst = isset($_REQUEST['last_visit']) ? '&last_visit=' . htmlspecialchars($_REQUEST['last_visit']) : '';
|
$url_lst = isset($_REQUEST['last_visit']) ? '&last_visit=' . htmlspecialchars($_REQUEST['last_visit']) : '';
|
||||||
$url_sea = ig('search_id') ? '&search_id=' . g('search_id') : '';
|
$url_sea = ig('search_id') ? '&search_id=' . g('search_id') : '';
|
||||||
$url_pg = ig('page') ? '&page=' . g('page', 'int') : '';
|
$url_pg = ig('page') ? '&page=' . g('page', 'int') : '';
|
||||||
$page_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or . $url_sea . $url_lst;
|
$page_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or . $url_sea . $url_lst;
|
||||||
$ord_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_pg . $url_sea . $url_lst;
|
$ord_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_pg . $url_sea . $url_lst;
|
||||||
$page2_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or2 . $url_sea . $url_lst;
|
$page2_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . $url_or2 . $url_sea . $url_lst;
|
||||||
$action = $page_action . $url_pg;
|
$action = $page_action . $url_pg;
|
||||||
$is_search = $affected = false;
|
$is_search = $affected = false;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_files');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_files');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -64,10 +64,10 @@ if (ip('submit'))
|
|||||||
//TODO use IN(...)
|
//TODO use IN(...)
|
||||||
foreach ($del as $key => $id)
|
foreach ($del as $key => $id)
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.name, f.folder, f.size, f.type',
|
'SELECT' => 'f.id, f.name, f.folder, f.size, f.type',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'WHERE' => 'f.id = ' . intval($id),
|
'WHERE' => 'f.id = ' . intval($id),
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -75,11 +75,11 @@ if (ip('submit'))
|
|||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
//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']))
|
||||||
{
|
{
|
||||||
@kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name'] );
|
@kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false;
|
$is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false;
|
||||||
@@ -107,16 +107,16 @@ if (ip('submit'))
|
|||||||
if (isset($ids) && sizeof($ids))
|
if (isset($ids) && sizeof($ids))
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
|
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num",
|
'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num",
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -131,19 +131,19 @@ if (ip('submit'))
|
|||||||
//show msg now
|
//show msg now
|
||||||
$text = ($affected && (isset($ids) && sizeof($ids)) ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
$text = ($affected && (isset($ids) && sizeof($ids)) ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
||||||
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . str_replace('&', '&', $action) . '\');", 2000);</script>' . "\n";
|
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . str_replace('&', '&', $action) . '\');", 2000);</script>' . "\n";
|
||||||
$stylee = 'admin_info';
|
$stylee = 'admin_info';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
//Delete all user files [only one user]
|
//Delete all user files [only one user]
|
||||||
//
|
//
|
||||||
if (ig('deletefiles'))
|
if (ig('deletefiles'))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.size, f.name, f.folder',
|
'SELECT' => 'f.id, f.size, f.name, f.folder',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
];
|
];
|
||||||
|
|
||||||
//get search filter
|
//get search filter
|
||||||
@@ -168,12 +168,12 @@ else
|
|||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
//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']))
|
||||||
{
|
{
|
||||||
@kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
@kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false;
|
$is_image = in_array(strtolower(trim($row['type'])), ['gif', 'jpg', 'jpeg', 'bmp', 'png']) ? true : false;
|
||||||
@@ -200,9 +200,9 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num",
|
'SET' => "sizes=sizes-$sizes, files=files-$files_num, imgs=imgs-$imgs_num",
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -213,9 +213,9 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
//delete all files in just one query
|
//delete all files in just one query
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
@@ -228,19 +228,19 @@ else
|
|||||||
//begin default files page
|
//begin default files page
|
||||||
//
|
//
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'COUNT(f.id) AS total_files',
|
'SELECT' => 'COUNT(f.id) AS total_files',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'ORDER BY' => 'f.id '
|
'ORDER BY' => 'f.id '
|
||||||
];
|
];
|
||||||
|
|
||||||
//if user system is default, we use users table
|
//if user system is default, we use users table
|
||||||
if ((int) $config['user_system'] == 1)
|
if ((int) $config['user_system'] == 1)
|
||||||
{
|
{
|
||||||
$query['JOINS'] = [
|
$query['JOINS'] = [
|
||||||
[
|
[
|
||||||
'LEFT JOIN' => "{$dbprefix}users u",
|
'LEFT JOIN' => "{$dbprefix}users u",
|
||||||
'ON' => 'u.id=f.user'
|
'ON' => 'u.id=f.user'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -250,15 +250,15 @@ else
|
|||||||
//posts search ..
|
//posts search ..
|
||||||
if (ig('search_id'))
|
if (ig('search_id'))
|
||||||
{
|
{
|
||||||
//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');
|
||||||
$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'])));
|
||||||
}
|
}
|
||||||
elseif (isset($_REQUEST['last_visit']))
|
elseif (isset($_REQUEST['last_visit']))
|
||||||
{
|
{
|
||||||
$query['WHERE'] = 'f.time > ' . intval($_REQUEST['last_visit']);
|
$query['WHERE'] = 'f.time > ' . intval($_REQUEST['last_visit']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//to-be-deleted
|
//to-be-deleted
|
||||||
@@ -277,7 +277,7 @@ else
|
|||||||
{
|
{
|
||||||
//display files or display pics and files only in search
|
//display files or display pics and files only in search
|
||||||
$img_types = ['gif','jpg','png','bmp','jpeg','GIF','JPG','PNG','BMP','JPEG'];
|
$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
|
else
|
||||||
{
|
{
|
||||||
@@ -303,10 +303,10 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//pager
|
//pager
|
||||||
$currentPage= ig('page') ? g('page', 'int') : 1;
|
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||||
$Pager = new Pagination($files_acp_perpage, $nums_rows, $currentPage);
|
$Pager = new Pagination($files_acp_perpage, $nums_rows, $currentPage);
|
||||||
$start = $Pager->getStartRow();
|
$start = $Pager->getStartRow();
|
||||||
|
|
||||||
$no_results = false;
|
$no_results = false;
|
||||||
|
|
||||||
@@ -315,11 +315,11 @@ else
|
|||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : '');
|
$query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : '');
|
||||||
$query['LIMIT'] = "$start, $files_acp_perpage";
|
$query['LIMIT'] = "$start, $files_acp_perpage";
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$sizes = false;
|
$sizes = false;
|
||||||
$num = 0;
|
$num = 0;
|
||||||
//if Kleeja integtared we dont want make alot of queries
|
//if Kleeja integtared we dont want make alot of queries
|
||||||
$ids_and_names = [];
|
$ids_and_names = [];
|
||||||
|
|
||||||
@@ -352,23 +352,23 @@ else
|
|||||||
$file_name = $row['real_filename'] == '' ? $row['name'] : $row['real_filename'];
|
$file_name = $row['real_filename'] == '' ? $row['name'] : $row['real_filename'];
|
||||||
|
|
||||||
//make new lovely arrays !!
|
//make new lovely arrays !!
|
||||||
$arr[] = [
|
$arr[] = [
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
'name' => '<a title="' . $file_name . '" href="' . $url . '" target="blank">' .
|
'name' => '<a title="' . $file_name . '" href="' . $url . '" target="blank">' .
|
||||||
shorten_text($file_name, 25) . '</a>',
|
shorten_text($file_name, 25) . '</a>',
|
||||||
'fullname' => $file_name,
|
'fullname' => $file_name,
|
||||||
'size' => readable_size($row['size']),
|
'size' => readable_size($row['size']),
|
||||||
'ups' => $row['uploads'],
|
'ups' => $row['uploads'],
|
||||||
'direct' => $row['id_form'] == 'direct' ? true : false,
|
'direct' => $row['id_form'] == 'direct' ? true : false,
|
||||||
'time_human' => kleeja_date($row['time']),
|
'time_human' => kleeja_date($row['time']),
|
||||||
'time' => kleeja_date($row['time'], false),
|
'time' => kleeja_date($row['time'], false),
|
||||||
'type' => $row['type'],
|
'type' => $row['type'],
|
||||||
'typeicon' => file_exists(PATH . 'images/filetypes/' . $row['type'] . '.png') ? PATH . 'images/filetypes/' . $row['type'] . '.png' : PATH . 'images/filetypes/file.png',
|
'typeicon' => file_exists(PATH . 'images/filetypes/' . $row['type'] . '.png') ? PATH . 'images/filetypes/' . $row['type'] . '.png' : PATH . 'images/filetypes/file.png',
|
||||||
'folder' => $row['folder'],
|
'folder' => $row['folder'],
|
||||||
'report' => $row['report'] > 4 ? '<span style="color:red;font-weight:bold">' . $row['report'] . '</span>':$row['report'],
|
'report' => $row['report'] > 4 ? '<span style="color:red;font-weight:bold">' . $row['report'] . '</span>':$row['report'],
|
||||||
'user' => $row['user'] == '-1' ? $lang['GUST'] : '<a href="' . $userfile . '" target="_blank">' . $row['username'] . '</a>',
|
'user' => $row['user'] == '-1' ? $lang['GUST'] : '<a href="' . $userfile . '" target="_blank">' . $row['username'] . '</a>',
|
||||||
'ip' => '<a href="http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['user_ip'] . '&do_search=Search" target="_new">' . $row['user_ip'] . '</a>',
|
'ip' => '<a href="http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['user_ip'] . '&do_search=Search" target="_new">' . $row['user_ip'] . '</a>',
|
||||||
'showfilesbyip' => basename(ADMIN_PATH) . '?cp=h_search&s_input=1&s_value=' . $row['user_ip']
|
'showfilesbyip' => basename(ADMIN_PATH) . '?cp=h_search&s_input=1&s_value=' . $row['user_ip']
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('arr_files_admin', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('arr_files_admin', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -400,7 +400,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//some vars
|
//some vars
|
||||||
$total_pages = $Pager->getTotalPages();
|
$total_pages = $Pager->getTotalPages();
|
||||||
$page_nums = $Pager->print_nums($page_action);
|
$page_nums = $Pager->print_nums($page_action);
|
||||||
$current_page = $Pager->getCurrentPage();
|
$current_page = $Pager->getCurrentPage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ $images_acp_perpage = defined('ACP_IMAGES_PER_PAGE') ? ACP_IMAGES_PER_PAGE : 20;
|
|||||||
|
|
||||||
|
|
||||||
//display
|
//display
|
||||||
$stylee = 'admin_img';
|
$stylee = 'admin_img';
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '') .
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '') .
|
||||||
(ig('last_visit') ? '&last_visit=' . g('last_visit', 'int') : '') .
|
(ig('last_visit') ? '&last_visit=' . g('last_visit', 'int') : '') .
|
||||||
(ig('smt') ? '&smt=' . g('smt') : '');
|
(ig('smt') ? '&smt=' . g('smt') : '');
|
||||||
$action_search = basename(ADMIN_PATH) . '?cp=h_search';
|
$action_search = basename(ADMIN_PATH) . '?cp=h_search';
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_img_ctrl');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_img_ctrl');
|
||||||
$is_search = false;
|
$is_search = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -51,10 +51,10 @@ if (ip('submit'))
|
|||||||
//TODO better way
|
//TODO better way
|
||||||
foreach ($del as $key => $id)
|
foreach ($del as $key => $id)
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}files",
|
'FROM' => "{$dbprefix}files",
|
||||||
'WHERE' => '`id` = ' . intval($id),
|
'WHERE' => '`id` = ' . intval($id),
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -64,16 +64,16 @@ 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']))
|
||||||
{
|
{
|
||||||
@kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name'] );
|
@kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
||||||
}
|
}
|
||||||
$ids[] = $row['id'];
|
$ids[] = $row['id'];
|
||||||
$num++;
|
$num++;
|
||||||
$sizes += $row['size'];
|
$sizes += $row['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -84,16 +84,16 @@ if (ip('submit'))
|
|||||||
if (isset($ids) && sizeof($ids))
|
if (isset($ids) && sizeof($ids))
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
'WHERE' => '`id` IN (' . implode(',', $ids) . ')'
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
|
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "sizes=sizes-$sizes, imgs=imgs-$num",
|
'SET' => "sizes=sizes-$sizes, imgs=imgs-$num",
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -105,28 +105,28 @@ if (ip('submit'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//after submit
|
//after submit
|
||||||
$text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
$text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
||||||
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
||||||
'&page=' . (ig('page') ? g('page', 'int') : '1') . '\');", 2000);</script>' . "\n";
|
'&page=' . (ig('page') ? g('page', 'int') : '1') . '\');", 2000);</script>' . "\n";
|
||||||
|
|
||||||
$stylee = 'admin_info';
|
$stylee = 'admin_info';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'COUNT(f.id) AS total_files',
|
'SELECT' => 'COUNT(f.id) AS total_files',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'ORDER BY' => 'f.id DESC'
|
'ORDER BY' => 'f.id DESC'
|
||||||
];
|
];
|
||||||
|
|
||||||
//if user system is default, we use users table
|
//if user system is default, we use users table
|
||||||
if ((int) $config['user_system'] == 1)
|
if ((int) $config['user_system'] == 1)
|
||||||
{
|
{
|
||||||
$query['JOINS'] = [
|
$query['JOINS'] = [
|
||||||
[
|
[
|
||||||
'LEFT JOIN' => "{$dbprefix}users u",
|
'LEFT JOIN' => "{$dbprefix}users u",
|
||||||
'ON' => 'u.id=f.user'
|
'ON' => 'u.id=f.user'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ else
|
|||||||
//
|
//
|
||||||
// There is a bug with IN statement in MySQL and they said it will solved at 6.0 version
|
// There is a bug with IN statement in MySQL and they said it will solved at 6.0 version
|
||||||
// forums.mysql.com/read.php?10,243691,243888#msg-243888
|
// forums.mysql.com/read.php?10,243691,243888#msg-243888
|
||||||
// $query['WHERE'] = "f.type IN ('" . implode("', '", $img_types) . "')";
|
// $query['WHERE'] = "f.type IN ('" . implode("', '", $img_types) . "')";
|
||||||
//
|
//
|
||||||
|
|
||||||
$query['WHERE'] = "(f.type = '" . implode("' OR f.type = '", $img_types) . "')";
|
$query['WHERE'] = "(f.type = '" . implode("' OR f.type = '", $img_types) . "')";
|
||||||
@@ -146,7 +146,7 @@ else
|
|||||||
|
|
||||||
if (ig('last_visit'))
|
if (ig('last_visit'))
|
||||||
{
|
{
|
||||||
$query['WHERE'] .= ' AND f.time > ' . g('last_visit', 'int');
|
$query['WHERE'] .= ' AND f.time > ' . g('last_visit', 'int');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -172,18 +172,18 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pager
|
//pager
|
||||||
$currentPage= ig('page') ? g('page', 'int') : 1;
|
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||||
$Pager = new Pagination($images_acp_perpage, $nums_rows, $currentPage);
|
$Pager = new Pagination($images_acp_perpage, $nums_rows, $currentPage);
|
||||||
$start = $Pager->getStartRow();
|
$start = $Pager->getStartRow();
|
||||||
|
|
||||||
|
|
||||||
$no_results = $affected = $sizes = false;
|
$no_results = $affected = $sizes = false;
|
||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : '');
|
$query['SELECT'] = 'f.*' . ((int) $config['user_system'] == 1 ? ', u.name AS username' : '');
|
||||||
$query['LIMIT'] = "$start, $images_acp_perpage";
|
$query['LIMIT'] = "$start, $images_acp_perpage";
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
$tdnum = $num = 0;
|
$tdnum = $num = 0;
|
||||||
//if Kleeja integrated we dont want make alot of queries
|
//if Kleeja integrated we dont want make alot of queries
|
||||||
@@ -216,23 +216,23 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//make new lovely arrays !!
|
//make new lovely arrays !!
|
||||||
$arr[] = [
|
$arr[] = [
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
'tdnum' => $tdnum == 0 ? '<ul>': '',
|
'tdnum' => $tdnum == 0 ? '<ul>': '',
|
||||||
'tdnum2' => $tdnum == 4 ? '</ul>' : '',
|
'tdnum2' => $tdnum == 4 ? '</ul>' : '',
|
||||||
'name' => shorten_text($file_name, 25),
|
'name' => shorten_text($file_name, 25),
|
||||||
'ip' => htmlspecialchars($row['user_ip']),
|
'ip' => htmlspecialchars($row['user_ip']),
|
||||||
'href' => $url,
|
'href' => $url,
|
||||||
'size' => readable_size($row['size']),
|
'size' => readable_size($row['size']),
|
||||||
'ups' => $row['uploads'],
|
'ups' => $row['uploads'],
|
||||||
'time' => date('d-m-Y h:i a', $row['time']),
|
'time' => date('d-m-Y h:i a', $row['time']),
|
||||||
'user' => (int) $row['user'] == -1 ? $lang['GUST'] : $row['username'],
|
'user' => (int) $row['user'] == -1 ? $lang['GUST'] : $row['username'],
|
||||||
'is_user' => (int) $row['user'] == -1 ? 0 : 1,
|
'is_user' => (int) $row['user'] == -1 ? 0 : 1,
|
||||||
'thumb_link'=> $url_thumb
|
'thumb_link' => $url_thumb
|
||||||
];
|
];
|
||||||
|
|
||||||
//fix ...
|
//fix ...
|
||||||
$tdnum = $tdnum == 4 ? 0 : $tdnum+1;
|
$tdnum = $tdnum == 4 ? 0 : $tdnum+1;
|
||||||
|
|
||||||
$del[$row['id']] = p('del_' . $row['id']);
|
$del[$row['id']] = p('del_' . $row['id']);
|
||||||
|
|
||||||
@@ -260,9 +260,9 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pages
|
//pages
|
||||||
$total_pages = $Pager->getTotalPages();
|
$total_pages = $Pager->getTotalPages();
|
||||||
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') .
|
||||||
(ig('last_visit') ? '&last_vists=' . g('last_visit', 'int') : '') .
|
(ig('last_visit') ? '&last_vists=' . g('last_visit', 'int') : '') .
|
||||||
(ig('smt') ? '&smt=' . g('smt') : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
(ig('smt') ? '&smt=' . g('smt') : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
||||||
$current_page = $Pager->getCurrentPage();
|
$current_page = $Pager->getCurrentPage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ if (! defined('IN_ADMIN'))
|
|||||||
|
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_calls';
|
$stylee = 'admin_calls';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt;
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt;
|
||||||
$msg_sent = ig('sent') ? g('sent', 'int') : false;
|
$msg_sent = ig('sent') ? g('sent', 'int') : false;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_calls');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_calls');
|
||||||
$there_queue = preg_match('!:del_[a-z0-9]{0,3}calls:!i', $config['queue']);
|
$there_queue = preg_match('!:del_[a-z0-9]{0,3}calls:!i', $config['queue']);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -49,10 +49,10 @@ if ($current_smt == 'del_d30' || $current_smt == 'del_all')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'c.*',
|
'SELECT' => 'c.*',
|
||||||
'FROM' => "`{$dbprefix}call` c",
|
'FROM' => "`{$dbprefix}call` c",
|
||||||
'ORDER BY' => 'c.id DESC'
|
'ORDER BY' => 'c.id DESC'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -64,10 +64,10 @@ if ($current_smt == 'show_h24')
|
|||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
//pagination
|
//pagination
|
||||||
$nums_rows = $SQL->num_rows($result);
|
$nums_rows = $SQL->num_rows($result);
|
||||||
$currentPage = ig('page') ? g('page', 'int') : 1;
|
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||||
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
||||||
$start = $Pager->getStartRow();
|
$start = $Pager->getStartRow();
|
||||||
|
|
||||||
|
|
||||||
$no_results = false;
|
$no_results = false;
|
||||||
@@ -75,22 +75,22 @@ $del_nums = [];
|
|||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['LIMIT'] = "$start,$perpage";
|
$query['LIMIT'] = "$start,$perpage";
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
//make new lovely arrays !!
|
//make new lovely arrays !!
|
||||||
$arr[] = [
|
$arr[] = [
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
'mail' => $row['mail'],
|
'mail' => $row['mail'],
|
||||||
'text' => htmlspecialchars($row['text']),
|
'text' => htmlspecialchars($row['text']),
|
||||||
'human_time'=> kleeja_date($row['time']),
|
'human_time' => kleeja_date($row['time']),
|
||||||
'time' => kleeja_date($row['time'], false),
|
'time' => kleeja_date($row['time'], false),
|
||||||
'ip' => $row['ip'],
|
'ip' => $row['ip'],
|
||||||
'sent' => $row['id'] == $msg_sent,
|
'sent' => $row['id'] == $msg_sent,
|
||||||
'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['ip'] . '&do_search=Search'
|
'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['ip'] . '&do_search=Search'
|
||||||
];
|
];
|
||||||
|
|
||||||
$del[$row['id']] = p('del_' . $row['id']);
|
$del[$row['id']] = p('del_' . $row['id']);
|
||||||
@@ -141,22 +141,22 @@ else
|
|||||||
//if deleted
|
//if deleted
|
||||||
if (sizeof($del_nums))
|
if (sizeof($del_nums))
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "`{$dbprefix}call`",
|
'DELETE' => "`{$dbprefix}call`",
|
||||||
'WHERE' => "id IN('" . implode("', '", $del_nums) . "')"
|
'WHERE' => "id IN('" . implode("', '", $del_nums) . "')"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_pages = $Pager->getTotalPages();
|
$total_pages = $Pager->getTotalPages();
|
||||||
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
||||||
|
|
||||||
//after submit
|
//after submit
|
||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
$text = ($SQL->affected() ? $lang['CALLS_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
$text = ($SQL->affected() ? $lang['CALLS_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
||||||
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . $action . '\'); check_msg_and_reports();", 2000);</script>' . "\n";
|
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . $action . '\'); check_msg_and_reports();", 2000);</script>' . "\n";
|
||||||
kleeja_admin_info($text, true, '', true, $action);
|
kleeja_admin_info($text, true, '', true, $action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ if (! defined('IN_ADMIN'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_reports';
|
$stylee = 'admin_reports';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt;
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) . '&smt=' . $current_smt;
|
||||||
$msg_sent = ig('sent') ? g('sent', 'int') : false;
|
$msg_sent = ig('sent') ? g('sent', 'int') : false;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_reports');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_reports');
|
||||||
$there_queue = preg_match('!:del_[a-z0-9]{0,3}reports:!i', $config['queue']);
|
$there_queue = preg_match('!:del_[a-z0-9]{0,3}reports:!i', $config['queue']);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -49,9 +49,9 @@ if ($current_smt == 'del_d30' || $current_smt == 'del_all')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}reports r",
|
'FROM' => "{$dbprefix}reports r",
|
||||||
'ORDER BY' => 'r.id DESC'
|
'ORDER BY' => 'r.id DESC'
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($current_smt == 'show_h24')
|
if ($current_smt == 'show_h24')
|
||||||
@@ -63,34 +63,34 @@ if ($current_smt == 'show_h24')
|
|||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
//pagination
|
//pagination
|
||||||
$nums_rows = $SQL->num_rows($result);
|
$nums_rows = $SQL->num_rows($result);
|
||||||
$currentPage = ig('page') ? g('page', 'int') : 1;
|
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||||
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
||||||
$start = $Pager->getStartRow();
|
$start = $Pager->getStartRow();
|
||||||
|
|
||||||
|
|
||||||
$no_results = false;
|
$no_results = false;
|
||||||
$del_nums = [];
|
$del_nums = [];
|
||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['LIMIT'] = "$start, $perpage";
|
$query['LIMIT'] = "$start, $perpage";
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
//make new lovely arrays !!
|
//make new lovely arrays !!
|
||||||
$arr[] = [
|
$arr[] = [
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
'mail' => $row['mail'],
|
'mail' => $row['mail'],
|
||||||
'url' => $row['url'],
|
'url' => $row['url'],
|
||||||
'text' => $row['text'],
|
'text' => $row['text'],
|
||||||
'human_time'=> kleeja_date($row['time']),
|
'human_time' => kleeja_date($row['time']),
|
||||||
'time' => kleeja_date($row['time'], false),
|
'time' => kleeja_date($row['time'], false),
|
||||||
'ip' => $row['ip'],
|
'ip' => $row['ip'],
|
||||||
'sent' => $row['id'] == $msg_sent,
|
'sent' => $row['id'] == $msg_sent,
|
||||||
'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . htmlspecialchars($row['ip']) . '&do_search=Search'
|
'ip_finder' => 'http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . htmlspecialchars($row['ip']) . '&do_search=Search'
|
||||||
];
|
];
|
||||||
|
|
||||||
$del[$row['id']] = p('del_' . $row['id']);
|
$del[$row['id']] = p('del_' . $row['id']);
|
||||||
@@ -140,22 +140,22 @@ else
|
|||||||
//if deleted
|
//if deleted
|
||||||
if (sizeof($del_nums))
|
if (sizeof($del_nums))
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}reports",
|
'DELETE' => "{$dbprefix}reports",
|
||||||
'WHERE' => "id IN('" . implode("', '", $del_nums) . "')"
|
'WHERE' => "id IN('" . implode("', '", $del_nums) . "')"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
}
|
}
|
||||||
|
|
||||||
$total_pages = $Pager->getTotalPages();
|
$total_pages = $Pager->getTotalPages();
|
||||||
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
$page_nums = $Pager->print_nums(basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
|
||||||
|
|
||||||
//after submit
|
//after submit
|
||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
$text = ($SQL->affected() ? $lang['REPORTS_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
$text = ($SQL->affected() ? $lang['REPORTS_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
||||||
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . $action . '\'); check_msg_and_reports();", 2000);</script>' . "\n";
|
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . $action . '\'); check_msg_and_reports();", 2000);</script>' . "\n";
|
||||||
kleeja_admin_info($text, true, '', true, $action);
|
kleeja_admin_info($text, true, '', true, $action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,28 +15,28 @@ if (! defined('IN_ADMIN'))
|
|||||||
|
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_users';
|
$stylee = 'admin_users';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
|
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '');
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('page') ? '&page=' . g('page', 'int') : '');
|
||||||
$action .= (ig('search_id') ? '&search_id=' . g('search') : '');
|
$action .= (ig('search_id') ? '&search_id=' . g('search') : '');
|
||||||
$action .= (ig('qg') ? '&qg=' . g('qg', 'int') : '') . '&smt=' . $current_smt;
|
$action .= (ig('qg') ? '&qg=' . g('qg', 'int') : '') . '&smt=' . $current_smt;
|
||||||
$action_all = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt . (ig('page') ? '&page=' . g('page', 'int') : '');
|
$action_all = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt . (ig('page') ? '&page=' . g('page', 'int') : '');
|
||||||
|
|
||||||
$cp_users_url = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
$cp_users_url = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
||||||
|
|
||||||
//if not normal user system
|
//if not normal user system
|
||||||
$user_not_normal = (int) $config['user_system'] != 1 ? true : false;
|
$user_not_normal = (int) $config['user_system'] != 1;
|
||||||
$is_search = $affected = false;
|
$is_search = $affected = false;
|
||||||
$GET_FORM_KEY = kleeja_add_form_key_get('adm_users');
|
$GET_FORM_KEY = kleeja_add_form_key_get('adm_users');
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_users');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_users');
|
||||||
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser');
|
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_newuser');
|
||||||
$H_FORM_KEYS3 = kleeja_add_form_key('adm_users_newgroup');
|
$H_FORM_KEYS3 = kleeja_add_form_key('adm_users_newgroup');
|
||||||
$H_FORM_KEYS4 = kleeja_add_form_key('adm_users_delgroup');
|
$H_FORM_KEYS4 = kleeja_add_form_key('adm_users_delgroup');
|
||||||
$H_FORM_KEYS5 = kleeja_add_form_key('adm_users_editacl');
|
$H_FORM_KEYS5 = kleeja_add_form_key('adm_users_editacl');
|
||||||
$H_FORM_KEYS6 = kleeja_add_form_key('adm_users_editdata');
|
$H_FORM_KEYS6 = kleeja_add_form_key('adm_users_editdata');
|
||||||
$H_FORM_KEYS7 = kleeja_add_form_key('adm_users_editexts');
|
$H_FORM_KEYS7 = kleeja_add_form_key('adm_users_editexts');
|
||||||
$H_FORM_KEYS8 = kleeja_add_form_key('adm_users_edituser');
|
$H_FORM_KEYS8 = kleeja_add_form_key('adm_users_edituser');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -124,9 +124,9 @@ if (ig('deleteuserfile'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'size, name, folder',
|
'SELECT' => 'size, name, folder',
|
||||||
'FROM' => "{$dbprefix}files",
|
'FROM' => "{$dbprefix}files",
|
||||||
'WHERE' => 'user=' . g('deleteuserfile', 'int'),
|
'WHERE' => 'user=' . g('deleteuserfile', 'int'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -135,11 +135,11 @@ if (ig('deleteuserfile'))
|
|||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
//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']))
|
||||||
{
|
{
|
||||||
kleeja_unlink (PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
kleeja_unlink(PATH . $row['folder'] . '/thumbs/' . $row['name']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$num++;
|
$num++;
|
||||||
@@ -155,9 +155,9 @@ if (ig('deleteuserfile'))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "sizes=sizes-$sizes, files=files-$num",
|
'SET' => "sizes=sizes-$sizes, files=files-$num",
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -168,9 +168,9 @@ if (ig('deleteuserfile'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//delete all files in just one query
|
//delete all files in just one query
|
||||||
$d_query = [
|
$d_query = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => 'user=' . g('deleteuserfile', 'int'),
|
'WHERE' => 'user=' . g('deleteuserfile', 'int'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($d_query);
|
$SQL->build($d_query);
|
||||||
@@ -196,9 +196,9 @@ if (ig('del_user'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//delete all files in just one query
|
//delete all files in just one query
|
||||||
$d_query = [
|
$d_query = [
|
||||||
'DELETE' => "{$dbprefix}users",
|
'DELETE' => "{$dbprefix}users",
|
||||||
'WHERE' => 'id=' . g('del_user', 'int'),
|
'WHERE' => 'id=' . g('del_user', 'int'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($d_query);
|
$SQL->build($d_query);
|
||||||
@@ -236,17 +236,17 @@ elseif (ip('newuser'))
|
|||||||
//no errors, lets do process
|
//no errors, lets do process
|
||||||
if (empty($ERRORS))
|
if (empty($ERRORS))
|
||||||
{
|
{
|
||||||
$name = (string) $SQL->escape(trim(p('lname')));
|
$name = (string) $SQL->escape(trim(p('lname')));
|
||||||
$user_salt = (string) substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
$user_salt = (string) substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||||
$pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt);
|
$pass = (string) $usrcp->kleeja_hash_password($SQL->escape(trim(p('lpass'))) . $user_salt);
|
||||||
$mail = (string) trim(strtolower(p('lmail')));
|
$mail = (string) trim(strtolower(p('lmail')));
|
||||||
$clean_name = (string) $usrcp->cleanusername($name);
|
$clean_name = (string) $usrcp->cleanusername($name);
|
||||||
$group = (int) p('lgroup');
|
$group = (int) p('lgroup');
|
||||||
|
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'name ,password, password_salt ,group_id, mail,founder, session_id, clean_name',
|
'INSERT' => 'name ,password, password_salt ,group_id, mail,founder, session_id, clean_name',
|
||||||
'INTO' => "{$dbprefix}users",
|
'INTO' => "{$dbprefix}users",
|
||||||
'VALUES' => "'$name', '$pass', '$user_salt', $group , '$mail', 0 , '', '$clean_name'"
|
'VALUES' => "'$name', '$pass', '$user_salt', $group , '$mail', 0 , '', '$clean_name'"
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($SQL->build($insert_query))
|
if ($SQL->build($insert_query))
|
||||||
@@ -254,9 +254,9 @@ elseif (ip('newuser'))
|
|||||||
$last_user_id = $SQL->insert_id();
|
$last_user_id = $SQL->insert_id();
|
||||||
|
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "users=users+1, lastuser='$name'",
|
'SET' => "users=users+1, lastuser='$name'",
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -272,7 +272,7 @@ elseif (ip('newuser'))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$errs = '';
|
$errs = '';
|
||||||
|
|
||||||
foreach ($ERRORS as $r)
|
foreach ($ERRORS as $r)
|
||||||
{
|
{
|
||||||
@@ -299,9 +299,9 @@ if (ip('edituser'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'name, mail, clean_name, group_id, founder, show_my_filecp',
|
'SELECT' => 'name, mail, clean_name, group_id, founder, show_my_filecp',
|
||||||
'FROM' => "{$dbprefix}users",
|
'FROM' => "{$dbprefix}users",
|
||||||
'WHERE' => 'id=' . $userid,
|
'WHERE' => 'id=' . $userid,
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -349,22 +349,22 @@ if (ip('edituser'))
|
|||||||
}
|
}
|
||||||
elseif (trim(p('l_pass')) != '')
|
elseif (trim(p('l_pass')) != '')
|
||||||
{
|
{
|
||||||
$user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
$user_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||||
$pass = "password = '" . $usrcp->kleeja_hash_password(trim(p('l_pass')) . $user_salt) . "', password_salt='" . $user_salt . "',";
|
$pass = "password = '" . $usrcp->kleeja_hash_password(trim(p('l_pass')) . $user_salt) . "', password_salt='" . $user_salt . "',";
|
||||||
}
|
}
|
||||||
|
|
||||||
//no errors, lets do process
|
//no errors, lets do process
|
||||||
if (empty($ERRORS))
|
if (empty($ERRORS))
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}users",
|
'UPDATE' => "{$dbprefix}users",
|
||||||
'SET' => ($new_name ? "name = '" . $SQL->escape(p('l_name')) . "', clean_name='" . $SQL->escape($new_clean_name) . "', " : '') .
|
'SET' => ($new_name ? "name = '" . $SQL->escape(p('l_name')) . "', clean_name='" . $SQL->escape($new_clean_name) . "', " : '') .
|
||||||
($new_mail ? "mail = '" . $SQL->escape(p('l_mail')) . "'," : '') .
|
($new_mail ? "mail = '" . $SQL->escape(p('l_mail')) . "'," : '') .
|
||||||
$pass .
|
$pass .
|
||||||
(ip('l_founder') ? 'founder=' . p('l_founder', 'int') . ',' : '') .
|
(ip('l_founder') ? 'founder=' . p('l_founder', 'int') . ',' : '') .
|
||||||
'group_id=' . p('l_group', 'int') . ',' .
|
'group_id=' . p('l_group', 'int') . ',' .
|
||||||
'show_my_filecp=' . p('l_show_filecp', 'int'),
|
'show_my_filecp=' . p('l_show_filecp', 'int'),
|
||||||
'WHERE' => 'id=' . $userid
|
'WHERE' => 'id=' . $userid
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -380,7 +380,7 @@ if (ip('edituser'))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$errs = '';
|
$errs = '';
|
||||||
|
|
||||||
foreach ($ERRORS as $r)
|
foreach ($ERRORS as $r)
|
||||||
{
|
{
|
||||||
@@ -421,10 +421,10 @@ if (ip('newgroup'))
|
|||||||
if (empty($ERRORS))
|
if (empty($ERRORS))
|
||||||
{
|
{
|
||||||
//Insert the group ..
|
//Insert the group ..
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'group_name',
|
'INSERT' => 'group_name',
|
||||||
'INTO' => "{$dbprefix}groups",
|
'INTO' => "{$dbprefix}groups",
|
||||||
'VALUES' => "'" . trim($SQL->escape(p('gname'))) . "'"
|
'VALUES' => "'" . trim($SQL->escape(p('gname'))) . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
@@ -442,65 +442,65 @@ if (ip('newgroup'))
|
|||||||
$org_group_id = (int) $config['default_group'];
|
$org_group_id = (int) $config['default_group'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy acls from the other group to this group
|
//copy acls from the other group to this group
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'acl_name, acl_can',
|
'SELECT' => 'acl_name, acl_can',
|
||||||
'FROM' => "{$dbprefix}groups_acl",
|
'FROM' => "{$dbprefix}groups_acl",
|
||||||
'WHERE' => 'group_id=' . $org_group_id,
|
'WHERE' => 'group_id=' . $org_group_id,
|
||||||
'ORDER BY' => 'acl_name ASC'
|
'ORDER BY' => 'acl_name ASC'
|
||||||
];
|
];
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'acl_name, acl_can, group_id',
|
'INSERT' => 'acl_name, acl_can, group_id',
|
||||||
'INTO' => "{$dbprefix}groups_acl",
|
'INTO' => "{$dbprefix}groups_acl",
|
||||||
'VALUES' => "'" . $row['acl_name'] . "', " . $row['acl_can'] . ', ' . $new_group_id
|
'VALUES' => "'" . $row['acl_name'] . "', " . $row['acl_can'] . ', ' . $new_group_id
|
||||||
];
|
];
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
}
|
}
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//copy configs from the other group to this group
|
//copy configs from the other group to this group
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'd.name, d.value',
|
'SELECT' => 'd.name, d.value',
|
||||||
'FROM' => "{$dbprefix}groups_data d",
|
'FROM' => "{$dbprefix}groups_data d",
|
||||||
'WHERE' => 'd.group_id=' . $org_group_id,
|
'WHERE' => 'd.group_id=' . $org_group_id,
|
||||||
'ORDER BY' => 'd.name ASC'
|
'ORDER BY' => 'd.name ASC'
|
||||||
];
|
];
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'name, value, group_id',
|
'INSERT' => 'name, value, group_id',
|
||||||
'INTO' => "{$dbprefix}groups_data",
|
'INTO' => "{$dbprefix}groups_data",
|
||||||
'VALUES' => "'" . $row['name'] . "', '" . $SQL->escape($row['value']) . "', " . $new_group_id
|
'VALUES' => "'" . $row['name'] . "', '" . $SQL->escape($row['value']) . "', " . $new_group_id
|
||||||
];
|
];
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
}
|
}
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//copy exts from the other group to this group
|
//copy exts from the other group to this group
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'e.ext, e.size',
|
'SELECT' => 'e.ext, e.size',
|
||||||
'FROM' => "{$dbprefix}groups_exts e",
|
'FROM' => "{$dbprefix}groups_exts e",
|
||||||
'WHERE' => 'e.group_id=' . $org_group_id,
|
'WHERE' => 'e.group_id=' . $org_group_id,
|
||||||
'ORDER BY' => 'e.ext_id ASC'
|
'ORDER BY' => 'e.ext_id ASC'
|
||||||
];
|
];
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'ext, size, group_id',
|
'INSERT' => 'ext, size, group_id',
|
||||||
'INTO' => "{$dbprefix}groups_exts",
|
'INTO' => "{$dbprefix}groups_exts",
|
||||||
'VALUES' => "'" . $row['ext'] . "', " . $row['size'] . ', ' . $new_group_id
|
'VALUES' => "'" . $row['ext'] . "', " . $row['size'] . ', ' . $new_group_id
|
||||||
];
|
];
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
}
|
}
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//show group-is-added message
|
//show group-is-added message
|
||||||
delete_cache('data_groups');
|
delete_cache('data_groups');
|
||||||
@@ -508,7 +508,7 @@ if (ip('newgroup'))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$errs = '';
|
$errs = '';
|
||||||
|
|
||||||
foreach ($ERRORS as $r)
|
foreach ($ERRORS as $r)
|
||||||
{
|
{
|
||||||
@@ -545,54 +545,54 @@ if (ip('delgroup'))
|
|||||||
$to_group = (int) $config['default_group'];
|
$to_group = (int) $config['default_group'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//you can not delete default group !
|
//you can not delete default group !
|
||||||
if ($from_group == (int) $config['default_group'])
|
if ($from_group == (int) $config['default_group'])
|
||||||
{
|
{
|
||||||
kleeja_admin_err($lang['DEFAULT_GRP_NO_DEL'], true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
kleeja_admin_err($lang['DEFAULT_GRP_NO_DEL'], true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete the exts
|
//delete the exts
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}groups_exts",
|
'DELETE' => "{$dbprefix}groups_exts",
|
||||||
'WHERE' => 'group_id=' . $from_group
|
'WHERE' => 'group_id=' . $from_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
//then, delete the configs
|
//then, delete the configs
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}groups_data",
|
'DELETE' => "{$dbprefix}groups_data",
|
||||||
'WHERE' => 'group_id=' . $from_group
|
'WHERE' => 'group_id=' . $from_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
//then, delete acls
|
//then, delete acls
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}groups_acl",
|
'DELETE' => "{$dbprefix}groups_acl",
|
||||||
'WHERE' => 'group_id=' . $from_group
|
'WHERE' => 'group_id=' . $from_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
//then, delete the group itself
|
//then, delete the group itself
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}groups",
|
'DELETE' => "{$dbprefix}groups",
|
||||||
'WHERE' => 'group_id=' . $from_group
|
'WHERE' => 'group_id=' . $from_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
//then, move users to the dest. group
|
//then, move users to the dest. group
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}users",
|
'UPDATE' => "{$dbprefix}users",
|
||||||
'SET' => 'group_id=' . $to_group,
|
'SET' => 'group_id=' . $to_group,
|
||||||
'WHERE' => 'group_id=' . $from_group
|
'WHERE' => 'group_id=' . $from_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
|
|
||||||
//get those groups name
|
//get those groups name
|
||||||
$group_name_from = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
$group_name_from = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$from_group]['data']['group_name']);
|
$d_groups[$from_group]['data']['group_name']);
|
||||||
$group_name_to =str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
$group_name_to =str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$to_group]['data']['group_name']);
|
$d_groups[$to_group]['data']['group_name']);
|
||||||
|
|
||||||
@@ -602,7 +602,7 @@ if (ip('delgroup'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//begin of default users page
|
//begin of default users page
|
||||||
//
|
//
|
||||||
$query = [];
|
$query = [];
|
||||||
$show_results = false;
|
$show_results = false;
|
||||||
@@ -611,19 +611,19 @@ switch ($current_smt):
|
|||||||
case 'general':
|
case 'general':
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'COUNT(group_id) AS total_groups',
|
'SELECT' => 'COUNT(group_id) AS total_groups',
|
||||||
'FROM' => "{$dbprefix}groups",
|
'FROM' => "{$dbprefix}groups",
|
||||||
'ORDER BY' => 'group_id ASC'
|
'ORDER BY' => 'group_id ASC'
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
$nums_rows = 0;
|
$nums_rows = 0;
|
||||||
$n_fetch = $SQL->fetch_array($result);
|
$n_fetch = $SQL->fetch_array($result);
|
||||||
$nums_rows = $n_fetch['total_groups'];
|
$nums_rows = $n_fetch['total_groups'];
|
||||||
$no_results = false;
|
$no_results = false;
|
||||||
$e_groups = $c_groups = [];
|
$e_groups = $c_groups = [];
|
||||||
$l_groups = [];
|
$l_groups = [];
|
||||||
|
|
||||||
$groups_background_color = [
|
$groups_background_color = [
|
||||||
1 => ['background' => 'dark', 'icon' => ' fa-star'],
|
1 => ['background' => 'dark', 'icon' => ' fa-star'],
|
||||||
@@ -635,21 +635,21 @@ case 'general':
|
|||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['SELECT'] = 'group_id, group_name, group_is_default, group_is_essential';
|
$query['SELECT'] = 'group_id, group_name, group_is_default, group_is_essential';
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$r = [
|
$r = [
|
||||||
'id' => $row['group_id'],
|
'id' => $row['group_id'],
|
||||||
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$row['group_name']),
|
$row['group_name']),
|
||||||
'style' => ! empty($groups_background_color[$row['group_id']])
|
'style' => ! empty($groups_background_color[$row['group_id']])
|
||||||
? $groups_background_color[$row['group_id']]
|
? $groups_background_color[$row['group_id']]
|
||||||
: ['background' => 'secondary', 'icon' => ''],
|
: ['background' => 'secondary', 'icon' => ''],
|
||||||
'is_default' => (int) $row['group_is_default'] ? true : false
|
'is_default' => (int) $row['group_is_default'] ? true : false
|
||||||
];
|
];
|
||||||
|
|
||||||
if ((int) $row['group_is_essential'] == 1)
|
if ((int) $row['group_is_essential'] == 1)
|
||||||
@@ -681,15 +681,15 @@ case 'group_acl':
|
|||||||
kleeja_admin_err('ERROR-NO-ID', true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
kleeja_admin_err('ERROR-NO-ID', true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
||||||
}
|
}
|
||||||
|
|
||||||
$group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
$group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$req_group]['data']['group_name']);
|
$d_groups[$req_group]['data']['group_name']);
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'acl_name, acl_can',
|
'SELECT' => 'acl_name, acl_can',
|
||||||
'FROM' => "{$dbprefix}groups_acl",
|
'FROM' => "{$dbprefix}groups_acl",
|
||||||
'WHERE' => 'group_id=' . $req_group,
|
'WHERE' => 'group_id=' . $req_group,
|
||||||
'ORDER BY' => 'acl_name ASC'
|
'ORDER BY' => 'acl_name ASC'
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -716,9 +716,9 @@ case 'group_acl':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$acls[] = [
|
$acls[] = [
|
||||||
'acl_title' => ! empty( $lang['ACLS_' . strtoupper($row['acl_name'])] ) ? $lang['ACLS_' . strtoupper($row['acl_name'])] : $olang['ACLS_' . strtoupper($row['acl_name'])],
|
'acl_title' => ! empty($lang['ACLS_' . strtoupper($row['acl_name'])]) ? $lang['ACLS_' . strtoupper($row['acl_name'])] : $olang['ACLS_' . strtoupper($row['acl_name'])],
|
||||||
'acl_name' => $row['acl_name'],
|
'acl_name' => $row['acl_name'],
|
||||||
'acl_can' => (int) $row['acl_can']
|
'acl_can' => (int) $row['acl_can']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
@@ -730,9 +730,9 @@ case 'group_acl':
|
|||||||
if (sizeof($submitted_on_acls))
|
if (sizeof($submitted_on_acls))
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}groups_acl",
|
'UPDATE' => "{$dbprefix}groups_acl",
|
||||||
'SET' => 'acl_can=1',
|
'SET' => 'acl_can=1',
|
||||||
'WHERE' => "acl_name IN ('" . implode("', '", $submitted_on_acls) . "') AND group_id=" . $req_group
|
'WHERE' => "acl_name IN ('" . implode("', '", $submitted_on_acls) . "') AND group_id=" . $req_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -742,9 +742,9 @@ case 'group_acl':
|
|||||||
if (sizeof($submitted_off_acls))
|
if (sizeof($submitted_off_acls))
|
||||||
{
|
{
|
||||||
$update_query2 = [
|
$update_query2 = [
|
||||||
'UPDATE' => "{$dbprefix}groups_acl",
|
'UPDATE' => "{$dbprefix}groups_acl",
|
||||||
'SET' => 'acl_can=0',
|
'SET' => 'acl_can=0',
|
||||||
'WHERE' => "acl_name IN ('" . implode("', '", $submitted_off_acls) . "') AND group_id=" . $req_group
|
'WHERE' => "acl_name IN ('" . implode("', '", $submitted_off_acls) . "') AND group_id=" . $req_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query2);
|
$SQL->build($update_query2);
|
||||||
@@ -754,7 +754,7 @@ case 'group_acl':
|
|||||||
delete_cache('data_groups');
|
delete_cache('data_groups');
|
||||||
kleeja_admin_info($lang['CONFIGS_UPDATED'], true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
kleeja_admin_info($lang['CONFIGS_UPDATED'], true, '', true, basename(ADMIN_PATH) . '?cp=g_users');
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//handling editing settings for the requested group
|
//handling editing settings for the requested group
|
||||||
@@ -795,7 +795,7 @@ case 'group_data':
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
update_config('language', $got_lang, true, $req_group);
|
update_config('language', $got_lang, true, $req_group);
|
||||||
$group_name = str_replace(
|
$group_name = str_replace(
|
||||||
['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$req_group]['data']['group_name']
|
$d_groups[$req_group]['data']['group_name']
|
||||||
@@ -812,16 +812,16 @@ case 'group_data':
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
$group_name = str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$req_group]['data']['group_name']);
|
$d_groups[$req_group]['data']['group_name']);
|
||||||
$gdata = $d_groups[$req_group]['data'];
|
$gdata = $d_groups[$req_group]['data'];
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'c.name, c.option',
|
'SELECT' => 'c.name, c.option, c.value',
|
||||||
'FROM' => "{$dbprefix}config c",
|
'FROM' => "{$dbprefix}config c",
|
||||||
'WHERE' => "c.type='groups'",
|
'WHERE' => "c.type='groups'",
|
||||||
'ORDER BY' => 'c.display_order ASC'
|
'ORDER BY' => 'c.display_order ASC'
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -840,9 +840,9 @@ case 'group_data':
|
|||||||
$new[$row['name']] = p($row['name'], 'str', $row['value']);
|
$new[$row['name']] = p($row['name'], 'str', $row['value']);
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}groups_data",
|
'UPDATE' => "{$dbprefix}groups_data",
|
||||||
'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'",
|
'SET' => "value='" . $SQL->escape($new[$row['name']]) . "'",
|
||||||
'WHERE' => "name='" . $row['name'] . "' AND group_id=" . $req_group
|
'WHERE' => "name='" . $row['name'] . "' AND group_id=" . $req_group
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -852,6 +852,8 @@ case 'group_data':
|
|||||||
|
|
||||||
if ($row['name'] == 'language')
|
if ($row['name'] == 'language')
|
||||||
{
|
{
|
||||||
|
$lngfiles = '';
|
||||||
|
|
||||||
//get languages
|
//get languages
|
||||||
if ($dh = @opendir(PATH . 'lang'))
|
if ($dh = @opendir(PATH . 'lang'))
|
||||||
{
|
{
|
||||||
@@ -872,7 +874,7 @@ case 'group_data':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'option' =>
|
'option' =>
|
||||||
str_replace(
|
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">', '', ''],
|
||||||
@@ -892,9 +894,9 @@ case 'group_data':
|
|||||||
if (p('group_is_default', 'int') == 1)
|
if (p('group_is_default', 'int') == 1)
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}groups",
|
'UPDATE' => "{$dbprefix}groups",
|
||||||
'SET' => 'group_is_default=0',
|
'SET' => 'group_is_default=0',
|
||||||
'WHERE' => 'group_is_default=1'
|
'WHERE' => 'group_is_default=1'
|
||||||
];
|
];
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
|
|
||||||
@@ -905,9 +907,9 @@ case 'group_data':
|
|||||||
|
|
||||||
//update not-configs data
|
//update not-configs data
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}groups",
|
'UPDATE' => "{$dbprefix}groups",
|
||||||
'SET' => 'group_is_default=' . p('group_is_default', 'int') . (ip('group_name') ? ", group_name='" . $SQL->escape(p('group_name')) . "'" : ''),
|
'SET' => 'group_is_default=' . p('group_is_default', 'int') . (ip('group_name') ? ", group_name='" . $SQL->escape(p('group_name')) . "'" : ''),
|
||||||
'WHERE' => 'group_id=' . $req_group
|
'WHERE' => 'group_id=' . $req_group
|
||||||
];
|
];
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
|
|
||||||
@@ -927,55 +929,11 @@ case 'group_exts':
|
|||||||
kleeja_admin_err('ERROR-NO-ID', true, '', true, basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
|
kleeja_admin_err('ERROR-NO-ID', true, '', true, basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$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']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$req_group]['data']['group_name']);
|
$d_groups[$req_group]['data']['group_name']);
|
||||||
|
|
||||||
|
|
||||||
//check if there is klj_exts which means this is an upgraded website !
|
|
||||||
if (empty($config['exts_upraded1_5']))
|
|
||||||
{
|
|
||||||
$ex_exts = $SQL->query("SHOW TABLES LIKE '{$dbprefix}exts';");
|
|
||||||
|
|
||||||
if ($SQL->num_rows($ex_exts))
|
|
||||||
{
|
|
||||||
$xquery = [
|
|
||||||
'SELECT' => 'ext, gust_size, user_size, gust_allow, user_allow',
|
|
||||||
'FROM' => "{$dbprefix}exts",
|
|
||||||
'WHERE' => 'gust_allow=1 OR user_allow=1',
|
|
||||||
];
|
|
||||||
|
|
||||||
$xresult = $SQL->build($xquery);
|
|
||||||
|
|
||||||
$xexts = '';
|
|
||||||
while ($row=$SQL->fetch_array($xresult))
|
|
||||||
{
|
|
||||||
if ($row['gust_allow'])
|
|
||||||
{
|
|
||||||
$xexts .= ($xexts == '' ? '' : ',') . "('" . $SQL->escape($row['ext']) . "', 2, " . $row['gust_size'] . ')';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($row['user_allow'])
|
|
||||||
{
|
|
||||||
$xexts .= ($xexts == '' ? '' : ',') . "('" . $SQL->escape($row['ext']) . "', 3, " . $row['user_size'] . ')';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$SQL->freeresult($result);
|
|
||||||
|
|
||||||
//delete prev exts before adding
|
|
||||||
$query_del = [
|
|
||||||
'DELETE' => "{$dbprefix}groups_exts",
|
|
||||||
'WHERE' => 'group_id=2 OR group_id=3'
|
|
||||||
];
|
|
||||||
|
|
||||||
$SQL->build($query_del);
|
|
||||||
|
|
||||||
$SQL->query("INSERT INTO {$dbprefix}groups_exts (ext, group_id, size) VALUES " . $xexts . ';');
|
|
||||||
|
|
||||||
add_config('exts_upraded1_5', 'done');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//delete ext?
|
//delete ext?
|
||||||
$DELETED_EXT = $GE_INFO = false;
|
$DELETED_EXT = $GE_INFO = false;
|
||||||
@@ -995,9 +953,9 @@ case 'group_exts':
|
|||||||
kleeja_admin_err('ERROR-NO-EXT-ID', true, '', true, $action, 2);
|
kleeja_admin_err('ERROR-NO-EXT-ID', true, '', true, $action, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}groups_exts",
|
'DELETE' => "{$dbprefix}groups_exts",
|
||||||
'WHERE' => 'ext_id=' . $req_ext
|
'WHERE' => 'ext_id=' . $req_ext
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
@@ -1035,9 +993,9 @@ case 'group_exts':
|
|||||||
|
|
||||||
//check if there is any exists of this ext in db
|
//check if there is any exists of this ext in db
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}groups_exts",
|
'FROM' => "{$dbprefix}groups_exts",
|
||||||
'WHERE' => "ext='" . $new_ext . "' and group_id=" . $req_group,
|
'WHERE' => "ext='" . $new_ext . "' and group_id=" . $req_group,
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -1048,11 +1006,11 @@ case 'group_exts':
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add
|
//add
|
||||||
$default_size = '2097152';//bytes
|
$default_size = '2097152';//bytes
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'ext ,group_id, size',
|
'INSERT' => 'ext ,group_id, size',
|
||||||
'INTO' => "{$dbprefix}groups_exts",
|
'INTO' => "{$dbprefix}groups_exts",
|
||||||
'VALUES' => "'$new_ext', $req_group, $default_size"
|
'VALUES' => "'$new_ext', $req_group, $default_size"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
@@ -1072,9 +1030,9 @@ case 'group_exts':
|
|||||||
foreach ($ext_ids as $e_id=>$e_val)
|
foreach ($ext_ids as $e_id=>$e_val)
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}groups_exts",
|
'UPDATE' => "{$dbprefix}groups_exts",
|
||||||
'SET' => 'size=' . (intval($e_val)*1024),
|
'SET' => 'size=' . (intval($e_val)*1024),
|
||||||
'WHERE' => 'ext_id=' . intval($e_id) . ' AND group_id=' . $req_group
|
'WHERE' => 'ext_id=' . intval($e_id) . ' AND group_id=' . $req_group
|
||||||
];
|
];
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
}
|
}
|
||||||
@@ -1087,10 +1045,10 @@ case 'group_exts':
|
|||||||
|
|
||||||
//show exts
|
//show exts
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'ext_id, ext, size',
|
'SELECT' => 'ext_id, ext, size',
|
||||||
'FROM' => "{$dbprefix}groups_exts",
|
'FROM' => "{$dbprefix}groups_exts",
|
||||||
'WHERE' => 'group_id=' . $req_group,
|
'WHERE' => 'group_id=' . $req_group,
|
||||||
'ORDER BY' => 'ext_id ASC'
|
'ORDER BY' => 'ext_id ASC'
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -1102,10 +1060,10 @@ case 'group_exts':
|
|||||||
$size = preg_match('/^[0-9]+/', $row['size'], $matches) ? $matches[0] : 0;
|
$size = preg_match('/^[0-9]+/', $row['size'], $matches) ? $matches[0] : 0;
|
||||||
|
|
||||||
$exts[] = [
|
$exts[] = [
|
||||||
'ext_id' => $row['ext_id'],
|
'ext_id' => $row['ext_id'],
|
||||||
'ext_name' => $row['ext'],
|
'ext_name' => $row['ext'],
|
||||||
'ext_size' => round($size / 1024),
|
'ext_size' => round($size / 1024),
|
||||||
'ext_icon' => file_exists(PATH . 'images/filetypes/' . $row['ext'] . '.png') ? PATH . 'images/filetypes/' . $row['ext'] . '.png' : PATH . 'images/filetypes/file.png'
|
'ext_icon' => file_exists(PATH . 'images/filetypes/' . $row['ext'] . '.png') ? PATH . 'images/filetypes/' . $row['ext'] . '.png' : PATH . 'images/filetypes/file.png'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
@@ -1123,33 +1081,33 @@ case 'show_su':
|
|||||||
kleeja_admin_err($lang['ERROR_TRY_AGAIN'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search&smt=users', 1);
|
kleeja_admin_err($lang['ERROR_TRY_AGAIN'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search&smt=users', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$search = unserialize(htmlspecialchars_decode($filter['filter_value']));
|
$search = unserialize(htmlspecialchars_decode($filter['filter_value']));
|
||||||
|
|
||||||
$usernamee = $search['username'] != '' ? 'AND (name LIKE \'%' . $SQL->escape($search['username']) . '%\' OR clean_name LIKE \'%' . $SQL->escape($search['username']) . '%\') ' : '';
|
$usernamee = $search['username'] != '' ? 'AND (name LIKE \'%' . $SQL->escape($search['username']) . '%\' OR clean_name LIKE \'%' . $SQL->escape($search['username']) . '%\') ' : '';
|
||||||
$usermailee = $search['usermail'] != '' ? 'AND mail LIKE \'%' . $SQL->escape($search['usermail']) . '%\' ' : '';
|
$usermailee = $search['usermail'] != '' ? 'AND mail LIKE \'%' . $SQL->escape($search['usermail']) . '%\' ' : '';
|
||||||
$is_search = true;
|
$is_search = true;
|
||||||
|
|
||||||
$query['WHERE'] = "name <> '' $usernamee $usermailee";
|
$query['WHERE'] = "name <> '' $usernamee $usermailee";
|
||||||
|
|
||||||
//show users (for requested group)
|
//show users (for requested group)
|
||||||
case 'show_group':
|
case 'show_group':
|
||||||
if ($current_smt != 'show_su')
|
if ($current_smt != 'show_su')
|
||||||
{
|
{
|
||||||
$is_search = true;
|
$is_search = true;
|
||||||
$req_group = ig('qg') ? g('qg', 'int') : 0;
|
$req_group = ig('qg') ? g('qg', 'int') : 0;
|
||||||
$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']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$req_group]['data']['group_name']);
|
$d_groups[$req_group]['data']['group_name']);
|
||||||
|
|
||||||
$query['WHERE'] = "name != '' AND group_id = " . $req_group;
|
$query['WHERE'] = "name != '' AND group_id = " . $req_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
//show users (all)
|
//show users (all)
|
||||||
case 'users':
|
case 'users':
|
||||||
|
|
||||||
$query['SELECT'] = 'COUNT(id) AS total_users';
|
$query['SELECT'] = 'COUNT(id) AS total_users';
|
||||||
$query['FROM'] = "{$dbprefix}users";
|
$query['FROM'] = "{$dbprefix}users";
|
||||||
$query['ORDER BY'] = 'id ASC';
|
$query['ORDER BY'] = 'id ASC';
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
@@ -1159,16 +1117,16 @@ case 'users':
|
|||||||
$nums_rows = $n_fetch['total_users'];
|
$nums_rows = $n_fetch['total_users'];
|
||||||
|
|
||||||
//pagination
|
//pagination
|
||||||
$currentPage = ig('page') ? g('page', 'int') : 1;
|
$currentPage = ig('page') ? g('page', 'int') : 1;
|
||||||
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
$Pager = new Pagination($perpage, $nums_rows, $currentPage);
|
||||||
$start = $Pager->getStartRow();
|
$start = $Pager->getStartRow();
|
||||||
|
|
||||||
$no_results = false;
|
$no_results = false;
|
||||||
|
|
||||||
if ($nums_rows > 0)
|
if ($nums_rows > 0)
|
||||||
{
|
{
|
||||||
$query['SELECT'] = 'id, name, founder, group_id, last_visit';
|
$query['SELECT'] = 'id, name, founder, group_id, last_visit';
|
||||||
$query['LIMIT'] = "$start, $perpage";
|
$query['LIMIT'] = "$start, $perpage";
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
@@ -1176,16 +1134,16 @@ case 'users':
|
|||||||
{
|
{
|
||||||
$userfile = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $row['id'] . '.html' : 'ucp.php?go=fileuser&id=' . $row['id']);
|
$userfile = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $row['id'] . '.html' : 'ucp.php?go=fileuser&id=' . $row['id']);
|
||||||
|
|
||||||
$arr[] = [
|
$arr[] = [
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
'userfile_link' => $userfile,
|
'userfile_link' => $userfile,
|
||||||
'delusrfile_link' => $row['founder'] && (int) $userinfo['founder'] == 0 ? false : basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deleteuserfile=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
'delusrfile_link' => $row['founder'] && (int) $userinfo['founder'] == 0 ? false : basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&deleteuserfile=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
||||||
'delusr_link' => $userinfo['id'] == $row['id'] || ($row['founder'] && (int) $userinfo['founder'] == 0) ? false : basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&del_user=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
'delusr_link' => $userinfo['id'] == $row['id'] || ($row['founder'] && (int) $userinfo['founder'] == 0) ? false : basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&del_user=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
||||||
'editusr_link' => basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=edit_user&uid=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
'editusr_link' => basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=edit_user&uid=' . $row['id'] . (ig('page') ? '&page=' . g('page', 'int') : ''),
|
||||||
'founder' => (int) $row['founder'],
|
'founder' => (int) $row['founder'],
|
||||||
'last_visit' => empty($row['last_visit']) ? $lang['NOT_YET'] : kleeja_date($row['last_visit']),
|
'last_visit' => empty($row['last_visit']) ? $lang['NOT_YET'] : kleeja_date($row['last_visit']),
|
||||||
'group' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
'group' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$row['group_id']]['data']['group_name'])
|
$d_groups[$row['group_id']]['data']['group_name'])
|
||||||
];
|
];
|
||||||
@@ -1199,11 +1157,11 @@ case 'users':
|
|||||||
}
|
}
|
||||||
|
|
||||||
//pages
|
//pages
|
||||||
$total_pages = $Pager->getTotalPages();
|
$total_pages = $Pager->getTotalPages();
|
||||||
$page_nums = $Pager->print_nums(
|
$page_nums = $Pager->print_nums(
|
||||||
basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('search_id') ? '&search_id=' . g('search_id') : '')
|
basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . (ig('search_id') ? '&search_id=' . g('search_id') : '')
|
||||||
. (ig('qg') ? '&qg=' . g('qg', 'int') : '') . (ig('smt') ? '&smt=' . $current_smt : '')
|
. (ig('qg') ? '&qg=' . g('qg', 'int') : '') . (ig('smt') ? '&smt=' . $current_smt : '')
|
||||||
);
|
);
|
||||||
|
|
||||||
$show_results = true;
|
$show_results = true;
|
||||||
|
|
||||||
@@ -1219,25 +1177,29 @@ case 'edit_user':
|
|||||||
|
|
||||||
if (! $SQL->num_rows($SQL->query("SELECT * FROM {$dbprefix}users WHERE id=" . $userid)))
|
if (! $SQL->num_rows($SQL->query("SELECT * FROM {$dbprefix}users WHERE id=" . $userid)))
|
||||||
{
|
{
|
||||||
kleeja_admin_err('ERROR-NO-USER-FOUND', true, '', true, basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
|
kleeja_admin_err($lang['NOT_EXSIT_USER'], true, '', true, basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'name, mail, group_id, founder, show_my_filecp',
|
'SELECT' => 'name, mail, group_id, founder, show_my_filecp',
|
||||||
'FROM' => "{$dbprefix}users",
|
'FROM' => "{$dbprefix}users",
|
||||||
'WHERE' => 'id=' . $userid,
|
'WHERE' => 'id=' . $userid,
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
if (! $SQL->num_rows($result))
|
||||||
|
{
|
||||||
|
kleeja_admin_err($lang['NOT_EXSIT_USER'], true, '', true, basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php'));
|
||||||
|
}
|
||||||
$udata = $SQL->fetch_array($result);
|
$udata = $SQL->fetch_array($result);
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//If founder, just founder can edit him;
|
//If founder, just founder can edit him;
|
||||||
$u_founder = ip('l_founder') ? p('l_founder', 'int') : (int) $udata['founder'];
|
$u_founder = ip('l_founder') ? p('l_founder', 'int') : (int) $udata['founder'];
|
||||||
$im_founder = (int) $userinfo['founder'];
|
$im_founder = (int) $userinfo['founder'];
|
||||||
$u_group = ip('l_group') ? p('l_group', 'int') : $udata['group_id'];
|
$u_group = ip('l_group') ? p('l_group', 'int') : $udata['group_id'];
|
||||||
$u_qg = ip('l_qg') ? p('u_qg', 'int') : $udata['group_id'];
|
$u_qg = ip('l_qg') ? p('u_qg', 'int') : $udata['group_id'];
|
||||||
|
|
||||||
if ($u_founder && ! $im_founder)
|
if ($u_founder && ! $im_founder)
|
||||||
{
|
{
|
||||||
@@ -1246,9 +1208,9 @@ case 'edit_user':
|
|||||||
|
|
||||||
$errs = isset($errs) ? $errs : false;
|
$errs = isset($errs) ? $errs : false;
|
||||||
//prepare them for the template
|
//prepare them for the template
|
||||||
$title_name = $udata['name'];
|
$title_name = $udata['name'];
|
||||||
$u_name = p('l_name', 'str', $udata['name']);
|
$u_name = p('l_name', 'str', $udata['name']);
|
||||||
$u_mail = p('l_mail', 'str', $udata['mail']);
|
$u_mail = p('l_mail', 'str', $udata['mail']);
|
||||||
|
|
||||||
$u_show_filecp = p('l_show_filecp', 'int', $udata['show_my_filecp']);
|
$u_show_filecp = p('l_show_filecp', 'int', $udata['show_my_filecp']);
|
||||||
|
|
||||||
@@ -1260,12 +1222,12 @@ case 'edit_user':
|
|||||||
foreach ($k_groups as $id)
|
foreach ($k_groups as $id)
|
||||||
{
|
{
|
||||||
$u_groups[] = [
|
$u_groups[] = [
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$id]['data']['group_name']),
|
$d_groups[$id]['data']['group_name']),
|
||||||
'default' => $config['default_group'] == $id ? true : false,
|
'default' => $config['default_group'] == $id ? true : false,
|
||||||
'selected' => $id == $u_group
|
'selected' => $id == $u_group
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1276,9 +1238,9 @@ break;
|
|||||||
case 'new_u':
|
case 'new_u':
|
||||||
|
|
||||||
//preparing the template
|
//preparing the template
|
||||||
$errs = isset($errs) ? $errs : false;
|
$errs = isset($errs) ? $errs : false;
|
||||||
$uname = p('lname');
|
$uname = p('lname');
|
||||||
$umail = p('lmail');
|
$umail = p('lmail');
|
||||||
|
|
||||||
$k_groups = array_keys($d_groups);
|
$k_groups = array_keys($d_groups);
|
||||||
$u_groups = [];
|
$u_groups = [];
|
||||||
@@ -1286,12 +1248,12 @@ case 'new_u':
|
|||||||
foreach ($k_groups as $id)
|
foreach ($k_groups as $id)
|
||||||
{
|
{
|
||||||
$u_groups[] = [
|
$u_groups[] = [
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
'name' => str_replace(['{lang.ADMINS}', '{lang.USERS}', '{lang.GUESTS}'],
|
||||||
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
[$lang['ADMINS'], $lang['USERS'], $lang['GUESTS']],
|
||||||
$d_groups[$id]['data']['group_name']),
|
$d_groups[$id]['data']['group_name']),
|
||||||
'default' => $config['default_group'] == $id ? true : false,
|
'default' => $config['default_group'] == $id ? true : false,
|
||||||
'selected' => ip('lgroup') ? p('lgroup') == $id : $id == $config['default_group']
|
'selected' => ip('lgroup') ? p('lgroup') == $id : $id == $config['default_group']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1300,15 +1262,15 @@ break;
|
|||||||
endswitch;
|
endswitch;
|
||||||
|
|
||||||
|
|
||||||
//after submit
|
//after submit
|
||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
$g_link = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) .
|
$g_link = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&page=' . (ig('page') ? g('page', 'int') : 1) .
|
||||||
(ig('search_id') ? '&search_id=' . g('search_id') : '') . '&smt=' . $current_smt;
|
(ig('search_id') ? '&search_id=' . g('search_id') : '') . '&smt=' . $current_smt;
|
||||||
|
|
||||||
$text = ($affected ? $lang['USERS_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
$text = ($affected ? $lang['USERS_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
|
||||||
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . str_replace('&', '&', $g_link) . '\');", 2000);</script>' . "\n";
|
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . str_replace('&', '&', $g_link) . '\');", 2000);</script>' . "\n";
|
||||||
$stylee = 'admin_info';
|
$stylee = 'admin_info';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1319,7 +1281,7 @@ $go_menu = [
|
|||||||
'show_su' => ['name'=>$lang['SEARCH_USERS'], 'link'=> basename(ADMIN_PATH) . '?cp=h_search&smt=users', 'goto'=>'show_su', 'current'=> $current_smt == 'show_su'],
|
'show_su' => ['name'=>$lang['SEARCH_USERS'], 'link'=> basename(ADMIN_PATH) . '?cp=h_search&smt=users', 'goto'=>'show_su', 'current'=> $current_smt == 'show_su'],
|
||||||
];
|
];
|
||||||
|
|
||||||
//user adding is not allowed in integration
|
//user adding is not allowed in integration
|
||||||
if (! $user_not_normal)
|
if (! $user_not_normal)
|
||||||
{
|
{
|
||||||
$go_menu['new_u'] = ['name'=>$lang['NEW_USER'], 'link'=> basename(ADMIN_PATH) . '?cp=g_users&smt=new_u', 'goto'=>'new_u', 'current'=> $current_smt == 'new_u'];
|
$go_menu['new_u'] = ['name'=>$lang['NEW_USER'], 'link'=> basename(ADMIN_PATH) . '?cp=g_users&smt=new_u', 'goto'=>'new_u', 'current'=> $current_smt == 'new_u'];
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ $stylee = 'admin_search';
|
|||||||
$action = basename(ADMIN_PATH) . '?cp=h_search';
|
$action = basename(ADMIN_PATH) . '?cp=h_search';
|
||||||
|
|
||||||
//wut the default user system
|
//wut the default user system
|
||||||
$default_user_system = (int) $config['user_system'] == 1 ? true : false;
|
$default_user_system = (int) $config['user_system'] == 1;
|
||||||
|
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_files_search');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_files_search');
|
||||||
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_search');
|
$H_FORM_KEYS2 = kleeja_add_form_key('adm_users_search');
|
||||||
|
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'files'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'files'));
|
||||||
|
|
||||||
//filling the inputs automatically via GET
|
//filling the inputs automatically via GET
|
||||||
$filled_ip = $filled_username = '';
|
$filled_ip = $filled_username = '';
|
||||||
@@ -50,33 +50,13 @@ if (ip('search_file'))
|
|||||||
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search', 1);
|
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete all searches greater than 10
|
//delete all searches greater than 3 days
|
||||||
$s_del = [
|
$query_del = [
|
||||||
'SELECT' => 'filter_id',
|
'DELETE' => "{$dbprefix}filters",
|
||||||
'FROM' => "{$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'],
|
|
||||||
'ORDER BY' => 'filter_id DESC',
|
|
||||||
'LIMIT' => '5, 18446744073709551615'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($s_del);
|
$SQL->build($query_del);
|
||||||
$ids = [];
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
|
||||||
{
|
|
||||||
$ids[] = $row['filter_id'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$SQL->free($result);
|
|
||||||
|
|
||||||
if ($ids != '')
|
|
||||||
{
|
|
||||||
$query_del = [
|
|
||||||
'DELETE' => "{$dbprefix}filters",
|
|
||||||
'WHERE' => "filter_id IN('" . implode("', '", $ids) . "')"
|
|
||||||
];
|
|
||||||
|
|
||||||
$SQL->build($query_del);
|
|
||||||
}
|
|
||||||
|
|
||||||
//add as a file_search filter
|
//add as a file_search filter
|
||||||
$s = array_map('htmlspecialchars', $_POST);
|
$s = array_map('htmlspecialchars', $_POST);
|
||||||
@@ -113,32 +93,14 @@ if (ip('search_user'))
|
|||||||
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search&smt=users', 1);
|
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, basename(ADMIN_PATH) . '?cp=h_search&smt=users', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete all searches greater than 10
|
//delete all searches greater than 3 days
|
||||||
$s_del = [
|
$query_del = [
|
||||||
'SELECT' => 'filter_id',
|
'DELETE' => "{$dbprefix}filters",
|
||||||
'FROM' => "{$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'],
|
|
||||||
'ORDER BY' => 'filter_id DESC',
|
|
||||||
'LIMIT' => '5, 18446744073709551615'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($s_del);
|
|
||||||
$ids = [];
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
|
||||||
{
|
|
||||||
$ids[] = $row['filter_id'];
|
|
||||||
}
|
|
||||||
$SQL->free($result);
|
|
||||||
|
|
||||||
if ($ids != '')
|
|
||||||
{
|
|
||||||
$query_del = [
|
|
||||||
'DELETE' => "{$dbprefix}filters",
|
|
||||||
'WHERE' => "filter_id IN('" . implode("', '", $ids) . "')"
|
|
||||||
];
|
|
||||||
|
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
}
|
|
||||||
|
|
||||||
//add as a user_search filter
|
//add as a user_search filter
|
||||||
$s = $_POST;
|
$s = $_POST;
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ switch ($case):
|
|||||||
|
|
||||||
while ($row = $SQL->fetch($result))
|
while ($row = $SQL->fetch($result))
|
||||||
{
|
{
|
||||||
|
if (! file_exists(PATH . KLEEJA_PLUGINS_FOLDER . '/' . $row['plg_name'] . '/init.php'))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$installed_plugins[$row['plg_name']] = $row;
|
$installed_plugins[$row['plg_name']] = $row;
|
||||||
|
|
||||||
$installed_plugins[$row['plg_name']]['extra_info'] = Plugins::getInstance()->installed_plugin_info($row['plg_name']);
|
$installed_plugins[$row['plg_name']]['extra_info'] = Plugins::getInstance()->installed_plugin_info($row['plg_name']);
|
||||||
@@ -84,29 +89,35 @@ switch ($case):
|
|||||||
? 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';
|
||||||
|
|
||||||
foreach (['plugin_title', 'plugin_description'] as $localizedInfo)
|
$installed_plugins[$row['plg_name']]['has_settings_page'] = ! empty(
|
||||||
|
$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)
|
||||||
{
|
{
|
||||||
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] =
|
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo][$config['language']], 100);
|
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] =
|
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo]['en'], 100);
|
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localized_info]['en'], 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo] =
|
$installed_plugins[$row['plg_name']]['extra_info'][$localized_info] =
|
||||||
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localizedInfo][0], 100);
|
shorten_text($installed_plugins[$row['plg_name']]['extra_info'][$localized_info][0], 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//get available plugins
|
//get available plugins
|
||||||
$dh = opendir(PATH . KLEEJA_PLUGINS_FOLDER);
|
$dh = opendir(PATH . KLEEJA_PLUGINS_FOLDER);
|
||||||
@@ -144,7 +155,7 @@ switch ($case):
|
|||||||
{
|
{
|
||||||
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
||||||
|
|
||||||
$store_catalog = fetch_remote_file($store_link);
|
$store_catalog = FetchFile::make($store_link)->get();
|
||||||
$store_catalog = json_decode($store_catalog, true);
|
$store_catalog = json_decode($store_catalog, true);
|
||||||
|
|
||||||
if (json_last_error() == JSON_ERROR_NONE)
|
if (json_last_error() == JSON_ERROR_NONE)
|
||||||
@@ -165,6 +176,20 @@ switch ($case):
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($plugin_info['preview']) && defined('DEV_STAGE'))
|
||||||
|
{
|
||||||
|
$plugin_file = $plugin_info['preview'];
|
||||||
|
}
|
||||||
|
elseif (isset($plugin_info['file']))
|
||||||
|
{
|
||||||
|
$plugin_file = $plugin_info['file'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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']]))
|
||||||
) {
|
) {
|
||||||
@@ -175,7 +200,7 @@ switch ($case):
|
|||||||
elseif ($case == 'check' && (! empty($installed_plugins[$plugin_info['name']]) &&
|
elseif ($case == 'check' && (! empty($installed_plugins[$plugin_info['name']]) &&
|
||||||
version_compare(
|
version_compare(
|
||||||
strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']),
|
strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']),
|
||||||
strtolower($plugin_info['file']['version']),
|
strtolower($plugin_file['version']),
|
||||||
'>='
|
'>='
|
||||||
) || empty($installed_plugins[$plugin_info['name']]))
|
) || empty($installed_plugins[$plugin_info['name']]))
|
||||||
) {
|
) {
|
||||||
@@ -185,7 +210,7 @@ switch ($case):
|
|||||||
$store_plugins[$plugin_info['name']] = [
|
$store_plugins[$plugin_info['name']] = [
|
||||||
'name' => $plugin_info['name'],
|
'name' => $plugin_info['name'],
|
||||||
'developer' => $plugin_info['developer'],
|
'developer' => $plugin_info['developer'],
|
||||||
'version' => $plugin_info['file']['version'],
|
'version' => $plugin_file['version'],
|
||||||
'title' => ! empty($plugin_info['title'][$config['language']]) ? $plugin_info['title'][$config['language']] : $plugin_info['title']['en'],
|
'title' => ! empty($plugin_info['title'][$config['language']]) ? $plugin_info['title'][$config['language']] : $plugin_info['title']['en'],
|
||||||
'website' => $plugin_info['website'],
|
'website' => $plugin_info['website'],
|
||||||
'current_version' => ! empty($installed_plugins[$plugin_info['name']]) ? strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']) : '',
|
'current_version' => ! empty($installed_plugins[$plugin_info['name']]) ? strtolower($installed_plugins[$plugin_info['name']]['extra_info']['plugin_version']) : '',
|
||||||
@@ -275,7 +300,7 @@ switch ($case):
|
|||||||
|
|
||||||
if (empty($plg_name))
|
if (empty($plg_name))
|
||||||
{
|
{
|
||||||
if (defined('DEBUG'))
|
if (defined('DEV_STAGE'))
|
||||||
{
|
{
|
||||||
exit('empty($plg_name)');
|
exit('empty($plg_name)');
|
||||||
}
|
}
|
||||||
@@ -286,7 +311,7 @@ switch ($case):
|
|||||||
{
|
{
|
||||||
if (! file_exists(PATH . KLEEJA_PLUGINS_FOLDER . '/' . $plg_name . '/init.php'))
|
if (! file_exists(PATH . KLEEJA_PLUGINS_FOLDER . '/' . $plg_name . '/init.php'))
|
||||||
{
|
{
|
||||||
if (defined('DEBUG'))
|
if (defined('DEV_STAGE'))
|
||||||
{
|
{
|
||||||
exit('!file_exists($plg_name)');
|
exit('!file_exists($plg_name)');
|
||||||
}
|
}
|
||||||
@@ -306,7 +331,13 @@ switch ($case):
|
|||||||
|
|
||||||
$kleeja_plugin = [];
|
$kleeja_plugin = [];
|
||||||
|
|
||||||
include PATH . KLEEJA_PLUGINS_FOLDER . '/' . $plg_name . '/init.php';
|
//don't show mysql errors
|
||||||
|
if (! defined('SQL_NO_ERRORS'))
|
||||||
|
{
|
||||||
|
define('SQL_NO_ERRORS', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include PATH . KLEEJA_PLUGINS_FOLDER . '/' . $plg_name . '/init.php';
|
||||||
|
|
||||||
$install_callback = $kleeja_plugin[$plg_name]['install'];
|
$install_callback = $kleeja_plugin[$plg_name]['install'];
|
||||||
$plugin_info = $kleeja_plugin[$plg_name]['information'];
|
$plugin_info = $kleeja_plugin[$plg_name]['information'];
|
||||||
@@ -325,10 +356,13 @@ switch ($case):
|
|||||||
//'plugin_kleeja_version_min' => '1.8',
|
//'plugin_kleeja_version_min' => '1.8',
|
||||||
// Max version of Kleeja that's required to run this plugin
|
// Max version of Kleeja that's required to run this plugin
|
||||||
//'plugin_kleeja_version_max' => '3.8',
|
//'plugin_kleeja_version_max' => '3.8',
|
||||||
|
//3.1.0 < 3.1.0
|
||||||
|
|
||||||
if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_min'], '<'))
|
if (! empty($plugin_info['plugin_kleeja_version_min']))
|
||||||
{
|
{
|
||||||
kleeja_admin_info(
|
if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_min'], '<'))
|
||||||
|
{
|
||||||
|
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,
|
||||||
'',
|
'',
|
||||||
@@ -336,10 +370,11 @@ switch ($case):
|
|||||||
ADMIN_PATH . '?cp=' . basename(__FILE__, '.php')
|
ADMIN_PATH . '?cp=' . basename(__FILE__, '.php')
|
||||||
);
|
);
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($plugin_info['plugin_kleeja_version_max'] != '0')
|
if (! empty($plugin_info['plugin_kleeja_version_max']))
|
||||||
{
|
{
|
||||||
if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_max'], '>'))
|
if (version_compare(KLEEJA_VERSION, $plugin_info['plugin_kleeja_version_max'], '>'))
|
||||||
{
|
{
|
||||||
@@ -552,7 +587,7 @@ switch ($case):
|
|||||||
// plugins avilable in kleeja store
|
// plugins avilable in kleeja store
|
||||||
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
||||||
|
|
||||||
$catalog_plugins = fetch_remote_file($store_link);
|
$catalog_plugins = FetchFile::make($store_link)->get();
|
||||||
|
|
||||||
if ($catalog_plugins)
|
if ($catalog_plugins)
|
||||||
{
|
{
|
||||||
@@ -568,10 +603,24 @@ switch ($case):
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($plugin_info['preview']) && defined('DEV_STAGE'))
|
||||||
|
{
|
||||||
|
$plugin_file = $plugin_info['preview'];
|
||||||
|
}
|
||||||
|
elseif (isset($plugin_info['file']))
|
||||||
|
{
|
||||||
|
$plugin_file = $plugin_info['file'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$store_plugins[$plugin_info['name']] = [
|
$store_plugins[$plugin_info['name']] = [
|
||||||
'name' => $plugin_info['name'],
|
'name' => $plugin_info['name'],
|
||||||
'plg_version' => $plugin_info['file']['version'],
|
'plg_version' => $plugin_file['version'],
|
||||||
'url' => $plugin_info['file']['url'],
|
'url' => $plugin_file['url'],
|
||||||
'kj_min_version' => $plugin_info['kleeja_version']['min'],
|
'kj_min_version' => $plugin_info['kleeja_version']['min'],
|
||||||
'kj_max_version' => $plugin_info['kleeja_version']['max'],
|
'kj_max_version' => $plugin_info['kleeja_version']['max'],
|
||||||
];
|
];
|
||||||
@@ -587,7 +636,10 @@ switch ($case):
|
|||||||
) {
|
) {
|
||||||
$plugin_name_link = $store_plugins[$plugin_name]['url'];
|
$plugin_name_link = $store_plugins[$plugin_name]['url'];
|
||||||
|
|
||||||
$plugin_archive = fetch_remote_file($plugin_name_link, PATH . 'cache/' . $plugin_name . '.zip', 60, false, 10, true);
|
$plugin_archive = FetchFile::make($plugin_name_link)
|
||||||
|
->setDestinationPath(PATH . 'cache/' . $plugin_name . '.zip')
|
||||||
|
->isBinaryFile(true)
|
||||||
|
->get();
|
||||||
|
|
||||||
if ($plugin_archive)
|
if ($plugin_archive)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,60 +15,92 @@ if (! defined('IN_ADMIN'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_ban';
|
$stylee = 'admin_ban';
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
$H_FORM_KEYS_GET = kleeja_add_form_key_get('adm_ban_get');
|
||||||
|
$H_FORM_KEYS = kleeja_add_form_key('adm_ban');
|
||||||
|
|
||||||
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
||||||
|
$delete_item = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&' . $H_FORM_KEYS_GET . '&case=del&k=';
|
||||||
|
$new_item_action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&case=new';
|
||||||
|
|
||||||
$affected = false;
|
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_ban');
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
//
|
//
|
||||||
if (ip('submit'))
|
|
||||||
|
$case = g('case', 'str', 'view');
|
||||||
|
$update_ban_content = false;
|
||||||
|
|
||||||
|
$query = [
|
||||||
|
'SELECT' => 'ban',
|
||||||
|
'FROM' => "{$dbprefix}stats"
|
||||||
|
];
|
||||||
|
|
||||||
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
|
$current_ban_data = $SQL->fetch_array($result);
|
||||||
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
|
$banned_items = explode('|', $current_ban_data['ban']);
|
||||||
|
|
||||||
|
$show_message = false;
|
||||||
|
|
||||||
|
if ($case == 'del' && ig('k'))
|
||||||
|
{
|
||||||
|
if (! kleeja_check_form_key_get('adm_ban_get'))
|
||||||
|
{
|
||||||
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
kleeja_admin_err($lang['INVALID_GET_KEY'], $action);
|
||||||
|
}
|
||||||
|
|
||||||
|
$to_delete = g('k');
|
||||||
|
|
||||||
|
$banned_items = array_filter($banned_items, function($item) use ($to_delete, $lang, &$show_message) {
|
||||||
|
if (md5($item) == $to_delete)
|
||||||
|
{
|
||||||
|
$show_message = sprintf($lang['ITEM_DELETED'], $item);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$update_ban_content = $show_message;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($case == 'new')
|
||||||
{
|
{
|
||||||
if (! kleeja_check_form_key('adm_ban'))
|
if (! kleeja_check_form_key('adm_ban'))
|
||||||
{
|
{
|
||||||
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
|
kleeja_admin_err($lang['INVALID_FORM_KEY'], true, $lang['ERROR'], true, $action, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$to_add = p('k', 'str', '');
|
||||||
|
|
||||||
|
if (! empty($to_add))
|
||||||
|
{
|
||||||
|
$banned_items[] = $to_add;
|
||||||
|
$show_message = $lang['BAN_UPDATED'];
|
||||||
|
$update_ban_content = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($update_ban_content)
|
||||||
$query = [
|
|
||||||
'SELECT' => 'ban',
|
|
||||||
'FROM' => "{$dbprefix}stats"
|
|
||||||
];
|
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
|
||||||
|
|
||||||
$current_ban_data =$SQL->fetch_array($result);
|
|
||||||
|
|
||||||
$ban = p('ban_text', 'str', $current_ban_data['ban']);
|
|
||||||
|
|
||||||
//when submit
|
|
||||||
if (ip('submit'))
|
|
||||||
{
|
{
|
||||||
|
$banned_items = array_filter($banned_items);
|
||||||
//update
|
//update
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "ban='" . $SQL->escape($ban) . "'"
|
'SET' => "ban='" . $SQL->escape(implode('|', $banned_items)) . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
|
|
||||||
if ($SQL->affected())
|
if ($SQL->affected())
|
||||||
{
|
{
|
||||||
$affected = true;
|
|
||||||
delete_cache('data_ban');
|
delete_cache('data_ban');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
array_walk($banned_items, function (&$value, &$key) {
|
||||||
$SQL->freeresult($result);
|
$value = ['content' => $value, 'del_key' => md5($value), 'id' => $key+1];
|
||||||
|
});
|
||||||
//after submit
|
|
||||||
if (ip('submit'))
|
|
||||||
{
|
|
||||||
$text = ($affected ? $lang['BAN_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
|
||||||
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '\');", 2000);</script>' . "\n";
|
|
||||||
$stylee = 'admin_info';
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ if (! defined('IN_ADMIN'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_rules';
|
$stylee = 'admin_rules';
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php');
|
||||||
|
|
||||||
$affected = false;
|
$affected = false;
|
||||||
$H_FORM_KEYS = kleeja_add_form_key('adm_rules');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_rules');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -33,9 +33,9 @@ if (ip('submit'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'rules',
|
'SELECT' => 'rules',
|
||||||
'FROM' => "{$dbprefix}stats"
|
'FROM' => "{$dbprefix}stats"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -48,9 +48,9 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
//update
|
//update
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "rules = '" . $SQL->real_escape(htmlspecialchars_decode($rules)) . "'"
|
'SET' => "rules = '" . $SQL->real_escape(htmlspecialchars_decode($rules)) . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -69,7 +69,7 @@ $SQL->freeresult($result);
|
|||||||
//after submit
|
//after submit
|
||||||
if (ip('submit'))
|
if (ip('submit'))
|
||||||
{
|
{
|
||||||
$text = ($affected ? $lang['RULES_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
$text = ($affected ? $lang['RULES_UPDATED'] : $lang['NO_UP_CHANGE_S']);
|
||||||
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '\');", 2000);</script>' . "\n";
|
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '\');", 2000);</script>' . "\n";
|
||||||
$stylee = 'admin_info';
|
$stylee = 'admin_info';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ case 'store':
|
|||||||
{
|
{
|
||||||
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
||||||
|
|
||||||
$store_catalog = fetch_remote_file($store_link);
|
$store_catalog = FetchFile::make($store_link)->get();
|
||||||
$store_catalog = json_decode($store_catalog, true);
|
$store_catalog = json_decode($store_catalog, true);
|
||||||
|
|
||||||
if (json_last_error() == JSON_ERROR_NONE)
|
if (json_last_error() == JSON_ERROR_NONE)
|
||||||
@@ -382,7 +382,7 @@ case 'download':
|
|||||||
// plugins avilable in kleeja store
|
// plugins avilable in kleeja store
|
||||||
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
$store_link = 'https://raw.githubusercontent.com/kleeja-official/store-catalog/master/catalog.json';
|
||||||
|
|
||||||
$catalog_styles = fetch_remote_file($store_link);
|
$catalog_styles = FetchFile::make($store_link)->get();
|
||||||
|
|
||||||
if ($catalog_styles)
|
if ($catalog_styles)
|
||||||
{
|
{
|
||||||
@@ -417,7 +417,10 @@ case 'download':
|
|||||||
) {
|
) {
|
||||||
$style_name_link = $store_styles[$style_name]['url'];
|
$style_name_link = $store_styles[$style_name]['url'];
|
||||||
|
|
||||||
$style_archive = fetch_remote_file($style_name_link, PATH . 'cache/' . $style_name . '.zip', 60, false, 10, true);
|
$style_archive = FetchFile::make($style_name_link)
|
||||||
|
->setDestinationPath(PATH . 'cache/' . $style_name . '.zip')
|
||||||
|
->isBinaryFile(true)
|
||||||
|
->get();
|
||||||
|
|
||||||
if ($style_archive)
|
if ($style_archive)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ if (! defined('IN_ADMIN'))
|
|||||||
|
|
||||||
|
|
||||||
//for style ..
|
//for style ..
|
||||||
$stylee = 'admin_extra';
|
$stylee = 'admin_extra';
|
||||||
$current_smt= preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'he'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'he'));
|
||||||
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt;
|
$action = basename(ADMIN_PATH) . '?cp=' . basename(__file__, '.php') . '&smt=' . $current_smt;
|
||||||
$H_FORM_KEYS= kleeja_add_form_key('adm_extra');
|
$H_FORM_KEYS = kleeja_add_form_key('adm_extra');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check form key
|
// Check form key
|
||||||
@@ -32,9 +32,9 @@ if (ip('submit'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'ex_header,ex_footer',
|
'SELECT' => 'ex_header,ex_footer',
|
||||||
'FROM' => "{$dbprefix}stats"
|
'FROM' => "{$dbprefix}stats"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -65,9 +65,9 @@ if (ip('submit'))
|
|||||||
|
|
||||||
|
|
||||||
//update
|
//update
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => $update_sql
|
'SET' => $update_sql
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ $new_version = empty($new_version['version_number'])
|
|||||||
? KLEEJA_VERSION
|
? KLEEJA_VERSION
|
||||||
: $new_version['version_number'];
|
: $new_version['version_number'];
|
||||||
$backup_archive_path = PATH . 'cache/backup.zip';
|
$backup_archive_path = PATH . 'cache/backup.zip';
|
||||||
$GET_FORM_KEY = kleeja_add_form_key_get('UPDATER_FORM_KEY');
|
$GET_FORM_KEY = kleeja_add_form_key_get('UPDATER_FORM_KEY');
|
||||||
|
|
||||||
define('KLEEJA_VERSION_CHECK_LINK', 'https://api.github.com/repos/kleeja-official/kleeja/releases/latest');
|
define('KLEEJA_VERSION_CHECK_LINK', 'https://api.github.com/repos/kleeja-official/kleeja/releases/latest');
|
||||||
define('KLEEJA_LATEST_PACKAGE_LINK', 'https://api.github.com/repos/kleeja-official/kleeja/zipball/');
|
define('KLEEJA_LATEST_PACKAGE_LINK', 'https://api.github.com/repos/kleeja-official/kleeja/zipball/');
|
||||||
|
|
||||||
$stylee = 'admin_check_update';
|
$stylee = 'admin_check_update';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
$update_link = $config['siteurl'] . 'install/update.php?lang=' . $config['language'];
|
$update_link = $config['siteurl'] . 'install/update.php?lang=' . $config['language'];
|
||||||
|
|
||||||
|
|
||||||
if (in_array($current_smt, ['update1', 'update2', 'update3']))
|
if (in_array($current_smt, ['update1', 'update2', 'update3']))
|
||||||
@@ -54,7 +54,7 @@ if ($current_smt == 'check')
|
|||||||
//get data from kleeja github repo
|
//get data from kleeja github repo
|
||||||
if (! ($version_data = $cache->get('kleeja_repo_version')))
|
if (! ($version_data = $cache->get('kleeja_repo_version')))
|
||||||
{
|
{
|
||||||
$github_data = fetch_remote_file(KLEEJA_VERSION_CHECK_LINK, false, 100);
|
$github_data = FetchFile::make(KLEEJA_VERSION_CHECK_LINK)->setTimeOut(100)->get();
|
||||||
|
|
||||||
if (! empty($github_data))
|
if (! empty($github_data))
|
||||||
{
|
{
|
||||||
@@ -84,17 +84,17 @@ if ($current_smt == 'check')
|
|||||||
{
|
{
|
||||||
if (version_compare(strtolower($current_version), strtolower($version_data['version']), '<'))
|
if (version_compare(strtolower($current_version), strtolower($version_data['version']), '<'))
|
||||||
{
|
{
|
||||||
$text = sprintf($lang['UPDATE_NOW_S'], $current_version, strtolower($version_data['version'])) .
|
$text = sprintf($lang['UPDATE_NOW_S'], $current_version, strtolower($version_data['version'])) .
|
||||||
'::--x--::' . $version_data['info'] . '::--x--::' . $version_data['date'];
|
'::--x--::' . $version_data['info'] . '::--x--::' . $version_data['date'];
|
||||||
$error = 2;
|
$error = 2;
|
||||||
}
|
}
|
||||||
elseif (version_compare(strtolower($current_version), strtolower($version_data['version']), '='))
|
elseif (version_compare(strtolower($current_version), strtolower($version_data['version']), '='))
|
||||||
{
|
{
|
||||||
$text = $lang['U_LAST_VER_KLJ'];
|
$text = $lang['U_LAST_VER_KLJ'];
|
||||||
}
|
}
|
||||||
elseif (version_compare(strtolower($current_version), strtolower($version_data['version']), '>'))
|
elseif (version_compare(strtolower($current_version), strtolower($version_data['version']), '>'))
|
||||||
{
|
{
|
||||||
$text = $lang['U_USE_PRE_RE'];
|
$text = $lang['U_USE_PRE_RE'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -102,9 +102,9 @@ if ($current_smt == 'check')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'version_number' => $version_data['version'],
|
'version_number' => $version_data['version'],
|
||||||
'last_check' => time()
|
'last_check' => time()
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = serialize($data);
|
$data = serialize($data);
|
||||||
@@ -120,10 +120,10 @@ elseif ($current_smt == 'general')
|
|||||||
//To prevent expected error [ infinit loop ]
|
//To prevent expected error [ infinit loop ]
|
||||||
if (ig('show_msg'))
|
if (ig('show_msg'))
|
||||||
{
|
{
|
||||||
$query_get = [
|
$query_get = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}config",
|
'FROM' => "{$dbprefix}config",
|
||||||
'WHERE' => "name = 'new_version'"
|
'WHERE' => "name = 'new_version'"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result_get = $SQL->build($query_get);
|
$result_get = $SQL->build($query_get);
|
||||||
@@ -151,7 +151,10 @@ elseif ($current_smt == 'update1')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// downloaded the last package to cache folder
|
// downloaded the last package to cache folder
|
||||||
fetch_remote_file(KLEEJA_LATEST_PACKAGE_LINK . $new_version , PATH . "cache/kleeja-{$new_version}.zip", 60, false, 10, true);
|
FetchFile::make(KLEEJA_LATEST_PACKAGE_LINK . $new_version)
|
||||||
|
->setDestinationPath(PATH . "cache/kleeja-{$new_version}.zip")
|
||||||
|
->isBinaryFile(true)
|
||||||
|
->get();
|
||||||
|
|
||||||
if (file_exists(PATH . "cache/kleeja-{$new_version}.zip"))
|
if (file_exists(PATH . "cache/kleeja-{$new_version}.zip"))
|
||||||
{
|
{
|
||||||
@@ -185,7 +188,8 @@ elseif ($current_smt == 'update2')
|
|||||||
$ex_folder = trim($zip->getNameIndex(0), '/');
|
$ex_folder = trim($zip->getNameIndex(0), '/');
|
||||||
$zip->extractTo(PATH . 'cache/');
|
$zip->extractTo(PATH . 'cache/');
|
||||||
$zip->close();
|
$zip->close();
|
||||||
if(rename(
|
|
||||||
|
if (rename(
|
||||||
PATH . "cache/{$ex_folder}",
|
PATH . "cache/{$ex_folder}",
|
||||||
PATH . "cache/kleeja-{$new_version}"
|
PATH . "cache/kleeja-{$new_version}"
|
||||||
) === false)
|
) === false)
|
||||||
@@ -206,7 +210,7 @@ elseif ($current_smt == 'update2')
|
|||||||
{
|
{
|
||||||
// move the update file from install folder to cache folder to include it later and delete install folder
|
// move the update file from install folder to cache folder to include it later and delete install folder
|
||||||
// becuse if install folder is exists , it can make some problems if dev mode is not active
|
// becuse if install folder is exists , it can make some problems if dev mode is not active
|
||||||
if(rename($update_file, PATH . 'cache/update_schema.php') === false)
|
if (rename($update_file, PATH . 'cache/update_schema.php') === false)
|
||||||
{
|
{
|
||||||
copy($update_file, PATH . 'cache/update_schema.php');
|
copy($update_file, PATH . 'cache/update_schema.php');
|
||||||
}
|
}
|
||||||
@@ -293,7 +297,6 @@ elseif ($current_smt == 'update3')
|
|||||||
file_get_contents($file->getPathname())
|
file_get_contents($file->getPathname())
|
||||||
) === false)
|
) === false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (copy($file->getPathname(), $file_path) === false)
|
if (copy($file->getPathname(), $file_path) === false)
|
||||||
{
|
{
|
||||||
$update_failed = true;
|
$update_failed = true;
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ if ($case && in_array($case, ['clearc', 'sync_files', 'sync_images', 'sync_users
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$text = '';
|
||||||
|
|
||||||
|
|
||||||
switch ($case):
|
switch ($case):
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -52,12 +55,12 @@ $all_sizes = readable_size(get_actual_stats('sizes'));
|
|||||||
|
|
||||||
|
|
||||||
//links
|
//links
|
||||||
$del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&case=clearc&' . $GET_FORM_KEY;
|
$del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&case=clearc&' . $GET_FORM_KEY;
|
||||||
$resync_files_link = $config['siteurl'] . 'go.php?go=resync&case=sync_files';
|
$resync_files_link = $config['siteurl'] . 'go.php?go=resync&case=sync_files';
|
||||||
$resync_images_link = $config['siteurl'] . 'go.php?go=resync&case=sync_images';
|
$resync_images_link = $config['siteurl'] . 'go.php?go=resync&case=sync_images';
|
||||||
$resync_users_link = basename(ADMIN_PATH) . '?cp=r_repair&case=sync_users&' . $GET_FORM_KEY;
|
$resync_users_link = basename(ADMIN_PATH) . '?cp=r_repair&case=sync_users&' . $GET_FORM_KEY;
|
||||||
$resync_sizes_link = basename(ADMIN_PATH) . '?cp=r_repair&case=sync_sizes&' . $GET_FORM_KEY;
|
$resync_sizes_link = basename(ADMIN_PATH) . '?cp=r_repair&case=sync_sizes&' . $GET_FORM_KEY;
|
||||||
$repair_tables_link = basename(ADMIN_PATH) . '?cp=r_repair&case=tables&' . $GET_FORM_KEY;
|
$repair_tables_link = basename(ADMIN_PATH) . '?cp=r_repair&case=tables&' . $GET_FORM_KEY;
|
||||||
|
|
||||||
$queue_cron_job_url = $config['siteurl'] . 'go.php?go=queue';
|
$queue_cron_job_url = $config['siteurl'] . 'go.php?go=queue';
|
||||||
|
|
||||||
@@ -71,14 +74,13 @@ break;
|
|||||||
//
|
//
|
||||||
case 'tables':
|
case 'tables':
|
||||||
|
|
||||||
$query = 'SHOW TABLE STATUS';
|
$query = 'SHOW TABLE STATUS';
|
||||||
$result = $SQL->query($query);
|
$result = $SQL->query($query);
|
||||||
$text = '';
|
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$queryf = 'REPAIR TABLE `' . $row['Name'] . '`';
|
$queryf = 'REPAIR TABLE `' . $row['Name'] . '`';
|
||||||
$resultf = $SQL->query($queryf);
|
$resultf = $SQL->query($queryf);
|
||||||
|
|
||||||
if ($resultf)
|
if ($resultf)
|
||||||
{
|
{
|
||||||
@@ -100,9 +102,9 @@ break;
|
|||||||
case 'sync_sizes':
|
case 'sync_sizes':
|
||||||
|
|
||||||
|
|
||||||
$query_s = [
|
$query_s = [
|
||||||
'SELECT' => 'size',
|
'SELECT' => 'size',
|
||||||
'FROM' => "{$dbprefix}files"
|
'FROM' => "{$dbprefix}files"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result_s = $SQL->build($query_s);
|
$result_s = $SQL->build($query_s);
|
||||||
@@ -117,9 +119,9 @@ while ($row=$SQL->fetch_array($result_s))
|
|||||||
|
|
||||||
$SQL->freeresult($result_s);
|
$SQL->freeresult($result_s);
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => 'files=' . $files_number . ', sizes=' . $files_sizes
|
'SET' => 'files=' . $files_number . ', sizes=' . $files_sizes
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($SQL->build($update_query))
|
if ($SQL->build($update_query))
|
||||||
@@ -139,9 +141,9 @@ break;
|
|||||||
//
|
//
|
||||||
case 'sync_users':
|
case 'sync_users':
|
||||||
|
|
||||||
$query_w = [
|
$query_w = [
|
||||||
'SELECT' => 'name',
|
'SELECT' => 'name',
|
||||||
'FROM' => "{$dbprefix}users"
|
'FROM' => "{$dbprefix}users"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result_w = $SQL->build($query_w);
|
$result_w = $SQL->build($query_w);
|
||||||
@@ -154,9 +156,9 @@ while ($row=$SQL->fetch_array($result_w))
|
|||||||
|
|
||||||
$SQL->freeresult($result_w);
|
$SQL->freeresult($result_w);
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => 'users=' . $user_number
|
'SET' => 'users=' . $user_number
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($update_query);
|
$result = $SQL->build($update_query);
|
||||||
|
|||||||
@@ -16,30 +16,30 @@ if (! defined('IN_ADMIN'))
|
|||||||
|
|
||||||
|
|
||||||
//style of
|
//style of
|
||||||
$stylee = 'admin_start';
|
$stylee = 'admin_start';
|
||||||
$h_lst_files = basename(ADMIN_PATH) . '?cp=c_files&last_visit=';
|
$h_lst_files = basename(ADMIN_PATH) . '?cp=c_files&last_visit=';
|
||||||
$h_lst_imgs = basename(ADMIN_PATH) . '?cp=d_img_ctrl&last_visit=';
|
$h_lst_imgs = basename(ADMIN_PATH) . '?cp=d_img_ctrl&last_visit=';
|
||||||
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
$current_smt = preg_replace('/[^a-z0-9_]/i', '', g('smt', 'str', 'general'));
|
||||||
$GET_FORM_KEY = kleeja_add_form_key_get('adm_start_actions');
|
$GET_FORM_KEY = kleeja_add_form_key_get('adm_start_actions');
|
||||||
|
|
||||||
//data
|
//data
|
||||||
$lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user;
|
$lst_reg = empty($stat_last_user) ? $lang['UNKNOWN'] : $stat_last_user;
|
||||||
$files_number = $stat_files + $stat_imgs;
|
$files_number = $stat_files + $stat_imgs;
|
||||||
$files_sizes = readable_size($stat_sizes);
|
$files_sizes = readable_size($stat_sizes);
|
||||||
$users_number = $stat_users;
|
$users_number = $stat_users;
|
||||||
$last_del_fles = (int) $config['del_f_day'] <= 0 ? $lang['CLOSED_FEATURE'] : kleeja_date($stat_last_f_del);
|
$last_del_fles = (int) $config['del_f_day'] <= 0 ? $lang['CLOSED_FEATURE'] : kleeja_date($stat_last_f_del);
|
||||||
$php_version = isset($NO_PHPINFO) || ! function_exists('phpinfo') ? phpversion() : 'PHP ' . phpversion();
|
$php_version = isset($NO_PHPINFO) || ! function_exists('phpinfo') ? phpversion() : 'PHP ' . phpversion();
|
||||||
$mysql_version = 'MySQL ' . $SQL->mysql_version();
|
$mysql_version = $SQL->server_info();
|
||||||
$max_execution_time = function_exists('ini_get') ? @ini_get('max_execution_time') : @get_cfg_var('max_execution_time');
|
$max_execution_time = function_exists('ini_get') ? @ini_get('max_execution_time') : @get_cfg_var('max_execution_time');
|
||||||
$upload_max_filesize= function_exists('ini_get') ? @ini_get('upload_max_filesize') : @get_cfg_var('upload_max_filesize');
|
$upload_max_filesize = function_exists('ini_get') ? @ini_get('upload_max_filesize') : @get_cfg_var('upload_max_filesize');
|
||||||
$post_max_size = function_exists('ini_get') ? @ini_get('post_max_size') : @get_cfg_var('post_max_size');
|
$post_max_size = function_exists('ini_get') ? @ini_get('post_max_size') : @get_cfg_var('post_max_size');
|
||||||
$memory_limit = function_exists('ini_get') ? @ini_get('memory_limit') : @get_cfg_var('memory_limit');
|
$memory_limit = function_exists('ini_get') ? @ini_get('memory_limit') : @get_cfg_var('memory_limit');
|
||||||
$s_last_google = $stat_last_google == 0 ? '[ ? ]' : kleeja_date($stat_last_google);
|
$s_last_google = $stat_last_google == 0 ? '[ ? ]' : kleeja_date($stat_last_google);
|
||||||
$s_google_num = $stat_google_num;
|
$s_google_num = $stat_google_num;
|
||||||
$s_last_bing = $stat_last_bing == 0 ? '[ ? ]' : kleeja_date($stat_last_bing);
|
$s_last_bing = $stat_last_bing == 0 ? '[ ? ]' : kleeja_date($stat_last_bing);
|
||||||
$s_bing_num = $stat_bing_num;
|
$s_bing_num = $stat_bing_num;
|
||||||
$usernamelang = sprintf($lang['KLEEJA_CP_W'], $username);
|
$usernamelang = sprintf($lang['KLEEJA_CP_W'], $username);
|
||||||
$current_year = date('Y');
|
$current_year = date('Y');
|
||||||
|
|
||||||
$startBoxes = [
|
$startBoxes = [
|
||||||
'notifications' => ['title' => $lang['NOTIFICATIONS'], 'hidden' => (int) adm_is_start_box_hidden('notifications')],
|
'notifications' => ['title' => $lang['NOTIFICATIONS'], 'hidden' => (int) adm_is_start_box_hidden('notifications')],
|
||||||
@@ -53,12 +53,12 @@ $startBoxes = [
|
|||||||
$extra_adm_start_html = '';
|
$extra_adm_start_html = '';
|
||||||
|
|
||||||
//size board by percent
|
//size board by percent
|
||||||
$per = $stat_sizes / ($config['total_size'] * 1048576);
|
$per = $stat_sizes / ($config['total_size'] * 1048576);
|
||||||
$per1 = round($per*100, 2);
|
$per1 = round($per*100, 2);
|
||||||
$per1 = $per1 >= 100 ? 100 : $per1;
|
$per1 = $per1 >= 100 ? 100 : $per1;
|
||||||
|
|
||||||
//ppl must know about kleeja version!
|
//ppl must know about kleeja version!
|
||||||
$kleeja_version = '<a href="' . basename(ADMIN_PATH) . '?cp=p_check_update" onclick="javascript:get_kleeja_link(this.href, \'#content\'); return false;" title="' . $lang['R_CHECK_UPDATE'] . '">' . KLEEJA_VERSION . '</a>';
|
$kleeja_version = '<a href="' . basename(ADMIN_PATH) . '?cp=p_check_update" onclick="javascript:get_kleeja_link(this.href, \'#content\'); return false;" title="' . $lang['R_CHECK_UPDATE'] . '">' . KLEEJA_VERSION . '</a>';
|
||||||
|
|
||||||
//admin messages system
|
//admin messages system
|
||||||
$ADM_NOTIFICATIONS = [];
|
$ADM_NOTIFICATIONS = [];
|
||||||
@@ -177,7 +177,7 @@ if (! empty($d_groups) && is_array($d_groups))
|
|||||||
// rev: let's say cache is not refreshed, so we will redirect alots of time,
|
// rev: let's say cache is not refreshed, so we will redirect alots of time,
|
||||||
// so update_done will be good solution
|
// so update_done will be good solution
|
||||||
//
|
//
|
||||||
if (empty($v['last_check']) || ((time() - $v['last_check']) > 3600 * 24 * 10 && $_SERVER['SERVER_NAME'] != 'localhost' && ! ig('update_done')))
|
if ((empty($v['last_check']) || time() - $v['last_check'] > 3600 * 24 * 10) && ! ig('update_done'))
|
||||||
{
|
{
|
||||||
redirect(basename(ADMIN_PATH) . '?cp=p_check_update&show_msg=1');
|
redirect(basename(ADMIN_PATH) . '?cp=p_check_update&show_msg=1');
|
||||||
$SQL->close();
|
$SQL->close();
|
||||||
@@ -244,8 +244,8 @@ $image_last_visit = filter_exists('i_lastvisit', 'filter_uid', 'lastvisit', $use
|
|||||||
|
|
||||||
|
|
||||||
//hurry, hurry section, get languages
|
//hurry, hurry section, get languages
|
||||||
$hurry_lang_link = basename(ADMIN_PATH) . '?cp=g_users&smt=general&smt=group_data&' . $GET_FORM_KEY . '&lang_change=';
|
$hurry_lang_link = basename(ADMIN_PATH) . '?cp=g_users&smt=general&smt=group_data&' . $GET_FORM_KEY . '&lang_change=';
|
||||||
$hurry_langs_list = '';
|
$hurry_langs_list = '';
|
||||||
|
|
||||||
if ($dh = @opendir(PATH . 'lang'))
|
if ($dh = @opendir(PATH . 'lang'))
|
||||||
{
|
{
|
||||||
@@ -272,21 +272,21 @@ foreach ($d_groups as $id=>$ddt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//hurry, hurry section, links
|
//hurry, hurry section, links
|
||||||
$del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&case=clearc&' . kleeja_add_form_key_get('REPAIR_FORM_KEY');
|
$del_cache_link = basename(ADMIN_PATH) . '?cp=r_repair&case=clearc&' . kleeja_add_form_key_get('REPAIR_FORM_KEY');
|
||||||
|
|
||||||
|
|
||||||
// get stats filter so we can draw a chart for the user
|
// get stats filter so we can draw a chart for the user
|
||||||
$stats_chart = false;
|
$stats_chart = false;
|
||||||
|
|
||||||
$cf_query = [
|
$cf_query = [
|
||||||
'SELECT' => 'f.filter_uid, f.filter_value, f.filter_time',
|
'SELECT' => 'f.filter_uid, f.filter_value, f.filter_time',
|
||||||
'FROM' => "{$dbprefix}filters f",
|
'FROM' => "{$dbprefix}filters f",
|
||||||
'WHERE' => "f.filter_type = 'stats_for_acp'",
|
'WHERE' => "f.filter_type = 'stats_for_acp'",
|
||||||
'ORDER BY' => 'f.filter_time DESC',
|
'ORDER BY' => 'f.filter_time DESC',
|
||||||
];
|
];
|
||||||
|
|
||||||
$cf_result = $SQL->build($cf_query);
|
$cf_result = $SQL->build($cf_query);
|
||||||
$cf_num = $SQL->num_rows($cf_result);
|
$cf_num = $SQL->num_rows($cf_result);
|
||||||
|
|
||||||
if ($cf_num > 3)
|
if ($cf_num > 3)
|
||||||
{
|
{
|
||||||
@@ -347,9 +347,9 @@ if ($cf_num > 3)
|
|||||||
//clean old chart stats
|
//clean old chart stats
|
||||||
if ($cf_num > 10)
|
if ($cf_num > 10)
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}filters",
|
'DELETE' => "{$dbprefix}filters",
|
||||||
'WHERE' => "filter_type = 'stats_for_acp' AND filter_time < " . (time() - (3600 * 24 * 10))
|
'WHERE' => "filter_type = 'stats_for_acp' AND filter_time < " . (time() - (3600 * 24 * 10))
|
||||||
];
|
];
|
||||||
$SQL->build($query_del);
|
$SQL->build($query_del);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,115 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package auth
|
|
||||||
* @copyright (c) 2007 Kleeja.com
|
|
||||||
* @license ./docs/license.txt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//no for directly open
|
|
||||||
if (! defined('IN_COMMON'))
|
|
||||||
{
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function kleeja_auth_login ($name, $pass, $hashed = false, $expire, $loginadm = false, $return_username = false)
|
|
||||||
{
|
|
||||||
global $lang, $config, $usrcp, $userinfo;
|
|
||||||
global $script_path, $script_api_key, $script_cp1256;
|
|
||||||
|
|
||||||
//URL must be begin with http://
|
|
||||||
if (empty($script_path) || $script_path[0] != 'h')
|
|
||||||
{
|
|
||||||
big_error('Forum URL must be begin with http://', sprintf($lang['SCRIPT_AUTH_PATH_WRONG'], 'API'));
|
|
||||||
}
|
|
||||||
|
|
||||||
//api key is the key to make the query between the remote script and kleeja more secure !
|
|
||||||
//this must be changed in the real use
|
|
||||||
if (empty($script_api_key))
|
|
||||||
{
|
|
||||||
big_error('api key', 'To connect to the remote script you have to write the API key ...');
|
|
||||||
}
|
|
||||||
|
|
||||||
$pass = empty($script_cp1256) || ! $script_cp1256 ? $pass : $usrcp->kleeja_utf8($pass, false);
|
|
||||||
$name = empty($script_cp1256) || ! $script_cp1256 || $hashed ? $name : $usrcp->kleeja_utf8($name, false);
|
|
||||||
|
|
||||||
// @see file : docs/kleeja_(vb,mysmartbb,phpbb)_api.txt
|
|
||||||
|
|
||||||
$api_http_query = 'api_key=' . kleeja_base64_encode($script_api_key) . '&' . ($hashed ? 'userid' : 'username') . '=' . urlencode($name) . '&pass=' . kleeja_base64_encode($pass);
|
|
||||||
//if only username, let tell him in the query
|
|
||||||
$api_http_query .= $return_username ? '&return_username=1' : '';
|
|
||||||
|
|
||||||
|
|
||||||
//get it
|
|
||||||
$remote_data = fetch_remote_file($script_path . '?' . $api_http_query);
|
|
||||||
|
|
||||||
//no responde
|
|
||||||
//empty or can not connect
|
|
||||||
if ($remote_data == false || empty($remote_data))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//see kleeja_api.php file
|
|
||||||
//split the data , the first one is always 0 or 1
|
|
||||||
//0 : error
|
|
||||||
//1: ok
|
|
||||||
$user_info = explode('%|%', kleeja_base64_decode($remote_data));
|
|
||||||
|
|
||||||
//omg, it's 0 , 0 : error, lets die here
|
|
||||||
if ((int) $user_info[0] == 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//if we want username only we have to return it quickly and die here
|
|
||||||
//
|
|
||||||
if ($return_username)
|
|
||||||
{
|
|
||||||
return empty($script_cp1256) || ! $script_cp1256 ? $user_info[1] : $usrcp->kleeja_utf8($user_info[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//when loggin to admin, we just want a check, no data setup ..
|
|
||||||
//
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
define('USER_ID', $user_info[1]);
|
|
||||||
define('GROUP_ID', 3);
|
|
||||||
define('USER_NAME', empty($script_cp1256) || ! $script_cp1256 ? $user_info[2] : $usrcp->kleeja_utf8($user_info[2]));
|
|
||||||
define('USER_MAIL', $user_info[3]);
|
|
||||||
define('USER_ADMIN', ((int) $user_info[5] == 1) ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//user ifo
|
|
||||||
//and this must be filled with user data comming from url
|
|
||||||
$userinfo = [];
|
|
||||||
$userinfo['group_id'] = GROUP_ID;
|
|
||||||
$user_y = kleeja_base64_encode(serialize(['id'=>USER_ID, 'name'=>USER_NAME, 'mail'=>USER_MAIL, 'last_visit'=>time()]));
|
|
||||||
|
|
||||||
|
|
||||||
//add cookies
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
$usrcp->kleeja_set_cookie('ulogu', $usrcp->en_de_crypt($user_info[1] . '|' . $user_info[4] . '|' . $expire . '|' . sha1(md5($config['h_key'] . $user_info[4]) . $expire) . '|' . GROUP_ID . '|' . $user_y), $expire);
|
|
||||||
}
|
|
||||||
|
|
||||||
//no need after now
|
|
||||||
unset($pass);
|
|
||||||
|
|
||||||
//yes ! he is a real user
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//return username
|
|
||||||
//
|
|
||||||
function kleeja_auth_username ($user_id)
|
|
||||||
{
|
|
||||||
return kleeja_auth_login($user_id, false, false, false, false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//<-- EOF
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"/>
|
|
||||||
<title>Powered by Kleeja</title>
|
|
||||||
<style type="text/css">* {
|
|
||||||
font-size: 100%;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
color: #CECFCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
|
||||||
font-size: 100%;
|
|
||||||
color: #69788E;
|
|
||||||
margin: 10px 30px;
|
|
||||||
background: #F7F7F7;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link, a:visited {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #CECFCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:active, a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
color: #111;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-family: "Trebuchet MS", Helvetica, sans-serif;
|
|
||||||
font-size: 1.70em;
|
|
||||||
font-weight: normal;
|
|
||||||
color: #333333;
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content_box {
|
|
||||||
border: 1px dashed #CECFCE;
|
|
||||||
background: #FFFFFF;
|
|
||||||
padding: 10px;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
}</style>
|
|
||||||
</head>
|
|
||||||
<body title="كليجا"><br/>
|
|
||||||
<div class="content_box">
|
|
||||||
<p>
|
|
||||||
<a target="_blank" href="http://www.kleeja.com" title="kleeja"></a>
|
|
||||||
</p>
|
|
||||||
<br/>
|
|
||||||
<h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div>
|
|
||||||
<br/>
|
|
||||||
<div class="content_box"style="font-size: 140%">Powered by Kleeja</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,347 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package auth
|
|
||||||
* @copyright (c) 2007 Kleeja.com
|
|
||||||
* @license ./docs/license.txt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//no for directly open
|
|
||||||
if (! defined('IN_COMMON'))
|
|
||||||
{
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//Path of config file in phpBB3
|
|
||||||
//
|
|
||||||
if (! defined('SCRIPT_CONFIG_PATH'))
|
|
||||||
{
|
|
||||||
define('SCRIPT_CONFIG_PATH', '/config.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
function kleeja_auth_login ($name, $pass, $hashed = false, $expire, $loginadm = false, $return_name = false)
|
|
||||||
{
|
|
||||||
global $lang, $config, $usrcp, $userinfo;
|
|
||||||
global $script_path, $script_encoding, $script_srv, $script_db, $script_user, $script_pass, $script_prefix;
|
|
||||||
|
|
||||||
//check for last slash /
|
|
||||||
if (isset($script_path))
|
|
||||||
{
|
|
||||||
if (isset($script_path[strlen($script_path)]) && $script_path[strlen($script_path)] == '/')
|
|
||||||
{
|
|
||||||
$script_path = substr($script_path, 0, strlen($script_path));
|
|
||||||
}
|
|
||||||
|
|
||||||
//get some useful data from phbb config file
|
|
||||||
if (file_exists(PATH . $script_path . SCRIPT_CONFIG_PATH))
|
|
||||||
{
|
|
||||||
include PATH . $script_path . SCRIPT_CONFIG_PATH;
|
|
||||||
|
|
||||||
$forum_srv = $dbhost;
|
|
||||||
$forum_db = $dbname;
|
|
||||||
$forum_user = $dbuser;
|
|
||||||
$forum_pass = $dbpasswd;
|
|
||||||
$forum_prefix = $table_prefix;
|
|
||||||
|
|
||||||
if (empty($dbhost))
|
|
||||||
{
|
|
||||||
$forum_srv = 'localhost';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! empty($dbport))
|
|
||||||
{
|
|
||||||
$forum_srv .= ':' . $dbport;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
big_error('Forum path is not correct', sprintf($lang['SCRIPT_AUTH_PATH_WRONG'], 'phpBB3'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$forum_srv = $script_srv;
|
|
||||||
$forum_db = $script_db;
|
|
||||||
$forum_user = $script_user;
|
|
||||||
$forum_pass = $script_pass;
|
|
||||||
$forum_prefix = $script_prefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if no variables of db
|
|
||||||
if (empty($forum_srv) || empty($forum_user) || empty($forum_db))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//conecting ...
|
|
||||||
$SQLBB = new KleejaDatabase($forum_srv, $forum_user, $forum_pass, $forum_db, true);
|
|
||||||
|
|
||||||
$SQLBB->set_names('utf8');
|
|
||||||
|
|
||||||
unset($forum_pass); // We do not need this any longer
|
|
||||||
|
|
||||||
//get utf tools
|
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
$phpbb_root_path = PATH . $script_path . '/';
|
|
||||||
$phpEx = 'php';
|
|
||||||
define('IN_PHPBB', true);
|
|
||||||
include_once PATH . $script_path . '/includes/utf/utf_tools.' . $phpEx;
|
|
||||||
|
|
||||||
$row_leve = 'user_type';
|
|
||||||
$admin_level = 3;
|
|
||||||
$query2 = [
|
|
||||||
'SELECT' => '*',
|
|
||||||
'FROM' => "`{$forum_prefix}users`",
|
|
||||||
];
|
|
||||||
|
|
||||||
$query2['WHERE'] = $hashed ? 'user_id=' . intval($name) . " AND user_password='" . $SQLBB->real_escape($pass) . "' " : "username_clean='" . $SQLBB->real_escape(utf8_clean_string($name)) . "'";
|
|
||||||
|
|
||||||
if ($return_name)
|
|
||||||
{
|
|
||||||
$query2['SELECT'] = 'username';
|
|
||||||
$query2['WHERE'] = 'user_id=' . intval($name);
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = '';
|
|
||||||
|
|
||||||
if (! $hashed)
|
|
||||||
{
|
|
||||||
$result2 = $SQLBB->build($query2);
|
|
||||||
while ($row=$SQLBB->fetch_array($result2))
|
|
||||||
{
|
|
||||||
$SQLBB->freeresult($result2);
|
|
||||||
|
|
||||||
if ($return_name)
|
|
||||||
{
|
|
||||||
return $row['username'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (phpbb_check_hash($pass, $row['user_password']))
|
|
||||||
{
|
|
||||||
$query = $query2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$query = $query2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($query))
|
|
||||||
{
|
|
||||||
$SQLBB->close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_usrdata_phpbb_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
$result = $SQLBB->build($query);
|
|
||||||
|
|
||||||
|
|
||||||
if ($SQLBB->num_rows($result) != 0)
|
|
||||||
{
|
|
||||||
while ($row=$SQLBB->fetch_array($result))
|
|
||||||
{
|
|
||||||
if ($SQLBB->num_rows($SQLBB->query("SELECT ban_userid FROM `{$forum_prefix}banlist` WHERE ban_userid=" . intval($row['user_id']))) == 0)
|
|
||||||
{
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
define('USER_ID', $row['user_id']);
|
|
||||||
define('GROUP_ID', ($row[$row_leve] == $admin_level ? '1' : '3'));
|
|
||||||
define('USER_NAME', $row['username']);
|
|
||||||
define('USER_MAIL', $row['user_email']);
|
|
||||||
|
|
||||||
if ($row[$row_leve] == $admin_level)
|
|
||||||
{
|
|
||||||
define('USER_ADMIN', true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$userinfo = $row;
|
|
||||||
$userinfo['group_id'] = ($row[$row_leve] == $admin_level ? '1' : '3');
|
|
||||||
|
|
||||||
$user_y = kleeja_base64_encode(serialize(['id'=>$row['user_id'], 'name'=>$row['username'], 'mail'=>$row['user_email'], 'last_visit'=>time()]));
|
|
||||||
|
|
||||||
if (! $hashed && ! $loginadm)
|
|
||||||
{
|
|
||||||
$usrcp->kleeja_set_cookie('ulogu', $usrcp->en_de_crypt(
|
|
||||||
$row['user_id'] . '|' .
|
|
||||||
$row['user_password'] . '|' .
|
|
||||||
$expire . '|' .
|
|
||||||
sha1(md5($config['h_key'] . $row['user_password']) . $expire) . '|' .
|
|
||||||
($row[$row_leve] == $admin_level ? '1' : '3') . '|' .
|
|
||||||
$user_y
|
|
||||||
), $expire);
|
|
||||||
}
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_while_usrdata_phpbb_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//he is banned from phpBB
|
|
||||||
$SQLBB->freeresult($result);
|
|
||||||
unset($pass);
|
|
||||||
$SQLBB->close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$SQLBB->freeresult($result);
|
|
||||||
unset($pass);
|
|
||||||
$SQLBB->close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$SQLBB->freeresult($result);
|
|
||||||
$SQLBB->close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//dont know why they come here !
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function kleeja_auth_username ($user_id)
|
|
||||||
{
|
|
||||||
return kleeja_auth_login ($user_id, false, false, 0, false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check for correct password
|
|
||||||
*/
|
|
||||||
function phpbb_check_hash($password, $hash)
|
|
||||||
{
|
|
||||||
$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
||||||
|
|
||||||
if (strlen($hash) == 34)
|
|
||||||
{
|
|
||||||
return (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (md5($password) === $hash) ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate salt for hash generation
|
|
||||||
*/
|
|
||||||
function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)
|
|
||||||
{
|
|
||||||
if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
|
|
||||||
{
|
|
||||||
$iteration_count_log2 = 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = '$H$';
|
|
||||||
$output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];
|
|
||||||
$output .= _hash_encode64($input, 6, $itoa64);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Encode hash
|
|
||||||
*/
|
|
||||||
function _hash_encode64($input, $count, &$itoa64)
|
|
||||||
{
|
|
||||||
$output = '';
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
$value = ord($input[$i++]);
|
|
||||||
$output .= $itoa64[$value & 0x3f];
|
|
||||||
|
|
||||||
if ($i < $count)
|
|
||||||
{
|
|
||||||
$value |= ord($input[$i]) << 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output .= $itoa64[($value >> 6) & 0x3f];
|
|
||||||
|
|
||||||
if ($i++ >= $count)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($i < $count)
|
|
||||||
{
|
|
||||||
$value |= ord($input[$i]) << 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output .= $itoa64[($value >> 12) & 0x3f];
|
|
||||||
|
|
||||||
if ($i++ >= $count)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output .= $itoa64[($value >> 18) & 0x3f];
|
|
||||||
} while ($i < $count);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The crypt function/replacement
|
|
||||||
*/
|
|
||||||
function _hash_crypt_private($password, $setting, &$itoa64)
|
|
||||||
{
|
|
||||||
$output = '*';
|
|
||||||
|
|
||||||
// Check for correct hash
|
|
||||||
if (substr($setting, 0, 3) != '$H$')
|
|
||||||
{
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
$count_log2 = strpos($itoa64, $setting[3]);
|
|
||||||
|
|
||||||
if ($count_log2 < 7 || $count_log2 > 30)
|
|
||||||
{
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
$count = 1 << $count_log2;
|
|
||||||
$salt = substr($setting, 4, 8);
|
|
||||||
|
|
||||||
if (strlen($salt) != 8)
|
|
||||||
{
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We're kind of forced to use MD5 here since it's the only
|
|
||||||
* cryptographic primitive available in all versions of PHP
|
|
||||||
* currently in use. To implement our own low-level crypto
|
|
||||||
* in PHP would result in much worse performance and
|
|
||||||
* consequently in lower iteration counts and hashes that are
|
|
||||||
* quicker to crack (by non-PHP code).
|
|
||||||
*/
|
|
||||||
if (PHP_VERSION >= 5)
|
|
||||||
{
|
|
||||||
$hash = md5($salt . $password, true);
|
|
||||||
do
|
|
||||||
{
|
|
||||||
$hash = md5($hash . $password, true);
|
|
||||||
} while (--$count);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$hash = pack('H*', md5($salt . $password));
|
|
||||||
do
|
|
||||||
{
|
|
||||||
$hash = pack('H*', md5($hash . $password));
|
|
||||||
} while (--$count);
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = substr($setting, 0, 12);
|
|
||||||
$output .= _hash_encode64($hash, 16, $itoa64);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package auth
|
|
||||||
* @copyright (c) 2007 Kleeja.com
|
|
||||||
* @license ./docs/license.txt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
//no for directly open
|
|
||||||
if (! defined('IN_COMMON'))
|
|
||||||
{
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//Path of config file in vb
|
|
||||||
//
|
|
||||||
if (! defined('SCRIPT_CONFIG_PATH'))
|
|
||||||
{
|
|
||||||
define('SCRIPT_CONFIG_PATH', '/includes/config.php');
|
|
||||||
}
|
|
||||||
|
|
||||||
function kleeja_auth_login ($name, $pass, $hashed = false, $expire, $loginadm = false, $return_name = false)
|
|
||||||
{
|
|
||||||
global $lang, $config, $usrcp, $userinfo;
|
|
||||||
global $script_path, $script_cp1256, $script_srv, $script_db, $script_user, $script_pass, $script_prefix, $script_db_charset;
|
|
||||||
|
|
||||||
if (isset($script_path))
|
|
||||||
{
|
|
||||||
//check for last slash
|
|
||||||
if (isset($script_path[strlen($script_path)]) && $script_path[strlen($script_path)] == '/')
|
|
||||||
{
|
|
||||||
$script_path = substr($script_path, 0, strlen($script_path));
|
|
||||||
}
|
|
||||||
|
|
||||||
$configExists = false;
|
|
||||||
|
|
||||||
if (file_exists(PATH . $script_path . SCRIPT_CONFIG_PATH))
|
|
||||||
{
|
|
||||||
$configPath = PATH . $script_path . SCRIPT_CONFIG_PATH;
|
|
||||||
$configExists = true;
|
|
||||||
}
|
|
||||||
elseif (file_exists(PATH . $script_path . '/core/includes/config.php'))
|
|
||||||
{
|
|
||||||
$configPath = PATH . $script_path . '/core/includes/config.php';
|
|
||||||
$configExists = true;
|
|
||||||
$isVB5 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//get some useful data from vb config file
|
|
||||||
if ($configExists)
|
|
||||||
{
|
|
||||||
require_once $configPath;
|
|
||||||
|
|
||||||
//
|
|
||||||
//get config from config file
|
|
||||||
//
|
|
||||||
$forum_srv = $config['MasterServer']['servername'];
|
|
||||||
$forum_db = $config['Database']['dbname'];
|
|
||||||
$forum_user = $config['MasterServer']['username'];
|
|
||||||
$forum_pass = $config['MasterServer']['password'];
|
|
||||||
$forum_prefix= $config['Database']['tableprefix'];
|
|
||||||
|
|
||||||
if ($config['MasterServer']['port'] != 3306)
|
|
||||||
{
|
|
||||||
$forum_srv .= ':' . $config['MasterServer']['port'];
|
|
||||||
}
|
|
||||||
|
|
||||||
//some people change their db charset
|
|
||||||
if (isset($config['Mysqli']['charset']))
|
|
||||||
{
|
|
||||||
$forum_db_charset = $config['Mysqli']['charset'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
big_error('Forum path is not correct', sprintf($lang['SCRIPT_AUTH_PATH_WRONG'], 'Vbulletin'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//
|
|
||||||
//custom config data
|
|
||||||
//
|
|
||||||
$forum_srv = $script_srv;
|
|
||||||
$forum_db = $script_db;
|
|
||||||
$forum_user = $script_user;
|
|
||||||
$forum_pass = $script_pass;
|
|
||||||
$forum_prefix = $script_prefix;
|
|
||||||
|
|
||||||
//some people change their db charset
|
|
||||||
if (isset($script_db_charset))
|
|
||||||
{
|
|
||||||
$forum_db_charset = $script_db_charset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($forum_srv) || empty($forum_user) || empty($forum_db))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$SQLVB = new KleejaDatabase($forum_srv, $forum_user, $forum_pass, $forum_db, true);
|
|
||||||
|
|
||||||
|
|
||||||
if (isset($forum_db_charset))
|
|
||||||
{ //config
|
|
||||||
$SQLVB->set_names($forum_db_charset);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{ //auto
|
|
||||||
$SQLVB->set_names('latin1');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unset($forum_pass); // We do not need this any longer
|
|
||||||
|
|
||||||
$pass = empty($script_cp1256) || ! $script_cp1256 ? $pass : $usrcp->kleeja_utf8($pass, false);
|
|
||||||
$name = empty($script_cp1256) || ! $script_cp1256 || $hashed ? $name : $usrcp->kleeja_utf8($name, false);
|
|
||||||
|
|
||||||
$query_salt = [
|
|
||||||
'SELECT' => $hashed ? '*' : ($isVB5 ? 'token' : 'salt'),
|
|
||||||
'FROM' => "`{$forum_prefix}user`",
|
|
||||||
];
|
|
||||||
|
|
||||||
$query_salt['WHERE'] = $hashed ? 'userid=' . intval($name) . ' AND ' . ($isVB5 ? 'token' : 'password') . "='" . $SQLVB->real_escape($pass) . "' AND usergroupid != '8'" : "username='" . $SQLVB->real_escape($name) . "' AND usergroupid != '8'";
|
|
||||||
|
|
||||||
//if return only name let's ignore the above
|
|
||||||
if ($return_name)
|
|
||||||
{
|
|
||||||
$query_salt['SELECT'] = 'username';
|
|
||||||
$query_salt['WHERE'] = 'userid=' . intval($name);
|
|
||||||
}
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_usrdata_vb_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
$result_salt = $SQLVB->build($query_salt);
|
|
||||||
|
|
||||||
if ($SQLVB->num_rows($result_salt) > 0)
|
|
||||||
{
|
|
||||||
while ($row1=$SQLVB->fetch_array($result_salt))
|
|
||||||
{
|
|
||||||
if ($return_name)
|
|
||||||
{
|
|
||||||
return empty($script_cp1256) || ! $script_cp1256 ? $row1['username'] : $usrcp->kleeja_utf8($row1['username']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $hashed)
|
|
||||||
{
|
|
||||||
$pass = ! $isVB5
|
|
||||||
? md5(md5($pass) . $row1['salt']) // without normal md5
|
|
||||||
: crypt(md5($pass), $row1['token']);
|
|
||||||
|
|
||||||
$query = [
|
|
||||||
'SELECT' => '*',
|
|
||||||
'FROM' => "`{$forum_prefix}user`",
|
|
||||||
'WHERE' => "username='" . $SQLVB->real_escape($name) . "' AND " . ($isVB5 ? 'token' : 'password') . "='" . $SQLVB->real_escape($pass) . "' AND usergroupid != '8'"
|
|
||||||
];
|
|
||||||
|
|
||||||
$result = $SQLVB->build($query);
|
|
||||||
|
|
||||||
if ($SQLVB->num_rows($result) != 0)
|
|
||||||
{
|
|
||||||
while ($row=$SQLVB->fetch_array($result))
|
|
||||||
{
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
define('USER_ID', $row['userid']);
|
|
||||||
define('GROUP_ID', ($row['usergroupid'] == 6 ? 1 : 3));
|
|
||||||
define('USER_NAME', empty($script_cp1256) || ! $script_cp1256 ? $row['username'] : $usrcp->kleeja_utf8($row['username']));
|
|
||||||
define('USER_MAIL', $row['email']);
|
|
||||||
define('USER_ADMIN', ($row['usergroupid'] == 6 ? 1 : 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
//define('LAST_VISIT',$row['last_visit']);
|
|
||||||
|
|
||||||
$userinfo = $row;
|
|
||||||
$userinfo['group_id'] = ($row['usergroupid'] == 6 ? 1 : 3);
|
|
||||||
$user_y = kleeja_base64_encode(serialize(['id'=>$row['userid'], 'name'=>USER_NAME, 'mail'=>$row['email'], 'last_visit'=>time()]));
|
|
||||||
|
|
||||||
$hash_key_expire = sha1(md5($config['h_key'] . ($isVB5 ? $row['token'] : $row['password'])) . $expire);
|
|
||||||
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
$usrcp->kleeja_set_cookie('ulogu', $usrcp->en_de_crypt(
|
|
||||||
$row['userid'] . '|' .
|
|
||||||
($isVB5 ? $row['token'] : $row['password']) . '|' .
|
|
||||||
$expire . '|' .
|
|
||||||
$hash_key_expire . '|' .
|
|
||||||
($row['usergroupid'] == 6 ? 1 : 3) . '|' .
|
|
||||||
$user_y
|
|
||||||
), $expire);
|
|
||||||
}
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_while_usrdata_vb_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
}
|
|
||||||
$SQLVB->freeresult($result);
|
|
||||||
}//nums_sql2
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$SQLVB->close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! $loginadm)
|
|
||||||
{
|
|
||||||
define('USER_ID', $row1['userid']);
|
|
||||||
define('USER_NAME', empty($script_cp1256) || ! $script_cp1256 ? $row1['username'] : $usrcp->kleeja_utf8($row1['username']));
|
|
||||||
define('USER_MAIL', $row1['email']);
|
|
||||||
define('USER_ADMIN', ($row1['usergroupid'] == 6) ? 1 : 0);
|
|
||||||
define('GROUP_ID', ($row1['usergroupid'] == 6) ? 1 : 3);
|
|
||||||
$userinfo = $row1;
|
|
||||||
$userinfo['group_id'] = ($row1['usergroupid'] == 6 ? 1 : 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}//whil1
|
|
||||||
|
|
||||||
$SQLVB->freeresult($result_salt);
|
|
||||||
|
|
||||||
unset($pass);
|
|
||||||
$SQLVB->close();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$SQLVB->close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function kleeja_auth_username ($user_id)
|
|
||||||
{
|
|
||||||
return kleeja_auth_login ($user_id, false, true, 0, false, true);
|
|
||||||
}
|
|
||||||
@@ -60,16 +60,6 @@ class cache
|
|||||||
|
|
||||||
public function save($name, $data, $time = 86400)
|
public function save($name, $data, $time = 86400)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
//We have problems if APC is enabled, so we disable our cache
|
|
||||||
//system if it's lodoed to prevent those problems, but we will
|
|
||||||
//try to fix it in the near future .. I hope that.
|
|
||||||
//
|
|
||||||
if (defined('APC_CACHE'))
|
|
||||||
{
|
|
||||||
//return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$name = preg_replace('![^a-z0-9_]!i', '_', $name);
|
$name = preg_replace('![^a-z0-9_]!i', '_', $name);
|
||||||
$data_for_save = '<?' . 'php' . "\n";
|
$data_for_save = '<?' . 'php' . "\n";
|
||||||
$data_for_save .= '//Cache file, generated for Kleeja at ' . gmdate('d-m-Y h:i A') . "\n\n";
|
$data_for_save .= '//Cache file, generated for Kleeja at ' . gmdate('d-m-Y h:i A') . "\n\n";
|
||||||
@@ -115,9 +105,9 @@ $cache = new cache;
|
|||||||
if (! ($config = $cache->get('data_config')))
|
if (! ($config = $cache->get('data_config')))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'c.name, c.value',
|
'SELECT' => 'c.name, c.value',
|
||||||
'FROM' => "{$dbprefix}config c",
|
'FROM' => "{$dbprefix}config c",
|
||||||
'WHERE' => 'c.dynamic = 0',
|
'WHERE' => 'c.dynamic = 0',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_config_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_config_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -141,9 +131,9 @@ if (! ($config = $cache->get('data_config')))
|
|||||||
if (! ($olang = $cache->get('data_lang' . $config['language'])))
|
if (! ($olang = $cache->get('data_lang' . $config['language'])))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'l.word, l.trans',
|
'SELECT' => 'l.word, l.trans',
|
||||||
'FROM' => "{$dbprefix}lang l",
|
'FROM' => "{$dbprefix}lang l",
|
||||||
'WHERE' => "l.lang_id='" . $SQL->escape($config['language']) . "'",
|
'WHERE' => "l.lang_id='" . $SQL->escape($config['language']) . "'",
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_lang_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_lang_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -167,9 +157,9 @@ if (! ($olang = $cache->get('data_lang' . $config['language'])))
|
|||||||
if (! ($stats = $cache->get('data_stats')))
|
if (! ($stats = $cache->get('data_stats')))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 's.files, s.imgs, s.sizes, s.users, s.last_file, s.last_f_del, s.last_google' .
|
'SELECT' => 's.files, s.imgs, s.sizes, s.users, s.last_file, s.last_f_del, s.last_google' .
|
||||||
', s.last_bing, s.google_num, s.bing_num, s.lastuser',
|
', s.last_bing, s.google_num, s.bing_num, s.lastuser',
|
||||||
'FROM' => "{$dbprefix}stats s"
|
'FROM' => "{$dbprefix}stats s"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_stats_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_stats_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -179,17 +169,17 @@ if (! ($stats = $cache->get('data_stats')))
|
|||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
$stats = [
|
$stats = [
|
||||||
'stat_files' => $row['files'],
|
'stat_files' => $row['files'],
|
||||||
'stat_imgs' => $row['imgs'],
|
'stat_imgs' => $row['imgs'],
|
||||||
'stat_sizes' => $row['sizes'],
|
'stat_sizes' => $row['sizes'],
|
||||||
'stat_users' => $row['users'],
|
'stat_users' => $row['users'],
|
||||||
'stat_last_file' => $row['last_file'],
|
'stat_last_file' => $row['last_file'],
|
||||||
'stat_last_f_del' => $row['last_f_del'],
|
'stat_last_f_del' => $row['last_f_del'],
|
||||||
'stat_last_google' => $row['last_google'],
|
'stat_last_google' => $row['last_google'],
|
||||||
'stat_last_bing' => $row['last_bing'],
|
'stat_last_bing' => $row['last_bing'],
|
||||||
'stat_google_num' => $row['google_num'],
|
'stat_google_num' => $row['google_num'],
|
||||||
'stat_bing_num' => $row['bing_num'],
|
'stat_bing_num' => $row['bing_num'],
|
||||||
'stat_last_user' => $row['lastuser']
|
'stat_last_user' => $row['lastuser']
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('while_fetch_stats_in_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('while_fetch_stats_in_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -202,28 +192,28 @@ if (! ($stats = $cache->get('data_stats')))
|
|||||||
|
|
||||||
//also, save the data for the charts later
|
//also, save the data for the charts later
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.filter_uid',
|
'SELECT' => 'f.filter_uid',
|
||||||
'FROM' => "{$dbprefix}filters f",
|
'FROM' => "{$dbprefix}filters f",
|
||||||
'WHERE' => "f.filter_type='stats_for_acp' AND f.filter_uid = '" . date('d-n-Y') . "'"
|
'WHERE' => "f.filter_type='stats_for_acp' AND f.filter_uid = '" . date('d-n-Y') . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
//if already there is stats for this day, just update it, if not insert a new one
|
//if already there is stats for this day, just update it, if not insert a new one
|
||||||
if ($SQL->num_rows($result))
|
if ($SQL->num_rows($result))
|
||||||
{
|
{
|
||||||
$f_query = [
|
$f_query = [
|
||||||
'UPDATE' => "{$dbprefix}filters",
|
'UPDATE' => "{$dbprefix}filters",
|
||||||
'SET' => "filter_value='" . implode(':', [$stats['stat_files'], $stats['stat_imgs'], $stats['stat_sizes']]) . "'",
|
'SET' => "filter_value='" . implode(':', [$stats['stat_files'], $stats['stat_imgs'], $stats['stat_sizes']]) . "'",
|
||||||
'WHERE' => "filter_type='stats_for_acp' AND filter_uid = '" . date('d-n-Y') . "'"
|
'WHERE' => "filter_type='stats_for_acp' AND filter_uid = '" . date('d-n-Y') . "'"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$f_query = [
|
$f_query = [
|
||||||
'INSERT' => 'filter_uid, filter_type ,filter_value ,filter_time',
|
'INSERT' => 'filter_uid, filter_type ,filter_value ,filter_time',
|
||||||
'INTO' => "{$dbprefix}filters",
|
'INTO' => "{$dbprefix}filters",
|
||||||
'VALUES' => "'" . date('d-n-Y') . "', 'stats_for_acp', '" . implode(':', [$stats['stat_files'], $stats['stat_imgs'], $stats['stat_sizes']]) . "', " . time()
|
'VALUES' => "'" . date('d-n-Y') . "', 'stats_for_acp', '" . implode(':', [$stats['stat_files'], $stats['stat_imgs'], $stats['stat_sizes']]) . "', " . time()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,8 +231,8 @@ unset($stats);
|
|||||||
if (! ($banss = $cache->get('data_ban')))
|
if (! ($banss = $cache->get('data_ban')))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 's.ban',
|
'SELECT' => 's.ban',
|
||||||
'FROM' => "{$dbprefix}stats s"
|
'FROM' => "{$dbprefix}stats s"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_ban_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_ban_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -278,8 +268,8 @@ if (! ($banss = $cache->get('data_ban')))
|
|||||||
if (! ($ruless = $cache->get('data_rules')))
|
if (! ($ruless = $cache->get('data_rules')))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 's.rules',
|
'SELECT' => 's.rules',
|
||||||
'FROM' => "{$dbprefix}stats s"
|
'FROM' => "{$dbprefix}stats s"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_rules_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_rules_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -299,8 +289,8 @@ if (! ($ruless = $cache->get('data_rules')))
|
|||||||
if (! ($extras = $cache->get('data_extra')))
|
if (! ($extras = $cache->get('data_extra')))
|
||||||
{
|
{
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 's.ex_header, s.ex_footer',
|
'SELECT' => 's.ex_header, s.ex_footer',
|
||||||
'FROM' => "{$dbprefix}stats s"
|
'FROM' => "{$dbprefix}stats s"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_extra_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_extra_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -328,9 +318,9 @@ if (! ($d_groups = $cache->get('data_groups')))
|
|||||||
|
|
||||||
//data
|
//data
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'g.*',
|
'SELECT' => 'g.*',
|
||||||
'FROM' => "{$dbprefix}groups g",
|
'FROM' => "{$dbprefix}groups g",
|
||||||
'ORDER_BY' => 'g.group_id ASC',
|
'ORDER_BY' => 'g.group_id ASC',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -348,9 +338,9 @@ if (! ($d_groups = $cache->get('data_groups')))
|
|||||||
|
|
||||||
//configs
|
//configs
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'g.group_id, g.name, g.value',
|
'SELECT' => 'g.group_id, g.name, g.value',
|
||||||
'FROM' => "{$dbprefix}groups_data g",
|
'FROM' => "{$dbprefix}groups_data g",
|
||||||
'ORDER_BY' => 'g.group_id ASC',
|
'ORDER_BY' => 'g.group_id ASC',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_data_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_data_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -364,9 +354,9 @@ if (! ($d_groups = $cache->get('data_groups')))
|
|||||||
|
|
||||||
//acl
|
//acl
|
||||||
$query2 = [
|
$query2 = [
|
||||||
'SELECT' => 'g.group_id, g.acl_name, g.acl_can',
|
'SELECT' => 'g.group_id, g.acl_name, g.acl_can',
|
||||||
'FROM' => "{$dbprefix}groups_acl g",
|
'FROM' => "{$dbprefix}groups_acl g",
|
||||||
'ORDER_BY' => 'g.group_id ASC',
|
'ORDER_BY' => 'g.group_id ASC',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_acls_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_acls_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -380,9 +370,9 @@ if (! ($d_groups = $cache->get('data_groups')))
|
|||||||
|
|
||||||
//exts
|
//exts
|
||||||
$query3 = [
|
$query3 = [
|
||||||
'SELECT' => 'g.group_id, g.ext, g.size',
|
'SELECT' => 'g.group_id, g.ext, g.size',
|
||||||
'FROM' => "{$dbprefix}groups_exts g",
|
'FROM' => "{$dbprefix}groups_exts g",
|
||||||
'ORDER_BY' => 'g.group_id ASC',
|
'ORDER_BY' => 'g.group_id ASC',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_exts_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_groups_exts_cache', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|||||||
@@ -68,12 +68,12 @@ function kleeja_cpatcha_image()
|
|||||||
// We figure a bug that happens when you add font name without './' before it ..
|
// We figure a bug that happens when you add font name without './' before it ..
|
||||||
// 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
|
||||||
{
|
{
|
||||||
imagestring ($image, imageloadfont(dirname(__FILE__) . '/arial.gdf'), $x+rand(10, 15), $y-rand(10, 15), $security_code, $white);
|
imagestring($image, imageloadfont(dirname(__FILE__) . '/arial.gdf'), $x+rand(10, 15), $y-rand(10, 15), $security_code, $white);
|
||||||
//imagestring ($image, 1, $width-35, $height-10, 'Kleeja', ImageColorAllocate($image, 200, 200, 200));
|
//imagestring ($image, 1, $width-35, $height-10, 'Kleeja', ImageColorAllocate($image, 200, 200, 200));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,6 @@ if (@extension_loaded('apc'))
|
|||||||
//path
|
//path
|
||||||
if (! defined('PATH'))
|
if (! defined('PATH'))
|
||||||
{
|
{
|
||||||
if (! defined('__DIR__'))
|
|
||||||
{
|
|
||||||
define('__DIR__', dirname(__FILE__));
|
|
||||||
}
|
|
||||||
define('PATH', str_replace('/includes', '', __DIR__) . '/');
|
define('PATH', str_replace('/includes', '', __DIR__) . '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +67,16 @@ function kleeja_show_error($error_number, $error_string = '', $error_file = '',
|
|||||||
{
|
{
|
||||||
switch ($error_number)
|
switch ($error_number)
|
||||||
{
|
{
|
||||||
case E_NOTICE: case E_WARNING: case E_USER_WARNING: case E_USER_NOTICE: case E_STRICT: break;
|
case E_NOTICE: case E_WARNING: case E_USER_WARNING: case E_USER_NOTICE: case E_STRICT:
|
||||||
|
if (function_exists('kleeja_log'))
|
||||||
|
{
|
||||||
|
$error_name = [
|
||||||
|
2 => 'Warning', 8 => 'Notice', 512 => 'U_Warning', 1024 => 'U_Notice', 2048 => 'Strict'
|
||||||
|
][$error_number];
|
||||||
|
kleeja_log('[' . $error_name . '] ' . basename($error_file) . ':' . $error_line . ' ' . $error_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
||||||
@@ -123,8 +128,6 @@ if (! is_bot() && ! isset($_SESSION))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//no enough data
|
//no enough data
|
||||||
if (empty($dbname) || empty($dbuser))
|
if (empty($dbname) || empty($dbuser))
|
||||||
{
|
{
|
||||||
@@ -139,13 +142,23 @@ define('K_DIR_CHMOD', defined('HAS_SUEXEC') ? (0755 & ~umask()) : 0755);
|
|||||||
|
|
||||||
include PATH . 'includes/functions_alternative.php';
|
include PATH . 'includes/functions_alternative.php';
|
||||||
include PATH . 'includes/version.php';
|
include PATH . 'includes/version.php';
|
||||||
include PATH . 'includes/mysqli.php';
|
|
||||||
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
include PATH . 'includes/sqlite.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include PATH . 'includes/mysqli.php';
|
||||||
|
}
|
||||||
|
|
||||||
include PATH . 'includes/style.php';
|
include PATH . 'includes/style.php';
|
||||||
include PATH . 'includes/usr.php';
|
include PATH . 'includes/usr.php';
|
||||||
include PATH . 'includes/pager.php';
|
include PATH . 'includes/pager.php';
|
||||||
include PATH . 'includes/functions.php';
|
include PATH . 'includes/functions.php';
|
||||||
include PATH . 'includes/functions_display.php';
|
include PATH . 'includes/functions_display.php';
|
||||||
include PATH . 'includes/plugins.php';
|
include PATH . 'includes/plugins.php';
|
||||||
|
include PATH . 'includes/FetchFile.php';
|
||||||
|
|
||||||
|
|
||||||
if (defined('IN_ADMIN'))
|
if (defined('IN_ADMIN'))
|
||||||
@@ -161,23 +174,23 @@ if (empty($script_encoding))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//start classes ..
|
//start classes ..
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
//no need after now
|
//no need after now
|
||||||
unset($dbpass);
|
unset($dbpass);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tpl = new kleeja_style;
|
$tpl = new kleeja_style;
|
||||||
$usrcp = new usrcp;
|
$usrcp = new usrcp;
|
||||||
|
|
||||||
//then get caches
|
//then get caches
|
||||||
include PATH . 'includes/cache.php';
|
include PATH . 'includes/cache.php';
|
||||||
|
|
||||||
//getting dynamic configs
|
//getting dynamic configs
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'c.name, c.value',
|
'SELECT' => 'c.name, c.value',
|
||||||
'FROM' => "{$dbprefix}config c",
|
'FROM' => "{$dbprefix}config c",
|
||||||
'WHERE' => 'c.dynamic = 1',
|
'WHERE' => 'c.dynamic = 1',
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
@@ -187,6 +200,7 @@ while ($row=$SQL->fetch_array($result))
|
|||||||
$config[$row['name']] = $row['value'];
|
$config[$row['name']] = $row['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//check user or guest
|
//check user or guest
|
||||||
@@ -239,18 +253,14 @@ is_array($plugin_run_result = Plugins::getInstance()->run('boot_common', get_def
|
|||||||
*/
|
*/
|
||||||
date_default_timezone_set('GMT');
|
date_default_timezone_set('GMT');
|
||||||
|
|
||||||
|
//remove PHP version header
|
||||||
|
header_remove('X-Powered-By');
|
||||||
|
|
||||||
//kleeja session id
|
//kleeja session id
|
||||||
$klj_session = $SQL->escape(session_id());
|
define('KJ_SESSION', preg_replace('/[^-,a-zA-Z0-9]/', '', session_id()));
|
||||||
|
|
||||||
|
|
||||||
//site url must end with /
|
//site url must end with /
|
||||||
if ($config['siteurl'])
|
$config['siteurl'] = rtrim($config['siteurl'], '/') . '/';
|
||||||
{
|
|
||||||
$config['siteurl'] = $config['siteurl'][strlen($config['siteurl'])-1] != '/'
|
|
||||||
? $config['siteurl'] . '/'
|
|
||||||
: $config['siteurl'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//check lang
|
//check lang
|
||||||
@@ -289,13 +299,13 @@ if (empty($config['h_key']))
|
|||||||
define('ACP_STYLE_NAME', 'Masmak');
|
define('ACP_STYLE_NAME', 'Masmak');
|
||||||
|
|
||||||
//path variables for Kleeja
|
//path variables for Kleeja
|
||||||
$STYLE_PATH = $config['siteurl'] . 'styles/' . (trim($config['style_depend_on']) == '' ? $config['style'] : $config['style_depend_on']) . '/';
|
$STYLE_PATH = $config['siteurl'] . 'styles/' . (trim($config['style_depend_on']) == '' ? $config['style'] : $config['style_depend_on']) . '/';
|
||||||
$THIS_STYLE_PATH = $config['siteurl'] . 'styles/' . $config['style'] . '/';
|
$THIS_STYLE_PATH = $config['siteurl'] . 'styles/' . $config['style'] . '/';
|
||||||
$THIS_STYLE_PATH_ABS = PATH . 'styles/' . $config['style'] . '/';
|
$THIS_STYLE_PATH_ABS = PATH . 'styles/' . $config['style'] . '/';
|
||||||
$STYLE_PATH_ADMIN = $config['siteurl'] . 'admin/' . (is_browser('mobile') || defined('IN_MOBILE') ? ACP_STYLE_NAME : ACP_STYLE_NAME) . '/';
|
$STYLE_PATH_ADMIN = $config['siteurl'] . 'admin/' . (is_browser('mobile') || defined('IN_MOBILE') ? ACP_STYLE_NAME : ACP_STYLE_NAME) . '/';
|
||||||
$STYLE_PATH_ADMIN_ABS = PATH . 'admin/' . (is_browser('mobile') || defined('IN_MOBILE') ? ACP_STYLE_NAME . '/' : ACP_STYLE_NAME . '/');
|
$STYLE_PATH_ADMIN_ABS = PATH . 'admin/' . (is_browser('mobile') || defined('IN_MOBILE') ? ACP_STYLE_NAME . '/' : ACP_STYLE_NAME . '/');
|
||||||
$DEFAULT_PATH_ADMIN_ABS = PATH . 'admin/' . ACP_STYLE_NAME . '/';
|
$DEFAULT_PATH_ADMIN_ABS = PATH . 'admin/' . ACP_STYLE_NAME . '/';
|
||||||
$DEFAULT_PATH_ADMIN = $config['siteurl'] . 'admin/' . ACP_STYLE_NAME . '/';
|
$DEFAULT_PATH_ADMIN = $config['siteurl'] . 'admin/' . ACP_STYLE_NAME . '/';
|
||||||
|
|
||||||
|
|
||||||
//get languge of common
|
//get languge of common
|
||||||
@@ -384,11 +394,13 @@ if (defined('STOP_CAPTCHA'))
|
|||||||
is_array($plugin_run_result = Plugins::getInstance()->run('end_common', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('end_common', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
|
||||||
if (function_exists('session_register_shutdown'))
|
|
||||||
{
|
register_shutdown_function(function() {
|
||||||
session_register_shutdown();
|
session_write_close();
|
||||||
}
|
|
||||||
else
|
$err = error_get_last();
|
||||||
{
|
if(is_array($err) && ! empty($err['type']) && in_array($err['type'], [E_ERROR, E_PARSE]))
|
||||||
register_shutdown_function('session_write_close');
|
{
|
||||||
}
|
kleeja_log('[FATAL] ' . basename($err['file']) . ':' . $err['line'] . ' ' . $err['message']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -25,15 +25,15 @@ function kleeja_detecting_bots()
|
|||||||
global $SQL, $dbprefix, $config;
|
global $SQL, $dbprefix, $config;
|
||||||
|
|
||||||
// get information ..
|
// get information ..
|
||||||
$agent = $SQL->escape($_SERVER['HTTP_USER_AGENT']);
|
$agent = $SQL->escape($_SERVER['HTTP_USER_AGENT']);
|
||||||
$time = time();
|
$time = time();
|
||||||
|
|
||||||
//for stats
|
//for stats
|
||||||
if (strpos($agent, 'Google') !== false)
|
if (strpos($agent, 'Google') !== false)
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "last_google=$time, google_num=google_num+1"
|
'SET' => "last_google=$time, google_num=google_num+1"
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_google_lst_num', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_google_lst_num', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -41,8 +41,8 @@ function kleeja_detecting_bots()
|
|||||||
elseif (strpos($agent, 'Bing') !== false)
|
elseif (strpos($agent, 'Bing') !== false)
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "last_bing=$time, bing_num=bing_num+1"
|
'SET' => "last_bing=$time, bing_num=bing_num+1"
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_bing_lst_num', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_bing_lst_num', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -68,28 +68,42 @@ function kleeja_detecting_bots()
|
|||||||
*/
|
*/
|
||||||
function get_ban()
|
function get_ban()
|
||||||
{
|
{
|
||||||
global $banss, $lang, $tpl, $text, $SQL;
|
global $banss, $lang, $SQL, $usrcp;
|
||||||
|
|
||||||
//visitor ip now
|
//visitor ip now
|
||||||
$ip = get_ip();
|
$ip = get_ip();
|
||||||
|
$username = $usrcp->name();
|
||||||
|
|
||||||
//now .. loop for banned ips
|
//now .. loop for banned ips
|
||||||
if (is_array($banss) && ! empty($ip))
|
if (is_array($banss) && (! empty($ip) || ! empty($username)))
|
||||||
{
|
{
|
||||||
foreach ($banss as $ip2)
|
foreach ($banss as $banned_item)
|
||||||
{
|
{
|
||||||
$ip2 = trim($ip2);
|
$banned_item = trim($banned_item);
|
||||||
|
|
||||||
if (empty($ip2))
|
if (empty($banned_item))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//first .. replace all * with something good .
|
|
||||||
$replace_it = str_replace('*', '([0-9]{1,3})', $ip2);
|
|
||||||
$replace_it = str_replace('.', '\.', $replace_it);
|
|
||||||
|
|
||||||
if ($ip == $ip2 || @preg_match('/' . preg_quote($replace_it, '/') . '/i', $ip))
|
$is_banned = false;
|
||||||
|
|
||||||
|
//first .. replace all * with something good .
|
||||||
|
|
||||||
|
if (! empty($ip) && strpos($banned_item, '.') !== false)
|
||||||
|
{
|
||||||
|
$replace_it = str_replace('*', '([0-9]{1,3})', $banned_item);
|
||||||
|
$replace_it = str_replace('.', '\.', $replace_it);
|
||||||
|
|
||||||
|
$is_banned = $ip == $banned_item || @preg_match('/' . preg_quote($replace_it, '/') . '/i', $ip);
|
||||||
|
}
|
||||||
|
elseif (! empty($username) && $banned_item == $username)
|
||||||
|
{
|
||||||
|
$is_banned = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($is_banned)
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('banned_get_ban_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('banned_get_ban_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -131,13 +145,13 @@ function kleeja_plugin_exists($plugin_name)
|
|||||||
global $SQL, $dbprefix;
|
global $SQL, $dbprefix;
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'p.plg_id',
|
'SELECT' => 'p.plg_id',
|
||||||
'FROM' => "{$dbprefix}plugins p",
|
'FROM' => "{$dbprefix}plugins p",
|
||||||
'WHERE' => "p.plg_name = '" . $SQL->escape($plugin_name) . "'",
|
'WHERE' => "p.plg_name = '" . $SQL->escape($plugin_name) . "'",
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$num = $SQL->num_rows($result);
|
$num = $SQL->num_rows($result);
|
||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
@@ -202,7 +216,7 @@ function kleeja_get_page()
|
|||||||
*/
|
*/
|
||||||
function _sm_mk_utf8($text)
|
function _sm_mk_utf8($text)
|
||||||
{
|
{
|
||||||
return '=?UTF-8?B?' . kleeja_base64_encode($text) . '?=';
|
return '=?UTF-8?B?' . base64_encode($text) . '?=';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -250,244 +264,6 @@ function send_mail($to, $body, $subject, $fromAddress, $fromName, $bcc = '')
|
|||||||
return $mail_sent;
|
return $mail_sent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get remote files
|
|
||||||
* (c) punbb + Kleeja team
|
|
||||||
* @param $url
|
|
||||||
* @param bool $save_in
|
|
||||||
* @param int $timeout
|
|
||||||
* @param bool $head_only
|
|
||||||
* @param int $max_redirects
|
|
||||||
* @param bool $binary
|
|
||||||
* @return bool|string|array
|
|
||||||
*/
|
|
||||||
function fetch_remote_file($url, $save_in = false, $timeout = 20, $head_only = false, $max_redirects = 10, $binary = false)
|
|
||||||
{
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_fetch_remote_file_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
|
|
||||||
// Quite unlikely that this will be allowed on a shared host, but it can't hurt
|
|
||||||
if (function_exists('ini_set'))
|
|
||||||
{
|
|
||||||
@ini_set('default_socket_timeout', $timeout);
|
|
||||||
}
|
|
||||||
$allow_url_fopen = function_exists('ini_get')
|
|
||||||
? strtolower(@ini_get('allow_url_fopen'))
|
|
||||||
: strtolower(@get_cfg_var('allow_url_fopen'));
|
|
||||||
|
|
||||||
if (function_exists('curl_init'))
|
|
||||||
{
|
|
||||||
$ch = curl_init($url);
|
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
|
||||||
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
||||||
@curl_setopt($ch, CURLOPT_AUTOREFERER, true);
|
|
||||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
|
||||||
curl_setopt($ch, CURLOPT_HEADER, $head_only);
|
|
||||||
curl_setopt($ch, CURLOPT_NOBODY, $head_only);
|
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
|
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Kleeja)');
|
|
||||||
curl_setopt($ch, CURLOPT_FAILONERROR, true);
|
|
||||||
|
|
||||||
if ($binary)
|
|
||||||
{
|
|
||||||
curl_setopt($ch, CURLOPT_ENCODING, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
//let's open new file to save it in.
|
|
||||||
if ($save_in)
|
|
||||||
{
|
|
||||||
$out = @fopen($save_in, 'w');
|
|
||||||
curl_setopt($ch, CURLOPT_FILE, $out);
|
|
||||||
@curl_exec($ch);
|
|
||||||
curl_close($ch);
|
|
||||||
fclose($out);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($head_only)
|
|
||||||
{
|
|
||||||
// Grab the page
|
|
||||||
$data = @curl_exec($ch);
|
|
||||||
$response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
||||||
curl_close();
|
|
||||||
|
|
||||||
if ($data !== false && $response_code == '200')
|
|
||||||
{
|
|
||||||
return explode("\r\n", str_replace("\r\n\r\n", "\r\n", trim($data)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! $save_in)
|
|
||||||
{
|
|
||||||
$data = @curl_exec($ch);
|
|
||||||
curl_close();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $save_in ? true : $data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// fsockopen() is the second best thing
|
|
||||||
elseif (function_exists('fsockopen'))
|
|
||||||
{
|
|
||||||
$url_parsed = parse_url($url);
|
|
||||||
$host = $url_parsed['host'];
|
|
||||||
$port = empty($url_parsed['port']) || $url_parsed['port'] == 0 ? 80 : $url_parsed['port'];
|
|
||||||
$path = $url_parsed['path'];
|
|
||||||
|
|
||||||
if (isset($url_parsed['query']) && $url_parsed['query'] != '')
|
|
||||||
{
|
|
||||||
$path .= '?' . $url_parsed['query'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $fp = @fsockopen($host, $port, $errno, $errstr, $timeout))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send a standard HTTP 1.0 request for the page
|
|
||||||
fwrite($fp, ($head_only ? 'HEAD' : 'GET') . " $path HTTP/1.0\r\n");
|
|
||||||
fwrite($fp, "Host: $host\r\n");
|
|
||||||
fwrite($fp, 'User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Kleeja)' . "\r\n");
|
|
||||||
fwrite($fp, 'Connection: Close' . "\r\n\r\n");
|
|
||||||
|
|
||||||
stream_set_timeout($fp, $timeout);
|
|
||||||
$stream_meta = stream_get_meta_data($fp);
|
|
||||||
|
|
||||||
$fp2 = null;
|
|
||||||
|
|
||||||
//let's open new file to save it in.
|
|
||||||
if ($save_in)
|
|
||||||
{
|
|
||||||
$fp2 = @fopen($save_in, 'w' . ($binary ? '' : ''));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch the response 1024 bytes at a time and watch out for a timeout
|
|
||||||
$in = false;
|
|
||||||
$h = false;
|
|
||||||
|
|
||||||
while (! feof($fp) && ! $stream_meta['timed_out'])
|
|
||||||
{
|
|
||||||
$s = fgets($fp, 1024);
|
|
||||||
|
|
||||||
if ($save_in)
|
|
||||||
{
|
|
||||||
if ($s == "\r\n")
|
|
||||||
{ //|| $s == "\n")
|
|
||||||
$h = true;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($h)
|
|
||||||
{
|
|
||||||
@fwrite($fp2, $s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$in .= $s;
|
|
||||||
$stream_meta = stream_get_meta_data($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($fp);
|
|
||||||
|
|
||||||
if ($save_in)
|
|
||||||
{
|
|
||||||
unset($in);
|
|
||||||
@fclose($fp2);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process 301/302 redirect
|
|
||||||
if ($in !== false && $max_redirects > 0 && preg_match('#^HTTP/1.[01] 30[12]#', $in))
|
|
||||||
{
|
|
||||||
$headers = explode("\r\n", trim($in));
|
|
||||||
|
|
||||||
foreach ($headers as $header)
|
|
||||||
{
|
|
||||||
if (substr($header, 0, 10) == 'Location: ')
|
|
||||||
{
|
|
||||||
$response = fetch_remote_file(substr($header, 10), $save_in, $timeout, $head_only, $max_redirects - 1);
|
|
||||||
|
|
||||||
if ($response != false)
|
|
||||||
{
|
|
||||||
$headers[] = $response;
|
|
||||||
}
|
|
||||||
return $headers;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ignore everything except a 200 response code
|
|
||||||
if ($in !== false && preg_match('#^HTTP/1.[01] 200 OK#', $in))
|
|
||||||
{
|
|
||||||
if ($head_only)
|
|
||||||
{
|
|
||||||
return explode("\r\n", trim($in));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$content_start = strpos($in, "\r\n\r\n");
|
|
||||||
|
|
||||||
if ($content_start !== false)
|
|
||||||
{
|
|
||||||
return substr($in, $content_start + 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $in;
|
|
||||||
}
|
|
||||||
// Last case scenario, we use file_get_contents provided allow_url_fopen is enabled (any non 200 response results in a failure)
|
|
||||||
elseif (in_array($allow_url_fopen, ['on', 'true', '1']))
|
|
||||||
{
|
|
||||||
// PHP5's version of file_get_contents() supports stream options
|
|
||||||
if (version_compare(PHP_VERSION, '5.0.0', '>='))
|
|
||||||
{
|
|
||||||
// Setup a stream context
|
|
||||||
$stream_context = stream_context_create(
|
|
||||||
[
|
|
||||||
'http' => [
|
|
||||||
'method' => $head_only ? 'HEAD' : 'GET',
|
|
||||||
'user_agent' => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Kleeja)',
|
|
||||||
'max_redirects' => $max_redirects + 1, // PHP >=5.1.0 only
|
|
||||||
'timeout' => $timeout // PHP >=5.2.1 only
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$content = @file_get_contents($url, false, $stream_context);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$content = @file_get_contents($url);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Did we get anything?
|
|
||||||
if ($content !== false)
|
|
||||||
{
|
|
||||||
// Gotta love the fact that $http_response_header just appears in the global scope (*cough* hack! *cough*)
|
|
||||||
if ($head_only)
|
|
||||||
{
|
|
||||||
return $http_response_header;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($save_in)
|
|
||||||
{
|
|
||||||
$fp2 = fopen($save_in, 'w' . ($binary ? 'b' : ''));
|
|
||||||
@fwrite($fp2, $content);
|
|
||||||
@fclose($fp2);
|
|
||||||
unset($content);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete cache
|
* Delete cache
|
||||||
* @param string $name
|
* @param string $name
|
||||||
@@ -635,7 +411,7 @@ function get_mime_for_header($ext)
|
|||||||
'bcpio' => 'application/x-bcpio',
|
'bcpio' => 'application/x-bcpio',
|
||||||
'bin' => 'application/octet-stream',
|
'bin' => 'application/octet-stream',
|
||||||
'bmp' => 'image/bmp', // this is not a good mime, but it work anyway
|
'bmp' => 'image/bmp', // this is not a good mime, but it work anyway
|
||||||
//"bmp" => "image/x-ms-bmp", # @see bugs.php.net/47359
|
//"bmp" => "image/x-ms-bmp", # @see bugs.php.net/47359
|
||||||
'c' => 'text/plain',
|
'c' => 'text/plain',
|
||||||
'cat' => 'application/vnd.ms-pkiseccat',
|
'cat' => 'application/vnd.ms-pkiseccat',
|
||||||
'cdf' => 'application/x-cdf',
|
'cdf' => 'application/x-cdf',
|
||||||
@@ -914,14 +690,14 @@ function get_config($name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'c.value',
|
'SELECT' => 'c.value',
|
||||||
'FROM' => $table,
|
'FROM' => $table,
|
||||||
'WHERE' => "c.name = '" . $SQL->escape($name) . "'" . $group_id_sql
|
'WHERE' => "c.name = '" . $SQL->escape($name) . "'" . $group_id_sql
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$v = $SQL->fetch($result);
|
$v = $SQL->fetch($result);
|
||||||
$return = $v['value'];
|
$return = $v['value'];
|
||||||
|
|
||||||
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;
|
||||||
@@ -955,10 +731,10 @@ function add_config($name, $value, $order = '0', $html = '', $type = '0', $plg_i
|
|||||||
|
|
||||||
foreach ($group_ids as $g_id)
|
foreach ($group_ids as $g_id)
|
||||||
{
|
{
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => '`name`, `value`, `group_id`',
|
'INSERT' => '`name`, `value`, `group_id`',
|
||||||
'INTO' => "{$dbprefix}groups_data",
|
'INTO' => "{$dbprefix}groups_data",
|
||||||
'VALUES' => "'" . $SQL->escape($name) . "','" . $SQL->escape($value) . "', " . $g_id,
|
'VALUES' => "'" . $SQL->escape($name) . "','" . $SQL->escape($value) . "', " . $g_id,
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_config_func_groups_data', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_config_func_groups_data', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -967,10 +743,10 @@ function add_config($name, $value, $order = '0', $html = '', $type = '0', $plg_i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => '`name` ,`value` ,`option` ,`display_order`, `type`, `plg_id`, `dynamic`',
|
'INSERT' => '`name` ,`value` ,`option` ,`display_order`, `type`, `plg_id`, `dynamic`',
|
||||||
'INTO' => "{$dbprefix}config",
|
'INTO' => "{$dbprefix}config",
|
||||||
'VALUES' => "'" . $SQL->escape($name) . "','" . $SQL->escape($value) . "', '" . $SQL->real_escape($html) . "','" . intval($order) . "','" . $SQL->escape($type) . "','" . intval($plg_id) . "','" . ($dynamic ? '1' : '0') . "'",
|
'VALUES' => "'" . $SQL->escape($name) . "','" . $SQL->escape($value) . "', '" . $SQL->real_escape($html) . "','" . intval($order) . "','" . $SQL->escape($type) . "','" . intval($plg_id) . "','" . ($dynamic ? '1' : '0') . "'",
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -1018,9 +794,9 @@ function add_config_r($configs)
|
|||||||
|
|
||||||
function update_config($name, $value, $escape = true, $group = false)
|
function update_config($name, $value, $escape = true, $group = false)
|
||||||
{
|
{
|
||||||
global $SQL, $dbprefix, $d_groups, $userinfo;
|
global $SQL, $dbprefix, $d_groups, $userinfo, $config;
|
||||||
|
|
||||||
$value = ($escape) ? $SQL->escape($value) : $value;
|
$value = $escape ? $SQL->escape($value) : $value;
|
||||||
$table = "{$dbprefix}config";
|
$table = "{$dbprefix}config";
|
||||||
|
|
||||||
//what if this config is a group-configs related ?
|
//what if this config is a group-configs related ?
|
||||||
@@ -1040,10 +816,10 @@ function update_config($name, $value, $escape = true, $group = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => $table,
|
'UPDATE' => $table,
|
||||||
'SET' => "value='" . ($escape ? $SQL->escape($value) : $value) . "'",
|
'SET' => "value='" . ($escape ? $SQL->escape($value) : $value) . "'",
|
||||||
'WHERE' => 'name = "' . $SQL->escape($name) . '"' . $group_id_sql
|
'WHERE' => 'name = "' . $SQL->escape($name) . '"' . $group_id_sql
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('update_sql_update_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('update_sql_update_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -1076,6 +852,8 @@ function delete_config($name)
|
|||||||
{
|
{
|
||||||
delete_config($n);
|
delete_config($n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $dbprefix, $SQL, $d_groups, $userinfo;
|
global $dbprefix, $SQL, $d_groups, $userinfo;
|
||||||
@@ -1083,9 +861,9 @@ function delete_config($name)
|
|||||||
//
|
//
|
||||||
// 'IN' doesnt work here with delete, i dont know why ?
|
// 'IN' doesnt work here with delete, i dont know why ?
|
||||||
//
|
//
|
||||||
$delete_query = [
|
$delete_query = [
|
||||||
'DELETE' => "{$dbprefix}config",
|
'DELETE' => "{$dbprefix}config",
|
||||||
'WHERE' => "name = '" . $SQL->escape($name) . "'"
|
'WHERE' => "name = '" . $SQL->escape($name) . "'"
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('del_sql_delete_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('del_sql_delete_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -1093,9 +871,9 @@ function delete_config($name)
|
|||||||
|
|
||||||
if (array_key_exists($name, $d_groups[$userinfo['group_id']]['configs']))
|
if (array_key_exists($name, $d_groups[$userinfo['group_id']]['configs']))
|
||||||
{
|
{
|
||||||
$delete_query = [
|
$delete_query = [
|
||||||
'DELETE' => "{$dbprefix}groups_data",
|
'DELETE' => "{$dbprefix}groups_data",
|
||||||
'WHERE' => "name = '" . $SQL->escape($name) . "'"
|
'WHERE' => "name = '" . $SQL->escape($name) . "'"
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('del_sql_delete_config_func2', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('del_sql_delete_config_func2', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -1115,13 +893,13 @@ function delete_config($name)
|
|||||||
//
|
//
|
||||||
function update_olang($name, $lang = 'en', $value)
|
function update_olang($name, $lang = 'en', $value)
|
||||||
{
|
{
|
||||||
global $SQL, $dbprefix;
|
global $SQL, $dbprefix, $olang;
|
||||||
|
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}lang",
|
'UPDATE' => "{$dbprefix}lang",
|
||||||
'SET' => "trans='" . $SQL->escape($value) . "'",
|
'SET' => "trans='" . $SQL->escape($value) . "'",
|
||||||
'WHERE' => 'word = "' . $SQL->escape($name) . '", lang_id = "' . $SQL->escape($lang) . '"'
|
'WHERE' => 'word = "' . $SQL->escape($name) . '", lang_id = "' . $SQL->escape($lang) . '"'
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('update_sql_update_olang_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('update_sql_update_olang_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -1147,9 +925,9 @@ function add_olang($words = [], $lang = 'en', $plg_id = '0')
|
|||||||
foreach ($words as $w=> $t)
|
foreach ($words as $w=> $t)
|
||||||
{
|
{
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'word ,trans ,lang_id, plg_id',
|
'INSERT' => 'word ,trans ,lang_id, plg_id',
|
||||||
'INTO' => "{$dbprefix}lang",
|
'INTO' => "{$dbprefix}lang",
|
||||||
'VALUES' => "'" . $SQL->escape($w) . "','" . $SQL->real_escape($t) . "', '" . $SQL->escape($lang) . "','" . intval($plg_id) . "'",
|
'VALUES' => "'" . $SQL->escape($w) . "','" . $SQL->real_escape($t) . "', '" . $SQL->escape($lang) . "','" . intval($plg_id) . "'",
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_olang_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_add_olang_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
$SQL->build($insert_query);
|
$SQL->build($insert_query);
|
||||||
@@ -1173,17 +951,20 @@ function delete_olang($words = '', $lang = 'en', $plg_id = 0)
|
|||||||
|
|
||||||
if (is_array($words))
|
if (is_array($words))
|
||||||
{
|
{
|
||||||
foreach ($words as $w)
|
foreach ((array) $lang as $language)
|
||||||
{
|
{
|
||||||
delete_olang($w, $lang);
|
foreach ($words as $w)
|
||||||
|
{
|
||||||
|
delete_olang($w, $language);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$delete_query = [
|
$delete_query = [
|
||||||
'DELETE' => "{$dbprefix}lang",
|
'DELETE' => "{$dbprefix}lang",
|
||||||
'WHERE' => "word = '" . $SQL->escape($words) . "' AND lang_id = '" . $SQL->escape($lang) . "'"
|
'WHERE' => "word = '" . $SQL->escape($words) . "' AND lang_id = '" . $SQL->escape($lang) . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
if (! empty($plg_id))
|
if (! empty($plg_id))
|
||||||
@@ -1224,21 +1005,21 @@ function klj_clean_old_files($from = 0)
|
|||||||
|
|
||||||
if ((time() - $stat_last_f_del) >= 86400)
|
if ((time() - $stat_last_f_del) >= 86400)
|
||||||
{
|
{
|
||||||
$totaldays = (time() - ($config['del_f_day']*86400));
|
$totaldays = (time() - ($config['del_f_day']*86400));
|
||||||
$not_today = time() - 86400;
|
$not_today = time() - 86400;
|
||||||
|
|
||||||
//This feature will work only if id_form is not empty or direct !
|
//This feature will work only if id_form is not empty or direct !
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.last_down, f.name, f.type, f.folder, f.time, f.size, f.id_form',
|
'SELECT' => 'f.id, f.last_down, f.name, f.type, f.folder, f.time, f.size, f.id_form',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'WHERE' => "f.last_down < $totaldays AND f.time < $not_today AND f.id > $from AND f.id_form <> '' AND f.id_form <> 'direct'",
|
'WHERE' => "f.last_down < $totaldays AND f.time < $not_today AND f.id > $from AND f.id_form <> '' AND f.id_form <> 'direct'",
|
||||||
'ORDER BY' => 'f.id ASC',
|
'ORDER BY' => 'f.id ASC',
|
||||||
'LIMIT' => '20',
|
'LIMIT' => '20',
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_klj_clean_old_files_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_klj_clean_old_files_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
$num_of_files_to_delete = $SQL->num_rows($result);
|
$num_of_files_to_delete = $SQL->num_rows($result);
|
||||||
|
|
||||||
@@ -1246,8 +1027,8 @@ function klj_clean_old_files($from = 0)
|
|||||||
{
|
{
|
||||||
//update $stat_last_f_del !!
|
//update $stat_last_f_del !!
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "last_f_del ='" . time() . "'",
|
'SET' => "last_f_del ='" . time() . "'",
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_lstf_del_date_kcof', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_lstf_del_date_kcof', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -1333,10 +1114,10 @@ function klj_clean_old_files($from = 0)
|
|||||||
|
|
||||||
if (sizeof($ex_ids))
|
if (sizeof($ex_ids))
|
||||||
{
|
{
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}files",
|
'UPDATE' => "{$dbprefix}files",
|
||||||
'SET' => "last_down = '" . (time() + 2*86400) . "'",
|
'SET' => "last_down = '" . (time() + 2*86400) . "'",
|
||||||
'WHERE' => 'id IN (' . implode(',', $ex_ids) . ')'
|
'WHERE' => 'id IN (' . implode(',', $ex_ids) . ')'
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_lstdown_old_files', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_update_lstdown_old_files', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -1344,15 +1125,15 @@ function klj_clean_old_files($from = 0)
|
|||||||
|
|
||||||
if (sizeof($ids))
|
if (sizeof($ids))
|
||||||
{
|
{
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => "{$dbprefix}files",
|
'DELETE' => "{$dbprefix}files",
|
||||||
'WHERE' => 'id IN (' . implode(',', $ids) . ')'
|
'WHERE' => 'id IN (' . implode(',', $ids) . ')'
|
||||||
];
|
];
|
||||||
|
|
||||||
//update number of stats
|
//update number of stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num",
|
'SET' => "sizes=sizes-$sizes,files=files-$files_num, imgs=imgs-$imgs_num",
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_delf_old_files', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_delf_old_files', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -1377,21 +1158,21 @@ function klj_clean_old($table, $for = 'all')
|
|||||||
$days = time() - (3600 * 24 * intval($for));
|
$days = time() - (3600 * 24 * intval($for));
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.id, f.time',
|
'SELECT' => 'f.id, f.time',
|
||||||
'DELETE' => "`{$dbprefix}" . $table . '` f',
|
'FROM' => "`{$dbprefix}" . $table . '` f',
|
||||||
'ORDER BY' => 'f.id ASC',
|
'ORDER BY' => 'f.id ASC',
|
||||||
'LIMIT' => '30',
|
'LIMIT' => '30',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($for != 'all')
|
if ($for != 'all')
|
||||||
{
|
{
|
||||||
$query['WHERE'] = "f.time < $days";
|
$query['WHERE'] = "f.time < $days";
|
||||||
}
|
}
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_klj_clean_old_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_klj_clean_old_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$num_to_delete = $SQL->num_rows($result);
|
$num_to_delete = $SQL->num_rows($result);
|
||||||
|
|
||||||
if ($num_to_delete == 0)
|
if ($num_to_delete == 0)
|
||||||
{
|
{
|
||||||
@@ -1409,9 +1190,9 @@ function klj_clean_old($table, $for = 'all')
|
|||||||
|
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
$query_del = [
|
$query_del = [
|
||||||
'DELETE' => '`' . $dbprefix . $table . '`',
|
'DELETE' => '`' . $dbprefix . $table . '`',
|
||||||
'WHERE' => 'id IN (' . implode(',', $ids) . ')'
|
'WHERE' => 'id IN (' . implode(',', $ids) . ')'
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_delf_old_table', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_del_delf_old_table', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -1503,7 +1284,7 @@ function kleeja_log($text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
PATH . 'cache/kleeja_log.log',
|
__DIR__ . '/../cache/kleeja_log.log',
|
||||||
date_format(date_create(), 'Y-m-d h:i:s.ua') . ' | INFO | ' . $text . PHP_EOL,
|
date_format(date_create(), 'Y-m-d h:i:s.ua') . ' | INFO | ' . $text . PHP_EOL,
|
||||||
FILE_APPEND | LOCK_EX
|
FILE_APPEND | LOCK_EX
|
||||||
);
|
);
|
||||||
@@ -1518,15 +1299,15 @@ function kleeja_log($text)
|
|||||||
*/
|
*/
|
||||||
function kleeja_set_range($range, $fileSize)
|
function kleeja_set_range($range, $fileSize)
|
||||||
{
|
{
|
||||||
$dash = strpos($range, '-');
|
$dash = strpos($range, '-');
|
||||||
$first = trim(substr($range, 0, $dash));
|
$first = trim(substr($range, 0, $dash));
|
||||||
$last = trim(substr($range, $dash+1));
|
$last = trim(substr($range, $dash+1));
|
||||||
|
|
||||||
if (! $first)
|
if (! $first)
|
||||||
{
|
{
|
||||||
$suffix = $last;
|
$suffix = $last;
|
||||||
$last = $fileSize - 1;
|
$last = $fileSize - 1;
|
||||||
$first = $fileSize - $suffix;
|
$first = $fileSize - $suffix;
|
||||||
|
|
||||||
if ($first < 0)
|
if ($first < 0)
|
||||||
{
|
{
|
||||||
@@ -1574,8 +1355,8 @@ function kleeja_buffered_range($file, $bytes, $buffer_size = 1024)
|
|||||||
$bytes_to_read = $bytes_left;
|
$bytes_to_read = $bytes_left;
|
||||||
}
|
}
|
||||||
|
|
||||||
$bytes_left -= $bytes_to_read;
|
$bytes_left -= $bytes_to_read;
|
||||||
$contents = fread($file, $bytes_to_read);
|
$contents = fread($file, $bytes_to_read);
|
||||||
echo $contents;
|
echo $contents;
|
||||||
@flush();
|
@flush();
|
||||||
@ob_flush();
|
@ob_flush();
|
||||||
@@ -1603,12 +1384,12 @@ function user_can($acl_name, $group_id = 0)
|
|||||||
|
|
||||||
function ig($name)
|
function ig($name)
|
||||||
{
|
{
|
||||||
return isset($_GET[$name]) ? true : false;
|
return isset($_GET[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ip($name)
|
function ip($name)
|
||||||
{
|
{
|
||||||
return isset($_POST[$name]) ? true : false;
|
return isset($_POST[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function g($name, $type = 'str', $default = '')
|
function g($name, $type = 'str', $default = '')
|
||||||
@@ -1642,7 +1423,17 @@ function p($name, $type = 'str', $default = '')
|
|||||||
*/
|
*/
|
||||||
function add_to_serve_rules($rules, $unique_id = '')
|
function add_to_serve_rules($rules, $unique_id = '')
|
||||||
{
|
{
|
||||||
$current_serve_content = file_get_contents(PATH . 'serve.php');
|
if (! file_exists(PATH . 'plugins_rules.php'))
|
||||||
|
{
|
||||||
|
if (! is_writable(PATH))
|
||||||
|
{
|
||||||
|
chmod(PATH, K_DIR_CHMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
file_put_contents(PATH . 'plugins_rules.php', '<?php return [' . PHP_EOL . '];');
|
||||||
|
}
|
||||||
|
|
||||||
|
$current_serve_content = file_get_contents(PATH . 'plugins_rules.php');
|
||||||
|
|
||||||
$rules = is_array($rules) ? implode(PHP_EOL, $rules) : $rules;
|
$rules = is_array($rules) ? implode(PHP_EOL, $rules) : $rules;
|
||||||
|
|
||||||
@@ -1651,29 +1442,19 @@ function add_to_serve_rules($rules, $unique_id = '')
|
|||||||
$rules = '#start_' . $unique_id . PHP_EOL . $rules . PHP_EOL . '#end_' . $unique_id;
|
$rules = '#start_' . $unique_id . PHP_EOL . $rules . PHP_EOL . '#end_' . $unique_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($current_serve_content, '#end_kleeja_rewrites_rules#') !== false)
|
$current_serve_content = preg_replace(
|
||||||
|
'/return\s{0,4}\[/',
|
||||||
|
'return [' . PHP_EOL . $rules,
|
||||||
|
$current_serve_content
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
if (! is_writable(PATH . 'plugins_rules.php'))
|
||||||
{
|
{
|
||||||
$current_serve_content = str_replace(
|
chmod(PATH . 'plugins_rules.php', K_FILE_CHMOD);
|
||||||
'#end_kleeja_rewrites_rules#',
|
|
||||||
'#end_kleeja_rewrites_rules#' . PHP_EOL . $rules,
|
|
||||||
$current_serve_content
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$current_serve_content = preg_replace(
|
|
||||||
'/\$rules\s{0,4}=\s{0,4}array\(/',
|
|
||||||
'$rules = array(' . PHP_EOL . $rules,
|
|
||||||
$current_serve_content
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! is_writable(PATH . 'serve.php'))
|
file_put_contents(PATH . 'plugins_rules.php', $current_serve_content);
|
||||||
{
|
|
||||||
chmod(PATH . 'serve.php', K_FILE_CHMOD);
|
|
||||||
}
|
|
||||||
|
|
||||||
file_put_contents(PATH . 'serve.php', $current_serve_content);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1686,7 +1467,7 @@ function add_to_serve_rules($rules, $unique_id = '')
|
|||||||
*/
|
*/
|
||||||
function remove_from_serve_rules($unique_id)
|
function remove_from_serve_rules($unique_id)
|
||||||
{
|
{
|
||||||
$file = PATH . 'serve.php';
|
$file = PATH . 'plugins_rules.php';
|
||||||
|
|
||||||
$current_serve_content = file_get_contents($file);
|
$current_serve_content = file_get_contents($file);
|
||||||
|
|
||||||
@@ -1701,9 +1482,9 @@ function remove_from_serve_rules($unique_id)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! is_writable(PATH . 'serve.php'))
|
if (! is_writable(PATH . 'plugins_rules.php'))
|
||||||
{
|
{
|
||||||
chmod(PATH . 'serve.php', K_FILE_CHMOD);
|
chmod(PATH . 'plugins_rules.php', K_FILE_CHMOD);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents($file, $new_serve_content);
|
file_put_contents($file, $new_serve_content);
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ function kleeja_admin_err($msg, $navigation = true, $title='', $exit = true, $re
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assign {text} in err template
|
// assign {text} in err template
|
||||||
$text = $msg . ($redirect != false ? redirect($redirect, false, false, $rs, true) : '');
|
$text = $msg . ($redirect != false ? redirect($redirect, false, false, $rs, true) : '');
|
||||||
$SHOW_LIST = $navigation;
|
$SHOW_LIST = $navigation;
|
||||||
|
|
||||||
//header
|
//header
|
||||||
echo $tpl->display('admin_header');
|
echo $tpl->display('admin_header');
|
||||||
@@ -106,10 +106,10 @@ function insert_filter($type, $value, $time = false, $user = false, $status = ''
|
|||||||
$time = ! $time ? time() : $time;
|
$time = ! $time ? time() : $time;
|
||||||
$uid = $uid ? $uid : uniqid();
|
$uid = $uid ? $uid : uniqid();
|
||||||
|
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => 'filter_uid, filter_type ,filter_value ,filter_time ,filter_user, filter_status',
|
'INSERT' => 'filter_uid, filter_type ,filter_value ,filter_time ,filter_user, filter_status',
|
||||||
'INTO' => "{$dbprefix}filters",
|
'INTO' => "{$dbprefix}filters",
|
||||||
'VALUES' => "'" . $uid . "', '" . $SQL->escape($type) . "','" . $SQL->escape($value) . "', " . intval($time) . ',' . intval($user) . ",'" . $SQL->escape($status) . "'"
|
'VALUES' => "'" . $uid . "', '" . $SQL->escape($type) . "','" . $SQL->escape($value) . "', " . intval($time) . ',' . intval($user) . ",'" . $SQL->escape($status) . "'"
|
||||||
];
|
];
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_insert_filter_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('insert_sql_insert_filter_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ function get_filter($item, $filter_type = false, $just_value = false, $get_by =
|
|||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$v = $SQL->fetch($result);
|
$v = $SQL->fetch($result);
|
||||||
|
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
if ($just_value)
|
if ($just_value)
|
||||||
{
|
{
|
||||||
@@ -242,28 +242,55 @@ function build_search_query($search)
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
global $SQL;
|
global $SQL, $dbprefix, $config;
|
||||||
|
|
||||||
$search['filename'] = ! isset($search['filename']) ? '' : $search['filename'];
|
$search['filename'] = ! isset($search['filename']) ? '' : $search['filename'];
|
||||||
$search['username'] = ! isset($search['username']) ? '' : $search['username'];
|
$search['username'] = ! isset($search['username']) ? '' : $search['username'];
|
||||||
$search['than'] = ! isset($search['than']) ? '' : $search['than'];
|
$search['than'] = ! isset($search['than']) ? '' : $search['than'];
|
||||||
$search['size'] = ! isset($search['size']) ? '' : $search['size'];
|
$search['size'] = ! isset($search['size']) ? '' : $search['size'];
|
||||||
$search['ups'] = ! isset($search['ups']) ? '' : $search['ups'];
|
$search['ups'] = ! isset($search['ups']) ? '' : $search['ups'];
|
||||||
$search['uthan'] = ! isset($search['uthan']) ? '' : $search['uthan'];
|
$search['uthan'] = ! isset($search['uthan']) ? '' : $search['uthan'];
|
||||||
$search['rep'] = ! isset($search['rep']) ? '' : $search['rep'];
|
$search['rep'] = ! isset($search['rep']) ? '' : $search['rep'];
|
||||||
$search['rthan'] = ! isset($search['rthan']) ? '' : $search['rthan'];
|
$search['rthan'] = ! isset($search['rthan']) ? '' : $search['rthan'];
|
||||||
$search['lastdown'] = ! isset($search['lastdown']) ? '' : $search['lastdown'];
|
$search['lastdown'] = ! isset($search['lastdown']) ? '' : $search['lastdown'];
|
||||||
$search['ext'] = ! isset($search['ext']) ? '' : $search['ext'];
|
$search['ext'] = ! isset($search['ext']) ? '' : $search['ext'];
|
||||||
$search['user_ip'] = ! isset($search['user_ip']) ? '' : $search['user_ip'];
|
$search['user_ip'] = ! isset($search['user_ip']) ? '' : $search['user_ip'];
|
||||||
|
|
||||||
|
//if searched by a username
|
||||||
|
$usernamee = '';
|
||||||
|
if (! empty($search['username']) && (int) $config['user_system'] == 1)
|
||||||
|
{
|
||||||
|
$query = [
|
||||||
|
'SELECT' => 'u.id',
|
||||||
|
'FROM' => "{$dbprefix}users u",
|
||||||
|
'WHERE' => "u.name LIKE '%" . $SQL->escape($search['username']) . "%'"
|
||||||
|
];
|
||||||
|
|
||||||
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_usersids_in_build_search_query', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
|
while ($row=$SQL->fetch_array($result))
|
||||||
|
{
|
||||||
|
$usernamee .= ($usernamee != '' ? ' OR ' : '') . 'f.user=' . $row['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
|
if(! empty($usernamee))
|
||||||
|
{
|
||||||
|
$usernamee = 'AND (' . $usernamee . ')';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//build query
|
||||||
|
$file_namee = $search['filename'] != '' ? 'AND (f.real_filename LIKE \'%' . $SQL->escape($search['filename']) . '%\' OR f.name LIKE \'%' . $SQL->escape($search['filename']) . '%\')' : '';
|
||||||
|
$size_than = ' f.size ' . ($search['than'] != 1 ? '<=' : '>=') . (intval($search['size']) * 1024) . ' ';
|
||||||
|
$ups_than = $search['ups'] != '' ? 'AND f.uploads ' . ($search['uthan']!=1 ? '<' : '>') . intval($search['ups']) . ' ' : '';
|
||||||
|
$rep_than = $search['rep'] != '' ? 'AND f.report ' . ($search['rthan']!=1 ? '<' : '>') . intval($search['rep']) . ' ' : '';
|
||||||
|
$lstd_than = $search['lastdown'] != '' ? 'AND f.last_down =' . (time()-(intval($search['lastdown']) * (24 * 60 * 60))) . ' ' : '';
|
||||||
|
$exte = $search['ext'] != '' ? "AND f.type IN ('" . implode("', '", @explode(',', $SQL->escape($search['ext']))) . "')" : '';
|
||||||
|
$ipp = $search['user_ip'] != '' ? 'AND f.user_ip LIKE \'%' . $SQL->escape($search['user_ip']) . '%\' ' : '';
|
||||||
|
|
||||||
$file_namee = $search['filename'] != '' ? 'AND (f.real_filename LIKE \'%' . $SQL->escape($search['filename']) . '%\' OR f.name LIKE \'%' . $SQL->escape($search['filename']) . '%\')' : '';
|
|
||||||
$usernamee = $search['username'] != '' ? 'AND u.name LIKE \'%' . $SQL->escape($search['username']) . '%\'' : '';
|
|
||||||
$size_than = ' f.size ' . ($search['than']!=1 ? '<=' : '>=') . (intval($search['size']) * 1024) . ' ';
|
|
||||||
$ups_than = $search['ups'] != '' ? 'AND f.uploads ' . ($search['uthan']!=1 ? '<' : '>') . intval($search['ups']) . ' ' : '';
|
|
||||||
$rep_than = $search['rep'] != '' ? 'AND f.report ' . ($search['rthan']!=1 ? '<' : '>') . intval($search['rep']) . ' ' : '';
|
|
||||||
$lstd_than = $search['lastdown'] != '' ? 'AND f.last_down =' . (time()-(intval($search['lastdown']) * (24 * 60 * 60))) . ' ' : '';
|
|
||||||
$exte = $search['ext'] != '' ? "AND f.type IN ('" . implode("', '", @explode(',', $SQL->escape($search['ext']))) . "')" : '';
|
|
||||||
$ipp = $search['user_ip'] != '' ? 'AND f.user_ip LIKE \'%' . $SQL->escape($search['user_ip']) . '%\' ' : '';
|
|
||||||
|
|
||||||
return "$size_than $file_namee $ups_than $exte $rep_than $usernamee $lstd_than $exte $ipp";
|
return "$size_than $file_namee $ups_than $exte $rep_than $usernamee $lstd_than $exte $ipp";
|
||||||
}
|
}
|
||||||
@@ -278,30 +305,30 @@ function sync_total_files($files = true, $start = false)
|
|||||||
{
|
{
|
||||||
global $SQL, $dbprefix;
|
global $SQL, $dbprefix;
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'MIN(f.id) as min_file_id, MAX(f.id) as max_file_id',
|
'SELECT' => 'MIN(f.id) as min_file_id, MAX(f.id) as max_file_id',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
];
|
];
|
||||||
|
|
||||||
//!files == images
|
//!files == images
|
||||||
$img_types = ['gif','jpg','png','bmp','jpeg','GIF','JPG','PNG','BMP','JPEG'];
|
$img_types = ['gif','jpg','png','bmp','jpeg','GIF','JPG','PNG','BMP','JPEG'];
|
||||||
$query['WHERE'] = 'f.type' . ($files ? ' NOT' : '') . " IN ('" . implode("', '", $img_types) . "')";
|
$query['WHERE'] = 'f.type' . ($files ? ' NOT' : '') . " IN ('" . implode("', '", $img_types) . "')";
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$v = $SQL->fetch($result);
|
$v = $SQL->fetch($result);
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
//if no data, turn them to number
|
//if no data, turn them to number
|
||||||
$min_id = (int) $v['min_file_id'];
|
$min_id = (int) $v['min_file_id'];
|
||||||
// $max_id = (int) $v['max_file_id'];
|
// $max_id = (int) $v['max_file_id'];
|
||||||
|
|
||||||
//every time batch
|
//every time batch
|
||||||
$batch_size = 1500;
|
$batch_size = 1500;
|
||||||
|
|
||||||
//no start? start = min
|
//no start? start = min
|
||||||
$first_loop = ! $start ? true : false;
|
$first_loop = ! $start ? true : false;
|
||||||
$start = ! $start ? $min_id : $start;
|
$start = ! $start ? $min_id : $start;
|
||||||
$end = $start + $batch_size;
|
$end = $start + $batch_size;
|
||||||
|
|
||||||
//now lets get this step's files number
|
//now lets get this step's files number
|
||||||
unset($v, $result);
|
unset($v, $result);
|
||||||
@@ -309,8 +336,8 @@ function sync_total_files($files = true, $start = false)
|
|||||||
$query['SELECT'] = 'COUNT(f.id) as num_files';
|
$query['SELECT'] = 'COUNT(f.id) as num_files';
|
||||||
$query['WHERE'] .= ' AND f.id BETWEEN ' . $start . ' AND ' . $end;
|
$query['WHERE'] .= ' AND f.id BETWEEN ' . $start . ' AND ' . $end;
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$v = $SQL->fetch($result);
|
$v = $SQL->fetch($result);
|
||||||
$SQL->freeresult($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
$this_step_count = $v['num_files'];
|
$this_step_count = $v['num_files'];
|
||||||
@@ -323,7 +350,7 @@ function sync_total_files($files = true, $start = false)
|
|||||||
//update stats table
|
//update stats table
|
||||||
|
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats"
|
'UPDATE' => "{$dbprefix}stats"
|
||||||
];
|
];
|
||||||
|
|
||||||
//make it zero, firstly
|
//make it zero, firstly
|
||||||
@@ -350,12 +377,12 @@ function get_actual_stats($name)
|
|||||||
global $dbprefix, $SQL;
|
global $dbprefix, $SQL;
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 's.' . $name,
|
'SELECT' => 's.' . $name,
|
||||||
'FROM' => "{$dbprefix}stats s"
|
'FROM' => "{$dbprefix}stats s"
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
$v = $SQL->fetch($result);
|
$v = $SQL->fetch($result);
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('get_actual_stats_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('get_actual_stats_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After a lot of work, we faced many hosts who use a old PHP version, or
|
* After a lot of work, we faced many hosts who use a old PHP version, or
|
||||||
* they disabled many general functions ...
|
* they disabled many general functions ...
|
||||||
* so, this file contains those type of functions.
|
* so, this file contains those type of functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,208 +20,3 @@ if (! defined('IN_COMMON'))
|
|||||||
{
|
{
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! function_exists('htmlspecialchars_decode'))
|
|
||||||
{
|
|
||||||
function htmlspecialchars_decode($string, $style=ENT_COMPAT)
|
|
||||||
{
|
|
||||||
$translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $style));
|
|
||||||
|
|
||||||
if ($style === ENT_QUOTES)
|
|
||||||
{
|
|
||||||
$translation['''] = '\'';
|
|
||||||
}
|
|
||||||
return strtr($string, $translation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
//http://us2.php.net/manual/en/function.str-split.php#84891
|
|
||||||
if (! function_exists('str_split'))
|
|
||||||
{
|
|
||||||
function str_split($string, $string_length=1)
|
|
||||||
{
|
|
||||||
if (strlen($string) > $string_length || ! $string_length)
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
|
||||||
$c = strlen($string);
|
|
||||||
$parts[] = substr($string, 0, $string_length);
|
|
||||||
$string = substr($string, $string_length);
|
|
||||||
} while ($string !== false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$parts = [$string];
|
|
||||||
}
|
|
||||||
return $parts;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Custom base64_* functions
|
|
||||||
function kleeja_base64_encode($str = '')
|
|
||||||
{
|
|
||||||
return function_exists('base64_encode') ? base64_encode($str) : base64encode($str);
|
|
||||||
}
|
|
||||||
function kleeja_base64_decode($str = '')
|
|
||||||
{
|
|
||||||
return function_exists('base64_decode') ? base64_decode($str) : base64decode($str);
|
|
||||||
}
|
|
||||||
|
|
||||||
//http://www.php.net/manual/en/function.base64-encode.php#63270
|
|
||||||
function base64encode($string = '')
|
|
||||||
{
|
|
||||||
if (! function_exists('convert_binary_str'))
|
|
||||||
{
|
|
||||||
function convert_binary_str($string)
|
|
||||||
{
|
|
||||||
if (strlen($string) <= 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmp = decbin(ord($string[0]));
|
|
||||||
$tmp = str_repeat('0', 8-strlen($tmp)) . $tmp;
|
|
||||||
return $tmp . convert_binary_str(substr($string, 1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$binval = convert_binary_str($string);
|
|
||||||
$final = '';
|
|
||||||
$start = 0;
|
|
||||||
|
|
||||||
while ($start < strlen($binval))
|
|
||||||
{
|
|
||||||
if (strlen(substr($binval, $start)) < 6)
|
|
||||||
{
|
|
||||||
$binval .= str_repeat('0', 6-strlen(substr($binval, $start)));
|
|
||||||
}
|
|
||||||
$tmp = bindec(substr($binval, $start, 6));
|
|
||||||
|
|
||||||
if ($tmp < 26)
|
|
||||||
{
|
|
||||||
$final .= chr($tmp+65);
|
|
||||||
}
|
|
||||||
elseif ($tmp > 25 && $tmp < 52)
|
|
||||||
{
|
|
||||||
$final .= chr($tmp+71);
|
|
||||||
}
|
|
||||||
elseif ($tmp == 62)
|
|
||||||
{
|
|
||||||
$final .= '+';
|
|
||||||
}
|
|
||||||
elseif ($tmp == 63)
|
|
||||||
{
|
|
||||||
$final .= '/';
|
|
||||||
}
|
|
||||||
elseif (! $tmp)
|
|
||||||
{
|
|
||||||
$final .= 'A';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$final .= chr($tmp-4);
|
|
||||||
}
|
|
||||||
$start += 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen($final)%4>0)
|
|
||||||
{
|
|
||||||
$final .= str_repeat('=', 4-strlen($final)%4);
|
|
||||||
}
|
|
||||||
return $final;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function base64decode($str)
|
|
||||||
{
|
|
||||||
$len = strlen($str);
|
|
||||||
$ret = '';
|
|
||||||
$b64 = [];
|
|
||||||
$base64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
||||||
$len_base64 = strlen($base64);
|
|
||||||
|
|
||||||
for ($i = 0; $i < 256; $i++)
|
|
||||||
{
|
|
||||||
$b64[$i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($i = 0; $i < $len_base64; $i++)
|
|
||||||
{
|
|
||||||
$b64[ord($base64[$i])] = $i;
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($j=0;$j<$len;$j+=4)
|
|
||||||
{
|
|
||||||
for ($i = 0; $i < 4; $i++)
|
|
||||||
{
|
|
||||||
$c = ord($str[$j+$i]);
|
|
||||||
$a[$i] = $c;
|
|
||||||
$b[$i] = $b64[$c];
|
|
||||||
}
|
|
||||||
|
|
||||||
$o[0] = ($b[0] << 2) | ($b[1] >> 4);
|
|
||||||
$o[1] = ($b[1] << 4) | ($b[2] >> 2);
|
|
||||||
$o[2] = ($b[2] << 6) | $b[3];
|
|
||||||
|
|
||||||
if ($a[2] == ord('='))
|
|
||||||
{
|
|
||||||
$i = 1;
|
|
||||||
}
|
|
||||||
elseif ($a[3] == ord('='))
|
|
||||||
{
|
|
||||||
$i = 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$i = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($k=0;$k<$i;$k++)
|
|
||||||
{
|
|
||||||
$ret .= chr((int) $o[$k] & 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($i < 3)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! function_exists('filesize'))
|
|
||||||
{
|
|
||||||
function kleeja_filesize($filename)
|
|
||||||
{
|
|
||||||
$a = fopen($filename, 'r');
|
|
||||||
fseek($a, 0, SEEK_END);
|
|
||||||
$filesize = ftell($a);
|
|
||||||
fclose($a);
|
|
||||||
return $filesize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
function kleeja_filesize($filename)
|
|
||||||
{
|
|
||||||
return filesize($filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (! function_exists('array_column'))
|
|
||||||
{
|
|
||||||
function array_column($array, $column_name)
|
|
||||||
{
|
|
||||||
return array_map(
|
|
||||||
function($element) use ($column_name) {
|
|
||||||
return $element[$column_name];
|
|
||||||
},
|
|
||||||
array_values($array)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ function Saaheader($title = '', $extra = '')
|
|||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
header('x-frame-options: SAMEORIGIN');
|
header('x-frame-options: SAMEORIGIN');
|
||||||
header('x-xss-protection: 1; mode=block');
|
header('x-xss-protection: 1; mode=block');
|
||||||
|
header('X-Content-Type-Options: nosniff');
|
||||||
|
|
||||||
echo $header;
|
echo $header;
|
||||||
flush();
|
flush();
|
||||||
@@ -117,15 +118,14 @@ function Saafooter()
|
|||||||
|
|
||||||
if ($config['statfooter'] != 0 || defined('DEV_STAGE'))
|
if ($config['statfooter'] != 0 || defined('DEV_STAGE'))
|
||||||
{
|
{
|
||||||
$gzip = $config['gzip'] == '1' ? 'Enabled' : 'Disabled';
|
$hksys = ! defined('STOP_PLUGINS') ? 'Enabled' : 'Disabled';
|
||||||
$hksys = ! defined('STOP_PLUGINS') ? 'Enabled' : 'Disabled';
|
$endtime = get_microtime();
|
||||||
$endtime = get_microtime();
|
$loadtime = number_format($endtime - $starttm, 4);
|
||||||
$loadtime = number_format($endtime - $starttm, 4);
|
$queries_num = $SQL->query_num;
|
||||||
$queries_num= $SQL->query_num;
|
$time_sql = round($SQL->query_num / $loadtime);
|
||||||
$time_sql = round($SQL->query_num / $loadtime);
|
$page_url = preg_replace(['/([\&\?]+)debug/i', '/&/i'], ['', '&'], kleeja_get_page());
|
||||||
$page_url = preg_replace(['/([\&\?]+)debug/i', '/&/i'], ['', '&'], kleeja_get_page());
|
$link_dbg = user_can('enter_acp') && defined('DEV_STAGE') ? '[ <a href="' . str_replace('&', '&', $page_url) . (strpos($page_url, '?') === false ? '?' : '&') . 'debug">Debug Info ... </a> ]' : '';
|
||||||
$link_dbg = user_can('enter_acp') && defined('DEV_STAGE') ? '[ <a href="' . str_replace('&', '&', $page_url) . (strpos($page_url, '?') === false ? '?' : '&') . 'debug">Debug Info ... </a> ]' : '';
|
$page_stats = "<strong>[</strong> Generation Time: $loadtime Sec - Queries: $queries_num - Hook System: $hksys <strong>]</strong> " . $link_dbg;
|
||||||
$page_stats = "<strong>[</strong> GZIP : $gzip - Generation Time: $loadtime Sec - Queries: $queries_num - Hook System: $hksys <strong>]</strong> " . $link_dbg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl->assign('page_stats', $page_stats);
|
$tpl->assign('page_stats', $page_stats);
|
||||||
@@ -197,7 +197,7 @@ function readable_size($size)
|
|||||||
$size = $size / 1024;
|
$size = $size / 1024;
|
||||||
$ext = $sizes[$i];
|
$ext = $sizes[$i];
|
||||||
}
|
}
|
||||||
$result = round($size, 2) . $ext;
|
$result = round($size, 2) . $ext;
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('func_readable_size', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('func_readable_size', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -220,7 +220,7 @@ function kleeja_err($message, $title = '', $exit = true, $redirect = false, $rs
|
|||||||
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_err_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_err_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
// assign {text} in err template
|
// assign {text} in err template
|
||||||
$text = $message . ($redirect ? redirect($redirect, false, $exit, $rs, true) : '');
|
$text = $message . ($redirect ? redirect($redirect, false, $exit, $rs, true) : '');
|
||||||
//header
|
//header
|
||||||
Saaheader($title, $extra_code_header);
|
Saaheader($title, $extra_code_header);
|
||||||
//show tpl
|
//show tpl
|
||||||
@@ -267,12 +267,12 @@ function kleeja_debug()
|
|||||||
|
|
||||||
$debug_output = '';
|
$debug_output = '';
|
||||||
|
|
||||||
//get memory usage ; code of phpbb
|
//get memory usage
|
||||||
if (function_exists('memory_get_usage'))
|
if (function_exists('memory_get_usage'))
|
||||||
{
|
{
|
||||||
if ($memory_usage = memory_get_usage())
|
if ($memory_usage = memory_get_usage())
|
||||||
{
|
{
|
||||||
$base_memory_usage = 0;
|
$base_memory_usage = 0;
|
||||||
$memory_usage -= $base_memory_usage;
|
$memory_usage -= $base_memory_usage;
|
||||||
$memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' MB' : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' KB' : $memory_usage . ' BYTES');
|
$memory_usage = ($memory_usage >= 1048576) ? round((round($memory_usage / 1048576 * 100) / 100), 2) . ' MB' : (($memory_usage >= 1024) ? round((round($memory_usage / 1024 * 100) / 100), 2) . ' KB' : $memory_usage . ' BYTES');
|
||||||
$debug_output = 'Memory Usage : <em>' . $memory_usage . '</em>';
|
$debug_output = 'Memory Usage : <em>' . $memory_usage . '</em>';
|
||||||
@@ -295,9 +295,9 @@ function kleeja_debug()
|
|||||||
{
|
{
|
||||||
foreach ($SQL->debugr as $key=>$val)
|
foreach ($SQL->debugr as $key=>$val)
|
||||||
{
|
{
|
||||||
echo '<fieldset name="sql" dir="ltr" style="background:white"><legend><em>Query # [' . ($key+1) . '</em>]</legend> ';
|
echo '<fieldset name="sql" dir="ltr" style="background:white"><legend><em>Query # [' . ($key) . '</em>]</legend> ';
|
||||||
echo '<textarea style="font-family:Courier New,monospace;width:99%; background:#F4F4F4" rows="5" cols="10">' . $val[0] . '';
|
echo '<textarea style="font-family:Courier New,monospace;width:99%; background:#F4F4F4" rows="5" cols="10">' . $val[0] . '';
|
||||||
echo '</textarea> <br />';
|
echo '</textarea> <br />';
|
||||||
echo 'Duration :' . $val[1] . '';
|
echo 'Duration :' . $val[1] . '';
|
||||||
echo '</fieldset>';
|
echo '</fieldset>';
|
||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
@@ -314,7 +314,7 @@ function kleeja_debug()
|
|||||||
if (sizeof(Plugins::getInstance()->getDebugInfo()) > 0)
|
if (sizeof(Plugins::getInstance()->getDebugInfo()) > 0)
|
||||||
{
|
{
|
||||||
echo '<textarea style="font-family:\'Courier New\',monospace;width:99%; background:#F4F4F4" rows="20" cols="10">' . var_export(Plugins::getInstance()->getDebugInfo(), true) . '';
|
echo '<textarea style="font-family:\'Courier New\',monospace;width:99%; background:#F4F4F4" rows="20" cols="10">' . var_export(Plugins::getInstance()->getDebugInfo(), true) . '';
|
||||||
echo '</textarea> <br />';
|
echo '</textarea> <br />';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -680,7 +680,10 @@ function kleeja_style_info($style_name)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$inf_r[$t[0]] = $t[1];
|
if (! empty($t[0]))
|
||||||
|
{
|
||||||
|
$inf_r[$t[0]] = empty($t[1]) ? '' : $t[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,6 +838,8 @@ function kleeja_date($time, $human_time = true, $format = false)
|
|||||||
{
|
{
|
||||||
global $lang, $config;
|
global $lang, $config;
|
||||||
|
|
||||||
|
$time = intval($time);
|
||||||
|
|
||||||
if (! defined('TIME_FORMAT'))
|
if (! defined('TIME_FORMAT'))
|
||||||
{
|
{
|
||||||
define('TIME_FORMAT', 'd-m-Y h:i a'); // to be moved to configs later
|
define('TIME_FORMAT', 'd-m-Y h:i a'); // to be moved to configs later
|
||||||
@@ -842,6 +847,11 @@ 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)
|
||||||
|
{
|
||||||
|
$config['time_zone'] = 'Asia/Riyadh';
|
||||||
|
}
|
||||||
|
|
||||||
$timezone_offset = timezone_offset_get(new DateTimeZone($config['time_zone']), new DateTime);
|
$timezone_offset = timezone_offset_get(new DateTimeZone($config['time_zone']), new DateTime);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -849,20 +859,20 @@ function kleeja_date($time, $human_time = true, $format = false)
|
|||||||
$timezone_offset = intval($config['time_zone']) * 60 * 60;
|
$timezone_offset = intval($config['time_zone']) * 60 * 60;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((time() - $time > (86400 * 9)) || $format || ! $human_time)
|
if ((time() - $time) > (86400 * 9) || $format || ! $human_time)
|
||||||
{
|
{
|
||||||
$format = ! $format ? TIME_FORMAT : $format;
|
$format = ! $format ? TIME_FORMAT : $format;
|
||||||
$time = $time + $timezone_offset;
|
$time = $time + $timezone_offset;
|
||||||
return str_replace(['am', 'pm'], [$lang['TIME_AM'], $lang['TIME_PM']], gmdate($format, $time));
|
return str_replace(['am', 'pm'], [$lang['TIME_AM'], $lang['TIME_PM']], gmdate($format, $time));
|
||||||
}
|
}
|
||||||
|
|
||||||
$lengths = ['60','60','24','7','4.35','12','10'];
|
$lengths = ['60','60','24','7','4.35','12','10'];
|
||||||
|
|
||||||
$timezone_diff = (int) $config['time_zone'] * 60 * 60;
|
$timezone_diff = (int) $config['time_zone'] * 60 * 60;
|
||||||
$now = time() + $timezone_diff;
|
$now = time() + $timezone_diff;
|
||||||
$time = $time + $timezone_diff;
|
$time = $time + $timezone_diff;
|
||||||
$difference = $now > $time ? $now - $time : $time - $now;
|
$difference = $now > $time ? $now - $time : $time - $now;
|
||||||
$tense = $now > $time ? $lang['W_AGO'] : $lang['W_FROM'];
|
$tense = $now > $time ? $lang['W_AGO'] : $lang['W_FROM'];
|
||||||
|
|
||||||
for ($j = 0; $difference >= $lengths[$j] && $j < sizeof($lengths)-1; $j++)
|
for ($j = 0; $difference >= $lengths[$j] && $j < sizeof($lengths)-1; $j++)
|
||||||
{
|
{
|
||||||
@@ -884,7 +894,7 @@ function kleeja_date($time, $human_time = true, $format = false)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$return = $lang['W_PERIODS_' . $j];
|
$return = '1 ' . $lang['W_PERIODS_' . $j];
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = $now > $time ? $return . ' ' . $lang['W_AGO']: $lang['W_FROM'] . ' ' . $return;
|
$return = $now > $time ? $return . ' ' . $lang['W_AGO']: $lang['W_FROM'] . ' ' . $return;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
if (! defined('IN_COMMON'))
|
if (! defined('IN_COMMON'))
|
||||||
{
|
{
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! defined('SQL_LAYER')):
|
if (! defined('SQL_LAYER')):
|
||||||
|
|
||||||
@@ -20,33 +20,44 @@ define('SQL_LAYER', 'mysqli');
|
|||||||
|
|
||||||
class KleejaDatabase
|
class KleejaDatabase
|
||||||
{
|
{
|
||||||
public $connect_id = null;
|
/** @var mysqli */
|
||||||
public $result;
|
private $connect_id = null;
|
||||||
public $query_num = 0;
|
/** @var mysqli_result */
|
||||||
public $in_transaction = 0;
|
private $result = null;
|
||||||
public $debugr = false;
|
public $dbprefix = '';
|
||||||
public $show_errors = true;
|
private $dbname = '';
|
||||||
|
public $query_num = 0;
|
||||||
|
private $in_transaction = 0;
|
||||||
|
public $debugr = false;
|
||||||
|
private $show_errors = true;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* initiate the class
|
* connect
|
||||||
* with basic data
|
*
|
||||||
*/
|
* @param string $host
|
||||||
public function __construct($host, $db_username, $db_password, $db_name, $new_link = false)
|
* @param string $db_username
|
||||||
|
* @param string $db_password
|
||||||
|
* @param string $db_name
|
||||||
|
* @param string $dbprefix
|
||||||
|
*/
|
||||||
|
public function __construct($host, $db_username, $db_password, $db_name, $dbprefix)
|
||||||
{
|
{
|
||||||
global $script_encoding;
|
$port = 3306;
|
||||||
|
|
||||||
$host .= strpos($host, ':') !== false ? '' : ':';
|
if (strpos($host, ':') !== false)
|
||||||
$this->host = substr($host, 0, strpos($host, ':'));
|
{
|
||||||
$this->port = (int) substr($host, strpos($host, ':')+1);
|
$host = substr($host, 0, strpos($host, ':'));
|
||||||
$this->db_username = $db_username;
|
$port = (int) substr($host, strpos($host, ':')+1);
|
||||||
$this->db_name = $db_name;
|
}
|
||||||
$this->db_password = 'hidden';
|
|
||||||
|
|
||||||
$this->connect_id = @mysqli_connect($this->host, $this->db_username, $db_password, $this->db_name, (! $this->port ? 3306 : $this->port ));
|
$this->dbprefix = $dbprefix;
|
||||||
|
$this->dbname = $db_name;
|
||||||
|
|
||||||
|
$this->connect_id = @mysqli_connect($host, $db_username, $db_password, $db_name, $port);
|
||||||
|
|
||||||
//no error
|
//no error
|
||||||
if (defined('MYSQL_NO_ERRORS'))
|
if (defined('SQL_NO_ERRORS') || defined('MYSQL_NO_ERRORS'))
|
||||||
{
|
{
|
||||||
$this->show_errors = false;
|
$this->show_errors = false;
|
||||||
}
|
}
|
||||||
@@ -56,19 +67,18 @@ class KleejaDatabase
|
|||||||
{
|
{
|
||||||
//loggin -> no database -> close connection
|
//loggin -> no database -> close connection
|
||||||
$this->close();
|
$this->close();
|
||||||
$this->error_msg('we can not connect to the server ...');
|
$this->error_msg('We can not connect to the server ...');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//loggin -> connecting
|
//connecting
|
||||||
kleeja_log('[Connected] : ' . kleeja_get_page());
|
kleeja_log('[Connected] : ' . kleeja_get_page());
|
||||||
|
|
||||||
|
|
||||||
if ((! preg_match('/utf/i', strtolower($script_encoding)) && ! defined('IN_LOGINPAGE') && ! defined('IN_ADMIN_LOGIN') && ! defined('DISABLE_INTR')) || (empty($script_encoding) || preg_match('/utf/i', strtolower($script_encoding)) || defined('DISABLE_INTR')))
|
if (! defined('DISABLE_MYSQL_UTF8'))
|
||||||
{
|
{
|
||||||
if (mysqli_set_charset($this->connect_id, 'utf8'))
|
if (mysqli_set_charset($this->connect_id, 'utf8'))
|
||||||
{
|
{
|
||||||
//loggin -> set utf8
|
|
||||||
kleeja_log('[Set to UTF8] : --> ');
|
kleeja_log('[Set to UTF8] : --> ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,31 +86,39 @@ class KleejaDatabase
|
|||||||
return $this->connect_id;
|
return $this->connect_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
$this->close();
|
||||||
|
}
|
||||||
|
|
||||||
public function is_connected()
|
public function is_connected()
|
||||||
{
|
{
|
||||||
return ! (is_null($this->connect_id) || empty($this->connect_id));
|
return ! (is_resource($this->connect_id) || empty($this->connect_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// close the connection
|
// close the connection
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
if ($this->connect_id)
|
if (! $this->is_connected())
|
||||||
{
|
{
|
||||||
// Commit any remaining transactions
|
return true;
|
||||||
if ($this->in_transaction)
|
|
||||||
{
|
|
||||||
mysqli_commit($this->connect_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
//loggin -> close connection
|
|
||||||
kleeja_log('[Closing connection] : ' . kleeja_get_page());
|
|
||||||
|
|
||||||
return @mysqli_close($this->connect_id);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Commit any remaining transactions
|
||||||
|
if ($this->in_transaction)
|
||||||
{
|
{
|
||||||
return false;
|
mysqli_commit($this->connect_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//loggin -> close connection
|
||||||
|
kleeja_log('[Closing connection] : ' . kleeja_get_page());
|
||||||
|
|
||||||
|
if(! is_resource($this->connect_id))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return @mysqli_close($this->connect_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// encoding functions
|
// encoding functions
|
||||||
@@ -119,7 +137,7 @@ class KleejaDatabase
|
|||||||
return mysqli_character_set_name($this->connect_id);
|
return mysqli_character_set_name($this->connect_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mysql_version()
|
public function version()
|
||||||
{
|
{
|
||||||
$vr = $this->query('SELECT VERSION() AS v');
|
$vr = $this->query('SELECT VERSION() AS v');
|
||||||
$vs = $this->fetch_array($vr);
|
$vs = $this->fetch_array($vr);
|
||||||
@@ -127,14 +145,18 @@ class KleejaDatabase
|
|||||||
return preg_replace('/^([^-]+).*$/', '\\1', $vs);
|
return preg_replace('/^([^-]+).*$/', '\\1', $vs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* the query func . its so important to do
|
/**
|
||||||
* the quries and give results
|
* execute a query
|
||||||
|
*
|
||||||
|
* @param string $query
|
||||||
|
* @param boolean $transaction
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function query($query, $transaction = false)
|
public function query($query, $transaction = false)
|
||||||
{
|
{
|
||||||
//no connection
|
//no connection
|
||||||
if (! $this->connect_id)
|
if (! $this->is_connected())
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -150,7 +172,7 @@ class KleejaDatabase
|
|||||||
$srartum_sql = get_microtime();
|
$srartum_sql = get_microtime();
|
||||||
////////////////
|
////////////////
|
||||||
|
|
||||||
if ($transaction == 1 && ! $this->in_transaction)
|
if ($transaction && ! $this->in_transaction)
|
||||||
{
|
{
|
||||||
if (! mysqli_autocommit($this->connect_id, false))
|
if (! mysqli_autocommit($this->connect_id, false))
|
||||||
{
|
{
|
||||||
@@ -178,7 +200,7 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( $transaction == 2 && $this->in_transaction )
|
if ($this->in_transaction)
|
||||||
{
|
{
|
||||||
$this->result = mysqli_commit($this->connect_id);
|
$this->result = mysqli_commit($this->connect_id);
|
||||||
}
|
}
|
||||||
@@ -187,7 +209,7 @@ class KleejaDatabase
|
|||||||
//is there any result
|
//is there any result
|
||||||
if ($this->result)
|
if ($this->result)
|
||||||
{
|
{
|
||||||
if ($transaction == 2 && $this->in_transaction)
|
if ($this->in_transaction)
|
||||||
{
|
{
|
||||||
$this->in_transaction = false;
|
$this->in_transaction = false;
|
||||||
|
|
||||||
@@ -212,12 +234,17 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// query build
|
/**
|
||||||
|
* build structured query ['SELECT' => ..., 'FROM' => ..., ...]
|
||||||
|
*
|
||||||
|
* @param array $query
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function build($query)
|
public function build($query)
|
||||||
{
|
{
|
||||||
$sql = '';
|
$sql = '';
|
||||||
|
|
||||||
if (isset($query['SELECT']))
|
if (isset($query['SELECT']) && isset($query['FROM']))
|
||||||
{
|
{
|
||||||
$sql = 'SELECT ' . $query['SELECT'] . ' FROM ' . $query['FROM'];
|
$sql = 'SELECT ' . $query['SELECT'] . ' FROM ' . $query['FROM'];
|
||||||
|
|
||||||
@@ -303,12 +330,12 @@ class KleejaDatabase
|
|||||||
return $this->query($sql);
|
return $this->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// free the memmory from the last results
|
/**
|
||||||
public function free($query_id = 0)
|
* free the memmory from the last results
|
||||||
{
|
*
|
||||||
return $this->freeresult($query_id);
|
* @param integer $query_id optional
|
||||||
}
|
* @return bool
|
||||||
|
*/
|
||||||
public function freeresult($query_id = 0)
|
public function freeresult($query_id = 0)
|
||||||
{
|
{
|
||||||
if (! $query_id)
|
if (! $query_id)
|
||||||
@@ -327,15 +354,24 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* if the result is an arry ,
|
/**
|
||||||
* this func is so important to order them as a array
|
* fetch results (alias of fetch_array)
|
||||||
|
*
|
||||||
|
* @param mysqli_result $query_id
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function fetch($query_id = 0)
|
public function fetch($query_id = 0)
|
||||||
{
|
{
|
||||||
return $this->fetch_array($query_id);
|
return $this->fetch_array($query_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fetch results
|
||||||
|
*
|
||||||
|
* @param mysqli_result $query_id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function fetch_array($query_id = 0)
|
public function fetch_array($query_id = 0)
|
||||||
{
|
{
|
||||||
if (! $query_id)
|
if (! $query_id)
|
||||||
@@ -343,12 +379,14 @@ class KleejaDatabase
|
|||||||
$query_id = $this->result;
|
$query_id = $this->result;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query_id ? mysqli_fetch_array($query_id, MYSQLI_ASSOC) : false;
|
return $query_id ? mysqli_fetch_array($query_id, MYSQLI_ASSOC) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* if we have a result and we have to know
|
* return number of rows of result (not efficient)
|
||||||
* the number of it , this is a func ..
|
*
|
||||||
|
* @param mysqli_result $query_id
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function num_rows($query_id = 0)
|
public function num_rows($query_id = 0)
|
||||||
{
|
{
|
||||||
@@ -361,13 +399,22 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// last id inserted in sql
|
/**
|
||||||
|
* return the id of latest inserted record
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function insert_id()
|
public function insert_id()
|
||||||
{
|
{
|
||||||
return $this->connect_id ? mysqli_insert_id($this->connect_id) : false;
|
return $this->is_connected() ? mysqli_insert_id($this->connect_id) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean the qurery before insert it
|
/**
|
||||||
|
* extra escape
|
||||||
|
*
|
||||||
|
* @param string $msg
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function escape($msg)
|
public function escape($msg)
|
||||||
{
|
{
|
||||||
$msg = htmlspecialchars($msg, ENT_QUOTES);
|
$msg = htmlspecialchars($msg, ENT_QUOTES);
|
||||||
@@ -376,62 +423,76 @@ class KleejaDatabase
|
|||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// real escape ..
|
|
||||||
/**
|
/**
|
||||||
* @param string|array $msg
|
* escape
|
||||||
|
* @param string $msg
|
||||||
* @return int|string
|
* @return int|string
|
||||||
*/
|
*/
|
||||||
public function real_escape($msg)
|
public function real_escape($msg)
|
||||||
{
|
{
|
||||||
if (is_array($msg) && ! $this->connect_id)
|
if (! $this->is_connected())
|
||||||
{
|
|
||||||
return $msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $this->connect_id)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//escaping _ made alot of problems
|
|
||||||
//return addcslashes(mysqli_real_escape_string($this->connect_id, $msg), '%_');
|
|
||||||
return mysqli_real_escape_string($this->connect_id, $msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get affected records
|
|
||||||
public function affected()
|
|
||||||
{
|
|
||||||
return $this->connect_id ? mysqli_affected_rows($this->connect_id) : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the information of mysql server
|
|
||||||
public function server_info()
|
|
||||||
{
|
|
||||||
return 'MySQLi ' . $this->mysql_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
// error message func
|
|
||||||
public function error_msg($msg)
|
|
||||||
{
|
|
||||||
global $dbprefix;
|
|
||||||
|
|
||||||
if (! $this->show_errors)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$error_no = $this->connect_id ? @mysqli_errno($this->connect_id) : @mysqli_connect_errno();
|
return mysqli_real_escape_string($this->connect_id, $msg);
|
||||||
$error_msg = $this->connect_id ? @mysqli_error($this->connect_id) : @mysqli_connect_error();
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* number of affected rows by latest action
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function affected()
|
||||||
|
{
|
||||||
|
return $this->is_connected() ? mysqli_affected_rows($this->connect_id) : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* information
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function server_info()
|
||||||
|
{
|
||||||
|
return 'MySQLi ' . $this->version();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* present error messages
|
||||||
|
*
|
||||||
|
* @param string $msg
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function error_msg($msg)
|
||||||
|
{
|
||||||
|
if (! $this->show_errors)
|
||||||
|
{
|
||||||
|
kleeja_log('MySQL: ' . $msg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[$error_no, $error_msg] = $this->get_error();
|
||||||
$error_sql = @current($this->debugr[$this->query_num+1]);
|
$error_sql = @current($this->debugr[$this->query_num+1]);
|
||||||
|
|
||||||
//some ppl want hide their table names
|
//some ppl want hide their table names
|
||||||
if (! defined('DEV_STAGE'))
|
if (! defined('DEV_STAGE'))
|
||||||
{
|
{
|
||||||
$error_sql = preg_replace("#\s{1,3}`*{$dbprefix}([a-z0-9]+)`*\s{1,3}#e", "' <span style=\"color:blue\">' . substr('$1', 0, 1) . '</span> '", $error_sql);
|
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function($m) {
|
||||||
$error_msg = preg_replace("#{$this->db_name}.{$dbprefix}([a-z0-9]+)#e", "' <span style=\"color:blue\">' . substr('$1', 0, 1) . '</span> '", $error_msg);
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
$error_sql = preg_replace("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#ie", "' $1 <span style=\"color:blue\">' . substr('$2', 0, 1) . '</span> '", $error_sql);
|
}, $error_sql);
|
||||||
$error_msg = preg_replace("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#ie", "' $1 <span style=\"color:blue\">' . substr('$2', 0, 1) . '</span> '", $error_msg);
|
$error_msg = preg_replace_callback("#{$this->dbname}.{$this->dbprefix}([a-z0-9]+)#", function($m) {
|
||||||
$error_msg = preg_replace("#\s'([^']+)'@'([^']+)'#ie", "' <span style=\"color:blue\">hidden</span>@$2 '", $error_msg);
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
|
}, $error_msg);
|
||||||
|
$error_sql = preg_replace_callback("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#i", function($m) {
|
||||||
|
return $m[1] . ' <span style="color:blue">' . substr($m[2], 0, 1) . '</span> ';
|
||||||
|
}, $error_sql);
|
||||||
|
$error_msg = preg_replace_callback("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#i", function($m) {
|
||||||
|
return $m[1] . ' <span style="color:blue">' . substr($m[2], 0, 1) . '</span> ';
|
||||||
|
}, $error_msg);
|
||||||
|
$error_msg = preg_replace_callback("#\s'([^']+)'@'([^']+)'#i", function($m) {
|
||||||
|
return ' <span style="color:blue">hidden</span>@' . $m[2] . ' ';
|
||||||
|
}, $error_msg);
|
||||||
$error_sql = preg_replace("#password\s*=\s*'[^']+'#i", "password='<span style=\"color:blue\">hidden</span>'", $error_sql);
|
$error_sql = preg_replace("#password\s*=\s*'[^']+'#i", "password='<span style=\"color:blue\">hidden</span>'", $error_sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,12 +505,12 @@ class KleejaDatabase
|
|||||||
}
|
}
|
||||||
|
|
||||||
header('HTTP/1.1 500 Internal Server Error');
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
$error_message = '<html><head><title>ERROR IM MYSQL</title>';
|
$error_message = '<html><head><title>MYSQL ERROR</title>';
|
||||||
$error_message .= "<style>BODY{font-family:'Tahoma',serif;font-size:12px;}.error {}</style></head><body>";
|
$error_message .= "<style>BODY{font-family:'Tahoma',serif;font-size:12px;}.error {}</style></head><body>";
|
||||||
$error_message .= '<br />';
|
$error_message .= '<br />';
|
||||||
$error_message .= '<div class="error">';
|
$error_message .= '<div class="error">';
|
||||||
$error_message .= " <a href='#' onclick='window.location.reload( false );'>click to Refresh this page ...</a><br />";
|
$error_message .= " <a href='#' onclick='window.location.reload( false );'>click to Refresh this page ...</a><br />";
|
||||||
$error_message .= '<h2>Sorry , There is an error in mysql ' . ($msg !='' ? ", error : $msg" : '') . '</h2>';
|
$error_message .= '<h2>Sorry , We encountered a MySQL error: ' . ($msg !='' ? $msg : '') . '</h2>';
|
||||||
|
|
||||||
if ($error_sql != '')
|
if ($error_sql != '')
|
||||||
{
|
{
|
||||||
@@ -479,10 +540,14 @@ class KleejaDatabase
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// return last error
|
/**
|
||||||
|
* return last error as [code, message]
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function get_error()
|
public function get_error()
|
||||||
{
|
{
|
||||||
if ($this->connect_id)
|
if ($this->is_connected())
|
||||||
{
|
{
|
||||||
return [@mysqli_errno($this->connect_id), @mysqli_error($this->connect_id)];
|
return [@mysqli_errno($this->connect_id), @mysqli_error($this->connect_id)];
|
||||||
}
|
}
|
||||||
@@ -491,6 +556,6 @@ class KleejaDatabase
|
|||||||
return [@mysqli_connect_errno(), @mysqli_connect_error()];
|
return [@mysqli_connect_errno(), @mysqli_connect_error()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//end of class
|
}
|
||||||
|
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
//
|
//
|
||||||
// The homepage URL for this framework is:
|
// The homepage URL for this framework is:
|
||||||
//
|
//
|
||||||
// http://www.openwall.com/phpass/
|
// http://www.openwall.com/phpass/
|
||||||
//
|
//
|
||||||
// Please be sure to update the Version line if you edit this file in any way.
|
// Please be sure to update the Version line if you edit this file in any way.
|
||||||
// It is suggested that you leave the main version number intact, but indicate
|
// It is suggested that you leave the main version number intact, but indicate
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
* @license http://www.kleeja.com/license
|
* @license http://www.kleeja.com/license
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//no for directly open
|
//no for directly open
|
||||||
if (! defined('IN_COMMON'))
|
if (! defined('IN_COMMON'))
|
||||||
{
|
{
|
||||||
@@ -74,7 +75,7 @@ class Plugins
|
|||||||
{
|
{
|
||||||
$this->installed_plugins[$row['plg_name']] = $row['plg_ver'];
|
$this->installed_plugins[$row['plg_name']] = $row['plg_ver'];
|
||||||
}
|
}
|
||||||
$SQL->free($result);
|
$SQL->freeresult($result);
|
||||||
|
|
||||||
|
|
||||||
$this->load_enabled_plugins();
|
$this->load_enabled_plugins();
|
||||||
@@ -175,7 +176,7 @@ class Plugins
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* get an installed plugin information
|
* get an installed plugin information
|
||||||
* @param string $plugin_name
|
* @param string $plugin_name
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function installed_plugin_info($plugin_name)
|
public function installed_plugin_info($plugin_name)
|
||||||
@@ -192,8 +193,8 @@ class Plugins
|
|||||||
/**
|
/**
|
||||||
* Bring all codes of this hook
|
* Bring all codes of this hook
|
||||||
* This function scattered all over kleeja files
|
* This function scattered all over kleeja files
|
||||||
* @param string $hook_name
|
* @param string $hook_name
|
||||||
* @param array $args
|
* @param array $args
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function run($hook_name, $args = [])
|
public function run($hook_name, $args = [])
|
||||||
|
|||||||
563
includes/sqlite.php
Executable file
563
includes/sqlite.php
Executable file
@@ -0,0 +1,563 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package Kleeja
|
||||||
|
* @copyright (c) 2007 Kleeja.com
|
||||||
|
* @license ./docs/license.txt
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
//no for directly open
|
||||||
|
if (! defined('IN_COMMON'))
|
||||||
|
{
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! defined('SQL_LAYER')):
|
||||||
|
|
||||||
|
define('SQL_LAYER', 'sqlite');
|
||||||
|
|
||||||
|
class KleejaDatabase
|
||||||
|
{
|
||||||
|
/** @var SQLITE3 */
|
||||||
|
private $connect_id = null;
|
||||||
|
/** @var SQLite3Result */
|
||||||
|
private $result = null;
|
||||||
|
public $dbprefix = '';
|
||||||
|
private $dbname = '';
|
||||||
|
public $query_num = 0;
|
||||||
|
private $in_transaction = 0;
|
||||||
|
public $debugr = false;
|
||||||
|
private $show_errors = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* connect
|
||||||
|
*
|
||||||
|
* @param string $location path of sqlite database
|
||||||
|
* @param string $db_username not needed
|
||||||
|
* @param string $db_password not needed
|
||||||
|
* @param string $db_name not needed
|
||||||
|
* @param string $dbprefix tables prefix
|
||||||
|
*/
|
||||||
|
public function __construct($location, $db_username, $db_password, $db_name, $dbprefix)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
$this->connect_id = new SQLite3(PATH . $db_name, SQLITE3_OPEN_READWRITE);
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
//...
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->dbprefix = $dbprefix;
|
||||||
|
$this->dbname = $db_name;
|
||||||
|
|
||||||
|
//no error
|
||||||
|
if (defined('SQL_NO_ERRORS'))
|
||||||
|
{
|
||||||
|
$this->show_errors = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->connect_id)
|
||||||
|
{
|
||||||
|
//loggin -> no database -> close connection
|
||||||
|
$this->close();
|
||||||
|
$this->error_msg('We can not connect to the sqlite database, check location or existence of the SQLite dirver ...');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//connecting
|
||||||
|
kleeja_log('[Connected] : ' . kleeja_get_page());
|
||||||
|
|
||||||
|
|
||||||
|
return $this->connect_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
$this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function is_connected()
|
||||||
|
{
|
||||||
|
return ! (is_null($this->connect_id) || empty($this->connect_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
// close the connection
|
||||||
|
public function close()
|
||||||
|
{
|
||||||
|
if (! $this->is_connected())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Commit any remaining transactions
|
||||||
|
if ($this->in_transaction)
|
||||||
|
{
|
||||||
|
$this->query('COMMIT;');
|
||||||
|
}
|
||||||
|
|
||||||
|
//loggin -> close connection
|
||||||
|
kleeja_log('[Closing connection] : ' . kleeja_get_page());
|
||||||
|
|
||||||
|
if (! is_resource($this->connect_id))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return @mysqli_close($this->connect_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// encoding functions
|
||||||
|
public function set_utf8()
|
||||||
|
{
|
||||||
|
//$this->set_names('utf8');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_names($charset)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function client_encoding()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function version()
|
||||||
|
{
|
||||||
|
return SQLite3::version();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execute a query
|
||||||
|
*
|
||||||
|
* @param string $query
|
||||||
|
* @param boolean $transaction
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function query($query, $transaction = false)
|
||||||
|
{
|
||||||
|
//no connection
|
||||||
|
if (! $this->is_connected())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Remove any pre-existing queries
|
||||||
|
//
|
||||||
|
unset($this->result);
|
||||||
|
|
||||||
|
if (strpos($query, 'CREATE TABLE') !== false || strpos($query, 'ALTER DATABASE') !== false)
|
||||||
|
{
|
||||||
|
$sqlite_types = [
|
||||||
|
'/AUTO_INCREMENT/i' => '',
|
||||||
|
'/VARCHAR\s?(\\([0-9]+\\))?/i' => 'TEXT',
|
||||||
|
'/COLLATE\s+([a-z0-9_]+)/i' => '',
|
||||||
|
'/(TINY|SMALL|MEDIUM|BIG)?INT\s?(\([0-9]+\))?\s?(UNSIGNED)?/i' => 'INTEGER ',
|
||||||
|
'/(TINY|MEDIUM|LONG)?TEXT/i' => 'TEXT',
|
||||||
|
'/KEY\s`?([a-z0-9_]+)`?\s\(`?([a-z0-9_]+)`?(\([0-9]+\))?\)\s?,?/i' => '',
|
||||||
|
'/\)(\s{0,4}ENGINE=([a-z0-9_]+))?(\s{0,4}DEFAULT)?(\s{0,4}CHARSET=([a-z0-9_]+))?(\s{0,4}COLLATE=([a-z0-9_]+))?(\s{0,4}AUTOINCREMENT)?(\s{0,4}=\s?1)?(\s{0,4};)?/i' => ')',
|
||||||
|
'/,\s+\)/' => ')',
|
||||||
|
'/INTEGER\s{0,4}NOT\s{0,4}NULL/i' => 'INTEGER',
|
||||||
|
];
|
||||||
|
|
||||||
|
//todo extract keys and add as CREATE INDEX index_name ON table (column);
|
||||||
|
|
||||||
|
foreach ($sqlite_types as $old_type => $new_type)
|
||||||
|
{
|
||||||
|
$query = preg_replace($old_type, $new_type, $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query))
|
||||||
|
{
|
||||||
|
//debug
|
||||||
|
$srartum_sql = get_microtime();
|
||||||
|
|
||||||
|
if ($transaction && ! $this->in_transaction)
|
||||||
|
{
|
||||||
|
$this->query('BEGIN;');
|
||||||
|
$this->in_transaction = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->result = @$this->connect_id->query($query);
|
||||||
|
|
||||||
|
//debug .. //////////////
|
||||||
|
$this->debugr[$this->query_num+1] = [$query, sprintf('%.5f', get_microtime() - $srartum_sql)];
|
||||||
|
////////////////
|
||||||
|
|
||||||
|
if (! $this->result)
|
||||||
|
{
|
||||||
|
$this->error_msg('Error In query');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//let's debug it
|
||||||
|
kleeja_log('[Query] : --> ' . $query);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($this->in_transaction)
|
||||||
|
{
|
||||||
|
$this->result = $this->connect_id->query('COMMIT;');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//is there any result
|
||||||
|
if ($this->result)
|
||||||
|
{
|
||||||
|
if ($this->in_transaction)
|
||||||
|
{
|
||||||
|
$this->in_transaction = false;
|
||||||
|
|
||||||
|
if (! $this->connect_id->query('COMMIT;'))
|
||||||
|
{
|
||||||
|
$this->connect_id->query('ROLLBACK;');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->query_num++;
|
||||||
|
return $this->result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($this->in_transaction)
|
||||||
|
{
|
||||||
|
$this->connect_id->query('ROLLBACK;');
|
||||||
|
$this->in_transaction = false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* build structured query ['SELECT' => ..., 'FROM' => ..., ...]
|
||||||
|
*
|
||||||
|
* @param array $query
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function build($query)
|
||||||
|
{
|
||||||
|
$sql = '';
|
||||||
|
|
||||||
|
if (isset($query['SELECT']) && isset($query['FROM']))
|
||||||
|
{
|
||||||
|
$sql = 'SELECT ' . $query['SELECT'] . ' FROM ' . $query['FROM'];
|
||||||
|
|
||||||
|
if (isset($query['JOINS']))
|
||||||
|
{
|
||||||
|
foreach ($query['JOINS'] as $cur_join)
|
||||||
|
{
|
||||||
|
$sql .= ' ' . key($cur_join) . ' ' . current($cur_join) . ' ON ' . $cur_join['ON'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query['WHERE']))
|
||||||
|
{
|
||||||
|
$sql .= ' WHERE ' . $query['WHERE'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query['GROUP BY']))
|
||||||
|
{
|
||||||
|
$sql .= ' GROUP BY ' . $query['GROUP BY'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query['HAVING']))
|
||||||
|
{
|
||||||
|
$sql .= ' HAVING ' . $query['HAVING'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query['ORDER BY']))
|
||||||
|
{
|
||||||
|
$sql .= ' ORDER BY ' . $query['ORDER BY'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($query['LIMIT']))
|
||||||
|
{
|
||||||
|
$sql .= ' LIMIT ' . $query['LIMIT'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($query['INSERT']))
|
||||||
|
{
|
||||||
|
$sql = 'INSERT INTO ' . $query['INTO'];
|
||||||
|
|
||||||
|
if (! empty($query['INSERT']))
|
||||||
|
{
|
||||||
|
$sql .= ' (' . $query['INSERT'] . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql .= ' VALUES(' . $query['VALUES'] . ')';
|
||||||
|
}
|
||||||
|
elseif (isset($query['UPDATE']))
|
||||||
|
{
|
||||||
|
$sql = 'UPDATE ' . $query['UPDATE'] . ' SET ' . $query['SET'];
|
||||||
|
|
||||||
|
if (! empty($query['WHERE']))
|
||||||
|
{
|
||||||
|
$sql .= ' WHERE ' . $query['WHERE'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($query['DELETE']))
|
||||||
|
{
|
||||||
|
$sql = 'DELETE FROM ' . $query['DELETE'];
|
||||||
|
|
||||||
|
if (! empty($query['WHERE']))
|
||||||
|
{
|
||||||
|
$sql .= ' WHERE ' . $query['WHERE'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (isset($query['REPLACE']))
|
||||||
|
{
|
||||||
|
$sql = 'REPLACE INTO ' . $query['INTO'];
|
||||||
|
|
||||||
|
if (! empty($query['REPLACE']))
|
||||||
|
{
|
||||||
|
$sql .= ' (' . $query['REPLACE'] . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql .= ' VALUES(' . $query['VALUES'] . ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* free the memmory from the last results
|
||||||
|
*
|
||||||
|
* @param SQLite3Result $query_id optional
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function freeresult($query_id = 0)
|
||||||
|
{
|
||||||
|
if (! $query_id)
|
||||||
|
{
|
||||||
|
$query_id = $this->result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($query_id)
|
||||||
|
{
|
||||||
|
$query_id->finalize();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fetch results (alias of fetch_array)
|
||||||
|
*
|
||||||
|
* @param SQLite3Result $query_id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function fetch($query_id = 0)
|
||||||
|
{
|
||||||
|
return $this->fetch_array($query_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fetch results
|
||||||
|
*
|
||||||
|
* @param SQLite3Result $query_id
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function fetch_array($query_id = 0)
|
||||||
|
{
|
||||||
|
if (! $query_id)
|
||||||
|
{
|
||||||
|
$query_id = $this->result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($query_id && $query_id->numColumns() > 0)
|
||||||
|
{
|
||||||
|
return $query_id->fetchArray(SQLITE3_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return number of rows of result (not efficient)
|
||||||
|
*
|
||||||
|
* @param SQLite3Result $query_id
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function num_rows($query_id = 0)
|
||||||
|
{
|
||||||
|
if (! $query_id)
|
||||||
|
{
|
||||||
|
$query_id = $this->result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($query_id && $results = $query_id->numColumns())
|
||||||
|
{
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return the id of latest inserted record
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function insert_id()
|
||||||
|
{
|
||||||
|
return $this->is_connected() ? $this->connect_id->lastInsertRowID() : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extra escape
|
||||||
|
*
|
||||||
|
* @param string $msg
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function escape($msg)
|
||||||
|
{
|
||||||
|
$msg = htmlspecialchars($msg, ENT_QUOTES);
|
||||||
|
$msg = $this->real_escape($msg);
|
||||||
|
return $msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* escape
|
||||||
|
* @param string $msg
|
||||||
|
* @return int|string
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function real_escape($msg)
|
||||||
|
{
|
||||||
|
return SQLite3::escapeString($msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* number of affected rows by latest action
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function affected()
|
||||||
|
{
|
||||||
|
return $this->is_connected() ? $this->connect_id->changes() : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* information
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function server_info()
|
||||||
|
{
|
||||||
|
return 'SQLite3 ' . $this->version();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* present error messages
|
||||||
|
*
|
||||||
|
* @param string $msg
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function error_msg($msg)
|
||||||
|
{
|
||||||
|
if (! $this->show_errors)
|
||||||
|
{
|
||||||
|
kleeja_log('SQLite3: ' . $msg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[$error_no, $error_msg] = $this->get_error();
|
||||||
|
$error_sql = @current($this->debugr[$this->query_num+1]);
|
||||||
|
|
||||||
|
//some ppl want hide their table names
|
||||||
|
if (! defined('DEV_STAGE'))
|
||||||
|
{
|
||||||
|
$error_sql = preg_replace_callback("#\s{1,3}`*{$this->dbprefix}([a-z0-9]+)`*\s{1,3}#", function($m) {
|
||||||
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
|
}, $error_sql);
|
||||||
|
$error_msg = preg_replace_callback("#{$this->dbname}.{$this->dbprefix}([a-z0-9]+)#", function($m) {
|
||||||
|
return ' <span style="color:blue">' . substr($m[1], 0, 1) . '</span> ';
|
||||||
|
}, $error_msg);
|
||||||
|
$error_sql = preg_replace_callback("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#i", function($m) {
|
||||||
|
return $m[1] . ' <span style="color:blue">' . substr($m[2], 0, 1) . '</span> ';
|
||||||
|
}, $error_sql);
|
||||||
|
$error_msg = preg_replace_callback("#\s{1,3}(from|update|into)\s{1,3}([a-z0-9]+)\s{1,3}#i", function($m) {
|
||||||
|
return $m[1] . ' <span style="color:blue">' . substr($m[2], 0, 1) . '</span> ';
|
||||||
|
}, $error_msg);
|
||||||
|
$error_msg = preg_replace_callback("#\s'([^']+)'@'([^']+)'#i", function($m) {
|
||||||
|
return ' <span style="color:blue">hidden</span>@' . $m[2] . ' ';
|
||||||
|
}, $error_msg);
|
||||||
|
$error_sql = preg_replace("#password\s*=\s*'[^']+'#i", "password='<span style=\"color:blue\">hidden</span>'", $error_sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
//is this error related to updating?
|
||||||
|
$updating_related = false;
|
||||||
|
|
||||||
|
if (strpos($error_msg, 'Unknown column') !== false || strpos($error_msg, 'no such table') !== false)
|
||||||
|
{
|
||||||
|
$updating_related = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
|
$error_message = '<html><head><title>MYSQL ERROR</title>';
|
||||||
|
$error_message .= "<style>BODY{font-family:'Tahoma',serif;font-size:12px;}.error {}</style></head><body>";
|
||||||
|
$error_message .= '<br />';
|
||||||
|
$error_message .= '<div class="error">';
|
||||||
|
$error_message .= " <a href='#' onclick='window.location.reload( false );'>click to Refresh this page ...</a><br />";
|
||||||
|
$error_message .= '<h2>Sorry , We encountered a MySQL error: ' . ($msg !='' ? $msg : '') . '</h2>';
|
||||||
|
|
||||||
|
if ($error_sql != '')
|
||||||
|
{
|
||||||
|
$error_message .= "<br />--[query]-------------------------- <br />$error_sql<br />---------------------------------<br /><br />";
|
||||||
|
}
|
||||||
|
$error_message .= "[$error_no : $error_msg] <br />";
|
||||||
|
|
||||||
|
if ($updating_related)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
$error_message .= '<br /><strong>Your Kleeja database might be old, try to update it now from: ' . rtrim($config['siteurl'], '/') . '/install</strong>';
|
||||||
|
$error_message .= "<br /><br><strong>If this error happened after installing a plugin, add <span style=\"background-color:#ccc; padding:2px\">define('STOP_PLUGINS', true);</span> to end of config.php file.</strong>";
|
||||||
|
}
|
||||||
|
$error_message .= "<br /><br /><strong>Script: Kleeja <br /><a href='http://www.kleeja.com'>Kleeja Website</a></strong>";
|
||||||
|
$error_message .= '</b></div>';
|
||||||
|
$error_message .= '</body></html>';
|
||||||
|
|
||||||
|
|
||||||
|
print $error_message;
|
||||||
|
|
||||||
|
|
||||||
|
//loggin -> error
|
||||||
|
kleeja_log('[SQL ERROR] : "' . $error_no . ' : ' . $error_msg . '" -->');
|
||||||
|
|
||||||
|
@$this->close();
|
||||||
|
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return last error as [code, message]
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function get_error()
|
||||||
|
{
|
||||||
|
if ($this->connect_id)
|
||||||
|
{
|
||||||
|
return [$this->connect_id->lastErrorCode(), $this->connect_id->lastErrorMsg()];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return [0, 'uknown-error-not-connected'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
endif;
|
||||||
@@ -24,6 +24,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
|
||||||
*/
|
*/
|
||||||
protected function _load_template($template_name, $style_path = null)
|
protected function _load_template($template_name, $style_path = null)
|
||||||
{
|
{
|
||||||
@@ -118,16 +119,29 @@ class kleeja_style
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to parse the Template Tags
|
* Function to parse the Template Tags
|
||||||
|
* @param mixed $html
|
||||||
|
* @param mixed $template_name
|
||||||
*/
|
*/
|
||||||
protected function _parse($html, $template_name = '')
|
protected function _parse($html, $template_name = '')
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('style_parse_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('style_parse_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
|
||||||
|
$html = preg_replace_callback('/<IGNORE>(.*?)<\/IGNORE>/is', function($m) {
|
||||||
|
return '<STRREV>' . strrev($m[1]) . '</STRREV>';
|
||||||
|
}, $html);
|
||||||
$html = preg_replace(['#<([\?%])=?.*?\1>#s', '#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s', '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'], '', $html);
|
$html = preg_replace(['#<([\?%])=?.*?\1>#s', '#<script\s+language\s*=\s*(["\']?)php\1\s*>.*?</script\s*>#s', '#<\?php(?:\r\n?|[ \n\t]).*?\?>#s'], '', $html);
|
||||||
$html = preg_replace_callback('/\(([{A-Z0-9_\.}\s!=<>]+)\?(.*):(.*)\)/iU', ['kleeja_style', '_iif_callback'], $html);
|
$html = preg_replace_callback('/\(([{A-Z0-9_\.}\s!=<>]+)\?(.*):(.*)\)/iU', function($m) {
|
||||||
|
return '<IF NAME="' . $m[1] . '">' . $m[2] . '<ELSE>' . $m[3] . '</IF>';
|
||||||
|
}, $html);
|
||||||
$html = preg_replace_callback('/<(IF|ELSEIF|UNLESS) (.+)>/iU', ['kleeja_style', '_if_callback'], $html);
|
$html = preg_replace_callback('/<(IF|ELSEIF|UNLESS) (.+)>/iU', ['kleeja_style', '_if_callback'], $html);
|
||||||
$html = preg_replace_callback('/<LOOP\s+NAME\s*=\s*(\"|)+([a-z0-9_\.]{1,})+(\"|)\s*>/i', ['kleeja_style', '_loop_callback'], $html);
|
$html = preg_replace_callback('/<LOOP\s+NAME\s*=\s*(\"|)+([a-z0-9_\.]{1,})+(\"|)\s*>/i', function($m) {
|
||||||
|
return '<?php foreach($this->vars["' . (strpos($m[2], '.') !== false ? str_replace('.', '"]["', $m[2]) : $m[2]) . '"] as $key=>$value){ ?>';
|
||||||
|
}, $html);
|
||||||
$html = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_vars_callback'], $html);
|
$html = preg_replace_callback(kleeja_style::reg('var'), ['kleeja_style', '_vars_callback'], $html);
|
||||||
|
$html = preg_replace_callback('/<STRREV>(.*?)<\/STRREV>/is', function($m) {
|
||||||
|
return strrev($m[1]);
|
||||||
|
}, $html);
|
||||||
|
|
||||||
$rep =
|
$rep =
|
||||||
[
|
[
|
||||||
@@ -145,19 +159,6 @@ class kleeja_style
|
|||||||
return preg_replace(array_keys($rep), array_values($rep), $html);
|
return preg_replace(array_keys($rep), array_values($rep), $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* loop tag
|
|
||||||
* @param $matches
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function _loop_callback($matches)
|
|
||||||
{
|
|
||||||
$var = strpos($matches[2], '.') !== false ? str_replace('.', '"]["', $matches[2]) : $matches[2];
|
|
||||||
return '<?php foreach($this->vars["' . $var . '"] as $key=>$value){ ?>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if tag
|
* if tag
|
||||||
* @param $matches
|
* @param $matches
|
||||||
@@ -168,11 +169,18 @@ class kleeja_style
|
|||||||
$atts = call_user_func(['kleeja_style', '_get_attributes'], $matches[0]);
|
$atts = call_user_func(['kleeja_style', '_get_attributes'], $matches[0]);
|
||||||
$condition = '';
|
$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 ? ')' : '')
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,22 +189,16 @@ class kleeja_style
|
|||||||
: (strtoupper($matches[1]) == 'UNLESS' ? '<?php if(!(' . $condition . ')){ ?>' : '<?php }elseif(' . $condition . '){ ?>');
|
: (strtoupper($matches[1]) == 'UNLESS' ? '<?php if(!(' . $condition . ')){ ?>' : '<?php }elseif(' . $condition . '){ ?>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* iif tag, if else /if
|
|
||||||
* @param $matches
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function _iif_callback($matches)
|
|
||||||
{
|
|
||||||
return '<IF NAME="' . $matches[1] . '">' . $matches[2] . '<ELSE>' . $matches[3] . '</IF>';
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function parse_condition($condition, $is_loop)
|
protected function parse_condition($condition, $is_loop)
|
||||||
{
|
{
|
||||||
$char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>'];
|
$char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>'];
|
||||||
$reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>'];
|
$reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>'];
|
||||||
|
|
||||||
|
if(trim($condition) == '')
|
||||||
|
{
|
||||||
|
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))
|
||||||
@@ -253,8 +255,14 @@ class kleeja_style
|
|||||||
preg_match(kleeja_style::reg('var'), $matches, $matches);
|
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]) : '');
|
||||||
return (! empty($matches[1]) && trim($matches[1]) == '{{') ? '$value[\'' . $var . '\']' : '$this->vars[\'' . $var . '\']';
|
|
||||||
|
if(empty($var))
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return ! empty($matches[1]) && trim($matches[1]) == '{{' ? '$value[\'' . $var . '\']' : '$this->vars[\'' . $var . '\']';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -276,7 +284,7 @@ class kleeja_style
|
|||||||
protected function reg($var)
|
protected function reg($var)
|
||||||
{
|
{
|
||||||
$vars = get_class_vars(__CLASS__);
|
$vars = get_class_vars(__CLASS__);
|
||||||
return ($vars['reg'][$var]);
|
return $vars['reg'][$var];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -287,7 +295,7 @@ class kleeja_style
|
|||||||
*/
|
*/
|
||||||
protected function _get_attributes($tag)
|
protected function _get_attributes($tag)
|
||||||
{
|
{
|
||||||
preg_match_all('/([a-z]+)="(.+)"/iU', $tag, $attribute);
|
preg_match_all('/([a-z]+)="(.+)?"/iU', $tag, $attribute);
|
||||||
|
|
||||||
$attributes = [];
|
$attributes = [];
|
||||||
|
|
||||||
@@ -295,14 +303,7 @@ class kleeja_style
|
|||||||
{
|
{
|
||||||
$att = strtoupper($attribute[1][$i]);
|
$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]);
|
||||||
{
|
|
||||||
$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]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return $attributes;
|
return $attributes;
|
||||||
}
|
}
|
||||||
@@ -356,11 +357,11 @@ class kleeja_style
|
|||||||
$eval_on = false;
|
$eval_on = false;
|
||||||
eval('$eval_on = true;');
|
eval('$eval_on = true;');
|
||||||
|
|
||||||
$parsed_html = trim($this->_parse($html));
|
$parsed_html = trim($this->_parse(stripcslashes($html)));
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
if($eval_on)
|
if ($eval_on)
|
||||||
{
|
{
|
||||||
eval(' ?' . '>' . $parsed_html . '<' . '?php ');
|
eval(' ?' . '>' . $parsed_html . '<' . '?php ');
|
||||||
}
|
}
|
||||||
@@ -380,6 +381,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
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
protected function re_name_tpl($name, $style_path = null)
|
protected function re_name_tpl($name, $style_path = null)
|
||||||
|
|||||||
@@ -34,21 +34,21 @@ function imagebmp(&$img, $filename = false)
|
|||||||
$size = 54 + ($wid + $wid_pad) * $hei;
|
$size = 54 + ($wid + $wid_pad) * $hei;
|
||||||
|
|
||||||
//prepare & save header
|
//prepare & save header
|
||||||
$header['identifier'] = 'BM';
|
$header['identifier'] = 'BM';
|
||||||
$header['file_size'] = dword($size);
|
$header['file_size'] = dword($size);
|
||||||
$header['reserved'] = dword(0);
|
$header['reserved'] = dword(0);
|
||||||
$header['bitmap_data'] = dword(54);
|
$header['bitmap_data'] = dword(54);
|
||||||
$header['header_size'] = dword(40);
|
$header['header_size'] = dword(40);
|
||||||
$header['width'] = dword($wid);
|
$header['width'] = dword($wid);
|
||||||
$header['height'] = dword($hei);
|
$header['height'] = dword($hei);
|
||||||
$header['planes'] = word(1);
|
$header['planes'] = word(1);
|
||||||
$header['bits_per_pixel'] = word(24);
|
$header['bits_per_pixel'] = word(24);
|
||||||
$header['compression'] = dword(0);
|
$header['compression'] = dword(0);
|
||||||
$header['data_size'] = dword(0);
|
$header['data_size'] = dword(0);
|
||||||
$header['h_resolution'] = dword(0);
|
$header['h_resolution'] = dword(0);
|
||||||
$header['v_resolution'] = dword(0);
|
$header['v_resolution'] = dword(0);
|
||||||
$header['colors'] = dword(0);
|
$header['colors'] = dword(0);
|
||||||
$header['important_colors'] = dword(0);
|
$header['important_colors'] = dword(0);
|
||||||
|
|
||||||
if ($filename)
|
if ($filename)
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ function imagecreatefrombmp($filename)
|
|||||||
|
|
||||||
//read header
|
//read header
|
||||||
$header = fread($f, 54);
|
$header = fread($f, 54);
|
||||||
$header = unpack( 'c2identifier/Vfile_size/Vreserved/Vbitmap_data/Vheader_size/' .
|
$header = unpack('c2identifier/Vfile_size/Vreserved/Vbitmap_data/Vheader_size/' .
|
||||||
'Vwidth/Vheight/vplanes/vbits_per_pixel/Vcompression/Vdata_size/' .
|
'Vwidth/Vheight/vplanes/vbits_per_pixel/Vcompression/Vdata_size/' .
|
||||||
'Vh_resolution/Vv_resolution/Vcolors/Vimportant_colors', $header);
|
'Vh_resolution/Vv_resolution/Vcolors/Vimportant_colors', $header);
|
||||||
|
|
||||||
@@ -135,10 +135,10 @@ function imagecreatefrombmp($filename)
|
|||||||
imagesetpixel($img, $x, $y, dwordize($pixels[$x]));
|
imagesetpixel($img, $x, $y, dwordize($pixels[$x]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose($f);
|
fclose($f);
|
||||||
|
|
||||||
return $img;
|
return $img;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dwordize($str)
|
function dwordize($str)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,15 +17,16 @@ if (! defined('IN_COMMON'))
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* checking the safety and validity of sub-extension of given file
|
* checking the safety and validity of sub-extension of given file
|
||||||
*
|
*
|
||||||
|
* @param mixed $filename
|
||||||
*/
|
*/
|
||||||
function ext_check_safe($filename)
|
function ext_check_safe($filename)
|
||||||
{
|
{
|
||||||
//bad files extensions
|
//bad files extensions
|
||||||
$not_allowed = ['php', 'php3' ,'php5', 'php4', 'asp' ,'shtml' , 'html' ,'htm' ,'xhtml' ,'phtml', 'pl', 'cgi', 'htaccess', 'ini'];
|
$not_allowed = ['php', 'php3' ,'php5', 'php4', 'asp' ,'shtml' , 'html' ,'htm' ,'xhtml' ,'phtml', 'pl', 'cgi', 'htaccess', 'ini'];
|
||||||
|
|
||||||
//let split the file name, suppose it filename.gif.php
|
//let split the file name, suppose it filename.gif.php
|
||||||
$tmp = explode('.', $filename);
|
$tmp = explode('.', $filename);
|
||||||
|
|
||||||
//if it's less than 3, that its means normal
|
//if it's less than 3, that its means normal
|
||||||
if (sizeof($tmp) < 3)
|
if (sizeof($tmp) < 3)
|
||||||
@@ -49,6 +50,7 @@ function ext_check_safe($filename)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* create htaccess files for uploading folder
|
* create htaccess files for uploading folder
|
||||||
|
* @param mixed $folder
|
||||||
*/
|
*/
|
||||||
function generate_safety_htaccess($folder)
|
function generate_safety_htaccess($folder)
|
||||||
{
|
{
|
||||||
@@ -66,8 +68,8 @@ function generate_safety_htaccess($folder)
|
|||||||
$htaccess_data = "<Files ~ \"^.*\.(php|php*|cgi|pl|phtml|shtml|sql|asp|aspx)\">\nOrder allow,deny\nDeny from all\n</Files>\n<IfModule mod_php4.c>\nphp_flag engine off\n</IfModule>\n<IfModule mod_php5.c>\nphp_flag engine off\n</IfModule>\nRemoveType .php .php* .phtml .pl .cgi .asp .aspx .sql";
|
$htaccess_data = "<Files ~ \"^.*\.(php|php*|cgi|pl|phtml|shtml|sql|asp|aspx)\">\nOrder allow,deny\nDeny from all\n</Files>\n<IfModule mod_php4.c>\nphp_flag engine off\n</IfModule>\n<IfModule mod_php5.c>\nphp_flag engine off\n</IfModule>\nRemoveType .php .php* .phtml .pl .cgi .asp .aspx .sql";
|
||||||
|
|
||||||
//generate the htaccess
|
//generate the htaccess
|
||||||
$fi = @fopen($folder . '/.htaccess', 'w');
|
$fi = @fopen($folder . '/.htaccess', 'w');
|
||||||
$fi2 = @fopen($folder . '/thumbs/.htaccess', 'w');
|
$fi2 = @fopen($folder . '/thumbs/.htaccess', 'w');
|
||||||
@fwrite($fi, $htaccess_data);
|
@fwrite($fi, $htaccess_data);
|
||||||
@fwrite($fi2, $htaccess_data);
|
@fwrite($fi2, $htaccess_data);
|
||||||
}
|
}
|
||||||
@@ -123,6 +125,10 @@ function make_folder($folder)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the file name depend on given decoding type
|
* Change the file name depend on given decoding type
|
||||||
|
* @param mixed $filename
|
||||||
|
* @param mixed $i_loop
|
||||||
|
* @param mixed $ext
|
||||||
|
* @param mixed $decoding_type
|
||||||
*/
|
*/
|
||||||
function change_filename_decoding($filename, $i_loop, $ext, $decoding_type = '')
|
function change_filename_decoding($filename, $i_loop, $ext, $decoding_type = '')
|
||||||
{
|
{
|
||||||
@@ -143,15 +149,15 @@ function change_filename_decoding($filename, $i_loop, $ext, $decoding_type = '')
|
|||||||
// md5
|
// md5
|
||||||
elseif ($decoding_type == 'md5' || $decoding_type == 2)
|
elseif ($decoding_type == 'md5' || $decoding_type == 2)
|
||||||
{
|
{
|
||||||
list($usec, $sec) = explode(' ', microtime());
|
list($usec, $sec) = explode(' ', microtime());
|
||||||
$extra = md5(((float) $usec + (float) $sec) . $filename);
|
$extra = md5(((float) $usec + (float) $sec) . $filename);
|
||||||
$extra = substr($extra, 0, 12);
|
$extra = substr($extra, 0, 12);
|
||||||
$return = $extra . $i_loop . '.' . $ext;
|
$return = $extra . $i_loop . '.' . $ext;
|
||||||
}
|
}
|
||||||
// exists before, change it a little
|
// exists before, change it a little
|
||||||
elseif ($decoding_type == 'exists')
|
elseif ($decoding_type == 'exists')
|
||||||
{
|
{
|
||||||
$return = substr($filename, 0, -(strlen($ext)+1)) . '_' . substr(md5( microtime(true) . $i_loop), rand(0, 20), 5) . '.' . $ext;
|
$return = substr($filename, 0, -(strlen($ext)+1)) . '_' . substr(md5(microtime(true) . $i_loop), rand(0, 20), 5) . '.' . $ext;
|
||||||
}
|
}
|
||||||
//nothing
|
//nothing
|
||||||
else
|
else
|
||||||
@@ -168,6 +174,7 @@ function change_filename_decoding($filename, $i_loop, $ext, $decoding_type = '')
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the file name depend on used templates {rand:..} {date:..}
|
* Change the file name depend on used templates {rand:..} {date:..}
|
||||||
|
* @param mixed $filename
|
||||||
*/
|
*/
|
||||||
function change_filename_templates($filename)
|
function change_filename_templates($filename)
|
||||||
{
|
{
|
||||||
@@ -191,6 +198,9 @@ function change_filename_templates($filename)
|
|||||||
/**
|
/**
|
||||||
* check mime type of uploaded file
|
* check mime type of uploaded file
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @param mixed $given_file_mime
|
||||||
|
* @param mixed $file_ext
|
||||||
|
* @param mixed $file_path
|
||||||
*/
|
*/
|
||||||
function check_mime_type($given_file_mime, $file_ext, $file_path)
|
function check_mime_type($given_file_mime, $file_ext, $file_path)
|
||||||
{
|
{
|
||||||
@@ -246,7 +256,7 @@ function check_mime_type($given_file_mime, $file_ext, $file_path)
|
|||||||
|
|
||||||
//if normal checks failed!
|
//if normal checks failed!
|
||||||
|
|
||||||
if (@kleeja_filesize($file_path) > 6*(1000*1024))
|
if (@filesize($file_path) > 6*(1000*1024))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -275,7 +285,8 @@ function check_mime_type($given_file_mime, $file_ext, $file_path)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* to prevent flooding at uploading
|
* to prevent flooding at uploading
|
||||||
|
* @param mixed $user_id
|
||||||
*/
|
*/
|
||||||
function user_is_flooding($user_id = '-1')
|
function user_is_flooding($user_id = '-1')
|
||||||
{
|
{
|
||||||
@@ -296,14 +307,14 @@ function user_is_flooding($user_id = '-1')
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//In my point of view I see 30 seconds is not bad rate to stop flooding ..
|
//In my point of view I see 30 seconds is not bad rate to stop flooding ..
|
||||||
//even though this minimum rate sometime isn't enough to protect Kleeja from flooding attacks
|
//even though this minimum rate sometime isn't enough to protect Kleeja from flooding attacks
|
||||||
$time = time() - ($user_id == '-1' ? $config['guestsectoupload'] : $config['usersectoupload']);
|
$time = time() - ($user_id == '-1' ? $config['guestsectoupload'] : $config['usersectoupload']);
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'f.time',
|
'SELECT' => 'f.time',
|
||||||
'FROM' => "{$dbprefix}files f",
|
'FROM' => "{$dbprefix}files f",
|
||||||
'WHERE' => 'f.time >= ' . $time . ' AND f.user_ip = \'' . $SQL->escape(get_ip()) . '\'',
|
'WHERE' => 'f.time >= ' . $time . ' AND f.user_ip = \'' . $SQL->escape(get_ip()) . '\'',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($SQL->num_rows($SQL->build($query)))
|
if ($SQL->num_rows($SQL->build($query)))
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package Kleeja_up_helpers
|
|
||||||
* @copyright (c) 2007-2012 Kleeja.com
|
|
||||||
* @license ./docs/license.txt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
//no for directly open
|
|
||||||
if (! defined('IN_COMMON'))
|
|
||||||
{
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// This helper is used to help in remote uploading
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
* bring the file size from remote file; aka url
|
|
||||||
*/
|
|
||||||
function get_remote_file_size($url, $method = 'GET', $data = '', $redirect = 10)
|
|
||||||
{
|
|
||||||
$url = parse_url($url);
|
|
||||||
$fp = @fsockopen ($url['host'], (! empty($url['port']) ? (int) $url['port'] : 80), $errno, $errstr, 30);
|
|
||||||
|
|
||||||
if ($fp)
|
|
||||||
{
|
|
||||||
$path = (! empty($url['path']) ? $url['path'] : '/') . (! empty($url['query']) ? '?' . $url['query'] : '');
|
|
||||||
$header = "\r\nHost: " . $url['host'];
|
|
||||||
|
|
||||||
if ('post' == strtolower($method))
|
|
||||||
{
|
|
||||||
$header .= "\r\nContent-Length: " . strlen($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
fputs ($fp, $method . ' ' . $path . ' HTTP/1.0' . $header . "\r\n\r\n" . ('post' == strtolower($method) ? $data : ''));
|
|
||||||
|
|
||||||
if (! feof($fp))
|
|
||||||
{
|
|
||||||
$scheme = fgets($fp);
|
|
||||||
list(, $code ) = explode(' ', $scheme);
|
|
||||||
$headers = ['Scheme' => $scheme];
|
|
||||||
}
|
|
||||||
|
|
||||||
while (! feof($fp))
|
|
||||||
{
|
|
||||||
$h = fgets($fp);
|
|
||||||
|
|
||||||
if ($h == "\r\n" OR $h == "\n")
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
list($key, $value) = explode(':', $h, 2);
|
|
||||||
$headers[$key] = trim($value);
|
|
||||||
|
|
||||||
if ($code >= 300 AND $code < 400 AND strtolower($key) == 'location' AND $redirect > 0)
|
|
||||||
{
|
|
||||||
return get_remote_file_size($headers[$key], $method, $data, --$redirect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$body = '';
|
|
||||||
// while ( !feof($fp) ) $body .= fgets($fp);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return (['error' => ['errno' => $errno, 'errstr' => $errstr]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (string) $headers['Content-Length'];
|
|
||||||
}
|
|
||||||
@@ -76,18 +76,18 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
|
|||||||
switch ($ext)
|
switch ($ext)
|
||||||
{
|
{
|
||||||
case 'gif':
|
case 'gif':
|
||||||
$source_gdim = imagecreatefromgif( $source_path );
|
$source_gdim = imagecreatefromgif($source_path);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'jpg':
|
case 'jpg':
|
||||||
case 'jpeg':
|
case 'jpeg':
|
||||||
$source_gdim = imagecreatefromjpeg( $source_path );
|
$source_gdim = imagecreatefromjpeg($source_path);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'png':
|
case 'png':
|
||||||
$source_gdim = imagecreatefrompng( $source_path );
|
$source_gdim = imagecreatefrompng($source_path);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
|
|||||||
define('BMP_CLASS_INCLUDED', true);
|
define('BMP_CLASS_INCLUDED', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$source_gdim = imagecreatefrombmp( $source_path );
|
$source_gdim = imagecreatefrombmp($source_path);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -123,7 +123,7 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Resize the image into a temporary GD image
|
// Resize the image into a temporary GD image
|
||||||
$temp_gdim = imagecreatetruecolor( $temp_width, $temp_height );
|
$temp_gdim = imagecreatetruecolor($temp_width, $temp_height);
|
||||||
|
|
||||||
imagecopyresampled(
|
imagecopyresampled(
|
||||||
$temp_gdim,
|
$temp_gdim,
|
||||||
@@ -189,6 +189,10 @@ function helper_thumb($source_path, $ext, $dest_image, $dw, $dh)
|
|||||||
/**
|
/**
|
||||||
* generating thumb from image using Imagick
|
* generating thumb from image using Imagick
|
||||||
*
|
*
|
||||||
|
* @param mixed $x
|
||||||
|
* @param mixed $y
|
||||||
|
* @param mixed $cx
|
||||||
|
* @param mixed $cy
|
||||||
*/
|
*/
|
||||||
function scale_image_imagick($x, $y, $cx, $cy)
|
function scale_image_imagick($x, $y, $cx, $cy)
|
||||||
{
|
{
|
||||||
@@ -232,7 +236,7 @@ function scale_image_imagick($x, $y, $cx, $cy)
|
|||||||
|
|
||||||
function helper_thumb_imagick($name, $ext, $filename, $new_w, $new_h)
|
function helper_thumb_imagick($name, $ext, $filename, $new_w, $new_h)
|
||||||
{
|
{
|
||||||
//intiating the Imagick lib
|
//intiating the Imagick lib
|
||||||
$im = new Imagick($name);
|
$im = new Imagick($name);
|
||||||
|
|
||||||
//guess the right thumb height, weights
|
//guess the right thumb height, weights
|
||||||
@@ -252,7 +256,7 @@ function helper_thumb_imagick($name, $ext, $filename, $new_w, $new_h)
|
|||||||
{
|
{
|
||||||
$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)
|
||||||
{
|
{
|
||||||
// more than 10 frames, quit it
|
// more than 10 frames, quit it
|
||||||
|
|||||||
@@ -24,8 +24,15 @@ if (! defined('IN_COMMON'))
|
|||||||
*/
|
*/
|
||||||
function helper_watermark($name, $ext)
|
function helper_watermark($name, $ext)
|
||||||
{
|
{
|
||||||
|
$return = false;
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('helper_watermark_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('helper_watermark_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
|
if ($return)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//is this file really exsits ?
|
//is this file really exsits ?
|
||||||
if (! file_exists($name))
|
if (! file_exists($name))
|
||||||
{
|
{
|
||||||
@@ -70,7 +77,7 @@ function helper_watermark($name, $ext)
|
|||||||
elseif (strpos($ext, 'gif') !== false)
|
elseif (strpos($ext, 'gif') !== false)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
// $src_img = @imagecreatefromgif($name);
|
// $src_img = @imagecreatefromgif($name);
|
||||||
}
|
}
|
||||||
elseif (strpos($ext, 'bmp') !== false)
|
elseif (strpos($ext, 'bmp') !== false)
|
||||||
{
|
{
|
||||||
@@ -145,10 +152,10 @@ function helper_watermark_imagick($name, $ext, $logo)
|
|||||||
//$watermark->readImage($);
|
//$watermark->readImage($);
|
||||||
|
|
||||||
//how big are the images?
|
//how big are the images?
|
||||||
$iWidth = $im->getImageWidth();
|
$iWidth = $im->getImageWidth();
|
||||||
$iHeight= $im->getImageHeight();
|
$iHeight = $im->getImageHeight();
|
||||||
$wWidth = $watermark->getImageWidth();
|
$wWidth = $watermark->getImageWidth();
|
||||||
$wHeight= $watermark->getImageHeight();
|
$wHeight = $watermark->getImageHeight();
|
||||||
|
|
||||||
if ($iHeight < $wHeight || $iWidth < $wWidth)
|
if ($iHeight < $wHeight || $iWidth < $wWidth)
|
||||||
{
|
{
|
||||||
@@ -169,12 +176,12 @@ 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)
|
||||||
{
|
{
|
||||||
$frame->compositeImage($watermark, imagick::COMPOSITE_OVER, $x, $y);
|
$frame->compositeImage($watermark, imagick::COMPOSITE_OVER, $x, $y);
|
||||||
|
|
||||||
// $gif_new->addImage($frame->getImage());
|
// $gif_new->addImage($frame->getImage());
|
||||||
if ($i >= 10)
|
if ($i >= 10)
|
||||||
{
|
{
|
||||||
// more than 10 frames, quit it
|
// more than 10 frames, quit it
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ if (! defined('IN_COMMON'))
|
|||||||
include_once dirname(__file__) . '/../up_helpers/others.php';
|
include_once dirname(__file__) . '/../up_helpers/others.php';
|
||||||
include_once dirname(__file__) . '/../up_helpers/thumbs.php';
|
include_once dirname(__file__) . '/../up_helpers/thumbs.php';
|
||||||
include_once dirname(__file__) . '/../up_helpers/watermark.php';
|
include_once dirname(__file__) . '/../up_helpers/watermark.php';
|
||||||
include_once dirname(__file__) . '/../up_helpers/remote_uploading.php';
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* uploading class, the most important class in Kleeja
|
* uploading class, the most important class in Kleeja
|
||||||
@@ -138,7 +136,7 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
$fileInfo['DeleteCode'] = sha1($fileInfo['generatedFileName'] . uniqid());
|
$fileInfo['DeleteCode'] = sha1($fileInfo['generatedFileName'] . uniqid());
|
||||||
|
|
||||||
$queryValues =
|
$queryValues =
|
||||||
[
|
[
|
||||||
'name' => $fileInfo['generatedFileName'],
|
'name' => $fileInfo['generatedFileName'],
|
||||||
'real_filename' => $fileInfo['originalFileName'],
|
'real_filename' => $fileInfo['originalFileName'],
|
||||||
@@ -160,9 +158,9 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
// insertion query
|
// insertion query
|
||||||
$insert_query = [
|
$insert_query = [
|
||||||
'INSERT' => '`' . implode('` , `', array_keys($queryValues)) . '`',
|
'INSERT' => '`' . implode('` , `', array_keys($queryValues)) . '`',
|
||||||
'INTO' => "{$dbprefix}files",
|
'INTO' => "{$dbprefix}files",
|
||||||
'VALUES' => "'" . implode("', '", array_map([$SQL, 'escape'], array_values($queryValues))) . "'"
|
'VALUES' => "'" . implode("', '", array_map([$SQL, 'escape'], array_values($queryValues))) . "'"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -177,8 +175,8 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
// update Kleeja stats
|
// update Kleeja stats
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}stats",
|
'UPDATE' => "{$dbprefix}stats",
|
||||||
'SET' => ($is_img ? 'imgs=imgs+1' : 'files=files+1') . ',sizes=sizes+' . intval($fileInfo['fileSize']) . ''
|
'SET' => ($is_img ? 'imgs=imgs+1' : 'files=files+1') . ',sizes=sizes+' . intval($fileInfo['fileSize']) . ''
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -226,7 +224,7 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
if ($config['del_url_file'])
|
if ($config['del_url_file'])
|
||||||
{
|
{
|
||||||
$extra_del = get_up_tpl_box('del_file_code',
|
$extra_del = get_up_tpl_box('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']])
|
||||||
@@ -259,9 +257,9 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
$img_html_result .= get_up_tpl_box('image_thumb',
|
$img_html_result .= get_up_tpl_box('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)
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -275,9 +273,9 @@ class defaultUploader implements KleejaUploader
|
|||||||
//then show, image box
|
//then show, image box
|
||||||
$img_html_result .= get_up_tpl_box('image',
|
$img_html_result .= get_up_tpl_box('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),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -299,9 +297,9 @@ class defaultUploader implements KleejaUploader
|
|||||||
//then show other files
|
//then show other files
|
||||||
$else_html_result = get_up_tpl_box('file',
|
$else_html_result = get_up_tpl_box('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),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -328,14 +326,10 @@ class defaultUploader implements KleejaUploader
|
|||||||
* here happens the magic, call this on upload submit
|
* here happens the magic, call this on upload submit
|
||||||
* @param int $uploadType upload from files input or links
|
* @param int $uploadType upload from files input or links
|
||||||
*/
|
*/
|
||||||
public function upload($uploadType)
|
public function upload()
|
||||||
{
|
{
|
||||||
global $usrcp, $config, $lang;
|
global $usrcp, $config, $lang;
|
||||||
|
|
||||||
// when $uploadType = 1, then we upload from _file input
|
|
||||||
// if $uploadType = 2, then we uploading from url which is disabled by default and is buggy
|
|
||||||
|
|
||||||
|
|
||||||
//upload to this folder
|
//upload to this folder
|
||||||
$current_uploading_folder = $config['foldername'];
|
$current_uploading_folder = $config['foldername'];
|
||||||
|
|
||||||
@@ -366,15 +360,8 @@ class defaultUploader implements KleejaUploader
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//no uploading yet, or just go to index.php, so we have make a new session
|
|
||||||
if (! $uploadType)
|
|
||||||
{
|
|
||||||
unset($_SESSION['FIILES_NOT_DUPLI'], $_SESSION['FIILES_NOT_DUPLI_LINKS']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// is captcha on, and there is uploading going on
|
// is captcha on, and there is uploading going on
|
||||||
if ($captcha_enabled && $uploadType)
|
if ($captcha_enabled)
|
||||||
{
|
{
|
||||||
//captcha is wrong
|
//captcha is wrong
|
||||||
if (! kleeja_check_captcha())
|
if (! kleeja_check_captcha())
|
||||||
@@ -394,161 +381,106 @@ class defaultUploader implements KleejaUploader
|
|||||||
|
|
||||||
|
|
||||||
//detect flooding, TODO fix it or remove it
|
//detect flooding, TODO fix it or remove it
|
||||||
if ($uploadType == 1 && 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']);
|
||||||
// if(!ip('ajax'))
|
|
||||||
// {
|
|
||||||
// redirect('./');
|
|
||||||
// }
|
|
||||||
|
|
||||||
$this->addErrorMessage($lang['U_R_FLOODER']);
|
$this->addErrorMessage($lang['U_R_FLOODER']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uploadType == 2 && isset($_SESSION['FIILES_NOT_DUPLI_LINKS']))
|
|
||||||
{
|
|
||||||
if ($_SESSION['FIILES_NOT_DUPLI_LINKS'] == sha1(serialize($_POST)))
|
|
||||||
{
|
|
||||||
unset($_SESSION['FIILES_NOT_DUPLI_LINKS']);
|
|
||||||
|
|
||||||
if (! ip('ajax'))
|
|
||||||
{
|
|
||||||
redirect('./');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->addErrorMessage($lang['U_R_FLOODER']);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// flooding code, making sure every ok session is cleared
|
// flooding code, making sure every ok session is cleared
|
||||||
if ($uploadType == 1 && 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')));
|
||||||
}
|
}
|
||||||
elseif ($uploadType == 2)
|
|
||||||
{
|
|
||||||
$_SESSION['FIILES_NOT_DUPLI_LINKS'] = sha1(serialize($_POST));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//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']))
|
||||||
// do upload
|
|
||||||
switch ($uploadType)
|
|
||||||
{
|
{
|
||||||
//uploading from a _files input
|
$_FILES['file'][0] = $_FILES['file'];
|
||||||
default:
|
|
||||||
case 1:
|
|
||||||
|
|
||||||
if (! empty($_FILES['file']['tmp_name']))
|
|
||||||
{
|
|
||||||
$_FILES['file'][0] = $_FILES['file'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// loop the uploaded files
|
|
||||||
for ($i=0; $i<=$this->getUploadFieldsLimit(); $i++)
|
|
||||||
{
|
|
||||||
//no file!
|
|
||||||
if (empty($_FILES['file_' . $i . '_']['tmp_name']) && empty($_FILES['file'][$i]['tmp_name']))
|
|
||||||
{
|
|
||||||
if (is_null($_FILES['file_' . $i . '_']) && is_null($_FILES['file'][$i]))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$error = isset($_FILES['file_' . $i . '_'])
|
|
||||||
? $_FILES['file_' . $i . '_']['error']
|
|
||||||
: (isset($_FILES['file'][$i]) ? $_FILES['file'][$i]['error'] : -1);
|
|
||||||
|
|
||||||
$filename = isset($_FILES['file'][$i]['name'])
|
|
||||||
? $_FILES['file'][$i]['name']
|
|
||||||
: (isset($_FILES['file_' . $i . '_']['name']) ? $_FILES['file_' . $i . '_']['name'] : '....');
|
|
||||||
|
|
||||||
$upload_max_size = ini_get('upload_max_filesize');
|
|
||||||
|
|
||||||
if ($error !== UPLOAD_ERR_OK)
|
|
||||||
{
|
|
||||||
switch ($error)
|
|
||||||
{
|
|
||||||
case UPLOAD_ERR_INI_SIZE:
|
|
||||||
case UPLOAD_ERR_FORM_SIZE:
|
|
||||||
$this->addErrorMessage(sprintf(
|
|
||||||
$lang['SIZE_F_BIG'],
|
|
||||||
htmlspecialchars($filename),
|
|
||||||
'php.ini/upload_max_filesize: ' . $upload_max_size)
|
|
||||||
);
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UPLOAD_ERR_PARTIAL:
|
|
||||||
// $message = "The uploaded file was only partially uploaded";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UPLOAD_ERR_NO_FILE:
|
|
||||||
// $message = "No file was uploaded";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UPLOAD_ERR_NO_TMP_DIR:
|
|
||||||
$this->addErrorMessage('Missing a temporary folder');
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UPLOAD_ERR_CANT_WRITE:
|
|
||||||
$this->addErrorMessage('Failed to write file to disk');
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UPLOAD_ERR_EXTENSION:
|
|
||||||
$this->addErrorMessage('File upload stopped by extension');
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], htmlspecialchars($filename)));
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$this->uploadTypeFile($i, $current_uploading_folder, $current_user_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
//uploading from a url text-input
|
|
||||||
case 2:
|
|
||||||
|
|
||||||
//if not enabled, quit it
|
|
||||||
if ($config['www_url'] != 1)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//loop text inputs
|
|
||||||
for ($i=0; $i<=$this->getUploadFieldsLimit(); $i++)
|
|
||||||
{
|
|
||||||
$this->uploadTypeUrl($i, $current_uploading_folder, $current_user_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// loop the uploaded files
|
||||||
|
for ($i=0; $i<=$this->getUploadFieldsLimit(); $i++)
|
||||||
|
{
|
||||||
|
//no file!
|
||||||
|
if (empty($_FILES['file_' . $i . '_']['tmp_name']) && empty($_FILES['file'][$i]['tmp_name']))
|
||||||
|
{
|
||||||
|
if (! isset($_FILES['file_' . $i . '_'], $_FILES['file'][$i]))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$error = isset($_FILES['file_' . $i . '_'])
|
||||||
|
? $_FILES['file_' . $i . '_']['error']
|
||||||
|
: (isset($_FILES['file'][$i]) ? $_FILES['file'][$i]['error'] : -1);
|
||||||
|
|
||||||
|
$filename = isset($_FILES['file'][$i]['name'])
|
||||||
|
? $_FILES['file'][$i]['name']
|
||||||
|
: (isset($_FILES['file_' . $i . '_']['name']) ? $_FILES['file_' . $i . '_']['name'] : '....');
|
||||||
|
|
||||||
|
$upload_max_size = ini_get('upload_max_filesize');
|
||||||
|
|
||||||
|
if ($error !== UPLOAD_ERR_OK)
|
||||||
|
{
|
||||||
|
switch ($error)
|
||||||
|
{
|
||||||
|
case UPLOAD_ERR_INI_SIZE:
|
||||||
|
case UPLOAD_ERR_FORM_SIZE:
|
||||||
|
$this->addErrorMessage(sprintf(
|
||||||
|
$lang['SIZE_F_BIG'],
|
||||||
|
htmlspecialchars($filename),
|
||||||
|
'php.ini/upload_max_filesize: ' . $upload_max_size)
|
||||||
|
);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPLOAD_ERR_PARTIAL:
|
||||||
|
// $message = "The uploaded file was only partially uploaded";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPLOAD_ERR_NO_FILE:
|
||||||
|
// $message = "No file was uploaded";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPLOAD_ERR_NO_TMP_DIR:
|
||||||
|
$this->addErrorMessage('Missing a temporary folder');
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPLOAD_ERR_CANT_WRITE:
|
||||||
|
$this->addErrorMessage('Failed to write file to disk');
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case UPLOAD_ERR_EXTENSION:
|
||||||
|
$this->addErrorMessage('File upload stopped by extension');
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$this->addErrorMessage(sprintf($lang['CANT_UPLAOD'], htmlspecialchars($filename)));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->uploadTypeFile($i, $current_uploading_folder, $current_user_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 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)
|
||||||
@@ -648,7 +580,7 @@ class defaultUploader implements KleejaUploader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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'])));
|
||||||
}
|
}
|
||||||
@@ -689,134 +621,4 @@ class defaultUploader implements KleejaUploader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* upload a file from a URL
|
|
||||||
* @param $fieldNumber
|
|
||||||
* @param $current_uploading_folder
|
|
||||||
* @param $current_user_id
|
|
||||||
*/
|
|
||||||
public function uploadTypeUrl($fieldNumber, $current_uploading_folder, $current_user_id)
|
|
||||||
{
|
|
||||||
global $config, $lang;
|
|
||||||
|
|
||||||
$fileInfo = [
|
|
||||||
'saveToFolder',
|
|
||||||
'originalFileName',
|
|
||||||
'generatedFileName',
|
|
||||||
'fileSize',
|
|
||||||
'currentUserId',
|
|
||||||
'fileExtension'
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
$fileInfo['saveToFolder'] = $current_uploading_folder;
|
|
||||||
$fileInfo['currentUserId'] = $current_user_id;
|
|
||||||
|
|
||||||
|
|
||||||
if (p('file_' . $fieldNumber . '_') == '' || p('file_' . $fieldNumber . '_') == $lang['PAST_URL_HERE'])
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// get file name
|
|
||||||
$fileInfo['originalFileName'] = basename(p('file_' . $fieldNumber . '_'));
|
|
||||||
|
|
||||||
|
|
||||||
// file extension, type
|
|
||||||
$fileExtensions = array_map('strtolower', explode('.', $fileInfo['originalFileName']));
|
|
||||||
|
|
||||||
|
|
||||||
if (sizeof($fileExtensions) > 1 && in_array($fileExtensions[sizeof($fileExtensions)-1], ['html', 'php', 'html']))
|
|
||||||
{
|
|
||||||
$fileInfo['fileExtension'] = strtolower($fileExtensions[sizeof($fileExtensions)-2]);
|
|
||||||
}
|
|
||||||
elseif (sizeof($fileExtensions) > 0)
|
|
||||||
{
|
|
||||||
$fileInfo['fileExtension'] = strtolower($fileExtensions[sizeof($fileExtensions)-1]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$fileInfo['fileExtension'] = ''; //what to do?
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// change to another filename depend on kleeja settings
|
|
||||||
$fileInfo['generatedFileName'] = change_filename_decoding($fileInfo['originalFileName'], $fieldNumber, $fileInfo['fileExtension']);
|
|
||||||
$fileInfo['generatedFileName'] = change_filename_templates(trim($config['prefixname']) . $fileInfo['generatedFileName']);
|
|
||||||
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('defaultUploader_uploadTypeUrl_1st', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
|
|
||||||
|
|
||||||
//forbbiden type ? quit it
|
|
||||||
if (! in_array(strtolower($fileInfo['fileExtension']), array_keys($this->getAllowedFileExtensions())))
|
|
||||||
{
|
|
||||||
if ($current_user_id == '-1')
|
|
||||||
{
|
|
||||||
$this->addErrorMessage(
|
|
||||||
sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension']) .
|
|
||||||
'<br> <a href="' . ($config['mod_writer'] ? 'register.html' : 'ucp.php?go=register') . '">' .
|
|
||||||
$lang['REGISTER'] . '</a>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// a member
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->addErrorMessage(sprintf($lang['FORBID_EXT'], $fileInfo['fileExtension']));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// file exists before ? quit it
|
|
||||||
elseif (file_exists($current_uploading_folder . '/' . $fileInfo['generatedFileName']))
|
|
||||||
{
|
|
||||||
$this->addErrorMessage(sprintf($lang['SAME_FILE_EXIST'], htmlspecialchars($fileInfo['generatedFileName'])));
|
|
||||||
}
|
|
||||||
// no errors, ok, lets upload now
|
|
||||||
else
|
|
||||||
{
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('defaultUploader_uploadTypeUrl_2nd', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
|
||||||
|
|
||||||
|
|
||||||
//no prefix ? http or even ftp, then add one
|
|
||||||
if (! in_array(strtolower(substr(p('file_' . $fieldNumber . '_'), 0, 4)), ['http', 'ftp:']))
|
|
||||||
{
|
|
||||||
$_POST['file_' . $fieldNumber . '_'] = 'http://' . p('file_' . $fieldNumber . '_');
|
|
||||||
}
|
|
||||||
|
|
||||||
//get size, if big quit it
|
|
||||||
$fileInfo['fileSize'] = get_remote_file_size(p('file_' . $fieldNumber . '_'));
|
|
||||||
|
|
||||||
if ($this->getAllowedFileExtensions()[$fileInfo['fileExtension']] > 0 && $fileInfo['fileSize'] >= $this->getAllowedFileExtensions()[$fileInfo['fileExtension']])
|
|
||||||
{
|
|
||||||
$this->addErrorMessage(sprintf(
|
|
||||||
$lang['SIZE_F_BIG'],
|
|
||||||
p('file_' . $fieldNumber . '_'),
|
|
||||||
readable_size($this->getAllowedFileExtensions()[$fileInfo['fileExtension']])
|
|
||||||
));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//get remote data, if no data quit it
|
|
||||||
$data = fetch_remote_file(
|
|
||||||
p('file_' . $fieldNumber . '_'),
|
|
||||||
$current_uploading_folder . '/' . $fileInfo['generatedFileName'],
|
|
||||||
15,
|
|
||||||
false,
|
|
||||||
2,
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($data === false)
|
|
||||||
{
|
|
||||||
$this->addErrorMessage($lang['URL_CANT_GET']);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->saveToDatabase($fileInfo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
279
includes/usr.php
279
includes/usr.php
@@ -17,20 +17,12 @@ if (! defined('IN_COMMON'))
|
|||||||
|
|
||||||
class usrcp
|
class usrcp
|
||||||
{
|
{
|
||||||
// this function like a traffic sign :)
|
public function data($name, $pass, $hashed = false, $expire = 86400, $loginadm = false)
|
||||||
public function data ($name, $pass, $hashed = false, $expire = 86400, $loginadm = false)
|
|
||||||
{
|
{
|
||||||
global $config, $userinfo;
|
|
||||||
|
|
||||||
//return user system to normal
|
|
||||||
if (defined('DISABLE_INTR') || $config['user_system'] == '' || empty($config['user_system']))
|
|
||||||
{
|
|
||||||
$config['user_system'] = '1';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//expire
|
//expire
|
||||||
$expire = time() + ((int) $expire ? intval($expire) : 86400);
|
$expire = time() + ((int) $expire ? intval($expire) : 86400);
|
||||||
|
$name = trim($name);
|
||||||
|
$pass = trim($pass);
|
||||||
|
|
||||||
$return_now = $login_status = false;
|
$return_now = $login_status = false;
|
||||||
|
|
||||||
@@ -41,33 +33,13 @@ class usrcp
|
|||||||
return $login_status;
|
return $login_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//normal
|
||||||
if ((int) $config['user_system'] != 1)
|
return $this->normal($name, $pass, $hashed, $expire, $loginadm);
|
||||||
{
|
|
||||||
if (file_exists(PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php'))
|
|
||||||
{
|
|
||||||
include_once PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php';
|
|
||||||
$login_status = kleeja_auth_login(trim($name), trim($pass), $hashed, $expire, $loginadm);
|
|
||||||
|
|
||||||
return $login_status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//normal
|
|
||||||
return $this->normal(trim($name), trim($pass), $hashed, $expire, $loginadm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//get username by id
|
//get username by id
|
||||||
public function usernamebyid($user_id)
|
public function usernamebyid($user_id)
|
||||||
{
|
{
|
||||||
global $config;
|
|
||||||
|
|
||||||
//return user system to normal
|
|
||||||
if (defined('DISABLE_INTR'))
|
|
||||||
{
|
|
||||||
$config['user_system'] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$return_now = $auth_status = false;
|
$return_now = $auth_status = false;
|
||||||
|
|
||||||
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
|
||||||
@@ -77,34 +49,25 @@ class usrcp
|
|||||||
return $auth_status;
|
return $auth_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((int) $config['user_system'] != 1)
|
|
||||||
{
|
|
||||||
if (file_exists(PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php'))
|
|
||||||
{
|
|
||||||
include_once PATH . 'includes/auth_integration/' . trim($config['user_system']) . '.php';
|
|
||||||
return kleeja_auth_username($user_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//normal system
|
//normal system
|
||||||
$u = $this->get_data('name', $user_id);
|
$u = $this->get_data('name', $user_id);
|
||||||
return $u['name'];
|
return $u['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//now our table, normal user system
|
//now our table, normal user system
|
||||||
public function normal ($name, $pass, $hashed = false, $expire, $loginadm = false)
|
public function normal($name, $pass, $hashed = false, $expire, $loginadm = false)
|
||||||
{
|
{
|
||||||
global $SQL, $dbprefix, $config, $userinfo;
|
global $SQL, $dbprefix, $config, $userinfo;
|
||||||
|
|
||||||
$userinfo = [
|
$userinfo = [
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'group_id' => 2,
|
'group_id' => 2,
|
||||||
];
|
];
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => '*',
|
'SELECT' => '*',
|
||||||
'FROM' => "{$dbprefix}users",
|
'FROM' => "{$dbprefix}users",
|
||||||
'LIMIT' => '1'
|
'LIMIT' => '1'
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($hashed)
|
if ($hashed)
|
||||||
@@ -124,7 +87,8 @@ class usrcp
|
|||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
if (empty($row['password']))
|
if (empty($row['password']))
|
||||||
{ //more security
|
{
|
||||||
|
//more security
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +102,7 @@ class usrcp
|
|||||||
if ($row['password'] == $passmd5)
|
if ($row['password'] == $passmd5)
|
||||||
{
|
{
|
||||||
////new salt
|
////new salt
|
||||||
$new_salt = substr(kleeja_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
|
||||||
$new_password = $this->kleeja_hash_password(trim($pass) . $new_salt);
|
$new_password = $this->kleeja_hash_password(trim($pass) . $new_salt);
|
||||||
|
|
||||||
@@ -146,9 +110,9 @@ class usrcp
|
|||||||
|
|
||||||
////update now !!
|
////update now !!
|
||||||
$update_query = [
|
$update_query = [
|
||||||
'UPDATE' => "{$dbprefix}users",
|
'UPDATE' => "{$dbprefix}users",
|
||||||
'SET' => "password='" . $new_password . "' ,password_salt='" . $new_salt . "'",
|
'SET' => "password='" . $new_password . "' ,password_salt='" . $new_salt . "'",
|
||||||
'WHERE' => 'id=' . intval($row['id'])
|
'WHERE' => 'id=' . intval($row['id'])
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_query);
|
$SQL->build($update_query);
|
||||||
@@ -177,7 +141,7 @@ class usrcp
|
|||||||
//all user fileds info
|
//all user fileds info
|
||||||
$userinfo = $row;
|
$userinfo = $row;
|
||||||
|
|
||||||
$user_y = kleeja_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)
|
||||||
{
|
{
|
||||||
@@ -185,13 +149,13 @@ class usrcp
|
|||||||
$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)
|
||||||
{
|
{
|
||||||
$update_last_visit = [
|
$update_last_visit = [
|
||||||
'UPDATE' => "{$dbprefix}users",
|
'UPDATE' => "{$dbprefix}users",
|
||||||
'SET' => 'last_visit=' . time(),
|
'SET' => 'last_visit=' . time(),
|
||||||
'WHERE' => 'id=' . intval($row['id'])
|
'WHERE' => 'id=' . intval($row['id'])
|
||||||
];
|
];
|
||||||
|
|
||||||
$SQL->build($update_last_visit);
|
$SQL->build($update_last_visit);
|
||||||
@@ -223,14 +187,14 @@ class usrcp
|
|||||||
$user_id = $this->id();
|
$user_id = $this->id();
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo :
|
//todo :
|
||||||
//if type != '*' and contains no , and type in 'name, id, email' return $this->id .. etc
|
//if type != '*' and contains no , and type in 'name, id, email' return $this->id .. etc
|
||||||
|
|
||||||
//te get files and update them !!
|
//te get files and update them !!
|
||||||
$query_name = [
|
$query_name = [
|
||||||
'SELECT' => $type,
|
'SELECT' => $type,
|
||||||
'FROM' => "{$dbprefix}users",
|
'FROM' => "{$dbprefix}users",
|
||||||
'WHERE' => 'id=' . intval($user_id)
|
'WHERE' => 'id=' . intval($user_id)
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_userdata_in_usrclass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_userdata_in_usrclass', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
@@ -240,7 +204,7 @@ class usrcp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// user ids
|
// user ids
|
||||||
public function id ()
|
public function id()
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('id_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('id_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -248,7 +212,7 @@ class usrcp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// group ids
|
// group ids
|
||||||
public function group_id ()
|
public function group_id()
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('group_id_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('group_id_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -256,7 +220,7 @@ class usrcp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// user name
|
// user name
|
||||||
public function name ()
|
public function name()
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('name_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('name_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -264,7 +228,7 @@ class usrcp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// user mail
|
// user mail
|
||||||
public function mail ()
|
public function mail()
|
||||||
{
|
{
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('mail_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('mail_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
@@ -282,7 +246,7 @@ class usrcp
|
|||||||
$this->logout_cp();
|
$this->logout_cp();
|
||||||
}
|
}
|
||||||
|
|
||||||
//is ther any cookies
|
//is ther any cookies
|
||||||
$this->kleeja_set_cookie('ulogu', '', time() - 31536000);//31536000 = year
|
$this->kleeja_set_cookie('ulogu', '', time() - 31536000);//31536000 = year
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -304,11 +268,6 @@ class usrcp
|
|||||||
//clean usernames
|
//clean usernames
|
||||||
public function cleanusername($uname)
|
public function cleanusername($uname)
|
||||||
{
|
{
|
||||||
if (! function_exists('kleeja_base64_decode'))
|
|
||||||
{
|
|
||||||
include_once PATH . 'includes/functions_alternative.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('cleanusername_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('cleanusername_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
static $arabic_t = [];
|
static $arabic_t = [];
|
||||||
@@ -320,9 +279,9 @@ class usrcp
|
|||||||
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(kleeja_base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' .
|
$arabic_t = unserialize(base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' .
|
||||||
'LIjtpOjU7czoyOiLZjCI7aTo2O3M6Mjoi2Y8iO2k6NztzOjI6ItmOIjtpOjg7czoyOiLZkCI7aTo5O3M6Mjoi2ZIiO2k6MTA7czoyOiLYoiI7aToxMTtzOjI6ItimIjt9aToxO' .
|
'LIjtpOjU7czoyOiLZjCI7aTo2O3M6Mjoi2Y8iO2k6NztzOjI6ItmOIjtpOjg7czoyOiLZkCI7aTo5O3M6Mjoi2ZIiO2k6MTA7czoyOiLYoiI7aToxMTtzOjI6ItimIjt9aToxO' .
|
||||||
'2E6MTI6e2k6MDtzOjI6ItinIjtpOjE7czoyOiLYpyI7aToyO3M6Mjoi2YgiO2k6MztzOjA6IiI7aTo0O3M6MDoiIjtpOjU7czowOiIiO2k6NjtzOjA6IiI7aTo3O3M6MDoiIjt' .
|
'2E6MTI6e2k6MDtzOjI6ItinIjtpOjE7czoyOiLYpyI7aToyO3M6Mjoi2YgiO2k6MztzOjA6IiI7aTo0O3M6MDoiIjtpOjU7czowOiIiO2k6NjtzOjA6IiI7aTo3O3M6MDoiIjt' .
|
||||||
'pOjg7czowOiIiO2k6OTtzOjA6IiI7aToxMDtzOjI6ItinIjtpOjExO3M6Mjoi2YkiO319'));
|
'pOjg7czowOiIiO2k6OTtzOjA6IiI7aToxMDtzOjI6ItinIjtpOjExO3M6Mjoi2YkiO319'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,20 +318,20 @@ class usrcp
|
|||||||
//when user add cookie_* in config this will replace the current ones
|
//when user add cookie_* in config this will replace the current ones
|
||||||
//
|
//
|
||||||
global $config_cookie_name, $config_cookie_domain, $config_cookie_secure, $config_cookie_path;
|
global $config_cookie_name, $config_cookie_domain, $config_cookie_secure, $config_cookie_path;
|
||||||
$config['cookie_name'] = isset($config_cookie_name) ? $config_cookie_name : $config['cookie_name'];
|
$config['cookie_name'] = isset($config_cookie_name) ? $config_cookie_name : $config['cookie_name'];
|
||||||
$config['cookie_domain'] = isset($config_cookie_domain) ? $config_cookie_domain : $config['cookie_domain'];
|
$config['cookie_domain'] = isset($config_cookie_domain) ? $config_cookie_domain : $config['cookie_domain'];
|
||||||
$config['cookie_secure'] = isset($config_cookie_secure) ? $config_cookie_secure : $config['cookie_secure'];
|
$config['cookie_secure'] = isset($config_cookie_secure) ? $config_cookie_secure : $config['cookie_secure'];
|
||||||
$config['cookie_path'] = isset($config_cookie_path) ? $config_cookie_path : $config['cookie_path'];
|
$config['cookie_path'] = isset($config_cookie_path) ? $config_cookie_path : $config['cookie_path'];
|
||||||
|
|
||||||
//
|
//
|
||||||
//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'] = '/';
|
||||||
$config['cookie_secure'] = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false;
|
$config['cookie_secure'] = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable sending of a P3P header
|
// Enable sending of a P3P header
|
||||||
@@ -382,7 +341,7 @@ class usrcp
|
|||||||
$rexpire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $expire);
|
$rexpire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $expire);
|
||||||
$domain = (! $config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];
|
$domain = (! $config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain'];
|
||||||
|
|
||||||
header('Set-Cookie: ' . $name_data . (($expire) ? '; expires=' . $rexpire : '') . '; path=' . $config['cookie_path'] . $domain . ((! $config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false);
|
header('Set-Cookie: ' . $name_data . ($expire ? '; expires=' . $rexpire : '') . '; path=' . $config['cookie_path'] . $domain . (! $config['cookie_secure'] ? '' : '; secure') . '; HttpOnly', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//encrypt and decrypt any data with our function
|
//encrypt and decrypt any data with our function
|
||||||
@@ -413,16 +372,16 @@ class usrcp
|
|||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
$data = str_replace('=', '_', kleeja_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);
|
||||||
$txtx = array_reverse($txtx, true);
|
$txtx = array_reverse($txtx, true);
|
||||||
$data = strtr($data, $txtx);
|
$data = strtr($data, $txtx);
|
||||||
$data = kleeja_base64_decode(str_replace('_', '=', $data));
|
$data = base64_decode(str_replace('_', '=', $data));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -442,18 +401,18 @@ class usrcp
|
|||||||
return isset($_COOKIE[$config['cookie_name'] . '_' . $name]) ? $_COOKIE[$config['cookie_name'] . '_' . $name] : false;
|
return isset($_COOKIE[$config['cookie_name'] . '_' . $name]) ? $_COOKIE[$config['cookie_name'] . '_' . $name] : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if user is admin or not
|
//check if user is admin or not
|
||||||
//return : mean return true or false, but if return is false will show msg
|
//return : mean return true or false, but if return is false will show msg
|
||||||
public function kleeja_check_user()
|
public function kleeja_check_user()
|
||||||
{
|
{
|
||||||
global $config, $SQL, $dbprefix, $userinfo;
|
global $config, $userinfo;
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_check_user_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('kleeja_check_user_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
//to make sure
|
//to make sure
|
||||||
$userinfo = [
|
$userinfo = [
|
||||||
'id' => -1,
|
'id' => -1,
|
||||||
'group_id' => 2,
|
'group_id' => 2,
|
||||||
];
|
];
|
||||||
|
|
||||||
//if login up
|
//if login up
|
||||||
@@ -463,12 +422,9 @@ class usrcp
|
|||||||
|
|
||||||
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()))
|
||||||
{
|
{
|
||||||
// For better performance we will take the risks
|
|
||||||
// !defined('IN_DOWNLOAD')
|
|
||||||
//exit(print_r( @explode('|', $this->en_de_crypt($this->kleeja_get_cookie('ulogu'), 2))));
|
|
||||||
if (user_can('enter_acp', $group_id))
|
if (user_can('enter_acp', $group_id))
|
||||||
{
|
{
|
||||||
$user_data = $this->data($user_id, $hashed_password, true, $expire_at);
|
$user_data = $this->data($user_id, $hashed_password, true, $expire_at);
|
||||||
@@ -477,7 +433,7 @@ class usrcp
|
|||||||
{
|
{
|
||||||
if (! empty($u_info))
|
if (! empty($u_info))
|
||||||
{
|
{
|
||||||
$userinfo = unserialize(kleeja_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;
|
||||||
|
|
||||||
@@ -509,139 +465,4 @@ class usrcp
|
|||||||
|
|
||||||
return false; //nothing
|
return false; //nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// convert from utf8 to cp1256 and vice versa
|
|
||||||
public function kleeja_utf8($str, $to_utf8 = true)
|
|
||||||
{
|
|
||||||
$utf8 = new kleeja_utf8;
|
|
||||||
|
|
||||||
if ($to_utf8)
|
|
||||||
{
|
|
||||||
//return iconv('CP1256', "UTF-8//IGNORE", $str);
|
|
||||||
return $utf8->to_utf8($str);
|
|
||||||
}
|
|
||||||
return $utf8->from_utf8($str);
|
|
||||||
//return iconv('UTF-8', "CP1256//IGNORE", $str);
|
|
||||||
}
|
|
||||||
}//end class
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deep modifieded by Kleeja team ...
|
|
||||||
* depend on class by Alexander Minkovsky (a_minkovsky@hotmail.com)
|
|
||||||
*/
|
|
||||||
class kleeja_utf8
|
|
||||||
{
|
|
||||||
public $ascMap = [];
|
|
||||||
public $utfMap = [];
|
|
||||||
//ignore the untranslated char, of you put true we will translate it to html tags
|
|
||||||
//it's same the action of //IGNORE in iconv
|
|
||||||
public $ignore = false;
|
|
||||||
|
|
||||||
//Constructor
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
static $lines = [];
|
|
||||||
|
|
||||||
if (empty($lines))
|
|
||||||
{
|
|
||||||
$lines = explode("\n", preg_replace(['/#.*$/m', "/\n\n/"], '', file_get_contents(PATH . 'includes/CP1256.MAP')));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($this->ascMap))
|
|
||||||
{
|
|
||||||
foreach ($lines as $line)
|
|
||||||
{
|
|
||||||
$parts = explode('0x', $line);
|
|
||||||
|
|
||||||
if (sizeof($parts) == 3)
|
|
||||||
{
|
|
||||||
$this->ascMap[hexdec(trim($parts[1]))] = hexdec(trim($parts[2]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->utfMap = array_flip($this->ascMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Translate string ($str) to UTF-8 from given charset
|
|
||||||
public function to_utf8($str)
|
|
||||||
{
|
|
||||||
$chars = unpack('C*', $str);
|
|
||||||
$cnt = sizeof($chars);
|
|
||||||
|
|
||||||
for ($i=1;$i <= $cnt; ++$i)
|
|
||||||
{
|
|
||||||
$this->_charToUtf8($chars[$i]);
|
|
||||||
}
|
|
||||||
return implode('', $chars);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Translate UTF-8 string to single byte string in the given charset
|
|
||||||
public function from_utf8($utf)
|
|
||||||
{
|
|
||||||
$chars = unpack('C*', $utf);
|
|
||||||
$cnt = sizeof($chars);
|
|
||||||
$res = ''; //No simple way to do it in place... concatenate char by char
|
|
||||||
for ($i=1;$i<=$cnt;$i++)
|
|
||||||
{
|
|
||||||
$res .= $this->_utf8ToChar($chars, $i);
|
|
||||||
}
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Char to UTF-8 sequence
|
|
||||||
public function _charToUtf8(&$char)
|
|
||||||
{
|
|
||||||
$c = (int) $this->ascMap[$char];
|
|
||||||
|
|
||||||
if ($c < 0x80)
|
|
||||||
{
|
|
||||||
$char = chr($c);
|
|
||||||
}
|
|
||||||
elseif ($c<0x800)
|
|
||||||
{ // 2 bytes
|
|
||||||
$char = (chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F));
|
|
||||||
}
|
|
||||||
elseif ($c<0x10000)
|
|
||||||
{ // 3 bytes
|
|
||||||
$char = (chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F));
|
|
||||||
}
|
|
||||||
elseif ($c<0x200000)
|
|
||||||
{ // 4 bytes
|
|
||||||
$char = (chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//UTF-8 sequence to single byte character
|
|
||||||
public function _utf8ToChar(&$chars, &$idx)
|
|
||||||
{
|
|
||||||
if (($chars[$idx] >= 240) && ($chars[$idx] <= 255))
|
|
||||||
{// 4 bytes
|
|
||||||
$utf = (intval($chars[$idx]-240) << 18) + (intval($chars[++$idx]-128) << 12) + (intval($chars[++$idx]-128) << 6) + (intval($chars[++$idx]-128) << 0);
|
|
||||||
}
|
|
||||||
elseif (($chars[$idx] >= 224) && ($chars[$idx] <= 239))
|
|
||||||
{ // 3 bytes
|
|
||||||
$utf = (intval($chars[$idx]-224) << 12) + (intval($chars[++$idx]-128) << 6) + (intval($chars[++$idx]-128) << 0);
|
|
||||||
}
|
|
||||||
elseif (($chars[$idx] >= 192) && ($chars[$idx] <= 223))
|
|
||||||
{// 2 bytes
|
|
||||||
$utf = (intval($chars[$idx]-192) << 6) + (intval($chars[++$idx]-128) << 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{// 1 byte
|
|
||||||
$utf = $chars[$idx];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (array_key_exists($utf, $this->utfMap))
|
|
||||||
{
|
|
||||||
return chr($this->utfMap[$utf]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return $this->ignore ? '' : '&#' . $utf . ';';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//<-- EOF
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if (! defined('IN_COMMON'))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
define('KLEEJA_VERSION', '3.0.2');
|
define('KLEEJA_VERSION', '3.1.0');
|
||||||
|
|
||||||
define('KLEEJA_DB_VERSION', '9');
|
define('KLEEJA_DB_VERSION', '9');
|
||||||
|
|
||||||
|
|||||||
32
index.php
32
index.php
@@ -58,11 +58,11 @@ $uploader->setAllowedFileExtensions($d_groups[$userinfo['group_id']]['exts']);
|
|||||||
$uploader->setUploadFieldsLimit($config['filesnum']);
|
$uploader->setUploadFieldsLimit($config['filesnum']);
|
||||||
|
|
||||||
|
|
||||||
$uploading_type = ip('submitr') ? 1 : (ip('submittxt') ? 2 : false);
|
|
||||||
|
|
||||||
if ($uploading_type)
|
|
||||||
|
if (ip('submitr'))
|
||||||
{
|
{
|
||||||
$uploader->upload($uploading_type);
|
$uploader->upload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -99,10 +99,10 @@ foreach ($uploader->getMessages() as $t => $s)
|
|||||||
|
|
||||||
|
|
||||||
//some words for template
|
//some words for template
|
||||||
$welcome_msg = $config['welcome_msg'];
|
$welcome_msg = $config['welcome_msg'];
|
||||||
$filecp_link = $usrcp->id() ? $config['siteurl'] . ($config['mod_writer'] ? 'filecp.html' : 'ucp.php?go=filecp') : false;
|
$filecp_link = $usrcp->id() ? $config['siteurl'] . ($config['mod_writer'] ? 'filecp.html' : 'ucp.php?go=filecp') : false;
|
||||||
$terms_msg = sprintf($lang['AGREE_RULES'], '<a href="' . ($config['mod_writer'] ? 'rules.html' : 'go.php?go=rules') . '">', '</a>');
|
$terms_msg = sprintf($lang['AGREE_RULES'], '<a href="' . ($config['mod_writer'] ? 'rules.html' : 'go.php?go=rules') . '">', '</a>');
|
||||||
$link_avater = sprintf($lang['EDIT_U_AVATER_LINK'], '<a href="https://www.gravatar.com/" target="_blank">', '</a>');
|
$link_avater = sprintf($lang['EDIT_U_AVATER_LINK'], '<a href="https://www.gravatar.com/" target="_blank">', '</a>');
|
||||||
|
|
||||||
|
|
||||||
$js_allowed_extensions_types = "['" . implode("', '", array_keys($d_groups[$userinfo['group_id']]['exts'])) . "']";
|
$js_allowed_extensions_types = "['" . implode("', '", array_keys($d_groups[$userinfo['group_id']]['exts'])) . "']";
|
||||||
@@ -118,23 +118,23 @@ $show_online = $config['allow_online'] == 1 ? true : false;
|
|||||||
|
|
||||||
if ($show_online)
|
if ($show_online)
|
||||||
{
|
{
|
||||||
$current_online_users = 0;
|
$current_online_users = 0;
|
||||||
$online_names = [];
|
$online_names = [];
|
||||||
$timeout = 60; //30 second
|
$timeout = 60; //30 second
|
||||||
$timeout2 = time()-$timeout;
|
$timeout2 = time()-$timeout;
|
||||||
|
|
||||||
//put another bot name
|
//put another bot name
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('anotherbots_online_index_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('anotherbots_online_index_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT' => 'u.name',
|
'SELECT' => 'u.name',
|
||||||
'FROM' => "{$dbprefix}users u",
|
'FROM' => "{$dbprefix}users u",
|
||||||
'WHERE' => "u.last_visit > $timeout2"
|
'WHERE' => "u.last_visit > $timeout2"
|
||||||
];
|
];
|
||||||
|
|
||||||
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_online_index_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
is_array($plugin_run_result = Plugins::getInstance()->run('qr_select_online_index_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||||
|
|
||||||
$result = $SQL->build($query);
|
$result = $SQL->build($query);
|
||||||
|
|
||||||
while ($row=$SQL->fetch_array($result))
|
while ($row=$SQL->fetch_array($result))
|
||||||
{
|
{
|
||||||
@@ -174,7 +174,7 @@ if ($show_online)
|
|||||||
update_config('most_user_online_ever', $current_online_users . ':' . time());
|
update_config('most_user_online_ever', $current_online_users . ':' . time());
|
||||||
}
|
}
|
||||||
|
|
||||||
$online_time = kleeja_date('d-m-Y h:i a', $online_time);
|
$online_time = kleeja_date($online_time, true, 'd-m-Y h:i a');
|
||||||
|
|
||||||
|
|
||||||
//before 1.8, styles computability
|
//before 1.8, styles computability
|
||||||
|
|||||||
@@ -49,14 +49,13 @@ $config_values[] = ['cookie_secure', ($cookie_data['cookie_secure'] ? '1' : '0')
|
|||||||
$config_values[] = ['total_size', '10000000000', '<input type=\"text\" id=\"total_size\" name=\"total_size\" value=\"{con.total_size}\" size=\"20\" style=\"direction:ltr\" />', 17, 'upload', 0, 0];
|
$config_values[] = ['total_size', '10000000000', '<input type=\"text\" id=\"total_size\" name=\"total_size\" value=\"{con.total_size}\" size=\"20\" style=\"direction:ltr\" />', 17, 'upload', 0, 0];
|
||||||
$config_values[] = ['foldername', 'uploads', '<input type=\"text\" id=\"foldername\" name=\"foldername\" value=\"{con.foldername}\" size=\"20\" style=\"direction:ltr\" />', 18, 'upload', 0, 0];
|
$config_values[] = ['foldername', 'uploads', '<input type=\"text\" id=\"foldername\" name=\"foldername\" value=\"{con.foldername}\" size=\"20\" style=\"direction:ltr\" />', 18, 'upload', 0, 0];
|
||||||
$config_values[] = ['prefixname', '', '<input type=\"text\" id=\"prefixname\" name=\"prefixname\" value=\"{con.prefixname}\" size=\"20\" style=\"direction:ltr\" />', 19, 'upload', 0, 0];
|
$config_values[] = ['prefixname', '', '<input type=\"text\" id=\"prefixname\" name=\"prefixname\" value=\"{con.prefixname}\" size=\"20\" style=\"direction:ltr\" />', 19, 'upload', 0, 0];
|
||||||
$config_values[] = ['decode', '1', '<select id=\"decode\" name=\"decode\">\r\n <option <IF NAME=\"con.decode==0\">selected=\"selected\"</IF> value=\"0\">{lang.NO_CHANGE}</option>\r\n <option <IF NAME=\"con.decode==2\">selected=\"selected\"</IF> value=\"2\">{lang.CHANGE_MD5}</option>\r\n <option <IF NAME=\"con.decode==1\">selected=\"selected\"</IF> value=\"1\">{lang.CHANGE_TIME}</option>\r\n <!-- another config decode options -->\r\n </select>', 20, 'upload', 0, 0];
|
$config_values[] = ['decode', '1', '<select id=\"decode\" name=\"decode\">\r\n <option <IF NAME=\"con.decode==0\">selected=\"selected\"</IF> value=\"0\">{lang.NO_CHANGE}</option>\r\n <option <IF NAME=\"con.decode==2\">selected=\"selected\"</IF> value=\"2\">{lang.CHANGE_MD5}</option>\r\n <option <IF NAME=\"con.decode==1\">selected=\"selected\"</IF> value=\"1\">{lang.CHANGE_TIME}</option>\r\n <!-- another config decode options -->\r\n </select>', 20, 'upload', 0, 0];
|
||||||
$config_values[] = ['id_form', $config_urls_type, '<select id=\"id_form\" name=\"id_form\">\r\n <option <IF NAME=\"con.id_form==id\">selected=\"selected\"</IF> value=\"id\">{lang.IDF}</option>\r\n <option <IF NAME=\"con.id_form==filename\">selected=\"selected\"</IF> value=\"filename\">{lang.IDFF}</option>\r\n<option <IF NAME=\"con.id_form==direct\">selected=\"selected\"</IF> value=\"direct\">{lang.IDFD}</option>\r\n </select>', 21, 'upload', 0, 0];
|
$config_values[] = ['id_form', $config_urls_type, '<select id=\"id_form\" name=\"id_form\">\r\n <option <IF NAME=\"con.id_form==id\">selected=\"selected\"</IF> value=\"id\">{lang.IDF}</option>\r\n <option <IF NAME=\"con.id_form==filename\">selected=\"selected\"</IF> value=\"filename\">{lang.IDFF}</option>\r\n<option <IF NAME=\"con.id_form==direct\">selected=\"selected\"</IF> value=\"direct\">{lang.IDFD}</option>\r\n </select>', 21, 'upload', 0, 0];
|
||||||
$config_values[] = ['id_form_img', $config_urls_type, '<select id=\"id_form_img\" name=\"id_form_img\">\r\n <option <IF NAME=\"con.id_form_img==id\">selected=\"selected\"</IF> value=\"id\">{lang.IDF_IMG}</option>\r\n <option <IF NAME=\"con.id_form_img==filename\">selected=\"selected\"</IF> value=\"filename\">{lang.IDFF_IMG}</option>\r\n<option <IF NAME=\"con.id_form_img==direct\">selected=\"selected\"</IF> value=\"direct\">{lang.IDFD_IMG}</option>\r\n </select>', 21, 'upload', 0, 0];
|
$config_values[] = ['id_form_img', $config_urls_type, '<select id=\"id_form_img\" name=\"id_form_img\">\r\n <option <IF NAME=\"con.id_form_img==id\">selected=\"selected\"</IF> value=\"id\">{lang.IDF_IMG}</option>\r\n <option <IF NAME=\"con.id_form_img==filename\">selected=\"selected\"</IF> value=\"filename\">{lang.IDFF_IMG}</option>\r\n<option <IF NAME=\"con.id_form_img==direct\">selected=\"selected\"</IF> value=\"direct\">{lang.IDFD_IMG}</option>\r\n </select>', 21, 'upload', 0, 0];
|
||||||
$config_values[] = ['filesnum', '3', '<input type=\"text\" id=\"filesnum\" name=\"filesnum\" value=\"{con.filesnum}\" size=\"6\" style=\"text-align:center\" />', 22, 'groups', 0, 0];
|
$config_values[] = ['filesnum', '3', '<input type=\"text\" id=\"filesnum\" name=\"filesnum\" value=\"{con.filesnum}\" size=\"6\" style=\"text-align:center\" />', 22, 'groups', 0, 0];
|
||||||
$config_values[] = ['sec_down', '5', '<input type=\"text\" id=\"sec_down\" name=\"sec_down\" value=\"{con.sec_down}\" size=\"6\" style=\"text-align:center\" />', 23, 'groups', 0, 0];
|
$config_values[] = ['sec_down', '5', '<input type=\"text\" id=\"sec_down\" name=\"sec_down\" value=\"{con.sec_down}\" size=\"6\" style=\"text-align:center\" />', 23, 'groups', 0, 0];
|
||||||
$config_values[] = ['del_url_file', '1', '<label>{lang.YES}<input type=\"radio\" id=\"del_url_file\" name=\"del_url_file\" value=\"1\" <IF NAME=\"con.del_url_file==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"del_url_file\" name=\"del_url_file\" value=\"0\" <IF NAME=\"con.del_url_file==0\"> checked=\"checked\"</IF> /></label>', 24, 'upload', 0, 0];
|
$config_values[] = ['del_url_file', '1', '<label>{lang.YES}<input type=\"radio\" id=\"del_url_file\" name=\"del_url_file\" value=\"1\" <IF NAME=\"con.del_url_file==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"del_url_file\" name=\"del_url_file\" value=\"0\" <IF NAME=\"con.del_url_file==0\"> checked=\"checked\"</IF> /></label>', 24, 'upload', 0, 0];
|
||||||
$config_values[] = ['safe_code', '0', '<label>{lang.YES}<input type=\"radio\" id=\"safe_code\" name=\"safe_code\" value=\"1\" <IF NAME=\"con.safe_code==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"safe_code\" name=\"safe_code\" value=\"0\" <IF NAME=\"con.safe_code==0\"> checked=\"checked\"</IF> /></label>', 25, 'upload', 0, 0];
|
$config_values[] = ['safe_code', '0', '<label>{lang.YES}<input type=\"radio\" id=\"safe_code\" name=\"safe_code\" value=\"1\" <IF NAME=\"con.safe_code==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"safe_code\" name=\"safe_code\" value=\"0\" <IF NAME=\"con.safe_code==0\"> checked=\"checked\"</IF> /></label>', 25, 'upload', 0, 0];
|
||||||
$config_values[] = ['www_url', '0', '<label>{lang.YES}<input type=\"radio\" id=\"www_url\" name=\"www_url\" value=\"1\" <IF NAME=\"con.www_url==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"www_url\" name=\"www_url\" value=\"0\" <IF NAME=\"con.www_url==0\"> checked=\"checked\"</IF> /></label>', 26, 'upload', 0, 0];
|
|
||||||
$config_values[] = ['thumbs_imgs', '1', '<input type=\"text\" id=\"thmb_dim_w\" name=\"thmb_dim_w\" value=\"{thmb_dim_w}\" size=\"2\" style=\"text-align:center\" /> * <input type=\"text\" id=\"thmb_dim_h\" name=\"thmb_dim_h\" value=\"{thmb_dim_h}\" size=\"2\" style=\"text-align:center\" /> ', 27, 'upload', 0, 0];
|
$config_values[] = ['thumbs_imgs', '1', '<input type=\"text\" id=\"thmb_dim_w\" name=\"thmb_dim_w\" value=\"{thmb_dim_w}\" size=\"2\" style=\"text-align:center\" /> * <input type=\"text\" id=\"thmb_dim_h\" name=\"thmb_dim_h\" value=\"{thmb_dim_h}\" size=\"2\" style=\"text-align:center\" /> ', 27, 'upload', 0, 0];
|
||||||
$config_values[] = ['write_imgs', '0' , '<label>{lang.YES}<input type=\"radio\" id=\"write_imgs\" name=\"write_imgs\" value=\"1\" <IF NAME=\"con.write_imgs==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"write_imgs\" name=\"write_imgs\" value=\"0\" <IF NAME=\"con.write_imgs==0\"> checked=\"checked\"</IF> /></label>\r\n <br /><img src=\"{STAMP_IMG_URL}\" alt=\"Seal photo\" style=\"margin-top:4px;border:1px groove #FF865E;\" />\r\n ', 28, 'groups', 0, 0];
|
$config_values[] = ['write_imgs', '0' , '<label>{lang.YES}<input type=\"radio\" id=\"write_imgs\" name=\"write_imgs\" value=\"1\" <IF NAME=\"con.write_imgs==1\"> checked=\"checked\"</IF> /></label>\r\n <label>{lang.NO}<input type=\"radio\" id=\"write_imgs\" name=\"write_imgs\" value=\"0\" <IF NAME=\"con.write_imgs==0\"> checked=\"checked\"</IF> /></label>\r\n <br /><img src=\"{STAMP_IMG_URL}\" alt=\"Seal photo\" style=\"margin-top:4px;border:1px groove #FF865E;\" />\r\n ', 28, 'groups', 0, 0];
|
||||||
$config_values[] = ['livexts', 'swf', '<input type=\"text\" id=\"livexts\" name=\"livexts\" value=\"{con.livexts}\" size=\"62\" style=\"direction:ltr\" />{lang.COMMA_X}', '29', 'upload', 0, 0];
|
$config_values[] = ['livexts', 'swf', '<input type=\"text\" id=\"livexts\" name=\"livexts\" value=\"{con.livexts}\" size=\"62\" style=\"direction:ltr\" />{lang.COMMA_X}', '29', 'upload', 0, 0];
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
require PATH . 'includes/version.php';
|
require PATH . 'includes/version.php';
|
||||||
|
|
||||||
//set mysql to show no errors
|
//set mysql to show no errors
|
||||||
define('MYSQL_NO_ERRORS', true);
|
define('SQL_NO_ERRORS', true);
|
||||||
define('EVAL_IS_ON', is_eval_is_on());
|
define('EVAL_IS_ON', is_eval_is_on());
|
||||||
|
|
||||||
|
|
||||||
@@ -46,8 +46,8 @@ function getlang ($link = false)
|
|||||||
|
|
||||||
if (ig('lang'))
|
if (ig('lang'))
|
||||||
{
|
{
|
||||||
$lang = preg_replace('/[^a-z0-9]/i', '', g('lang', 'str', 'en'));
|
$lang = preg_replace('/[^a-z0-9]/i', '', g('lang', 'str', 'en'));
|
||||||
$ln = file_exists(PATH . 'lang/' . $lang . '/install.php') ? $lang : 'en';
|
$ln = file_exists(PATH . 'lang/' . $lang . '/install.php') ? $lang : 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $link ? 'lang=' . $ln : $ln;
|
return $link ? 'lang=' . $ln : $ln;
|
||||||
@@ -114,18 +114,34 @@ function kleeja_eval($code)
|
|||||||
* @param mixed $nm
|
* @param mixed $nm
|
||||||
* @param mixed $prf
|
* @param mixed $prf
|
||||||
*/
|
*/
|
||||||
function do_config_export($srv, $usr, $pass, $nm, $prf)
|
function do_config_export($srv, $usr, $pass, $nm, $prf, $type = 'mysql')
|
||||||
{
|
{
|
||||||
$data = '<?php' . "\n\n" . '//fill these variables with your data' . "\n";
|
$data = '<?php' . "\n\n" . '//fill these variables with your data' . "\n";
|
||||||
$data .= '$dbserver = \'' . str_replace("'", "\'", $srv) . "'; //database server \n";
|
$data .= '//for more information about this file, visit: ' . "\n";
|
||||||
$data .= '$dbuser = \'' . str_replace("'", "\'", $usr) . "' ; // database user \n";
|
$data .= '//https://github.com/kleeja-official/kleeja/wiki/config.php-file' . "\n\n";
|
||||||
$data .= '$dbpass = \'' . str_replace("'", "\'", $pass) . "'; // database password \n";
|
|
||||||
$data .= '$dbname = \'' . str_replace("'", "\'", $nm) . "'; // database name \n";
|
|
||||||
$data .= '$dbprefix = \'' . str_replace("'", "\'", $prf) . "'; // if you use prefix for tables , fill it \n";
|
|
||||||
|
|
||||||
if (file_put_contents(PATH . 'config.php', $data, LOCK_EX) !== false)
|
if(!empty($type) && $type != 'mysql')
|
||||||
{
|
{
|
||||||
return true;
|
if ($type == 'sqlite' && strpos($nm, '.') === false)
|
||||||
|
{
|
||||||
|
$nm = $nm . '.db';
|
||||||
|
}
|
||||||
|
|
||||||
|
$data .= '$dbtype = \'' . str_replace("'", "\'", $type) . "'; //database type \n";
|
||||||
|
}
|
||||||
|
$data .= '$dbserver = \'' . str_replace("'", "\'", $srv) . "'; //database server \n";
|
||||||
|
$data .= '$dbuser = \'' . str_replace("'", "\'", $usr) . "' ; // database user \n";
|
||||||
|
$data .= '$dbpass = \'' . str_replace("'", "\'", $pass) . "'; // database password \n";
|
||||||
|
$data .= '$dbname = \'' . str_replace("'", "\'", $nm) . "'; // database name \n";
|
||||||
|
$data .= '$dbprefix = \'' . str_replace("'", "\'", $prf) . "'; // if you use prefix for tables , fill it \n";
|
||||||
|
|
||||||
|
|
||||||
|
if (is_writable(PATH))
|
||||||
|
{
|
||||||
|
if (@file_put_contents(PATH . 'config.php', $data, LOCK_EX) !== false)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined('CLI') && CLI)
|
if (defined('CLI') && CLI)
|
||||||
@@ -133,7 +149,6 @@ function do_config_export($srv, $usr, $pass, $nm, $prf)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
header('Content-Type: text/x-delimtext; name="config.php"');
|
header('Content-Type: text/x-delimtext; name="config.php"');
|
||||||
header('Content-disposition: attachment; filename=config.php');
|
header('Content-disposition: attachment; filename=config.php');
|
||||||
echo $data;
|
echo $data;
|
||||||
@@ -161,14 +176,19 @@ function inst_get_config($name)
|
|||||||
|
|
||||||
if (empty($SQL))
|
if (empty($SQL))
|
||||||
{
|
{
|
||||||
global $dbserver, $dbuser, $dbpass, $dbname;
|
global $dbserver, $dbuser, $dbpass, $dbname, $dbtype;
|
||||||
|
|
||||||
if (! isset($dbserver))
|
if (! isset($dbname))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
if(isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
@touch(PATH . $dbname);
|
||||||
|
}
|
||||||
|
|
||||||
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($SQL))
|
if (empty($SQL))
|
||||||
@@ -176,8 +196,8 @@ function inst_get_config($name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT value FROM `{$dbprefix}config` WHERE `name` = '" . $name . "'";
|
$sql = "SELECT value FROM `{$dbprefix}config` WHERE `name` = '" . $name . "'";
|
||||||
$result = $SQL->query($sql);
|
$result = $SQL->query($sql);
|
||||||
|
|
||||||
if ($SQL->num_rows($result) == 0)
|
if ($SQL->num_rows($result) == 0)
|
||||||
{
|
{
|
||||||
@@ -207,8 +227,8 @@ function get_cookies_settings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$cookie_secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? true : false;
|
$cookie_secure = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? true : false;
|
||||||
$cookie_name = 'klj_' . strtolower(substr(str_replace('0', 'z', base_convert(md5(mt_rand()), 16, 35)), 0, 5));
|
$cookie_name = 'klj_' . strtolower(substr(str_replace('0', 'z', base_convert(md5(mt_rand()), 16, 35)), 0, 5));
|
||||||
|
|
||||||
$name = (! empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
|
$name = (! empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
|
||||||
|
|
||||||
@@ -243,10 +263,10 @@ function get_cookies_settings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'server_name' => $server_name,
|
'server_name' => $server_name,
|
||||||
'cookie_secure' => $cookie_secure,
|
'cookie_secure' => $cookie_secure,
|
||||||
'cookie_name' => $cookie_name,
|
'cookie_name' => $cookie_name,
|
||||||
'cookie_domain' => $cookie_domain,
|
'cookie_domain' => $cookie_domain,
|
||||||
'cookie_path' => str_replace('/install', '', $script_path),
|
'cookie_path' => str_replace('/install', '', $script_path),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,26 +26,24 @@ ALTER DATABASE `{$dbname}` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin
|
|||||||
|
|
||||||
$install_sqls['call'] = "
|
$install_sqls['call'] = "
|
||||||
CREATE TABLE `{$dbprefix}call` (
|
CREATE TABLE `{$dbprefix}call` (
|
||||||
`id` int(10) NOT NULL auto_increment,
|
`id` int(10) NOT NULL auto_increment PRIMARY KEY,
|
||||||
`name` varchar(200) collate utf8_bin NOT NULL,
|
`name` varchar(200) collate utf8_bin NOT NULL,
|
||||||
`text` varchar(350) collate utf8_bin NOT NULL,
|
`text` varchar(350) collate utf8_bin NOT NULL,
|
||||||
`mail` varchar(350) collate utf8_bin NOT NULL,
|
`mail` varchar(350) collate utf8_bin NOT NULL,
|
||||||
`time` int(11) NOT NULL,
|
`time` int(11) NOT NULL,
|
||||||
`ip` varchar(40) collate utf8_bin NOT NULL,
|
`ip` varchar(40) collate utf8_bin NOT NULL
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
";
|
";
|
||||||
|
|
||||||
$install_sqls['reports'] = "
|
$install_sqls['reports'] = "
|
||||||
CREATE TABLE `{$dbprefix}reports` (
|
CREATE TABLE `{$dbprefix}reports` (
|
||||||
`id` int(10) NOT NULL auto_increment,
|
`id` int(10) NOT NULL auto_increment PRIMARY KEY,
|
||||||
`name` varchar(350) collate utf8_bin NOT NULL,
|
`name` varchar(350) collate utf8_bin NOT NULL,
|
||||||
`mail` varchar(350) collate utf8_bin NOT NULL,
|
`mail` varchar(350) collate utf8_bin NOT NULL,
|
||||||
`url` varchar(250) collate utf8_bin NOT NULL,
|
`url` varchar(250) collate utf8_bin NOT NULL,
|
||||||
`text` varchar(400) collate utf8_bin NOT NULL,
|
`text` varchar(400) collate utf8_bin NOT NULL,
|
||||||
`time` int(11) NOT NULL,
|
`time` int(11) NOT NULL,
|
||||||
`ip` varchar(40) collate utf8_bin NOT NULL,
|
`ip` varchar(40) collate utf8_bin NOT NULL
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
";
|
";
|
||||||
|
|
||||||
@@ -77,7 +75,7 @@ CREATE TABLE `{$dbprefix}stats` (
|
|||||||
|
|
||||||
$install_sqls['users'] = "
|
$install_sqls['users'] = "
|
||||||
CREATE TABLE `{$dbprefix}users` (
|
CREATE TABLE `{$dbprefix}users` (
|
||||||
`id` int(10) NOT NULL auto_increment,
|
`id` int(10) NOT NULL auto_increment PRIMARY KEY,
|
||||||
`name` varchar(300) collate utf8_bin NOT NULL,
|
`name` varchar(300) collate utf8_bin NOT NULL,
|
||||||
`group_id` int(11) unsigned NOT NULL DEFAULT '3',
|
`group_id` int(11) unsigned NOT NULL DEFAULT '3',
|
||||||
`password` varchar(200) collate utf8_bin NOT NULL,
|
`password` varchar(200) collate utf8_bin NOT NULL,
|
||||||
@@ -91,7 +89,6 @@ CREATE TABLE `{$dbprefix}users` (
|
|||||||
`show_my_filecp` tinyint(1) unsigned NOT NULL default '1',
|
`show_my_filecp` tinyint(1) unsigned NOT NULL default '1',
|
||||||
`new_password` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '',
|
`new_password` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
`hash_key` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '',
|
`hash_key` varchar(200) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `clean_name` (`clean_name`(300)),
|
KEY `clean_name` (`clean_name`(300)),
|
||||||
KEY `group_id` (`group_id`)
|
KEY `group_id` (`group_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
@@ -99,21 +96,20 @@ CREATE TABLE `{$dbprefix}users` (
|
|||||||
|
|
||||||
$install_sqls['files'] = "
|
$install_sqls['files'] = "
|
||||||
CREATE TABLE `{$dbprefix}files` (
|
CREATE TABLE `{$dbprefix}files` (
|
||||||
`id` int(11) unsigned NOT NULL auto_increment,
|
`id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
|
||||||
`last_down` int(11) unsigned NOT NULL DEFAULT '0',
|
`last_down` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`name` varchar(300) collate utf8_bin NOT NULL,
|
`name` varchar(300) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`real_filename` VARCHAR( 350 ) collate utf8_bin NOT NULL,
|
`real_filename` VARCHAR( 350 ) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`size` bigint(20) unsigned NOT NULL DEFAULT '0',
|
`size` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
`uploads` int(11) unsigned NOT NULL DEFAULT '0',
|
`uploads` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`time` int(11) unsigned NOT NULL,
|
`time` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`type` varchar(20) collate utf8_bin NOT NULL,
|
`type` varchar(20) collate utf8_bin NOT NULL,
|
||||||
`folder` varchar(100) collate utf8_bin NOT NULL,
|
`folder` varchar(100) collate utf8_bin NOT NULL,
|
||||||
`report` int(11) unsigned NOT NULL DEFAULT '0',
|
`report` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`user` int(11) NOT NULL default '-1',
|
`user` int(11) NOT NULL default '-1',
|
||||||
`code_del` varchar(150) collate utf8_bin NOT NULL,
|
`code_del` varchar(150) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`user_ip` VARCHAR( 250 ) NOT NULL,
|
`user_ip` VARCHAR( 250 ) NOT NULL DEFAULT '',
|
||||||
`id_form` VARCHAR( 100 ) NOT NULL,
|
`id_form` VARCHAR( 100 ) NOT NULL DEFAULT 'id',
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `name` (`name`(300)),
|
KEY `name` (`name`(300)),
|
||||||
KEY `user` (`user`),
|
KEY `user` (`user`),
|
||||||
KEY `code_del` (`code_del`(150)),
|
KEY `code_del` (`code_del`(150)),
|
||||||
@@ -127,39 +123,25 @@ CREATE TABLE `{$dbprefix}files` (
|
|||||||
|
|
||||||
$install_sqls['config'] = "
|
$install_sqls['config'] = "
|
||||||
CREATE TABLE `{$dbprefix}config` (
|
CREATE TABLE `{$dbprefix}config` (
|
||||||
`name` varchar(255) collate utf8_bin NOT NULL,
|
`name` varchar(255) collate utf8_bin NOT NULL PRIMARY KEY,
|
||||||
`value` varchar(255) collate utf8_bin NOT NULL,
|
`value` varchar(255) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`option` mediumtext collate utf8_bin NOT NULL,
|
`option` mediumtext collate utf8_bin NOT NULL,
|
||||||
`display_order` int(10) NOT NULL DEFAULT '1',
|
`display_order` int(10) NOT NULL DEFAULT '1',
|
||||||
`type` varchar(20) NULL DEFAULT 'other',
|
`type` varchar(20) NULL DEFAULT 'other',
|
||||||
`plg_id` int(11) NOT NULL DEFAULT '0',
|
`plg_id` int(11) NOT NULL DEFAULT '0',
|
||||||
`dynamic` tinyint(1) NOT NULL DEFAULT '0',
|
`dynamic` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`name`),
|
|
||||||
KEY `type` (`type`),
|
KEY `type` (`type`),
|
||||||
KEY `plg_id` (`plg_id`)
|
KEY `plg_id` (`plg_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $install_sqls['hooks'] = "
|
|
||||||
// CREATE TABLE `{$dbprefix}hooks` (
|
|
||||||
// `hook_id` int(11) unsigned NOT NULL auto_increment,
|
|
||||||
// `plg_id` int(11) unsigned NOT NULL,
|
|
||||||
// `hook_name` varchar(255) collate utf8_bin NOT NULL,
|
|
||||||
// `hook_content` mediumtext collate utf8_bin NOT NULL,
|
|
||||||
// PRIMARY KEY (`hook_id`),
|
|
||||||
// KEY `plg_id` (`plg_id`)
|
|
||||||
// ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
||||||
// ";
|
|
||||||
|
|
||||||
|
|
||||||
$install_sqls['plugins'] = "
|
$install_sqls['plugins'] = "
|
||||||
CREATE TABLE `{$dbprefix}plugins` (
|
CREATE TABLE `{$dbprefix}plugins` (
|
||||||
`plg_id` int(11) unsigned NOT NULL auto_increment,
|
`plg_id` int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
|
||||||
`plg_name` varchar(255) collate utf8_bin NOT NULL,
|
`plg_name` varchar(255) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`plg_ver` varchar(255) collate utf8_bin NOT NULL,
|
`plg_ver` varchar(255) collate utf8_bin NOT NULL,
|
||||||
`plg_author` varchar(255) collate utf8_bin NOT NULL,
|
`plg_author` varchar(255) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`plg_dsc` mediumtext COLLATE utf8_bin NOT NULL,
|
`plg_dsc` mediumtext COLLATE utf8_bin NOT NULL,
|
||||||
`plg_icon` blob NOT NULL,
|
`plg_icon` blob NOT NULL,
|
||||||
`plg_uninstall` mediumtext COLLATE utf8_bin NOT NULL,
|
`plg_uninstall` mediumtext COLLATE utf8_bin NOT NULL,
|
||||||
@@ -167,16 +149,15 @@ CREATE TABLE `{$dbprefix}plugins` (
|
|||||||
`plg_instructions` mediumtext COLLATE utf8_bin NOT NULL,
|
`plg_instructions` mediumtext COLLATE utf8_bin NOT NULL,
|
||||||
`plg_store` longtext COLLATE utf8_bin NOT NULL,
|
`plg_store` longtext COLLATE utf8_bin NOT NULL,
|
||||||
`plg_files` text COLLATE utf8_bin NOT NULL,
|
`plg_files` text COLLATE utf8_bin NOT NULL,
|
||||||
PRIMARY KEY (`plg_id`),
|
|
||||||
KEY `plg_name` (`plg_name`)
|
KEY `plg_name` (`plg_name`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ;
|
||||||
";
|
";
|
||||||
|
|
||||||
$install_sqls['lang'] = "
|
$install_sqls['lang'] = "
|
||||||
CREATE TABLE `{$dbprefix}lang` (
|
CREATE TABLE `{$dbprefix}lang` (
|
||||||
`word` varchar(255) collate utf8_bin NOT NULL,
|
`word` varchar(255) collate utf8_bin NOT NULL ,
|
||||||
`trans` varchar(255) collate utf8_bin NOT NULL,
|
`trans` varchar(255) collate utf8_bin NOT NULL DEFAULT '',
|
||||||
`lang_id` varchar(100) COLLATE utf8_bin NOT NULL,
|
`lang_id` varchar(100) COLLATE utf8_bin NOT NULL DEFAULT 'en',
|
||||||
`plg_id` int(11) unsigned NOT NULL DEFAULT '0',
|
`plg_id` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
KEY `lang_id` (`lang_id`),
|
KEY `lang_id` (`lang_id`),
|
||||||
KEY `plg_id` (`plg_id`),
|
KEY `plg_id` (`plg_id`),
|
||||||
@@ -186,11 +167,10 @@ CREATE TABLE `{$dbprefix}lang` (
|
|||||||
|
|
||||||
$install_sqls['groups'] = "
|
$install_sqls['groups'] = "
|
||||||
CREATE TABLE `{$dbprefix}groups` (
|
CREATE TABLE `{$dbprefix}groups` (
|
||||||
`group_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`group_id` int(11) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
`group_name` varchar(255) COLLATE utf8_bin NOT NULL,
|
`group_name` varchar(255) COLLATE utf8_bin NOT NULL,
|
||||||
`group_is_default` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
`group_is_default` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||||
`group_is_essential` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
`group_is_essential` tinyint(1) unsigned NOT NULL DEFAULT '0'
|
||||||
PRIMARY KEY (`group_id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
";
|
";
|
||||||
|
|
||||||
@@ -198,7 +178,7 @@ $install_sqls['groups_data'] = "
|
|||||||
CREATE TABLE `{$dbprefix}groups_data` (
|
CREATE TABLE `{$dbprefix}groups_data` (
|
||||||
`group_id` int(11) unsigned NOT NULL,
|
`group_id` int(11) unsigned NOT NULL,
|
||||||
`name` varchar(255) COLLATE utf8_bin NOT NULL,
|
`name` varchar(255) COLLATE utf8_bin NOT NULL,
|
||||||
`value` varchar(255) COLLATE utf8_bin NOT NULL,
|
`value` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
KEY `group_id` (`group_id`)
|
KEY `group_id` (`group_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
";
|
";
|
||||||
@@ -214,25 +194,23 @@ CREATE TABLE `{$dbprefix}groups_acl` (
|
|||||||
|
|
||||||
$install_sqls['groups_exts'] = "
|
$install_sqls['groups_exts'] = "
|
||||||
CREATE TABLE `{$dbprefix}groups_exts` (
|
CREATE TABLE `{$dbprefix}groups_exts` (
|
||||||
`ext_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`ext_id` int(11) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
`ext` varchar(20) COLLATE utf8_bin NOT NULL,
|
`ext` varchar(20) COLLATE utf8_bin NOT NULL,
|
||||||
`group_id` int(11) unsigned NOT NULL DEFAULT '0',
|
`group_id` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`size` bigint(11) unsigned NOT NULL DEFAULT '0',
|
`size` bigint(11) unsigned NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`ext_id`),
|
|
||||||
KEY `group_id` (`group_id`)
|
KEY `group_id` (`group_id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;
|
||||||
";
|
";
|
||||||
|
|
||||||
$install_sqls['filters'] = "
|
$install_sqls['filters'] = "
|
||||||
CREATE TABLE `{$dbprefix}filters` (
|
CREATE TABLE `{$dbprefix}filters` (
|
||||||
`filter_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`filter_id` int(11) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
`filter_uid` varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '',
|
`filter_uid` varchar(30) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
`filter_type` varchar(20) COLLATE utf8_bin NOT NULL,
|
`filter_type` varchar(20) COLLATE utf8_bin NOT NULL,
|
||||||
`filter_value` varchar(255) COLLATE utf8_bin NOT NULL,
|
`filter_value` varchar(255) COLLATE utf8_bin NOT NULL,
|
||||||
`filter_time` int(11) unsigned NOT NULL DEFAULT '0',
|
`filter_time` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`filter_user` int(11) unsigned NOT NULL DEFAULT '0',
|
`filter_user` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
`filter_status` varchar(50) COLLATE utf8_bin NOT NULL DEFAULT '',
|
`filter_status` varchar(50) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
PRIMARY KEY (`filter_id`),
|
|
||||||
KEY `filter_user` (`filter_user`),
|
KEY `filter_user` (`filter_user`),
|
||||||
KEY `filter_uid` (`filter_uid`)
|
KEY `filter_uid` (`filter_uid`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;
|
||||||
|
|||||||
@@ -48,7 +48,15 @@ if (file_exists(PATH . 'config.php'))
|
|||||||
|
|
||||||
include_once PATH . 'includes/functions.php';
|
include_once PATH . 'includes/functions.php';
|
||||||
|
|
||||||
include_once PATH . 'includes/mysqli.php';
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
include PATH . 'includes/sqlite.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include PATH . 'includes/mysqli.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
include_once 'includes/functions_install.php';
|
include_once 'includes/functions_install.php';
|
||||||
|
|
||||||
@@ -96,7 +104,7 @@ break;
|
|||||||
|
|
||||||
case 'choose' :
|
case 'choose' :
|
||||||
|
|
||||||
$install_or_no = $php_ver = true;
|
$install_or_no = $php_ver = true;
|
||||||
|
|
||||||
//check version of PHP
|
//check version of PHP
|
||||||
if (! function_exists('version_compare')
|
if (! function_exists('version_compare')
|
||||||
|
|||||||
@@ -30,7 +30,14 @@ include_once PATH . 'includes/functions_alternative.php';
|
|||||||
include_once PATH . 'includes/functions.php';
|
include_once PATH . 'includes/functions.php';
|
||||||
|
|
||||||
|
|
||||||
include_once PATH . 'includes/mysqli.php';
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
include PATH . 'includes/sqlite.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include PATH . 'includes/mysqli.php';
|
||||||
|
}
|
||||||
|
|
||||||
include_once 'includes/functions_install.php';
|
include_once 'includes/functions_install.php';
|
||||||
|
|
||||||
@@ -101,7 +108,7 @@ 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;
|
$ziparchive_lib = true;
|
||||||
}
|
}
|
||||||
@@ -121,12 +128,11 @@ case 'c':
|
|||||||
if (ip('dbsubmit'))
|
if (ip('dbsubmit'))
|
||||||
{
|
{
|
||||||
//create config file, or export it to browser on failure
|
//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'));
|
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;
|
||||||
$no_config = ! file_exists(PATH . 'config.php') || ig('force') ? false : true;
|
$writeable_path = is_writable(PATH) ? true : false;
|
||||||
$writeable_path = is_writable(PATH) ? true : false;
|
|
||||||
|
|
||||||
echo gettpl('configs.html');
|
echo gettpl('configs.html');
|
||||||
|
|
||||||
@@ -137,10 +143,15 @@ case 'check':
|
|||||||
$submit_disabled = $no_connection = $mysql_ver = false;
|
$submit_disabled = $no_connection = $mysql_ver = false;
|
||||||
|
|
||||||
//config.php
|
//config.php
|
||||||
if (! empty($dbname) && ! empty($dbuser))
|
if (! empty($dbname))
|
||||||
{
|
{
|
||||||
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
@touch(PATH . $dbname);
|
||||||
|
}
|
||||||
|
|
||||||
//connect .. for check
|
//connect .. for check
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
|
|
||||||
|
|
||||||
if (! $SQL->is_connected())
|
if (! $SQL->is_connected())
|
||||||
@@ -149,9 +160,12 @@ case 'check':
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (! empty($SQL->mysql_version()) && version_compare($SQL->mysql_version(), MIN_MYSQL_VERSION, '<'))
|
if (defined('SQL_LAYER') && SQL_LAYER == 'mysqli')
|
||||||
{
|
{
|
||||||
$mysql_ver = $SQL->mysql_version();
|
if (! empty($SQL->version()) && version_compare($SQL->version(), MIN_MYSQL_VERSION, '<'))
|
||||||
|
{
|
||||||
|
$mysql_ver = $SQL->version();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,11 +188,9 @@ case 'data' :
|
|||||||
|
|
||||||
if (ip('datasubmit'))
|
if (ip('datasubmit'))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//check data ...
|
//check data ...
|
||||||
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('sitemail'))
|
if (empty(p('sitename')) || empty(p('siteurl')) || empty(p('sitemail'))
|
||||||
|| empty(p('username')) || empty(p('password')) || empty(p('password2')) || empty(p('email')) )
|
|| empty(p('username')) || empty(p('password')) || empty(p('password2')) || empty(p('email')))
|
||||||
{
|
{
|
||||||
echo $lang['EMPTY_FIELDS'];
|
echo $lang['EMPTY_FIELDS'];
|
||||||
echo $footer_inst;
|
echo $footer_inst;
|
||||||
@@ -204,23 +216,23 @@ case 'data' :
|
|||||||
}
|
}
|
||||||
|
|
||||||
//connect .. for check
|
//connect .. for check
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
|
|
||||||
include_once PATH . 'includes/usr.php';
|
include_once PATH . 'includes/usr.php';
|
||||||
include_once PATH . 'includes/functions_alternative.php';
|
include_once PATH . 'includes/functions_alternative.php';
|
||||||
$usrcp = new usrcp;
|
$usrcp = new usrcp;
|
||||||
|
|
||||||
$user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
$user_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||||
$user_pass = $usrcp->kleeja_hash_password(p('password') . $user_salt);
|
$user_pass = $usrcp->kleeja_hash_password(p('password') . $user_salt);
|
||||||
$user_name = $SQL->escape(p('username'));
|
$user_name = $SQL->escape(p('username'));
|
||||||
$user_mail = $SQL->escape(p('email'));
|
$user_mail = $SQL->escape(p('email'));
|
||||||
$config_sitename = $SQL->escape(p('sitename'));
|
$config_sitename = $SQL->escape(p('sitename'));
|
||||||
$config_siteurl = $SQL->escape(p('siteurl'));
|
$config_siteurl = $SQL->escape(p('siteurl'));
|
||||||
$config_sitemail = $SQL->escape(p('sitemail'));
|
$config_sitemail = $SQL->escape(p('sitemail'));
|
||||||
$config_time_zone = $SQL->escape(p('time_zone'));
|
$config_time_zone = $SQL->escape(p('time_zone'));
|
||||||
//$config_style = ip('style') ? $SQL->escape(p('style')) : '';
|
//$config_style = ip('style') ? $SQL->escape(p('style')) : '';
|
||||||
$config_urls_type = in_array(p('urls_type'), ['id', 'filename', 'direct']) ? p('urls_type') : 'id';
|
$config_urls_type = in_array(p('urls_type'), ['id', 'filename', 'direct']) ? p('urls_type') : 'id';
|
||||||
$clean_name = $usrcp->cleanusername($SQL->escape($user_name));
|
$clean_name = $usrcp->cleanusername($SQL->escape($user_name));
|
||||||
|
|
||||||
/// ok .. we will get sqls now ..
|
/// ok .. we will get sqls now ..
|
||||||
include 'includes/install_sqls.php';
|
include 'includes/install_sqls.php';
|
||||||
|
|||||||
@@ -25,7 +25,15 @@ include_once PATH . 'includes/plugins.php';
|
|||||||
include_once PATH . 'includes/functions_display.php';
|
include_once PATH . 'includes/functions_display.php';
|
||||||
include_once PATH . 'includes/functions_alternative.php';
|
include_once PATH . 'includes/functions_alternative.php';
|
||||||
include_once PATH . 'includes/functions.php';
|
include_once PATH . 'includes/functions.php';
|
||||||
include_once PATH . 'includes/mysqli.php';
|
|
||||||
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
include PATH . 'includes/sqlite.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include PATH . 'includes/mysqli.php';
|
||||||
|
}
|
||||||
|
|
||||||
include_once 'includes/functions_install.php';
|
include_once 'includes/functions_install.php';
|
||||||
|
|
||||||
@@ -49,16 +57,20 @@ else
|
|||||||
exit('`config.php` was missing! so we created one for you, kindly edit the file with database information.');
|
exit('`config.php` was missing! so we created one for you, kindly edit the file with database information.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
|
|
||||||
if (! $SQL->is_connected())
|
if (! $SQL->is_connected())
|
||||||
{
|
{
|
||||||
exit('Can not connect to database, please make sure the data in `config.php` is correct!');
|
exit('Can not connect to database, please make sure the data in `config.php` is correct!');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($SQL->mysql_version()) && version_compare($SQL->mysql_version(), MIN_MYSQL_VERSION, '<'))
|
|
||||||
|
if (defined('SQL_LAYER') && SQL_LAYER == 'mysqli')
|
||||||
{
|
{
|
||||||
exit('The required MySQL version is `' . MIN_MYSQL_VERSION . '` and yours is `' . $SQL->mysql_version() . '`!');
|
if (! empty($SQL->version()) && version_compare($SQL->version(), MIN_MYSQL_VERSION, '<'))
|
||||||
|
{
|
||||||
|
exit('The required MySQL version is `' . MIN_MYSQL_VERSION . '` and yours is `' . $SQL->version() . '`!');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (['cache', 'uploads', 'uploads/thumbs'] as $folder)
|
foreach (['cache', 'uploads', 'uploads/thumbs'] as $folder)
|
||||||
@@ -76,14 +88,14 @@ foreach (['cache', 'uploads', 'uploads/thumbs'] as $folder)
|
|||||||
|
|
||||||
|
|
||||||
//install
|
//install
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
|
|
||||||
include_once PATH . 'includes/usr.php';
|
include_once PATH . 'includes/usr.php';
|
||||||
include_once PATH . 'includes/functions_alternative.php';
|
include_once PATH . 'includes/functions_alternative.php';
|
||||||
|
|
||||||
$usrcp = new usrcp;
|
$usrcp = new usrcp;
|
||||||
$password = ! empty($cli_options['password']) ? $cli_options['password'] : mt_rand();
|
$password = ! empty($cli_options['password']) ? $cli_options['password'] : mt_rand();
|
||||||
$user_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
$user_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||||
$user_pass = $usrcp->kleeja_hash_password($password . $user_salt);
|
$user_pass = $usrcp->kleeja_hash_password($password . $user_salt);
|
||||||
$user_name = $clean_name = 'admin';
|
$user_name = $clean_name = 'admin';
|
||||||
$user_mail = $config_sitemail = 'admin@example.com';
|
$user_mail = $config_sitemail = 'admin@example.com';
|
||||||
|
|||||||
@@ -1,82 +1,82 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
<h2><img src="style/images/k_info.png" class="img" alt=" " /> {{echo $lang['FUNCTIONS_CHECK']}} :</h2>
|
<h2><img src="style/images/k_info.png" class="img" alt=" " /> {{echo $lang['FUNCTIONS_CHECK']}} :</h2>
|
||||||
<ul class="F_Check">
|
<ul class="F_Check">
|
||||||
{{if(function_exists('unlink')):}}
|
{{if(function_exists('unlink')):}}
|
||||||
<li class="YesCheck">
|
<li class="YesCheck">
|
||||||
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'unlink')}}</h3>
|
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'unlink')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_UNLINK']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_UNLINK']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{else: $GLOBALS['check_ok'] = false;}}
|
{{else: $GLOBALS['check_ok'] = false;}}
|
||||||
<li class="NoCheck">
|
<li class="NoCheck">
|
||||||
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'unlink')}}</h3>
|
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'unlink')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_UNLINK']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_UNLINK']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
{{if(function_exists('imagecreatetruecolor')):}}
|
{{if(function_exists('imagecreatetruecolor')):}}
|
||||||
<li class="YesCheck">
|
<li class="YesCheck">
|
||||||
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'imagecreatetruecolor')}}</h3>
|
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'imagecreatetruecolor')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_GD']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_GD']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{else: $GLOBALS['check_ok'] = false;}}
|
{{else: $GLOBALS['check_ok'] = false;}}
|
||||||
<li class="NoCheck">
|
<li class="NoCheck">
|
||||||
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'imagecreatetruecolor')}}</h3>
|
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'imagecreatetruecolor')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_GD']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_GD']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
{{if(function_exists('fopen')):}}
|
{{if(function_exists('fopen')):}}
|
||||||
<li class="YesCheck">
|
<li class="YesCheck">
|
||||||
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'fopen')}}</h3>
|
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'fopen')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_FOPEN']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_FOPEN']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{else: $GLOBALS['check_ok'] = false;}}
|
{{else: $GLOBALS['check_ok'] = false;}}
|
||||||
<li class="NoCheck">
|
<li class="NoCheck">
|
||||||
<h3><img src="style/images/error.png" alt="" class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'fopen')}}></h3>
|
<h3><img src="style/images/error.png" alt="" class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'fopen')}}></h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_FOPEN']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_FOPEN']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
{{if(function_exists('move_uploaded_file')):}}
|
{{if(function_exists('move_uploaded_file')):}}
|
||||||
<li class="YesCheck">
|
<li class="YesCheck">
|
||||||
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'move_uploaded_file')}}</h3>
|
<h3><img src="style/images/ok.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_EXISTS'], 'move_uploaded_file')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_MUF']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_MUF']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{else: $GLOBALS['check_ok'] = false;}}
|
{{else: $GLOBALS['check_ok'] = false;}}
|
||||||
<li class="NoCheck">
|
<li class="NoCheck">
|
||||||
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'move_uploaded_file')}}</h3>
|
<h3><img src="style/images/error.png" alt=" " class="img" /> {{echo sprintf($lang['FUNCTION_IS_NOT_EXISTS'], 'move_uploaded_file')}}</h3>
|
||||||
<p>[ {{echo $lang['FUNCTION_DISC_MUF']}} ]</p>
|
<p>[ {{echo $lang['FUNCTION_DISC_MUF']}} ]</p>
|
||||||
</li>
|
</li>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
|
|
||||||
{{if($GLOBALS['advices']):}}
|
{{if($GLOBALS['advices']):}}
|
||||||
<h2 style="font-size:100%;"><img src="style/images/k_info.png" class="img" alt=" " /> {{echo $lang['ADVICES_CHECK']}} :</h2>
|
<h2 style="font-size:100%;"><img src="style/images/k_info.png" class="img" alt=" " /> {{echo $lang['ADVICES_CHECK']}} :</h2>
|
||||||
<ul class="F_Check">
|
<ul class="F_Check">
|
||||||
{{if($GLOBALS['ziparchive_lib']):}}
|
{{if($GLOBALS['ziparchive_lib']):}}
|
||||||
<li class="NoCheck"><p style="text-indent:0;"><img src="style/images/surprised.png" alt=" " class="img" />{{echo $lang['ZIPARCHIVE_LIB']}}</p></li>
|
<li class="NoCheck"><p style="text-indent:0;"><img src="style/images/surprised.png" alt=" " class="img" />{{echo $lang['ZIPARCHIVE_LIB']}}</p></li>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
{{if($GLOBALS['check_ok']):}}
|
{{if($GLOBALS['check_ok']):}}
|
||||||
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<form method="post" action="{{echo './install.php?step=f&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=f&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['RE_CHECK']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['RE_CHECK']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,60 +1,67 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
{{if(empty($GLOBALS['dbname']) || empty($GLOBALS['dbuser'])): $GLOBALS['submit_disabled'] = true;}}
|
{{if(empty($GLOBALS['dbname'])): $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo $lang['INST_CHANG_CONFIG']}}</p>
|
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo $lang['INST_CHANG_CONFIG']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{if($GLOBALS['no_connection']): $GLOBALS['submit_disabled'] = true;}}
|
{{if($GLOBALS['no_connection']): $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo $lang['INST_CONNCET_ERR']}}</p>
|
<p class="error2">
|
||||||
</div>
|
<img src="style/images/k_info.png" class="img" alt=" " />
|
||||||
{{endif}}
|
{{echo $lang['INST_CONNCET_ERR']}}
|
||||||
|
{{if(! empty($GLOBALS['dbtype']) && $GLOBALS['dbtype'] == 'sqlite'):}}
|
||||||
|
<br>
|
||||||
|
{{echo sprintf($lang['INST_CONNCET_ERR_SQLITE'], $GLOBALS['dbname']);}}
|
||||||
|
{{endif;}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{{endif}}
|
||||||
|
|
||||||
{{if($GLOBALS['mysql_ver']): $GLOBALS['submit_disabled'] = true;}}
|
{{if($GLOBALS['mysql_ver']): $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo sprintf($lang['INST_MYSQL_LESSMIN'], MIN_MYSQL_VERSION, $GLOBALS['mysql_ver'])}}</p>
|
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />{{echo sprintf($lang['INST_MYSQL_LESSMIN'], MIN_MYSQL_VERSION, $GLOBALS['mysql_ver'])}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
{{if(!is_writable(PATH . 'cache')) : $GLOBALS['submit_disabled'] = true;}}
|
{{if(!is_writable(PATH . 'cache')) : $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ cache ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ cache ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
{{if(!is_writable(PATH . 'uploads')) : $GLOBALS['submit_disabled'] = true;}}
|
{{if(!is_writable(PATH . 'uploads')) : $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ uploads ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ uploads ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
{{if(!is_writable(PATH . 'uploads/thumbs')) : $GLOBALS['submit_disabled'] = true;}}
|
{{if(!is_writable(PATH . 'uploads/thumbs')) : $GLOBALS['submit_disabled'] = true;}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ uploads/thumbs ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
<p class="error2"><img src="style/images/k_info.png" class="img" alt=" " />[ uploads/thumbs ] : {{echo $lang['INST_NO_WRTABLE']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
{{if(!$GLOBALS['submit_disabled']):}}
|
{{if(!$GLOBALS['submit_disabled']):}}
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<img src="style/images/good.png" alt="" />
|
<img src="style/images/good.png" alt="" />
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<h2 class="h2">[ {{echo $lang['INST_GOOD_GO']}} ]</h2>
|
<h2 class="h2">[ {{echo $lang['INST_GOOD_GO']}} ]</h2>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<form method="post" action="{{echo './install.php?step=data&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=data&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./install.php?step=c&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=c&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<form method="post" action="{{echo './install.php?step=check&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=check&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./install.php?step=c&force=1&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=c&force=1&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['RE_CHECK']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['RE_CHECK']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{endif}}
|
{{endif}}
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
{{if(!$GLOBALS['php_ver']):}}
|
{{if(!$GLOBALS['php_ver']):}}
|
||||||
<div class="Failure">
|
<div class="Failure">
|
||||||
<img src="style/images/official_no.png" class="img" alt="?" /><br /><br />
|
<img src="style/images/official_no.png" class="img" alt="?" /><br /><br />
|
||||||
<h2>{{echo sprintf($lang['INST_PHP_LESSMIN'], MIN_PHP_VERSION, PHP_VERSION)}}</h2>
|
<h2>{{echo sprintf($lang['INST_PHP_LESSMIN'], MIN_PHP_VERSION, PHP_VERSION)}}</h2>
|
||||||
</div>
|
</div>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
{{if($GLOBALS['install_or_no']):}}
|
{{if($GLOBALS['install_or_no']):}}
|
||||||
<div class="InstallUpdate" onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';">
|
<div class="InstallUpdate" onclick="window.location.href='./install.php?step=license&{{echo getlang(1)}}';">
|
||||||
<img src="style/images/Installer.png" alt="Install Kleeja" /><br />
|
<img src="style/images/Installer.png" alt="Install Kleeja" /><br />
|
||||||
<h2>{{echo $lang['INST_INSTALL_CLEAN_VER']}}</h2>
|
<h2>{{echo $lang['INST_INSTALL_CLEAN_VER']}}</h2>
|
||||||
</div>
|
</div>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<div class="InstallUpdate" onclick="window.location.href='./update.php?{{echo getlang(1)}}';">
|
<div class="InstallUpdate" onclick="window.location.href='./update.php?{{echo getlang(1)}}';">
|
||||||
<img src="style/images/update.png" alt="update Kleeja" /><br />
|
<img src="style/images/update.png" alt="update Kleeja" /><br />
|
||||||
<h2>{{echo $lang['INST_UPDATE_P_VER']}}</h2>
|
<h2>{{echo $lang['INST_UPDATE_P_VER']}}</h2>
|
||||||
</div>
|
</div>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
@@ -2,71 +2,81 @@
|
|||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
{{if(!$GLOBALS['no_config']):}}
|
{{if(!$GLOBALS['no_config']):}}
|
||||||
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}" onsubmit="javascript:return formCheck(this, Array('db_server','db_user' ,'db_name'));">
|
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}">
|
||||||
<h2><img src="style/images/klj_info.png" class="img" alt="!" />{{echo $lang['DB_INFO']}}</h2>
|
<h2><img src="style/images/klj_info.png" class="img" alt="!" />{{echo $lang['DB_INFO']}}</h2>
|
||||||
<table class="TableConf" dir="{{echo $lang['DIR']}}">
|
<table class="TableConf" dir="{{echo $lang['DIR']}}">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="TdConf">{{echo $lang['DB_SERVER']}}</td>
|
<td class="TdConf">{{echo $lang['DB_TYPE']}}</td>
|
||||||
<td class="TdInput"><input name="db_server" type="text" value="localhost" class="InputConf" /></td>
|
<td class="TdInput">
|
||||||
</tr>
|
<select name="db_type" id="db_type" style="text-align:left;direction:ltr">
|
||||||
<tr>
|
<option value="mysql" selected>{{echo $lang['DB_TYPE_MYSQL']}}</option>
|
||||||
<td class="TdConf">{{echo $lang['DB_NAME']}}</td>
|
<option value="sqlite">{{echo $lang['DB_TYPE_SQLITE']}}</option>
|
||||||
<td class="TdInput"><input name="db_name" type="text" class="InputConf" /></td>
|
</select>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="TdConf">{{echo $lang['DB_USER']}}</td>
|
<tr>
|
||||||
<td class="TdInput"><input name="db_user" type="text" class="InputConf" /></td>
|
<td class="TdConf">{{echo $lang['DB_SERVER']}}</td>
|
||||||
</tr>
|
<td class="TdInput"><input name="db_server" id="db_server" type="text" value="localhost" class="InputConf" /></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="TdConf">{{echo $lang['DB_PASSWORD']}}</td>
|
<tr>
|
||||||
<td class="TdInput"><input name="db_pass" type="text" class="InputConf" /></td>
|
<td class="TdConf">{{echo $lang['DB_NAME']}}</td>
|
||||||
</tr>
|
<td class="TdInput"><input name="db_name" id="db_name" type="text" value="kleeja" class="InputConf" /></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="TdConf">{{echo $lang['DB_PREFIX']}}</td>
|
<tr>
|
||||||
<td class="TdInput"><input name="db_prefix" type="text" value="klj_" class="InputConf" /></td>
|
<td class="TdConf">{{echo $lang['DB_USER']}}</td>
|
||||||
</tr>
|
<td class="TdInput"><input name="db_user" id="db_user" type="text" class="InputConf" /></td>
|
||||||
</table>
|
</tr>
|
||||||
<div class="clr"></div>
|
<tr>
|
||||||
|
<td class="TdConf">{{echo $lang['DB_PASSWORD']}}</td>
|
||||||
|
<td class="TdInput"><input name="db_pass" id="db_pass" type="text" class="InputConf" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="TdConf">{{echo $lang['DB_PREFIX']}}</td>
|
||||||
|
<td class="TdInput"><input name="db_prefix" id="db_prefix" type="text" value="klj_" class="InputConf" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="clr"></div>
|
||||||
|
|
||||||
{{if(!$GLOBALS['writeable_path']):}}
|
{{if(!$GLOBALS['writeable_path']):}}
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="justify"><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['DB_INFO_NW']}}</p>
|
<p class="justify"><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['DB_INFO_NW']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<center>
|
<center>
|
||||||
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="dbsubmit" type="submit" class="btn"><span>{{echo $GLOBALS['writeable_path'] ? $lang['INST_NEXT'] : $lang['INST_EXPORT']}} »</span></button>
|
<button name="dbsubmit" type="submit" class="btn"><span>{{echo $GLOBALS['writeable_path'] ? $lang['INST_NEXT'] : $lang['INST_EXPORT']}} »</span></button>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{{if(!$GLOBALS['writeable_path']):}}
|
{{if(!$GLOBALS['writeable_path']):}}
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<img src="style/images/up_c.png" alt="Upload Config" />
|
<img src="style/images/up_c.png" alt="Upload Config" />
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<h2 class="h2">{{echo $lang['INST_SUBMIT_CONFIGOK']}}</h2>
|
<h2 class="h2">{{echo $lang['INST_SUBMIT_CONFIGOK']}}</h2>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=c&' . getlang(1)}}">
|
||||||
<center>
|
<center>
|
||||||
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button type="submit" name="agres" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button type="submit" name="agres" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</center>
|
</center>
|
||||||
</form>
|
</form>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<img src="style/images/check_conf.png" alt=" " />
|
<img src="style/images/check_conf.png" alt=" " />
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
<h2 class="h2">{{echo $lang['CONFIG_EXISTS']}}</h2>
|
<h2 class="h2">{{echo $lang['CONFIG_EXISTS']}}</h2>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<form method="post" action="{{echo $_SERVER['PHP_SELF'] . '?step=check&' . getlang(1)}}">
|
<form method="post" action="{{echo $_SERVER['PHP_SELF'] . '?step=check&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=f&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button type="submit" name="agres" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button type="submit" name="agres" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,87 +1,87 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
<form method="post" action="{{echo './install.php?step=data&' . getlang(1)}}" onsubmit="javascript:return formCheck(this, Array('sitename','siteurl','sitemail' ,'username', 'password','email' ));">
|
<form method="post" action="{{echo './install.php?step=data&' . getlang(1)}}" onsubmit="javascript:return formCheck(this, Array('sitename','siteurl','sitemail' ,'username', 'password','email' ));">
|
||||||
<h2><img src="style/images/s-home.png" alt="" class="img" />{{echo $lang['INST_SITE_INFO']}}</h2>
|
<h2><img src="style/images/s-home.png" alt="" class="img" />{{echo $lang['INST_SITE_INFO']}}</h2>
|
||||||
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['SITENAME']}}</td>
|
<td class="tdd">{{echo $lang['SITENAME']}}</td>
|
||||||
<td><input name="sitename" type="text" style="width:70%" /></td>
|
<td><input name="sitename" type="text" style="width:70%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['SITEURL']}}</td>
|
<td class="tdd">{{echo $lang['SITEURL']}}</td>
|
||||||
<td><input name="siteurl" type="text" value="{{echo $GLOBALS['urlsite']}}" style="direction:ltr;width:70%" /></td>
|
<td><input name="siteurl" type="text" value="{{echo $GLOBALS['urlsite']}}" style="direction:ltr;width:70%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['SITEMAIL']}}</td>
|
<td class="tdd">{{echo $lang['SITEMAIL']}}</td>
|
||||||
<td><input name="sitemail" id="sitemail" type="text" onchange="return w_email(this.name);" style="direction:ltr;width:40%" /></td>
|
<td><input name="sitemail" id="sitemail" type="text" onchange="return w_email(this.name);" style="direction:ltr;width:40%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
|
|
||||||
<h2><img src="style/images/s-user.png" alt="" class="img" />{{echo $lang['INST_ADMIN_INFO']}}</h2>
|
<h2><img src="style/images/s-user.png" alt="" class="img" />{{echo $lang['INST_ADMIN_INFO']}}</h2>
|
||||||
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['USERNAME']}}</td>
|
<td class="tdd">{{echo $lang['USERNAME']}}</td>
|
||||||
<td><input name="username" type="text" style="width:40%" /></td>
|
<td><input name="username" type="text" style="width:40%" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['PASSWORD']}}</td>
|
<td class="tdd">{{echo $lang['PASSWORD']}}</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="pass1" name="password" type="text" style="width:40%" />
|
<input id="pass1" name="password" type="text" style="width:40%" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['PASSWORD2']}}</td>
|
<td class="tdd">{{echo $lang['PASSWORD2']}}</td>
|
||||||
<td><input id="pass2" name="password2" id="password2" type="text" style="width:40%" onkeyup="checkPass(); return false;" /></td>
|
<td><input id="pass2" name="password2" id="password2" type="text" style="width:40%" onkeyup="checkPass(); return false;" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['EMAIL']}}</td>
|
<td class="tdd">{{echo $lang['EMAIL']}}</td>
|
||||||
<td><input name="email" id="email" type="text" style="direction:ltr;width:40%" onchange="return w_email(this.name);" /></td>
|
<td><input name="email" id="email" type="text" style="direction:ltr;width:40%" onchange="return w_email(this.name);" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
|
|
||||||
<h2><img src="style/images/klj_info.png" alt="" class="img" />{{echo $lang['INST_OTHER_INFO']}}</h2>
|
<h2><img src="style/images/klj_info.png" alt="" class="img" />{{echo $lang['INST_OTHER_INFO']}}</h2>
|
||||||
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
<table class="DataTable" dir="{{echo $lang['DIR']}}">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['TIME_ZONE']}}</td>
|
<td class="tdd">{{echo $lang['TIME_ZONE']}}</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="time_zone" id="time_zone" style="text-align:left;direction:ltr">
|
<select name="time_zone" id="time_zone" style="text-align:left;direction:ltr">
|
||||||
{{foreach(time_zones() as $z=>$t):}}
|
{{foreach(time_zones() as $z=>$t):}}
|
||||||
<option value="{{echo $z}}" {{if($z=='Asia/Buraydah'):}}selected="selected"{{endif;}}>{{echo $z}} (GMT{{echo $t < 0 ? $t : '+' . $t}}</option>
|
<option value="{{echo $z}}" {{if($z=='Asia/Buraydah'):}}selected="selected"{{endif;}}>{{echo $z}} (GMT{{echo $t < 0 ? $t : '+' . $t}}</option>
|
||||||
{{endforeach}}
|
{{endforeach}}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['URLS_TYPES']}}</td>
|
<td class="tdd">{{echo $lang['URLS_TYPES']}}</td>
|
||||||
<td>
|
<td>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var explains = new Array(3);
|
var explains = new Array(3);
|
||||||
explains["id"] = "{{echo $GLOBALS['urlsite']}}do.php?id=123";
|
explains["id"] = "{{echo $GLOBALS['urlsite']}}do.php?id=123";
|
||||||
explains["filename"] = "{{echo $GLOBALS['urlsite']}}do.php?filename=12542219930.gif";
|
explains["filename"] = "{{echo $GLOBALS['urlsite']}}do.php?filename=12542219930.gif";
|
||||||
explains["direct"] = "{{echo $GLOBALS['urlsite']}}uploads/12542219930.gif";
|
explains["direct"] = "{{echo $GLOBALS['urlsite']}}uploads/12542219930.gif";
|
||||||
</script>
|
</script>
|
||||||
<select name="urls_type" onChange="document.getElementById('like_this').innerHTML=explains[this.options[this.selectedIndex].value]" style="width:30%">
|
<select name="urls_type" onChange="document.getElementById('like_this').innerHTML=explains[this.options[this.selectedIndex].value]" style="width:30%">
|
||||||
<option value="id">{{echo $lang['DEFAULT']}}</option>
|
<option value="id">{{echo $lang['DEFAULT']}}</option>
|
||||||
<option value="filename">{{echo $lang['FILENAME_URL']}}</option>
|
<option value="filename">{{echo $lang['FILENAME_URL']}}</option>
|
||||||
<option value="direct">{{echo $lang['DIRECT_URL']}}</option>
|
<option value="direct">{{echo $lang['DIRECT_URL']}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tdd">{{echo $lang['LIKE_THIS']}}</td>
|
<td class="tdd">{{echo $lang['LIKE_THIS']}}</td>
|
||||||
<td style="direction:ltr;text-align:left" id="like_this">{{echo $GLOBALS['urlsite']}}do.php?id=123</td>
|
<td style="direction:ltr;text-align:left" id="like_this">{{echo $GLOBALS['urlsite']}}do.php?id=123</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<button onclick="window.location.href='./install.php?step=check&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./install.php?step=check&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="datasubmit" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="datasubmit" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
<img src="style/images/end.gif" alt="" />
|
<img src="style/images/end.gif" alt="" />
|
||||||
<h2 class="h2">{{echo $lang['INST_FINISH_SQL']}}</h2>
|
<h2 class="h2">{{echo $lang['INST_FINISH_SQL']}}</h2>
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<h6><img src="style/images/info2.png" class="img" alt=" " /> {{echo $lang['INST_NOTES']}}</h6>
|
<h6><img src="style/images/info2.png" class="img" alt=" " /> {{echo $lang['INST_NOTES']}}</h6>
|
||||||
<p><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['INST_END']}}</p>
|
<p><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['INST_END']}}</p>
|
||||||
<p><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['INST_NOTE_D']}}</p>
|
<p><img src="style/images/inst_notes.png" class="img" alt=" " />{{echo $lang['INST_NOTE_D']}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="notice TN"><p>{{echo $lang['INST_KLEEJADEVELOPERS']}}</p></div>
|
<div class="notice TN"><p>{{echo $lang['INST_KLEEJADEVELOPERS']}}</p></div>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<button type="button" class="btn" onclick="window.location.href='../index.php';"><span>{{echo $lang['INDEX']}}</span></button>
|
<button type="button" class="btn" onclick="window.location.href='../index.php';"><span>{{echo $lang['INDEX']}}</span></button>
|
||||||
<button type="button" class="btn" onclick="window.location.href='../admin/';"><span>{{echo $lang['ADMINCP']}}</span></button>
|
<button type="button" class="btn" onclick="window.location.href='../admin/';"><span>{{echo $lang['ADMINCP']}}</span></button>
|
||||||
<button type="button" class="btn" onclick="window.open('http://kleeja.com','_blank');return false;" href="http://www.kleeja.com"><span>kleeja.com</span></button>
|
<button type="button" class="btn" onclick="window.open('http://kleeja.com','_blank');return false;" href="http://www.kleeja.com"><span>kleeja.com</span></button>
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,149 +1,131 @@
|
|||||||
<div class="clr"></div></div><div class="ins_klj"></div>
|
<div class="clr"></div>
|
||||||
|
</div>
|
||||||
|
<div class="ins_klj"></div>
|
||||||
<!-- strart code java script -->
|
<!-- strart code java script -->
|
||||||
<script type="text/javascript" src="{{echo getjquerylink()}}"></script>
|
<script type="text/javascript" src="{{echo getjquerylink()}}"></script>
|
||||||
<script type="text/javascript">{{echo gettpl('javascript.js')}}</script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$("#lang").msDropDown();
|
$("#toggleElement").click(function () {
|
||||||
$("#toggleElement").click(function() {
|
$("#next").toggle(!$(this).attr('checked'));
|
||||||
$("#next").toggle(!$(this).attr('checked'));
|
});
|
||||||
});
|
$('#sitemail').keydown(function (e) {
|
||||||
$('input:checkbox:not([safari])').checkbox();
|
if ($(this).val().length > 1 && $('#email').val() == '') {
|
||||||
$('#sitemail').keydown( function(e){
|
$('#email').val($(this).val());
|
||||||
if( $(this).val().length > 1) {
|
}
|
||||||
$('#email').val($(this).val());
|
});
|
||||||
}
|
|
||||||
});
|
$('#db_type').change(function(e) {
|
||||||
});
|
var state = $('#db_type').val() == 'sqlite';
|
||||||
/** By JavaScript Kit (http://javascriptkit.com) **/
|
$('#db_server').attr('disabled', state);
|
||||||
function w_email(l){
|
$('#db_user').attr('disabled', state);
|
||||||
var m = document.getElementById(l);
|
$('#db_pass').attr('disabled', state);
|
||||||
if (m.value.indexOf("@") == - 1 || m.value.indexOf(".") == - 1 || m.value.length < 7 ) {
|
});
|
||||||
alert("{{echo $lang['WRONG_EMAIL']}}");
|
});
|
||||||
m.focus();
|
|
||||||
|
function w_email(l) {
|
||||||
|
var m = document.getElementById(l);
|
||||||
|
if (m.value.indexOf("@") == -1 || m.value.indexOf(".") == -1 || m.value.length < 7) {
|
||||||
|
alert("{{echo $lang['WRONG_EMAIL']}}");
|
||||||
|
m.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
function checkrequired(which){
|
|
||||||
var pass = true;
|
|
||||||
if (document.images)
|
|
||||||
{
|
|
||||||
for (i=0;i<which.length;i++)
|
|
||||||
{
|
|
||||||
var tempobj=which.elements[i]
|
|
||||||
if (tempobj.name.substring(0,8)=="required")
|
|
||||||
{
|
|
||||||
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s" && tempobj.selectedIndex==-1))
|
|
||||||
{
|
|
||||||
pass = false;
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!pass)
|
|
||||||
{
|
|
||||||
alert("{{echo $lang['VALIDATING_FORM_WRONG']}}");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/** http://www.dynamicdrive.com **/
|
|
||||||
function formCheck(formobj, fieldRequired){
|
|
||||||
|
|
||||||
if( document.getElementById('pass1').value != document.getElementById('pass2').value)
|
function checkrequired(which) {
|
||||||
{
|
var pass = true;
|
||||||
alert("{{echo $lang['PASS_NEQ_PASS2']}}");
|
if (document.images) {
|
||||||
return false;
|
for (i = 0; i < which.length; i++) {
|
||||||
}
|
var tempobj = which.elements[i]
|
||||||
// dialog message
|
if (tempobj.name.substring(0, 8) == "required") {
|
||||||
var alertMsg = "{{echo $lang['VALIDATING_FORM_WRONG']}}:\n";
|
if (((tempobj.type == "text" || tempobj.type == "textarea") && tempobj.value == '') || (tempobj.type
|
||||||
var l_Msg = alertMsg.length;
|
.toString().charAt(0) == "s" && tempobj.selectedIndex == -1)) {
|
||||||
//lang
|
pass = false;
|
||||||
var lang = new Array(9);
|
break
|
||||||
lang["db_server"] = "{{echo $lang['DB_SERVER']}}";
|
}
|
||||||
lang["db_user"] = "{{echo $lang['DB_USER']}}";
|
}
|
||||||
lang["db_name"] = "{{echo $lang['DB_NAME']}}";
|
}
|
||||||
lang["sitename"] = "{{echo $lang['SITENAME']}}";
|
}
|
||||||
lang["siteurl"] = "{{echo $lang['SITEURL']}}";
|
if (!pass) {
|
||||||
lang["sitemail"] = "{{echo $lang['SITEMAIL']}}";
|
alert("{{echo $lang['VALIDATING_FORM_WRONG']}}");
|
||||||
lang["username"] = "{{echo $lang['USERNAME']}}";
|
return false;
|
||||||
lang["password"] = "{{echo $lang['PASSWORD']}}";
|
} else {
|
||||||
lang["password2"] = "{{echo $lang['PASSWORD2']}}";
|
return true;
|
||||||
lang["email"] = "{{echo $lang['EMAIL']}}";
|
}
|
||||||
|
}
|
||||||
for (var i = 0; i < fieldRequired.length; i++)
|
|
||||||
{
|
|
||||||
var obj = formobj.elements[fieldRequired[i]];
|
|
||||||
if (obj)
|
|
||||||
{
|
|
||||||
switch(obj.type)
|
|
||||||
{
|
|
||||||
case "text":
|
|
||||||
case "textarea":
|
|
||||||
if (obj.value == "" || obj.value == null)
|
|
||||||
alertMsg += " - " + lang[fieldRequired[i]] + "\n";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj.type == undefined)
|
|
||||||
{
|
|
||||||
var blnchecked = false;
|
|
||||||
for (var j = 0; j < obj.length; j++)
|
|
||||||
{
|
|
||||||
if (obj[j].checked)
|
|
||||||
blnchecked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!blnchecked)
|
|
||||||
alertMsg += " - " + lang[fieldRequired[i]] + "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (alertMsg.length == l_Msg)
|
function formCheck(formobj, fieldRequired) {
|
||||||
return true;
|
|
||||||
else
|
if (document.getElementById('pass1').value != document.getElementById('pass2').value) {
|
||||||
{
|
alert("{{echo $lang['PASS_NEQ_PASS2']}}");
|
||||||
alert(alertMsg);
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
// dialog message
|
||||||
}
|
var alertMsg = "{{echo $lang['VALIDATING_FORM_WRONG']}}:\n";
|
||||||
|
var l_Msg = alertMsg.length;
|
||||||
|
//lang
|
||||||
|
var lang = new Array(9);
|
||||||
|
lang["db_server"] = "{{echo $lang['DB_SERVER']}}";
|
||||||
|
lang["db_user"] = "{{echo $lang['DB_USER']}}";
|
||||||
|
lang["db_name"] = "{{echo $lang['DB_NAME']}}";
|
||||||
|
lang["sitename"] = "{{echo $lang['SITENAME']}}";
|
||||||
|
lang["siteurl"] = "{{echo $lang['SITEURL']}}";
|
||||||
|
lang["sitemail"] = "{{echo $lang['SITEMAIL']}}";
|
||||||
|
lang["username"] = "{{echo $lang['USERNAME']}}";
|
||||||
|
lang["password"] = "{{echo $lang['PASSWORD']}}";
|
||||||
|
lang["password2"] = "{{echo $lang['PASSWORD2']}}";
|
||||||
|
lang["email"] = "{{echo $lang['EMAIL']}}";
|
||||||
|
|
||||||
|
for (var i = 0; i < fieldRequired.length; i++) {
|
||||||
|
var obj = formobj.elements[fieldRequired[i]];
|
||||||
|
if (obj) {
|
||||||
|
switch (obj.type) {
|
||||||
|
case "text":
|
||||||
|
case "textarea":
|
||||||
|
if (obj.value == "" || obj.value == null)
|
||||||
|
alertMsg += " - " + lang[fieldRequired[i]] + "\n";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj.type == undefined) {
|
||||||
|
var blnchecked = false;
|
||||||
|
for (var j = 0; j < obj.length; j++) {
|
||||||
|
if (obj[j].checked)
|
||||||
|
blnchecked = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!blnchecked)
|
||||||
|
alertMsg += " - " + lang[fieldRequired[i]] + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alertMsg.length == l_Msg)
|
||||||
|
return true;
|
||||||
|
else {
|
||||||
|
alert(alertMsg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkPass(){
|
function checkPass() {
|
||||||
//Store the password field objects into variables ...
|
var pass1 = document.getElementById('pass1');
|
||||||
var pass1 = document.getElementById('pass1');
|
var pass2 = document.getElementById('pass2');
|
||||||
var pass2 = document.getElementById('pass2');
|
|
||||||
//Store the Confimation Message Object ...
|
var goodColor = "#66cc66";
|
||||||
//var message = document.getElementById('confirmMessage');
|
var badColor = "#ff6666";
|
||||||
//Set the colors we will be using ...
|
//Compare the values in the password field
|
||||||
var goodColor = "#66cc66";
|
if(pass1.value != '' && pass2.value != '') {
|
||||||
var badColor = "#ff6666";
|
if (pass1.value == pass2.value) {
|
||||||
//Compare the values in the password field
|
pass1.style.backgroundColor = goodColor;
|
||||||
//and the confirmation field
|
pass2.style.backgroundColor = goodColor;
|
||||||
if(pass1.value == pass2.value){
|
} else {
|
||||||
//The passwords match.
|
pass1.style.backgroundColor = badColor;
|
||||||
//Set the color to the good color and inform
|
pass2.style.backgroundColor = badColor;
|
||||||
//the user that they have entered the correct password
|
}
|
||||||
pass1.style.backgroundColor = goodColor;
|
}
|
||||||
pass2.style.backgroundColor = goodColor;
|
}
|
||||||
//message.style.color = goodColor;
|
|
||||||
//message.innerHTML = "Passwords Match!"
|
|
||||||
}else{
|
|
||||||
//The passwords do not match.
|
|
||||||
//Set the color to the bad color and
|
|
||||||
//notify the user.
|
|
||||||
pass1.style.backgroundColor = badColor;
|
|
||||||
pass2.style.backgroundColor = badColor;
|
|
||||||
//message.style.color = badColor;
|
|
||||||
//message.innerHTML = "Passwords Do Not Match!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -13,29 +13,29 @@ var PATH_SPACER = 'style/images/spacer.gif';
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="Header">
|
<div id="Header">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<ul class="headerIcon">
|
<ul class="headerIcon">
|
||||||
<li><a onclick="window.open(this.href,'_blank');return false;" href="http://www.kleeja.com"><img src="style/images/kleeja.png" title="kleeja.com" alt="" /></a></li>
|
<li><a onclick="window.open(this.href,'_blank');return false;" href="http://www.kleeja.com"><img src="style/images/kleeja.png" title="kleeja.com" alt="" /></a></li>
|
||||||
<li><a href="./"><img title="Start over" src="style/images/install_h.png" alt="" /></a></li>
|
<li><a href="./"><img title="Start over" src="style/images/install_h.png" alt="" /></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="BoxLang">
|
<div class="BoxLang">
|
||||||
{{if(((ig('step') && g('step') != 'language') && (strpos('index.php', $_SERVER['PHP_SELF'])=== false && ig('step'))) OR (ig('step') && g('step') == 'license' || g('step') == 'action_file') ):}}
|
{{if(((ig('step') && g('step') != 'language') && (strpos('index.php', $_SERVER['PHP_SELF'])=== false && ig('step'))) OR (ig('step') && g('step') == 'license' || g('step') == 'action_file') ):}}
|
||||||
<form action="?step={{echo g('step')}}&change_lang=1" method="post">
|
<form action="?step={{echo g('step')}}&change_lang=1" method="post">
|
||||||
<select name="lang" id="lang" class="Lang" onchange="submit()">
|
<select name="lang" id="lang" class="Lang" onchange="submit()">
|
||||||
{{if($dh = opendir(PATH . 'lang')):}}
|
{{if($dh = opendir(PATH . 'lang')):}}
|
||||||
{{while (($file = readdir($dh)) !== false): if(strpos($file, '.') === false && $file != '..' && $file != '.'):}}
|
{{while (($file = readdir($dh)) !== false): if(strpos($file, '.') === false && $file != '..' && $file != '.'):}}
|
||||||
{{$current_icon=file_exists('style/images/'.$file.'_16.png') ? 'style/images/'.$file.'_16.png' : (file_exists('../lang/'.$file.'/icon_16.png') ? '../lang/'.$file.'/icon_16.png' : 'style/images/zz_flag.png');}}
|
{{$current_icon=file_exists('style/images/'.$file.'_16.png') ? 'style/images/'.$file.'_16.png' : (file_exists('../lang/'.$file.'/icon_16.png') ? '../lang/'.$file.'/icon_16.png' : 'style/images/zz_flag.png');}}
|
||||||
<option value="{{echo $file}}" title="{{echo $current_icon}}" {{echo ig('lang') && $file==g('lang') || (!ig('lang') && $file=='en') ?'selected="selected"':''}}>{{echo $file}}</option>
|
<option value="{{echo $file}}" title="{{echo $current_icon}}" {{echo ig('lang') && $file==g('lang') || (!ig('lang') && $file=='en') ?'selected="selected"':''}}>{{echo $file}}</option>
|
||||||
{{endif; endwhile;closedir($dh);endif;}}
|
{{endif; endwhile;closedir($dh);endif;}}
|
||||||
</select>
|
</select>
|
||||||
<input type="hidden" name="step_is" value="{{echo g('step')}}" />
|
<input type="hidden" name="step_is" value="{{echo g('step')}}" />
|
||||||
</form>
|
</form>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="divline"></div>
|
<div class="divline"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="clr"></div><br />
|
<div class="clr"></div><br />
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
||||||
File diff suppressed because one or more lines are too long
@@ -2,24 +2,24 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="language_choose">
|
<div class="language_choose">
|
||||||
<ul id="LangChoose">
|
<ul id="LangChoose">
|
||||||
{{if($dh = @opendir(PATH . 'lang')): while (($file = readdir($dh)) !== false): if(strpos($file, '.') === false && $file != '..' && $file != '.'):}}
|
{{if($dh = @opendir(PATH . 'lang')): while (($file = readdir($dh)) !== false): if(strpos($file, '.') === false && $file != '..' && $file != '.'):}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{echo './?step=language&ln=' . $file}}">
|
<a href="{{echo './?step=language&ln=' . $file}}">
|
||||||
{{if(file_exists('style/images/'.$file.'.png')):}}
|
{{if(file_exists('style/images/'.$file.'.png')):}}
|
||||||
<img src="style/images/{{echo $file}}.png" alt="{{echo $file}}" />
|
<img src="style/images/{{echo $file}}.png" alt="{{echo $file}}" />
|
||||||
{{elseif(file_exists('../lang/'.$file.'/icon.png')):}}
|
{{elseif(file_exists('../lang/'.$file.'/icon.png')):}}
|
||||||
<img src="../lang/{{echo $file}}/icon.png" alt="{{echo $file}}" />
|
<img src="../lang/{{echo $file}}/icon.png" alt="{{echo $file}}" />
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<p style="width: 100px; height: 65px; border: 1px solid #ccc;text-align: center; vertical-align: middle;background-color: #2aabd2;font-size: 20px">
|
<p style="width: 100px; height: 65px; border: 1px solid #ccc;text-align: center; vertical-align: middle;background-color: #2aabd2;font-size: 20px">
|
||||||
{{echo $file}}
|
{{echo $file}}
|
||||||
</p>
|
</p>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{endif;endwhile;@closedir($dh);endif;}}
|
{{endif;endwhile;@closedir($dh);endif;}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
||||||
<form method="post" action="{{echo './install.php?step=f&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=f&' . getlang(1)}}">
|
||||||
<div class="licens3" name="license">
|
<div class="licens3" name="license">
|
||||||
Kleeja, a PHP uploader program<br />
|
Kleeja, a PHP uploader program<br />
|
||||||
Copyright (C) 2007-<?php echo date('Y');?> <Kleeja Team><br />
|
Copyright (C) 2007-<?php echo date('Y');?> <Kleeja Team><br />
|
||||||
<br />
|
<br />
|
||||||
@@ -17,11 +17,11 @@ Library General Public License for more details.<br />
|
|||||||
You should have received a copy of the GNU Library General Public<br />
|
You should have received a copy of the GNU Library General Public<br />
|
||||||
License along with this library; if not, write to the Free<br />
|
License along with this library; if not, write to the Free<br />
|
||||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br />
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<span style="color:green;" dir="{{echo $lang['DIR']}}">{{echo $lang['INST_AGR_LICENSE']}}</span>
|
<span style="color:green;" dir="{{echo $lang['DIR']}}">{{echo $lang['INST_AGR_LICENSE']}}</span>
|
||||||
<br />
|
<br />
|
||||||
<button onclick="window.location.href='./index.php?step=choose&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./index.php?step=choose&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" id="agres" type="submit" class="btn"><span>{{echo $lang['YES'] . ', '.$lang['INST_NEXT']}} »</span></button>
|
<button name="agres" id="agres" type="submit" class="btn"><span>{{echo $lang['YES'] . ', '.$lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
||||||
<form method="post" action="{{echo './?step=choose&' . getlang(1)}}">
|
<form method="post" action="{{echo './?step=choose&' . getlang(1)}}">
|
||||||
<h2><img src="style/images/stop.png" class="img" alt="" /> {{echo $lang['IS_IT_OFFICIAL']}} </h2>
|
<h2><img src="style/images/stop.png" class="img" alt="" /> {{echo $lang['IS_IT_OFFICIAL']}} </h2>
|
||||||
<p class="justify">{{echo $lang['IS_IT_OFFICIAL_DESC']}}</p>
|
<p class="justify">{{echo $lang['IS_IT_OFFICIAL_DESC']}}</p>
|
||||||
|
|
||||||
|
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<button onclick="window.location.href='./?step=what_is_kleeja&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./?step=what_is_kleeja&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="next" id="next" type="submit" class="btn"><span>{{echo $lang['YES'] . ', '. $lang['INST_NEXT']}} »</span></button>
|
<button name="next" id="next" type="submit" class="btn"><span>{{echo $lang['YES'] . ', '. $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
||||||
|
|||||||
@@ -1,42 +1,42 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
{{if (!$GLOBALS['err']):}}
|
{{if (!$GLOBALS['err']):}}
|
||||||
<div id="Scro11">
|
<div id="Scro11">
|
||||||
<ul class="inside">
|
<ul class="inside">
|
||||||
{{foreach($GLOBALS['sqls_done'] as $sql):}}
|
{{foreach($GLOBALS['sqls_done'] as $sql):}}
|
||||||
<li><img src="style/images/ok.png" class="img" alt=" " /> {{echo $sql}}</li>
|
<li><img src="style/images/ok.png" class="img" alt=" " /> {{echo $sql}}</li>
|
||||||
{{endforeach;}}
|
{{endforeach;}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<form method="post" action="{{echo './install.php?step=end&' . getlang(1)}}">
|
<form method="post" action="{{echo './install.php?step=end&' . getlang(1)}}">
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<div id="Scro11">
|
<div id="Scro11">
|
||||||
<ul class="inside insideError">
|
<ul class="inside insideError">
|
||||||
{{foreach($GLOBALS['sql_err'] as $sql):}}
|
{{foreach($GLOBALS['sql_err'] as $sql):}}
|
||||||
<li style="color:red"><img src="style/images/error.png" class="img" alt=" " /> {{echo $sql}}</li>
|
<li style="color:red"><img src="style/images/error.png" class="img" alt=" " /> {{echo $sql}}</li>
|
||||||
{{endforeach;}}
|
{{endforeach;}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<div class="notice">
|
<div class="notice">
|
||||||
<p class="error2"><img src="style/images/info2.png" class="img" alt=" " />{{echo $lang['INST_FINISH_ERRSQL']}}</p>
|
<p class="error2"><img src="style/images/info2.png" class="img" alt=" " />{{echo $lang['INST_FINISH_ERRSQL']}}</p>
|
||||||
<textarea rows="4" style="width:98%;direction:ltr">{{echo $GLOBALS['errors']}}</textarea>
|
<textarea rows="4" style="width:98%;direction:ltr">{{echo $GLOBALS['errors']}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
// fixed error in the browser Explore
|
// fixed error in the browser Explore
|
||||||
$('#Scro11').animate({scrollTop:$('#Scro11 > .inside').outerHeight() });
|
$('#Scro11').animate({scrollTop:$('#Scro11 > .inside').outerHeight() });
|
||||||
var elem = $('#Scro11');
|
var elem = $('#Scro11');
|
||||||
var inside = $('#Scro11 > .inside');
|
var inside = $('#Scro11 > .inside');
|
||||||
if ( Math.abs(inside.offset().top) + elem.height() + elem.offset().top >= inside.outerHeight() ) {
|
if ( Math.abs(inside.offset().top) + elem.height() + elem.offset().top >= inside.outerHeight() ) {
|
||||||
// We're at the bottom!
|
// We're at the bottom!
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
@@ -1,37 +1,37 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner"><div class="clr"></div>
|
||||||
<div id="Scro11">
|
<div id="Scro11">
|
||||||
<ul class="inside">
|
<ul class="inside">
|
||||||
{{foreach($GLOBALS['update_msgs_arr'] as $m):}}
|
{{foreach($GLOBALS['update_msgs_arr'] as $m):}}
|
||||||
<li><img src="style/images/ok.png" class="img" alt="ok" /> {{echo $m}}</li>
|
<li><img src="style/images/ok.png" class="img" alt="ok" /> {{echo $m}}</li>
|
||||||
{{endforeach;}}
|
{{endforeach;}}
|
||||||
{{if(is_array($GLOBALS['NOTES_CUP'])):foreach($GLOBALS['NOTES_CUP'] as $i=>$m):}}
|
{{if(is_array($GLOBALS['NOTES_CUP'])):foreach($GLOBALS['NOTES_CUP'] as $i=>$m):}}
|
||||||
<li><img src="style/images/ok.png" class="img" alt="ok" />{{echo $i;}} - {{echo $m}} </li>
|
<li><img src="style/images/ok.png" class="img" alt="ok" />{{echo $i;}} - {{echo $m}} </li>
|
||||||
{{endforeach;endif;}}
|
{{endforeach;endif;}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
{{if($GLOBALS['complete_upate']):}}
|
{{if($GLOBALS['complete_upate']):}}
|
||||||
<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['INST_NOTES_UPDATE']}} :</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['INST_NOTE_RC6_TO_1.0.0']}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{if(is_array($GLOBALS['NOTES_CUP'])):foreach($GLOBALS['NOTES_CUP'] as $i=>$m):}}
|
{{if(is_array($GLOBALS['NOTES_CUP'])):foreach($GLOBALS['NOTES_CUP'] as $i=>$m):}}
|
||||||
<div id="Scro11">
|
<div id="Scro11">
|
||||||
<ul class="inside">
|
<ul class="inside">
|
||||||
<li><img src="style/images/ok.png" class="img" alt="ok" />{{echo $i;}} - {{echo $m}} </li>
|
<li><img src="style/images/ok.png" class="img" alt="ok" />{{echo $i;}} - {{echo $m}} </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{endforeach;endif;}}
|
{{endforeach;endif;}}
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<div class="notice TN">
|
<div class="notice TN">
|
||||||
<p>{{echo $lang['INST_UPDATE_IS_FINISH']}}</p>
|
<p>{{echo $lang['INST_UPDATE_IS_FINISH']}}</p>
|
||||||
<p style="background:#EEE3C7;color:black !important">{{echo $lang['INST_KLEEJADEVELOPERS']}}</p>
|
<p style="background:#EEE3C7;color:black !important">{{echo $lang['INST_KLEEJADEVELOPERS']}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<button type="button" class="btn" onclick="window.location.href='../index.php';"><span>{{echo $lang['INDEX']}}</span></button>
|
<button type="button" class="btn" onclick="window.location.href='../index.php';"><span>{{echo $lang['INDEX']}}</span></button>
|
||||||
<button type="button" class="btn" onclick="window.location.href='../admin/';"><span>{{echo $lang['ADMINCP']}}</span></button>
|
<button type="button" class="btn" onclick="window.location.href='../admin/';"><span>{{echo $lang['ADMINCP']}}</span></button>
|
||||||
<button type="button" class="btn" onclick="window.open(this.value,'_blank');return false;" value="http://www.kleeja.com"><span>kleeja.com</span></button>
|
<button type="button" class="btn" onclick="window.open(this.value,'_blank');return false;" value="http://www.kleeja.com"><span>kleeja.com</span></button>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
<div class="clr"></div></div></div><div class="BoxBottomImg"></div></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@@ -39,11 +39,11 @@
|
|||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
// fixed error in the browser Explore
|
// fixed error in the browser Explore
|
||||||
$('#Scro11').animate({scrollTop:$('#Scro11 > .inside').outerHeight() });
|
$('#Scro11').animate({scrollTop:$('#Scro11 > .inside').outerHeight() });
|
||||||
var elem = $('#Scro11');
|
var elem = $('#Scro11');
|
||||||
var inside = $('#Scro11 > .inside');
|
var inside = $('#Scro11 > .inside');
|
||||||
if ( Math.abs(inside.offset().top) + elem.height() + elem.offset().top >= inside.outerHeight() ) {
|
if ( Math.abs(inside.offset().top) + elem.height() + elem.offset().top >= inside.outerHeight() ) {
|
||||||
// We're at the bottom!
|
// We're at the bottom!
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
@@ -1,28 +1,28 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
<img src="style/images/update.png" alt="update" /><br />
|
<img src="style/images/update.png" alt="update" /><br />
|
||||||
{{if (sizeof($GLOBALS['upfiles'])):}}
|
{{if (sizeof($GLOBALS['upfiles'])):}}
|
||||||
<p style="text-align:center;">{{echo $lang['INST_CHOOSE_UPDATE_FILE']}}</p>
|
<p style="text-align:center;">{{echo $lang['INST_CHOOSE_UPDATE_FILE']}}</p>
|
||||||
<form action="{{echo './update.php?step=action_file&' . getlang(1)}}" method="post">
|
<form action="{{echo './update.php?step=action_file&' . getlang(1)}}" method="post">
|
||||||
<select class="SelectVersion" name="action_file_do" dir="ltr">
|
<select class="SelectVersion" name="action_file_do" dir="ltr">
|
||||||
{{foreach($GLOBALS['upfiles'] as $k=>$v):}}
|
{{foreach($GLOBALS['upfiles'] as $k=>$v):}}
|
||||||
<option value="{{echo $v}}">{{echo $v}}</option>
|
<option value="{{echo $v}}">{{echo $v}}</option>
|
||||||
{{endforeach}}
|
{{endforeach}}
|
||||||
</select>
|
</select>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<button onclick="window.location.href='./index.php?step=choose&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./index.php?step=choose&{{echo getlang(1)}}';return false;" name="previous" type="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="submitlfile" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="submitlfile" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<p style="text-align:center;color:green;font-size:20px;">
|
<p style="text-align:center;color:green;font-size:20px;">
|
||||||
{{echo $lang['INST_UPDATE_CUR_VER_IS_UP']}}
|
{{echo $lang['INST_UPDATE_CUR_VER_IS_UP']}}
|
||||||
<br />
|
<br />
|
||||||
<div style="color:red; direction: ltr">[ {{echo array_search($GLOBALS['config']['db_version'], $GLOBALS['order_update_files'])}} :: {{echo $GLOBALS['config']['db_version']}} ]</div>
|
<div style="color:red; direction: ltr">[ {{echo array_search($GLOBALS['config']['db_version'], $GLOBALS['order_update_files'])}} :: {{echo $GLOBALS['config']['db_version']}} ]</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{{endif;}}
|
{{endif;}}
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
<div class="BoxInner"><div class="BoxTopImg"></div><div class="BoxBody"><div class="inner">
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
|
|
||||||
<h2>{{echo $lang['INST_WHAT_IS_KLEEJA_T']}}</h2>
|
<h2>{{echo $lang['INST_WHAT_IS_KLEEJA_T']}}</h2>
|
||||||
<p class="justify">{{echo $lang['INST_WHAT_IS_KLEEJA']}}</p>
|
<p class="justify">{{echo $lang['INST_WHAT_IS_KLEEJA']}}</p>
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
<h2>{{echo $lang['INST_SPECIAL_KLEEJA']}}</h2>
|
<h2>{{echo $lang['INST_SPECIAL_KLEEJA']}}</h2>
|
||||||
<p>{{echo $lang['INST_WHAT_IS_KLEEJA_ONE']}}</p>
|
<p>{{echo $lang['INST_WHAT_IS_KLEEJA_ONE']}}</p>
|
||||||
<div class="hr"></div>
|
<div class="hr"></div>
|
||||||
<form method="post" action="{{echo './?step=official&' . getlang(1)}}">
|
<form method="post" action="{{echo './?step=official&' . getlang(1)}}">
|
||||||
<button onclick="window.location.href='./index.php?step=language&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
<button onclick="window.location.href='./index.php?step=language&{{echo getlang(1)}}';return false;" name="previous" type="submit" id="submit" class="btn"><span>« {{echo $lang['INST_PREVIOUS']}}</span></button>
|
||||||
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
<button name="agres" type="submit" class="btn"><span>{{echo $lang['INST_NEXT']}} »</span></button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="clr"></div>
|
<div class="clr"></div>
|
||||||
</div></div><div class="BoxBottomImg"></div></div>
|
</div></div><div class="BoxBottomImg"></div></div>
|
||||||
@@ -28,13 +28,20 @@ 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';
|
||||||
|
|
||||||
include_once PATH . 'includes/mysqli.php';
|
if (isset($dbtype) && $dbtype == 'sqlite')
|
||||||
|
{
|
||||||
|
include PATH . 'includes/sqlite.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include PATH . 'includes/mysqli.php';
|
||||||
|
}
|
||||||
|
|
||||||
include_once 'includes/functions_install.php';
|
include_once 'includes/functions_install.php';
|
||||||
include_once 'includes/update_schema.php';
|
include_once 'includes/update_schema.php';
|
||||||
|
|
||||||
|
|
||||||
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname);
|
$SQL = new KleejaDatabase($dbserver, $dbuser, $dbpass, $dbname, $dbprefix);
|
||||||
|
|
||||||
//
|
//
|
||||||
// fix missing db_version
|
// fix missing db_version
|
||||||
@@ -137,6 +144,7 @@ case 'update_now':
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
delete_cache('', true);
|
||||||
echo gettpl('update_end.html');
|
echo gettpl('update_end.html');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
547
lang/ar/acp.php
547
lang/ar/acp.php
@@ -5,286 +5,279 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'U_NOT_ADMIN' => 'يجب أن تملك صلاحية الإدارة',
|
'U_NOT_ADMIN' => 'يجب أن تملك صلاحية الإدارة',
|
||||||
'UPDATE_CONFIG' => 'تحديث الإعدادات',
|
'UPDATE_CONFIG' => 'تحديث الإعدادات',
|
||||||
'NO_CHANGE' => 'بلا تغيير',
|
'NO_CHANGE' => 'بلا تغيير',
|
||||||
'CHANGE_MD5' => 'تغيير مع دالة md5 (8c7dd922ad47494fc02c388e12c00eac.png) ',
|
'CHANGE_MD5' => 'تغيير مع دالة md5 (8c7dd922ad47494fc02c388e12c00eac.png) ',
|
||||||
'CHANGE_TIME' => 'تغيير مع دالة TIME (1501440381.png)',
|
'CHANGE_TIME' => 'تغيير مع دالة TIME (1501440381.png)',
|
||||||
'SITENAME' => 'إسم المركز',
|
'SITENAME' => 'إسم المركز',
|
||||||
'SITEMAIL' => 'بريد المركز',
|
'SITEMAIL' => 'بريد المركز',
|
||||||
'SITEMAIL2' => 'بريد التبليغات , المراسلات',
|
'SITEMAIL2' => 'بريد التبليغات , المراسلات',
|
||||||
'SITEURL' => 'رابط المركز <small>(مع / بنهايته)</small>',
|
'SITEURL' => 'رابط المركز <small>(مع / بنهايته)</small>',
|
||||||
'FOLDERNAME' => '</small>إسم مجلد التحميل <small>(يمكنك استخدام {year} و {month} و {day} و {week} و {username})',
|
'FOLDERNAME' => '</small>إسم مجلد التحميل <small>(يمكنك استخدام {year} و {month} و {day} و {week} و {username})',
|
||||||
'PREFIXNAME' => 'بادئة أسماء الملفات <small>(مثلا : kleeja_ وستضاف قبل اسم كل ملف مرفوع, يمكن استخدام ايضا {rand:4} و {date:d_Y})</small>',
|
'PREFIXNAME' => 'بادئة أسماء الملفات <small>(مثلا : kleeja_ وستضاف قبل اسم كل ملف مرفوع, يمكن استخدام ايضا {rand:4} و {date:d_Y})</small>',
|
||||||
'FILESNUM' => 'عدد حقول ملفات التحميل',
|
'FILESNUM' => 'عدد حقول ملفات التحميل',
|
||||||
'FILESNUM_SHOW' => 'عرض حقول حقول التحميل كلها',
|
'FILESNUM_SHOW' => 'عرض حقول حقول التحميل كلها',
|
||||||
'SITECLOSE' => 'إغلاق المركز',
|
'SITECLOSE' => 'وضع الصيانة',
|
||||||
'CLOSEMSG' => 'رسالة الإغلاق',
|
'CLOSEMSG' => 'رسالة وضع الصيانة',
|
||||||
'DECODE' => 'تغيير إسم الملف <small>(لاحظ : عند عرض الملف سيظهر اسمه الاصلي, اما هذا فللحماية والتنظيم)</small>',
|
'DECODE' => 'تغيير إسم الملف <small>(لاحظ : عند عرض الملف سيظهر اسمه الاصلي, اما هذا فللحماية والتنظيم)</small>',
|
||||||
'SEC_DOWN' => 'عدد الثواني قبل بدء التحميل',
|
'SEC_DOWN' => 'عدد الثواني قبل بدء التحميل',
|
||||||
'STATFOOTER' => 'إحصائيات الصفحة بالفوتر',
|
'STATFOOTER' => 'إحصائيات الصفحة بالفوتر',
|
||||||
'GZIP' => 'GZIP <small>(ضاغط المحتويات لتسريع عرضها)</small>',
|
'GZIP' => 'GZIP <small>(ضاغط المحتويات لتسريع عرضها)</small>',
|
||||||
'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' => 'نظام العضوية <small>(لاحظ: تغييرها قد يمنعك من الدخول مالم تتبع الشروحات)</small>',
|
'USER_SYSTEM' => 'نظام العضوية <small>(لاحظ: تغييرها قد يمنعك من الدخول مالم تتبع الشروحات)</small>',
|
||||||
|
'TOTAL_SIZE' => 'أقصى حجم كلي للمركز <small>(ميقا بايت)</small>',
|
||||||
'TOTAL_SIZE' => 'أقصى حجم كلي للمركز <small>(ميقا بايت)</small>',
|
'THUMBS_IMGS' => 'أبعاد مصغرات الصور (عرض x إرتفاع)',
|
||||||
'THUMBS_IMGS' => 'أبعاد مصغرات الصور (عرض x إرتفاع)',
|
'WRITE_IMGS' => 'تفعيل ختم الصور',
|
||||||
'WRITE_IMGS' => 'تفعيل ختم الصور',
|
'ID_FORM' => 'شكل روابط الملفات <small>(المباشر لايخضع لحمايتنا ولا للاحصائيات .. )</small>',
|
||||||
'ID_FORM' => 'شكل روابط الملفات <small>(المباشر لايخضع لحمايتنا ولا للاحصائيات .. )</small>',
|
'IDF' => 'الاساسي (example.com/do.php?id=123)',
|
||||||
'IDF' => 'الاساسي (example.com/do.php?id=123)',
|
'IDFF' => 'إسم الملف (example.com/do.php?file=filename.pdf)',
|
||||||
'IDFF' => 'إسم الملف (example.com/do.php?file=filename.pdf)',
|
'IDFD' => 'رابط مباشر (example.com/uploads/filename.pdf)',
|
||||||
'IDFD' => 'رابط مباشر (example.com/uploads/filename.pdf)',
|
'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' => 'تفعيل صفحة الإحصائيات',
|
||||||
'WWW_URL' => 'تفعيل التحميل من رابط',
|
'ALLOW_ONLINE' => 'تفعيل عرض المتواجدون الآن',
|
||||||
'ALLOW_STAT_PG' => 'تفعيل صفحة الإحصائيات',
|
'DEL_F_DAY' => 'حذف الملفات الخاملة بعد × يوم - صفر للتعطيل',
|
||||||
'ALLOW_ONLINE' => 'تفعيل عرض المتواجدون الآن',
|
'MOD_WRITER' => 'Mod Rewrite <small>(لاحظ: لن يعمل الا بعد نقل ملف .htaccess للمجلد الرئيسي)</small>',
|
||||||
'DEL_F_DAY' => 'حذف الملفات الخاملة بعد × يوم - صفر للتعطيل',
|
'MOD_WRITER_EX' => '<b style="color:#0B55C4">روابط كـ HTML ..</b>',
|
||||||
'MOD_WRITER' => 'Mod Rewrite <small>(لاحظ: لن يعمل الا بعد نقل ملف .htaccess للمجلد الرئيسي)</small>',
|
'NUMFIELD_S' => 'رجاءاً .. الحقول الرقمية .. يجب أن تكون رقمية!',
|
||||||
'MOD_WRITER_EX' => '<b style="color:#0B55C4">روابط كـ HTML ..</b>',
|
'CONFIGS_UPDATED' => 'تم تحديت الإعدادات بنجاح',
|
||||||
'NUMFIELD_S' => 'رجاءاً .. الحقول الرقمية .. يجب أن تكون رقمية!',
|
'E_EXTS' => 'ملاحظة : الأحجام تضبط بالكليوبايت .',
|
||||||
'CONFIGS_UPDATED' => 'تم تحديت الإعدادات بنجاح',
|
'UPDATED_EXTS' => 'تم تحديث الإمتدادات بنجاح',
|
||||||
|
'EXT_DELETED' => 'تم حذف الامتداد بنجاح.',
|
||||||
'E_EXTS' => 'ملاحظة : الأحجام تضبط بالكليوبايت .',
|
'REPLY' => 'إرسال',
|
||||||
'UPDATED_EXTS' => 'تم تحديث الإمتدادات بنجاح',
|
'REPLY_REPORT' => 'رد على تبليغ',
|
||||||
'EXT_DELETED' => 'تم حذف الامتداد بنجاح.',
|
'U_REPORT_ON' => 'بسبب تبليغك في ',
|
||||||
'REPLY' => 'إرسال',
|
'BY_EMAIL' => 'بواسطة البريد ',
|
||||||
'REPLY_REPORT' => 'رد على تبليغ',
|
'ADMIN_REPLIED' => 'فقد قام المدير بالرد التالي',
|
||||||
'U_REPORT_ON' => 'بسبب تبليغك في ',
|
'IS_SEND_MAIL' => 'تم إرسال الرد البريدي',
|
||||||
'BY_EMAIL' => 'بواسطة البريد ',
|
'REPORTS_UPDATED' => 'تم تحديث التبليغات',
|
||||||
'ADMIN_REPLIED' => 'فقد قام المدير بالرد التالي',
|
'REPLY_CALL' => 'رد على رسالة',
|
||||||
'IS_SEND_MAIL' => 'تم إرسال الرد البريدي',
|
'REPLIED_ON_CAL' => 'بخصوص مراسلتك ',
|
||||||
'REPORTS_UPDATED' => 'تم تحديث التبليغات',
|
'CALLS_UPDATED' => 'تم تحديث المراسلات',
|
||||||
'REPLY_CALL' => 'رد على رسالة',
|
'FOUNDER' => 'مؤسس',
|
||||||
'REPLIED_ON_CAL' => 'بخصوص مراسلتك ',
|
'USER_UPDATED' => 'تم تحديث بيانات المستخدم ..',
|
||||||
'CALLS_UPDATED' => 'تم تحديث المراسلات',
|
'REPAIRE_TABLE' => '[جداول] تم إصلاح ',
|
||||||
'FOUNDER' => 'مؤسس',
|
'REPAIRE_CACHE' => 'تم حذف/تجديد الكاش (الملفات المؤقتة) ...',
|
||||||
'USER_UPDATED' => 'تم تحديث بيانات المستخدم ..',
|
'KLEEJA_CP' => 'لوحة التحكم',
|
||||||
'REPAIRE_TABLE' => '[جداول] تم إصلاح ',
|
'GENERAL_STAT' => 'إحصائيات عامة',
|
||||||
'REPAIRE_CACHE' => 'تم حذف/تجديد الكاش (الملفات المؤقتة) ...',
|
'SEARCH_STAT' => 'إحصائيات محركات البحث',
|
||||||
'KLEEJA_CP' => 'لوحة التحكم',
|
'OTHER_INFO' => 'معلومات أخرى',
|
||||||
'GENERAL_STAT' => 'إحصائيات عامة',
|
'AFILES_NUM' => 'عدد جميع الملفات',
|
||||||
'SEARCH_STAT' => 'إحصائيات محركات البحث',
|
'AFILES_SIZE_SPACE' => 'المساحة التي تم استهلاكها حتى الآن',
|
||||||
'OTHER_INFO' => 'معلومات أخرى',
|
'AUSERS_NUM' => 'عدد الأعضاء',
|
||||||
'AFILES_NUM' => 'عدد جميع الملفات',
|
'LAST_GOOGLE' => 'آخر زيارة لجوجل',
|
||||||
'AFILES_SIZE_SPACE' => 'المساحة التي تم استهلاكها حتى الآن',
|
'GOOGLE_NUM' => 'عدد زيارات جوجل',
|
||||||
'AUSERS_NUM' => 'عدد الأعضاء',
|
'LAST_BING' => 'آخر زيارات بينق',
|
||||||
'LAST_GOOGLE' => 'آخر زيارة لجوجل',
|
'BING_NUM' => 'عدد زيارات بينق',
|
||||||
'GOOGLE_NUM' => 'عدد زيارات جوجل',
|
'KLEEJA_CP_W' => 'مرحباً بك, في لوحة الإدارة',
|
||||||
'LAST_BING' => 'آخر زيارات بينق',
|
'PHP_VER' => 'إصدار PHP',
|
||||||
'BING_NUM' => 'عدد زيارات بينق',
|
'MYSQL_VER' => 'إصدار MySQL',
|
||||||
'KLEEJA_CP_W' => 'مرحباً بك, في لوحة الإدارة',
|
'R_CONFIGS' => 'إعدادات',
|
||||||
'PHP_VER' => 'إصدار PHP',
|
'R_CPINDEX' => 'بداية لوحة كليجا',
|
||||||
'MYSQL_VER' => 'إصدار MySQL',
|
'R_EXTS' => 'إعدادات الإمتدادات',
|
||||||
'R_CONFIGS' => 'إعدادات',
|
'R_FILES' => 'إدارة الملفات',
|
||||||
'R_CPINDEX' => 'بداية لوحة كليجا',
|
'R_REPORTS' => 'تبليغات',
|
||||||
'R_EXTS' => 'إعدادات الإمتدادات',
|
'R_CALLS' => 'رسائل',
|
||||||
'R_FILES' => 'إدارة الملفات',
|
'R_USERS' => 'الأعضاء والمجموعات',
|
||||||
'R_REPORTS' => 'تبليغات',
|
'R_REPAIR' => 'صيانة',
|
||||||
'R_CALLS' => 'رسائل',
|
'R_LGOUTCP' => 'مسح جلسة الإدارة',
|
||||||
'R_USERS' => 'الأعضاء والمجموعات',
|
'R_BAN' => 'التحكم بالحظر',
|
||||||
'R_REPAIR' => 'صيانة',
|
'BAN_EXP1' => 'تستطيع حظر مستخدمين/زوار عبر الأي بي أو اسم المستخدم الخاص بهم.',
|
||||||
'R_LGOUTCP' => 'مسح جلسة الإدارة',
|
'BAN_EXP2' => 'لحظر مدى آيبيات استخدم النجمة (*) مثلاً: 116.10.191.*',
|
||||||
'R_BAN' => 'التحكم بالحظر',
|
'UPDATE_BAN' => 'حفظ تعديلات الحظر',
|
||||||
'BAN_EXP1' => 'قم بتحرير الآيبيات المحظورة وإضافة الجديد من هنا..',
|
'BAN_UPDATED' => 'تم تحديث قائمة الحظر بنجاح..',
|
||||||
'BAN_EXP2' => 'إستخدم رمز النجمة (*)لاستبدال الارقام ..إذا كنت تريد الحظر الشامل ..وأستخدم الفاصل (|) للفصل بين الآيبيات',
|
'R_RULES' => 'شروط الخدمة',
|
||||||
'UPDATE_BAN' => 'حفظ تعديلات الحظر',
|
'RULES_EXP' => 'من هنا تستطيع تعديل الشروط التي سوف تظهر للزوار والأعضاء',
|
||||||
'BAN_UPDATED' => 'تم تحديث قائمة الحظر بنجاح..',
|
'UPDATE_RULES' => 'تحديث الشروط',
|
||||||
'R_RULES' => 'شروط الخدمة',
|
'RULES_UPDATED' => 'تم تحديث الشروط بنجاح..',
|
||||||
'RULES_EXP' => 'من هنا تستطيع تعديل الشروط التي سوف تظهر للزوار والأعضاء',
|
'R_SEARCH' => 'بحث متقدم',
|
||||||
'UPDATE_RULES' => 'تحديث الشروط',
|
'SEARCH_FILES' => 'بحث عن الملفات',
|
||||||
'RULES_UPDATED' => 'تم تحديث الشروط بنجاح..',
|
'SEARCH_SUBMIT' => 'بحث',
|
||||||
'R_SEARCH' => 'بحث متقدم',
|
'LAST_DOWN' => 'آخر تحميل',
|
||||||
'SEARCH_FILES' => 'بحث عن الملفات',
|
'WAS_B4' => 'كان قبل',
|
||||||
'SEARCH_SUBMIT' => 'بحث',
|
'SEARCH_USERS' => 'بحث عن مستخدمين',
|
||||||
'LAST_DOWN' => 'آخر تحميل',
|
'R_IMG_CTRL' => 'إدارة الصور',
|
||||||
'WAS_B4' => 'كان قبل',
|
'ENABLE_USERFILE' => 'تفعيل مجلدات المستخدمين',
|
||||||
'SEARCH_USERS' => 'بحث عن مستخدمين',
|
'R_EXTRA' => 'هيدر وفوتر إضافي',
|
||||||
'R_IMG_CTRL' => 'إدارة الصور',
|
'EX_HEADER_N' => 'الهيدر الإضافي.. وهو ما يظهر أسفل الهيدر الأصلي ..',
|
||||||
'ENABLE_USERFILE' => 'تفعيل مجلدات المستخدمين',
|
'EX_FOOTER_N' => 'الفوتر الإضافي.. وهو ما يظهر أعلى الفوتر الأصلي ..',
|
||||||
'R_EXTRA' => 'هيدر وفوتر إضافي',
|
'UPDATE_EXTRA' => 'تحديث الإضافات القوالبية',
|
||||||
'EX_HEADER_N' => 'الهيدر الإضافي.. وهو ما يظهر أسفل الهيدر الأصلي ..',
|
'EXTRA_UPDATED' => 'تم تحديث الإضافات القوالبية',
|
||||||
'EX_FOOTER_N' => 'الفوتر الإضافي.. وهو ما يظهر أعلى الفوتر الأصلي ..',
|
'R_STYLES' => 'الستايلات',
|
||||||
'UPDATE_EXTRA' => 'تحديث الإضافات القوالبية',
|
'NO_TPL_SHOOSED' => 'لم تقم بإختيار قالب!',
|
||||||
'EXTRA_UPDATED' => 'تم تحديث الإضافات القوالبية',
|
'R_PLUGINS' => 'إضافات برمجية',
|
||||||
'R_STYLES' => 'الستايلات',
|
'ADD_NEW_PLUGIN' => 'أضف إضافة برمجية جديدة',
|
||||||
'NO_TPL_SHOOSED' => 'لم تقم بإختيار قالب!',
|
'ITEM_DELETED' => 'لقد تم حذف "%s" بنجاح...',
|
||||||
|
'PLGUIN_DISABLED_ENABLED' => 'لقد تم تفعيل \ تعطيل الإضافة البرمجية..',
|
||||||
'R_PLUGINS' => 'إضافات برمجية',
|
'NO_PLUGINS' => 'لا يوجد أي إضافات برمجية متوفرة..',
|
||||||
'ADD_NEW_PLUGIN' => 'أضف إضافة برمجية جديدة',
|
'NO_STYLES' => 'لا يوجد أي ستايلات متوفرة..',
|
||||||
'ITEM_DELETED' => 'لقد تم حذف "%s" بنجاح...',
|
'NEW_PLUGIN_ADDED' => 'لقد تمت إضافة الإضافة البرمجية .. ',
|
||||||
'PLGUIN_DISABLED_ENABLED' => 'لقد تم تفعيل \ تعطيل الإضافة البرمجية..',
|
'PLUGIN_EXISTS_BEFORE' => 'الاضافة هذه موجودة سابقاً بنفس الاصدار أو أعلى ولاتحتاج تحديث !',
|
||||||
'NO_PLUGINS' => 'لا يوجد أي إضافات برمجية متوفرة..',
|
'R_CHECK_UPDATE' => 'فحص عن تحديثات',
|
||||||
'NO_STYLES' => 'لا يوجد أي ستايلات متوفرة..',
|
'ERROR_CHECK_VER' => 'خطأ: لا يمكن جلب معلومات عن آخر نسخة في هذه اللحظة، حاول مجدداً لاحقا!.',
|
||||||
'NEW_PLUGIN_ADDED' => 'لقد تمت إضافة الإضافة البرمجية .. ',
|
'UPDATE_KLJ_NOW' => 'تحديث الآن!',
|
||||||
'PLUGIN_EXISTS_BEFORE' => 'الاضافة هذه موجودة سابقاً بنفس الاصدار أو أعلى ولاتحتاج تحديث !',
|
'U_LAST_VER_KLJ' => 'أنت تستخدم آخر نسخة من كليجا. شكراً لمتابعة نسختك بإستمرار.',
|
||||||
'R_CHECK_UPDATE' => 'فحص عن تحديثات',
|
'U_USE_PRE_RE' => 'أنت تستخدم نسخة تطويرية لم تصدر حتى الآن , اضغط <a href="https://github.com/kleeja-official/kleeja/issues">هنا</a> لإخبارنا بأي أخطاء برمجية وثغرات قد تقابلك.',
|
||||||
'ERROR_CHECK_VER' => 'خطأ: لا يمكن جلب معلومات عن آخر نسخة في هذه اللحظة، حاول مجدداً لاحقا!.',
|
'STYLE_IS_DEFAULT' => 'استايل افتراضي',
|
||||||
'UPDATE_KLJ_NOW' => 'تحديث الآن!',
|
'MAKE_AS_DEFAULT' => 'تعيينه افتراضي',
|
||||||
'U_LAST_VER_KLJ' => 'أنت تستخدم آخر نسخة من كليجا. شكراً لمتابعة نسختك بإستمرار.',
|
'STYLE_NOW_IS_DEFAULT' => 'تم تعيين الاستايل "%s" ستايل افتراضي',
|
||||||
'U_USE_PRE_RE' => 'أنت تستخدم نسخة تطويرية لم تصدر حتى الآن , اضغط <a href="https://github.com/kleeja-official/kleeja/issues">هنا</a> لإخبارنا بأي أخطاء برمجية وثغرات قد تقابلك.',
|
'UPDATE_NOW_S' => 'انت تستخدم نسخة قديمة من كليجا، قم بالترقية فوراً، نسختك الحالية هي %1$s والنسخة الجديدة هي %2$s .',
|
||||||
'STYLE_IS_DEFAULT' => 'استايل افتراضي',
|
'ADD_NEW_EXT' => 'أضف امتداد جديد',
|
||||||
'MAKE_AS_DEFAULT' => 'تعيينه افتراضي',
|
'ADD_NEW_EXT_EXP' => 'قم بكتابة الامتداد ليتم اضافته لهذه المجموعة.',
|
||||||
'STYLE_NOW_IS_DEFAULT' => 'تم تعيين الاستايل "%s" ستايل افتراضي',
|
'EMPTY_EXT_FIELD' => 'حقل الامتداد فارغ!',
|
||||||
'UPDATE_NOW_S' => 'انت تستخدم نسخة قديمة من كليجا، قم بالترقية فوراً، نسختك الحالية هي %1$s والنسخة الجديدة هي %2$s .',
|
'NEW_EXT_ADD' => 'تم إضافة الامتداد الجديد ',
|
||||||
'ADD_NEW_EXT' => 'أضف امتداد جديد',
|
'NEW_EXT_EXISTS_B4' => 'الامتداد الجديد %s موجود مسبقاً !',
|
||||||
'ADD_NEW_EXT_EXP' => 'قم بكتابة الامتداد ليتم اضافته لهذه المجموعة.',
|
'CONFIG_WRITEABLE' => 'ملف config.php قابل للكتابة حالياً ونوصي وبشدة تغيير التصريح له لـ 640 أو على الأقل 644.',
|
||||||
'EMPTY_EXT_FIELD' => 'حقل الامتداد فارغ!',
|
'USERS_NOT_NORMAL_SYS' => 'نظام العضويات الحالي ليس النظام العادي ، أي أن الأعضاء الحاليين لا يمكن تحريرهم من هنا بل من السكربت الذي تم ربط كليجا به، هؤلا الأعضاء يتبعون لنظام العضويات العادي.',
|
||||||
'NEW_EXT_ADD' => 'تم إضافة الامتداد الجديد ',
|
'DIMENSIONS_THMB' => 'أبعاد المصغرات',
|
||||||
'NEW_EXT_EXISTS_B4' => 'الامتداد الجديد %s موجود مسبقاً !',
|
'ADMIN_DELETE_FILE_OK' => 'تم حذف كافة ملفات العضو',
|
||||||
'CONFIG_WRITEABLE' => 'ملف config.php قابل للكتابة حالياً ونوصي وبشدة تغيير التصريح له لـ 640 أو على الأقل 644.',
|
'ADMIN_DELETE_FILES' => 'حذف كل ملفات العضوية',
|
||||||
'USERS_NOT_NORMAL_SYS' => 'نظام العضويات الحالي ليس النظام العادي ، أي أن الأعضاء الحاليين لا يمكن تحريرهم من هنا بل من السكربت الذي تم ربط كليجا به، هؤلا الأعضاء يتبعون لنظام العضويات العادي.',
|
|
||||||
'DIMENSIONS_THMB' => 'أبعاد المصغرات',
|
|
||||||
|
|
||||||
'ADMIN_DELETE_FILE_OK' => 'تم حذف كافة ملفات العضو',
|
|
||||||
'ADMIN_DELETE_FILES' => 'حذف كل ملفات العضوية',
|
|
||||||
|
|
||||||
|
|
||||||
'BCONVERTER' => 'آلة حاسبة لتحويل الأحجام',
|
'BCONVERTER' => 'آلة حاسبة لتحويل الأحجام',
|
||||||
'NO_HTACCESS_DIR_UP' => 'لايوجد ملف .htaccess في مجلد التحميل "%s", هذا يعني انه لو تم رفع اكواد خبيثه فسيتمكن المخترق من تشغيلها وقد يحدث امور لاتحمد عقباها!',
|
'NO_HTACCESS_DIR_UP' => 'لايوجد ملف .htaccess في مجلد التحميل "%s", هذا يعني انه لو تم رفع اكواد خبيثه فسيتمكن المخترق من تشغيلها وقد يحدث امور لاتحمد عقباها!',
|
||||||
'NO_HTACCESS_DIR_UP_THUMB' => 'لايوجد ملف .htaccess في مجلد المصغرات داخل مجلد التحميل "%s", هذا يعني انه لو تم رفع اكواد خبيثه فسيتمكن المخترق المخترق من تشغيلها وقد يحدث امور لاتحمد عقباها!',
|
'NO_HTACCESS_DIR_UP_THUMB' => 'لايوجد ملف .htaccess في مجلد المصغرات داخل مجلد التحميل "%s", هذا يعني انه لو تم رفع اكواد خبيثه فسيتمكن المخترق المخترق من تشغيلها وقد يحدث امور لاتحمد عقباها!',
|
||||||
'COOKIE_DOMAIN' => 'نطاق الكوكيز',
|
'COOKIE_DOMAIN' => 'نطاق الكوكيز',
|
||||||
'COOKIE_NAME' => 'بادئة الكوكيز',
|
'COOKIE_NAME' => 'بادئة الكوكيز',
|
||||||
'COOKIE_PATH' => 'مسار الكوكيز',
|
'COOKIE_PATH' => 'مسار الكوكيز',
|
||||||
'COOKIE_SECURE' => 'تفعيل الكوكيز الآمنة',
|
'COOKIE_SECURE' => 'تفعيل الكوكيز الآمنة',
|
||||||
'SHOWFILESBYIP' => 'عرض ملفات الـ IP',
|
'SHOWFILESBYIP' => 'عرض ملفات الـ IP',
|
||||||
'DELETEALLRES' => 'حذف كل ملفات البحث هذا',
|
'DELETEALLRES' => 'حذف كل ملفات البحث هذا',
|
||||||
'ADMIN_DELETE_FILES_OK' => 'تم حذف %s ملف بنجاح',
|
'ADMIN_DELETE_FILES_OK' => 'تم حذف %s ملف بنجاح',
|
||||||
'ADMIN_DELETE_FILES_NOF' => 'لاتوجد نتائج للقيام بعملية الحذف',
|
'ADMIN_DELETE_FILES_NOF' => 'لاتوجد نتائج للقيام بعملية الحذف',
|
||||||
'NOT_EXSIT_USER' => 'عفواً العضو الذي تبحث عنه غير موجود في قاعدة البيانات .. ربما أنك تحاول الوصول لعضوية غير موجودة او محذوفة!',
|
'NOT_EXSIT_USER' => 'عفواً العضو الذي تبحث عنه غير موجود في قاعدة البيانات .. ربما أنك تحاول الوصول لعضوية غير موجودة او محذوفة!',
|
||||||
'ADMIN_DELETE_NO_FILE' => 'هذا المستخدم لا يملك ملفات لحذفها!',
|
'ADMIN_DELETE_NO_FILE' => 'هذا المستخدم لا يملك ملفات لحذفها!',
|
||||||
'CONFIG_KLJ_MENUS_OTHER' => 'خيارات اخرى',
|
'CONFIG_KLJ_MENUS_OTHER' => 'خيارات اخرى',
|
||||||
'CONFIG_KLJ_MENUS_GENERAL' => 'خيارات عامة',
|
'CONFIG_KLJ_MENUS_GENERAL' => 'خيارات عامة',
|
||||||
'CONFIG_KLJ_MENUS_ALL' => 'عرض كل الخيارات',
|
'CONFIG_KLJ_MENUS_ALL' => 'عرض كل الخيارات',
|
||||||
'CONFIG_KLJ_MENUS_UPLOAD' => 'اعدادات التحميل',
|
'CONFIG_KLJ_MENUS_UPLOAD' => 'اعدادات التحميل',
|
||||||
'CONFIG_KLJ_MENUS_INTERFACE'=> 'خيارات الواجهة والتصميم',
|
'CONFIG_KLJ_MENUS_INTERFACE' => 'خيارات الواجهة والتصميم',
|
||||||
'CONFIG_KLJ_MENUS_ADVANCED' => 'خيارات متقدمة',
|
'CONFIG_KLJ_MENUS_ADVANCED' => 'خيارات متقدمة',
|
||||||
'DELF_CAUTION' => '<small class="delf_caution">تحذير : هذه الخاصية قد تكون خطرة عند وضع ارقام صغيرة أو عند إستخدام الروابط المباشرة.</small>',
|
'DELF_CAUTION' => '<small class="delf_caution">تحذير : هذه الخاصية قد تكون خطرة عند وضع ارقام صغيرة أو عند إستخدام الروابط المباشرة.</small>',
|
||||||
'PACKAGE_N_CMPT_KLJ' => 'هذه الإضافة/الستايل غيره متوافقة مع إصدار كليجا الذي تستخدمه ! .',
|
'PACKAGE_N_CMPT_KLJ' => 'هذه الإضافة/الستايل غيره متوافقة مع إصدار كليجا الذي تستخدمه ! .',
|
||||||
'PHPINI_FILESIZE_SMALL' => 'اعلى حجم يستطيع المستخدمين تحميله لديك "%1$s" بينما إعدادات الـ PHP لديك فيما يتعلق بـ upload_max_filesize هي فقط "%2$s" , قم بسؤال مدير خادمك لرفعها ليستطيع المستخدمين رفع ملفات بالحجم الذي وضعته.',
|
'PHPINI_FILESIZE_SMALL' => 'اعلى حجم يستطيع المستخدمين تحميله لديك "%1$s" بينما إعدادات الـ PHP لديك فيما يتعلق بـ upload_max_filesize هي فقط "%2$s" , قم بسؤال مدير خادمك لرفعها ليستطيع المستخدمين رفع ملفات بالحجم الذي وضعته.',
|
||||||
'PHPINI_MPOSTSIZE_SMALL' => 'بما أنك سمحت بتحميل "%1$s" ملفات دفعة واحدة , فيجب ان تسأل مدير خادمك لرفع قيمة post_max_size من اعدادات ال PHP بالخادم لما يقارب "%2$s" لتضمن لكليجا عمل أفضل.',
|
'PHPINI_MPOSTSIZE_SMALL' => 'بما أنك سمحت بتحميل "%1$s" ملفات دفعة واحدة , فيجب ان تسأل مدير خادمك لرفع قيمة post_max_size من اعدادات ال PHP بالخادم لما يقارب "%2$s" لتضمن لكليجا عمل أفضل.',
|
||||||
'NUMPER_REPORT' => 'البلاغات',
|
'NUMPER_REPORT' => 'البلاغات',
|
||||||
'NO_UP_CHANGE_S' => 'لا يوجد أي تتغير في البيانات , وبالتالي لم يتم تحديث البيانات !.',
|
'NO_UP_CHANGE_S' => 'لا يوجد أي تتغير في البيانات , وبالتالي لم يتم تحديث البيانات !.',
|
||||||
'ADD_HEADER_EXTRA' => 'هيدر إضافي',
|
'ADD_HEADER_EXTRA' => 'هيدر إضافي',
|
||||||
'ADD_FOOTER_EXTRA' => 'فوتر إضافي',
|
'ADD_FOOTER_EXTRA' => 'فوتر إضافي',
|
||||||
'ADMIN_USING_IE6' => 'أنت تستخدم متصفح "انترنت اكسبلور قديم" هذا رغم انك صاحب موقع وتعرف اكثر ممايعرفه المستخدمون العاديون ! قم بترقية متصفحك او استخدم فيرفوكس الآن.',
|
'ADMIN_USING_IE6' => 'أنت تستخدم متصفح "انترنت اكسبلور قديم" هذا رغم انك صاحب موقع وتعرف اكثر ممايعرفه المستخدمون العاديون ! قم بترقية متصفحك او استخدم فيرفوكس الآن.',
|
||||||
'T_CLEANING_FILES_NOW' => 'جاري تنفيذ عملية حذف الملفات الخاملة حالياً على دفعات تفادياً للضغط ,وقت العملية يعتمد على عدد الملفات وحجمها ...',
|
'T_CLEANING_FILES_NOW' => 'جاري تنفيذ عملية حذف الملفات الخاملة حالياً على دفعات تفادياً للضغط ,وقت العملية يعتمد على عدد الملفات وحجمها ...',
|
||||||
'DEPEND_ON_NO_STYLE_ERR' => 'هذا الستايل يعتمد على ستايل "%s" غير الموجود لديك ضمن الستايلات !.',
|
'DEPEND_ON_NO_STYLE_ERR' => 'هذا الستايل يعتمد على ستايل "%s" غير الموجود لديك ضمن الستايلات !.',
|
||||||
'PLUGINS_REQ_NO_STYLE_ERR' => 'هذا الستايل يتطلب ان تكون الإضافة/الاضافات [ %s ] مثبتة لديك , ثبتها وحاول من جديد !.',
|
'PLUGINS_REQ_NO_STYLE_ERR' => 'هذا الستايل يتطلب ان تكون الإضافة/الاضافات [ %s ] مثبتة لديك , ثبتها وحاول من جديد !.',
|
||||||
'KLJ_VER_NO_STYLE_ERR' => 'هذا الستايل يتطلب على الاقل اصدار %s من كليجا .',
|
'KLJ_VER_NO_STYLE_ERR' => 'هذا الستايل يتطلب على الاقل اصدار %s من كليجا .',
|
||||||
'STYLE_DEPEND_ON' => 'يعتمد على ستايل',
|
'STYLE_DEPEND_ON' => 'يعتمد على ستايل',
|
||||||
'MESSAGE_NONE' => 'حتى الآن لا يوجد أي رسائل ..',
|
'MESSAGE_NONE' => 'حتى الآن لا يوجد أي رسائل ..',
|
||||||
'KLEEJA_TEAM' => 'فريق تطوير كليجا',
|
'KLEEJA_TEAM' => 'فريق تطوير كليجا',
|
||||||
'ERR_SEND_MAIL' => 'هناك خطأ بالارسال , حاول مجدداً!',
|
'ERR_SEND_MAIL' => 'هناك خطأ بالارسال , حاول مجدداً!',
|
||||||
'FIND_IP_FILES' => 'تم العثور على',
|
'FIND_IP_FILES' => 'تم العثور على',
|
||||||
'ALPHABETICAL_ORDER_FILES' => 'ترتيب الملفات حسب التسلسل الأبجدي',
|
'ALPHABETICAL_ORDER_FILES' => 'ترتيب الملفات حسب التسلسل الأبجدي',
|
||||||
'ORDER_SIZE' => 'ترتيب الملفات حسب أحجامها من الأكبر حتى الأصغر',
|
'ORDER_SIZE' => 'ترتيب الملفات حسب أحجامها من الأكبر حتى الأصغر',
|
||||||
'ORDER_TOTAL_DOWNLOADS' => 'ترتيب الملفات حسب عدد مرات التحميل',
|
'ORDER_TOTAL_DOWNLOADS' => 'ترتيب الملفات حسب عدد مرات التحميل',
|
||||||
'LIVEXTS' => 'الامتدادات التي لاتمر على صفحة الانتظار',
|
'LIVEXTS' => 'الامتدادات التي لاتمر على صفحة الانتظار',
|
||||||
'COMMA_X' => '<p class="live_xts">افصل بين الامتدادات باستخدام الفاصلة (<span style="font-size:large"> , </span>)</p>',
|
'COMMA_X' => '<p class="live_xts">افصل بين الامتدادات باستخدام الفاصلة (<span style="font-size:large"> , </span>)</p>',
|
||||||
'NO_SEARCH_WORD' => 'لم تقم بكتابة كلمة بحث !',
|
'NO_SEARCH_WORD' => 'لم تقم بكتابة كلمة بحث !',
|
||||||
'USERSECTOUPLOAD' => 'عدد الثواني بين كل عملية رفع',
|
'USERSECTOUPLOAD' => 'عدد الثواني بين كل عملية رفع',
|
||||||
'ADM_UNWANTED_FILES' => 'يبدوا انك قمت بالترقية من نسخة سابقة وبسبب اختلاف اسماء بعض الملفات ستلاحظ وجود ازرار متكررة بلوحة التحكم . <br /> لحل المشكلة قم بإزالة كافة الملفات في المسار "includes/adm" واعادة رفعها من جديد. ايضا قم بحذف ملف admin.php من المجلد الرئيسي اذا وجد.',
|
'ADM_UNWANTED_FILES' => 'يبدوا انك قمت بالترقية من نسخة سابقة وبسبب اختلاف اسماء بعض الملفات ستلاحظ وجود ازرار متكررة بلوحة التحكم . <br /> لحل المشكلة قم بإزالة كافة الملفات في المسار "includes/adm" واعادة رفعها من جديد. ايضا قم بحذف ملف admin.php من المجلد الرئيسي اذا وجد.',
|
||||||
'HTML_URLS_ENABLED_NO_HTCC' => 'لقد قمت بتفعيل روابط الهتمل ولكنك نسيت أن تقوم بإعادة تسمية الملف htaccess.txt في مجلد كليجا الرئيسي ليصبح ".htaccess". اذا لم تفهم شيئاً من هذا الكلام قم بالسؤال في الدعم الفني لكليجا او قم بتعطيل روابط الهتمل .',
|
'HTML_URLS_ENABLED_NO_HTCC' => 'لقد قمت بتفعيل روابط الهتمل ولكنك نسيت أن تقوم بإعادة تسمية الملف htaccess.txt في مجلد كليجا الرئيسي ليصبح ".htaccess". اذا لم تفهم شيئاً من هذا الكلام قم بالسؤال في الدعم الفني لكليجا او قم بتعطيل روابط الهتمل .',
|
||||||
|
'PLUGIN_CONFIRM_ADD' => 'انتبه, الاضافات هي تعديلات برمجية على كليجا و قد تكون ضارة أحياناً , لذا ان كنت غير متأكد من مصدر الإضافة ولم تقم بتحميلها من موقع كليجا فالافضل ان تراجع نفسك الآن . ',
|
||||||
|
'LOADING' => 'جاري التنفيذ',
|
||||||
|
'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' => 'المصغرات معطلة, هذا سيجعل كليجا تقوم بتصغير الصور الكبيرة لك هنا, وبالتالي ستاخذ وقتاً طويلاً لعرضها, فعل المصغرات الآن.',
|
||||||
|
|
||||||
'PLUGIN_CONFIRM_ADD' => 'انتبه, الاضافات هي تعديلات برمجية على كليجا و قد تكون ضارة أحياناً , لذا ان كنت غير متأكد من مصدر الإضافة ولم تقم بتحميلها من موقع كليجا فالافضل ان تراجع نفسك الآن . ',
|
'R_GROUPS' => 'ادارة المجموعات',
|
||||||
'LOADING' => 'جاري التنفيذ',
|
'ESSENTIAL_GROUPS' => 'مجموعات اساسية',
|
||||||
'WELCOME' => 'مرحباً',
|
'CUSTOM_GROUPS' => 'مجموعات معرفة بواسطة المستخدم',
|
||||||
'ENABLE_CAPTCHA' => 'تفعيل كود الامان بكليجا',
|
'EDIT_DATA' => ' تعديل البيانات',
|
||||||
'NO_THUMB_FOLDER' => 'يبدو ان المصغرات مُفعلة لديك ولكن في نفس الوقت مجلد %s غير متوفر مما يمنع عملية انشاء المصغرات, قم بإنشاء المجلد.',
|
'EDIT_ACL' => 'تعديل الصلاحيات',
|
||||||
'DELETE_EARLIER_30DAYS' => 'حذف ما مضى عليه 30 يوماً',
|
'HE_CAN' => 'يستطيع',
|
||||||
'DELETE_ALL' => 'حذف الكل',
|
'HE_CAN_NOT' => 'لا يستطيع',
|
||||||
'DELETE_PROCESS_QUEUED' => 'تم اضافة عملية الحذف لقائمة الانتظار, سيتم تنفيذها تدريجياً لكي لايتم زيادة الحمل على الخادم.',
|
|
||||||
'DELETE_PROCESS_IN_WORK' => 'جاري تنفيذ عملية الحذف التدريجية حالياً ...',
|
|
||||||
'SHOW_FROM_24H' => 'عرض آخر 24 ساعة',
|
|
||||||
'THUMB_DIS_LONGTIME' => 'المصغرات معطلة, هذا سيجعل كليجا تقوم بتصغير الصور الكبيرة لك هنا, وبالتالي ستاخذ وقتاً طويلاً لعرضها, فعل المصغرات الآن.',
|
|
||||||
|
|
||||||
'R_GROUPS' => 'ادارة المجموعات',
|
|
||||||
'ESSENTIAL_GROUPS' => 'مجموعات اساسية',
|
|
||||||
'CUSTOM_GROUPS' => 'مجموعات معرفة بواسطة المستخدم',
|
|
||||||
'EDIT_DATA' => ' تعديل البيانات',
|
|
||||||
'EDIT_ACL' => 'تعديل الصلاحيات',
|
|
||||||
'HE_CAN' => 'يستطيع',
|
|
||||||
'HE_CAN_NOT' => 'لا يستطيع',
|
|
||||||
//ACLS roles
|
//ACLS roles
|
||||||
'ACLS_ENTER_ACP' => 'دخول لوحة التحكم',
|
'ACLS_ENTER_ACP' => 'دخول لوحة التحكم',
|
||||||
'ACLS_ACCESS_FILEUSER' => 'الوصول لمجلد ملفاته',
|
'ACLS_ACCESS_FILEUSER' => 'الوصول لمجلد ملفاته',
|
||||||
'ACLS_ACCESS_FILEUSERS' => 'تصفح مجلدات الملفات للاعضاء',
|
'ACLS_ACCESS_FILEUSERS' => 'تصفح مجلدات الملفات للاعضاء',
|
||||||
'ACLS_ACCESS_CALL' => 'الوصول لصفحة اتصل بنا',
|
'ACLS_ACCESS_CALL' => 'الوصول لصفحة اتصل بنا',
|
||||||
'ACLS_ACCESS_REPORT' => 'إظهار صفحة ابلاغ عن محتوى',
|
'ACLS_ACCESS_REPORT' => 'إظهار صفحة ابلاغ عن محتوى',
|
||||||
'ACLS_ACCESS_STATS' => 'الوصول لصفحة الإحصائيات',
|
'ACLS_ACCESS_STATS' => 'الوصول لصفحة الإحصائيات',
|
||||||
|
|
||||||
'GROUP_IS_DEFAULT' => 'هذه المجموعة افتراضية عند التسجيل',
|
'GROUP_IS_DEFAULT' => 'هذه المجموعة افتراضية عند التسجيل',
|
||||||
'ADD_NEW_GROUP' => 'اضف مجموعة جديدة',
|
'ADD_NEW_GROUP' => 'اضف مجموعة جديدة',
|
||||||
'DELETE_GROUP' => 'حذف مجموعة',
|
'DELETE_GROUP' => 'حذف مجموعة',
|
||||||
'GROUP_NAME' => 'اسم المجموعة',
|
'GROUP_NAME' => 'اسم المجموعة',
|
||||||
'COPY_FROM' => 'نسخ من',
|
'COPY_FROM' => 'نسخ من',
|
||||||
'USERNAME_NOT_YOU' => 'ليس انت؟ %1$sسجل خروج%2$s',
|
'USERNAME_NOT_YOU' => 'ليس انت؟ %1$sسجل خروج%2$s',
|
||||||
'DEFAULT_GROUP' => 'المجموعة الافتراضية',
|
'DEFAULT_GROUP' => 'المجموعة الافتراضية',
|
||||||
'G_USERS_MOVE_TO' => 'نقل اعضاء المجموعة لـ',
|
'G_USERS_MOVE_TO' => 'نقل اعضاء المجموعة لـ',
|
||||||
'TAKEN_NAMES' => 'هذا الاسم من الاسماء المحجوزة، قم باختيار غيره!.',
|
'TAKEN_NAMES' => 'هذا الاسم من الاسماء المحجوزة، قم باختيار غيره!.',
|
||||||
'GROUP_DELETED' => 'تم حذف المجموعة "%1$s" وتم نقل العضويات الخاصة بها للمجموعة "%2$s".',
|
'GROUP_DELETED' => 'تم حذف المجموعة "%1$s" وتم نقل العضويات الخاصة بها للمجموعة "%2$s".',
|
||||||
'NO_MOVE_SAME_GRP' => 'لايمكن نقل الاعضاء لنفس المجموعة !.',
|
'NO_MOVE_SAME_GRP' => 'لايمكن نقل الاعضاء لنفس المجموعة !.',
|
||||||
'DEFAULT_GRP_NO_DEL' => 'لايمكن حذف المجموعة الافتراضية, قم بتغيير المجموعة الافتراضية لمجموعة اخرى ثم قم بحذف هذه المجموعة من جديد!.',
|
'DEFAULT_GRP_NO_DEL' => 'لايمكن حذف المجموعة الافتراضية, قم بتغيير المجموعة الافتراضية لمجموعة اخرى ثم قم بحذف هذه المجموعة من جديد!.',
|
||||||
'GROUP_ADDED' => 'تم اضافة المجموعة "%s" بنجاح... ',
|
'GROUP_ADDED' => 'تم اضافة المجموعة "%s" بنجاح... ',
|
||||||
'SEARCH4FILES_BYIP' => 'بحث عن الملفات بواسطة الـ IP',
|
'SEARCH4FILES_BYIP' => 'بحث عن الملفات بواسطة الـ IP',
|
||||||
'SEARCH4FILES_BYUSER' => 'بحث عن الملفات لهذا المستخدم',
|
'SEARCH4FILES_BYUSER' => 'بحث عن الملفات لهذا المستخدم',
|
||||||
'USER_DELETED' => 'تم حذف المستخدم بنجاح !.',
|
'USER_DELETED' => 'تم حذف المستخدم بنجاح !.',
|
||||||
'USER_ADDED' => 'تم اضافة المستخدم بنجاح..',
|
'USER_ADDED' => 'تم اضافة المستخدم بنجاح..',
|
||||||
'DIRECT_FILE_NOTE' => 'هذا ملف مباشر, الملفات المباشرة لايتم عمل احصائيات لها.',
|
'DIRECT_FILE_NOTE' => 'هذا ملف مباشر, الملفات المباشرة لايتم عمل احصائيات لها.',
|
||||||
'IMAGEFOLDER' => 'مجلد الصور والملفات المباشرة',
|
'IMAGEFOLDER' => 'مجلد الصور والملفات المباشرة',
|
||||||
'IMAGEFOLDEREXTS' => 'صيغ الصور والملفات المباشرة - مثل: mp3, mp4, swf (لن تمر على صفحة إنتظار وسيتم تخزينها بمجلد مختلف أن أردت)',
|
'IMAGEFOLDEREXTS' => 'صيغ الصور والملفات المباشرة - مثل: mp3, mp4, swf (لن تمر على صفحة إنتظار وسيتم تخزينها بمجلد مختلف أن أردت)',
|
||||||
'IMAGEFOLDERE' => 'تغيير اسم الملف او الصورة المباشرة',
|
'IMAGEFOLDERE' => 'تغيير اسم الملف او الصورة المباشرة',
|
||||||
'LAST_VIEW' => 'آخر استعراض',
|
'LAST_VIEW' => 'آخر استعراض',
|
||||||
'HURRY_HURRY' => 'إعدادات سريعة',
|
'HURRY_HURRY' => 'إعدادات سريعة',
|
||||||
'RESYNC' => 'إعادة مزامنة',
|
'RESYNC' => 'إعادة مزامنة',
|
||||||
'DEL_CACHE' => 'حذف الكاش - الملفات المؤقتة',
|
'DEL_CACHE' => 'حذف الكاش - الملفات المؤقتة',
|
||||||
'SYNCING' => 'جاري عمل المزامنة: (%s), إنتظر ...',
|
'SYNCING' => 'جاري عمل المزامنة: (%s), إنتظر ...',
|
||||||
'SYNCING_DONE' => 'تم الإنتهاء من عمل المزامنة (%s).',
|
'SYNCING_DONE' => 'تم الإنتهاء من عمل المزامنة (%s).',
|
||||||
'WHY_SYNCING' => 'كليجا تستخدم التزايد التلقائي بحيث لايتم حساب الاعداد كل مرة لزيادة اداء كليجا, استخدم هذه الميزة بعد الترقية او عندما يتم طلب ذلك منك.',
|
'WHY_SYNCING' => 'كليجا تستخدم التزايد التلقائي بحيث لايتم حساب الاعداد كل مرة لزيادة اداء كليجا, استخدم هذه الميزة بعد الترقية او عندما يتم طلب ذلك منك.',
|
||||||
'REPAIR_DB_TABLES' => 'إصلاح جداول قاعدة البيانات',
|
'REPAIR_DB_TABLES' => 'إصلاح جداول قاعدة البيانات',
|
||||||
'NO_RESULT_USE_SYNC' => 'لايوجد نتائج, اذا كان المركز جديد فهذا امر عادي. <br/> اما اذا كنت قد قمت بالترقية مؤخرا فقم بعمل مزامنة من صفحة الصيانة لعدد الملفات او الصور.',
|
'NO_RESULT_USE_SYNC' => 'لايوجد نتائج, اذا كان المركز جديد فهذا امر عادي. <br/> اما اذا كنت قد قمت بالترقية مؤخرا فقم بعمل مزامنة من صفحة الصيانة لعدد الملفات او الصور.',
|
||||||
'ADVICE_CRON_LINK' => 'يفضل وضع رابط طابور المهام المتكررة كعملية Cron كل ساعة أو ساعتين',
|
'ADVICE_CRON_LINK' => 'يفضل وضع رابط طابور المهام المتكررة كعملية Cron كل ساعة أو ساعتين',
|
||||||
'UPLOAD_LOCAL_PC' => 'رفع من جهازك',
|
'UPLOAD_LOCAL_PC' => 'رفع من جهازك',
|
||||||
'NO_ZIP_ARCHIVE' => 'يبدو أن ZipArchive ليس متوفراً علي خادمك، قم بتثبيته فهو من المتطلبات.',
|
'NO_ZIP_ARCHIVE' => 'يبدو أن ZipArchive ليس متوفراً علي خادمك، قم بتثبيته فهو من المتطلبات.',
|
||||||
'EXTRACT_ZIP_FAILED' => 'صادفتنا مشكلة أثناء فك الأرشيف! تأكد من أنه ملف zip صالح، وأن مجلد "%s" قابل للكتابة.',
|
'EXTRACT_ZIP_FAILED' => 'صادفتنا مشكلة أثناء فك الأرشيف! تأكد من أنه ملف zip صالح، وأن مجلد "%s" قابل للكتابة.',
|
||||||
'NO_PROBLEM_AFTER_ZIP' => 'لقد تم فك الملف بنجاح وهو جاهز للتفعيل.',
|
'NO_PROBLEM_AFTER_ZIP' => 'لقد تم فك الملف بنجاح وهو جاهز للتفعيل.',
|
||||||
'SESSION_ENDED' => 'انتهت الجلسة، هل تريد تسجل الدخول من جديد؟',
|
'SESSION_ENDED' => 'انتهت الجلسة، هل تريد تسجل الدخول من جديد؟',
|
||||||
//3.0.3
|
'CUSTOMIZATION' => 'تخصيص',
|
||||||
'CUSTOMIZATION' => 'تخصيص',
|
'SHOW' => 'عرض',
|
||||||
'SHOW' => 'عرض',
|
'HIDE' => 'إخفاء',
|
||||||
'HIDE' => 'إخفاء',
|
'VIEW' => 'إستعراض',
|
||||||
'VIEW' => 'إستعراض',
|
'INSTALL' => 'تثبيت',
|
||||||
'INSTALL' => 'تثبيت',
|
'CLOSE' => 'إغلاق',
|
||||||
'CLOSE' => 'إغلاق',
|
'STATS_BOXES' => 'صناديق الإحصائيات',
|
||||||
'STATS_BOXES' => 'صناديق الإحصائيات',
|
'ITEM_UPDATED' => 'تم تحديث "%s" بنجاح ..',
|
||||||
'ITEM_UPDATED' => 'تم تحديث "%s" بنجاح ..',
|
'ITEM_DOWNLOADED' => 'تم تحميل "%s" بنجاح! يمكنك تفعيلها لاحقاً.',
|
||||||
'ITEM_DOWNLOADED' => 'تم تحميل "%s" بنجاح! يمكنك تفعيلها لاحقاً.',
|
'DOWNLOADED_FILE_NOT_FOUND' => 'الملف الذي تم تحميله مفقود لايمكن إيجاده!',
|
||||||
'DOWNLOADED_FILE_NOT_FOUND' => 'الملف الذي تم تحميله مفقود لايمكن إيجاده!',
|
'PACKAGE_REMOTE_FILE_MISSING' => 'حزمة "%s" ليست موجودة على متجر كليجا الخارجي!',
|
||||||
'PACKAGE_REMOTE_FILE_MISSING' => 'حزمة "%s" ليست موجودة على متجر كليجا الخارجي!',
|
'STORE_SERVER_ERROR' => 'واجهنا خطأ أثناء الإتصال بخادم متجر كليجا الخارجي...',
|
||||||
'STORE_SERVER_ERROR' => 'واجهنا خطأ أثناء الإتصال بخادم متجر كليجا الخارجي...',
|
'INSTALLED_PLUGINS' => 'الإضافات المثبتة',
|
||||||
'INSTALLED_PLUGINS' => 'الإضافات المثبتة',
|
'LOCAL_PLUGINS' => 'الإضافات المحلية (غير مثبتة)',
|
||||||
'LOCAL_PLUGINS' => 'الإضافات المحلية',
|
'KLEEJA_STORE' => 'متجر كليجا',
|
||||||
'KLEEJA_STORE' => 'متجر كليجا',
|
'KLJ_VER_NO_PLUGIN' => 'هذه الإضافة/الستايل يمكنها العمل على إصدار كليجا %1$s حتى إصدار %2$s.',
|
||||||
'KLJ_VER_NO_PLUGIN' => 'هذه الإضافة/الستايل يمكنها العمل على إصدار كليجا %1$s حتى إصدار %2$s.',
|
'VERSION' => 'الإصدار',
|
||||||
'VERSION' => 'الإصدار',
|
'DEVELOPER' => 'المطور',
|
||||||
'DEVELOPER' => 'المطور',
|
'ALL_PLUGINS_UPDATED' => 'كافة الإضافات مُحدثة. رائع!',
|
||||||
'ALL_PLUGINS_UPDATED' => 'كافة الإضافات مُحدثة. رائع!',
|
'ALL_STYLES_UPDATED' => 'كافة الستايلات مُحدثة. رائع!',
|
||||||
'ALL_STYLES_UPDATED' => 'كافة الستايلات مُحدثة. رائع!',
|
'UPDATE_ERR_FETCH_PACKAGE' => 'واجهتنا مشكلة أثناء تحميل النسخة من الخادم!',
|
||||||
'UPDATE_ERR_FETCH_PACKAGE' => 'واجهتنا مشكلة أثناء تحميل النسخة من الخادم!',
|
'UPDATE_BACKUP_CREATE_FAILED' => 'لم نستطع إنشاء ملف النسخة الإحتياطية في مجلد الكاش!',
|
||||||
'UPDATE_BACKUP_CREATE_FAILED' => 'لم نستطع إنشاء ملف النسخة الإحتياطية في مجلد الكاش!',
|
'UPDATE_PROCESS_FAILED' => 'عملية التحديث فشلت!',
|
||||||
'UPDATE_PROCESS_FAILED' => 'عملية التحديث فشلت!',
|
'UPDATE_PROCESS_DONE' => 'تم تحديث كليجا إلى النسخة `%s` بنجاح...',
|
||||||
'UPDATE_PROCESS_DONE' => 'تم تحديث كليجا إلى النسخة `%s` بنجاح...',
|
'UPDATE_PROCESS_STEP1' => 'جلب حزمة آخر نسخة من كليجا...',
|
||||||
'UPDATE_PROCESS_STEP1' => 'جلب حزمة آخر نسخة من كليجا...',
|
'UPDATE_PROCESS_STEP2' => 'إنشاء وعاء نسخة إحتياطية وفك حزمة آخر نسخة ...',
|
||||||
'UPDATE_PROCESS_STEP2' => 'إنشاء وعاء نسخة إحتياطية وفك حزمة آخر نسخة ...',
|
'UPDATE_PROCESS_STEP3' => 'الترقية للنسخة الجديدة (تحديث الملفات وقاعدة البيانات) ...',
|
||||||
'UPDATE_PROCESS_STEP3' => 'الترقية للنسخة الجديدة (تحديث الملفات وقاعدة البيانات) ...',
|
'RELEASE_NOTE' => 'معلومات الإصدار',
|
||||||
'RELEASE_NOTE' => 'معلومات الإصدار',
|
'UPDATE_ALL' => 'تحديث الكُل',
|
||||||
'UPDATE_ALL' => 'تحديث الكُل',
|
'CANT_DEL_DEFAULT_STYLE' => 'لا يمكنك حذف الستايل الإفتراضي! قم بتعيين ستايل آخر لتستطيع حذفه.',
|
||||||
'CANT_DEL_DEFAULT_STYLE' => 'لا يمكنك حذف الستايل الإفتراضي! قم بتعيين ستايل آخر لتستطيع حذفه.',
|
'NOTIFICATIONS' => 'تنبيهات',
|
||||||
'NOTIFICATIONS' => 'تنبيهات',
|
'KJ_TWEETS' => 'تغريدات كليجا',
|
||||||
'KJ_TWEETS' => 'تغريدات كليجا',
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,236 +6,233 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
//language information
|
//language information
|
||||||
'DIR' => 'rtl',
|
'DIR' => 'rtl',
|
||||||
'LANG_SMALL_NAME' => 'ar-sa',
|
'LANG_SMALL_NAME' => 'ar-sa',
|
||||||
|
|
||||||
'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' => 'التالي »',
|
'NEXT' => 'التالي »',
|
||||||
'PREV' => '« السابق',
|
'PREV' => '« السابق',
|
||||||
'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 احرف و 25 حرف وبدون مسافات أو أحرف خاصة (فقط _- مسموحة)!.',
|
'WRONG_NAME' => 'الاسم يجب أن يكون بين 4 احرف و 25 حرف وبدون مسافات أو أحرف خاصة (فقط _- مسموحة)!.',
|
||||||
'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' => 'لم تحدد ملف..!',
|
||||||
'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' => 'عضو',
|
||||||
'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' => 'بالضغط على الزر بالاسفل فانت توافق على %1$sشروط الخدمة%2$s.',
|
'AGREE_RULES' => 'بالضغط على الزر بالاسفل فانت توافق على %1$sشروط الخدمة%2$s.',
|
||||||
'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',
|
'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' => 'المركز للأعضاء فقط ، قم بالتسجيل أو بالدخول حتى تتمكن من التحميل.',
|
||||||
'AUTH_INTEGRATION_N_UTF8_T' => '%s ليست utf8',
|
'SHOW_MY_FILECP' => 'السماح بعرض ملفاتي',
|
||||||
'AUTH_INTEGRATION_N_UTF8' => '%s يجب أن يكون ترميز قاعدة البيانات الخاصة به utf8 لكي يتم الربط مع كليجا!.',
|
'PASS_CHANGE' => 'تغيير كلمة المرور',
|
||||||
'SCRIPT_AUTH_PATH_WRONG' => 'مسار السكربت %s الذي تم ربط عضويات كليجا معه خاطئ ,قم بضبطه',
|
'EDIT_U_AVATER' => 'تغيير الصورة الرمزية',
|
||||||
'SHOW_MY_FILECP' => 'السماح بعرض ملفاتي',
|
'EDIT_U_AVATER_LINK' => 'لتغيير الصورة الرمزية, قم بالدخول الى الموقع %1$s" اضغط هنا "%2$s والتسجيل بالبريد الخاص بك. ',
|
||||||
'PASS_CHANGE' => 'تغيير كلمة المرور',
|
'MOST_EVER_ONLINE' => 'اكثر عدد تواجد للاعضاء بالمركز كان',
|
||||||
'EDIT_U_AVATER' => 'تغيير الصورة الرمزية',
|
'ON' => 'في',
|
||||||
'EDIT_U_AVATER_LINK' => 'لتغيير الصورة الرمزية, قم بالدخول الى الموقع %1$s" اضغط هنا "%2$s والتسجيل بالبريد الخاص بك. ',
|
'LAST_REG' => 'آخر عضو مسجل',
|
||||||
'MOST_EVER_ONLINE' => 'اكثر عدد تواجد للاعضاء بالمركز كان',
|
'NEW_USER' => 'عضو جديد',
|
||||||
'ON' => 'في',
|
'COPYRIGHTS_X' => 'جميع الحقوق محفوظة',
|
||||||
'LAST_REG' => 'آخر عضو مسجل',
|
'CHECK_ALL' => 'تحديد الكل',
|
||||||
'NEW_USER' => 'عضو جديد',
|
'BROSWERF' => 'استعراض الملفات',
|
||||||
'COPYRIGHTS_X' => 'جميع الحقوق محفوظة',
|
'REMME' => 'تذكرني',
|
||||||
'CHECK_ALL' => 'تحديد الكل',
|
'REMME_EXP' => 'علًم هذا الخيار ان كان جهازك غير مشترك مع غيرك',
|
||||||
'BROSWERF' => 'استعراض الملفات',
|
'HOUR' => 'ساعة',
|
||||||
'REMME' => 'تذكرني',
|
'5HOURS' => '5 ساعات',
|
||||||
'REMME_EXP' => 'علًم هذا الخيار ان كان جهازك غير مشترك مع غيرك',
|
'DAY' => 'يوم',
|
||||||
'HOUR' => 'ساعة',
|
'WEEK' => 'اسبوع',
|
||||||
'5HOURS' => '5 ساعات',
|
'MONTH' => 'شهر',
|
||||||
'DAY' => 'يوم',
|
'YEAR' => 'سنة',
|
||||||
'WEEK' => 'اسبوع',
|
'INVALID_FORM_KEY' => 'نموذج خاطئ , او انك تعديت الوقت المسموح فيه لملأ النموذج، أعد العملية.',
|
||||||
'MONTH' => 'شهر',
|
'INVALID_GET_KEY' => 'عفوا, هذا الرابط خاص بجلسة انتهت مدتها وتم منعه للامان, اعد المحاولة .',
|
||||||
'YEAR' => 'سنة',
|
'REFRESH_CAPTCHA' => 'إضغط لتحديث الصورة بأخرى جديدة',
|
||||||
'INVALID_FORM_KEY' => 'نموذج خاطئ , او انك تعديت الوقت المسموح فيه لملأ النموذج، أعد العملية.',
|
'CHOSE_F' => 'فضلا قم بإختيار ملف واحد على الاقل',
|
||||||
'INVALID_GET_KEY' => 'عفوا, هذا الرابط خاص بجلسة انتهت مدتها وتم منعه للامان, اعد المحاولة .',
|
'FILES_DELETED' => 'تم حذف الملفات المحددة بنجاح !',
|
||||||
'REFRESH_CAPTCHA' => 'إضغط لتحديث الصورة بأخرى جديدة',
|
'ALL_FILES' => 'عدد جميع الملفات',
|
||||||
'CHOSE_F' => 'فضلا قم بإختيار ملف واحد على الاقل',
|
'ALL_IMAGES' => 'عدد جميع الصور',
|
||||||
'FILES_DELETED' => 'تم حذف الملفات المحددة بنجاح !',
|
'WAIT_LOADING' => 'فضلاً انتظر جاري رفع الملفات .....',
|
||||||
'ALL_FILES' => 'عدد جميع الملفات',
|
'NOTICECLOSED' => 'تنبيه : المركز في وضع الصيانة',
|
||||||
'ALL_IMAGES' => 'عدد جميع الصور',
|
'UNKNOWN' => 'غير معروف',
|
||||||
'WAIT_LOADING' => 'فضلاً انتظر جاري رفع الملفات .....',
|
'WE_UPDATING_KLEEJA_NOW' => 'الموقع مغلق للتطوير والترقية لاخر نسخة , لذا يرجى الصبر ...',
|
||||||
'NOTICECLOSED' => 'تنبيه : المركز مغلق',
|
'ERROR_TRY_AGAIN' => 'خطأ , حاول مجدداً.',
|
||||||
'UNKNOWN' => 'غير معروف',
|
'VIEW' => 'عرض',
|
||||||
'WE_UPDATING_KLEEJA_NOW' => 'الموقع مغلق للتطوير والترقية لاخر نسخة , لذا يرجى الصبر ...',
|
'NONE' => 'لا شيء',
|
||||||
'ERROR_TRY_AGAIN' => 'خطأ , حاول مجدداً.',
|
'NOTHING' => 'لا يوجد شيء!',
|
||||||
'VIEW' => 'عرض',
|
'YOU_HAVE_TO_WAIT' => 'انتظر %s ثانية وبعد انقضاء الفترة الزمنية قم بإعادة رفع الملفات',
|
||||||
'NONE' => 'لا شيء',
|
'REPEAT_PASS' => 'اعد كلمة المرور',
|
||||||
'NOTHING' => 'لا يوجد شيء!',
|
'PASS_NEQ_PASS2' => 'كلمات المرور غير متطابقة !',
|
||||||
'YOU_HAVE_TO_WAIT' => 'انتظر %s ثانية وبعد انقضاء الفترة الزمنية قم بإعادة رفع الملفات',
|
'ADMINS' => 'المسؤولين',
|
||||||
'REPEAT_PASS' => 'اعد كلمة المرور',
|
'GUESTS' => 'الزوار',
|
||||||
'PASS_NEQ_PASS2' => 'كلمات المرور غير متطابقة !',
|
'USERS' => 'الاعضاء',
|
||||||
'ADMINS' => 'المسؤولين',
|
'DELETE_INSTALL_FOLDER' => 'لتستطيع استخدام كليجا الآن، قم بحذف مجلد install. لن تعمل كليجا بوجود هذا المجلد.',
|
||||||
'GUESTS' => 'الزوار',
|
'HV_NOT_PRVLG_ACCESS' => 'لاتملك صلاحيات للوصول لهذه الصفحة',
|
||||||
'USERS' => 'الاعضاء',
|
|
||||||
'DELETE_INSTALL_FOLDER' => 'لتستطيع استخدام كليجا الآن، قم بحذف مجلد install. لن تعمل كليجا بوجود هذا المجلد.',
|
|
||||||
'HV_NOT_PRVLG_ACCESS' => 'لاتملك صلاحيات للوصول لهذه الصفحة',
|
|
||||||
|
|
||||||
|
|
||||||
'W_PERIODS_0' => 'ثانية',
|
'W_PERIODS_0' => 'ثانية',
|
||||||
@@ -266,21 +263,20 @@ return [
|
|||||||
'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' => 'جر وأسقط ملف هنا للرفع…',
|
'DRAG_AND_DROP' => 'جر وأسقط ملف هنا للرفع…',
|
||||||
'OR_MANUAL_SELECT' => 'أو قم بالضغط هنا <em>لإختيار</em> ملف يدوياً..',
|
'OR_MANUAL_SELECT' => 'أو قم بالضغط هنا <em>لإختيار</em> ملف يدوياً..',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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',
|
'INST_CHANG_CONFIG' => 'بعض البيانات المهمة ناقصة إملأ ملف config.php',
|
||||||
'INST_CONNCET_ERR' => 'لا يمكن الإتصال ...',
|
'INST_CONNCET_ERR' => 'لا يمكن الإتصال ...',
|
||||||
|
'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 <span style="color:red">(الموقع لن يعمل في حال وجود المجلد)</span>',
|
'INST_END' => 'معالج التثبيت انتهى، يجب الآن حذف مجلد INSTALL <span style="color:red">(الموقع لن يعمل في حال وجود المجلد)</span>',
|
||||||
'INST_NOTE_D' => 'أي ملاحظات أو مشاكل تتعلق بأداء كليجا، نرجو التبليغ عبر <a href="https://github.com/kleeja-official/kleeja/issues">مركز الأخطاء</a>',
|
'INST_NOTE_D' => 'أي ملاحظات أو مشاكل تتعلق بأداء كليجا، نرجو التبليغ عبر <a href="https://github.com/kleeja-official/kleeja/issues">مركز الأخطاء</a>',
|
||||||
'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_NW' => 'أدخل بيانات القاعدة بشكل صحيح ، واضغط على (تصدير الملف)وسيقوم المعالج بتصدير ملف config.php لتضعه في مجلد السكربت الرئيسي كما يتضح لك بالصورة!',
|
||||||
'DB_INFO' => 'أدخل معلومات قاعدة البيانات',
|
'DB_INFO' => 'أدخل معلومات قاعدة البيانات',
|
||||||
'DB_SERVER' => 'الخادم',
|
'DB_SERVER' => 'الخادم',
|
||||||
'DB_TYPE' => 'نوع قاعدة البيانات',
|
'DB_TYPE' => 'نوع قاعدة البيانات',
|
||||||
'DB_TYPE_MYSQL' => 'MySQL القياسي',
|
'DB_TYPE_MYSQL' => 'MySQL',
|
||||||
'DB_TYPE_MYSQLI' => 'MySQL المطور',
|
'DB_TYPE_SQLITE' => 'SQLite',
|
||||||
'DB_USER' => 'اسم المستخدم لقاعدة البيانات',
|
'DB_USER' => 'اسم المستخدم لقاعدة البيانات',
|
||||||
'DB_PASSWORD' => 'كلمة المرور لقاعدة البيانات',
|
'DB_PASSWORD' => 'كلمة المرور لقاعدة البيانات',
|
||||||
'DB_NAME' => 'إسم قاعدة البيانات',
|
'DB_NAME' => 'إسم قاعدة البيانات',
|
||||||
'DB_PREFIX' => 'بادئة الجداول',
|
'DB_PREFIX' => 'بادئة الجداول',
|
||||||
'VALIDATING_FORM_WRONG' => 'يبدو أنك تركت أحد الحقول المطلوبة فارغاً ...',
|
'VALIDATING_FORM_WRONG' => 'يبدو أنك تركت أحد الحقول المطلوبة فارغاً ...',
|
||||||
'CONFIG_EXISTS' => 'تم إيجاد ملف config.php قم بالمتابعة ...',
|
'CONFIG_EXISTS' => 'تم إيجاد ملف config.php قم بالمتابعة ...',
|
||||||
'INST_SUBMIT_CONFIGOK' => 'أرفع ملف config.php في دليل كليجا الرئيسي وتابع عملية التثبيت !',
|
'INST_SUBMIT_CONFIGOK' => 'أرفع ملف config.php في دليل كليجا الرئيسي وتابع عملية التثبيت !',
|
||||||
'INST_EXPORT' => 'تصدير الملف',
|
'INST_EXPORT' => 'تصدير الملف',
|
||||||
'INST_OTHER_INFO' => 'معلومات اخرى',
|
'INST_OTHER_INFO' => 'معلومات اخرى',
|
||||||
'URLS_TYPES' => 'شكل روابط الملفات',
|
'URLS_TYPES' => 'شكل روابط الملفات',
|
||||||
'DEFAULT' => 'الافتراضي - ينصح به',
|
'DEFAULT' => 'الافتراضي - ينصح به',
|
||||||
'FILENAME_URL' => 'اسماء الملفات',
|
'FILENAME_URL' => 'اسماء الملفات',
|
||||||
'DIRECT_URL' => 'روابط مباشرة - لايتم تسجيل إحصائيات',
|
'DIRECT_URL' => 'روابط مباشرة - لايتم تسجيل إحصائيات',
|
||||||
'LIKE_THIS' => 'مثال',
|
'LIKE_THIS' => 'مثال',
|
||||||
|
|
||||||
|
|
||||||
'FUNCTIONS_CHECK' => 'فحص الدوال',
|
'FUNCTIONS_CHECK' => 'فحص الدوال',
|
||||||
'RE_CHECK' => 'إعادة الفحص',
|
'RE_CHECK' => 'إعادة الفحص',
|
||||||
'FUNCTION_IS_NOT_EXISTS' => 'الدالة %s مُعطلة لديك.',
|
'FUNCTION_IS_NOT_EXISTS' => 'الدالة %s مُعطلة لديك.',
|
||||||
'FUNCTION_IS_EXISTS' => 'الدالة %s مُفعلة لديك.',
|
'FUNCTION_IS_EXISTS' => 'الدالة %s مُفعلة لديك.',
|
||||||
'FUNCTION_DISC_UNLINK' => 'دالة unlink يتم استخدامها لحذف الملفات وأيضا لحذف ملفات الكاش وتحديثها.',
|
'FUNCTION_DISC_UNLINK' => 'دالة unlink يتم استخدامها لحذف الملفات وأيضا لحذف ملفات الكاش وتحديثها.',
|
||||||
'FUNCTION_DISC_GD' => 'دالة imagecreatetruecolor هي من دوال مكتبة GD التي تستخدم لإنشاء مصغرات الصور والكود الأمني , عدم وجود الداله غالبا يعني عدم تواجد مكتبه GD على السيرفر .. ',
|
'FUNCTION_DISC_GD' => 'دالة imagecreatetruecolor هي من دوال مكتبة GD التي تستخدم لإنشاء مصغرات الصور والكود الأمني , عدم وجود الداله غالبا يعني عدم تواجد مكتبه GD على السيرفر .. ',
|
||||||
'FUNCTION_DISC_FOPEN' => 'دالة fopen تستخدم في التحكم بالستايل والملفات في كليجا.',
|
'FUNCTION_DISC_FOPEN' => 'دالة fopen تستخدم في التحكم بالستايل والملفات في كليجا.',
|
||||||
'FUNCTION_DISC_MUF' => 'دالة move_uploaded_file تستخدم لتحميل الملفات وهي اهم دالة في السكربت.',
|
'FUNCTION_DISC_MUF' => 'دالة move_uploaded_file تستخدم لتحميل الملفات وهي اهم دالة في السكربت.',
|
||||||
|
|
||||||
'ADVICES_CHECK' => 'فحص متقدم (يمكن تثبيت كليجا بدون تحقق هذا الفحص , لكنه مجرد معلومات لك)',
|
'ADVICES_CHECK' => 'فحص متقدم (يمكن تثبيت كليجا بدون تحقق هذا الفحص , لكنه مجرد معلومات لك)',
|
||||||
'ZIPARCHIVE_LIB' => '<span style="color:red;padding:0 6px">مكتبة ZipArchive غير متوفرة في خادمك !</span><br /> هذه المكتبة مهمة لفك الإضافات والترقية لنسخ جديدة من كليجا!',
|
'ZIPARCHIVE_LIB' => '<span style="color:red;padding:0 6px">مكتبة ZipArchive غير متوفرة في خادمك !</span><br /> هذه المكتبة مهمة لفك الإضافات والترقية لنسخ جديدة من كليجا!',
|
||||||
|
|
||||||
//UPDATOR
|
//UPDATOR
|
||||||
'INST_UPDATE_CUR_VER_IS_UP' => 'نسختك الحالية محدثة لآخر نسخة ... رائع!',
|
'INST_UPDATE_CUR_VER_IS_UP' => 'نسختك الحالية محدثة لآخر نسخة ... رائع!',
|
||||||
|
|
||||||
|
|
||||||
'INST_UPDATE_IS_FINISH' => 'معالج التحديث انتهى .. يجب الآن حذف مجلد INSTALL و متابعة عملك في كليجا .',
|
'INST_UPDATE_IS_FINISH' => 'معالج التحديث انتهى .. يجب الآن حذف مجلد INSTALL و متابعة عملك في كليجا .',
|
||||||
|
|
||||||
'INST_PHP_LESSMIN' => 'لتثبيت كليجا يجب على الأقل أن يكون لديك اصدار PHP %1$s , وانت لديك اصدار PHP %2$s.',
|
'INST_PHP_LESSMIN' => 'لتثبيت كليجا يجب على الأقل أن يكون لديك اصدار PHP %1$s , وانت لديك اصدار PHP %2$s.',
|
||||||
'INST_MYSQL_LESSMIN' => 'لتثبيت كليجا يجب على الأقل أن يكون لديك اصدار MYSQL %1$s , وانت لديك اصدار MYSQL %2$s.',
|
'INST_MYSQL_LESSMIN' => 'لتثبيت كليجا يجب على الأقل أن يكون لديك اصدار MYSQL %1$s , وانت لديك اصدار MYSQL %2$s.',
|
||||||
'IS_IT_OFFICIAL' => 'هل قمت بتحميل النسخة من الموقع الرسمي Kleeja.com ؟',
|
'IS_IT_OFFICIAL' => 'هل قمت بتحميل النسخة من الموقع الرسمي Kleeja.com ؟',
|
||||||
'IS_IT_OFFICIAL_DESC' => 'يصلنا الكثير من الشكاوي والتساؤلات عن سبب بعض المشاكل التي تحدث في بعض النسخ ولا نستطيع معرفة المشكلة غالباً , لكن بعد البحث وجدنا ان هناك نسخاً يتم تحميلها من مواقع اخرى غير رسمية وتكون اما معدلة بطريقة بدائية او مزروع داخلها اكواد خبيثة.<span class="sure">لذا , هل انت متأكد من ان نسختك هذه تم تحميلها من الموقع الرسمي : kleeja.com ؟</span>',
|
'IS_IT_OFFICIAL_DESC' => 'يصلنا الكثير من الشكاوي والتساؤلات عن سبب بعض المشاكل التي تحدث في بعض النسخ ولا نستطيع معرفة المشكلة غالباً , لكن بعد البحث وجدنا ان هناك نسخاً يتم تحميلها من مواقع اخرى غير رسمية وتكون اما معدلة بطريقة بدائية او مزروع داخلها اكواد خبيثة.<span class="sure">لذا , هل انت متأكد من ان نسختك هذه تم تحميلها من الموقع الرسمي : kleeja.com ؟</span>',
|
||||||
|
|
||||||
'INST_WHAT_IS_KLEEJA_T' => 'ماهي كليجا ؟',
|
'INST_WHAT_IS_KLEEJA_T' => 'ماهي كليجا ؟',
|
||||||
'INST_WHAT_IS_KLEEJA' => 'Kleeja تنطق عربياً "كليجا" ! وكتعريف مبسط "كليجا" سكربت رفع ملفات مجاني يأتي مع خصائص فريدة لمساعدة أصحاب المواقع بإمتلاك مركز تحميل قوي ويعتمد عليه , والحقيقة أن "كليجا" سكربت ضخم الامكانيات سهل الإدارة تم بناء نظام الحماية على مستوى عالي ويملك من الأنظمة المعقدة ما يؤمن لموقعك الحماية التامة بإذن الله !',
|
'INST_WHAT_IS_KLEEJA' => 'Kleeja تنطق عربياً "كليجا" ! وكتعريف مبسط "كليجا" سكربت رفع ملفات مجاني يأتي مع خصائص فريدة لمساعدة أصحاب المواقع بإمتلاك مركز تحميل قوي ويعتمد عليه , والحقيقة أن "كليجا" سكربت ضخم الامكانيات سهل الإدارة تم بناء نظام الحماية على مستوى عالي ويملك من الأنظمة المعقدة ما يؤمن لموقعك الحماية التامة بإذن الله !',
|
||||||
'INST_SPECIAL_KLEEJA' => 'من أهم مميزات كليجا !',
|
'INST_SPECIAL_KLEEJA' => 'من أهم مميزات كليجا !',
|
||||||
'INST_WHAT_IS_KLEEJA_ONE' => '1. نظام أعضاء قوي تستطيع ربطه بأغلب السكربتات المستخدمة في المواقع الاجتماعية .<br />2. لوحة تحكم مذهلة ليس فقط للتحكم بالملفات ولكن للتحكم بكل صغيرة وكبيرة .<br />3. نظام الستايلات البسيط يجعلك تستطيع ان تصنع ستايلك بنفسك.<br />4. مع كليجا ونظام الإضافات البرمجية تستطيع أن تقوم بتركيب الكثير من الاضافات الرائعة .<br />5. ليس هذا فحسب بل كليجا تملك الكثير .. لتعرف أكثر رجاءاً قم بزيارة صفحه <a target="_blank" href="https://kleeja.com/">معلومات ومميزات</a> .',
|
'INST_WHAT_IS_KLEEJA_ONE' => '1. نظام أعضاء قوي تستطيع ربطه بأغلب السكربتات المستخدمة في المواقع الاجتماعية .<br />2. لوحة تحكم مذهلة ليس فقط للتحكم بالملفات ولكن للتحكم بكل صغيرة وكبيرة .<br />3. نظام الستايلات البسيط يجعلك تستطيع ان تصنع ستايلك بنفسك.<br />4. مع كليجا ونظام الإضافات البرمجية تستطيع أن تقوم بتركيب الكثير من الاضافات الرائعة .<br />5. ليس هذا فحسب بل كليجا تملك الكثير .. لتعرف أكثر رجاءاً قم بزيارة صفحه <a target="_blank" href="https://kleeja.com/">معلومات ومميزات</a> .',
|
||||||
'YES' => 'نعم',
|
'YES' => 'نعم',
|
||||||
'NO' => 'لا',
|
'NO' => 'لا',
|
||||||
|
|
||||||
'KLEEJA_TEAM_MSG_NAME' => 'فريق تطوير كليجا',
|
'KLEEJA_TEAM_MSG_NAME' => 'فريق تطوير كليجا',
|
||||||
'KLEEJA_TEAM_MSG_TEXT' => "شكراً لاختيارك سكربت الرفع الأول كليجا\n نتمنى حقا ان تستمتع بالسكربت .\nhttp://www.kleeja.com",
|
'KLEEJA_TEAM_MSG_TEXT' => "شكراً لاختيارك سكربت الرفع الأول كليجا\n نتمنى حقا ان تستمتع بالسكربت .\nhttp://www.kleeja.com",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
550
lang/en/acp.php
550
lang/en/acp.php
@@ -5,288 +5,276 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'U_NOT_ADMIN' => 'You do not have the administration permissions',
|
'U_NOT_ADMIN' => 'You do not have the administration permissions',
|
||||||
'UPDATE_CONFIG' => 'Update Settings',
|
'UPDATE_CONFIG' => 'Update Settings',
|
||||||
'NO_CHANGE' => 'Do NOT change',
|
'NO_CHANGE' => 'Do NOT change',
|
||||||
'CHANGE_MD5' => 'Change using MD5 (8c7dd922ad47494fc02c388e12c00eac.png)',
|
'CHANGE_MD5' => 'Change using MD5 (8c7dd922ad47494fc02c388e12c00eac.png)',
|
||||||
'CHANGE_TIME' => 'Change using TIME (1501440381.png)',
|
'CHANGE_TIME' => 'Change using TIME (1501440381.png)',
|
||||||
'SITENAME' => 'Service name',
|
'SITENAME' => 'Service name',
|
||||||
'SITEMAIL' => 'Email address',
|
'SITEMAIL' => 'Email address',
|
||||||
'SITEMAIL2' => 'Email address of reports',
|
'SITEMAIL2' => 'Email address of reports',
|
||||||
'SITEURL' => 'Service URL with / at the end',
|
'SITEURL' => 'Service URL with / at the end',
|
||||||
'FOLDERNAME' => 'Folder name for uploaded files <small>(you can use {year}, {month}, {day} ,{week} ,{username})</small>',
|
'FOLDERNAME' => 'Folder name for uploaded files <small>(you can use {year}, {month}, {day} ,{week} ,{username})</small>',
|
||||||
'PREFIXNAME' => 'Files name prefix <small>(you can also use {rand:4} , {date:d_Y})</small>',
|
'PREFIXNAME' => 'Files name prefix <small>(you can also use {rand:4} , {date:d_Y})</small>',
|
||||||
'FILESNUM' => 'Number of upload input fields',
|
'FILESNUM' => 'Number of upload input fields',
|
||||||
'FILESNUM_SHOW' => 'Show all upload inputs',
|
'FILESNUM_SHOW' => 'Show all upload inputs',
|
||||||
'SITECLOSE' => 'Shutdown service',
|
'SITECLOSE' => 'Maintenance Mode',
|
||||||
'CLOSEMSG' => 'Shutdown message',
|
'CLOSEMSG' => 'Maintenance mode message',
|
||||||
'DECODE' => 'Change file name',
|
'DECODE' => 'Change file name',
|
||||||
'SEC_DOWN' => 'Waiting period <small>(in Seconds, before download button appears)</small>',
|
'SEC_DOWN' => 'Waiting period <small>(in Seconds, before download button appears)</small>',
|
||||||
'STATFOOTER' => 'Page statistics in footer',
|
'STATFOOTER' => 'Page statistics in footer',
|
||||||
'GZIP' => 'use gzip',
|
'GZIP' => 'use 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 message',
|
'WELCOME_MSG' => 'Welcome message',
|
||||||
'USER_SYSTEM' => 'Users system',
|
'USER_SYSTEM' => 'Users system',
|
||||||
'TOTAL_SIZE' => 'Max service size (Megabytes)',
|
'TOTAL_SIZE' => 'Max service size (Megabytes)',
|
||||||
'THUMBS_IMGS' => 'thumbnails Dimensions (Width x Height)',
|
'THUMBS_IMGS' => 'thumbnails Dimensions (Width x Height)',
|
||||||
'WRITE_IMGS' => 'Enable image watermark',
|
'WRITE_IMGS' => 'Enable image watermark',
|
||||||
'ID_FORM' => 'Files URLs form <small>(No stats or protection for Direct URLs)</small>',
|
'ID_FORM' => 'Files URLs form <small>(No stats or protection for Direct URLs)</small>',
|
||||||
'IDF' => 'Row ID in database (example.com/do.php?id=123)',
|
'IDF' => 'Row ID in database (example.com/do.php?id=123)',
|
||||||
'IDFF' => 'File name (example.com/do.php?file=filename.pdf)',
|
'IDFF' => 'File name (example.com/do.php?file=filename.pdf)',
|
||||||
'IDFD' => 'Direct (example.com/uploads/filename.pdf)',
|
'IDFD' => 'Direct (example.com/uploads/filename.pdf)',
|
||||||
'ID_FORM_IMG' => 'Images URLs form <small>(No stats or protection for Direct URLs)</small>',
|
'ID_FORM_IMG' => 'Images URLs form <small>(No stats or protection for Direct URLs)</small>',
|
||||||
'IDF_IMG' => 'Row ID in database (example.com/do.php?img=123)',
|
'IDF_IMG' => 'Row ID in database (example.com/do.php?img=123)',
|
||||||
'IDFF_IMG' => 'File name (example.com/do.php?imgf=filename.png)',
|
'IDFF_IMG' => 'File name (example.com/do.php?imgf=filename.png)',
|
||||||
'IDFD_IMG' => 'Direct (example.com/uploads/filename.png)',
|
'IDFD_IMG' => 'Direct (example.com/uploads/filename.png)',
|
||||||
'DEL_URL_FILE' => 'Enable file deletion URL feature',
|
'DEL_URL_FILE' => 'Enable file deletion URL feature',
|
||||||
'WWW_URL' => 'Enable uploading from URL',
|
'ALLOW_STAT_PG' => 'Enable statistics page',
|
||||||
'ALLOW_STAT_PG' => 'Enable statistics page',
|
'ALLOW_ONLINE' => 'Enable Who is Online',
|
||||||
'ALLOW_ONLINE' => 'Enable Who is Online',
|
'MOD_WRITER' => 'Mod Rewrite',
|
||||||
'MOD_WRITER' => 'Mod Rewrite',
|
'MOD_WRITER_EX' => 'HTML links..',
|
||||||
'MOD_WRITER_EX' => 'HTML links..',
|
'DEL_F_DAY' => 'Auto Delete undownloaded files (days) (0 = disabled)',
|
||||||
'DEL_F_DAY' => 'Auto Delete undownloaded files (days) (0 = disabled)',
|
'NUMFIELD_S' => 'You can only use numbers with some fields !!',
|
||||||
'NUMFIELD_S' => 'You can only use numbers with some fields !!',
|
'CONFIGS_UPDATED' => 'Settings updated successfully.',
|
||||||
'CONFIGS_UPDATED' => 'Settings updated successfully.',
|
'EXT_DELETED' => 'The extension deleted successfully.',
|
||||||
|
'E_EXTS' => 'Note : Sizes are measured in kilobytes.',
|
||||||
|
'UPDATED_EXTS' => 'Extensions updated successfully.',
|
||||||
|
'REPLY' => 'Reply',
|
||||||
|
'REPLY_REPORT' => 'Reply to this report',
|
||||||
|
'U_REPORT_ON' => 'For your report about ',
|
||||||
|
'BY_EMAIL' => 'By email ',
|
||||||
|
'ADMIN_REPLIED' => 'Admin Reply',
|
||||||
|
'IS_SEND_MAIL' => 'Reply has been sent.',
|
||||||
|
'REPORTS_UPDATED' => 'Reports have been updated.',
|
||||||
|
'REPLY_CALL' => 'Reply to this message',
|
||||||
|
'REPLIED_ON_CAL' => 'About your Message ',
|
||||||
|
'CALLS_UPDATED' => 'Messages updated successfully.',
|
||||||
|
'FOUNDER' => 'Founder',
|
||||||
|
'USER_UPDATED' => 'User data has been updated successfully.',
|
||||||
|
'REPAIRE_TABLE' => '[Tables] Repaired. ',
|
||||||
|
'REPAIRE_CACHE' => 'Cache has been deleted/refreshed.',
|
||||||
|
'KLEEJA_CP' => 'Control Panel',
|
||||||
|
'GENERAL_STAT' => 'General Stats',
|
||||||
|
'OTHER_INFO' => 'Other Info',
|
||||||
|
'AFILES_NUM' => 'Total number of files',
|
||||||
|
'AFILES_SIZE_SPACE' => 'Space that has been consumed so far',
|
||||||
|
'AUSERS_NUM' => 'Total users',
|
||||||
|
'LAST_GOOGLE' => 'Last visit of a Google Bot',
|
||||||
|
'GOOGLE_NUM' => 'Total Google\'s bot visits',
|
||||||
|
'LAST_BING' => 'Last visit of a Bing Bot',
|
||||||
|
'BING_NUM' => 'Total Bing\'s bot visits',
|
||||||
|
'KLEEJA_CP_W' => 'Hello! Welcome to Kleeja Control Panel',
|
||||||
|
'PHP_VER' => 'PHP version',
|
||||||
|
'MYSQL_VER' => 'MySQL version',
|
||||||
|
'R_CONFIGS' => 'Settings',
|
||||||
|
'R_CPINDEX' => 'Dashboard',
|
||||||
|
'R_EXTS' => 'Files\' Extensions Settings',
|
||||||
|
'R_FILES' => 'Files Control',
|
||||||
|
'R_REPORTS' => 'Reports',
|
||||||
|
'R_CALLS' => 'Messages',
|
||||||
|
'R_USERS' => 'Users & Groups',
|
||||||
|
'R_REPAIR' => 'Maintenance',
|
||||||
|
'R_LGOUTCP' => 'Clear Session',
|
||||||
|
'R_BAN' => 'Ban Control',
|
||||||
|
'BAN_EXP1' => 'You can ban users/guests by their IPs or usernames.',
|
||||||
|
'BAN_EXP2' => 'To block range of IPs, use star (*) symbol i.e. 116.10.191.*',
|
||||||
|
'UPDATE_BAN' => 'Save Changes',
|
||||||
|
'BAN_UPDATED' => 'Changes saved successfully.',
|
||||||
|
'R_RULES' => 'Terms',
|
||||||
|
'RULES_EXP' => 'You can edit the terms and conditions of your service from here',
|
||||||
|
'UPDATE_RULES' => 'Update',
|
||||||
|
'RULES_UPDATED' => 'Terms and conditions updated successfully ..',
|
||||||
|
'R_SEARCH' => 'Advanced search',
|
||||||
|
'SEARCH_FILES' => 'Search for files',
|
||||||
|
'SEARCH_SUBMIT' => 'Search',
|
||||||
|
'LAST_DOWN' => 'Last download',
|
||||||
|
'WAS_B4' => 'Was before',
|
||||||
|
'SEARCH_USERS' => 'Search for users',
|
||||||
|
'R_IMG_CTRL' => 'Image control only',
|
||||||
|
'ENABLE_USERFILE' => 'Enable users files',
|
||||||
|
'R_EXTRA' => 'Extra Templates',
|
||||||
|
'EX_HEADER_N' => 'Extra header ... which shows at the bottom of the original header',
|
||||||
|
'EX_FOOTER_N' => 'Extra footer ... which shows at the top of the original footer',
|
||||||
|
'UPDATE_EXTRA' => 'Update template',
|
||||||
|
'EXTRA_UPDATED' => 'Template additions updated successfully',
|
||||||
|
'R_STYLES' => 'Styles',
|
||||||
|
'NO_TPL_SHOOSED' => 'You did not select a template!',
|
||||||
|
'R_PLUGINS' => 'Plugins',
|
||||||
|
'ADD_NEW_PLUGIN' => 'Add plugin',
|
||||||
|
'ITEM_DELETED' => 'We have deleted "%s" successfully...',
|
||||||
|
'PLGUIN_DISABLED_ENABLED' => 'Plugin Enabled / Disabled',
|
||||||
|
'NO_PLUGINS' => 'No available plugins found...',
|
||||||
|
'NO_STYLES' => 'No available styles found...',
|
||||||
|
'NEW_PLUGIN_ADDED' => 'Plugin added ... ',
|
||||||
|
'PLUGIN_EXISTS_BEFORE' => 'This plugin exists before with same version or above, so no need to update it!.',
|
||||||
|
'R_CHECK_UPDATE' => 'Check for updates',
|
||||||
|
'ERROR_CHECK_VER' => 'Error: cannot get any update information at this moment , try again later !',
|
||||||
|
'UPDATE_KLJ_NOW' => 'update now!',
|
||||||
|
'U_LAST_VER_KLJ' => 'You are using the latest version of Kleeja...',
|
||||||
|
'U_USE_PRE_RE' => 'You are using a Pre-release version, Click <a href="https://github.com/kleeja-official/kleeja/issues">here</a> to report any bugs or exploits.',
|
||||||
|
'STYLE_IS_DEFAULT' => 'Default style',
|
||||||
|
'MAKE_AS_DEFAULT' => 'Set as default',
|
||||||
|
'STYLE_NOW_IS_DEFAULT' => 'The style "%s" was set as default',
|
||||||
|
'UPDATE_NOW_S' => 'You are using an old version of Kleeja. Update Now. Your current version is %1$s and the latest one is %2$s',
|
||||||
|
'ADD_NEW_EXT' => 'Add a new extension',
|
||||||
|
'ADD_NEW_EXT_EXP' => 'Type a file extension to add it to this group (for example: doc)',
|
||||||
|
'EMPTY_EXT_FIELD' => 'The extension field is blank!',
|
||||||
|
'NEW_EXT_ADD' => 'New extension added. ',
|
||||||
|
'NEW_EXT_EXISTS_B4' => 'The extension %s already exists!.',
|
||||||
|
'NOT_SAFE_FILE' => 'The file "%s" does not look safe !',
|
||||||
|
'CONFIG_WRITEABLE' => 'The file config.php is currently writable, We strongly recommend that it be changed to 640 or at least 644.',
|
||||||
|
'USERS_NOT_NORMAL_SYS' => 'The current users system is not the normal one, which means that the current users cannot be edited from here but from the script that was integrated with Kleeja, those users use the normal membership system.',
|
||||||
|
'DIMENSIONS_THMB' => 'Thumbs dimensions',
|
||||||
|
'ADMIN_DELETE_FILE_OK' => 'Done !',
|
||||||
|
'ADMIN_DELETE_FILES' => 'Delete all user files',
|
||||||
|
|
||||||
'EXT_DELETED' => 'The extension deleted successfully.',
|
'BCONVERTER' => 'Byte Converter',
|
||||||
'E_EXTS' => 'Note : Sizes are measured in kilobytes.',
|
'NO_HTACCESS_DIR_UP' => 'No .htaccess file was found in "%s" folder, Which means if malicious codes were injected a hacker can do damage to your website!',
|
||||||
'UPDATED_EXTS' => 'Extensions updated successfully.',
|
'NO_HTACCESS_DIR_UP_THUMB' => 'No .htaccess file was found in Thumbs folder "%s", Which means if malicious codes were injected a hacker can do damage to your website!',
|
||||||
'REPLY' => 'Reply',
|
'COOKIE_DOMAIN' => 'Cookie domain',
|
||||||
'REPLY_REPORT' => 'Reply to this report',
|
'COOKIE_NAME' => 'Cookie prefix',
|
||||||
'U_REPORT_ON' => 'For your report about ',
|
'COOKIE_PATH' => 'Cookie path',
|
||||||
'BY_EMAIL' => 'By email ',
|
'COOKIE_SECURE' => 'Cookie secure',
|
||||||
'ADMIN_REPLIED' => 'Admin Reply',
|
'DELETEALLRES' => 'Delete all results',
|
||||||
|
'ADMIN_DELETE_FILES_OK' => 'File %s successfully deleted',
|
||||||
'IS_SEND_MAIL' => 'Reply has been sent.',
|
'ADMIN_DELETE_FILES_NOF' => 'No files to delete',
|
||||||
'REPORTS_UPDATED' => 'Reports have been updated.',
|
'NOT_EXSIT_USER' => 'Sorry, the user you are looking for does not exist in our database... perhaps you are trying to reach a deleted membership !!!!',
|
||||||
'REPLY_CALL' => 'Reply to this message',
|
'ADMIN_DELETE_NO_FILE' => 'This user has no files to delete ! .',
|
||||||
'REPLIED_ON_CAL' => 'About your Message ',
|
'CONFIG_KLJ_MENUS_OTHER' => 'Other settings',
|
||||||
'CALLS_UPDATED' => 'Messages updated successfully.',
|
'CONFIG_KLJ_MENUS_GENERAL' => 'General settings',
|
||||||
'FOUNDER' => 'Founder',
|
'CONFIG_KLJ_MENUS_ALL' => 'Display all the settings',
|
||||||
'USER_UPDATED' => 'User data has been updated successfully.',
|
'CONFIG_KLJ_MENUS_UPLOAD' => 'Upload settings',
|
||||||
'REPAIRE_TABLE' => '[Tables] Repaired. ',
|
'CONFIG_KLJ_MENUS_INTERFACE' => 'Interface and design settings',
|
||||||
'REPAIRE_CACHE' => 'Cache has been deleted/refreshed.',
|
'CONFIG_KLJ_MENUS_ADVANCED' => 'Advanced settings',
|
||||||
'KLEEJA_CP' => 'Control Panel',
|
'DELF_CAUTION' => '<small class="delf_caution">Caution: might be dangerous when using small numbers or using direct form of URLS.</small>',
|
||||||
'GENERAL_STAT' => 'General Stats',
|
'PACKAGE_N_CMPT_KLJ' => 'This plugin/style is not compatible with your current version of Kleeja.',
|
||||||
'OTHER_INFO' => 'Other Info',
|
'PHPINI_FILESIZE_SMALL' => 'Maximum file size allowed for your service is "%1$s" while <b>upload_max_filesize</b> in your hosts PHP settings is set to "%2$s", update it so that your chosen size can be applied.',
|
||||||
'AFILES_NUM' => 'Total number of files',
|
'PHPINI_MPOSTSIZE_SMALL' => 'You have allowed the upload of "%1$s" files at once, You need to use a bigger value for <b>post_max_size</b> in your servers PHP settings, something like "%2$s" for a better performance.',
|
||||||
'AFILES_SIZE_SPACE' => 'Space that has been consumed so far',
|
'NUMPER_REPORT' => 'Number of reports',
|
||||||
'AUSERS_NUM' => 'Total users',
|
'NO_UP_CHANGE_S' => 'No changes ...',
|
||||||
'LAST_GOOGLE' => 'Last visit of a Google Bot',
|
'ADD_HEADER_EXTRA' => 'Extra Header',
|
||||||
'GOOGLE_NUM' => 'Total Google\'s bot visits',
|
'ADD_FOOTER_EXTRA' => 'Extra footer',
|
||||||
'LAST_BING' => 'Last visit of a Bing Bot',
|
'ADMIN_USING_IE6' => 'You are using an outdated IE browser, Please update your browser or use FireFox now!',
|
||||||
'BING_NUM' => 'Total Bing\'s bot visits',
|
'T_CLEANING_FILES_NOW' => 'Deleting Un-downloaded files, The process could take a while depending on the size and number of the files.',
|
||||||
'KLEEJA_CP_W' => 'Hello! Welcome to Kleeja Control Panel',
|
'DEPEND_ON_NO_STYLE_ERR' => 'This style is based on the "%s" style which you dont seem to have',
|
||||||
'PHP_VER' => 'PHP version',
|
'PLUGINS_REQ_NO_STYLE_ERR' => 'This style requires the [ s% ] plugin(s), install it/them and try again.',
|
||||||
'MYSQL_VER' => 'MySQL version',
|
'KLJ_VER_NO_STYLE_ERR' => 'This style requires Kleeja version %s or above',
|
||||||
'R_CONFIGS' => 'Settings',
|
'STYLE_DEPEND_ON' => 'Based on',
|
||||||
'R_CPINDEX' => 'Dashboard',
|
'MESSAGE_NONE' => 'No messages yet ...',
|
||||||
'R_EXTS' => 'Files\' Extensions Settings',
|
'KLEEJA_TEAM' => 'Kleeja development team',
|
||||||
'R_FILES' => 'Files Control',
|
'ERR_SEND_MAIL' => 'Mail sending error, try again later !',
|
||||||
'R_REPORTS' => 'Reports',
|
'FIND_IP_FILES' => 'Found',
|
||||||
'R_CALLS' => 'Messages',
|
'ALPHABETICAL_ORDER_FILES' => 'Sort files by alphabetical order',
|
||||||
'R_USERS' => 'Users & Groups',
|
'ORDER_SIZE' => 'Sort files by size from largest to smallest',
|
||||||
'R_REPAIR' => 'Maintenance',
|
'ORDER_TOTAL_DOWNLOADS' => 'Sort files by number of downloads',
|
||||||
'R_LGOUTCP' => 'Clear Session',
|
'LIVEXTS' => 'Live Extensions (No waiting page)',
|
||||||
'R_BAN' => 'Ban Control',
|
'COMMA_X' => '<p class="live_xts">separate by comma (<span style="font-size:large"> , </span>)</p>',
|
||||||
'BAN_EXP1' => 'Edit the banned IPs and add new ones here ..',
|
'NO_SEARCH_WORD' => 'You didn\'t type anything in the search form !',
|
||||||
'BAN_EXP2' => 'Use the star (*) symbol to replace numbers if you want a total ban.... and use the (|) to separate the IPs',
|
'USERSECTOUPLOAD' => 'The seconds between each upload process',
|
||||||
'UPDATE_BAN' => 'Save Changes',
|
'ADM_UNWANTED_FILES' => 'You seem to have upgraded from a previous version, and because some file names are different now, you\'ll notice duplicated buttons in control panel. </ br> to solve this, remove all the files in "includes/adm" directory and re-upload them.',
|
||||||
'BAN_UPDATED' => 'Changes saved successfully.',
|
'HTML_URLS_ENABLED_NO_HTCC' => 'you have enabled the rewrite URLs, but you seem to have forgot to rename .htaccess.txt in Kleeja\'s root directory to ".htaccess", however, if you don\'t know what I\'m talking about, go ask for Kleeja\'s support or simply disable the rewrite urls feature.',
|
||||||
'R_RULES' => 'Terms',
|
'PLUGIN_CONFIRM_ADD' => 'Caution: plugins make changes to Kleeja functionality, and they could be harmful at times. so be sure to check the plugin source and make sure that it is an official Kleeja plugin.',
|
||||||
'RULES_EXP' => 'You can edit the terms and conditions of your service from here',
|
'LOADING' => 'Loading',
|
||||||
'UPDATE_RULES' => 'Update',
|
'WELCOME' => 'Welcome',
|
||||||
'RULES_UPDATED' => 'Terms and conditions updated successfully ..',
|
'ENABLE_CAPTCHA' => 'Enable Captcha in Kleeja',
|
||||||
'R_SEARCH' => 'Advanced search',
|
'NO_THUMB_FOLDER' => 'It seems you enabled Thumbs but in same time the folder %s does not exist! create it.',
|
||||||
'SEARCH_FILES' => 'Search for files',
|
'DELETE_EARLIER_30DAYS' => 'Delete items older than 30 days',
|
||||||
'SEARCH_SUBMIT' => 'Search',
|
'DELETE_ALL' => 'Delete all',
|
||||||
'LAST_DOWN' => 'Last download',
|
'DELETE_PROCESS_QUEUED' => 'The delete process has been added to the waiting list to execute it gradually to reduce the load.',
|
||||||
'WAS_B4' => 'Was before',
|
'DELETE_PROCESS_IN_WORK' => 'Currently, the delete process is executing ...',
|
||||||
'SEARCH_USERS' => 'Search for users',
|
'SHOW_FROM_24H' => 'Show past 24 hours',
|
||||||
'R_IMG_CTRL' => 'Image control only',
|
'THUMB_DIS_LONGTIME' => 'Thumbs are disabled, this will force Kleeja to resize every images to be small here, and cost you time and bandwidth!. Enable thumbs now.',
|
||||||
'ENABLE_USERFILE' => 'Enable users files',
|
'R_GROUPS' => 'Groups Management',
|
||||||
'R_EXTRA' => 'Extra Templates',
|
'ESSENTIAL_GROUPS' => 'Fundamental Groups',
|
||||||
'EX_HEADER_N' => 'Extra header ... which shows at the bottom of the original header',
|
'CUSTOM_GROUPS' => 'User-defined Groups',
|
||||||
'EX_FOOTER_N' => 'Extra footer ... which shows at the top of the original footer',
|
'EDIT_DATA' => 'Edit data',
|
||||||
'UPDATE_EXTRA' => 'Update template',
|
'EDIT_ACL' => 'Edit Permissions',
|
||||||
'EXTRA_UPDATED' => 'Template additions updated successfully',
|
'HE_CAN' => 'Can',
|
||||||
'R_STYLES' => 'Styles',
|
'HE_CAN_NOT' => 'Cannot',
|
||||||
|
|
||||||
'NO_TPL_SHOOSED' => 'You did not select a template!',
|
|
||||||
|
|
||||||
|
|
||||||
'R_PLUGINS' => 'Plugins',
|
|
||||||
'ADD_NEW_PLUGIN' => 'Add plugin',
|
|
||||||
|
|
||||||
'ITEM_DELETED' => '%s has been deleted successfully...',
|
|
||||||
'PLGUIN_DISABLED_ENABLED' => 'Plugin Enabled / Disabled',
|
|
||||||
'NO_PLUGINS' => 'No available plugins found...',
|
|
||||||
'NO_STYLES' => 'No available styles found...',
|
|
||||||
'NEW_PLUGIN_ADDED' => 'Plugin added ... ',
|
|
||||||
'PLUGIN_EXISTS_BEFORE' => 'This plugin exists before with same version or above, so no need to update it!.',
|
|
||||||
'R_CHECK_UPDATE' => 'Check for updates',
|
|
||||||
'ERROR_CHECK_VER' => 'Error: cannot get any update information at this moment , try again later !',
|
|
||||||
'UPDATE_KLJ_NOW' => 'update now!',
|
|
||||||
'U_LAST_VER_KLJ' => 'You are using the latest version of Kleeja...',
|
|
||||||
'U_USE_PRE_RE' => 'You are using a Pre-release version, Click <a href="https://github.com/kleeja-official/kleeja/issues">here</a> to report any bugs or exploits.',
|
|
||||||
'STYLE_IS_DEFAULT' => 'Default style',
|
|
||||||
'MAKE_AS_DEFAULT' => 'Set as default',
|
|
||||||
|
|
||||||
'STYLE_NOW_IS_DEFAULT' => 'The style "%s" was set as default',
|
|
||||||
|
|
||||||
'UPDATE_NOW_S' => 'You are using an old version of Kleeja. Update Now. Your current version is %1$s and the latest one is %2$s',
|
|
||||||
'ADD_NEW_EXT' => 'Add a new extension',
|
|
||||||
'ADD_NEW_EXT_EXP' => 'Type a file extension to add it to this group (for example: doc)',
|
|
||||||
'EMPTY_EXT_FIELD' => 'The extension field is blank!',
|
|
||||||
'NEW_EXT_ADD' => 'New extension added. ',
|
|
||||||
'NEW_EXT_EXISTS_B4' => 'The extension %s already exists!.',
|
|
||||||
'NOT_SAFE_FILE' => 'The file "%s" does not look safe !',
|
|
||||||
'CONFIG_WRITEABLE' => 'The file config.php is currently writable, We strongly recommend that it be changed to 640 or at least 644.',
|
|
||||||
'USERS_NOT_NORMAL_SYS' => 'The current users system is not the normal one, which means that the current users cannot be edited from here but from the script that was integrated with Kleeja, those users use the normal membership system.',
|
|
||||||
'DIMENSIONS_THMB' => 'Thumbs dimensions',
|
|
||||||
'ADMIN_DELETE_FILE_OK' => 'Done !',
|
|
||||||
'ADMIN_DELETE_FILES' => 'Delete all user files',
|
|
||||||
|
|
||||||
'BCONVERTER' => 'Byte Converter',
|
|
||||||
'NO_HTACCESS_DIR_UP' => 'No .htaccess file was found in "%s" folder, Which means if malicious codes were injected a hacker can do damage to your website!',
|
|
||||||
'NO_HTACCESS_DIR_UP_THUMB' => 'No .htaccess file was found in Thumbs folder "%s", Which means if malicious codes were injected a hacker can do damage to your website!',
|
|
||||||
'COOKIE_DOMAIN' => 'Cookie domain',
|
|
||||||
'COOKIE_NAME' => 'Cookie prefix',
|
|
||||||
'COOKIE_PATH' => 'Cookie path',
|
|
||||||
'COOKIE_SECURE' => 'Cookie secure',
|
|
||||||
'DELETEALLRES' => 'Delete all results',
|
|
||||||
'ADMIN_DELETE_FILES_OK' => 'File %s successfully deleted',
|
|
||||||
'ADMIN_DELETE_FILES_NOF' => 'No files to delete',
|
|
||||||
'NOT_EXSIT_USER' => 'Sorry, the user you are looking for does not exist in our database... perhaps you are trying to reach a deleted membership !!!!',
|
|
||||||
'ADMIN_DELETE_NO_FILE' => 'This user has no files to delete ! .',
|
|
||||||
'CONFIG_KLJ_MENUS_OTHER' => 'Other settings',
|
|
||||||
'CONFIG_KLJ_MENUS_GENERAL' => 'General settings',
|
|
||||||
'CONFIG_KLJ_MENUS_ALL' => 'Display all the settings',
|
|
||||||
'CONFIG_KLJ_MENUS_UPLOAD' => 'Upload settings',
|
|
||||||
'CONFIG_KLJ_MENUS_INTERFACE'=> 'Interface and design settings',
|
|
||||||
'CONFIG_KLJ_MENUS_ADVANCED' => 'Advanced settings',
|
|
||||||
'DELF_CAUTION' => '<small class="delf_caution">Caution: might be dangerous when using small numbers or using direct form of URLS.</small>',
|
|
||||||
'PACKAGE_N_CMPT_KLJ' => 'This plugin/style is not compatible with your current version of Kleeja.',
|
|
||||||
'PHPINI_FILESIZE_SMALL' => 'Maximum file size allowed for your service is "%1$s" while <b>upload_max_filesize</b> in your hosts PHP settings is set to "%2$s", update it so that your chosen size can be applied.',
|
|
||||||
'PHPINI_MPOSTSIZE_SMALL' => 'You have allowed the upload of "%1$s" files at once, You need to use a bigger value for <b>post_max_size</b> in your servers PHP settings, something like "%2$s" for a better performance.',
|
|
||||||
'NUMPER_REPORT' => 'Number of reports',
|
|
||||||
'NO_UP_CHANGE_S' => 'No changes ...',
|
|
||||||
'ADD_HEADER_EXTRA' => 'Extra Header',
|
|
||||||
'ADD_FOOTER_EXTRA' => 'Extra footer',
|
|
||||||
'ADMIN_USING_IE6' => 'You are using an outdated IE browser, Please update your browser or use FireFox now!',
|
|
||||||
'T_CLEANING_FILES_NOW' => 'Deleting Un-downloaded files, The process could take a while depending on the size and number of the files.',
|
|
||||||
'DEPEND_ON_NO_STYLE_ERR' => 'This style is based on the "%s" style which you dont seem to have',
|
|
||||||
'PLUGINS_REQ_NO_STYLE_ERR' => 'This style requires the [ s% ] plugin(s), install it/them and try again.',
|
|
||||||
'KLJ_VER_NO_STYLE_ERR' => 'This style requires Kleeja version %s or above',
|
|
||||||
'STYLE_DEPEND_ON' => 'Based on',
|
|
||||||
'MESSAGE_NONE' => 'No messages yet ...',
|
|
||||||
'KLEEJA_TEAM' => 'Kleeja development team',
|
|
||||||
'ERR_SEND_MAIL' => 'Mail sending error, try again later !',
|
|
||||||
'FIND_IP_FILES' => 'Found',
|
|
||||||
'ALPHABETICAL_ORDER_FILES' => 'Sort files by alphabetical order',
|
|
||||||
'ORDER_SIZE' => 'Sort files by size from largest to smallest',
|
|
||||||
'ORDER_TOTAL_DOWNLOADS' => 'Sort files by number of downloads',
|
|
||||||
'LIVEXTS' => 'Live Extensions (No waiting page)',
|
|
||||||
'COMMA_X' => '<p class="live_xts">separate by comma (<span style="font-size:large"> , </span>)</p>',
|
|
||||||
'NO_SEARCH_WORD' => 'You didn\'t type anything in the search form !',
|
|
||||||
'USERSECTOUPLOAD' => 'The seconds between each upload process',
|
|
||||||
'ADM_UNWANTED_FILES' => 'You seem to have upgraded from a previous version, and because some file names are different now, you\'ll notice duplicated buttons in control panel. </ br> to solve this, remove all the files in "includes/adm" directory and re-upload them.',
|
|
||||||
'HTML_URLS_ENABLED_NO_HTCC' => 'you have enabled the rewrite URLs, but you seem to have forgot to rename .htaccess.txt in Kleeja\'s root directory to ".htaccess", however, if you don\'t know what I\'m talking about, go ask for Kleeja\'s support or simply disable the rewrite urls feature.',
|
|
||||||
'PLUGIN_CONFIRM_ADD' => 'Caution: plugins make changes to Kleeja functionality, and they could be harmful at times. so be sure to check the plugin source and make sure that it is an official Kleeja plugin.',
|
|
||||||
'LOADING' => 'Loading',
|
|
||||||
'WELCOME' => 'Welcome',
|
|
||||||
'ENABLE_CAPTCHA' => 'Enable Captcha in Kleeja',
|
|
||||||
'NO_THUMB_FOLDER' => 'It seems you enabled Thumbs but in same time the folder %s does not exist! create it.',
|
|
||||||
'DELETE_EARLIER_30DAYS' => 'Delete items older than 30 days',
|
|
||||||
'DELETE_ALL' => 'Delete all',
|
|
||||||
'DELETE_PROCESS_QUEUED' => 'The delete process has been added to the waiting list to execute it gradually to reduce the load.',
|
|
||||||
'DELETE_PROCESS_IN_WORK' => 'Currently, the delete process is executing ...',
|
|
||||||
'SHOW_FROM_24H' => 'Show past 24 hours',
|
|
||||||
'THUMB_DIS_LONGTIME' => 'Thumbs are disabled, this will force Kleeja to resize every images to be small here, and cost you time and bandwidth!. Enable thumbs now.',
|
|
||||||
|
|
||||||
'R_GROUPS' => 'Groups Management',
|
|
||||||
'ESSENTIAL_GROUPS' => 'Fundamental Groups',
|
|
||||||
'CUSTOM_GROUPS' => 'User-defined Groups',
|
|
||||||
'EDIT_DATA' => 'Edit data',
|
|
||||||
'EDIT_ACL' => 'Edit Permissions',
|
|
||||||
'HE_CAN' => 'Can',
|
|
||||||
'HE_CAN_NOT' => 'Cannot',
|
|
||||||
//ACLS roles
|
//ACLS roles
|
||||||
'ACLS_ENTER_ACP' => 'Access Admin control panel',
|
'ACLS_ENTER_ACP' => 'Access Admin control panel',
|
||||||
'ACLS_ACCESS_FILEUSER' => 'Access his own files\' folder',
|
'ACLS_ACCESS_FILEUSER' => 'Access his own files\' folder',
|
||||||
'ACLS_ACCESS_FILEUSERS' => 'Browse any user files\' folder',
|
'ACLS_ACCESS_FILEUSERS' => 'Browse any user files\' folder',
|
||||||
'ACLS_ACCESS_CALL' => 'Access "call us" page',
|
'ACLS_ACCESS_CALL' => 'Access "call us" page',
|
||||||
'ACLS_ACCESS_REPORT' => 'View "Report" page',
|
'ACLS_ACCESS_REPORT' => 'View "Report" page',
|
||||||
'ACLS_ACCESS_STATS' => 'Access "statistics" page',
|
'ACLS_ACCESS_STATS' => 'Access "statistics" page',
|
||||||
|
|
||||||
'GROUP_IS_DEFAULT' => 'This group is default at registeration',
|
'GROUP_IS_DEFAULT' => 'This group is default at registeration',
|
||||||
'ADD_NEW_GROUP' => 'Add new group',
|
'ADD_NEW_GROUP' => 'Add new group',
|
||||||
'DELETE_GROUP' => 'Delete group',
|
'DELETE_GROUP' => 'Delete group',
|
||||||
'GROUP_NAME' => 'Group name',
|
'GROUP_NAME' => 'Group name',
|
||||||
'COPY_FROM' => 'Copy from',
|
'COPY_FROM' => 'Copy from',
|
||||||
'USERNAME_NOT_YOU' => 'Not you ? %1$slogout%2$s',
|
'USERNAME_NOT_YOU' => 'Not you ? %1$slogout%2$s',
|
||||||
'DEFAULT_GROUP' => 'The default group',
|
'DEFAULT_GROUP' => 'The default group',
|
||||||
'G_USERS_MOVE_TO' => 'Move the group users to',
|
'G_USERS_MOVE_TO' => 'Move the group users to',
|
||||||
'TAKEN_NAMES' => 'This name is taken. Choose another name',
|
'TAKEN_NAMES' => 'This name is taken. Choose another name',
|
||||||
|
'GROUP_DELETED' => 'Group "%1$s" has been deleted and its user moved to group "%2$s".',
|
||||||
'GROUP_DELETED' => 'Group "%1$s" has been deleted and its user moved to group "%2$s".',
|
'NO_MOVE_SAME_GRP' => 'You can not move the users to the same group!.',
|
||||||
'NO_MOVE_SAME_GRP' => 'You can not move the users to the same group!.',
|
'DEFAULT_GRP_NO_DEL' => 'You can not delete this group becuase it is the current default group, change the default group then try to delete it!.',
|
||||||
'DEFAULT_GRP_NO_DEL' => 'You can not delete this group becuase it is the current default group, change the default group then try to delete it!.',
|
'GROUP_ADDED' => 'Group "%s" has been added successfully ...',
|
||||||
'GROUP_ADDED' => 'Group "%s" has been added successfully ...',
|
'SEARCH4FILES_BYIP' => 'Search files via selected IP',
|
||||||
'SEARCH4FILES_BYIP' => 'Search files via selected IP',
|
'SEARCH4FILES_BYUSER' => 'Search files for this user',
|
||||||
'SEARCH4FILES_BYUSER' => 'Search files for this user',
|
'USER_DELETED' => 'User has been deleted successfully ...',
|
||||||
'USER_DELETED' => 'User has been deleted successfully ...',
|
'USER_ADDED' => 'User has been added successfully ...',
|
||||||
'USER_ADDED' => 'User has been added successfully ...',
|
'DIRECT_FILE_NOTE' => 'This is a Direct file. Direct files have no stats.',
|
||||||
'DIRECT_FILE_NOTE' => 'This is a Direct file. Direct files have no stats.',
|
'IMAGEFOLDER' => 'Folder of Live links feature',
|
||||||
'IMAGEFOLDER' => 'Folder of Live links feature',
|
'IMAGEFOLDEREXTS' => 'Files\' Extensions of Live links feature (No waiting page of these files, and has separated folder) (ex: swf, mp4, mp3) ',
|
||||||
'IMAGEFOLDEREXTS' => 'Files\' Extensions of Live links feature (No waiting page of these files, and has separated folder) (ex: swf, mp4, mp3) ',
|
'IMAGEFOLDERE' => 'Change file name',
|
||||||
'IMAGEFOLDERE' => 'Change file name',
|
'LAST_VIEW' => 'Last viewing',
|
||||||
'LAST_VIEW' => 'Last viewing',
|
'HURRY_HURRY' => 'Quick Actions',
|
||||||
'HURRY_HURRY' => 'Quick Actions',
|
'RESYNC' => 're-sync',
|
||||||
'RESYNC' => 're-sync',
|
'DEL_CACHE' => 'Delete Cache (temporary files)',
|
||||||
'DEL_CACHE' => 'Delete Cache (temporary files)',
|
'SYNCING' => 'Sync\'ing is going on : (%s), wait ...',
|
||||||
'SYNCING' => 'Sync\'ing is going on : (%s), wait ...',
|
'SYNCING_DONE' => 'Sync\'ing is done for (%s).',
|
||||||
'SYNCING_DONE' => 'Sync\'ing is done for (%s).',
|
'WHY_SYNCING' => 'Kleeja uses auto increment to not perform calculation of total numbers everytime, this rises Kleeja performance. Use this after upgrade or when Kleeja asks you to.',
|
||||||
'WHY_SYNCING' => 'Kleeja uses auto increment to not perform calculation of total numbers everytime, this rises Kleeja performance. Use this after upgrade or when Kleeja asks you to.',
|
'REPAIR_DB_TABLES' => 'Repair Data base tables',
|
||||||
'REPAIR_DB_TABLES' => 'Repair Data base tables',
|
'NO_RESULT_USE_SYNC' => 'There are no results, if you just installed Kleeja then that ok. <br /> If you just made an upgrade, then go to "Mentenance page" then do a "re-sync" for files or images.',
|
||||||
'NO_RESULT_USE_SYNC' => 'There are no results, if you just installed Kleeja then that ok. <br /> If you just made an upgrade, then go to "Mentenance page" then do a "re-sync" for files or images.',
|
'ADVICE_CRON_LINK' => 'It\'s recommended to add Kleeja queue link as a Cron job every hour or two hours',
|
||||||
'ADVICE_CRON_LINK' => 'It\'s recommended to add Kleeja queue link as a Cron job every hour or two hours',
|
'UPLOAD_LOCAL_PC' => 'Upload from Your Computer',
|
||||||
'UPLOAD_LOCAL_PC' => 'Upload from Your Computer',
|
'NO_ZIP_ARCHIVE' => 'ZipArchive is not installed on your server, it\'s required.',
|
||||||
'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',
|
||||||
'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',
|
||||||
'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?',
|
'CUSTOMIZATION' => 'Customization',
|
||||||
//3.0.3
|
'SHOW' => 'Show',
|
||||||
'CUSTOMIZATION' => 'Customization',
|
'HIDE' => 'Hide',
|
||||||
'SHOW' => 'Show',
|
'VIEW' => 'View',
|
||||||
'HIDE' => 'Hide',
|
'INSTALL' => 'Install',
|
||||||
'VIEW' => 'View',
|
'CLOSE' => 'Close',
|
||||||
'INSTALL' => 'Install',
|
'STATS_BOXES' => 'Stats Boxes',
|
||||||
'CLOSE' => 'Close',
|
'ITEM_UPDATED' => 'We have updated "%s" successfully ..',
|
||||||
'STATS_BOXES' => 'Stats Boxes',
|
'ITEM_DOWNLOADED' => 'We have downloaded "%s" successfully! you can enable it later.',
|
||||||
'ITEM_UPDATED' => 'We have updated "%s" successfully ..',
|
'DOWNLOADED_FILE_NOT_FOUND' => 'The downloaded file is missing! We couldn\'t find it.',
|
||||||
'ITEM_DOWNLOADED' => 'We have downloaded "%s" successfully! you can enable it later.',
|
'PACKAGE_REMOTE_FILE_MISSING' => 'Package of "%s" is not on Kleeja remote server!',
|
||||||
'DOWNLOADED_FILE_NOT_FOUND' => 'The downloaded file is missing! We couldn\'t find it.',
|
'STORE_SERVER_ERROR' => 'We encountered an error while connecting to the kleeja store remote server ...',
|
||||||
'PACKAGE_REMOTE_FILE_MISSING' => 'Package of "%s" is not on Kleeja remote server!',
|
'INSTALLED_PLUGINS' => 'Installed Plugins',
|
||||||
'STORE_SERVER_ERROR' => 'We encountered an error while connecting to the kleeja store remote server ...',
|
'LOCAL_PLUGINS' => 'Local Plugins (Not Installed)',
|
||||||
'INSTALLED_PLUGINS' => 'Installed Plugins',
|
'KLEEJA_STORE' => 'Kleeja Store',
|
||||||
'LOCAL_PLUGINS' => 'Local Plugins',
|
'KLJ_VER_NO_PLUGIN' => 'This plugin/style can works on Kleeja version %1$s up to version %2$s.',
|
||||||
'KLEEJA_STORE' => 'Kleeja Store',
|
'VERSION' => 'Version',
|
||||||
'KLJ_VER_NO_PLUGIN' => 'This plugin/style can works on Kleeja version %1$s up to version %2$s.',
|
'DEVELOPER' => 'Developer',
|
||||||
'VERSION' => 'Version',
|
'ALL_PLUGINS_UPDATED' => 'All plugins are up-to-date. Hooray!',
|
||||||
'DEVELOPER' => 'Developer',
|
'ALL_STYLES_UPDATED' => 'All styles are up-to-date. Hooray!',
|
||||||
'ALL_PLUGINS_UPDATED' => 'All plugins are up-to-date. Hooray!',
|
'UPDATE_ERR_FETCH_PACKAGE' => 'We have encountered a problem while downloading the package from the server!',
|
||||||
'ALL_STYLES_UPDATED' => 'All styles are up-to-date. Hooray!',
|
'UPDATE_BACKUP_CREATE_FAILED' => 'We couldn\'t create a backup archive in cache folder!',
|
||||||
'UPDATE_ERR_FETCH_PACKAGE' => 'We have encountered a problem while downloading the package from the server!',
|
'UPDATE_PROCESS_FAILED' => 'The update process has failed!',
|
||||||
'UPDATE_BACKUP_CREATE_FAILED' => 'We couldn\'t create a backup archive in cache folder!',
|
'UPDATE_PROCESS_DONE' => 'Kleeja has been updated to version `%s` successfully...',
|
||||||
'UPDATE_PROCESS_FAILED' => 'The update process has failed!',
|
'UPDATE_PROCESS_STEP1' => 'Fetching the package of latest version of Kleeja ...',
|
||||||
'UPDATE_PROCESS_DONE' => 'Kleeja has been updated to version `%s` successfully...',
|
'UPDATE_PROCESS_STEP2' => 'Create a backup container and extract the new package ...',
|
||||||
'UPDATE_PROCESS_STEP1' => 'Fetching the package of latest version of Kleeja ...',
|
'UPDATE_PROCESS_STEP3' => 'Updating to new version (files & database upgrade) ...',
|
||||||
'UPDATE_PROCESS_STEP2' => 'Create a backup container and extract the new package ...',
|
'RELEASE_NOTE' => 'Release Notes',
|
||||||
'UPDATE_PROCESS_STEP3' => 'Updating to new version (files & database upgrade) ...',
|
'UPDATE_ALL' => 'Update All',
|
||||||
'RELEASE_NOTE' => 'Release Notes',
|
'CANT_DEL_DEFAULT_STYLE' => 'You can not delete the current default style! choose another style to be the default then try again.',
|
||||||
'UPDATE_ALL' => 'Update All',
|
'NOTIFICATIONS' => 'Notifications',
|
||||||
'CANT_DEL_DEFAULT_STYLE' => 'You can not delete the current default style! choose another style to be the default then try again.',
|
'KJ_TWEETS' => 'Kleeja Tweets',
|
||||||
'NOTIFICATIONS' => 'Notifications',
|
|
||||||
'KJ_TWEETS' => 'Kleeja Tweets',
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,250 +5,247 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'DIR' => 'ltr',
|
'DIR' => 'ltr',
|
||||||
'LANG_SMALL_NAME' => 'en-us',
|
'LANG_SMALL_NAME' => 'en-us',
|
||||||
|
|
||||||
'HOME' => 'Home',
|
'HOME' => 'Home',
|
||||||
'INDEX' => 'Homepage',
|
'INDEX' => 'Homepage',
|
||||||
'SITE_CLOSED' => 'The website is closed.',
|
'SITE_CLOSED' => 'The website is under maintenance.',
|
||||||
'STOP_FOR_SIZE' => 'The service is suspended.',
|
'STOP_FOR_SIZE' => 'The service is suspended.',
|
||||||
'SIZES_EXCCEDED' => 'We have ran out of space ... we will be back soon.',
|
'SIZES_EXCCEDED' => 'We have ran out of space ... we will be back soon.',
|
||||||
'SAFE_CODE' => 'Enable safety code for downloads',
|
'SAFE_CODE' => 'Enable safety code for downloads',
|
||||||
'LAST_VISIT' => 'Last visit',
|
'LAST_VISIT' => 'Last visit',
|
||||||
'FLS_LST_VST_SEARCH' => 'Show files since',
|
'FLS_LST_VST_SEARCH' => 'Show files since',
|
||||||
'IMG_LST_VST_SEARCH' => 'Show images since',
|
'IMG_LST_VST_SEARCH' => 'Show images since',
|
||||||
'NEXT' => 'Next »',
|
'NEXT' => 'Next »',
|
||||||
'PREV' => '« Previous',
|
'PREV' => '« Previous',
|
||||||
'INFORMATION' => 'Instructions',
|
'INFORMATION' => 'Instructions',
|
||||||
'WELCOME' => 'Welcome',
|
'WELCOME' => 'Welcome',
|
||||||
'KLEEJA_VERSION' => 'Kleeja version',
|
'KLEEJA_VERSION' => 'Kleeja version',
|
||||||
'NUMBER_ONLINE' => 'registered online users',
|
'NUMBER_ONLINE' => 'registered online users',
|
||||||
'USERS_SYSTEM' => 'Users System',
|
'USERS_SYSTEM' => 'Users System',
|
||||||
'ERROR_NAVIGATATION' => 'Redirection Error ..',
|
'ERROR_NAVIGATATION' => 'Redirection Error ..',
|
||||||
'LOGIN' => 'Login',
|
'LOGIN' => 'Login',
|
||||||
'USERNAME' => 'User name',
|
'USERNAME' => 'User name',
|
||||||
'PASSWORD' => 'Password',
|
'PASSWORD' => 'Password',
|
||||||
'LOSS_PASSWORD' => 'Forgot Password?',
|
'LOSS_PASSWORD' => 'Forgot Password?',
|
||||||
'LOGINED_BEFORE' => 'You are already logged in.',
|
'LOGINED_BEFORE' => 'You are already logged in.',
|
||||||
'LOGOUT' => 'Logout ',
|
'LOGOUT' => 'Logout ',
|
||||||
'EMPTY_FIELDS' => 'Error ... Missing Fields!',
|
'EMPTY_FIELDS' => 'Error ... Missing Fields!',
|
||||||
'LOGIN_SUCCESFUL' => 'You have logged in successfully.',
|
'LOGIN_SUCCESFUL' => 'You have logged in successfully.',
|
||||||
'LOGIN_ERROR' => 'Error ... cannot login!',
|
'LOGIN_ERROR' => 'Error ... cannot login!',
|
||||||
'REGISTER_CLOSED' => 'Sorry, the registration is currently closed.',
|
'REGISTER_CLOSED' => 'Sorry, the registration is currently closed.',
|
||||||
'PLACE_NO_YOU' => 'Restricted Area',
|
'PLACE_NO_YOU' => 'Restricted Area',
|
||||||
'NOT_EXSIT_USER' => 'The requested user doesn\'t exist, or it has been deleted.',
|
'NOT_EXSIT_USER' => 'The requested user doesn\'t exist, or it has been deleted.',
|
||||||
'REGISTERED_BEFORE' => 'already',
|
'REGISTERED_BEFORE' => 'already',
|
||||||
'REGISTER' => 'Register',
|
'REGISTER' => 'Register',
|
||||||
'EMAIL' => 'Email address',
|
'EMAIL' => 'Email address',
|
||||||
'VERTY_CODE' => 'Security code',
|
'VERTY_CODE' => 'Security code',
|
||||||
'WRONG_EMAIL' => 'Incorrect email address!',
|
'WRONG_EMAIL' => 'Incorrect email address!',
|
||||||
'WRONG_NAME' => 'The username must be 4 to 25 characters, and without spaces or special chars (only _- are allowed)!',
|
'WRONG_NAME' => 'The username must be 4 to 25 characters, and without spaces or special chars (only _- are allowed)!',
|
||||||
'EXIST_NAME' => 'Someone has already registered with this username!',
|
'EXIST_NAME' => 'Someone has already registered with this username!',
|
||||||
'EXIST_EMAIL' => 'Someone with this email address has already registered!',
|
'EXIST_EMAIL' => 'Someone with this email address has already registered!',
|
||||||
'WRONG_VERTY_CODE' => 'Incorrect security code!',
|
'WRONG_VERTY_CODE' => 'Incorrect security code!',
|
||||||
'REGISTER_SUCCESFUL' => 'Thank you for registering.ً',
|
'REGISTER_SUCCESFUL' => 'Thank you for registering.ً',
|
||||||
'LOGOUT_SUCCESFUL' => 'Logged out successfully.',
|
'LOGOUT_SUCCESFUL' => 'Logged out successfully.',
|
||||||
'LOGOUT_ERROR' => 'Logout Error!',
|
'LOGOUT_ERROR' => 'Logout Error!',
|
||||||
'DEL_SELECTED' => 'Delete selected',
|
'DEL_SELECTED' => 'Delete selected',
|
||||||
'DEL_ALL' => 'Delete all my files',
|
'DEL_ALL' => 'Delete all my files',
|
||||||
'ALL_DELETED' => 'All files has been deleted',
|
'ALL_DELETED' => 'All files has been deleted',
|
||||||
'NO_FILES_DELETE' => 'There is no files to delete them',
|
'NO_FILES_DELETE' => 'There is no files to delete them',
|
||||||
'FILES_UPDATED' => 'File updated successfully.',
|
'FILES_UPDATED' => 'File updated successfully.',
|
||||||
'PUBLIC_USER_FILES' => 'User files' folder',
|
'PUBLIC_USER_FILES' => 'User files' folder',
|
||||||
'FILEUSER' => 'files' folder',
|
'FILEUSER' => 'files' folder',
|
||||||
'YOUR_FILEUSER' => 'Your folder',
|
'YOUR_FILEUSER' => 'Your folder',
|
||||||
'COPY_AND_GET_DUD' => 'Copy URL and give it to your friends To see your files ',
|
'COPY_AND_GET_DUD' => 'Copy URL and give it to your friends To see your files ',
|
||||||
'CLOSED_FEATURE' => 'Closed feature',
|
'CLOSED_FEATURE' => 'Closed feature',
|
||||||
'USERFILE_CLOSED' => 'Users folders feature is closed !',
|
'USERFILE_CLOSED' => 'Users folders feature is closed !',
|
||||||
'PFILE_4_FORUM' => 'Go to the users cp to change your details',
|
'PFILE_4_FORUM' => 'Go to the users cp to change your details',
|
||||||
'USER_PLACE' => 'Users Area',
|
'USER_PLACE' => 'Users Area',
|
||||||
'PROFILE' => 'Profile',
|
'PROFILE' => 'Profile',
|
||||||
'EDIT_U_DATA' => 'Update your details',
|
'EDIT_U_DATA' => 'Update your details',
|
||||||
'PASS_ON_CHANGE' => 'Edit Password',
|
'PASS_ON_CHANGE' => 'Edit Password',
|
||||||
'OLD' => 'Old',
|
'OLD' => 'Old',
|
||||||
'NEW' => 'New',
|
'NEW' => 'New',
|
||||||
'NEW_AGAIN' => 'Confirm',
|
'NEW_AGAIN' => 'Confirm',
|
||||||
'UPDATE' => 'Update',
|
'UPDATE' => 'Update',
|
||||||
'PASS_O_PASS2' => 'The old password is required, and enter the new password carefully.',
|
'PASS_O_PASS2' => 'The old password is required, and enter the new password carefully.',
|
||||||
'DATA_CHANGED_O_LO' => 'Your details have been updated.',
|
'DATA_CHANGED_O_LO' => 'Your details have been updated.',
|
||||||
'CURRENT_PASS_WRONG' => 'Current password is wrong, it must be written correctly to change your data!',
|
'CURRENT_PASS_WRONG' => 'Current password is wrong, it must be written correctly to change your data!',
|
||||||
'DATA_CHANGED_NO' => 'No new details entered.',
|
'DATA_CHANGED_NO' => 'No new details entered.',
|
||||||
'LOST_PASS_FORUM' => 'Go to the forum to change your details ?',
|
'LOST_PASS_FORUM' => 'Go to the forum to change your details ?',
|
||||||
'GET_LOSTPASS' => 'Get your password',
|
'GET_LOSTPASS' => 'Get your password',
|
||||||
'E_GET_LOSTPASS' => 'Enter your email to receive your password.',
|
'E_GET_LOSTPASS' => 'Enter your email to receive your password.',
|
||||||
'WRONG_DB_EMAIL' => 'The specified email address cannot be found in our database!',
|
'WRONG_DB_EMAIL' => 'The specified email address cannot be found in our database!',
|
||||||
'GET_LOSTPASS_MSG' => "You have asked for your password to be reset but, to avoid spam click on the link below for confirmation : \r\n %1\$s \r\n New Password : %2\$s",
|
'GET_LOSTPASS_MSG' => "You have asked for your password to be reset but, to avoid spam click on the link below for confirmation : \r\n %1\$s \r\n New Password : %2\$s",
|
||||||
'CANT_SEND_NEWPASS' => 'Error... the new password could not be sent!',
|
'CANT_SEND_NEWPASS' => 'Error... the new password could not be sent!',
|
||||||
'OK_SEND_NEWPASS' => 'We have sent you the new password',
|
'OK_SEND_NEWPASS' => 'We have sent you the new password',
|
||||||
'OK_APPLY_NEWPASS' => 'New password set. you can now login to your account.',
|
'OK_APPLY_NEWPASS' => 'New password set. you can now login to your account.',
|
||||||
'GUIDE' => 'Allowed Extensions',
|
'GUIDE' => 'Allowed Extensions',
|
||||||
'GUIDE_EXP' => 'Allowed extensions & Sizes',
|
'GUIDE_EXP' => 'Allowed extensions & Sizes',
|
||||||
'EXT' => 'Extension',
|
'EXT' => 'Extension',
|
||||||
'SIZE' => 'Size',
|
'SIZE' => 'Size',
|
||||||
'REPORT' => 'Report',
|
'REPORT' => 'Report',
|
||||||
'YOURNAME' => 'Your name',
|
'YOURNAME' => 'Your name',
|
||||||
'URL' => 'Link',
|
'URL' => 'Link',
|
||||||
'REASON' => 'Reason',
|
'REASON' => 'Reason',
|
||||||
'NO_ID' => 'No file selected ..!!',
|
'NO_ID' => 'No file selected ..!!',
|
||||||
'NO_ME300RES' => 'The Reason field cannot be more than 300 characters!!',
|
'NO_ME300RES' => 'The Reason field cannot be more than 300 characters!!',
|
||||||
'THNX_REPORTED' => 'We have received your report, Thank you.',
|
'THNX_REPORTED' => 'We have received your report, Thank you.',
|
||||||
'RULES' => 'Terms',
|
'RULES' => 'Terms',
|
||||||
'NO_RULES_NOW' => 'No terms have been specified currently.',
|
'NO_RULES_NOW' => 'No terms have been specified currently.',
|
||||||
'E_RULES' => 'Below are the terms of our service',
|
'E_RULES' => 'Below are the terms of our service',
|
||||||
'CALL' => 'Contact Us',
|
'CALL' => 'Contact Us',
|
||||||
'SEND' => 'Send',
|
'SEND' => 'Send',
|
||||||
'TEXT' => 'Comments',
|
'TEXT' => 'Comments',
|
||||||
'NO_ME300TEXT' => 'The Comments field cannot be more than 300 characters!!',
|
'NO_ME300TEXT' => 'The Comments field cannot be more than 300 characters!!',
|
||||||
'THNX_CALLED' => 'Sent ... you will get a reply from us as soon as possible.',
|
'THNX_CALLED' => 'Sent ... you will get a reply from us as soon as possible.',
|
||||||
'NO_DEL_F' => 'Sorry, file deletion URL feature is disabled by admin',
|
'NO_DEL_F' => 'Sorry, file deletion URL feature is disabled by admin',
|
||||||
'E_DEL_F' => 'File deletion URL',
|
'E_DEL_F' => 'File deletion URL',
|
||||||
'WRONG_URL' => 'There is something wrong with the URL ..',
|
'WRONG_URL' => 'There is something wrong with the URL ..',
|
||||||
'DELETE_SUCCESFUL' => 'Deleted successfully.',
|
'DELETE_SUCCESFUL' => 'Deleted successfully.',
|
||||||
'STATS' => 'Statistics',
|
'STATS' => 'Statistics',
|
||||||
'STATS_CLOSED' => 'The statistics page is closed by the administrator.',
|
'STATS_CLOSED' => 'The statistics page is closed by the administrator.',
|
||||||
'FILES_ST' => 'Uploaded',
|
'FILES_ST' => 'Uploaded',
|
||||||
'FILE' => 'File',
|
'FILE' => 'File',
|
||||||
'IMAGE' => 'Image',
|
'IMAGE' => 'Image',
|
||||||
'USERS_ST' => 'Total Users',
|
'USERS_ST' => 'Total Users',
|
||||||
'USER' => 'user',
|
'USER' => 'user',
|
||||||
'SIZES_ST' => 'Total size of uploaded files',
|
'SIZES_ST' => 'Total size of uploaded files',
|
||||||
'LSTDELST' => 'Last check for un-downloaded (inactive) files',
|
'LSTDELST' => 'Last check for un-downloaded (inactive) files',
|
||||||
|
|
||||||
'LAST_1_H' => 'Statistics for the past hour',
|
'LAST_1_H' => 'Statistics for the past hour',
|
||||||
'DOWNLAOD' => 'Download',
|
'DOWNLAOD' => 'Download',
|
||||||
'DOWNLOAD' => 'Download',
|
'DOWNLOAD' => 'Download',
|
||||||
'FILE_FOUNDED' => 'File has been found .. ',
|
'FILE_FOUNDED' => 'File has been found .. ',
|
||||||
'WAIT' => 'Please wait ..',
|
'WAIT' => 'Please wait ..',
|
||||||
'CLICK_DOWN' => 'Click here to download',
|
'CLICK_DOWN' => 'Click here to download',
|
||||||
'JS_MUST_ON' => 'Enable JavaScript in your browser!',
|
'JS_MUST_ON' => 'Enable JavaScript in your browser!',
|
||||||
'FILE_INFO' => 'File Info',
|
'FILE_INFO' => 'File Info',
|
||||||
'FILENAME' => 'File name',
|
'FILENAME' => 'File name',
|
||||||
'FILESIZE' => 'File size',
|
'FILESIZE' => 'File size',
|
||||||
'FILETYPE' => 'File type',
|
'FILETYPE' => 'File type',
|
||||||
'FILEDATE' => 'File date',
|
'FILEDATE' => 'File date',
|
||||||
'LAST_DOWN' => 'Last download',
|
'LAST_DOWN' => 'Last download',
|
||||||
'FILEUPS' => 'Number of downloads',
|
'FILEUPS' => 'Number of downloads',
|
||||||
'FILEREPORT' => 'Report violation of terms',
|
'FILEREPORT' => 'Report violation of terms',
|
||||||
'FILE_NO_FOUNDED' => 'File cannot be found!',
|
'FILE_NO_FOUNDED' => 'File cannot be found!',
|
||||||
'IMG_NO_FOUNDED' => 'Image cannot be found!',
|
'IMG_NO_FOUNDED' => 'Image cannot be found!',
|
||||||
'NOT_IMG' => 'This is not an image!',
|
'NOT_IMG' => 'This is not an image!',
|
||||||
'MORE_F_FILES' => 'This is the final limit for input fields',
|
'MORE_F_FILES' => 'This is the final limit for input fields',
|
||||||
'DOWNLOAD_F' => 'Upload Files',
|
'DOWNLOAD_F' => 'Upload Files',
|
||||||
'DOWNLOAD_T' => 'Download From Link',
|
'DOWNLOAD_T' => 'Download From Link',
|
||||||
'PAST_URL_HERE' => 'Paste Link Here',
|
'PAST_URL_HERE' => 'Paste Link Here',
|
||||||
'SAME_FILE_EXIST' => 'File "%s" already exist, Rename it and try again.',
|
'SAME_FILE_EXIST' => 'File "%s" already exist, Rename it and try again.',
|
||||||
'NO_FILE_SELECTED' => 'No file selected!',
|
'NO_FILE_SELECTED' => 'No file selected!',
|
||||||
'WRONG_F_NAME' => 'File name "%s" contains restricted characters.',
|
'WRONG_F_NAME' => 'File name "%s" contains restricted characters.',
|
||||||
'FORBID_EXT' => 'Extension "%s" not supported.',
|
'FORBID_EXT' => 'Extension "%s" not supported.',
|
||||||
'SIZE_F_BIG' => 'File size of "%1$s" must be smaller than %2$s .',
|
'SIZE_F_BIG' => 'File size of "%1$s" must be smaller than %2$s .',
|
||||||
|
|
||||||
'URL_F_DEL' => 'Link to delete the file',
|
'URL_F_DEL' => 'Link to delete the file',
|
||||||
'URL_F_THMB' => 'Thumbnail Link',
|
'URL_F_THMB' => 'Thumbnail Link',
|
||||||
'URL_F_FILE' => 'File Link',
|
'URL_F_FILE' => 'File Link',
|
||||||
'URL_F_IMG' => 'Image Link',
|
'URL_F_IMG' => 'Image Link',
|
||||||
'URL_F_BBC' => 'Forums Link (BBCode)',
|
'URL_F_BBC' => 'Forums Link (BBCode)',
|
||||||
'IMG_DOWNLAODED' => 'Image uploaded successfully',
|
'IMG_DOWNLAODED' => 'Image uploaded successfully',
|
||||||
'FILE_DOWNLAODED' => 'File uploaded successfully',
|
'FILE_DOWNLAODED' => 'File uploaded successfully',
|
||||||
'CANT_UPLAOD' => 'Error: cannot upload file "%s" for UNKNOWN reason!',
|
'CANT_UPLAOD' => 'Error: cannot upload file "%s" for UNKNOWN reason!',
|
||||||
'CANT_DIR_CRT' => 'The folder has not been created automatically, you must create it manually.',
|
'CANT_DIR_CRT' => 'The folder has not been created automatically, you must create it manually.',
|
||||||
'AGREE_RULES' => 'By clicking on the button below, you agree to %1$sService terms%2$s.',
|
'AGREE_RULES' => 'By clicking on the button below, you agree to %1$sService terms%2$s.',
|
||||||
'URL_CANT_GET' => 'error during get file from url..',
|
'URL_CANT_GET' => 'error during get file from url..',
|
||||||
'ADMINCP' => 'Control Panel',
|
'ADMINCP' => 'Control Panel',
|
||||||
|
|
||||||
'GO_BACK_BROWSER' => 'Go back',
|
'GO_BACK_BROWSER' => 'Go back',
|
||||||
'U_R_BANNED' => 'Your IP has been banned.',
|
'U_R_BANNED' => 'Your IP/membership has been banned.',
|
||||||
'U_R_FLOODER' => 'it's anti-flood system ...',
|
'U_R_FLOODER' => 'it's anti-flood system ...',
|
||||||
'YES' => 'Yes',
|
'YES' => 'Yes',
|
||||||
'NO' => 'No',
|
'NO' => 'No',
|
||||||
'LANGUAGE' => 'Language',
|
'LANGUAGE' => 'Language',
|
||||||
'STYLE' => 'Style',
|
'STYLE' => 'Style',
|
||||||
'NORMAL' => 'Normal',
|
'NORMAL' => 'Normal',
|
||||||
'UPDATE_FILES' => 'Update Files',
|
'UPDATE_FILES' => 'Update Files',
|
||||||
'BY' => 'By',
|
'BY' => 'By',
|
||||||
'FILDER' => 'Folder',
|
'FILDER' => 'Folder',
|
||||||
'DELETE' => 'Delete',
|
'DELETE' => 'Delete',
|
||||||
'GUST' => 'Guest',
|
'GUST' => 'Guest',
|
||||||
'NAME' => 'Name',
|
'NAME' => 'Name',
|
||||||
'CLICKHERE' => 'Click Here',
|
'CLICKHERE' => 'Click Here',
|
||||||
'TIME' => 'Time',
|
'TIME' => 'Time',
|
||||||
'IP' => 'IP',
|
'IP' => 'IP',
|
||||||
'RETURN_HOME' => 'Return to home',
|
'RETURN_HOME' => 'Return to home',
|
||||||
'TODAY' => 'Today',
|
'TODAY' => 'Today',
|
||||||
'DAYS' => 'Days',
|
'DAYS' => 'Days',
|
||||||
'BITE' => 'byte',
|
'BITE' => 'byte',
|
||||||
'SUBMIT' => 'Submit',
|
'SUBMIT' => 'Submit',
|
||||||
'EDIT' => 'Edit',
|
'EDIT' => 'Edit',
|
||||||
'DISABLE' => 'Disable',
|
'DISABLE' => 'Disable',
|
||||||
'ENABLE' => 'Enable',
|
'ENABLE' => 'Enable',
|
||||||
'OPEN' => 'Open',
|
'OPEN' => 'Open',
|
||||||
'KILOBYTE' => 'Kilobyte',
|
'KILOBYTE' => 'Kilobyte',
|
||||||
'NOTE' => 'Note',
|
'NOTE' => 'Note',
|
||||||
'WARN' => 'Warning',
|
'WARN' => 'Warning',
|
||||||
'NOT_SAFE_FILE' => 'Kleeja found that the File "%s" is not safe!',
|
'NOT_SAFE_FILE' => 'Kleeja found that the File "%s" is not safe!',
|
||||||
'ARE_YOU_SURE_DO_THIS' => 'Are you sure you want to do this?',
|
'ARE_YOU_SURE_DO_THIS' => 'Are you sure you want to do this?',
|
||||||
'SITE_FOR_MEMBER_ONLY' => 'This center is only for members, register or login to upload your files.',
|
'SITE_FOR_MEMBER_ONLY' => 'This center is only for members, register or login to upload your files.',
|
||||||
'AUTH_INTEGRATION_N_UTF8_T' => '%s is not utf8',
|
'SHOW_MY_FILECP' => 'Show my files',
|
||||||
'AUTH_INTEGRATION_N_UTF8' => '%s database must be utf8 to be integrated with Kleeja !.',
|
'PASS_CHANGE' => 'Change password',
|
||||||
'SCRIPT_AUTH_PATH_WRONG' => 'Path of %s is not valid, change it now.',
|
'EDIT_U_AVATER' => 'ُEdit your avatar',
|
||||||
'SHOW_MY_FILECP' => 'Show my files',
|
'EDIT_U_AVATER_LINK' => 'to change your avatar, go to this site %1$s" Click Here "s%2$s then register via a Email that you register in the defaultUploader site.',
|
||||||
'PASS_CHANGE' => 'Change password',
|
'MOST_EVER_ONLINE' => 'Most registered users ever online was',
|
||||||
'EDIT_U_AVATER' => 'ُEdit your avatar',
|
'ON' => 'on',
|
||||||
'EDIT_U_AVATER_LINK' => 'to change your avatar, go to this site %1$s" Click Here "s%2$s then register via a Email that you register in the defaultUploader site.',
|
'LAST_REG' => 'newest member',
|
||||||
'MOST_EVER_ONLINE' => 'Most registered users ever online was',
|
'NEW_USER' => 'New user',
|
||||||
'ON' => 'on',
|
|
||||||
'LAST_REG' => 'newest member',
|
|
||||||
'NEW_USER' => 'New user',
|
|
||||||
|
|
||||||
'COPYRIGHTS_X' => 'All rights reserved',
|
'COPYRIGHTS_X' => 'All rights reserved',
|
||||||
'CHECK_ALL' => 'Check all',
|
'CHECK_ALL' => 'Check all',
|
||||||
'BROSWERF' => 'User files',
|
'BROSWERF' => 'User files',
|
||||||
'REMME' => 'Remember me',
|
'REMME' => 'Remember me',
|
||||||
'REMME_EXP' => 'Check this if your device isn\'t shared with others',
|
'REMME_EXP' => 'Check this if your device isn\'t shared with others',
|
||||||
'HOUR' => 'an hour',
|
'HOUR' => 'an hour',
|
||||||
'5HOURS' => '5 hours',
|
'5HOURS' => '5 hours',
|
||||||
'DAY' => 'a day',
|
'DAY' => 'a day',
|
||||||
'WEEK' => 'a week',
|
'WEEK' => 'a week',
|
||||||
'MONTH' => 'a month',
|
'MONTH' => 'a month',
|
||||||
'YEAR' => 'a year',
|
'YEAR' => 'a year',
|
||||||
'INVALID_FORM_KEY' => 'Invalid form, or your session was expired.',
|
'INVALID_FORM_KEY' => 'Invalid form, or your session was expired.',
|
||||||
'INVALID_GET_KEY' => 'Sorry, The requested link is expired, and is blocked for security reason, go back and try again.',
|
'INVALID_GET_KEY' => 'Sorry, The requested link is expired, and is blocked for security reason, go back and try again.',
|
||||||
'REFRESH_CAPTCHA' => 'Click to get a new CAPTCHA image',
|
'REFRESH_CAPTCHA' => 'Click to get a new CAPTCHA image',
|
||||||
'CHOSE_F' => 'Please select at least one file',
|
'CHOSE_F' => 'Please select at least one file',
|
||||||
|
|
||||||
'NOTE_CODE' => 'Enter the letters shown in the image accurately',
|
'NOTE_CODE' => 'Enter the letters shown in the image accurately',
|
||||||
'USER_LOGIN' => ' Login + Members Only ',
|
'USER_LOGIN' => ' Login + Members Only ',
|
||||||
'FILES_DELETED' => 'Files successfully deleted.',
|
'FILES_DELETED' => 'Files successfully deleted.',
|
||||||
'ALL_FILES' => 'Number of all files',
|
'ALL_FILES' => 'Number of all files',
|
||||||
'ALL_IMAGES' => 'Number of all images',
|
'ALL_IMAGES' => 'Number of all images',
|
||||||
'NO_FILE_USER' => 'No files were found in the account!',
|
'NO_FILE_USER' => 'No files were found in the account!',
|
||||||
'SHOWFILESBYIP' => 'Show files by IP',
|
'SHOWFILESBYIP' => 'Show files by IP',
|
||||||
'WAIT_LOADING' => 'Please wait, the files are being uploaded to the server...',
|
'WAIT_LOADING' => 'Please wait, the files are being uploaded to the server...',
|
||||||
'NOTICECLOSED' => 'Note: website is closed',
|
'NOTICECLOSED' => 'Note: website is in maintenance mode!',
|
||||||
'UNKNOWN' => 'Unknown',
|
'UNKNOWN' => 'Unknown',
|
||||||
'WE_UPDATING_KLEEJA_NOW' => 'Closed for maintenance, Check back soon...',
|
'WE_UPDATING_KLEEJA_NOW' => 'Closed for maintenance, Check back soon...',
|
||||||
'ERROR_TRY_AGAIN' => 'Error, try again.',
|
'ERROR_TRY_AGAIN' => 'Error, try again.',
|
||||||
'VIEW' => 'View',
|
'VIEW' => 'View',
|
||||||
'NONE' => 'None',
|
'NONE' => 'None',
|
||||||
'SEARCH_STAT' => 'Search Engines Stats',
|
'SEARCH_STAT' => 'Search Engines Stats',
|
||||||
'NOTHING' => 'There are no nothing!',
|
'NOTHING' => 'There are no nothing!',
|
||||||
'YOU_HAVE_TO_WAIT' => 'Wait %s seconds .. then try to re-upload your files',
|
'YOU_HAVE_TO_WAIT' => 'Wait %s seconds .. then try to re-upload your files',
|
||||||
'REPEAT_PASS' => 'Repeat Password',
|
'REPEAT_PASS' => 'Repeat Password',
|
||||||
'PASS_NEQ_PASS2' => 'Passwords are not equal!',
|
'PASS_NEQ_PASS2' => 'Passwords are not equal!',
|
||||||
|
|
||||||
'GROUP' => 'Group',
|
'GROUP' => 'Group',
|
||||||
'ADMINS' => 'Admins',
|
'ADMINS' => 'Admins',
|
||||||
'GUESTS' => 'Guests',
|
'GUESTS' => 'Guests',
|
||||||
'USERS' => 'Users',
|
'USERS' => 'Users',
|
||||||
'DELETE_INSTALL_FOLDER' => 'To start using Kleeja, delete "install" folder, Kleeja will never work while this folder exists.',
|
'DELETE_INSTALL_FOLDER' => 'To start using Kleeja, delete "install" folder, Kleeja will never work while this folder exists.',
|
||||||
'HV_NOT_PRVLG_ACCESS' => 'You don\'t have privilege to access this page.',
|
'HV_NOT_PRVLG_ACCESS' => 'You don\'t have privilege to access this page.',
|
||||||
'W_PERIODS_0' => 'second',
|
'W_PERIODS_0' => 'second',
|
||||||
'W_PERIODS_1' => 'minute',
|
'W_PERIODS_1' => 'minute',
|
||||||
'W_PERIODS_2' => 'hour',
|
'W_PERIODS_2' => 'hour',
|
||||||
'W_PERIODS_3' => 'day',
|
'W_PERIODS_3' => 'day',
|
||||||
'W_PERIODS_4' => 'week',
|
'W_PERIODS_4' => 'week',
|
||||||
'W_PERIODS_5' => 'month',
|
'W_PERIODS_5' => 'month',
|
||||||
'W_PERIODS_6' => 'year',
|
'W_PERIODS_6' => 'year',
|
||||||
'W_PERIODS_7' => 'decade',
|
'W_PERIODS_7' => 'decade',
|
||||||
|
|
||||||
'W_PERIODS_DP_0'=> 'two seconds',
|
'W_PERIODS_DP_0'=> 'two seconds',
|
||||||
'W_PERIODS_DP_1'=> 'two minutes',
|
'W_PERIODS_DP_1'=> 'two minutes',
|
||||||
@@ -269,20 +266,20 @@ return [
|
|||||||
'W_PERIODS_P_7' => 'decades',
|
'W_PERIODS_P_7' => 'decades',
|
||||||
|
|
||||||
|
|
||||||
'W_FROM' => 'from',
|
'W_FROM' => 'from',
|
||||||
'W_AGO' => 'ago',
|
'W_AGO' => 'ago',
|
||||||
'TIME_PM' => 'pm',
|
'TIME_PM' => 'pm',
|
||||||
'TIME_AM' => 'am',
|
'TIME_AM' => 'am',
|
||||||
'NOT_YET' => 'Not yet!',
|
'NOT_YET' => 'Not yet!',
|
||||||
'NOT_FOUND' => 'This file is not exist. either deleted by the user or the administrator or there is an error opening the file!.',
|
'NOT_FOUND' => 'This file is not exist. either deleted by the user or the administrator or there is an error opening the file!.',
|
||||||
'TIME_ZONE' => 'Time zone',
|
'TIME_ZONE' => 'Time zone',
|
||||||
'OR' => 'or',
|
'OR' => 'or',
|
||||||
'AND' => 'and',
|
'AND' => 'and',
|
||||||
'CHANGE' => 'Change',
|
'CHANGE' => 'Change',
|
||||||
'FOR' => 'for',
|
'FOR' => 'for',
|
||||||
'ALL' => 'All',
|
'ALL' => 'All',
|
||||||
'NOW' => 'Now',
|
'NOW' => 'Now',
|
||||||
'EMAIL_CHANGE_REQ_PASS' => 'In order to change your email address, It\'s required to type your current password.',
|
'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…',
|
'DRAG_AND_DROP' => 'Drop a file inside…',
|
||||||
'OR_MANUAL_SELECT' => 'Or click here to <em>Select</em> a file manually..',
|
'OR_MANUAL_SELECT' => 'Or click here to <em>Select</em> a file manually..',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,107 +6,108 @@
|
|||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'DIR' => 'ltr',
|
'DIR' => 'ltr',
|
||||||
'INST_INSTALL_WIZARD' => 'Kleeja installing wizard',
|
'INST_INSTALL_WIZARD' => 'Kleeja installing wizard',
|
||||||
'INST_INSTALL_CLEAN_VER'=> 'New Installation',
|
'INST_INSTALL_CLEAN_VER' => 'New Installation',
|
||||||
'INST_UPDATE_P_VER' => 'Update ',
|
'INST_UPDATE_P_VER' => 'Update ',
|
||||||
'INST_AGR_LICENSE' => 'I agree to terms and agreements',
|
'INST_AGR_LICENSE' => 'I agree to terms and agreements',
|
||||||
'INST_NEXT' => 'Next',
|
'INST_NEXT' => 'Next',
|
||||||
'INST_PREVIOUS' => 'back',
|
'INST_PREVIOUS' => 'back',
|
||||||
'INST_SITE_INFO' => 'Site Info',
|
'INST_SITE_INFO' => 'Site Info',
|
||||||
'INST_ADMIN_INFO' => 'Admin Info',
|
'INST_ADMIN_INFO' => 'Admin Info',
|
||||||
'INST_CHANG_CONFIG' => 'Missing requirements ... make sure you have edited the config.php file.',
|
'INST_CHANG_CONFIG' => 'Missing requirements ... make sure you have edited the config.php file.',
|
||||||
'INST_CONNCET_ERR' => 'Cannot connect ..',
|
'INST_CONNCET_ERR' => 'Cannot connect ..',
|
||||||
'INST_NO_WRTABLE' => 'The directory is not writable',
|
'INST_CONNCET_ERR_SQLITE' => 'Make sure that there is a file in Kleeja root folder called: %s.',
|
||||||
'INST_GOOD_GO' => 'Everything seems to be OK .... continue',
|
'INST_NO_WRTABLE' => 'The directory is not writable',
|
||||||
'INST_MSGINS' => 'Welcome to our uploading service, here you can upload anything as long as it does not violate our terms.',
|
'INST_GOOD_GO' => 'Everything seems to be OK .... continue',
|
||||||
'INST_CRT_CALL' => 'Comments table created.',
|
'INST_MSGINS' => 'Welcome to our uploading service, here you can upload anything as long as it does not violate our terms.',
|
||||||
'INST_CRT_ONL' => 'Online users table created.',
|
'INST_CRT_CALL' => 'Comments table created.',
|
||||||
'INST_CRT_REPRS' => 'Reports table created.',
|
'INST_CRT_ONL' => 'Online users table created.',
|
||||||
'INST_CRT_STS' => 'Statistics table created.',
|
'INST_CRT_REPRS' => 'Reports table created.',
|
||||||
'INST_CRT_USRS' => 'Users table created.',
|
'INST_CRT_STS' => 'Statistics table created.',
|
||||||
'INST_CRT_ADM' => 'Admin details created.',
|
'INST_CRT_USRS' => 'Users table created.',
|
||||||
'INST_CRT_FLS' => 'Files table created.',
|
'INST_CRT_ADM' => 'Admin details created.',
|
||||||
'INST_CRT_CNF' => 'Settings table created.',
|
'INST_CRT_FLS' => 'Files table created.',
|
||||||
'INST_CRT_EXT' => 'Extensions table created.',
|
'INST_CRT_CNF' => 'Settings table created.',
|
||||||
'INST_CRT_HKS' => 'Hacks table created',
|
'INST_CRT_EXT' => 'Extensions table created.',
|
||||||
'INST_CRT_LNG' => 'Language table created',
|
'INST_CRT_HKS' => 'Hacks table created',
|
||||||
|
'INST_CRT_LNG' => 'Language table created',
|
||||||
|
|
||||||
'INST_CRT_PLG' => 'Plugins table created',
|
'INST_CRT_PLG' => 'Plugins table created',
|
||||||
'INST_SQL_ERR' => 'Error Executing SQL .. ',
|
'INST_SQL_ERR' => 'Error Executing SQL .. ',
|
||||||
'INST_FINISH_SQL' => 'Kleeja was installed successfully',
|
'INST_FINISH_SQL' => 'Kleeja was installed successfully',
|
||||||
'INST_NOTES' => 'Installation Notes ..!',
|
'INST_NOTES' => 'Installation Notes ..!',
|
||||||
'INST_END' => 'The installation wizard is finished ,, Please remove the INSTALL directory..!',
|
'INST_END' => 'The installation wizard is finished ,, Please remove the INSTALL directory..!',
|
||||||
'INST_NOTE_D' => 'Any observations or problems , please contact with the developers kleeja..!!',
|
'INST_NOTE_D' => 'Any observations or problems , please contact with the developers kleeja..!!',
|
||||||
'INST_FINISH_ERRSQL' => 'Oops! there seems to be a problem, try again.',
|
'INST_FINISH_ERRSQL' => 'Oops! there seems to be a problem, try again.',
|
||||||
'INST_KLEEJADEVELOPERS' => 'Thank you for using Kleeja, and we wish you a good luck.',
|
'INST_KLEEJADEVELOPERS' => 'Thank you for using Kleeja, and we wish you a good luck.',
|
||||||
'SITENAME' => 'Website title',
|
'SITENAME' => 'Website title',
|
||||||
'SITEURL' => 'Website URL',
|
'SITEURL' => 'Website URL',
|
||||||
'SITEMAIL' => 'Website Email',
|
'SITEMAIL' => 'Website Email',
|
||||||
'USERNAME' => 'Username',
|
'USERNAME' => 'Username',
|
||||||
'PASSWORD' => 'Password',
|
'PASSWORD' => 'Password',
|
||||||
'PASSWORD2' => 'Password Again',
|
'PASSWORD2' => 'Password Again',
|
||||||
'EMAIL' => 'Email',
|
'EMAIL' => 'Email',
|
||||||
'INDEX' => 'Home',
|
'INDEX' => 'Home',
|
||||||
'ADMINCP' => 'Control Panel',
|
'ADMINCP' => 'Control Panel',
|
||||||
'EMPTY_FIELDS' => 'Some important fields were left blank!',
|
'EMPTY_FIELDS' => 'Some important fields were left blank!',
|
||||||
'WRONG_EMAIL' => 'Incorrect Email Address!',
|
'WRONG_EMAIL' => 'Incorrect Email Address!',
|
||||||
|
|
||||||
|
|
||||||
'DB_INFO_NW' => 'Enter the database information correctly .. Then press Next and the wizard will export the config.php file and put it in a directory the main script !',
|
'DB_INFO_NW' => 'Enter the database information correctly .. Then press Next and the wizard will export the config.php file and put it in a directory the main script !',
|
||||||
'DB_INFO' => 'Enter the database information ..!',
|
'DB_INFO' => 'Enter the database information ..!',
|
||||||
'DB_SERVER' => 'Host',
|
'DB_SERVER' => 'Host',
|
||||||
'DB_TYPE' => 'Database type',
|
'DB_TYPE' => 'Database type',
|
||||||
'DB_TYPE_MYSQL' => 'MySQL Standard',
|
'DB_TYPE_MYSQL' => 'MySQL',
|
||||||
'DB_TYPE_MYSQLI' => 'MySQL Improved',
|
'DB_TYPE_SQLITE' => 'MySQL Improved',
|
||||||
'DB_USER' => 'Database Username',
|
'DB_USER' => 'Database Username',
|
||||||
'DB_PASSWORD' => 'Database Password',
|
'DB_PASSWORD' => 'Database Password',
|
||||||
'DB_NAME' => 'Database Name',
|
'DB_NAME' => 'Database Name',
|
||||||
'DB_PREFIX' => 'Tables prefix',
|
'DB_PREFIX' => 'Tables prefix',
|
||||||
'VALIDATING_FORM_WRONG' => 'A required field was left blank!',
|
'VALIDATING_FORM_WRONG' => 'A required field was left blank!',
|
||||||
'CONFIG_EXISTS' => 'Config.php was found, Continue...',
|
'CONFIG_EXISTS' => 'Config.php was found, Continue...',
|
||||||
'INST_SUBMIT_CONFIGOK' => 'Upload the file in the main directory',
|
'INST_SUBMIT_CONFIGOK' => 'Upload the file in the main directory',
|
||||||
'INST_EXPORT' => 'Export File',
|
'INST_EXPORT' => 'Export File',
|
||||||
'INST_OTHER_INFO' => 'Other info',
|
'INST_OTHER_INFO' => 'Other info',
|
||||||
'URLS_TYPES' => 'Style of File urls',
|
'URLS_TYPES' => 'Style of File urls',
|
||||||
'DEFAULT' => 'Default - recommended',
|
'DEFAULT' => 'Default - recommended',
|
||||||
'FILENAME_URL' => 'Filename',
|
'FILENAME_URL' => 'Filename',
|
||||||
'DIRECT_URL' => 'Direct links - no stats',
|
'DIRECT_URL' => 'Direct links - no stats',
|
||||||
'LIKE_THIS' => 'Example',
|
'LIKE_THIS' => 'Example',
|
||||||
|
|
||||||
|
|
||||||
'FUNCTIONS_CHECK' => 'Functions Check',
|
'FUNCTIONS_CHECK' => 'Functions Check',
|
||||||
'RE_CHECK' => 'ReCheck',
|
'RE_CHECK' => 'ReCheck',
|
||||||
'FUNCTION_IS_NOT_EXISTS' => 'The function %s is disabled.',
|
'FUNCTION_IS_NOT_EXISTS' => 'The function %s is disabled.',
|
||||||
'FUNCTION_IS_EXISTS' => 'The function %s is enabled.',
|
'FUNCTION_IS_EXISTS' => 'The function %s is enabled.',
|
||||||
'FUNCTION_DISC_UNLINK' => 'The function Unlink is used to remove and update cache files.',
|
'FUNCTION_DISC_UNLINK' => 'The function Unlink is used to remove and update cache files.',
|
||||||
'FUNCTION_DISC_GD' => 'The function imagecreatetruecolor is function of GD library that is used to create thumbnails & control photos.',
|
'FUNCTION_DISC_GD' => 'The function imagecreatetruecolor is function of GD library that is used to create thumbnails & control photos.',
|
||||||
'FUNCTION_DISC_FOPEN' => 'The function fopen is used to control styles & files in kleeja.',
|
'FUNCTION_DISC_FOPEN' => 'The function fopen is used to control styles & files in kleeja.',
|
||||||
'FUNCTION_DISC_MUF' => 'The function move_uploaded_file is used to upload files and it\'s the most important function in the script.',
|
'FUNCTION_DISC_MUF' => 'The function move_uploaded_file is used to upload files and it\'s the most important function in the script.',
|
||||||
|
|
||||||
'ADVICES_CHECK' => 'Advanced check (Optional)',
|
'ADVICES_CHECK' => 'Advanced check (Optional)',
|
||||||
'ZIPARCHIVE_LIB' => '<span style="color:red;padding:0 6px">ZipArchive Lib is not available..!</span><br /> It is required to install plugins, styles and to upgrade to newer Kleeja versions!',
|
'ZIPARCHIVE_LIB' => '<span style="color:red;padding:0 6px">ZipArchive Lib is not available..!</span><br /> It is required to install plugins, styles and to upgrade to newer Kleeja versions!',
|
||||||
|
|
||||||
//UPDATE
|
//UPDATE
|
||||||
'INST_UPDATE_CUR_VER_IS_UP' => 'Your current version database is up-to-date ... hooray!',
|
'INST_UPDATE_CUR_VER_IS_UP' => 'Your current version database is up-to-date ... hooray!',
|
||||||
|
|
||||||
|
|
||||||
'INST_UPDATE_IS_FINISH' => 'Installation completed! you can now delete the INSTALL directory...',
|
'INST_UPDATE_IS_FINISH' => 'Installation completed! you can now delete the INSTALL directory...',
|
||||||
|
|
||||||
'INST_PHP_LESSMIN' => 'You need PHP %1$s or above to install Kleeja, your current version is %2$s',
|
'INST_PHP_LESSMIN' => 'You need PHP %1$s or above to install Kleeja, your current version is %2$s',
|
||||||
'INST_MYSQL_LESSMIN' => 'You need MySQL %1$s or above to install Kleeja, your current version is %2$s',
|
'INST_MYSQL_LESSMIN' => 'You need MySQL %1$s or above to install Kleeja, your current version is %2$s',
|
||||||
'IS_IT_OFFICIAL' => 'Did you get your copy from Kleeja.com (Kleeja official site) ?',
|
'IS_IT_OFFICIAL' => 'Did you get your copy from Kleeja.com (Kleeja official site) ?',
|
||||||
'IS_IT_OFFICIAL_DESC' => 'We receive a lot of complaints and questions about the cause of some bugs and issues which occur in kleeja and probably we can\'t figure out what the problem is . After we have checked we have found that there are some unofficially copies released from untrusted publishers .<span class="sure"> So are you sure of this copy is downloaded from kleeja official site ?</span>',
|
'IS_IT_OFFICIAL_DESC' => 'We receive a lot of complaints and questions about the cause of some bugs and issues which occur in kleeja and probably we can\'t figure out what the problem is . After we have checked we have found that there are some unofficially copies released from untrusted publishers .<span class="sure"> So are you sure of this copy is downloaded from kleeja official site ?</span>',
|
||||||
'INST_WHAT_IS_KLEEJA_T' => 'What is Kleeja ?',
|
'INST_WHAT_IS_KLEEJA_T' => 'What is Kleeja ?',
|
||||||
|
|
||||||
'INST_WHAT_IS_KLEEJA' => 'Keeja is a free, features rich, files and images upload system. Kleeja is developed to help webmasters to provide a decent files hosting service on their sites . Kleeja comes with a simple source code and powerful User system , also with easy template system so you can easily customize your styles ',
|
'INST_WHAT_IS_KLEEJA' => 'Keeja is a free, features rich, files and images upload system. Kleeja is developed to help webmasters to provide a decent files hosting service on their sites . Kleeja comes with a simple source code and powerful User system , also with easy template system so you can easily customize your styles ',
|
||||||
|
|
||||||
'INST_SPECIAL_KLEEJA' => 'Some Kleeja features .. !',
|
'INST_SPECIAL_KLEEJA' => 'Some Kleeja features .. !',
|
||||||
'INST_WHAT_IS_KLEEJA_ONE' => 'Kleeja has a simple and powerful user system which can be easily integrated with many boards . Kleeja provide simple admin control panel that enables you to control over everything in your site . Also you can customize Kleeja\'s style and install a lot of add-ons .... <a target="_blank" href="https://www.kleeja.com">more details in Kleeja site </a>',
|
'INST_WHAT_IS_KLEEJA_ONE' => 'Kleeja has a simple and powerful user system which can be easily integrated with many boards . Kleeja provide simple admin control panel that enables you to control over everything in your site . Also you can customize Kleeja\'s style and install a lot of add-ons .... <a target="_blank" href="https://www.kleeja.com">more details in Kleeja site </a>',
|
||||||
'YES' => 'Yes',
|
'YES' => 'Yes',
|
||||||
'NO' => 'No',
|
'NO' => 'No',
|
||||||
|
|
||||||
'KLEEJA_TEAM_MSG_NAME' => 'Kleeja Development Team',
|
'KLEEJA_TEAM_MSG_NAME' => 'Kleeja Development Team',
|
||||||
'KLEEJA_TEAM_MSG_TEXT' => "Thank you for choosing Kleeja to empower your website,\n We really hope you enjoy the unique experience that Kleeja offers to you.\nDon't forget to visit http://kleeja.com for future updates, to report bugs/issues kindly visit our <a href=\"https://github.com/kleeja-official/kleeja/issues\">Issues page</a>",
|
'KLEEJA_TEAM_MSG_TEXT' => "Thank you for choosing Kleeja to empower your website,\n We really hope you enjoy the unique experience that Kleeja offers to you.\nDon't forget to visit http://kleeja.com for future updates, to report bugs/issues kindly visit our <a href=\"https://github.com/kleeja-official/kleeja/issues\">Issues page</a>",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
13
serve.php
13
serve.php
@@ -37,13 +37,16 @@ $rules = [
|
|||||||
'^fileuser[_-]([0-9]+)-([0-9]+).html$' => ['file' => 'ucp.php', 'args' => 'go=fileuser&id=$1&page=$2'],
|
'^fileuser[_-]([0-9]+)-([0-9]+).html$' => ['file' => 'ucp.php', 'args' => 'go=fileuser&id=$1&page=$2'],
|
||||||
// #for future plugins
|
// #for future plugins
|
||||||
'^go-(.*).html$' => ['file' => 'go.php', 'args' => 'go=$1'],
|
'^go-(.*).html$' => ['file' => 'go.php', 'args' => 'go=$1'],
|
||||||
|
|
||||||
//--------->
|
|
||||||
//don't remove the next line ever.
|
|
||||||
//end_kleeja_rewrites_rules#
|
|
||||||
//<---------
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if (file_exists('plugins_rules.php'))
|
||||||
|
{
|
||||||
|
$plugins_rules = include_once 'plugins_rules.php';
|
||||||
|
$rules = array_merge($rules, $plugins_rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$request_uri = trim(strtok($_SERVER['REQUEST_URI'], '?'), '/');
|
$request_uri = trim(strtok($_SERVER['REQUEST_URI'], '?'), '/');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +1,69 @@
|
|||||||
|
|
||||||
<div class="mt-3 mb-3">
|
<div class="mt-3 mb-3">
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- error messages -->
|
<!-- error messages -->
|
||||||
<IF NAME="ERRORS">
|
<IF NAME="ERRORS">
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<ul>
|
<ul>
|
||||||
<LOOP NAME="ERRORS">
|
<LOOP NAME="ERRORS">
|
||||||
<li>{%value%}</li>
|
<li>{%value%}</li>
|
||||||
</LOOP>
|
</LOOP>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
|
|
||||||
<form action="{action}" method="post">
|
<form action="{action}" method="post">
|
||||||
|
|
||||||
<IF NAME="NOT_USER">
|
<IF NAME="NOT_USER">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="cname">{lang.YOURNAME}</label>
|
<label for="cname">{lang.YOURNAME}</label>
|
||||||
<input type="text" class="form-control" id="cname" name="cname" value="{t_cname}" >
|
<input type="text" class="form-control" id="cname" name="cname" value="{t_cname}" >
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="cmail">{lang.EMAIL}</label>
|
<label for="cmail">{lang.EMAIL}</label>
|
||||||
<input type="email" class="form-control" id="cmail" name="cmail" value="{t_cmail}" style="direction:ltr">
|
<input type="email" class="form-control" id="cmail" name="cmail" value="{t_cmail}" style="direction:ltr">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="ctext">{lang.TEXT}</label>
|
<label for="ctext">{lang.TEXT}</label>
|
||||||
<textarea class="form-control" id="ctext" name="ctext" rows="4">{t_ctext}</textarea>
|
<textarea class="form-control" id="ctext" name="ctext" rows="4">{t_ctext}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<IF NAME="config.enable_captcha==1">
|
<IF NAME="config.enable_captcha==1">
|
||||||
|
|
||||||
<div class="form-group safe_code">
|
<div class="form-group safe_code">
|
||||||
<label for="kleeja_code_answer" class=" control-label">{lang.VERTY_CODE}</label>
|
<label for="kleeja_code_answer" class=" control-label">{lang.VERTY_CODE}</label>
|
||||||
<div class="">
|
<div class="">
|
||||||
<img style="vertical-align:middle;"
|
<img style="vertical-align:middle;"
|
||||||
id="kleeja_img_captcha"
|
id="kleeja_img_captcha"
|
||||||
src="{captcha_file_path}"
|
src="{captcha_file_path}"
|
||||||
alt="{lang.REFRESH_CAPTCHA}"
|
alt="{lang.REFRESH_CAPTCHA}"
|
||||||
title="{lang.REFRESH_CAPTCHA}"
|
title="{lang.REFRESH_CAPTCHA}"
|
||||||
onclick="javascript:update_kleeja_captcha('{captcha_file_path}', 'kleeja_code_answer');" />
|
onclick="javascript:update_kleeja_captcha('{captcha_file_path}', 'kleeja_code_answer');" />
|
||||||
|
|
||||||
<input type="text" name="kleeja_code_answer" class="form-control" style="max-width: 300px" autocomplete="false" id="kleeja_code_answer" aria-describedby="kleeja_code_answer_help"/>
|
<input type="text" name="kleeja_code_answer" class="form-control" style="max-width: 300px" autocomplete="false" id="kleeja_code_answer" aria-describedby="kleeja_code_answer_help"/>
|
||||||
<small id="helpBlock" id="kleeja_code_answer_help" class="form-text text-muted">{lang.NOTE_CODE}</small>
|
<small id="helpBlock" id="kleeja_code_answer_help" class="form-text text-muted">{lang.NOTE_CODE}</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</IF>
|
</IF>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{H_FORM_KEYS}
|
{H_FORM_KEYS}
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input type="submit" name="submit" value="{lang.SEND}" class="btn btn-primary"/>
|
<input type="submit" name="submit" value="{lang.SEND}" class="btn btn-primary"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1256" /><title>Powered by Kleeja</title><style type="text/css">* {font-size: 100%;margin:0;padding: 0; color:#CECFCE;}body { font-family: Tahoma ,Arial, sans-serif;font-size: 100%;color: #69788E; margin: 10px 30px;background: #F7F7F7;}a:link, a:visited {text-decoration: none;color:#CECFCE;}a:active, a:hover {text-decoration: underline;color: #111;}h1 {font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 1.70em;font-weight: normal;color: #333333;margin-top: 0; margin-bottom: 10px;}.content_box {border: 1px dashed #CECFCE;background: #FFFFFF;padding: 10px;margin-right: auto;margin-left: auto;}</style> </head> <body title="كليجا"><br /><div class="content_box"><p><a target="_blank" href="http://www.kleeja.com" title="kleeja"><img border="0" src="http://kleeja.com/index.png"></a></p><br /><h1><span style="font-size:250%;color:#D80000;">403 - Access forbidden!</span></h1></div><br /><div class="content_box"><span style="font-size: 140%">Powered by Kleeja >>> the best uploader ...</span > >> <a target="_blank" href="http://www.kleeja.com/bugs/ar/">Bugs</a> | <a target="_blank" href="http://www.kleeja.com/plugins/">Plugins</a> | <a target="_blank" href="http://www.kleeja.com/styles/">Styles</a> | </div></body></html>
|
||||||
@@ -1,65 +1,65 @@
|
|||||||
|
|
||||||
<div class="mt-3 mb-5">
|
<div class="mt-3 mb-5">
|
||||||
<h2>{title}</h2>
|
<h2 style="word-wrap:break-word;">{title}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 mt-2">
|
<div class="col-md-6 mt-2">
|
||||||
<!-- Information File -->
|
<!-- Information File -->
|
||||||
<!-- <p class="text-center"><strong>{lang.FILE_INFO}</strong></p> -->
|
<!-- <p class="text-center"><strong>{lang.FILE_INFO}</strong></p> -->
|
||||||
|
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between flex-column">
|
||||||
<span class="text-secondary">{lang.FILENAME}</span>
|
<span class="text-secondary">{lang.FILENAME}</span>
|
||||||
<div class="list-group-item-text">{name}</div>
|
<div class="list-group-item-text break-all" style="word-wrap:break-word!important;">{name}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
<span class="text-secondary">{lang.FILETYPE}</span>
|
<span class="text-secondary">{lang.FILETYPE}</span>
|
||||||
<div class="list-group-item-text">{type}</div>
|
<div class="list-group-item-text">{type}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
<span class="text-secondary">{lang.FILESIZE}</span>
|
<span class="text-secondary">{lang.FILESIZE}</span>
|
||||||
<div class="list-group-item-text">{size}</div>
|
<div class="list-group-item-text">{size}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
<span class="text-secondary">{lang.FILEDATE}</span>
|
<span class="text-secondary">{lang.FILEDATE}</span>
|
||||||
<div class="list-group-item-text">{time}</div>
|
<div class="list-group-item-text">{time}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
<span class="text-secondary">{lang.FILEUPS}</span>
|
<span class="text-secondary">{lang.FILEUPS}</span>
|
||||||
<div class="list-group-item-text">{uploads}</div>
|
<div class="list-group-item-text">{uploads}</div>
|
||||||
</li>
|
</li>
|
||||||
<IF NAME="fusername">
|
<IF NAME="fusername">
|
||||||
<li class="list-group-item d-flex justify-content-between">
|
<li class="list-group-item d-flex justify-content-between">
|
||||||
<span class="list-group-item-heading text-secondary">{lang.USERNAME}</span>
|
<span class="list-group-item-heading text-secondary">{lang.USERNAME}</span>
|
||||||
<div class="list-group-item-text"><a href="{userfolder}">{fusername}</a></div>
|
<div class="list-group-item-text"><a href="{userfolder}">{fusername}</a></div>
|
||||||
</li>
|
</li>
|
||||||
</IF>
|
</IF>
|
||||||
<li class="list-group-item list-group-item-info text-center justify-content-end">
|
<li class="list-group-item list-group-item-info text-center justify-content-end">
|
||||||
<small><a href="{REPORT}" rel="nofollow"> {lang.FILEREPORT}</a></small>
|
<small><a href="{REPORT}" rel="nofollow"> {lang.FILEREPORT}</a></small>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- @end-Information-File -->
|
<!-- @end-Information-File -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Download box -->
|
<!-- Download box -->
|
||||||
<div class="col-md-6 mt-2">
|
<div class="col-md-6 mt-2">
|
||||||
<div class="jumbotron text-center">
|
<div class="jumbotron text-center">
|
||||||
<b>{lang.FILE_FOUNDED}</b>
|
<b>{lang.FILE_FOUNDED}</b>
|
||||||
<br>
|
<br>
|
||||||
<img src="{STYLE_PATH}images/spin_lg.gif" id="loadingImage" class="mb-5" alt="{lang.WAIT}" />
|
<img src="{STYLE_PATH}images/spin_lg.gif" id="loadingImage" class="mb-5" alt="{lang.WAIT}" />
|
||||||
|
|
||||||
<h2 id="url" class="text">
|
<h2 id="url" class="text">
|
||||||
<div class="alert alert-danger">{lang.JS_MUST_ON}</div>
|
<div class="alert alert-danger">{lang.JS_MUST_ON}</div>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -73,17 +73,17 @@ var timer = {seconds_w};
|
|||||||
ti();
|
ti();
|
||||||
function ti()
|
function ti()
|
||||||
{
|
{
|
||||||
if(timer > 0)
|
if(timer > 0)
|
||||||
{
|
{
|
||||||
document.getElementById("url").innerHTML = '<div class="wait">{lang.WAIT} ' + timer + ' <\/div>';
|
document.getElementById("url").innerHTML = '<div class="wait">{lang.WAIT} ' + timer + ' <\/div>';
|
||||||
timer = timer - 1;
|
timer = timer - 1;
|
||||||
setTimeout("ti()", 1000)
|
setTimeout("ti()", 1000)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
document.getElementById('loadingImage').src = '{STYLE_PATH}images/download.png';
|
document.getElementById('loadingImage').src = '{STYLE_PATH}images/download.png';
|
||||||
document.getElementById("url").innerHTML = '<p class="download"><a href="{url_file}" target="_blank" class="btn btn-outline-primary btn-lg">{lang.CLICK_DOWN}<\/a><br /><span class="badge badge-default">{size}<\/span><\/p>';
|
document.getElementById("url").innerHTML = '<p class="download"><a href="{url_file}" target="_blank" class="btn btn-outline-primary btn-lg">{lang.CLICK_DOWN}<\/a><br /><span class="badge badge-default">{size}<\/span><\/p>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
{text}
|
{text}
|
||||||
<br>
|
<br>
|
||||||
<a href="javascript:history.go(-1)" class="alert-link">{go_back_browser}</a>
|
<a href="javascript:history.go(-1)" class="alert-link">{go_back_browser}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user