4
* Generic template place holder class.
6
* @subpackage dryden -> ui -> tpl
8
* @author Bobby Allen (ballen@zpanelcp.com)
9
* @copyright ZPanel Project (http://www.zpanelcp.com/)
10
* @link http://www.zpanelcp.com/
11
* @license GPL (http://www.gnu.org/licenses/gpl.html)
13
class ui_tpl_clientdomains {
15
public function Template() {
17
$currentuser = ctrl_users::GetUserDetail();
18
$line = "<table border=\"0\" cellSpacing=\"0\" cellPadding=\"2\" width=\"100%\">";
20
$sql = "SELECT * FROM x_vhosts WHERE vh_acc_fk=" .$currentuser['userid']. " AND vh_type_in=1 AND vh_deleted_ts IS NULL ORDER BY vh_id_pk LIMIT 4";
21
$numrows = $zdbh->query($sql);
22
if ($numrows->fetchColumn() <> 0) {
23
$sql = $zdbh->prepare($sql);
26
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Domains</strong></td><td></td></tr>";
27
while ($rowdomains = $sql->fetch()) {
28
if ($rowdomains['vh_type_in'] == 1){
30
$line .= "<td nowrap=\"nowrap\" width=\"100%\" style=\"text-indent:14px;\"><a href=\"http://".$rowdomains['vh_name_vc']."\" target=\"_blank\">".$rowdomains['vh_name_vc']."</a></td>";
31
$line .= "<td nowrap=\"nowrap\" align=\"left\">";
33
if($rowdomains['vh_active_in']==1 && $rowdomains['vh_enabled_in']==1){
34
$line .= "<a href=\"#\" title=\"Live\"><img src=\"<# ui_tpl_assetfolderpath #>/images/live.png\"></a> ";
35
}elseif ($rowdomains['vh_active_in']==0 && $rowdomains['vh_enabled_in']==1){
36
$line .= "<a href=\"#\" title=\"Pending\"><img src=\"<# ui_tpl_assetfolderpath #>/images/pending.png\"></a> ";
40
if($rowdomains['vh_enabled_in']==0){
41
$line .= "<a href=\"#\" title=\"Disabled\"><img src=\"<# ui_tpl_assetfolderpath #>/images/disabled.png\"></a> ";
47
$line .= "<tr><td> <a href=\"?module=domains\">(Show All)</a></td><td></td></tr>";
50
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Domains</strong></td><td></td></tr>";
51
$line .= "<tr><td nowrap=\"nowrap\" style=\"text-indent:14px;\"><span class=\"Side_Info_None\">No Domains Found</span></td><td><a href=\"?module=domains\">CREATE</a></td></tr>";
52
//$line .= "<tr><td> </td><td></td></tr>";
55
$sql = "SELECT * FROM x_vhosts WHERE vh_acc_fk=" .$currentuser['userid']. " AND vh_type_in=2 AND vh_deleted_ts IS NULL ORDER BY vh_id_pk LIMIT 4";
56
$numrows = $zdbh->query($sql);
57
if ($numrows->fetchColumn() <> 0) {
58
$sql = $zdbh->prepare($sql);
61
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Sub Domains</strong></td><td></td></tr>";
62
while ($rowdomains = $sql->fetch()) {
63
if ($rowdomains['vh_type_in'] == 2){
65
$line .= "<td nowrap=\"nowrap\" width=\"100%\" style=\"text-indent:14px;\"><a href=\"http://".$rowdomains['vh_name_vc']."\" target=\"_blank\">".$rowdomains['vh_name_vc']."</a></td>";
66
$line .= "<td nowrap=\"nowrap\" align=\"left\">";
68
if($rowdomains['vh_active_in']==1 && $rowdomains['vh_enabled_in']==1){
69
$line .= "<a href=\"#\" title=\"Live\"><img src=\"<# ui_tpl_assetfolderpath #>/images/live.png\"></a> ";
70
}elseif ($rowdomains['vh_active_in']==0 && $rowdomains['vh_enabled_in']==1){
71
$line .= "<a href=\"#\" title=\"Pending\"><img src=\"<# ui_tpl_assetfolderpath #>/images/pending.png\"></a> ";
75
if($rowdomains['vh_enabled_in']==0){
76
$line .= "<a href=\"#\" title=\"Disabled\"><img src=\"<# ui_tpl_assetfolderpath #>/images/disabled.png\"></a> ";
82
$line .= "<tr><td> <a href=\"?module=sub_domains\">(Show All)</a></td><td></td></tr>";
85
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Sub Domains</strong></td></td><td></tr>";
86
$line .= "<tr><td nowrap=\"nowrap\" style=\"text-indent:14px;\"><span class=\"Side_Info_None\">No Sub Domains Found</span></td><td><a href=\"?module=sub_domains\">CREATE</a></td></tr>";
87
//$line .= "<tr><td> </td><td></td></tr>";
90
$sql = "SELECT * FROM x_vhosts WHERE vh_acc_fk=" .$currentuser['userid']. " AND vh_type_in=3 AND vh_deleted_ts IS NULL ORDER BY vh_id_pk LIMIT 4";
91
$numrows = $zdbh->query($sql);
92
if ($numrows->fetchColumn() <> 0) {
93
$sql = $zdbh->prepare($sql);
96
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Parked Domains</strong></td><td></td></tr>";
97
while ($rowdomains = $sql->fetch()) {
98
if ($rowdomains['vh_type_in'] == 3){
100
$line .= "<td nowrap=\"nowrap\" width=\"100%\" style=\"text-indent:14px;\"><a href=\"http://".$rowdomains['vh_name_vc']."\" target=\"_blank\">".$rowdomains['vh_name_vc']."</a></td>";
101
$line .= "<td nowrap=\"nowrap\" align=\"left\">";
103
if($rowdomains['vh_active_in']==1 && $rowdomains['vh_enabled_in']==1){
104
$line .= "<a href=\"#\" title=\"Live\"><img src=\"<# ui_tpl_assetfolderpath #>/images/live.png\"></a> ";
105
}elseif ($rowdomains['vh_active_in']==0 && $rowdomains['vh_enabled_in']==1){
106
$line .= "<a href=\"#\" title=\"Pending\"><img src=\"<# ui_tpl_assetfolderpath #>/images/pending.png\"></a> ";
110
if($rowdomains['vh_enabled_in']==0){
111
$line .= "<a href=\"#\" title=\"Disabled\"><img src=\"<# ui_tpl_assetfolderpath #>/images/disabled.png\"></a> ";
117
$line .= "<tr><td> <a href=\"?module=parked_domains\">(Show All)</a></td><td></td></tr>";
120
$line .= "<tr><td nowrap=\"nowrap\"><img class=\"raquo\" src=\"<# ui_tpl_assetfolderpath #>/images/blank.png\" border=\"0\"><strong>Parked Domains</strong></td></td><td></tr>";
121
$line .= "<tr><td nowrap=\"nowrap\" style=\"text-indent:14px;\"><span class=\"Side_Info_None\">No Parked Domains Found</span></td><td><a href=\"?module=parked_domains\">CREATE</a></td></tr>";
122
//$line .= "<tr><td> </td><td></td></tr>";
b'\\ No newline at end of file'