#1 (permalink)  
Old 07-08-2009, 02:08 AM
Registered User
 
Join Date: Nov 2005
Posts: 18
xman888 is on a distinguished road
Cpanel / Webmail within a Frame

Hello,

Just a quick question.

Is it possible to have no header , and then have cpanel / webmail appear within a frame within an existing site, so that it keeps the same look and feel as the site?

If this is possible, were abouts in my form/code below do you tell the code to open up the page with the 'target frame'?

Thanks for any help.

Kind regards,
Anthony

<?php
$postlocation = "http://www.domain.com.au/docpanellogin.php";
print "<form action=\"" . $postlocation . "\" method=\"POST\">";

if (($_GET['failed'] == "1") or ($error == 1))
{
?>
<div align="center"><font color=#FF0000 face=verdana size=1>Your
login attempt failed!</font><br />
<?php
}
?>
<input name="domain" class="input2" type="text" value="" style="width:140;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br />
<input name="username" class="input2" type="text" value="" style="width:140;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br />
<input name="pass" class="input2" type="password" value="" style="width:140;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 />
<select name="login_option" style="font-family: Verdana; font-size: 8pt;width:100;height:18">
<option value="2082">cPanel </option>
<option value="2083">Secure cPanel </option>
</select>
<br />
<input name="submit" type="submit" class="input2" style="width:100;height:20;font-family:Verdana; font-size:8pt" onMouseOut="blur(this);" value=" Click to Login " />
</form>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-08-2009, 04:04 AM
Registered User
 
Join Date: Nov 2005
Posts: 18
xman888 is on a distinguished road
Hello,

I forgot to post the contents of docpanellogin.php - don't know if this is revelent or not.

Kind regards,
Anthony

<?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 "2086": $port = "2086";
$protocol = "http://";
break;
case "2087": $port = "2087";
$protocol = "https://";
break;
case "2095": $port = "2095";
$protocol = "http://";
break;
case "2096": $port = "2096";
$protocol = "https://";
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']);
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-08-2009, 01:35 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,033
cPanelDavidG is on a distinguished road
If you have reseller access or greater to the server, you can use the Branding Editor in cPanel to have your cPanel and Webmail interfaces match the look and feel of your website. Let me know if you need assistance with this.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-08-2009, 08:23 PM
Registered User
 
Join Date: Nov 2005
Posts: 18
xman888 is on a distinguished road
Hello David,

Thanks for the reply.

I have reseller access, and have been customising cpanel through branding.

However I was referring to what in that code above can I modify so that cpanel/webmail opens up in a frame on my site.

Kind regards,
Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-09-2009, 03:24 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,033
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by xman888 View Post
Hello,

Just a quick question.

Is it possible to have no header , and then have cpanel / webmail appear within a frame within an existing site, so that it keeps the same look and feel as the site?

If this is possible, were abouts in my form/code below do you tell the code to open up the page with the 'target frame'?

Thanks for any help.

Kind regards,
Anthony

<?php
$postlocation = "http://www.domain.com.au/docpanellogin.php";
print "<form action=\"" . $postlocation . "\" method=\"POST\">";

if (($_GET['failed'] == "1") or ($error == 1))
{
?>
<div align="center"><font color=#FF0000 face=verdana size=1>Your
login attempt failed!</font><br />
<?php
}
?>
<input name="domain" class="input2" type="text" value="" style="width:140;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br />
<input name="username" class="input2" type="text" value="" style="width:140;height:18;font-family:Verdana; font-size:8pt" size="20" />
<br />
<input name="pass" class="input2" type="password" value="" style="width:140;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 />
<select name="login_option" style="font-family: Verdana; font-size: 8pt;width:100;height:18">
<option value="2082">cPanel </option>
<option value="2083">Secure cPanel </option>
</select>
<br />
<input name="submit" type="submit" class="input2" style="width:100;height:20;font-family:Verdana; font-size:8pt" onMouseOut="blur(this);" value=" Click to Login " />
</form>
What you could do is have your login page post to a script that generates a page with frames, and with the frame that should login to cPanel being automatically logged in using something like logmein.pm mentioned at:

http://forums.cpanel.net/437949-post5.html
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permanent Frame Masterwork cPanel and WHM Discussions 3 12-24-2007 01:03 PM
time frame between edge updates dave9000 cPanel and WHM Discussions 2 03-26-2006 05:42 PM
problem with login to cpanel from a frame gilamor cPanel and WHM Discussions 0 03-27-2005 04:39 AM
Frame Foward Zeechi cPanel and WHM Discussions 5 10-09-2003 02:48 PM
slow frame in html gidechoi cPanel and WHM Discussions 0 09-06-2002 07:02 PM


All times are GMT -5. The time now is 07:44 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc