Results 1 to 9 of 9
-
05-22-2006, 02:36 PM #1Newbie
- Join Date
- Feb 2006
- Posts
- 15
Help creating login script directly to cpanel
Hi everyone.
I have already got the layout for the login box. when i add code that i've found on other threads, they create their own buttons. I want to be ableto use whats already on my site.
gxhosting.net
the login form on the left currently doesn't do anything, I want it to directly login to cpanel.
here's the code that is currently there, how would I edit it so that it keep exactly the same layout and allow login to cpanel:
<!-- Customer Login -->
<table border="0" cellpadding="0" cellspacing="0" width="210">
<tr><td><img src="images/title_customerlogin.gif" width="210" height="30" alt=""></td></tr>
<tr><td align="center" background="images/login_bg.gif">
<table border="0" cellpadding="0" cellspacing="0" width="180">
<tr><td><img src="images/clear.gif" width="1" height="3" alt=""></td></tr>
<tr>
<td width="60" class="contentblue">Username</td>
<td width="120"><input type="Text" class="text" style="width:100px;"></td>
</tr>
<tr>
<td class="contentblue">Password</td>
<td><input type="Text" class="text" style="width:100px;"></td>
</tr>
<tr><td> </td><td><img src="images/button_submit.gif" width="63" height="17" alt="" vspace="3"></td></tr>
<tr><td> </td><td class="contentblue">Forgot password</td></tr>
</table>
</td></tr>
<tr><td><img src="images/login_bottom.gif" width="210" height="10" alt=""></td></tr>
</table>
<!-- Customer Login -->
Sorry, I had to post it like that. i couldn't see how to post it within another text box as i've seen in other threads.
I would appreciate any help modifying the above code to make it active to login directly to cpanel.
-
05-23-2006, 11:27 AM #2Newbie
- Join Date
- Feb 2006
- Posts
- 15
so no one knows how to sort it out
-
05-27-2006, 01:58 AM #3New Member
- Join Date
- May 2006
- Posts
- 4
Code:<!-- Customer Login --> <table border="0" cellpadding="0" cellspacing="0" width="210"> <tr><td><img src="images/title_customerlogin.gif" width="210" height="30" alt=""></td></tr> <tr><td align="center" background="images/login_bg.gif"> <table border="0" cellpadding="0" cellspacing="0" width="180"> <tr><td><img src="images/clear.gif" width="1" height="3" alt=""></td></tr> <tr> <td width="60" class="contentblue">Username</td> <td width="120"><input type="Text" class="text" style="width:100px;"></td> </tr> <tr> <td class="contentblue">Password</td> <td><input type="Text" class="text" style="width:100px;"></td> </tr> <tr><td> </td><td><input name="login" value="login" type="image" src="images/button_submit.gif" width="63" height="17" border="0"></td></tr> <tr><td> </td><td class="contentblue">Forgot password</td></tr> </table> </td></tr> <tr><td><img src="images/login_bottom.gif" width="210" height="10" alt=""></td></tr> </table> <!-- Customer Login -->
i changed your img tag
-
05-27-2006, 07:44 PM #4Newbie
- Join Date
- Feb 2006
- Posts
- 15
hi there, thanks for trying to help, but that still does not login to the cpanel area.
the lgoin address is not anywhere in the code as you have not told me where to put it. maybe that my mistake as I never provide it. but here it is: http://www.gxhosting.net:2082
Thanks once again as you are the only one who replied
-
05-27-2006, 11:44 PM #5New Member
- Join Date
- May 2006
- Posts
- 4
ok change your code for the login to this:
<!-- Customer Login -->
<form action="cplogin.php" method="post">
<table border="0" cellpadding="0" cellspacing="0" width="210">
<tr><td><img src="images/title_customerlogin.gif" width="210" height="30" alt=""></td></tr>
<tr><td align="center" background="images/login_bg.gif">
<table border="0" cellpadding="0" cellspacing="0" width="180">
<tr><td><img src="images/clear.gif" width="1" height="3" alt=""></td></tr>
<tr>
<td width="60" class="contentblue">Username</td>
<td width="120"><input type="Text" class="text" name="user" style="width:100px;"></td>
</tr>
<tr>
<td class="contentblue">Password</td>
<td><input type="password" class="text" name="pass" style="width:100px;"></td>
</tr>
<tr><td> </td><td><input name="login" value="login" type="image" src="images/button_submit.gif" width="63" height="17" alt="" vspace="3" boder="0"></td></tr>
<tr><td> </td><td class="contentblue">Forgot password</td></tr>
</table>
</td></tr>
<tr><td><img src="images/login_bottom.gif" width="210" height="10" alt=""></td></tr>
</table>
<!-- Customer Login -->
and then create a file called cplogin.php with this code:
<html>
<?php
if(!$_POST['login']) {
exit;
}
$user = $_POST['user'];
$pass = $_POST['pass'];
$port = 2082;
?>
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="gxhosting.net:2082/login/" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>
</body>
</html>
you should be set after that.
I did not make this code I kinda stole/modified it from a previous post on WHT.
Thanks to whoever created it.
PS you might need to add the http www thing to your url, I couldn't do it cause I don't have 5 posts yet so I can't put that in my post, lol
-
05-28-2006, 06:54 PM #6Newbie
- Join Date
- Feb 2006
- Posts
- 15
thanks but didn't work
-
05-28-2006, 07:18 PM #7Web Hosting Master
- Join Date
- Apr 2006
- Posts
- 562
How about this...
Code:<!-- Customer Login --> <form action="/cpanel/login/" method="POST"> <table border="0" cellpadding="0" cellspacing="0" width="210"> <tr><td><img src="images/title_customerlogin.gif" width="210" height="30" alt=""></td></tr> <tr><td align="center" background="images/login_bg.gif"> <table border="0" cellpadding="0" cellspacing="0" width="180"> <tr><td><img src="images/clear.gif" width="1" height="3" alt=""></td></tr> <tr> <td width="60" class="contentblue">Username</td> <td width="120"><input type="Text" name="user" class="text" style="width:100px;"></td> </tr> <tr> <td class="contentblue">Password</td> <td><input type="Text" name="pass" class="text" style="width:100px;"></td> </tr> <tr><td> </td><td><input name="Submit" value="login" type="image" src="images/button_submit.gif" width="63" height="17" alt="" vspace="3"></td></tr> <tr><td> </td><td class="contentblue">Forgot password</td></tr> </table> </td></tr> <tr><td><img src="images/login_bottom.gif" width="210" height="10" alt=""></td></tr> </table> <!-- Customer Login -->
-
05-28-2006, 07:22 PM #8Newbie
- Join Date
- Feb 2006
- Posts
- 15
hi mate, thanks for this. it does seem to work, but the login box appears after asking to login. this box seems to go to the actual host i am reselling through
-
05-28-2006, 08:47 PM #9Junior Guru Wannabe
- Join Date
- Mar 2005
- Posts
- 41
Google is your friend
Try the first result - http://www.hotscripts.com/Detailed/32562.html
Regards
Steven2UK2 - Local Solutions, World Wide Potential
First-Rate Support, Stupendous Prices, Remarkable Uptime