forked from indowebit/Ext-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathajax.admin.php
40 lines (38 loc) · 848 Bytes
/
ajax.admin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
session_start();
$userid = isset($_SESSION['userid'])?$_SESSION['userid']:0;
include_once("config_sistem.php");
include_once("class/class.msDB.php");
include_once("class/class.grid.php");
$id = isset($_REQUEST['id'])?$_REQUEST['id']:0;
if ($userid){
if ($id){
$ajax ="";
switch ($id) {
case 'menu-manager':
$ajax ='ajax.menu.php';
break;
case 'user-manager':
$ajax ='ajax.user.php';
break;
case 'logout':
$ajax = 'ajax.login.php';
break;
case 'user-profile':
$ajax = 'ajax.login.php';
break;
}
if ($ajax)
if (file_exists("ajax/$ajax")){
include_once("ajax/$ajax");
}
}
}else {
if ($id =='login'){
$ajax ='ajax.login.php';
if ($ajax)
if (file_exists("ajax/$ajax"))
include_once("ajax/$ajax");
}
}
?>