mr kennedy
Member
- Messages
- 524
- Reaction score
- 1
- Points
- 18
Script Name: Webmail Login Script
Author: dgenx210 (x10's mr kennedy)
Script Language: PHP
Script Dependencies: Webmail
Installation Time: <5 Minutes
Installation Difficulty: EASY!
Author: dgenx210 (x10's mr kennedy)
Script Language: PHP
Script Dependencies: Webmail
Installation Time: <5 Minutes
Installation Difficulty: EASY!
Code 1:
Here's the code for the login form. you could copy and paste this to (anyfilename).php, edit one line and save it.
PHP:
<?php
/*#############################################*\
# Webmail Login Form v.1.00
# by dgenx210(dgenx210@gmail.com)
# Exclusively created for x10Hosting.com
#---------------------------------------
# You are free to redistribute or alter this
# source code as long as you keep this
# copyright text.
\*#############################################*/
//config
$maildomain = 'yourdomain.com'; //enter here the domain of your site
//no need to edit below here :)
?>
<title><?php echo $maildomain ?> Webmail Login</title>
<center><form action="login_redir.php" method="post">
<table cellspacing="4" cellpadding="0">
<tr><td>Username:</td><td><input type="text" name="user">@<?php echo $maildomain ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass"></td></tr>
<tr><td>Login To:</td>
<td align="left">
<select name="port">
<option value="2095">Webmail</option>
<option value="2096">Secure Webmail</option>
</select>
</td></tr>
<tr><td align="left" colspan="2">
<input type="submit" name="login" value="login" style="cursor:pointer">
</td>
</tr>
</table>
</form></center>
Code 2:
This code has only one line to edt just like the first code. Save this code as 'login_redir.php' without the quotemarks
PHP:
<html>
<?php
/*#############################################*\
# Webmail Login Form v.1.00
# by dgenx210(dgenx210@gmail.com)
# Exclusively created for x10Hosting.com
#---------------------------------------
# You are free to redistribute or alter this
# source code as long as you keep this
# copyright text.
\*#############################################*/
#your domain or ip
$domain = "yourdomain.com";//replace 'yourdomain.com' with your x10Domain or Subdomain
#no need to edit after this line!
if(!$_POST['login']) {
exit;
}
$user = $_POST['user'];
$pass = $_POST['pass'];
$port = $_POST['port'];
$port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://";
$port == "2095" || $port == "2096" && !eregi("@", $user) ? $user = "".$user."@".$domain."" : $user = $user;
?>
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>
</body>
</html>
v2 will be coming before the year ends with the capablity of logging in to cPanel using the same script
---------------
Well this is my first script release and Feedbacks and Self Modifications are very warmly welcome.
Last edited: