forked from ogduartev/UNVirtualLab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
executable file
·93 lines (89 loc) · 2.67 KB
/
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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
require_once('block.php');
require_once('admin/adminlogin.php');
require_once('admin/adminlogout.php');
require_once('admin/adminbuttons.php');
require_once('admin/adminreports.php');
require_once('admin/session.php');
require_once('admin/menuadmin.php');
require_once('admin/adminmodel.php');
require_once('admin/adminplot.php');
require_once('admin/admin2danim.php');
require_once('admin/admin2deffect.php');
require_once('admin/admincontrol.php');
require_once('admin/adminpractice.php');
require_once('admin/adminmodelfiles.php');
require_once('admin/adminsection.php');
require_once('admin/databasemanager.php');
$B=new block();
$B->connect();
if($B->link)
{
$pageStructure = trim($B->configurationSettings['PageStructure']);
$xmlFN="page_structure/".$pageStructure."/admin.xml";
$section_id=$B->section_id();
$model_id=$B->model_id();
$modeller_id=$B->modeller_id();
$plot_id=$B->plot_id();
$curve_id=$B->curve_id();
$control_group_id=$B->control_group_id();
$control_id=$B->control_id();
$practice_id=$B->practice_id();
$c2danim_id=$B->c2danimation_id();
$c2deffect_id=$B->c2deffect_id();
$modeller_id=$B->modeller_id();
session_start();
if(!isset($_SESSION['UNVL_SESSION_UNVL']))
{
$SM=new sessionManager();
$SM->connect();
if($SM->link)
{
if(isset($_POST['loginsubmit']) and $SM->verify())
{
$xmlFN="page_structure/".$pageStructure."/admin.xml";
}else
{
$xmlFN="page_structure/".$pageStructure."/login.xml";
}
$SM->disconnect();
}
}elseif(isset($_POST['exitsubmit']))
{
$xmlFN="page_structure/".$pageStructure."/login.xml";
session_unset();
}elseif(isset($_POST['reportsubmit']) and !isset($_POST['loginsubmit']))
{
$xmlFN="page_structure/".$pageStructure."/adminreports.xml";
}elseif($section_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/adminsection.xml";
}elseif($model_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/adminmodel.xml";
}elseif($plot_id > 0 )
{
$xmlFN="page_structure/".$pageStructure."/adminplot.xml";
}elseif($curve_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/adminplot.xml";
}elseif($control_group_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/admincontrol.xml";
}elseif($control_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/admincontrol.xml";
}elseif($practice_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/adminpractice.xml";
}elseif($c2danim_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/admin2danim.xml";
}elseif($c2deffect_id > 0)
{
$xmlFN="page_structure/".$pageStructure."/admin2deffect.xml";
}
$B->html($xmlFN);
$B->disconnect();
}
?>