Results 1 to 9 of 9
  1. #1

    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>&nbsp;</td><td><img src="images/button_submit.gif" width="63" height="17" alt="" vspace="3"></td></tr>
    <tr><td>&nbsp;</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.

  2. #2
    so no one knows how to sort it out

  3. #3
    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>&nbsp;</td><td><input name="login" value="login" type="image" src="images/button_submit.gif" width="63" height="17" border="0"></td></tr>
        <tr><td>&nbsp;</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 -->
    try that
    i changed your img tag

  4. #4
    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

  5. #5
    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>&nbsp;</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>&nbsp;</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

  6. #6
    thanks but didn't work

  7. #7
    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>&nbsp;</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>&nbsp;</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 -->

  8. #8
    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

  9. #9
    Google is your friend

    Try the first result - http://www.hotscripts.com/Detailed/32562.html

    Regards
    Steven
    2UK2 - Local Solutions, World Wide Potential

    First-Rate Support, Stupendous Prices, Remarkable Uptime

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •