<?php

/************************************************************************/
/* PHP-NUKE: angler theme for nuke 6.0 & up                         */
/* ============================================                         */
/* Copyright (c) 2003 by Jaded-Designs.com                                       */
/* http://www.jaded-designs.com                                                 */
/* Made for PHP-NUKE 6.0+: Advanced Content Management System            */
/* ============================================                         */
/* Copyright (c) 2003 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/************************************************************************/
// angler Public Release theme 
// Original Author of file: Jaded-Designs - http://www.jaded-designs.com
// Purpose of file: Public Release phpnuke 6.0 and up Theme 
// Copyright © 2003 by Jaded-Designs All Rights Reserved
// ----------------------------------------------------------------------
// THEME MODIFICATION 
// Users may alter or modify this theme at their own risk,
// but only for their own use. They may also hire Jaded-Designs to modify 
// their own copy of the theme.
//
// Although users may modify the code for their use,
// modified code may not be resold or distributed,
// without express written permission from Jaded-Designs.
//
// DISPLAY OF COPYRIGHT NOTICES REQUIRED
// All copyright notices used within the scripts that the scripts generate,
// MUST remain intact. Furthermore, these notices must remain visible.
//
// SUPPORT
// Jaded-Designs provide free support, BUT not mod on the theme,
// (includes consulting, troubleshooting and fixing problems).
//
// Jaded-Designs is not liable for any products or services offered by 
// means of the theme.
// The user must assume the entire risk of using the program.
//
// Jaded-Designs
// For commercial themes, exclusive themes, visit my theme shop www.jaded-designs.com
// For more free themes, visit my sit at www.jaded-designs.com
// www.jaded-designs.com
// jaded@jaded-designs.com
// ----------------------------------------------------------------------
/************************************************************/

$bgcolor1 = "#8D5716";
$bgcolor2 = "#8D5716";
$bgcolor3 = "#66742A";
$bgcolor4 = "#66742A";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

include("themes/angler/tables.php");
include("themes/angler/my_header.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;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    
	echo "<body background=themes/angler/images/bg36.jpg leftmargin=\"40\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
    if ($banners == 1) {
        include("banners.php");
    }
    $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 = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {
        $theuser = "&nbsp;&nbsp;Welcome $username!";
    }
    $tmpl_file = "themes/angler/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    global $swapleftright; 
$swapleftright = "1"; 
blocks(left); 
$swapleftright = "0";;
    $tmpl_file = "themes/angler/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, $foot1, $foot2, $foot3, $foot4;
    if ($index == 1) {
        $tmpl_file = "themes/angler/center_right.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/angler/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    footmsg();
global $prefix, $bannersfsz, $index;
	if ($bannersfsz) {
	include("bannersfsz.php");
    }


echo "<br></center><div class=\"footmsg_l\" align=\"center\">".mxViewBench()."</div>";

}

/************************************************************/
/* 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;
    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&amp;op=userinfo&amp;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/angler/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    echo "<body background=themes/angler/images/bg36.jpg leftmargin=\"40\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">";
}

/************************************************************/
/* 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;
    $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&amp;op=userinfo&amp;uname=$informant\">$informant</a> ";
        } else {
            $content = "$anonymous ";
        }
        $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $tmpl_file = "themes/angler/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) { 
global $swapleftright, $bgcolor1, $bgcolor2; 

if ($swapleftright=="0") { 
$tmpl_file = "themes/angler/blockR.html"; 
} else { 
$tmpl_file = "themes/angler/blockL.html"; 
} 
$thefile = implode("", file($tmpl_file)); 
$thefile = addslashes($thefile); 
$thefile = "\$r_file=\"".$thefile."\";"; 
eval($thefile); 
print $r_file; 
}

?>