<?php

// THEME NAME: Red-White-Blue for PHP-Nuke 5.5
// Copyright (c) 2001-2002 Somara Sem (http://www.pixelmayhem.com)


// Some theme color definitions
$bgcolor1 = "#eeeeee";
$bgcolor2 = "#cccccc";
$bgcolor3 = "#6699CC";
$bgcolor4 = "#6699CC";
$textcolor1 = "#000000";
$textcolor2 = "#000000";

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


function OpenTable() {
    global $bgcolor1, $bgcolor2;
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}

function CloseTable() {
    echo "</td></tr></table></td></tr></table>\n";
}

function OpenTable2() {
    global $bgcolor1, $bgcolor2;
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
    echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}

function CloseTable2() {
    echo "</td></tr></table></td></tr></table>\n";
}

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


function FormatStory($thetext, $notes, $aid, $informant) {
    global $anonymous;
    if ($notes != "") {
	$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
	$notes = "";
    }
    if ("$aid" == "$informant") {
	echo "<font class=\"content\" color=\"#505050\">$thetext$notes</font>\n";
    } else {
	if($informant != "") {
	    $boxstuff = "<a href=\"module.php?name=Your_Account&amp;op=userinfo&amp;uname=$informant\">$informant</a> ";
	} else {
	    $boxstuff = "$anonymous ";
	}
	$boxstuff .= "".translate("writes")." <i>\"$thetext\"</i>$notes\n";
	echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
    }
}

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


function themeheader() {
    global $user, $banners, $sitename, $slogan, $cookie, $prefix;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<!----- Copyright (c) Somara Sem (http://www.pixelmayhem.com) PLEASE DO NOT REMOVE THIS NOTICE ----->\n\n\n\n\n\n\n"
    ."<body bgcolor=\"#6699CC\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n";
    if ($banners) {
	include("banners.php");
    }
    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
	."<tr>\n"
	."<td bgcolor=\"#ffffff\" width=\"70%\">\n"
	."<img height=\"30\" alt=\"\" hspace=\"0\" src=\"themes/Red-White-Blue/images/corner-top-left.gif\" width=\"30\" align=\"left\">\n"
	."<a href=\"index.php\"><img src=\"themes/Red-White-Blue/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
	."<td bgcolor=\"#ffffff\"><IMG src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
	."<td bgcolor=\"#ffffff\" align=\"right\">\n"
	."<form action=\"modules.php?name=Search\" method=\"post\"><font class=\"content\" color=\"#000000\"><b>".translate("Search")." </b>\n"
	."<input type=\"text\" name=\"query\" size=\"14\"></font></form></td>\n"

	."<td bgcolor=\"#ffffff\" valign=\"top\"><img height=\"30\" alt=\"\" hspace=\"0\" src=\"themes/Red-White-Blue/images/corner-top-right.gif\" width=\"30\" align=\"right\"></td>\n"
	."</tr></table>\n"
	."<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
	."<tr>\n"
	."<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=1 alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
	."</tr>\n"
	."<tr valign=\"middle\" bgcolor=\"#ED1C24\">\n"
	."<td width=\"15%\" nowrap><font class=\"content\" color=\"#363636\"><b>\n";
    if ($username == "Anonymous") {
	echo "&nbsp;&nbsp;<b><font color=\"#363636\"><a href=\"modules.php?name=Your_Account\" class=\"topnav\">Devenez membre</a></font></b>\n";
    } else {
	echo "&nbsp;&nbsp;Bienvenue $username! &nbsp;&nbsp;<a class=\"topnav\" href=\"modules.php?name=Your_Account&op=logout\">Sortir</a>";
    }
    echo "</b></font></td>\n"
	."<td align=\"center\" height=\"20\" width=\"70%\"><font class=\"topnav\"><B>\n"
	."<A href=\"modules.php?name=Content\" class=\"topnav\">Rubriques</a>\n"
	."&nbsp;&middot;&nbsp;\n"        
        ."<A href=\"modules.php?name=Downloads\" class=\"topnav\">Téléchargements</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Your_Account\" class=\"topnav\">Votre Compte</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Submit_News\" class=\"topnav\">Proposez un article</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Top\" class=\"topnav\">Top 10</a>\n"
        ."</B></font>\n"
        ."</td>\n"
        ."<td align=\"right\" width=\"15%\"><font class=\"content\"><b>\n"
        ."<script type=\"text/javascript\">\n\n"
        ."<!--   // Array ofmonth Names\n"
        ."var monthNames = new Array( \"Janvier\",\"F&eacute;vrier\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Ao&ucirc;t\",\"Septembre\",\"Octobre\",\"Novembre\",\"D&eacute;cembre\");\n"
        ."var now = new Date();\n"
        ."thisYear = now.getYear();\n"
        ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
        ."document.write(\"Le \" + now.getDate() + \" \" + monthNames[now.getMonth()] + \" \" + thisYear);\n"
        ."// -->\n\n"
        ."</script></b></font></td>\n"
        ."<td>&nbsp;</td>\n"
        ."</tr>\n"
        ."<tr>\n"
        ."<td bgcolor=\"#003366\" colspan=\"4\"><IMG src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
        ."</tr>\n"
        ."</table>\n";

	$public_msg = public_message();
        echo "$public_msg<br>";
// Begin main content table
	echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
	."<td><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=\"20\" border=\"0\" alt=\"\"></td></tr></table>\n"
	."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
	."<td><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"10\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
	."<td width=\"150\" valign=\"top\">\n";
    blocks(left);
    echo "</td><td><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
}

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


function themefooter() {
    global $index;
    if ($index == 1) {
	echo "</td><td><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"150\">\n";
	blocks(right);
    }
    echo "</td><td><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=10 height=1 border=0 alt=\"\">\n"
	."</td></tr></table>\n"

        ."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ED1C24\" align=\"center\">\n"
        ."<tr valign=\"top\">\n"
        ."<td bgcolor=\"#000000\"><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=\"1\"></td>\n"
        ."</tr>\n"
        ."<tr valign=\"top\" bgcolor=\"#ED1C24\">\n"
        ."<td align=\"center\" valign=\"middle\" bgcolor=\"#ED1C24\" width=\"100%\" height=\"20\"><b>\n"

        ."<A href=\"/\" class=\"topnav\">Accueil</a>\n"
	    ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Topics\" class=\"topnav\">Sujets</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Downloads\" class=\"topnav\">Téléchargements</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Your_Account\" class=\"topnav\">Votre Compte</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Submit_News\" class=\"topnav\">Proposez un article</a>\n"
        ."&nbsp;&middot;&nbsp;\n"
        ."<A href=\"modules.php?name=Top\" class=\"topnav\">Top 10</a>\n"

        ."</b></td>\n"
        ."</tr>\n"
        ."<tr valign=\"top\">\n"
        ."<td bgcolor=\"#000000\"><img src=\"themes/Red-White-Blue/images/pixel.gif\" width=\"1\" height=\"1\"></td>\n"
        ."</tr>\n"
        ."</table>\n"

        ."<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\">\n"
        ."<tr align=\"center\">\n"
        ."<td width=\"100%\" colspan=\"3\">\n";
    footmsg();
    echo "</td>\n"
        ."</tr><tr>\n"
        ."<td><IMG height=\"30\" alt=\"\" hspace=\"0\" src=\"themes/Red-White-Blue/images/corner-bottom-left.gif\" width=\"30\" align=\"left\"></td>\n"
        ."<td width=\"100%\">&nbsp;</td>\n"
        ."<td><IMG height=\"30\" alt=\"\" hspace=\"0\" src=\"themes/Red-White-Blue/images/corner-bottom-right.gif\" width=\"30\" align=\"right\"></td>\n"
        ."</tr></table>\n";
}

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


function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
    ."<tr>\n"
    ."<td align=\"left\" valign=\"top\" width=\"16\" height=\"29\"><img src=\"themes/Red-White-Blue/images/sidebox-title-left.gif\" width=\"16\" height=\"29\"></td>\n"
    ."<td align=\"left\" valign=\"middle\" bgcolor=\"#006699\" width=\"100%\"><font class=\"sideboxtitle\">&nbsp;<b>$title</b></font></td>\n"
    ."<td align=\"left\" valign=\"top\" width=\"13\" height=\"29\"><img src=\"themes/Red-White-Blue/images/sidebox-title-right.gif\" width=\"13\" height=\"29\"></td>\n"
    ."</tr>\n"
    ."</table>\n"

    ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
    ."<tr>\n"
    ."<td align=\"left\" valign=\"top\" width=\"5\" background=\"themes/Red-White-Blue/images/sidebox-content-left.gif\"><img src=\"themes/Red-White-Blue/images/sidebox-content-left.gif\" width=\"5\"></td>\n"
    ."<td align=\"left\" valign=\"top\" bgcolor=\"#ffffff\" width=\"1280\">\n"

    ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"
    ."<tr>\n"
    ."<td>\n"
	."<font color=\"#999999\"><b><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"images/topics/$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B></font>\n";
    FormatStory($thetext, $notes, $aid, $informant);
    echo "</td>\n"
    ."</tr>\n"
    ."<tr>\n"
    ."<td bgcolor=\"#eeeeee\" align=\"center\">\n"
	.""._POSTEDBY." ";
    formatAidHeader($aid);
    echo " "._ON." $time $timezone ($counter "._READS.")<br>\n"
	."$morelink\n"
	."</td>\n"
	."</tr>\n"
    ."</table>\n"


    ."</td>\n"
    ."<td align=\"right\" valign=\"top\" width=\"8\" background=\"themes/Red-White-Blue/images/sidebox-content-right.gif\"><img src=\"themes/Red-White-Blue/images/sidebox-content-right.gif\" width=\"8\"></td>\n"
    ."</tr>\n"
    ."</table>\n"


    ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n"
    ."<tr>\n"
    ."<td width=\"17\" height=\"14\"><img src=\"themes/Red-White-Blue/images/storybox-bottom-left.gif\" width=\"17\" height=\"14\"></td>\n"
    ."<td width=\"1280\" height=\"14\" background=\"themes/Red-White-Blue/images/storybox-bottom-middle.gif\" width=\"3\" height=\"14\"><img src=\"themes/Red-White-Blue/images/storybox-bottom-middle.gif\" width=\"3\" height=\"14\"></td>\n"
    ."<td align=\"right\" valign=\"top\" width=\"17\" height=\"14\"><img src=\"themes/Red-White-Blue/images/storybox-bottom-right.gif\" width=\"17\" height=\"14\"></td>\n"
    ."</tr>\n"
    ."</table><br>\n";


}

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


function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath;

// Read More Title Area
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\">\n"
        ."<tr>\n"
        ."<td>\n"
        ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n"
        ."<tr>\n"
        ."<td>\n"
        ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#006699\" width=\"100%\">\n"
        ."<tr>\n"
        ."<td align=\"left\">\n"
        ."<font class=\"title\" color=\"#363636\"><b>$title</b></font><br>\n"
        ."<font class=\"posted\">"._POSTEDON." $datetime "._BY." ";
    formatAidHeader($aid);
    if (is_admin($admin)) {
	echo "<br>[ <a class=\"topnav\" href=\"admin.php?op=EditStory&amp;sid=$sid\">"._EDIT."</a> | <a class=\"topnav\" href=\"admin.php?op=RemoveStory&amp;sid=$sid\">"._DELETE."</a> ]\n";
    }
    echo "</td>\n"
        ."</tr>\n"
        ."</table>\n"
        ."</td>\n"
        ."</tr>\n"
        ."</table>\n"

        ."</td>\n"
        ."</tr>\n"
        ."</table>\n\n\n"

// Read More Content Area
        ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\">\n"
        ."<tr>\n"
        ."<td>\n";
    echo "<a class=\"topnav\" href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"images/topics/$topicimage\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
    FormatStory($thetext, $notes="", $aid, $informant);
    echo "</td>\n"
        ."</tr>\n"
        ."</table><br>\n\n\n";
}

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


function themesidebox($title, $content) {
    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">\n"
    ."<tr>\n"
    ."<td align=\"left\" valign=\"top\" width=\"16\" height=\"29\"><img src=\"themes/Red-White-Blue/images/sidebox-title-left.gif\" width=\"16\" height=\"29\"></td>\n"
    ."<td align=\"left\" valign=\"middle\" bgcolor=\"#006699\" width=\"121\"><font class=\"sideboxtitle\">&nbsp;<b>$title</b></font></td>\n"
    ."<td align=\"left\" valign=\"top\" width=\"13\" height=\"29\"><img src=\"themes/Red-White-Blue/images/sidebox-title-right.gif\" width=\"13\" height=\"29\"></td>\n"
    ."</tr>\n"
    ."</table>\n"

    ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">\n"
    ."<tr>\n"
    ."<td align=\"left\" valign=\"top\" width=\"5\" background=\"themes/Red-White-Blue/images/sidebox-content-left.gif\"><img src=\"themes/Red-White-Blue/images/sidebox-content-left.gif\" width=\"5\"></td>\n"
    ."<td align=\"left\" valign=\"top\" bgcolor=\"#ffffff\" width=\"137\">\n"

    ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"136\">\n"
    ."<tr>\n"
    ."<td>\n"
    ."$content\n"
    ."</td>\n"
    ."</tr>\n"
    ."</table>\n"



    ."</td>\n"
    ."<td align=\"right\" valign=\"top\" width=\"8\" background=\"themes/Red-White-Blue/images/sidebox-content-right.gif\"><img src=\"themes/Red-White-Blue/images/sidebox-content-right.gif\" width=\"8\"></td>\n"
    ."</tr>\n"
    ."</table>\n"

    ."<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"150\">\n"
    ."<tr>\n"
    ."<td align=\"left\" valign=\"top\" width=\"150\"><img src=\"themes/Red-White-Blue/images/sidebox-bottom.gif\"></td>\n"
    ."</tr>\n"
    ."</table><br>\n";

}

?>
