Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 63
  1. #26
    Join Date
    Feb 2001
    Location
    UK
    Posts
    461

    Works great

    Have tried it on my site and seems to work perfect.

    Theres just one thing I'd like and thats for clients cpanels to open in a new window, is that possible?

    Thanks.

  2. #27
    Ok Im sorry I know this is an old topic but Im using this form and Im a form noob. Is there a way to make this form strictly for webmail? I removed the other options so it always logs in as webmail but i would like the option box to not be visible...so it would just be a name and password box type form...im sure you know what im talking about, also is there a way to make it go straight to neomail? Sorry these are probably very noob questions but I am very noob. So any help would be very much appreciated! Thanks!

    -Kodene

  3. #28
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,808
    Well here is what you want I think:

    For the Form
    HTML Code:
    <html>
    <head>
    <title>Webmail Login</title>
    </head>
    <body>
    <form name="Login" method="post" action="login.php">
      WebMail Login<br>
      User Id 
      <input name="domain" value="yourdomain.com" type="hidden"> 
    <input name="user" type="text" size="12">
      <br>
      Password 
      <input name="port2" value="2095" type="hidden">
    <input name="pass" type="password" size="12">
      <br>
      <input type="submit" name="login2" value="Submit">
    </form>
    </body>
    </html>
    And for the login script
    PHP Code:
    <?php
       
    #your domain or ip
       
    $domain $_POST['domain'];
       if(!
    $_POST['login']) {
       exit;
       }
       
    $user $_POST['user'];
       
    $pass $_POST['pass'];
       
    $port $_POST['port'];
       
    $port == "2083" || $port == "2096" $pre "https://" $pre "http://";
       
    $port == "2095" || $port == "2096" && !eregi("@"$user) ? $user "".$user."@".$domain."" $user $user;
    ?>
    <HTML>
    <HEAD>
    <TITLE>WebMail Login</TITLE>
    </HEAD>
    <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo "".$pre."".$domain.":".$port."/login/"?>" method="post">
    <input type="hidden" name="user" value="<?php echo $user?>">
    <input type="hidden" name="pass" value="<?php echo $pass?>">
    </form>
    <br><br><br><br>
    <div align="center">Wait till we log you in!!!</div>
    </BODY>
    </HTML>
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  4. #29
    Hey Vinsar thank you for posting that code. But it doesnt work. When you go to login in just goes to a black screen which I am certain is the php page. Is supposed to go straight to neomail? Do you know what might be wrong with it? Like I said I have no idea what im doing when it comes to forms! So sorry if this just seems like a stupid question. Thanks again!

    -Kodene

    PS: now that im thinking about, it is there a way to make the domain a choice of two? For instance have a drop menu or option menu or whatever its call to select the domain they want to log into?

  5. #30
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,808
    Sorry for the late reply I had been away for a while.

    Well you know the code above is for two pages, first one is the HTML FORM page and second one is a PHP page, so when you type in the values in the first page they are passed on to the PHP script which in turn process the login and send you to cPanel Mail management page from where you can select Neomail Horde or Squirrelmail.

    BTW have you changed the yourdomain.com to proper name?
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  6. #31
    Quote Originally Posted by vinsar
    Sorry for the late reply I had been away for a while.

    Well you know the code above is for two pages, first one is the HTML FORM page and second one is a PHP page, so when you type in the values in the first page they are passed on to the PHP script which in turn process the login and send you to cPanel Mail management page from where you can select Neomail Horde or Squirrelmail.

    BTW have you changed the yourdomain.com to proper name?
    Oh, I wasnt even paying attention. Didnt notice it was php and html, thats whay it doesnt work. I already have a form like this that works but is what Im looking for is one that will open directly into a neomail account. Is this possible? Yes I did change the "domain.com" to my domain. Also is there a way to make it where you can choose the domain? For instance have a drop down option box to select the domain of choice? Thanks again for your time!

  7. #32
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,808
    Well going directly to neomail is not possible at the moment as far as I know, and for the drop down menu option you may change the "yourdomain.com" attribute from hidden to list/menu. Like

    Code:
      <select name="select">
        <option selected>Select Domain</option>
        <option value="1stdomain.com">1stdomain.com</option>
        <option value="2nddomain.com">2nddomain.com</option>
        <option value="3rddomain.com">3rddomain.com</option>
      </select>
    Or you may use the original code provided by Loon to type in the complete email id as user name.
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  8. #33
    Quote Originally Posted by vinsar
    Well going directly to neomail is not possible at the moment as far as I know, and for the drop down menu option you may change the "yourdomain.com" attribute from hidden to list/menu. Like

    Code:
      <select name="select">
        <option selected>Select Domain</option>
        <option value="1stdomain.com">1stdomain.com</option>
        <option value="2nddomain.com">2nddomain.com</option>
        <option value="3rddomain.com">3rddomain.com</option>
      </select>
    Or you may use the original code provided by Loon to type in the complete email id as user name.
    Thanks Again!

  9. #34
    Join Date
    Sep 2005
    Posts
    158
    Very useful thread this

    Anyone know how you would get it to log into a billing system, like ClientExec?
    Big Wow Web Hosting
    Cheap and Reliable Shared and Reseller Hosting
    •99.9% Uptime •MailScanner •Free Setup and Sitebuilder •Plesk, cPanel or DirectAdmin
    •Fast, Secure Servers •Great Free Extras •100% White Label

  10. #35
    Hi,
    I was wondering if anyone could help me.
    Ive got this script on my site, works fine...except
    the login to box with the selections in is to big and because my sites made up with tables and the login is on the left its pushed half of my site out to the right,

    Does anyone know how to get the login into box to move down, ive tried <br> ect and everything else i can think of to try and move it,

    Heres an example of what i mean:

    Username: [------------]
    Password: [------------]
    Login to:
    [-----------------]

    [Login]

    Thanks

  11. #36
    Join Date
    Jun 2005
    Location
    USA
    Posts
    32
    I would also be interested in adapting this to log into Clientexec and directi to allow my customers to manage billing and domain issues.

    If anyone has suggestions on how this could be done, I'd love to hear them.

  12. #37
    Join Date
    Apr 2002
    Location
    New York City!
    Posts
    312
    Quote Originally Posted by jsgilly20
    Hi,
    I was wondering if anyone could help me.
    Ive got this script on my site, works fine...except
    the login to box with the selections in is to big and because my sites made up with tables and the login is on the left its pushed half of my site out to the right,

    Does anyone know how to get the login into box to move down, ive tried <br> ect and everything else i can think of to try and move it,

    Heres an example of what i mean:

    Username: [------------]
    Password: [------------]
    Login to:
    [-----------------]

    [Login]

    Thanks
    I beleive you can add those log-in sections into another ROW in the table to get it to all line up evenly.

    So you can have:

    USER
    -------------------
    log-in section
    -------------------
    PASSWORD
    -------------------
    log-in section
    -------------------
    SUBMIT



    David K.

  13. #38
    I have recently tried this script and for some reason it takes me to cplogin.php and it is just a blank page.
    Thanks, Kevin

  14. #39
    Join Date
    Sep 2005
    Posts
    158
    You did put the content in the cplogin.php page?
    Big Wow Web Hosting
    Cheap and Reliable Shared and Reseller Hosting
    •99.9% Uptime •MailScanner •Free Setup and Sitebuilder •Plesk, cPanel or DirectAdmin
    •Fast, Secure Servers •Great Free Extras •100% White Label

  15. #40
    of course, here it is

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Logging In ...</title>
    <?php

    # domain or ip (no http://)
    $domain = 'my ip';

    if(!$_POST['login']) exit;

    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $port = $_POST['port'];

    $port == '2083' || $port == '2096' ? $pre = 'https://' : $pre = 'http://';
    $port == '2095' || $port == '2096' && !eregi('@', $user) ? $user = $user.'@'.$domain : $user = $user;

    ?>
    <meta http-equiv="Content-Language" content="en" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <body onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo $pre.$domain.':'.$port.'/login/'; ?>" method="post">
    <input type="hidden" name="user" value="<?php echo $user; ?>" />
    <input type="hidden" name="pass" value="<?php echo $pass; ?>" />
    </form>
    </body>
    </html>
    Thanks, Kevin

  16. #41
    Join Date
    Sep 2005
    Posts
    158
    Assuming you have put your domain in, etc, use this:


    Code:
    <html>
    <?php
    
    # domain or ip (no http://)
    $domain = 'my ip';
    
    if(!$_POST['login']) exit;
    
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $port = $_POST['port'];
    
    $port == '2083' || $port == '2096' ? $pre = 'https://' : $pre = 'http://';
    $port == '2095' || $port == '2096' && !eregi('@', $user) ? $user = $user.'@'.$domain : $user = $user;
    
    ?>
    
    <body onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo $pre.$domain.':'.$port.'/login/'; ?>" method="post">
    <input type="hidden" name="user" value="<?php echo $user; ?>" />
    <input type="hidden" name="pass" value="<?php echo $pass; ?>" />
    </form>
    </body>
    </html>
    Big Wow Web Hosting
    Cheap and Reliable Shared and Reseller Hosting
    •99.9% Uptime •MailScanner •Free Setup and Sitebuilder •Plesk, cPanel or DirectAdmin
    •Fast, Secure Servers •Great Free Extras •100% White Label

  17. #42
    That is the code I originally started with, it did not work either.
    Thanks, Kevin

  18. #43
    Join Date
    Sep 2005
    Posts
    158
    Not sure then- might be owrth playing about with changing the domain to an IP in the script, or changing the file permissions etc
    Big Wow Web Hosting
    Cheap and Reliable Shared and Reseller Hosting
    •99.9% Uptime •MailScanner •Free Setup and Sitebuilder •Plesk, cPanel or DirectAdmin
    •Fast, Secure Servers •Great Free Extras •100% White Label

  19. #44
    I was hoping someone would post the CPlogin script so that the customer has to enter their own domain, we are set up so each customers cpanel login is theirdoamin/cpanel but I want them be able to login from mainsite.html. Hope I am asking the right question.

    I have a script now but it tries to use the login on mainsite.html and it needs to use their login at theirsite/cpanel - hope this makes sense.

  20. #45
    Join Date
    Nov 2003
    Posts
    691
    No need for all the PHP, just set the form action to /login/ like the cPanel form does if you click "Cancel" on the login prompt.

  21. #46
    I've tried that and it errors, and is still trying to goto mainsite/cpanel when it needs to take them from mainsite to theirsite/cpanel

  22. #47
    Join Date
    Nov 2003
    Posts
    691
    Sorry I was replying to the code posted earlier. If you're trying to do it for separate domains, you would need to submit to theirdomain.com/cpanel/login

  23. #48
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,808
    I can't understand your exact requirement.

    But what I can make out is that you want your customers to visit your own home page to login to their cpanel and/or webmail.

    Is that you want?
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

  24. #49
    Urgg, I can't post any code here yet =(

    I thought I had the right code to get their domain, I know almost nothing about php. Can I email you the code?

    Vinsar: Yeah, that's what I'm lookin for

  25. #50
    Join Date
    Aug 2002
    Location
    Bharat
    Posts
    4,808
    Quote Originally Posted by design01
    Urgg, I can't post any code here yet =(

    I thought I had the right code to get their domain, I know almost nothing about php. Can I email you the code?

    Vinsar: Yeah, that's what I'm lookin for
    Here you go, I think it shoul work:

    Example Form Integrate it into your html page
    HTML Code:
    <form action="cplogin.php" method="post">
    <table cellspacing="4" cellpadding="0">
     <tr><td>Domain:</td><td><input type="text" name="domain"></td></tr>
     <tr><td>Username:</td><td><input type="text" name="user"></td></tr>
     <tr><td>Password:</td><td><input type="password" name="pass"></td></tr>
     <tr><td>Login To:</td>
     <td align="right">
     <select name="port">
     <option value="2082">cPanel</option>
     <option value="2083">Secure cPanel</option>
     <option value="2095">Webmail</option>
     <option value="2096">Secure Webmail</option>
     </select>
     </td></tr>
     <tr><td align="right" colspan="2">
     <input type="submit" name="login" value="login" style="cursor:pointer">
     </td>
    </tr>
    </table>
    </form>
    Backend PHP save it as cplogin.php
    Code:
    <html>
    <?php
    
       #your domain or ip
       $domain = $_POST['domain'];
    
       if(!$_POST['login']) {
       exit;
       }
    
       $user = $_POST['user'];
       $pass = $_POST['pass'];
       $port = $_POST['port'];
    
       $port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://www.";
       $port == "2095" || $port == "2096" && !eregi("@", $user) ? $user = "".$user."@".$domain."" : $user = $user;
    
    ?>
    <body onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
    <input type="hidden" name="user" value="<?php echo $user; ?>">
    <input type="hidden" name="pass" value="<?php echo $pass; ?>">
    </form>
    </body>
    </html>
    Vinsar.Net - Quality Web Hosting at Economical Price on USA & European Servers
    Offering domains, shared, reseller & VPS hosting.
    Reliable Domain Reseller Account Resell Domains with Confidence

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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