<?php
include("_mysql.php");
$con = mysql_connect($host, $user, $pwd) or system_error('ERROR: Can not connect to ispCP MySQL-Server');
$sel = mysql_select_db($db, $con) or system_error('ERROR: Can not connect to database "webspell"');
$ds=mysql_fetch_array(mysql_query("SELECT domain FROM `".PREFIX."user` WHERE userID='".$_GET['uid']."' AND domain='".$_GET['domain']."'",$con));
$a = mysql_connect('localhost', 'root', 'passwort') or system_error('ERROR: Can not connect to ispCP MySQL-Server');
$b = mysql_select_db('ispcp', $a) or system_error('ERROR: Can not connect to database "ispcp"');
$ds2=mysql_fetch_array(mysql_query("SELECT * FROM `domain` WHERE `domain_name`='".$ds['domain']."'",$a));
$dom_id = $ds2['domain_id'];
$status = $ds2['domain_status'];
echo "Informationen über Ihre Domain: ".$ds2['domain_name']."<br />";
echo "Domain ID: ".$dom_id."<br /><br />";
echo "Status : ".$status."<br /><br />";
// Datenbanken
$sql="SELECT COUNT(*) FROM `sql_database` WHERE `domain_id`='".$dom_id."'";
$query = mysql_query($sql,$a);
$count=mysql_fetch_array($query);
echo "<strong>Datenbanken: ".$count[0]."</strong><br />";
$sql="SELECT sqld_name FROM `sql_database` WHERE `domain_id`='".$dom_id."' ORDER BY sqld_name";
$query = mysql_query($sql,$a);
while($ds3 = mysql_fetch_array($query))
{
echo $ds3['sqld_name']."<br />";
}
echo "<br />";
// Mailaccounts
$sql="SELECT COUNT(*) FROM `mail_users` WHERE `domain_id`='".$dom_id."'";
$query = mysql_query($sql,$a);
$count=mysql_fetch_array($query);
echo "<strong>Mailaccounts: ".$count[0]."</strong><br />";
$sql="SELECT mail_acc FROM `mail_users` WHERE `domain_id`='".$dom_id."' ORDER BY mail_acc";
$query = mysql_query($sql,$a);
while($ds4 = mysql_fetch_array($query))
{
echo $ds4['mail_acc']."@".$_GET['domain']."<br />";
}
echo "<br />";
// Subdomains
$sql="SELECT COUNT(*) FROM `subdomain` WHERE `domain_id`='".$dom_id."'";
$query = mysql_query($sql,$a);
$count=mysql_fetch_array($query);
echo "<strong>Subdomains: ".$count[0]."</strong><br />";
$sql="SELECT subdomain_name FROM `subdomain` WHERE `domain_id`='".$dom_id."' ORDER BY subdomain_name";
$query = mysql_query($sql,$a);
while($ds5 = mysql_fetch_array($query))
{
echo $ds5['subdomain_name'].".".$_GET['domain']."<br />";
}
echo "<br />";
mysql_close($a);
?>