-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvw_hosting.php
More file actions
60 lines (56 loc) · 2.64 KB
/
Copy pathvw_hosting.php
File metadata and controls
60 lines (56 loc) · 2.64 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
<?php
/* Hosting module -> $Id: $ */
global $AppUI;
$sort = $_GET['sort'];
switch($sort){
case "DNA" : $orderBy = "domain_name ASC"; break;
case "DND" : $orderBy = "domain_name DESC"; break;
case "DEA" : $orderBy = "domain_expiry_date ASC"; break;
case "DED" : $orderBy = "domain_expiry_date DESC"; break;
case "HNA" : $orderBy = "domain_name ASC"; break;
case "HND" : $orderBy = "domain_name DESC"; break;
case "HPA" : $orderBy = "hosting_package_name ASC"; break;
case "HPD" : $orderBy = "hosting_package_name DESC"; break;
case "HEA" : $orderBy = "hosting_expiry_date ASC"; break;
case "HED" : $orderBy = "hosting_expiry_date DESC"; break;
default : $orderBy = "domain_expiry_date ASC"; break;
}
// Forums mini-table in project view action
$q = new DBQuery;
$q->addTable('domains');
$q->addQuery("domains.domain_id, company_id, domain_name, domain_expiry_date, domain_registrar, domain_status,
domain_notes, hosting_id, hosting_package_name, hosting_expiry_date, hosting_status, hosting_notes");
$q->addJoin('hosting', 'h', 'h.domain_id = domains.domain_id');
$q->addOrder($orderBy);
$results = $q->exec();
?>
<table width="100%" align="center" cellpadding="0" cellspacing="0" style="background-color: white; border-top: 2px solid #D4D0C8;">
<tr><td><br /></td></tr>
<tr>
<?php
$domains = array();
while($row = db_fetch_assoc($results)){
$domains[] = $row;
}
?>
<td>
<table width="90%" align="center" class="tbl">
<th align="center" nowrap="nowrap" width="200" height="20"><a href="index.php?m=hosting&tab=0&sort=<?php if($sort == "HND") echo "HNA"; else echo "HND"; ?>"><?php echo $AppUI->_('Domain'); if($sort == "HND") echo " ∨"; elseif($sort == "HNA") echo " ∧"; ?></a></th>
<th align="center" nowrap="nowrap" width="150" height="20"><a href="index.php?m=hosting&tab=0&sort=<?php if($sort == "HPD") echo "HPA"; else echo "HPD"; ?>"><?php echo $AppUI->_('Hosting Package'); if($sort == "HPD") echo " ∨"; elseif($sort == "HPA") echo " ∧"; ?></a></th>
<th align="center" nowrap="nowrap" width="150" height="20"><a href="index.php?m=hosting&tab=0&sort=<?php if($sort == "HED") echo "HEA"; else echo "HED"; ?>"><?php echo $AppUI->_('Expiry Date'); if($sort == "HED") echo " ∨"; elseif($sort == "HEA") echo " ∧"; ?></a></th>
<?php
foreach($domains as $domain){
?>
<tr>
<td><a href="index.php?m=hosting&a=addedit&domain_id=<?php echo $row['domain_id']; ?>"><?php echo $domain['domain_name']; ?></a></td>
<td align="center"><?php echo $domain['hosting_package_name']; ?></td>
<td align="center"><?php echo $domain['hosting_expiry_date']; ?></td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
<tr><td><br /></td></tr>
</table>