The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding a cPanel/WHM/WebMail login box to your site.

Discussion in 'E-mail Discussions' started by cPanelNick, Jun 17, 2004.

  1. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Nice improvement.
    Thank you.
     
  3. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    Where is the right location for this file?
    If I put it in my main website such as http://domain.com/cpanellogin.php and user enter wrong password, it will send to the unbranded X skin page asking username and password again.
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Thanks. I'm just doing a bit of work on my site now so it's perfect timing. :)
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Done.

    I added a cpanel and webmail login to my site. If anyone wants to see how I made both options available, just look about 2/3 of the way down the source code of http://www.premierwebsitesolutions.ca/members.pws.

    I made a tiny change so if someone enters wrong info, they don't see "Your login attempt failed!" for both options.

    Thanks Nick.
     
  6. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Here's the piece of php code for that part of my page.

    Code:
    <table align="center" border="0" cellpadding="25" cellspacing="0">
    <tr><td align="left">
    <p align="left">
    <font size="+1" color="#0000a0">cPanel Login</font></p>
    <?php
    if ($_GET['cfailed'] == "1") {
    ?>
    <p align="left">
    <font color=#ff0000><b>Your login attempt failed!</b></font></p>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2083/login/\" method=\"post\">";
    ?>
    <p align="left">
    <b>Username: </b><input type="text" name="user" size="10"><br>
    <b>Password: </b><input type="password" name="pass" size="12"><br>
    <?php
    print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
     $_SERVER['PHP_SELF'] . "?cfailed=1\">";
    ?>
    <input type="submit" value=" Login ">
    </form></p>
    </td><td align="left">
    <p align="left">
    <font size="+1" color="#0000a0">Webmail Login</font></p>
    <?php
    if ($_GET['mfailed'] == "1") {
    ?>
    <p align="left">
    <font color=#ff0000><b>Your login attempt failed!</b></font></p>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/login/\" method=\"post\">";
    ?>
    <p align="left">
    <b>Username: </b><input type="text" name="user" size="10"><br>
    <b>Password: </b><input type="password" name="pass" size="12"><br>
    <?php
    print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
     $_SERVER['PHP_SELF'] . "?mfailed=1\">";
    ?>
    <input type="submit" value=" Login ">
    </form></p>
    </td></tr>
    </table>
    
     
    #6 PWSowner, Jun 17, 2004
    Last edited: Jun 17, 2004
  7. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    Sorry, using your login page, I still get the login failed from unbranded X skin.
     
  8. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Are you on cPanel 9.4.1 or later?
     
  9. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
  10. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Weird, I don't have that happen.
     
  11. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You should upgrade. It's a nice feature. ;)
     
  12. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    I agree. This is definitly what I want. Many times I have to answer who is CpanelX. Users thought I was a reseller for them.

    Nick, could you tweak it a bit allowing a hidden field
    <input type="hidden" page="3rdparty/squirrelmail/index.php">

    I want users login to SquirrelMail immediatly. No more webmail application selector.
     
  13. webhostau

    webhostau Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    cPanel Access Level:
    Website Owner
  14. rvskin

    rvskin Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    400
    Likes Received:
    1
    Trophy Points:
    18
    Re: cPanel login

    Thanks for the link but the webmail login doesn't work. I tried to login your webmail using test@test.com and password test. It will show the pop-up window asking me the username and password again.
     
  15. webhostau

    webhostau Well-Known Member

    Joined:
    Jan 12, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Australia
    cPanel Access Level:
    Website Owner
    well well well

    Well that sounds about right. Its back to the drawing board.

    Thanks for that!
     
  16. babazar

    babazar Member

    Joined:
    Aug 2, 2004
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Where can i find tehf ull code for this ?

    Thanks
     
  17. babazar

    babazar Member

    Joined:
    Aug 2, 2004
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Where can i find teh full code for this?

    Thanks
     
  18. chadi

    chadi BANNED

    Joined:
    Apr 20, 2004
    Messages:
    415
    Likes Received:
    0
    Trophy Points:
    0
    How can I make it so that it recognized all server IP's on our network?
     
  19. fluidhosts

    fluidhosts Member

    Joined:
    Jul 12, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    ocala, Florida
  20. Nibuha

    Nibuha Member

    Joined:
    Feb 3, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Use a drop down ... you would have to name your servers for clients or something.

    Bob, kim ... stuff like that ... so you tel them what server they are on and so when they pick it just points at the right IP and then adds the :2086 or so on.

    I use that for all the different logins
     
Loading...

Share This Page