forked from poppyred/1.6.x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
squid.users.index.php
executable file
·66 lines (45 loc) · 2.17 KB
/
squid.users.index.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
session_start();
if(isset($_GET["verbose"])){$GLOBALS["VERBOSE"]=true;ini_set('display_errors', 1);ini_set('error_reporting', E_ALL);ini_set('error_prepend_string',null);ini_set('error_append_string',null);}
if(!isset($_SESSION["uid"])){error_log("[{$_SESSION["uid"]}]::uid `{$_SESSION["uid"]}` no set -> register:".__FUNCTION__." in " . basename(__FILE__). " line ".__LINE__);registerSession();}
if(!isset($_SESSION["uid"])){error_log("[{$_SESSION["uid"]}]::uid `{$_SESSION["uid"]}` null :".__FUNCTION__." in " . __FILE__. " line ".basename(__FILE__));header('location:squid.users.logon.php');die();}
error_log("[{$_SESSION["uid"]}]::uid `{$_SESSION["uid"]}` ok, registered:".__FUNCTION__." in " . basename(__FILE__). " line ".__LINE__);
include_once('ressources/class.templates.inc');
include_once('ressources/class.html.pages.inc');
include_once('ressources/class.cyrus.inc');
include_once('ressources/class.main_cf.inc');
include_once('ressources/charts.php');
include_once('ressources/class.syslogs.inc');
include_once('ressources/class.system.network.inc');
include_once('ressources/class.os.system.inc');
if(isset($_POST["GetMyTitle"])){GetMyTitle();exit;}
page();
function page(){
$html="
<script>
LoadAjax('middle','squid.users.quicklinks.php');
ChangeHTMLTitleUserSquidPerform();
RemoveSearchEnginePerform();
</script>
";
$tpl=new template_users($title,$html,$_SESSION,0,0,0,$cfg);
error_log(basename(__FILE__)." ".__FUNCTION__.'() line '. __LINE__);
$html=$tpl->web_page;
$html=str_replace("admin.tabs.php", "squid.users.admin.tabs.php", $html);
SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
echo $html;
return;
}
function registerSession(){
if(!isset($_GET["phpsess"])){return null;}
$array=unserialize(base64_decode($_GET["phpsess"]));
if(!is_array($array)){return null;}
while (list ($key, $value) = each ($array) ){
error_log("[{$_SESSION["uid"]}]::SET $key = $value ".__FUNCTION__."() in " . basename(__FILE__). " line ".__LINE__);
$_SESSION[$key]=$value;
}
}
function GetMyTitle(){
error_log("[{$_SESSION["uid"]}]::SET email = {$_SESSION["email"]} ".__FUNCTION__."() in " . basename(__FILE__). " line ".__LINE__);
echo $_SESSION["email"];
}