<?php



/************************************************************/

/* Theme Name: BlackW                                         */

/* Theme Design: www.disipal.net   (Disipal Site)           */

/* Powered by www.mid.gr                                    */

/*                                                          */

/************************************************************/



/************************************************************/

/* 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 = "3A3A3A";

$bgcolor2 = "3A3A3A";

$bgcolor3 = "3A3A3A";

$bgcolor4 = "3A3A3A";

$textcolor1 = "#ffffff";

$textcolor2 = "#ffffff";



include("themes/BlackW/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, $name, $dbi;

    cookiedecode($user);

    $username = $cookie[1];

    if ($username == "") {

        $username = "Anonymous";

    }

    echo "<body bgcolor=\"000000\" text=\"#ffffff\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">";
    $public_msg = public_message(); 
    echo "$public_msg";

    $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=%22modules.php?name=Your_Account&op=new_user/&quot;>Créer un compte";

    } else {

    $theuser = "&nbsp;&nbsp;Bienvenue $username!";

    }

    $tmpl_file = "themes/BlackW/header.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;
    blocks(left);  

    $tmpl_file = "themes/BlackW/left_center.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}



function themefooter() {
     global $index, $foot1, $banners, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;;
/************************************************************/
/* banners are set with openbox function on the footer, if  */
/* you like to have it on the header you can do that as well*/
/************************************************************/
    if ($banners == 1) {
      OpenTable();
        include("banners.php");
      CloseTable();
    }
    if ($index == 1) {
    $tmpl_file = "themes/BlackW/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<br>$copyright";
    $tmpl_file = "themes/BlackW/footer.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;

        echo "<center><br><font class=\"small\"> .:: Theme Designed by <a href=%22http:/www.disipal.net/%22>Disipal</a> ::  PHP-Nuke themes by <a href=%22http:/www.disipal.net/%22>Disipal Site</a> ::.</font></center>";  
    echo "<br>\n";
}



/************************************************************/

/* 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=%22modules.php?name=Your_Account&op=userinfo&uname=$informant/&quot;>$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/BlackW/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;

    $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=%22modules.php?name=Your_Account&op=userinfo&uname=$informant/&quot;>$informant</a>";

    } else {

        $content = "$anonymous ";

    }

    $content .= ""._WRITES."<i>\"$thetext\"</i>$notes\n";

    }

    $tmpl_file = "themes/BlackW/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/BlackW/blocks.html";

    $thefile = implode("", file($tmpl_file));

    $thefile = addslashes($thefile);

    $thefile = "\$r_file=\"".$thefile."\";";

    eval($thefile);

    print $r_file;

}



?>
