-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.php
executable file
·81 lines (61 loc) · 1.71 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
require "software/includes/functions.php";
include_layout_template('software/includes/','DelDirectoryFnc.php');
include_layout_template('software/includes/','ParamLibFnc.php');
$url=validateQueryString(curPageURL());
if($url===FALSE){
header('Location: index.php');
}
$url="install/index.php";
if(isset($_GET['ins'])):
$install = optional_param('ins','',PARAM_ALPHAEXT);
if($install == 'comp')
{
if (is_dir('install'))
{
$dir = 'install/'; // IMPORTANT: with '/' at the end
$remove_directory = delete_directory($dir);
}
}
endif;
if(file_exists($url))
{
header('location: install/index.php');
?>
<script>
//window.location='install/index.php';
</script>
<?php
}
require "software/classes/session.php";
require_once "software/classes/db.php";
require_once "software/classes/functions.php";
$GetSession = new Session;
$loadSystem = System::loadTbl('system');
$i = 0;
foreach($loadSystem as $Data):
$i++;
$companyName= $Data['companyName'];
$companyEmail= $Data['CompanyEmail'];
$companyPhoneNum= $Data['CompanyPhoneNum'];
$address= $Data['address'];
$logo= $Data['logo'];
$version= $Data['version'];
endforeach;
$GetSession->companyName=$companyName;
$GetSession->companyEmail=$companyEmail;
$GetSession->companyPhoneNum=$companyPhoneNum;
$GetSession->logo=$logo;
$GetSession->address=$address;
$GetSession->version=$version;
$GetSession->setCompanyName($companyName);
$GetSession->setCompanyContact($companyEmail,$companyPhoneNum,$address);
$GetSession->setVersion($version);
if($GetSession->loggedin== TRUE):
beedy_goto('software/index.php');
else:
?>
<?php
require "login.php";
endif;
?>