Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Page 1 of 12 1 2 3 11 ... LastLast
Results 1 to 15 of 179
  1. #1
    cPanel Staff cpanelnick's Avatar
    Join Date
    Feb 2003
    Location
    Houston, TX
    Posts
    4,514

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

    Here is a sample php script that will allow you to add a branded login box to your site:

    http://www.cpanel.net/cpanel-login.phps

  2. #2
    Member sawbuck's Avatar
    Join Date
    Jan 2004
    Posts
    1,310
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Nice improvement.
    Thank you.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge rvskin's Avatar
    Join Date
    Feb 2003
    Posts
    397

    Default

    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.
    RVSkin, a great experience for you, resellers and clients!
    http://www.RVSkin.com - The Most Intelligent Cpanel Skin, 23 Languages included.
    http://www.RVSiteBuilder.com - Website Builder for Hosting Provider.
    http://www.cPanelLicense.com - External cPanel License.

  4. #4
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Thanks. I'm just doing a bit of work on my site now so it's perfect timing.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  5. #5
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  6. #6
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    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>
    Last edited by squirrel; 06-18-2004 at 12:58 AM.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge rvskin's Avatar
    Join Date
    Feb 2003
    Posts
    397

    Default

    Sorry, using your login page, I still get the login failed from unbranded X skin.
    RVSkin, a great experience for you, resellers and clients!
    http://www.RVSkin.com - The Most Intelligent Cpanel Skin, 23 Languages included.
    http://www.RVSiteBuilder.com - Website Builder for Hosting Provider.
    http://www.cPanelLicense.com - External cPanel License.

  8. #8
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Are you on cPanel 9.4.1 or later?
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge rvskin's Avatar
    Join Date
    Feb 2003
    Posts
    397

    Default

    Ahh..sorry I thought that my server is on latest. But it still on cPanel 9.4.0-E36.

    Noted that on your login page, if the first time failed and I try to login again the URL will be wrong. I got this:
    https://www.premierwebsitesolutions.ca:2083:2083/login/
    RVSkin, a great experience for you, resellers and clients!
    http://www.RVSkin.com - The Most Intelligent Cpanel Skin, 23 Languages included.
    http://www.RVSiteBuilder.com - Website Builder for Hosting Provider.
    http://www.cPanelLicense.com - External cPanel License.

  10. #10
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Weird, I don't have that happen.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  11. #11
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    You should upgrade. It's a nice feature.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  12. #12
    cPanel Partner NOC cPanel Partner NOC Badge rvskin's Avatar
    Join Date
    Feb 2003
    Posts
    397

    Default

    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.
    RVSkin, a great experience for you, resellers and clients!
    http://www.RVSkin.com - The Most Intelligent Cpanel Skin, 23 Languages included.
    http://www.RVSiteBuilder.com - Website Builder for Hosting Provider.
    http://www.cPanelLicense.com - External cPanel License.

  13. #13
    Member
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    52

    Default cPanel login

    For viewing the code above see this for example.

    http://www.webhostingmelbourne.com/log.php

    Thanks for that!
    Webhosting AU
    Australian Reseller and Shared Hosting Services - when hosting really matters.

  14. #14
    cPanel Partner NOC cPanel Partner NOC Badge rvskin's Avatar
    Join Date
    Feb 2003
    Posts
    397

    Default Re: cPanel login

    Originally posted by webhostau
    For viewing the code above see this for example.

    http://www.webhostingmelbourne.com/log.php

    Thanks for that!
    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.
    RVSkin, a great experience for you, resellers and clients!
    http://www.RVSkin.com - The Most Intelligent Cpanel Skin, 23 Languages included.
    http://www.RVSiteBuilder.com - Website Builder for Hosting Provider.
    http://www.cPanelLicense.com - External cPanel License.

  15. #15
    Member
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    52

    Default well well well

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

    Thanks for that!
    Webhosting AU
    Australian Reseller and Shared Hosting Services - when hosting really matters.

+ Reply to Thread
Page 1 of 12 1 2 3 11 ... LastLast
Similar Threads & Tags
Similar threads

  1. Firefox - Generic Popup Login Box instead of cPanel/WHM login pages
    By Nathan D. in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-01-2009, 09:27 AM
  2. Problem with non SSL login to WHM, CPANEL and WEBMAIL
    By mailo in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 10-15-2008, 02:27 PM
  3. Adding webmail to your site
    By nileshwarade in forum E-mail Discussions
    Replies: 10
    Last Post: 01-18-2006, 07:41 AM
  4. cPanel/WHM/WebMail login box to your site
    By sfera in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-20-2005, 02:40 PM
  5. adding a login feature for webmail
    By Darnell30 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-18-2003, 09:06 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube