Stubborn Variable
Posted: Sun May 18, 2003 10:00 am
Okay, I'm REAL new to PHP but have a handle on some of the fundamental stuff, or at least I'm starting to. I run a PHP Nuke site and I want to have a set of Topic icons that are made for specific themes so I'm trying to modify some of the code in certain modules to pull the topic icons from the themes - instead of the default location. I have successfully modified some code like "submit_news.php" using similar strings but THIS one has me stumped! I've chopped out a part of the code that I'm having problems with. This is the topics.php file from the \Admin\Modules section...
I added the variable called "$ThemeSel" to the global list first, then modified the last line of code to pull information from it - except that it's not reading the value of the $ThemeSel" variable for some reason. If I replace the variable with the name of the theme, it works just fine so it is the variable that's causing the problem.
Please please please, you code gurus out there, just cast your experienced eyes over this for just a second! LOL
I know this isn't a hardcore Nuke support forum but figured the syntax is the problem here - that and I'm sure there are more experienced folk here anyways!
Many thanks!
Code: Select all
if (!eregi("admin.php", $_SERVERї'PHP_SELF'])) { die ("Access Denied"); }
$result = sql_query("select radmintopic, radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);
list($radmintopic, $radminsuper) = sql_fetch_row($result, $dbi);
if (($radmintopic==1) OR ($radminsuper==1)) {
/*********************************************************/
/* Topics Manager Functions */
/*********************************************************/
function topicsmanager() {
global $prefix, $dbi, $ThemeSel;
include("header.php");
GraphicAdmin();
OpenTable();
echo "<center><font class="title"><b>"._TOPICSMANAGER."</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class="option"><b>"._CURRENTTOPICS."</b></font><br>"._CLICK2EDIT."</font></center><br>"
."<table border="0" width="100%" align="center" cellpadding="2">";
$count = 0;
$result = sql_query("select topicid, topicname, topicimage, topictext from ".$prefix."_topics order by topicname", $dbi);
while(list($topicid, $topicname, $topicimage, $topictext) = sql_fetch_array($result, $dbi)) {
echo "<td align="center"><a href="admin.php?op=topicedit&topicid=$topicid"><img src="themes/$ThemeSel/images/topics/$topicimage" border="0" alt=""></a><br>"
}Please please please, you code gurus out there, just cast your experienced eyes over this for just a second! LOL
I know this isn't a hardcore Nuke support forum but figured the syntax is the problem here - that and I'm sure there are more experienced folk here anyways!
Many thanks!