Trinetbiz Posted April 9, 2008 Share Posted April 9, 2008 Here's what I'm basically trying for... Currently I have login forms setup and working for all the different software but that's a lot of logins... so I'm trying to compress them all into one login form using a drop down to select the site to login to. None of them are working but here's what is happening with each choice. cPanel : stops at tbizmenu.php and hangs nothing else is happening Modernbill : just goes to the modernbill admin login SupportSuite Staff and Admin Logins : both go to the right page and just give a Invalid un/pass error. Webmail : kicks to the cpanel login attempt failed WHM : Actually Loads If anyone has any ideas I'd appreciate it. This is the file tbizmenu.php <html> <?php if(!$_POST['login']) { exit; } $user = $_POST['user']; $pass = $_POST['pass']; $site = $_POST['site']; if ($site == cpanel) $domain = "http://trinetservers.net:2082/login/"; else if ($site == mbill) $domain = "http://trinetbilling.com/app-modernbill-admin/login.php"; else if ($site == supports) $domain = "http://trinetsupport.com/staff/index.php"; else if ($site == supporta) $domain = "http://trinetsupport.com/admin/index.php"; else if ($site == webmail) $domain = "http://trinetservers.net:2095/login/"; else if ($site == whm) $domain = "http://trinetservers.net:2086/login/"; ?> <body onLoad="setTimeout('document.forms[0].submit();',10)"> <form action="<?php echo "$domain"; ?>" method="post"> <input type="hidden" name="user" value="<?php echo $user; ?>"> <input type="hidden" name="pass" value="<?php echo $pass; ?>"> <input type="hidden" name="querystring"> <input type="hidden" name="cookiepassword"> <input type="hidden" name="_ca" value="login"> </form> </body> </html> and here is the HTML Form <form action="http://<domain>/scripts/tbizmenu.php" method="post"> <table cellspacing="4" cellpadding="0"> <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="site"> <option value="cPanel">cPanel</option> <option value="mbill">Modernbill Admin</option> <option value="supports">Support Staff</option> <option value="supporta">Support Admin</option> <option value="webmail">Webmail</option> <option value="whm">WHM</option> </select> </td></tr> <tr><td align="right" colspan="2"> <input type="submit" name="login" value="login" style="cursor:pointer"> </td> </tr> </table> </form> [code] here's the other logins if anyone wants to use them or needs to see what they do. Modernbill V5 : Change the <mbilllocation> to your domain with your Modernbill. Example: http://modernbill.com or if it's in /billing directory http://modernbill.com/billing/ or if it's in the billing subdomain http://billing.modernbill.com/ To change to the client login change the /app-modernbill-admin/ to /app-modernbill-client/ [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=unicode"><form name="login" method="post" action="http://<mbilllocation>/app-modernbill-admin/login.php"> <input type="hidden" name="action" value="512"> <meta content="MSHTML 6.00.6000.16609" name="GENERATOR"></head> <body> <div class="login"> <div class="login03">IP Logging Enabled: <php> echo $_SERVER["REMOTE_ADDR"]; ?> </div> <table> <tr> <td> <div class="login01"> <a href="http://www.modernbill.com/" title="ModernBill Billing Software" target="_blank"></a> </div> </td> <td> <div class="login02"> <table width="200" border="0" cellspacing="0" cellpadding="0" class="login04"> <tr> <td align="right">Username:</td> <td><input name="adminUsername" size="13"></td> </tr> <tr> <td align="right"> Password:</td> <td><input name="adminPassword" type="password" size="13"></td> </tr> <tr> <td align="middle"> </td> <td><div class="rm_login"><input class="submit" type="submit" name="submit" value="Login"></div></td> </tr> </table> <a href="http://<domain>/app-modernbill-admin/login.php?action=858&sid=">Forgot your password?</a> </div> </td> </tr> </table> <div style="CLEAR: both"><img title="" height="1" alt="" src="/lib-themes/default/lib-modernbill/images/spacer.gif" width="1"></div> </div></form></body></html> cPanel : to use this just change your domain to fit <domain> example: http://cpanel.net: <html> <form action="http://<domain>:2082/login/" method=POST>User: <input type=text name=user><br> Pass: <input type=password name=pass><br> <input type=submit value=Login> </form> </html> WHM : Same code as the cpanel just change the port to 2086 Webmail : same as the cpanel and WHM code just change port to 2095 Supportsuite: with this one just change your domain. I would assume this would work with e-support as well but you know what happens when you assume. This is for the admin login to change it to staff where it says /admin/ in the URL change it to /staff/. <form name="login" action="http://<domain>/admin/index.php" method="post"> <table height="89" width="200" border="0"> <tr><!-- Row 1 --> <td>Username:</td><!-- Col 1 --> <td> <input name="username" id="username" class="logintext" size="13"></td><!-- Col 2 --></tr> <tr><!-- Row 2 --> <td>Password:</td><!-- Col 1 --> <td> <input type="password" name="password" id="password" class="loginpassword" size="13"></td><!-- Col 2 --></tr> <tr><!-- Row 3 --> <td colspan="2"> <p align="center"> <input type="submit" class="bluebuttonbig" value="Login"></p></td><!-- Col 1 --><!-- Col 2 --></tr></table> <input type="hidden" name="querystring"> <input type="hidden" name="cookiepassword"> Thanks for any help [/code][/code] Link to comment https://forums.phpfreaks.com/topic/100282-login-form-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.