-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
80 lines (62 loc) · 2.75 KB
/
Copy pathindex.php
File metadata and controls
80 lines (62 loc) · 2.75 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
80
<?php
/* Hosting module -> $Id: $ */
$AppUI->savePlace();
// load the companies class to retrieved denied companies
require_once( $AppUI->getModuleClass( 'companies' ) );
// retrieve any state parameters
if (isset( $_GET['tab'] )) {
$AppUI->setState( 'HostIdxTab', $_GET['tab'] );
}
$tab = $AppUI->getState( 'HostIdxTab' ) !== NULL ? $AppUI->getState( 'HostIdxTab' ) : 0;
$active = intval( !$AppUI->getState( 'HostIdxTab' ) );
if (isset( $_POST['company_id'] )) {
$company_id = $_POST['company_id'];
$AppUI->setState( 'HostIdxCompany', intval( $_POST['company_id'] ) );
}
//$company_id = $AppUI->getState( 'HostIdxCompany' ) !== NULL ? $AppUI->getState( 'HostIdxCompany' ) : $AppUI->user_company;
$company_prefix = 'company_';
if (isset( $_POST['department'] )) {
$AppUI->setState( 'HostIdxDepartment', $_POST['department'] );
//if department is set, ignore the company_id field
unset($company_id);
}
//if $department contains the $company_prefix string that it's requesting a company and not a department. So, clear the
// $department variable, and populate the $company_id variable.
/*
if(!(strpos($department, $company_prefix)===false)){
$company_id = substr($department,strlen($company_prefix));
$AppUI->setState( 'HostIdxCompany', $company_id );
unset($department);
}*/
if(!(strpos($company_id, $company_prefix)===false)){
$company_id = substr($company_id,strlen($company_prefix));
$AppUI->setState( 'HostIdxCompany', $company_id );
}
if (isset( $_GET['orderby'] )) {
$orderdir = $AppUI->getState( 'HostIdxOrderDir' ) ? ($AppUI->getState( 'HostIdxOrderDir' )== 'asc' ? 'desc' : 'asc' ) : 'desc';
$AppUI->setState( 'HostIdxOrderBy', $_GET['orderby'] );
$AppUI->setState( 'HostIdxOrderDir', $orderdir);
}
$orderby = $AppUI->getState( 'HostIdxOrderBy' ) ? $AppUI->getState( 'HostIdxOrderBy' ) : 'project_end_date';
$orderdir = $AppUI->getState( 'HostIdxOrderDir' ) ? $AppUI->getState( 'HostIdxOrderDir' ) : 'asc';
getCompanies();
// setup the title block
$titleBlock = new CTitleBlock( 'Hosting', 'applet3-48.png', $m, "$m.$a" );
$titleBlock->addCell( $AppUI->_('Company') . '/' . $AppUI->_('Division') . ':');
$titleBlock->addCell( $buffer, '', '<form action="index.php?m=hosting" method="post" name="pickCompany">', '</form>');
$titleBlock->addCell();
$titleBlock->addCell(
'<input type="submit" class="button" value="'.$AppUI->_('new hosting/domain').'">', '',
'<form action="?m=hosting&a=addedit" method="post">', '</form>'
);
$titleBlock->show();
$tabBox = new CTabBox( "?m=hosting", "{$dPconfig['root_dir']}/modules/hosting/", $tab );
if ( $tabBox->isTabbed() ) {
$tabBox->add("vw_all", "All");
}
$min_view = true;
$tabBox->add("vw_domains", "Domains");
$tabBox->add("vw_hosting", "Hosting");
$tabBox->add("vw_expiring", "Expiring Soon");
$tabBox->show();
?>