PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Thu Mar 27, 2008 4:09 pm Reply with quote Back to top

Would it be possible to add a theme cpanel for the next update?

Something where you can control the links from and the blocks?

I have seen it with some themes and it works quite well.
View user's profile Send private message Send e-mail
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Thu Mar 27, 2008 6:57 pm Reply with quote Back to top

vaudevillian, I am not familiar with what you are referring to. Would you please post a link to where we can take a look at what you mean? Thanks.
View user's profile Send private message Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Thu Mar 27, 2008 8:56 pm Reply with quote Back to top

I will do one better. Since it is included in some themes. Kenetix was the original maker of it. Here is the code for the admin panel you might have a better idea of what your looking at.

Code:
<?PHP

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/************************************************************************/
/*         Additional security & Abstraction layer conversion           */
/*                           2003 chatserv                              */
/*      http://www.nukefixes.com -- http://www.nukeresources.com        */
/************************************************************************/

if (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " . $prefix . "_authors WHERE aid='$aid'"));
if ($row['radminsuper'] == 1)

 {


function themecpanel() {
    include ("header.php");
    GraphicAdmin();
    OpenTable();
    echo "<center><font class=\"title\"><b>Theme CPanel</b></font></center>";

    CloseTable();
    echo "<br>";
//theme links
    OpenTable();
    $result = $db->sql_query("SELECT link1name, link1url, link2name, link2url, link3name, link3url, link4name, link4url, link5name, link5url from ".$prefix."_themecpanel");
list($link1name, $link1url, $link2name, $link2url, $link3name, $link3url, $link4name, $link4url, $link5name, $link5url) = $db->sql_fetchrow($result);

  ///begin layout///
    echo "<center><font class='option'>This section allows you to configure your theme settings such as links names and links url for your theme.</font></center>"
   ."<form action='admin.php' method='post'>"
   ."<table border='0' align=center><tr><td>"
   ."Link 1 Name:</td><td><input type='text' name='xlink1name' value='$link1name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 1 URL:</td><td><input type='text' name='xlink1url' value='$link1url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 2 Name:</td><td><input type='text' name='xlink2name' value='$link2name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 2 URL:</td><td><input type='text' name='xlink2url' value='$link2url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 3 Name:</td><td><input type='text' name='xlink3name' value='$link3name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 3 URL:</td><td><input type='text' name='xlink3url' value='$link3url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 4 Name:</td><td><input type='text' name='xlink4name' value='$link4name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 4 URL:</td><td><input type='text' name='xlink4url' value='$link4url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 5 Name:</td><td><input type='text' name='xlink5name' value='$link5name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 5 URL:</td><td><input type='text' name='xlink5url' value='$link5url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>";

// save
    echo "</td></tr></table><br><br>";
    echo "<input type='hidden' name='op' value='themecpanelsave'>" //themecpanel save case
   ."<center><input type='submit' value='Save Links'></center>"
   ."</form>";
    CloseTable();

//close2

//links end


//security start
    echo "<br>";
    OpenTable();
    $result = $db->sql_query("SELECT rightclick, rightclick1, disableall, disableall1, sourcecode, clickms from ".$prefix."_themecpanel");
list($rightclick, $rightclick1, $disableall, $disableall1, $sourcecode, $clickms) = $db->sql_fetchrow($result);
    echo "<center><font class=\"option\"><b>Theme security - allows you to set some simple security control to your theme to limit ripper access.</b></font></center><br><br>";
    echo"<form action='admin.php' method='post'>"
       ."<table border=0 width=100% align=center cellpadding=1 align=\"center\"><tr><td>";
    echo "Disable Rightclick (User/Guest):</td><td>";
    if ($rightclick==1) {
       echo "<input type='radio' name='xrightclick' value='1' checked>Yes &nbsp;
        <input type='radio' name='xrightclick' value='0'>No";
    } else {
        echo "<input type='radio' name='xrightclick' value='1'>Yes &nbsp;
        <input type='radio' name='xrightclick' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";



    echo "Disable Rightclick for Admins:</td><td>";
    if ($rightclick1==1) {
       echo "<input type='radio' name='xrightclick1' value='1' checked>Yes &nbsp;
        <input type='radio' name='xrightclick1' value='0'>No";
    } else {
        echo "<input type='radio' name='xrightclick1' value='1'>Yes &nbsp;
        <input type='radio' name='xrightclick1' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Disable Rightclick Messgae:</td><td>";
    echo "<input type='text' name='xclickms' value='$clickms' size='40' maxLength='255'>";
    echo "</td></tr><tr><td>";


     echo "Disable Select All:</td><td>";
    if ($disableall==1) {
       echo "<input type='radio' name='xdisableall' value='1' checked>Yes &nbsp;
        <input type='radio' name='xdisableall' value='0'>No";
    } else {
        echo "<input type='radio' name='xdisableall' value='1'>Yes &nbsp;
        <input type='radio' name='xdisableall' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Disable Select All for Admins:</td><td>";
    if ($disableall1==1) {
       echo "<input type='radio' name='xdisableall1' value='1' checked>Yes &nbsp;
        <input type='radio' name='xdisableall1' value='0'>No";
    } else {
        echo "<input type='radio' name='xdisableall1' value='1'>Yes &nbsp;
        <input type='radio' name='xdisableall1' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Encrypt Source Code:</td><td>";
    if ($sourcecode==1) {
       echo "<input type='radio' name='xsourcecode' value='1' checked>Yes &nbsp;
        <input type='radio' name='xsourcecode' value='0'>No";
    } else {
        echo "<input type='radio' name='xsourcecode' value='1'>Yes &nbsp;
        <input type='radio' name='xsourcecode' value='0' checked>No";
    }
    echo "</td></tr></table><br><br>";

    echo "<center><input type='hidden' name='op' value='savesecurity'>";
    echo "<input type='submit' value='Save'></center></form><br><br>";
    CloseTable();
    include("footer.php");

} //close 2

//security end
//save links
function themecpanelsave($xlink1name, $xlink1url, $xlink2name, $xlink2url, $xlink3name, $xlink3url, $xlink4name, $xlink4url, $xlink5name, $xlink5url) {
     global $prefix, $dbi, $module_name;

    $xlink1name = htmlentities($xlink1name, ENT_QUOTES);
    $xlink1url = htmlentities($xlink1url, ENT_QUOTES);
    $xlink2name = htmlentities($xlink2name, ENT_QUOTES);
    $xlink2url = htmlentities($xlink2url, ENT_QUOTES);
    $xlink3name = htmlentities($xlink3name, ENT_QUOTES);
    $xlink3url = htmlentities($xlink3url, ENT_QUOTES);
    $xlink4name = htmlentities($xlink4name, ENT_QUOTES);
    $xlink4url = htmlentities($xlink4url, ENT_QUOTES);
    $xlink5name = htmlentities($xlink5name, ENT_QUOTES);
    $xlink5url = htmlentities($xlink5url, ENT_QUOTES);

     sql_query("UPDATE ".$prefix."_themecpanel SET link1name='$xlink1name',
 link1url='$xlink1url',
 link2name='$xlink2name',
 link2url='$xlink2url',
 link3name='$xlink3name',
 link3url='$xlink3url',
 link4name='$xlink4name',
 link4url='$xlink4url',
 link5name='$xlink5name',
 link5url='$xlink5url'", $dbi);
Header("Location: admin.php?op=themecpanel");
}/**/
//save links end

//save security
function savesecurity($xrightclick, $xrightclick1, $xdisableall, $xdisableall1, $xsourcecode, $xclickms) {
     global $prefix, $dbi, $module_name;
     sql_query("UPDATE ".$prefix."_themecpanel SET rightclick='$xrightclick', rightclick1='$xrightclick1', disableall='$xdisableall', disableall1='$xdisableall1', sourcecode='$xsourcecode', clickms='$xclickms'", $dbi);
Header("Location: admin.php?op=themecpanel");

}/**/

//save security end




switch ($op) {
    case "themecpanel":
    themecpanel();
    break;
    case "themecpanelsave":
    themecpanelsave ($xlink1name, $xlink1url, $xlink2name, $xlink2url, $xlink3name, $xlink3url, $xlink4name, $xlink4url, $xlink5name, $xlink5url);
    break;
    case "savesecurity":
    savesecurity($xrightclick, $xrightclick1, $xdisableall, $xdisableall1, $xsourcecode, $xclickms);
    break;
}


}
else {
    echo "Access Denied";
}
?>
View user's profile Send private message Send e-mail
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Fri Mar 28, 2008 7:25 am Reply with quote Back to top

No sir, I do not have time to sift through code to figure out just what themecpanel is. Sorry.

Do you have a link to where we can see what this is and where we can get the download please?

Thanks.
View user's profile Send private message Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Fri Mar 28, 2008 8:19 am Reply with quote Back to top

No, link sorry I pulled it out of a theme.

What the theme cpanel is:

Its an admin menu plugin. It supposed to control the left right blocks inside that theme, it also controls if you would like to change the theme links to other links. Also has some other features like disabling right click and print screen. I dont think I like those features since they have broken my old sites.
View user's profile Send private message Send e-mail
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Fri Mar 28, 2008 8:24 am Reply with quote Back to top

Ok, no problem. Doubtful, though, that we would include something that doesn't have a download for it... Sorry.

However, as we evolve the "core", the subject of better control of blocks and their positioning has come up.
View user's profile Send private message Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Fri Mar 28, 2008 9:26 am Reply with quote Back to top

In fisubice how are the links labled in the $navMenu or where can I find the lables for them?

I would be more then happy to try and alter it and test it, to get it working with fisubice(possibly the other themes in rn as well). Set up a nice little download as well.
View user's profile Send private message Send e-mail
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Fri Mar 28, 2008 2:32 pm Reply with quote Back to top

This looks like nothing more than a script to store a link menu in a database table so you can control the header menu.
I wouldn't even bother, it would be quicker to just edit the menu directly in either yourtheme/theme.php or yourtheme/header.html
View user's profile Send private message Send e-mail Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Fri Mar 28, 2008 2:44 pm Reply with quote Back to top

Guardian2003 wrote:
This looks like nothing more than a script to store a link menu in a database table so you can control the header menu.
I wouldn't even bother, it would be quicker to just edit the menu directly in either yourtheme/theme.php or yourtheme/header.html


Would not be that easy for what I need it for. I was gonna be making subdomains. But with no cpanel or ftp access. So it would be proudent to allow for such edits through the admin control panel. Thats why i was wondering what the navmenu was labled, or if its labeled at all.

If you can tell me what file the navmenu is located in so I can take a look at it. Would it be in the header.php file directly or theme.php or somewhere else entirely. I just need to know where the $navMenu labeling is.
View user's profile Send private message Send e-mail
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Fri Mar 28, 2008 2:54 pm Reply with quote Back to top

As I said; yourtheme/theme.php and yourtheme/header.html

In fisubice the menu is called in header.html approximately line 14

It is defined as $navMenu in theme.php approximately line 167
View user's profile Send private message Send e-mail Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Sat Mar 29, 2008 12:29 am Reply with quote Back to top

nice, thanks Guardian. I will over the next week try and alter the theme.php to include the control panel atleast to the links to alter them. Then I will begin working all the custom block places. If everything goes good I will have a link ready for download. If all works you can include it ravennuke if you want.
View user's profile Send private message Send e-mail
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Sat Mar 29, 2008 2:43 am Reply with quote Back to top

I'm sure someone will find it useful, thanks!
View user's profile Send private message Send e-mail Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Mon Mar 31, 2008 6:18 pm Reply with quote Back to top

Alright. Been looking at the blocks setting the links should work and will test them tomorrow on my site.

But these blocks, I was looking at something. Are these calls used anywhere inside phpnuke?

Code:

$leftblockstemp
$rightblockstemp
$forumleftblocks


I have been poking around my paid for theme, themeCpanel.

I was also thinking about adding a sub footer just as a include file. So it will display a sort of sitemap.

Here is the themepanel code for the xtrato theme that I might incorperate into fisubice.

Code:
<?PHP

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Theme Cpanel (c) by Xtrato,
Only registered users can see links on this board!
Get registered or login to the forums!
                         */
/* Encryption Source Created by Maku, phpnuke.ee
/* Based on original Theme CP by Kenetix, kenetix.net
/*
/* No removing of this copyright notice is allowed.
/************************************************************************/

if (!eregi("admin.php", $_SERVER['SCRIPT_NAME'])) { die ("Access Denied"); }
global $prefix, $db;
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT radminsuper FROM " . $prefix . "_authors WHERE aid='$aid'"));
if ($row['radminsuper'] == 1)

 {


function themecpanel() {
    include ("header.php");
    GraphicAdmin();
    OpenTable();
    echo "<center><font class=\"title\"><b>Theme CPanel</b></font></center>";
    CloseTable();
    echo "<br>";

    OpenTable();
    echo "<font class=\"title\">This theme cpanel allows you to have some administrative control over your theme. Most of the functions are self explanatory. <br><br>
- Left/Right blocks templates: This allows you to choose which block templates you want to use for your blocks. If set to default, blocks.htm will be used. Otherwise it will use the blocks-right.htm or blocks-left.htm template files.<br><br>
- Popup New Private Message: Notifies the user he/she has new private messages the moment the page loads on the site. This only works for all theme pages except the Members List, Forums, and Private Messages. If you wish to disable that you have to go to your forum profile and disable the popup.<br><br>
- Broadcast Message: A global message that appears  Under The header for all pages of the siteite. Similar to broadcast message but it is permanent until deleted.<br><br>
- Forum Left Blocks: Choose weather to display left blocks on all forum pages or hide them for better viewing purposes.<br><br>

Please note that using the <b>&</b> symbol in the links will result to the links URL not working. Use the <b>%26</b> symbol instead.

</font>";
    CloseTable();
    echo "<br>";
//theme links
    OpenTable();
    $result = $db->sql_query("SELECT link1name, link1url, link2name, link2url, link3name, link3url, link4name, link4url, link5name, link5url, themeflash, themesearch, pmpop, leftblockstemp, rightblockstemp, sitelogin, sitemsg, broadcastmsg, clock, forumleftblocks from ".$prefix."_themecpanel");
   list($link1name, $link1url, $link2name, $link2url, $link3name, $link3url, $link4name, $link4url, $link5name, $link5url, $themeflash, $themesearch, $pmpop, $leftblockstemp, $rightblockstemp, $sitelogin, $sitemsg, $broadcastmsg, $clock, $forumleftblocks) = $db->sql_fetchrow($result);

  ///begin layout///
    echo "<center><font class='option'>This section allows you to configure your theme settings such as links names and links url for your theme.</font></center>"
   ."<form action='admin.php' method='post'>"
   ."<table border='0' align=center><tr><td>"
   ."Link 1 Name:</td><td><input type='text' name='xlink1name' value='$link1name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 1 URL:</td><td><input type='text' name='xlink1url' value='$link1url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 2 Name:</td><td><input type='text' name='xlink2name' value='$link2name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 2 URL:</td><td><input type='text' name='xlink2url' value='$link2url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 3 Name:</td><td><input type='text' name='xlink3name' value='$link3name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 3 URL:</td><td><input type='text' name='xlink3url' value='$link3url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 4 Name:</td><td><input type='text' name='xlink4name' value='$link4name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 4 URL:</td><td><input type='text' name='xlink4url' value='$link4url' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 5 Name:</td><td><input type='text' name='xlink5name' value='$link5name' size='60' maxlength='500'>"
   ."</td></tr><tr><td>"
   ."Link 5 URL:</td><td><input type='text' name='xlink5url' value='$link5url' size='60' maxlength='500'>"
   ."<br><br></td></tr><tr><td>"
   ."Flash in Theme:</td><td>";
    if ($themeflash==1) {
       echo "<input type='radio' name='xthemeflash' value='1' checked>Yes &nbsp;
        <input type='radio' name='xthemeflash' value='0'>No";
    } else {
        echo "<input type='radio' name='xthemeflash' value='1'>Yes &nbsp;
        <input type='radio' name='xthemeflash' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Display Search:</td><td>";
    if ($themesearch==1) {
       echo "<input type='radio' name='xthemesearch' value='1' checked>Yes &nbsp;
        <input type='radio' name='xthemesearch' value='0'>No";
    } else {
        echo "<input type='radio' name='xthemesearch' value='1'>Yes &nbsp;
        <input type='radio' name='xthemesearch' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."New Private Message Popup:</td><td>";
    if ($pmpop==1) {
       echo "<input type='radio' name='xpmpop' value='1' checked>Yes &nbsp;
        <input type='radio' name='xpmpop' value='0'>No";
    } else {
        echo "<input type='radio' name='xpmpop' value='1'>Yes &nbsp;
        <input type='radio' name='xpmpop' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"

   ."Left Block Template:</td><td>";
    if ($leftblockstemp==2) {
       echo "<input type='radio' name='xleftblockstemp' value='2' checked>Left Blocks Template (blocks-left.htm)<br>
        <input type='radio' name='xleftblockstemp' value='1'>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xleftblockstemp' value='0'>Default Template (blocks.htm)";
    }
    if ($leftblockstemp==1) {
       echo "<input type='radio' name='xleftblockstemp' value='2' >Left Blocks Template (blocks-left.htm)<br>
        <input type='radio' name='xleftblockstemp' value='1' checked>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xleftblockstemp' value='0'>Default Template (blocks.htm)";
    }
    if ($leftblockstemp==0) {
        echo "<input type='radio' name='xleftblockstemp' value='2'>Left Blocks Template (blocks-left.html)<br>
        <input type='radio' name='xleftblockstemp' value='1'>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xleftblockstemp' value='0' checked>Default Template (blocks.htm)";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Right Block Template:</td><td>";
    if ($rightblockstemp==2) {
       echo "<input type='radio' name='xrightblockstemp' value='2' checked>Left Blocks Template (blocks-right.htm)<br>
        <input type='radio' name='xrightblockstemp' value='1'>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xrightblockstemp' value='0'>Default Template (blocks.htm)";
    }
    if ($rightblockstemp==1) {
       echo "<input type='radio' name='xrightblockstemp' value='2' >Left Blocks Template (blocks-right.htm)<br>
        <input type='radio' name='xrightblockstemp' value='1' checked>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xrightblockstemp' value='0'>Default Template (blocks.htm)";
    }
    if ($rightblockstemp==0) {
        echo "<input type='radio' name='xrightblockstemp' value='2'>Left Blocks Template (blocks-right.html)<br>
        <input type='radio' name='xrightblockstemp' value='1'>Right Blocks Template (blocks-right.htm) <br>
        <input type='radio' name='xrightblockstemp' value='0' checked>Default Template (blocks.htm)";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Hide Forum Left Blocks:</td><td>";
    if ($forumleftblocks==1) {
       echo "<input type='radio' name='xforumleftblocks' value='1' checked>Yes &nbsp;
        <input type='radio' name='xforumleftblocks' value='0'>No";
    } else {
        echo "<input type='radio' name='xforumleftblocks' value='1'>Yes &nbsp;
        <input type='radio' name='xforumleftblocks' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Show Login Form:</td><td>";
    if ($sitelogin==1) {
       echo "<input type='radio' name='xsitelogin' value='1' checked>Yes &nbsp;
        <input type='radio' name='xsitelogin' value='0'>No";
    } else {
        echo "<input type='radio' name='xsitelogin' value='1'>Yes &nbsp;
        <input type='radio' name='xsitelogin' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Show Clock:</td><td>";
    if ($clock==1) {
       echo "<input type='radio' name='xclock' value='1' checked>Yes &nbsp;
        <input type='radio' name='xclock' value='0'>No";
    } else {
        echo "<input type='radio' name='xclock' value='1'>Yes &nbsp;
        <input type='radio' name='xclock' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Broadcast Message:</td><td>";
    if ($broadcastmsg==1) {
       echo "<input type='radio' name='xbroadcastmsg' value='1' checked>Yes &nbsp;
        <input type='radio' name='xbroadcastmsg' value='0'>No";
    } else {
        echo "<input type='radio' name='xbroadcastmsg' value='1'>Yes &nbsp;
        <input type='radio' name='xbroadcastmsg' value='0' checked>No";
    }
   echo "<br><br></td></tr><tr><td>"
   ."Message:<br> (If above checked YES)</td><td><textarea  name='xsitemsg' cols='40' rows='5' class='input'>$sitemsg</textarea>"
   ."</td></tr><tr><td>";

// save
    echo "</td></tr></table><br><br>";
    echo "<input type='hidden' name='op' value='themecpanelsave'>" //themecpanel save case
   ."<center><input type='submit' value='Save Settings'></center>"
   ."</form>";
    CloseTable();
//close2
//links end


//security start
    echo "<br>";
    OpenTable();
    $result = $db->sql_query("SELECT rightclick, rightclick1, disableall, disableall1, sourcecode, clickms from ".$prefix."_themecpanel");
   list($rightclick, $rightclick1, $disableall, $disableall1, $sourcecode, $clickms) = $db->sql_fetchrow($result);
    echo "<center><font class=\"option\"><b>Theme security - allows you to set some simple security control to your theme to limit ripper access.</b></font></center><br><br>";
    echo"<form action='admin.php' method='post'>"
       ."<table border=0 width=100% align=center cellpadding=1 align=\"center\"><tr><td>";
    echo "Disable Rightclick (User/Guest):</td><td>";
    if ($rightclick==1) {
       echo "<input type='radio' name='xrightclick' value='1' checked>Yes &nbsp;
        <input type='radio' name='xrightclick' value='0'>No";
    } else {
        echo "<input type='radio' name='xrightclick' value='1'>Yes &nbsp;
        <input type='radio' name='xrightclick' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";



    echo "Disable Rightclick for Admins:</td><td>";
    if ($rightclick1==1) {
       echo "<input type='radio' name='xrightclick1' value='1' checked>Yes &nbsp;
        <input type='radio' name='xrightclick1' value='0'>No";
    } else {
        echo "<input type='radio' name='xrightclick1' value='1'>Yes &nbsp;
        <input type='radio' name='xrightclick1' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Disable Rightclick Message:</td><td>";
    echo "<input type='text' name='xclickms' value='$clickms' size='40' maxLength='255'>";
    echo "</td></tr><tr><td>";


     echo "Disable Mouse Drag:</td><td>";
    if ($disableall==1) {
       echo "<input type='radio' name='xdisableall' value='1' checked>Yes &nbsp;
        <input type='radio' name='xdisableall' value='0'>No";
    } else {
        echo "<input type='radio' name='xdisableall' value='1'>Yes &nbsp;
        <input type='radio' name='xdisableall' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Disable Mouse Drag for Admins:</td><td>";
    if ($disableall1==1) {
       echo "<input type='radio' name='xdisableall1' value='1' checked>Yes &nbsp;
        <input type='radio' name='xdisableall1' value='0'>No";
    } else {
        echo "<input type='radio' name='xdisableall1' value='1'>Yes &nbsp;
        <input type='radio' name='xdisableall1' value='0' checked>No";
    }
    echo "</td></tr><tr><td>";

    echo "Encrypt Source Code:</td><td>";
    if ($sourcecode==1) {
       echo "<input type='radio' name='xsourcecode' value='1' checked>Yes &nbsp;
        <input type='radio' name='xsourcecode' value='0'>No";
    } else {
        echo "<input type='radio' name='xsourcecode' value='1'>Yes &nbsp;
        <input type='radio' name='xsourcecode' value='0' checked>No";
    }
    echo "</td></tr></table><br><br>";

    echo "<center><input type='hidden' name='op' value='savesecurity'>";
    echo "<input type='submit' value='Save Settings'></center></form><br><br>";
    CloseTable();
//DO NOT REMOVE THE FOLLOWING LINES.
    OpenTable();
    echo "<center><font class=\"title\"><b>Theme CPanel</b><br> Script based on Kenetix CPanel Theme CP <br>Current Theme CPanel script created by Xtrato - http://xtrato.com.<br> Security script add-on and installer for theme cpanel created by Maku - http://PHP-Nuke.ee</font></center>";
    CloseTable();
    echo "<br>";

    include("footer.php");

} //close 2

//security end
//save links
function themecpanelsave($xlink1name, $xlink1url, $xlink2name, $xlink2url, $xlink3name, $xlink3url, $xlink4name, $xlink4url, $xlink5name, $xlink5url, $xthemeflash, $xthemesearch, $xpmpop, $xleftblockstemp, $xrightblockstemp, $xsitelogin, $xsitemsg, $xbroadcastmsg, $xclock, $xforumleftblocks) {
     global $prefix, $dbi, $module_name;

    $xlink1name = htmlentities($xlink1name, ENT_QUOTES);
    $xlink1url = htmlentities($xlink1url, ENT_QUOTES);
    $xlink2name = htmlentities($xlink2name, ENT_QUOTES);
    $xlink2url = htmlentities($xlink2url, ENT_QUOTES);
    $xlink3name = htmlentities($xlink3name, ENT_QUOTES);
    $xlink3url = htmlentities($xlink3url, ENT_QUOTES);
    $xlink4name = htmlentities($xlink4name, ENT_QUOTES);
    $xlink4url = htmlentities($xlink4url, ENT_QUOTES);
    $xlink5name = htmlentities($xlink5name, ENT_QUOTES);
    $xlink5url = htmlentities($xlink5url, ENT_QUOTES);
    $xsitemsg = htmlentities($xsitemsg, ENT_QUOTES);

     sql_query("UPDATE ".$prefix."_themecpanel SET link1name='$xlink1name', link1url='$xlink1url', link2name='$xlink2name', link2url='$xlink2url', link3name='$xlink3name', link3url='$xlink3url', link4name='$xlink4name', link4url='$xlink4url', link5name='$xlink5name', link5url='$xlink5url', themeflash='$xthemeflash', themesearch='$xthemesearch', pmpop='$xpmpop', leftblockstemp='$xleftblockstemp', rightblockstemp='$xrightblockstemp', sitelogin='$xsitelogin', sitemsg='$xsitemsg', broadcastmsg='$xbroadcastmsg', clock='$xclock', forumleftblocks='$xforumleftblocks'", $dbi);
    Header("Location: admin.php?op=themecpanel");
}
//save links end

//save security
function savesecurity($xrightclick, $xrightclick1, $xdisableall, $xdisableall1, $xsourcecode, $xclickms) {
     global $prefix, $dbi, $module_name;
     sql_query("UPDATE ".$prefix."_themecpanel SET rightclick='$xrightclick', rightclick1='$xrightclick1', disableall='$xdisableall', disableall1='$xdisableall1', sourcecode='$xsourcecode', clickms='$xclickms'", $dbi);
   Header("Location: admin.php?op=themecpanel");

}/**/

//save security end




switch ($op) {
    case "themecpanel":
    themecpanel();
    break;
    case "themecpanelsave":
    themecpanelsave ($xlink1name, $xlink1url, $xlink2name, $xlink2url, $xlink3name, $xlink3url, $xlink4name, $xlink4url, $xlink5name, $xlink5url, $xthemeflash, $xthemesearch, $xpmpop, $xleftblockstemp, $xrightblockstemp, $xsitelogin, $xsitemsg, $xbroadcastmsg, $xclock, $xforumleftblocks);
    break;
    case "savesecurity":
    savesecurity($xrightclick, $xrightclick1, $xdisableall, $xdisableall1, $xsourcecode, $xclickms);
    break;
}


}
else {
    echo "Access Denied";
}
?>


I will end up taking out the security check as I have had problems with it.
View user's profile Send private message Send e-mail
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Mar 31, 2008 9:41 pm Reply with quote Back to top

Looks like it was coded around base php-nuke, no sentinel, and doesnt even seem to be patched, properly.

I honestly wouldnt even bother with it.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Mon Mar 31, 2008 11:29 pm Reply with quote Back to top

I would still do the links, just wanted to see if those other db entrys were for anything.
View user's profile Send private message Send e-mail
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Tue Apr 01, 2008 7:14 am Reply with quote Back to top

Alright I have it semi working. The names of the links are showing up but the url is not working. Here is what I did.

Code:
    $sql = "SELECT link1name, link2name, link3name, link4name, link5name, link1url, link2url, link3url, link4url, link5url FROM ".$prefix."_themecpanel";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
   $link1name = $row[link1name];
    $link2name = $row[link2name];
    $link3name = $row[link3name];
    $link4name = $row[link4name];
    $link5name = $row[link5name];
    $link1url = $row[link1url];
    $link2url = $row[link2url];
    $link3url = $row[link3url];
    $link4url = $row[link4url];
    $link5url = $row[link5url];
   $navMenu = '&nbsp;•&nbsp;<a href="$link1url">'.$link1name.'</a>&nbsp;•&nbsp;<a href="$link2url">'.$link2name.'</a>&nbsp;•&nbsp;<a href="$link3url">'.$link3name.'</a>&nbsp;•&nbsp;<a href="$link4url">'.$link4name.'</a>&nbsp;•&nbsp;<a href="$link5url">'.$link5name.'</a>&nbsp;•&nbsp;'.$logoutMenu.$adminMenu;


But the urls are not working. They are coming up as
Only registered users can see links on this board!
Get registered or login to the forums!


Can anyone tell me what I did wrong or point me in the right direction?

You can check it out if you want
Only registered users can see links on this board!
Get registered or login to the forums!


I checked the db entry and everything is fine from that end.
View user's profile Send private message Send e-mail
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Tue Apr 01, 2008 7:58 am Reply with quote Back to top

The problem seems to be that you have not escaped the double quotes. This;
[code]<a href="$link1url"[code] means to take $link1url literally rather than the 'value' of $link1url
You can escape those double quotes like this; [code]
$navMenu = '&nbsp;&nbsp;<a href=\"$link1url\">'.$link1name.'</a>[/code]
View user's profile Send private message Send e-mail Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Tue Apr 01, 2008 8:21 am Reply with quote Back to top

ok I changed the link part from
Code:

 <a href="$link1url">'.$link1name.'</a>

to
Code:

<a href=\"$link1url\">'.$link1name.'</a>

But still no go. Its pointing to
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Tue Apr 01, 2008 9:16 am Reply with quote Back to top

YEAH!!!!! I GOT IT!!!!!!!!!!

Supposed to be
Code:

<a href="'.$link1url.'">'.$link1name.'</a>
View user's profile Send private message Send e-mail
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Tue Apr 01, 2008 9:23 am Reply with quote Back to top

IYou need to determine if that encoding is in the database by echoing out the variable;
Code:
echo $linkurl1;

You may find that the data in the table has saved a double quotes.
I notice in your first post that there are weird characters before the nbsp which would indicate you might be using a different character set in your editor.
View user's profile Send private message Send e-mail Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6300
Location: Vsetin, Czech Republic

PostPosted: Tue Apr 01, 2008 9:33 am Reply with quote Back to top

Smile You can do that too
View user's profile Send private message Send e-mail Visit poster's website
vaudevillian
Worker
Worker


Joined: Jan 18, 2008
Posts: 139

PostPosted: Tue Apr 01, 2008 10:03 am Reply with quote Back to top

The weird characters are the dots inbetween the lables of the links.

Now the hard part. I edited out the security part of the cpanel. But not from the install part of the file, I tried it but for some reason it wont install. I do not know enough about how the db gets installed to make the proper edits. Since the security seems to mess up with some installations, I think it needs to be removed.
So here is the base file:

Code:

<?php

require_once("mainfile.php");
global $admin;
if(!is_array($admin)) {
    $adm = base64_decode($admin);
    $adm = explode(":", $adm);
    $aname = "$adm[0]";
} else {
    $aname = "$admin[0]";
}
$index=1;
$adm_info = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$aname'"));
if ($adm_info['radminsuper']==1) {

//installer title
$pagename = "Theme Cpanel";

switch($op) {

    default:
        $pagetitle = $pagename;
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
        echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
        echo "<tr><td align='center'>This script will Install SQL tables or Destall SQL tables for $pagename.</td></tr>\n";
        echo "<tr><td align='center'><b>Backup data tables before proceeding!</b></td></tr>\n";
        echo "<tr><td align='center'><b>Proceed at your own risk. Kenetix will not be responsible for anything that happens to your nuke site!</b></td></tr>\n";
        echo "<tr><td align='center'><select name='op'>\n";
        echo "<option value='install'>Install $pagename SQL</option>\n";
        echo "<option value='destall'>Destall $pagename SQL</option>\n";
        echo "</select> <input type='submit' value='COMMIT'></td></tr>\n";
        echo "</form>";
        echo "</table>\n";
        CloseTable();
        include("footer.php");
    break;


    case "install":
//title of page for installer
        $pagetitle = "$pagename: Install Theme CPanel";
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "Operation Results:<br>\n";
        echo "<hr>\n";
        $result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
        $result = $db->sql_query("CREATE TABLE ".$prefix."_themecpanel (
        link1name text NOT NULL,
        link1url text NOT NULL,
        link2name text NOT NULL,
        link2url text NOT NULL,
        link3name text NOT NULL,
        link3url text NOT NULL,
        link4name text NOT NULL,
        link4url text NOT NULL,
        link5name text NOT NULL,
        link5url text NOT NULL,
        rightclick tinyint(1) NOT NULL default '0',
        rightclick1 tinyint(1) NOT NULL default '0',
        disableall tinyint(1) NOT NULL default '0',
        disableall1 tinyint(1) NOT NULL default '0',
        sourcecode tinyint(1) NOT NULL default '0',
        clickms varchar(255) DEFAULT 'Your text here!' NOT NULL
        ) TYPE=MyISAM");

        if (!$result) { echo "- Create ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Create ".$prefix."_themecpanel succeeded<br>\n"; }
 //insert values - also if fail, display msg
       $db->sql_query("INSERT INTO ".$prefix."_themecpanel VALUES ('HOME', 'index.php', 'DOWNLOADS', 'downloads.html', 'LINKS', 'links.html', 'CONTENT', 'modules.php?name=Content', 'ACCOUNT', 'modules.php?name=Your_Account', 0, 0, 0, 0, 0,'Your text here!')");

//display results
        if (!$result) { echo "- Insert into ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Insert into ".$prefix."_themecpanel succeeded<br>\n"; }

        echo "<hr>\n";
        echo "<b>Theme CPanel is successfully aaded in database.<br>Please <font color=#ff0000>delete</font> this file from your server <b>immediatly</b> for security reasons!<br><br><br><center>Click on the icon below to config Theme Cpanel.<br><br><a href=\"admin.php?op=themecpanel\"><img src=\"images/admin/themecpanel.gif\" border=0></a></center>";
        CloseTable();
        include("footer.php");

//calls footer
    break;


//destaller - change required fields
    case "destall":
        $pagetitle = "$pagename: Destall";
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "Operation Results:<br>\n";
        echo "<hr>\n";
        $result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
        if (!$result) { echo "- Destall ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Destall ".$prefix."_themecpanel succeeded<br>\n"; }
        echo "<hr>\n";
        echo "Operation Complete<br>\n";
        echo _GOBACK."\n";
        CloseTable();
        include("footer.php");
    break;


}

} else {
    $pagetitle = "$pagename: ERROR";
    include("header.php");
    title("$pagetitle");
    OpenTable();
    echo "<center><b>Sorry, ONLY super admins may run this script. If you have no clue what a super user is, just run along and play ball.</b><center>\n";
    CloseTable();
    include("footer.php");
}





?>

Thats the install working

Now when I tried to remove the security values
Code:

<?php

require_once("mainfile.php");
global $admin;
if(!is_array($admin)) {
    $adm = base64_decode($admin);
    $adm = explode(":", $adm);
    $aname = "$adm[0]";
} else {
    $aname = "$admin[0]";
}
$index=1;
$adm_info = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_authors WHERE aid='$aname'"));
if ($adm_info['radminsuper']==1) {

//installer title
$pagename = "Theme Cpanel";

switch($op) {

    default:
        $pagetitle = $pagename;
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "<table align='center' border='0' cellpadding='2' cellspacing='2'>\n";
        echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>\n";
        echo "<tr><td align='center'>This script will Install SQL tables or Destall SQL tables for $pagename.</td></tr>\n";
        echo "<tr><td align='center'><b>Backup data tables before proceeding!</b></td></tr>\n";
        echo "<tr><td align='center'><b>Proceed at your own risk. Kenetix will not be responsible for anything that happens to your nuke site!</b></td></tr>\n";
        echo "<tr><td align='center'><select name='op'>\n";
        echo "<option value='install'>Install $pagename SQL</option>\n";
        echo "<option value='destall'>Destall $pagename SQL</option>\n";
        echo "</select> <input type='submit' value='COMMIT'></td></tr>\n";
        echo "</form>";
        echo "</table>\n";
        CloseTable();
        include("footer.php");
    break;


    case "install":
//title of page for installer
        $pagetitle = "$pagename: Install Theme CPanel";
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "Operation Results:<br>\n";
        echo "<hr>\n";
        $result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
        $result = $db->sql_query("CREATE TABLE ".$prefix."_themecpanel (
        link1name text NOT NULL,
        link1url text NOT NULL,
        link2name text NOT NULL,
        link2url text NOT NULL,
        link3name text NOT NULL,
        link3url text NOT NULL,
        link4name text NOT NULL,
        link4url text NOT NULL,
        link5name text NOT NULL,
        link5url text NOT NULL,

        ) TYPE=MyISAM");

        if (!$result) { echo "- Create ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Create ".$prefix."_themecpanel succeeded<br>\n"; }
 //insert values - also if fail, display msg
       $db->sql_query("INSERT INTO ".$prefix."_themecpanel VALUES ('HOME', 'index.php', 'DOWNLOADS', 'downloads.html', 'LINKS', 'links.html', 'CONTENT', 'modules.php?name=Content', 'ACCOUNT', 'modules.php?name=Your_Account')");

//display results
        if (!$result) { echo "- Insert into ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Insert into ".$prefix."_themecpanel succeeded<br>\n"; }

        echo "<hr>\n";
        echo "<b>Theme CPanel is successfully aaded in database.<br>Please <font color=#ff0000>delete</font> this file from your server <b>immediatly</b> for security reasons!<br><br><br><center>Click on the icon below to config Theme Cpanel.<br><br><a href=\"admin.php?op=themecpanel\"><img src=\"images/admin/themecpanel.gif\" border=0></a></center>";
        CloseTable();
        include("footer.php");

//calls footer
    break;


//destaller - change required fields
    case "destall":
        $pagetitle = "$pagename: Destall";
        include("header.php");
        title("$pagetitle");
        OpenTable();
        echo "Operation Results:<br>\n";
        echo "<hr>\n";
        $result = $db->sql_query("DROP TABLE IF EXISTS ".$prefix."_themecpanel");
        if (!$result) { echo "- Destall ".$prefix."_themecpanel failed<br>\n"; } else { echo "- Destall ".$prefix."_themecpanel succeeded<br>\n"; }
        echo "<hr>\n";
        echo "Operation Complete<br>\n";
        echo _GOBACK."\n";
        CloseTable();
        include("footer.php");
    break;


}

} else {
    $pagetitle = "$pagename: ERROR";
    include("header.php");
    title("$pagetitle");
    OpenTable();
    echo "<center><b>Sorry, ONLY super admins may run this script. If you have no clue what a super user is, just run along and play ball.</b><center>\n";
    CloseTable();
    include("footer.php");
}





?>

The install stops working. The install page comes up but it says it has failed to install.
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum