thats the basic backend script its was a quick and dirty fix for a problem and its been altered from the orginal i found in a forum that was written by mirahost and it was called something like Server Assistant Login       
$db_name = "";
$db_user = "";
$db_pass = "";
// No need to edit below
  @ $db = mysql_connect("localhost", "$db_user", "$db_pass");
  if (!$db)
  {
     echo "Error: Could not connect to database.  Please try again later.";
     exit;
  }
  if ($_POST['service'] !=""){
  mysql_select_db("$db_name");
  $ip = gethostbyname($_POST['domain']);
  $query = "select server_name from servers where ips like '%".$ip."%'";
  $result = mysql_query($query);
  $row = mysql_fetch_array($result);
  if($result)
  	{
	if($_POST['service'] =="plesk"){
	header("Location: 
https://$row[0]:8443/login_up.php3?login_name=".$_POST['login']."&passwd=".$_POST['passwd']."");
	exit;
	}
	elseif($_POST['service'] =="urchin"){
	header("Location: 
https://$row[0]:9999/session.cgi?app=admin&action=login&user=".$_POST['login']."&pass=".$_POST['passwd']."");
	exit;
	}
	elseif($_POST['service'] =="webmail"){
	header("Location: 
http://webmail.".$_POST['domain']."/horde/");
	exit;
	}
	elseif($_POST['service'] =="modernbill"){
	header("Location: 
https://domain.name/modernbill/?username=".$_POST['login']."&password=".$_POST['passwd']."&op=login&submit=submit");
	exit;
	}
	}
	}
?>