<?PHP
/************************************************************************/
/* Theme for NPDS / Net Portal Dynamic System                           */
/* ===========================                                          */
/*                                                                      */
/* Theme : npds2004 Copyright (c) 2002-2005                     by Siem */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
$theme      = "npds2004";
$bgcolor1   = "#e8e8ec"; // couleur des fonds de tableau (opentable, opentable2)
$bgcolor2   = "#878698"; // couleur des titres de blocs / bordure des tableaux (opentable, opentable2)
$bgcolor3   = "#f7f7f7"; // couleur de cellule des forums, messagerie ...
$bgcolor4   = "#eaeaea"; // couleur de certains titres de tableaux ou de menus (sdv, download ...)
$bgcolor5   = "#fafbfa"; // couleur du bandeau dhtml, menu de link, stats, poll, le chat Box

$bargif     = "themes/$theme/images/stats/bar10.gif"; // gif définissant les BarGraph de stats et poll
$textcolor1 = "#000000";
$textcolor2 = "#45445b";
$long_chain = "15"; // Nombre de caractères affiché avant troncature pour certains blocs
/************************************************************************/
include ("modules/aide-contextuelle/AC.php");

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath, $site_font, $nuke_url, $textcolor1, $textcolor2;
    echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\" border=\"0\"><tr><td bgcolor=\"#c3c2cb\" valign=\"top\" height=\"1%\">";
    formatAidHeader($aid);
    echo " : $time $timezone <b>(".translate("reads")." $counter fois)</b>
    </td></tr>
    <tr><td class=\"CONTENT\" valign=\"top\">
    <div class=\"TITREA\">$title</div>";
    $no_img=false;
    if ((file_exists("$tipath$topicimage")) and ($topicimage!="")) {
       echo "<a href=\"search.php?query=&amp;topic=$topic\"><img src=\"$tipath$topicimage\" alt=\"$topictext\" align=\"right\" border=\"0\" /></a>";
    } else {
       $no_img=true;
    }

    if ($aid==$informant) {
        echo "<span style=\"size: 12px; color:$textcolor1;\">$thetext</span>";
    } else {
        $boxstuff = "";
        if($informant != "") {
            $boxstuff .= "<a href=\"user.php?op=userinfo&amp;uname=$informant\" CLASS=\"NOIR\">$informant</a> ";
        } else {
            $boxstuff .= "$anonymous ";
        }

        if ($notes != "") $notes = "<span style=\"size: 10px; color=$textcolor2;\">".translate("Note")." : \"$notes\"</span>";
        $boxstuff .= "".translate("writes")." \"$thetext\"<br /><br />$notes\n";
        echo "$boxstuff\n";
    }

    if ($no_img) {
       echo "<br /><span style=\"size: 12px;\"><b><a href=\"search.php?query=&amp;topic=$topic\" class=\"NOIR\">$topictext</a></b></span><br />";
    }

    echo "</td></tr>
          <tr>
          <td align=\"right\" bgcolor=\"#c3c2cb\" valign=\"bottom\">";

    echo "$morelink";
    echo "</td></tr></table>";
}

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
    global $admin, $sid, $tipath, $textcolor1;
    echo"<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr><td>
    ".translate('Posted on')." $datetime ".translate("by")." ";
    formatAidHeader($aid);
    if ($admin) {
        echo "&nbsp;&nbsp;[ <a href=\"admin.php?op=EditStory&amp;sid=$sid\"><span class=\"ROUGE\">".translate("Edit")."</span></a> | <a href=\"admin.php?op=RemoveStory&amp;sid=$sid\"><span class=\"ROUGE\">".translate("Delete")."</span></a> ]<br />";
    }
    if($informant != "") {
        echo " ".translate("Contributed by")." : <a href=\"user.php?op=userinfo&amp;uname=$informant\"><span class=\"TITBOXC\">$informant</span></a>";
    } else {
        echo " ".translate("Contributed by")." : <span class=\"TITBOXC\">$anonymous</span>";
    }
    echo "</td></tr></table><div class=\"SEPAR\"></div>";

    echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"ffffff\" width=\"100%\"><tr><td align=\"left\">";
    $no_img=false;
    if ((file_exists("$tipath$topicimage")) and ($topicimage!="")) {
       echo "<a href=\"search.php?query=&amp;topic=$topic\"><img src=\"$tipath$topicimage\" border=\"0\" alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\" /></a>";
    } else {
       $no_img=true;
    }
    echo "<span class=\"TITREA\">$title</span><br />
    <span style=\"color: $textcolor1;\">$thetext</span>";
    if ($no_img) {
       echo "</td><td width=\"10%\" align=\"center\" valign=\"center\"><span style=\"size: 12px;\"><b><a href=\"search.php?query=&amp;topic=$topic\" CLASS=\"NOIR\">$topictext</a></b></span>";
    }
    echo "</td></tr></table><br />";
}

//------------------------------
// Advance Theme for NPDS 5.0
//------------------------------
function opentable_theme () {
   global $bgcolor1;
   echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function closetable_theme () {
   echo "</td></tr></table>\n";
}
function opentable2_theme () {
   global $bgcolor1, $bgcolor2;
   echo "<table width=\"90%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
   echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"6\" bgcolor=\"$bgcolor1\"><tr><td>\n";
}
function closetable2_theme () {
   echo "</td></tr></table></td></tr></table>\n";
}

function themesidebox($title, $content) {
    global $theme, $B_class_title, $B_class_content;
    $title=AidBlocRequestX($title);
    echo "<img alt=\"\" src=\"themes/$theme/images/ind_a.gif\" align=\"middle\" border=\"0\" />";
    if ($B_class_title!="")
       echo "<span class=\"".$B_class_title."\">&nbsp;$title</span><br />";
    else
       echo "&nbsp;$title<br />";

    echo "<img height=\"5\" alt=\"\" src=\"themes/$theme/images/ligne.gif\" width=\"150\" border=\"0\" /><br />
    <table cellspacing=\"0\" cellpadding=\"0\" width=\"90%\" border=\"0\" ";
    if ($B_class_content!="")
       echo "class=\"".$B_class_content."\">";
    else
       echo "class=\"BOX\">";

    echo "<tr><td>$content</td></tr></table>
    <img height=\"5\" alt=\"\" src=\"themes/$theme/images/ligne.gif\" width=\"150\" border=\"0\" /><br />\n";
}

function theme_centre_box($title, $content) {
    global $theme;
    echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">
    <tr><td><img height=\"5\" alt=\"\" src=\"themes/$theme/images/box/spacer.gif\" width=\"5\" border=\"0\" /></td></tr>\n";
    echo "<tr><td class=\"EDITO\">$title<br />\n";
    echo "$content<br /><br /></td></tr></tbody></table><div class=\"SEPAR\"></div>\n";
}

function themesideboxB($title, $content) {
    global $theme;
    $title=AidBlocRequestX($title);
    echo "<div class=\"TITBOXC\"><img height=\"19\" alt=\"\" src=\"themes/$theme/images/box/fle_n.gif\" width=\"13\" align=\"middle\" border=\"0\" />
    <span class=\"TITBOXC\">$title</span><br />
    <img height=\"5\" alt=\"\" src=\"themes/$theme/images/box/lignen.gif\" width=\"130\" border=\"0\" /><br />
    $content</div>\n";
}
?>