This repository was archived by the owner on Feb 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
79 lines (67 loc) · 1.44 KB
/
index.php
File metadata and controls
79 lines (67 loc) · 1.44 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
require_once('config.inc.php');
Ice_loadProfile(ICE_PROFILE);
require_once('mumble.inc.php');
require_once('mumble_info.inc.php');
require_once(SMARTY_CLASS);
$Smarty=new Smarty;
$Smarty->assign('SELF',$_SERVER['REQUEST_URI']);
header('Content-Type: text/html; charset=UTF-8');
//Ice_dumpProfile();
$Mumble=new CMumble();
$Mumble->Init();
$Mumble->LoadServers();
$Action=isset($_GET['do']) ? $_GET['do'] : '';
$Config=null;
$Session=null;
if(VIEWER_ONLY==false)
{
require_once('session.inc.php');
$Session=new CSession();
$Session->Start();
if($Action=='login')
{
if(isset($_POST['post_data']) AND 1==$_POST['post_data'])
{
}
else
{
$Smarty->display('login.tpl');
}
}
}
if($Config==null)
{
$Config=new CConfigUnreg();
}
/*echo '<pre>';
echo "Servers:\n";
print_r($Servers);
echo "Version:\n";
print_r($Mumble->GetVersion());
echo '</pre>';
echo "Default:\n";
print_r($Mumble->GetDefaultConf());*/
$MumbleInfo=new CMumbleInfo();
$MumbleInfo->InitOutput($Smarty,$Config);
$Server=null;
if(SHOW_SERVER>0)
{
$Server=$Mumble->GetServByID(SHOW_SERVER);
}
else
{
$Server=$Mumble->GetServByArrayPos(-SHOW_SERVER);
}
$Smarty->assign('RawDebug','<pre>MemUsage: '.memory_get_usage().'<br>RealMemUsage: '.memory_get_usage(true).'</pre>');
if(VIEWER_ONLY!==true)
{
$MumbleInfo->DoOutput($Server,$Mumble,false);
$Smarty->display('main.tpl');
}
else
{
$MumbleInfo->DoOutput($Server,$Mumble);
}
//$Serv->SendChannelMessage(0,true,"Test-Msg");
?>