mutlisite login


/ Published in: PHP
Save to your folder(s)

This script will allow you to choose which site you want to login to (Choose from WHMCS, TCAdmin, Cpanel) You need to edit the action= in each form to the correct address of your website.


Copy this code and paste it in your HTML
  1. <?php
  2. echo '<form name="site" action="" method="post">';
  3. echo '<input name="next" type="hidden" value="tech">';
  4. echo '<select name="loc" onChange="document.site.submit()">';
  5. if($_POST['loc'] > '')
  6. {
  7. echo '<option value='.$_POST['loc'].'>'.$_POST['loc'].'</option>';
  8. }
  9. echo '<option value="Billing">Billing</option>';
  10. echo '<option value="TCAdmin">TCAdmin</option>';
  11. echo '<option value="Cpanel">Cpanel</option>';
  12. echo '</select>';
  13. echo '</form>';
  14.  
  15. $site = $_POST['loc'];
  16. if($site == '' || $site == 'Billing')// check to see if WHMCS is chosen, this is also the default option
  17. {
  18. echo '<form name="whmcs" action="http://www.spugamingsolutions.com/clients/dologin.php?goto=clientarea" method="post">';
  19. echo 'Username: <input type="text" name="username">';
  20. echo 'Password: <input type="password" name="password">';
  21. echo '<input type="submit" value="Login">';
  22. echo '</form>';
  23. }
  24. elseif($site == 'TCAdmin')// check to see if tcadmin is picked
  25. {//begin tcadmin form
  26. echo '<form name="tcadmin" action="http://94.76.255.115/Templates/Default/login.aspx" method="post">';
  27. echo 'Username: <input type="text" name="USERID">';
  28. echo 'Password: <input type="password" name="PASSWORD">';
  29. echo '<input type="submit" value="Login">';
  30. echo '</form>';
  31. }// end tcadmin form
  32. elseif($site == 'Cpanel')// check to see if cpanel is picked
  33. {//begin cpanel form
  34. echo '<form name="cpanel" action="cpanel address" method="post">';
  35. echo 'Username: <input type="text" name="username">';
  36. echo 'Password: <input type="password" name="pass">';
  37. echo '<input type="submit" value="Login">';
  38. echo '</form>';
  39. }//end cpanel form
  40.  
  41. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.