You really don't need that list; you can have the user enter his domain name, username, and password...
This came about from another thread....it works on a single server....and it would be nice if someone hacked it up to allow the user select the control panel or webmail.
Cut Here------------------------------------------------------------------
<?php
// Setup
$securelogin = false;
$loginport = "2222";
$logouturl = "http://www.example.com/usefulinfo.php";
$loginfail = "http://www.example.com/failedlogin.php";
// Process login
if (isset($_POST["username"])) {
$username = $_POST["username"];
$password = $_POST["password"];
$domain = $_POST["domain"];
if ( $securelogin ) {
$protocol = "https:";
} else {
$protocol = "http:";
}
$url = $protocol."//".$domain.":".$loginport."/CMD_LOGIN";
$referer = "/";
// This form is used to send the login information to DirectAdmin
?>
<form id='processlogin' name='processlogin' method='post' action='<?php echo $url; ?>'>
<input type='hidden' name='username' value="<?php echo $username; ?>">
<input type='hidden' name='password' value="<?php echo $password; ?>">
<input type='hidden' name='referer' value="<?php echo $referer; ?>">
<input name="FAIL_URL" type="hidden" value="<?php echo $loginfail; ?>">
<input name="LOGOUT_URL" type="hidden" value="<?php echo $logouturl; ?>">
</form>
<script type='text/javascript' language='javascript'>
window.document.getElementById('processlogin').submit();
</script>
<?php
}
// Login form that is displayed on your page.
?>
<table>
<form action="" method="POST" name="loginform">
<tr><td align=right>Username:</td><td><input type=text name=username></td></tr>
<tr><td align=right>Password:</td><td><input type=password name=password></td></tr>
<tr><td align=right>Domain name:</td><td><input type=text name=domain></td></tr>
<tr><td align=right colspan=2><input type=submit value='Login'></td></tr>
</form>
</table>
Cut here -------------------------------------------------------------