Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2005
    Location
    New Jersey
    Posts
    2

    Default Skinning Question

    I made a small script for a skin that I'm making to get the resellers domain name so that it links to the resellers site.

    This is pretty much all done with a small config file inside their /home/username/cpanelbranding/skinname/variable.php which has 3 variables that the reseller can set. (domain, link text, and the title of the link)

    My question is this, is it possible to have this script run on .html pages? Currently it is displaying the source code when the pages are .html

    PHP Code:
    <?PHP
    $owner 
    = <cpanel print="$CPDATA{'OWNER'}">;

    if(
    file_exists("/home/$owner/cpanelbranding/skinname/variable.php")) {
    include (
    "/home/$owner/cpanelbranding/skinname/variable.php");
    echo 
    "&copy; 2004-2005 <a href=\"$domain\" title=\"$alt\">$name</a>. All Rights Reserved.";
    } else {
    echo 
    "<font color=\"red\"><b>Error opening configuration file, please contact the server administrator.</b></font>";
    }
    ?>
    I am including this file by using <cpanel include="/home/username/rconf.php"> inside the stdfooter.html page. (works)

    I'm quite new to how cPanel has it's variables setup.

    Thanks alot to anyone who helps
    Justin M.

  2. #2
    Member
    Join Date
    Jun 2003
    Posts
    280

    Default

    Be warned though - cPanel and WHM run "as root" so if you include PHP code on the WHM/cPanel pages this will be run as root. If your resellers put a simple "system ('passwd'..." style command in the variable.php they can change the root password.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Location
    New Jersey
    Posts
    2

    Default

    I did not know that. Thanks, I guess I will be doing it manually then.

Similar Threads & Tags
Similar threads

  1. Branding/Skinning question
    By brianc in forum Themes and Branding
    Replies: 25
    Last Post: 01-30-2009, 10:43 AM
  2. Skinning - What a Crock!
    By HaveHost in forum Themes and Branding
    Replies: 7
    Last Post: 09-09-2007, 03:45 PM
  3. Trouble Skinning...
    By EntityARTS in forum Themes and Branding
    Replies: 0
    Last Post: 10-20-2006, 03:05 AM
  4. Skinning the WHM.
    By Axe in forum Themes and Branding
    Replies: 3
    Last Post: 05-11-2003, 09:13 AM
  5. Question regarding skinning...
    By eStudios in forum Themes and Branding
    Replies: 2
    Last Post: 05-09-2003, 10:05 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube