forked from indowebit/Ext-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler-layout.php
29 lines (28 loc) · 902 Bytes
/
handler-layout.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
<?php
session_start();
$userid = isset($_SESSION['userid'])?$_SESSION['userid']:0;
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Content-Type: text/javascript');
if ($userid){
include_once("config_sistem.php");
include_once("class/class.msDB.php");
include_once("class/class.handler.php");
$handler = new handler(true);
$page = isset($_POST['page'])?$_POST['page']:0;
if ($page){
$id = explode(".",$page);
$js = $handler->gethandler($id[1]);
if ($js)
if (file_exists("app/view_js/$js")){
$role = $handler->getEvent($id[1]);
if ($role)
echo "ROLE = Ext.decode('".$role."');\n";
$result = file_get_contents("app/view_js/$js");
echo stripslashes(trim($result));
}
}
}
?>