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.

Cpanel 9 Login Script

Discussion in 'cPanel Developers' started by Steve-PWH, Mar 5, 2004.

  1. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Due to MS without warning breaking loads of login systems via IE here is a replacement system

    You need Cpanel 9, Will not work on Cpanel 8 stable

    You are free to use as you see fit, Hope is of help to some people

    Note: Due to how it works sending login information via URL this is not recomended for use on a shared machine without seperate users

    Download attachment from next post as forums messing code up
     
    #1 Steve-PWH, Mar 5, 2004
    Last edited: Mar 5, 2004
  2. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    File Attached
     

    Attached Files:

  3. raventec

    raventec Well-Known Member

    Joined:
    Apr 19, 2003
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    16
    Cool! Thank you so much for that.
     
  4. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Here is another version that includes webmail and dont use popup windows
     

    Attached Files:

  5. RobertOnTheAir

    RobertOnTheAir Active Member

    Joined:
    Aug 2, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Steve!
     
  6. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Steve thanks I love this script.

    One question, it will only use https on port 2083 for cpanel, how can this be altered to use the secure ports for whm (2087) and webmail (2096)?

    I would love to also add this to my options.
     
  7. osfdeath

    osfdeath Well-Known Member

    Joined:
    Aug 29, 2003
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    Simply change the port in this line:
    PHP:
    login_option == '2083' protacal 'https://' protacal 'http://' ;
     
  8. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I want to offer the options for multiple secure ports, Like:

    Secure cpanel
    Secure webmail
    secure whm

    Not just one.
     
  9. osfdeath

    osfdeath Well-Known Member

    Joined:
    Aug 29, 2003
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    It does - has a drop down box with options
    Have a look at it

    You can add more options etc
     
  10. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I am just not very good with coding yet, and I have tried to use this with other secure ports like 2096 and 2087 but I must not codeing it right.

    I see where the drop down options are, and I have added those options for the different ports in there, but the script only seems to work with one secure port listed - unless I am changing the code wrong - which is what I suspect.

    Can someone give me an example of the code for using multiple secure ports for login?
     
  11. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I also noticed that if you use it for webmail you still get the username and password box - popup so you have to enter it in twice - anyway around that?
     
  12. osfdeath

    osfdeath Well-Known Member

    Joined:
    Aug 29, 2003
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    It doesn't cause a popup box so it's probably your setup.

    I'll gladly customize it for your server if you'd like (only takes a few minutes)

    Simply PM me with the following info:

    1. domain name (with IP)
    2. do you want "all-in-on" login or whm/cpanel/webmail all seperate? (I use them seperately myself)

    Here is how I have my things setup

    On my webhosting site I have a cpanel login for my customers. The script uses my server IP and they only need to enter their username and password to gain access to their cpanel (works well for those that are new to this stuff)
    I then offer each of my customers a simply webmail login form customized for their own domain so they don't have to use the longer name@domain.com for username.
    I don't use anything for whm login (but it's the same as cpanel login really)
     
  13. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Will only do that if send wrong details

    Here is version with webmail secure added

    BTW dont work with WHM currently
     

    Attached Files:

    #13 Steve-PWH, Mar 18, 2004
    Last edited: Mar 18, 2004
  14. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Nope that will not do it u need to add secure ports there not change

    Thats just a cut down if-then-else in long terms its

    PHP:
    if (login_option == '2083') {
      
    // Its a secure port
      
    protacal 'https://';
    } else {
      
    protacal 'http://';
    }
     
  15. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    So how would I write this for three different secure ports:

    PHP:


    if (login_option == '2083') {
      
    // Its a secure port
      
    protacal 'https://';
    } else {
      
    protacal 'http://';
    }
    if (
    login_option == '2087') {
      
    // Its a secure port
      
    protacal 'https://';
    } else {
      
    protacal 'http://';
    }
    if (
    login_option == '2096') {
      
    // Its a secure port
      
    protacal 'https://';
    } else {
      
    protacal 'http://';
    }


    PHP

    And include 
    all in the script?
     
  16. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    WHM dont work as yet (well not in 9.1.0 S93)

    as for other two

    PHP:
    login_option == '2083' || '2096' protacal 'https://' protacal 'http://' ;
    I attached script 3 posts up with it in
     
  17. eaglewolf

    eaglewolf Member

    Joined:
    Mar 4, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Sweet - Perfect thanks!
     
  18. eazistore

    eazistore Well-Known Member

    Joined:
    Nov 7, 2003
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Singapore
    Open New Window

    Hi Steve-PWH,

    The script is good.
    I was wondering if it's able to "open new window" when the user have input the USERNAME and PASSWORD?

    You expertise is greatly appreciated.

    Cheers!
    Vince
     
  19. Steve-PWH

    Steve-PWH Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Re: Open New Window

    Original one did that, will modify it to use all features of later script but at mo playing BF1942 :D
     
  20. Slav

    Slav Well-Known Member

    Joined:
    Oct 28, 2002
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    Is there a way to modify it to allow only to login to a specific webmail porgram, so that they can only go to neomail or one of the others instead seeing all 3?
    Thanks Slav
     
Loading...

Share This Page