Code:<?php
/*=======================================================================
Original template " gs-template057 " released by Stafis of http://www.psd-resources.de
Conversion to phpnuke 8.0 by Mangee as theme MG-gs057
========================================================================*/
global $theme_name;
$ThemeSel = get_theme();
$theme_name =$ThemeSel;
/************************************************************/
/* Theme Colors Definition */
/************************************************************/
$bgcolor1 = "#373737";
$bgcolor2 = "#373737";
$bgcolor3 = "#373737";
$bgcolor4 = "#373737";
$textcolor1 = "#ffffff";
$textcolor2 = "#ffffff";
/************************************************************/
/* OpenTable Functions */
/************************************************************/
function OpenTable() {
global $theme_name;
echo " <br />\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/$theme_name/images/t-bkg.jpg\">\n";
echo " <tr>\n";
echo " <td><img src=\"themes/$theme_name/images/ttl.gif\" width=\"100\" height=\"83\" alt=\"\"></td>\n";
echo " <td background=\"themes/$theme_name/images/tt.gif\" width=\"100%\" height=\"83\"></td>\n";
echo " <td><img src=\"themes/$theme_name/images/ttr.gif\" width=\"100\" height=\"83\" alt=\"\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/$theme_name/images/t-bkg.jpg\">\n";
echo " <tr>\n";
echo " <td background=\"themes/$theme_name/images/tl.gif\" width=\"15\" height=\"100%\"></td>\n";
echo " <td background=\"themes/$theme_name/images/spacer.gif\">\n";
}
function CloseTable() {
global $theme_name;
echo " </td>\n";
echo " <td background=\"themes/$theme_name/images/tr.gif\" width=\"15\" height=\"100%\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"themes/$theme_name/images/t-bkg.jpg\">\n";
echo " <tr>\n";
echo " <td><img src=\"themes/$theme_name/images/tbl-1.gif\" width=\"100\" height=\"90\" alt=\"\"></td>\n";
echo " <td background=\"themes/$theme_name/images/tb-1.gif\" width=\"100%\" height=\"90\"></td>\n";
echo " <td><img src=\"themes/$theme_name/images/tbr-1.gif\" width=\"100\" height=\"90\" alt=\"\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td><img src=\"themes/$theme_name/images/tbl-2.gif\" width=\"100\" height=\"30\" alt=\"\"></td>\n";
echo " <td background=\"themes/$theme_name/images/tb-2.gif\" width=\"100%\" height=\"30\"></td>\n";
echo " <td><img src=\"themes/$theme_name/images/tbr-2.gif\" width=\"100\" height=\"30\" alt=\"\"></td>\n";
echo " </tr>\n";
echo " </table></td>\n";
echo " </tr>\n";
echo " </table><br />\n";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" ><tr><td class=infort>\n";
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" ><tr><td>\n";
}
function CloseTable2() {
echo "</td></tr></table></td></tr></table>\n";
}
/************************************************************/
/* FormatStory */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
global $anonymous;
if (!empty($notes)) {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
echo "<font class=\"content\">$thetext$notes</font>\n";
} else {
if(!empty($informant)) {
$boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$boxstuff = "$anonymous ";
}
$boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
echo "<font class=\"content\">$boxstuff</font>\n";
}
}
/************************************************************/
/* Function themeheader() */
/************************************************************/
function themeheader() {
global $admin, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous, $ip, $theuser, $flash, $name, $theme_name;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$theuser = "<font class=\"content\">Welcome Guest</font>";
} else {
$theuser = " Welcome $username!";
}
$ip = $_SERVER["REMOTE_ADDR"] ;
include("themes/$theme_name/theme_info.php");
$public_msg = public_message();
echo "$public_msg";
//CHOICE HEADER
$choice = $flashlogo;
if ($choice == "yes"){$flash = "1"; }
if ($choice == "no"){$flash = "0"; }
//HEADER MARQUEE
$marquee1 = $hms1;
$marquee1 = " <A name= \"scrollingCodemarquee\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"left\" value style=\"color: #000000\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>$hms1</marquee>\n";
echo "<body>";
if ($flash == 1) {
include("themes/$theme_name/header.php");
} else {
include("themes/$theme_name/noflash.php");
}
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n";
echo "<tr valign=\"top\">\n";
echo "<td width=\"5\" valign=\"top\" background=\"themes/$theme_name/images/spacer.gif\"><img src=\"themes/$theme_name/images/spacer.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
echo "<td width=\"160\" valign=\"top\">\n";
global $swapleftright;
$swapleftright = "1";
if($name!=Forums AND $name!=Private_Messages AND $name!=Members_List AND $name!=coppermine)
{
blocks(left);
echo " </td>\n";
echo " <td style=\"width: 5px;\" valign =\"top\"><img src=\"themes/$theme_name/images/spacer.gif\" alt=\"\" width=\"5\" height=\"1\" border=\"0\" /></td>\n";
echo " <td width=\"100%\">\n";
} else {
echo " </td>\n";
echo " <td style=\"width: 1px;\" valign =\"top\"><img src=\"themes/$theme_name/images/spacer.gif\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" /></td>\n";
echo " <td width=\"100%\">\n";
}
$swapleftright = "0";
}
/************************************************************/
/* Function themefooter() */
/************************************************************/
function themefooter() {
global $index, $user, $cookie, $banners, $prefix, $db, $admin, $adminmail, $nukeurl, $total_time, $start_time, $ip, $footad, $theme_name;
//FOOTER MARQUEE
$marquee2 = $hms2;
$marquee2 = " <A name= \"scrollingCodemarquee\"></A><MARQUEE behavior= \"scroll\" align= \"center\" direction= \"left\" value style=\"color: #000000\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>$hms1</marquee>\n";
//DOWNLOADS
$maxshow = 10; // Number of downloads to display in the block.
$a = 1;
$sql = "SELECT lid, title, hits FROM ".$prefix."_downloads_downloads ORDER BY hits DESC LIMIT 0,$maxshow";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$title2 = ereg_replace("_", " ", $row[title]);
$show2 .= " <font color=\"#edac22\">$a: </font><a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$row[lid]&title=$row[title]\"></a> <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$row[lid]&title=$row[title]\">$title2</a><b><br> $row[hits]</b> times<br>";
$showdls = " <A name= \"scrollingCodedownloads\"></A><MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" height=\"250\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>$show2";
$a++;
}
//WEBLINKS
$maxshow = 10; // Number of links to display in the block.
$a = 1;
$sql = "select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow";
$result = $db->sql_query("select lid, title, hits from ".$prefix."_links_links order by date DESC limit 0,$maxshow");
while(list($lid, $title, $hits) = $db->sql_fetchrow($result)) {
$title2 = ereg_replace("_", " ", "$title");
$show .= " <font color=\"#edac22\">$a: </font><a href=\"modules.php?name=Web_Links&l_op=viewlinkdetails&lid=$lid&ttitle=$title\">$title2</a><b><br> $hits</b> times<br>";
$showlinks = " <A name= \"scrollingCode\"></A><MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" height=\"250\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>$show";
$a++;
}
if (defined('INDEX_FILE')) {
echo " </td>\n";
echo " <td style=\"width: 5px;\" valign=\"top\"><img src=\"themes/$theme_name/images/spacer.gif\" alt=\"\" width=\"5\" height=\"1\" /></td>\n";
echo " <td style=\"width: 160px;\" valign=\"top\">\n";
blocks('right');
echo " </td>\n";
echo " <td width=\"5\" valign=\"top\" background=\"themes/$theme_name/images/spacer.gif\"><img src=\"themes/$theme_name/images/spacer.gif\" width=\"5\" height=\"0\" border=\"0\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
}else{
echo " </td>\n";
echo " <td width=\"5\" valign=\"top\" background=\"themes/$theme_name/images/spacer.gif\"><img src=\"themes/$theme_name/images/spacer.gif\" width=\"5\" height=\"0\" border=\"0\"></td>\n";
echo " </tr>\n";
echo " </table>\n";
}
include("themes/$theme_name/footer.php");
}
/************************************************************/
/* Function themeindex() */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath, $theme_name;
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> $notes\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." \"$thetext\"$notes\n";
}
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$datetime = substr($morelink, 0, strpos($morelink, "|") - strlen($morelink));
$morelink = substr($morelink, strlen($datetime) + 2);
$tmpl_file = "themes/$theme_name/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themearticle() */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid, $tipath, $theme_name;
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> $notes\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"user.php?op=userinfo&uname=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." \"$thetext\" $notes\n";
}
$tmpl_file = "themes/$theme_name/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themesidebox() */
/************************************************************/
function themesidebox($title, $content) {
global $swapleftright, $theme_name;
if ($swapleftright=="0") {
$tmpl_file = "themes/$theme_name/blocksR.html";
} else {
$tmpl_file = "themes/$theme_name/blocksL.html";
}
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
|