change 404 header footer and admin tpl
This commit is contained in:
parent
5a2e75017e
commit
0346a843ea
@ -420,5 +420,5 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -63,6 +63,6 @@ switch ($do) {
|
||||
run_hook('view_login'); #HOOK
|
||||
$csrf_token = Csrf::generateAndStoreToken();
|
||||
$ui->assign('csrf_token', $csrf_token);
|
||||
$ui->display('admin-login.tpl');
|
||||
$ui->display('admin/admin/login.tpl');
|
||||
break;
|
||||
}
|
||||
|
@ -181,5 +181,5 @@ switch ($action) {
|
||||
echo json_encode(['results' => $json]);
|
||||
die();
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -186,5 +186,5 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -427,5 +427,5 @@ EOF;
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ if (strpos($action, "-reset") !== false) {
|
||||
$ui->assign("PageFile", $action);
|
||||
$ui->display('page-edit.tpl');
|
||||
} else
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
} else {
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
@ -83,5 +83,5 @@ if (strpos($action, "-reset") !== false) {
|
||||
r2(getUrl('pages/') . $action, 'e', Lang::T("Failed to save page, make sure i can write to folder pages, <i>chmod 664 pages/*.html<i>"));
|
||||
}
|
||||
} else
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -70,13 +70,13 @@ switch ($action) {
|
||||
if (function_exists($action . '_save_config')) {
|
||||
call_user_func($action . '_save_config');
|
||||
} else {
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
} else {
|
||||
if (function_exists($action . '_show_config')) {
|
||||
call_user_func($action . '_show_config');
|
||||
} else {
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1300,5 +1300,5 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ switch ($action) {
|
||||
run_hook('view_list_admin'); #HOOK
|
||||
$csrf_token = Csrf::generateAndStoreToken();
|
||||
$ui->assign('csrf_token', $csrf_token);
|
||||
$ui->display('admin.tpl');
|
||||
$ui->display('list.tpl');
|
||||
break;
|
||||
|
||||
case 'users-add':
|
||||
@ -538,7 +538,7 @@ switch ($action) {
|
||||
$ui->assign('csrf_token', $csrf_token);
|
||||
$ui->assign('_title', Lang::T('Add User'));
|
||||
$ui->assign('agents', ORM::for_table('tbl_users')->where('user_type', 'Agent')->find_many());
|
||||
$ui->display('admin-add.tpl');
|
||||
$ui->display('admin/admin/add.tpl');
|
||||
break;
|
||||
case 'users-view':
|
||||
$ui->assign('_title', Lang::T('Edit User'));
|
||||
@ -567,7 +567,7 @@ switch ($action) {
|
||||
$ui->assign('_title', $d['username']);
|
||||
$csrf_token = Csrf::generateAndStoreToken();
|
||||
$ui->assign('csrf_token', $csrf_token);
|
||||
$ui->display('admin-view.tpl');
|
||||
$ui->display('admin/admin/view.tpl');
|
||||
} else {
|
||||
r2(getUrl('settings/users'), 'e', Lang::T('Account Not Found'));
|
||||
}
|
||||
@ -623,7 +623,7 @@ switch ($action) {
|
||||
run_hook('view_edit_admin'); #HOOK
|
||||
$csrf_token = Csrf::generateAndStoreToken();
|
||||
$ui->assign('csrf_token', $csrf_token);
|
||||
$ui->display('admin-edit.tpl');
|
||||
$ui->display('admin/admin/edit.tpl');
|
||||
} else {
|
||||
r2(getUrl('settings/users'), 'e', Lang::T('Account Not Found'));
|
||||
}
|
||||
@ -1131,5 +1131,5 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
@ -70,5 +70,5 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
$ui->display('admin/404.tpl');
|
||||
}
|
||||
|
184
ui/ui/admin/footer.tpl
Normal file
184
ui/ui/admin/footer.tpl
Normal file
@ -0,0 +1,184 @@
|
||||
</section>
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right" id="version" onclick="location.href = '{$_url}community#latestVersion';"></div>
|
||||
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener"
|
||||
target="_blank">iBNuX</a>, Theme by <a href="https://adminlte.io/" rel="nofollow noreferrer noopener"
|
||||
target="_blank">AdminLTE</a>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="{$app_url}/ui/ui/scripts/jquery.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/bootstrap.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/adminlte.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/plugins/select2.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/pace.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/summernote/summernote.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/custom.js"></script>
|
||||
|
||||
<script>
|
||||
document.getElementById('openSearch').addEventListener('click', function () {
|
||||
document.getElementById('searchOverlay').style.display = 'flex';
|
||||
});
|
||||
|
||||
document.getElementById('closeSearch').addEventListener('click', function () {
|
||||
document.getElementById('searchOverlay').style.display = 'none';
|
||||
});
|
||||
|
||||
document.getElementById('searchTerm').addEventListener('keyup', function () {
|
||||
let query = this.value;
|
||||
$.ajax({
|
||||
url: '{$_url}search_user',
|
||||
type: 'GET',
|
||||
data: { query: query },
|
||||
success: function (data) {
|
||||
if (data.trim() !== '') {
|
||||
$('#searchResults').html(data).show();
|
||||
} else {
|
||||
$('#searchResults').html('').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const toggleIcon = document.getElementById('toggleIcon');
|
||||
const body = document.body;
|
||||
const savedMode = localStorage.getItem('mode');
|
||||
if (savedMode === 'dark') {
|
||||
body.classList.add('dark-mode');
|
||||
toggleIcon.textContent = '🌜';
|
||||
}
|
||||
|
||||
function setMode(mode) {
|
||||
if (mode === 'dark') {
|
||||
body.classList.add('dark-mode');
|
||||
toggleIcon.textContent = '🌜';
|
||||
} else {
|
||||
body.classList.remove('dark-mode');
|
||||
toggleIcon.textContent = '🌞';
|
||||
}
|
||||
}
|
||||
|
||||
toggleIcon.addEventListener('click', () => {
|
||||
if (body.classList.contains('dark-mode')) {
|
||||
setMode('light');
|
||||
localStorage.setItem('mode', 'light');
|
||||
} else {
|
||||
setMode('dark');
|
||||
localStorage.setItem('mode', 'dark');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{if isset($xfooter)}
|
||||
{$xfooter}
|
||||
{/if}
|
||||
{literal}
|
||||
<script>
|
||||
var listAttApi;
|
||||
var posAttApi = 0;
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2({theme: "bootstrap"});
|
||||
$('.select2tag').select2({theme: "bootstrap", tags: true});
|
||||
var listAtts = document.querySelectorAll(`button[type="submit"]`);
|
||||
listAtts.forEach(function(el) {
|
||||
if (el.addEventListener) { // all browsers except IE before version 9
|
||||
el.addEventListener("click", function() {
|
||||
$(this).html(
|
||||
`<span class="loading"></span>`
|
||||
);
|
||||
setTimeout(() => {
|
||||
$(this).prop("disabled", true);
|
||||
}, 100);
|
||||
}, false);
|
||||
} else {
|
||||
if (el.attachEvent) { // IE before version 9
|
||||
el.attachEvent("click", function() {
|
||||
$(this).html(
|
||||
`<span class="loading"></span>`
|
||||
);
|
||||
setTimeout(() => {
|
||||
$(this).prop("disabled", true);
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
setTimeout(() => {
|
||||
listAttApi = document.querySelectorAll(`[api-get-text]`);
|
||||
apiGetText();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function ask(field, text){
|
||||
if (confirm(text)) {
|
||||
setTimeout(() => {
|
||||
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
|
||||
field.removeAttribute("disabled");
|
||||
}, 5000);
|
||||
return true;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
|
||||
field.removeAttribute("disabled");
|
||||
}, 500);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function apiGetText(){
|
||||
var el = listAttApi[posAttApi];
|
||||
if(el != undefined){
|
||||
$.get(el.getAttribute('api-get-text'), function(data) {
|
||||
el.innerHTML = data;
|
||||
posAttApi++;
|
||||
if(posAttApi < listAttApi.length){
|
||||
apiGetText();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setKolaps() {
|
||||
var kolaps = getCookie('kolaps');
|
||||
if (kolaps) {
|
||||
setCookie('kolaps', false, 30);
|
||||
} else {
|
||||
setCookie('kolaps', true, 30);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
var expires = "";
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
$("[data-toggle=popover]").popover();
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
1539
ui/ui/admin/header.tpl
Normal file
1539
ui/ui/admin/header.tpl
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,184 +1 @@
|
||||
</section>
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right" id="version" onclick="location.href = '{$_url}community#latestVersion';"></div>
|
||||
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener"
|
||||
target="_blank">iBNuX</a>, Theme by <a href="https://adminlte.io/" rel="nofollow noreferrer noopener"
|
||||
target="_blank">AdminLTE</a>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="{$app_url}/ui/ui/scripts/jquery.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/bootstrap.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/adminlte.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/plugins/select2.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/pace.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/summernote/summernote.min.js"></script>
|
||||
<script src="{$app_url}/ui/ui/scripts/custom.js"></script>
|
||||
|
||||
<script>
|
||||
document.getElementById('openSearch').addEventListener('click', function () {
|
||||
document.getElementById('searchOverlay').style.display = 'flex';
|
||||
});
|
||||
|
||||
document.getElementById('closeSearch').addEventListener('click', function () {
|
||||
document.getElementById('searchOverlay').style.display = 'none';
|
||||
});
|
||||
|
||||
document.getElementById('searchTerm').addEventListener('keyup', function () {
|
||||
let query = this.value;
|
||||
$.ajax({
|
||||
url: '{$_url}search_user',
|
||||
type: 'GET',
|
||||
data: { query: query },
|
||||
success: function (data) {
|
||||
if (data.trim() !== '') {
|
||||
$('#searchResults').html(data).show();
|
||||
} else {
|
||||
$('#searchResults').html('').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const toggleIcon = document.getElementById('toggleIcon');
|
||||
const body = document.body;
|
||||
const savedMode = localStorage.getItem('mode');
|
||||
if (savedMode === 'dark') {
|
||||
body.classList.add('dark-mode');
|
||||
toggleIcon.textContent = '🌜';
|
||||
}
|
||||
|
||||
function setMode(mode) {
|
||||
if (mode === 'dark') {
|
||||
body.classList.add('dark-mode');
|
||||
toggleIcon.textContent = '🌜';
|
||||
} else {
|
||||
body.classList.remove('dark-mode');
|
||||
toggleIcon.textContent = '🌞';
|
||||
}
|
||||
}
|
||||
|
||||
toggleIcon.addEventListener('click', () => {
|
||||
if (body.classList.contains('dark-mode')) {
|
||||
setMode('light');
|
||||
localStorage.setItem('mode', 'light');
|
||||
} else {
|
||||
setMode('dark');
|
||||
localStorage.setItem('mode', 'dark');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
{if isset($xfooter)}
|
||||
{$xfooter}
|
||||
{/if}
|
||||
{literal}
|
||||
<script>
|
||||
var listAttApi;
|
||||
var posAttApi = 0;
|
||||
$(document).ready(function() {
|
||||
$('.select2').select2({theme: "bootstrap"});
|
||||
$('.select2tag').select2({theme: "bootstrap", tags: true});
|
||||
var listAtts = document.querySelectorAll(`button[type="submit"]`);
|
||||
listAtts.forEach(function(el) {
|
||||
if (el.addEventListener) { // all browsers except IE before version 9
|
||||
el.addEventListener("click", function() {
|
||||
$(this).html(
|
||||
`<span class="loading"></span>`
|
||||
);
|
||||
setTimeout(() => {
|
||||
$(this).prop("disabled", true);
|
||||
}, 100);
|
||||
}, false);
|
||||
} else {
|
||||
if (el.attachEvent) { // IE before version 9
|
||||
el.attachEvent("click", function() {
|
||||
$(this).html(
|
||||
`<span class="loading"></span>`
|
||||
);
|
||||
setTimeout(() => {
|
||||
$(this).prop("disabled", true);
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
setTimeout(() => {
|
||||
listAttApi = document.querySelectorAll(`[api-get-text]`);
|
||||
apiGetText();
|
||||
}, 500);
|
||||
});
|
||||
|
||||
function ask(field, text){
|
||||
if (confirm(text)) {
|
||||
setTimeout(() => {
|
||||
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
|
||||
field.removeAttribute("disabled");
|
||||
}, 5000);
|
||||
return true;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
field.innerHTML = field.innerHTML.replace(`<span class="loading"></span>`, '');
|
||||
field.removeAttribute("disabled");
|
||||
}, 500);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function apiGetText(){
|
||||
var el = listAttApi[posAttApi];
|
||||
if(el != undefined){
|
||||
$.get(el.getAttribute('api-get-text'), function(data) {
|
||||
el.innerHTML = data;
|
||||
posAttApi++;
|
||||
if(posAttApi < listAttApi.length){
|
||||
apiGetText();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function setKolaps() {
|
||||
var kolaps = getCookie('kolaps');
|
||||
if (kolaps) {
|
||||
setCookie('kolaps', false, 30);
|
||||
} else {
|
||||
setCookie('kolaps', true, 30);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
var expires = "";
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
$("[data-toggle=popover]").popover();
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{include file="admin/footer.tpl"}
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user