Code:
<?php
/************************************************************/
/* Theme Name: Black_Enuff_Red */
/* Theme Design: http://nukecode.com */
/* */
/* */
/************************************************************/
/************************************************************/
/* Theme Colors Definition */
/* */
/* Define colors for your web site. $bgcolor2 is generaly */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the */
/* other two bgcolor variables follows the same criteria. */
/* $texcolor1 and 2 are for tables internal texts */
/************************************************************/
$bgcolor1 = "000000";
$bgcolor2 = "333333";
$bgcolor3 = "000000";
$bgcolor4 = "000000";
$textcolor1 = "#ffffff";
$textcolor2 = "#ffffff";
include("themes/Black_Enuff_Red/tables.php");
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi;
//Up-Quote for 7.7+
//$myban = ads(0);
//End Un-Quote
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body bgcolor=\"000000\" text=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
//Quote out for 7.7+
if ($banners == 1) {
include("banners.php");}
//End quote out for 7.7+
$topics_list = "<select name=\"new_topic\" onChange='submit()'>\n";
$topics_list .= "<option value=\"\">All Topics</option>\n";
$toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
if ($topicid==$topic) { $sel = "selected "; }
$topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
if ($username == "Anonymous") {
$theuser = "<table><tr><td><form action=\"account.html\" method=\"post\"> <input type=\"text\" name=\"username\" value=\"Username\" onFocus=\"if(this.value=='Username')this.value='';\" value style=\"width:70;height:18;FONT-SIZE: 10px; color:#cecece;\"></td><td><input type=\"password\" name=\"user_password\" value=\"password\" onFocus=\"if(this.value=='password')this.value='';\" value style=\"width:70;height:18;FONT-SIZE: 10px; color:#cecece;\"></td><td><input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><input type=\"hidden\" name=\"gfx_check\" value=\"$code\"><input type=\"hidden\" name=\"op\" value=\"login\"><input type=\"submit\" value=\"login\"></td></form></table></font>\n";
} else { $theuser = " <b>Hello $username!</b></font> <b> <a href=\"account-logout.html\"><font class=\"header\">logout</font></b></a>";
}
$tmpl_file = "themes/Black_Enuff_Red/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(left);
$tmpl_file = "themes/Black_Enuff_Red/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $user, $banners, $cookie, $prefix, $dbi, $db, $total_time, $start_time, $admin, $adminmail, $nukeurl, $foot1, $foot2, $foot3, $foot4;
if ($banners == 0) {
opentable2();
include("banners.php");
closetable2();
}
$maxshow = 10; // Number of downloads to display in the block.
$a = 1;
$result = sql_query("select lid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,$maxshow", $dbi);
while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", "<b>$title</b>");
$show .= " $a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&title=$title\">$title2</a><br> <b><font color=\"#FFFFFF\">$hits</b><font color=\"#FFFFEE\"> times<br>";
$showdownloads = " <A name= \"scrollingCodedownloads\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"114\" scrollamount= \"2\" scrolldelay= \"90\" onmouseover='this.stop()' onmouseout='this.start()'><table width=\"100%\"><tr> <td></td></tr>$show</table></marquee>";
$a++;
}
$maxshow = 10; // Number of web links to display in the block.
$a = 1;
$result = sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow", $dbi);
while(list($lid, $title, $hits) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", "<b>$title</b>");
$show2 .= " $a: <a href=\"modules.php?name=Web_Links&l_op=viewlinkdetails&lid=$lid&ttitle=$title\">$title2</a><br> <b><font color=\"#FFFFFF\">$hits</b><font color=\"#FFFFEE\"> times<br>";
$showlinks = " <A name= \"scrollingCodeweblinks\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"114\" scrollamount= \"2\" scrolldelay= \"90\" onmouseover='this.stop()' onmouseout='this.start()'><table width=\"100%\"><tr> <td></td></tr>$show2</table>";
$a++;
}
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$end_time = $mtime;
$total_time = ($end_time - $start_time);
$total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
//Without Patched 3.1
//if ($index == 1) {
//With Patched 3.1
if (defined('INDEX_FILE')) {
$tmpl_file = "themes/Black_Enuff_Red/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(right);
}
$footer_message = "$foot1<br>$foot2<br>$foot3<br>$foot4";
$tmpl_file = "themes/Black_Enuff_Red/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON." $time $timezone ($counter "._READS.")";
$tmpl_file = "themes/Black_Enuff_Red/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themearticle() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath;
$ThemeSel = get_theme();
if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
$t_image = "themes/$ThemeSel/images/topics/$topicimage";
} else {
$t_image = "$tipath$topicimage";
}
$posted = ""._POSTEDON." $datetime "._BY." ";
$posted .= get_author($aid);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file = "themes/Black_Enuff_Red/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
$tmpl_file = "themes/Black_Enuff_Red/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
|