Web Hosting Talk







View Full Version : Login Box: Cpanel, Webmail, Billing, Helpdesk


zurv
08-14-2005, 07:41 AM
Hey guys,

I have been trying to make a login box that lets you login to either Cpanel, Webmail, Billing (ModernBill or Cpanel) and Helpdesk (Cerberus or InverseFlow).

Unfortunatley I have only been able to get the Cpanel and Webmail part to work.

Check it out here:
http://zurv.com/beta

You can log into any cpanel account, even on your servers, just type in the right domain.

The script has two files:
logininclude.php
------------------------------------------------------
<?php
error_reporting(E_ALL ^ E_NOTICE);
//Here we check if any field was missed / left empty and act accordingly
if ($_POST['domain'] && $_POST['username'] && $_POST['pass'] && !($_GET['failed'] == "1"))
{
switch ($_POST['login_option'])
{
case "2082": $port = "2082";
$protocol = "http://";
break;
case "2083": $port = "2083";
$protocol = "https://";
break;
case "2095": $port = "2095";
$protocol = "http://";
break;
case "2096": $port = "2096";
$protocol = "https://";
break;
case "billing": $port = "";
$protocol = "http://";
break;
case "helpdesk": $port = "";
$protocol = "http://";
break;
}

$redirectlocation = $protocol.$_POST['domain'].":".$port."/login/?user=".$_POST['username']."&pass=".$_POST['pass']."&failurl=".$_POST['failurl'];
header ("Location: ".$redirectlocation);
}
else
{
$error = 1;
header ("Location: ".$_POST['failurl']);
}
?>
------------------------------------------------------

and then the login script
login.php
------------------------------------------------------
<?php
$postlocation = "logininclude.php";
print "<form action=\"" . $postlocation . "\" method=\"POST\">";

if (($_GET['failed'] == "1") or ($error == 1))
{
?>
<font color=#FF0000 face=verdana size=1>Your login attempt failed!</font><br>
<?php
}
?>
<select name="login_option" style="font-family: Verdana; font-size: 8pt;width:110;height:18">
<option>Choose your Control Panell</option>
<option value="2082">cPanel </option>
<option value="2083">Secure cPanel </option>
<option value="2095">Webmail</option>
<option value="2096">Secure Webmail</option>
<option value="billing">Billing Center</option>
<option value="helpdesk">Help Desk</option>
</select>
<br>
<input name="domain" class="input2" type="text" value="Domain" style="width:110;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br>
<input name="username" class="input2" type="text" value="Username" style="width:110;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br>
<input name="pass" class="input2" type="password" value="Password" style="width:110;height:18;font-family:Verdana; font-size:8pt" size="20" />
<?php
print "<input type=hidden name=failurl value=\"http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
?>
<br>
<input class="input2" type="submit" value=" Click to Login " style="width:100;height:20;font-family:Verdana; font-size:8pt" onmouseout="blur(this);" />
</form>
------------------------------------------------------


Anyone have any ideas on how to get the Helpdesk and Billing to work?
They are going to be static URLS such as zurv.com/helpdesk.php and not usersdomain.com/helpdesk.php

Btw, use the script if you want! it works great!

-Griffe

vertingthenet
08-14-2005, 09:41 AM
Isnt that from hotscripts?

Dan L
08-14-2005, 11:29 AM
I thought InverseFlow was dead.

zurv
08-14-2005, 02:56 PM
I know lots of people that use InverseFlow.

Also, it may be on hot scripts, or one similar.

it combined serveral scripts and had help on cpanel forums.

ModernAdvisors
08-14-2005, 08:48 PM
I don't use either, I use Kayako's eSupport v3. Very nice system :)

WebMax
09-12-2005, 08:19 AM
zurv, did you ever get this to work like you wanted?