implemented state system for user
This commit is contained in:
parent
18579eeba9
commit
d738cc30df
@ -1,25 +1,4 @@
|
||||
var sys = null;
|
||||
$(document).ready(function() {
|
||||
sys = new SYSTEM('./api.php',2,'user_start');
|
||||
});
|
||||
|
||||
function init_user_start(){}
|
||||
|
||||
function init_user_menu(){
|
||||
register_logout();
|
||||
$("#btn_news").click(function(){
|
||||
sys.load('user_news');
|
||||
});
|
||||
$("#btn_db").click(function(){
|
||||
sys.load('user_database');
|
||||
});
|
||||
}
|
||||
|
||||
function register_logout(){
|
||||
$("#btn_logout").click(function(){
|
||||
$.get('./api.php?call=account&action=logout', function (data) {
|
||||
if(data == 1){
|
||||
window.location.reload();}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
17
mojotrollz/page/user_menu/js/user_menu.js
Normal file
17
mojotrollz/page/user_menu/js/user_menu.js
Normal file
@ -0,0 +1,17 @@
|
||||
function init_user_menu(){
|
||||
register_logout();
|
||||
$("#btn_news").click(function(){
|
||||
sys.load('user_news');
|
||||
});
|
||||
$("#btn_db").click(function(){
|
||||
sys.load('user_database');
|
||||
});
|
||||
}
|
||||
function register_logout(){
|
||||
$("#btn_logout").click(function(){
|
||||
$.get('./api.php?call=account&action=logout', function (data) {
|
||||
if(data == 1){
|
||||
window.location.reload();}
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -1,6 +1,12 @@
|
||||
<?php
|
||||
|
||||
class user_menu extends SYSTEM\PAGE\Page {
|
||||
public static function js(){
|
||||
return array( \SYSTEM\WEBPATH(new PPAGE(),'user_menu/js/user_menu.js'));}
|
||||
|
||||
public static function css (){
|
||||
return array();}
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'user_menu/user_menu.tpl'), $vars);
|
||||
|
||||
1
mojotrollz/page/user_start/js/user_start.js
Normal file
1
mojotrollz/page/user_start/js/user_start.js
Normal file
@ -0,0 +1 @@
|
||||
function init_user_start(){}
|
||||
@ -1,6 +1,11 @@
|
||||
<?php
|
||||
class user_start extends SYSTEM\PAGE\Page {
|
||||
|
||||
public static function js(){
|
||||
return array( \SYSTEM\WEBPATH(new PPAGE(),'user_start/js/user_start.js'));}
|
||||
|
||||
public static function css (){
|
||||
return array();}
|
||||
|
||||
public static function get_char_statistics(){
|
||||
$result = '';
|
||||
$chars = \DBD\CHAR_STATS::QA();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user