home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 April / PCWorld_2005-04_cd.bin / akce / web / phpnuke / PHP-Nuke-7.5.exe / html / themes / Kaput / theme.php
PHP Script  |  2004-01-29  |  12KB  |  254 lines

  1. <?php
  2.  
  3. /************************************************************/
  4. /* Theme Colors Definition                                  */
  5. /*                                                          */
  6. /* Control the header for your site. You need to define the */
  7. /* BODY tag and in some part of the code call the blocks    */
  8. /* function for left side with: block(left);                */
  9. /************************************************************/
  10.  
  11. $thename = "NukeNews";
  12. $bgcolor1 = "#d5d5d5";
  13. $bgcolor2 = "#7b91ac";
  14. $bgcolor3 = "#efefef";
  15. $bgcolor4 = "#d5d5d5";
  16. $textcolor1 = "#000000";
  17. $textcolor2 = "#000000";
  18.  
  19. function OpenTable() {
  20.     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>
  21.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/up-left2.gif\" alt=\"\" border=\"0\"></td>
  22.     <td background=\"themes/Kaput/images/up2.gif\" align=\"center\" width=\"100%\" height=\"15\"> </td>
  23.     <td><img src=\"themes/Kaput/images/up-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  24.     <tr>
  25.     <td background=\"themes/Kaput/images/left2.gif\" width=\"15\"> </td>
  26.     <td bgcolor=\"ffffff\" width=\"100%\">";
  27. }
  28.  
  29. function OpenTable2() {
  30.  
  31.     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr>
  32.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/up-left2.gif\" alt=\"\" border=\"0\"></td>
  33.     <td background=\"themes/Kaput/images/up2.gif\" align=\"center\" height=\"15\"> </td>
  34.     <td><img src=\"themes/Kaput/images/up-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  35.     <tr>
  36.     <td background=\"themes/Kaput/images/left2.gif\" width=\"15\"> </td>
  37.     <td bgcolor=\"ffffff\">";
  38. }
  39.     
  40. function CloseTable() {
  41.     echo "</td>
  42.     <td background=\"themes/Kaput/images/right2.gif\"> </td></tr>
  43.     <tr>
  44.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/down-left2.gif\" alt=\"\" border=\"0\"></td>
  45.     <td background=\"themes/Kaput/images/down2.gif\" align=\"center\" height=\"15\"> </td>
  46.     <td><img src=\"themes/Kaput/images/down-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  47.     </td></tr></table>
  48.     <br>";
  49. }
  50.  
  51. function CloseTable2() {
  52.     echo "</td>
  53.     <td background=\"themes/Kaput/images/right2.gif\"> </td></tr>
  54.     <tr>
  55.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/down-left2.gif\" alt=\"\" border=\"0\"></td>
  56.     <td background=\"themes/Kaput/images/down2.gif\" align=\"center\" height=\"15\"> </td>
  57.     <td><img src=\"themes/Kaput/images/down-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  58.     </td></tr></table>
  59.     <br>";
  60. }
  61.  
  62. function FormatStory($thetext, $notes, $aid, $informant) {
  63.     global $anonymous;
  64.     if ($notes != "") {
  65.     $notes = "<b>"._NOTE."</b> <i>$notes</i>\n";
  66.     } else {
  67.     $notes = "";
  68.     }
  69.     if ("$aid" == "$informant") {
  70.     echo "<font class=\"content\" color=\"#505050\">$thetext<br>$notes</font>\n";
  71.     } else {
  72.     if($informant != "") {
  73.         $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
  74.     } else {
  75.         $boxstuff = "$anonymous ";
  76.     }
  77.     $boxstuff .= "writes <i>\"$thetext\"</i> $notes\n";
  78.     echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
  79.     }
  80. }
  81.  
  82. /************************************************************/
  83. /* Function themeheader()                                   */
  84. /*                                                          */
  85. /* Control the header for your site. You need to define the */
  86. /* BODY tag and in some part of the code call the blocks    */
  87. /* function for left side with: block(left);                */
  88. /************************************************************/
  89.  
  90. function themeheader() {
  91.     global $user, $sitename;
  92.     cookiedecode($user);
  93.     $username = $cookie[1];
  94.     if ($username == "") {
  95.         $username = "Anonymous";
  96.     }
  97.     echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
  98.     ."<br>\n";
  99.     if ($banners) {
  100.     include("banners.php");
  101.     }
  102.     OpenTable();
  103.     echo "<table border=\"0\"><tr><td rowspan=\"2\">"
  104.     ."<a href=\"index.php\"><img src=\"themes/Kaput/images/logo.gif\" border=\"0\" alt=\""._WELCOMETO." $sitename\" align=\"left\"></a></td>"
  105.     ."<td align=right width=100%>"
  106.         ."<form action=\"modules.php?name=Search\" method=\"post\">"
  107.         ."<font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>"
  108.         ."<input type=\"text\" name=\"query\" size=\"14\"></font></form>"
  109.         ."</td></tr><tr>"
  110.         ."<td align=\"right\" valign=\"bottom\" width=\"100%\">"
  111.         ."<font class=\"content\"><b>"
  112.     ."<A href=\"/\">Home</a> · <A href=\"modules.php?name=Topics\">Topics</a> · "
  113.         ."<A href=\"modules.php?name=Downloads\">Downloads</a> · <A href=\"modules.php?name=Your_Account\">Your Account</a>"
  114.         ." · <A href=\"modules.php?name=Forum\">Forums</a> · <A href=\"modules.php?name=Top\">Top 10</a>"
  115.         ."</b></font></td></tr></table>\n";
  116.     CloseTable();
  117.     $public_msg = public_message();
  118.     echo "$public_msg<br>";    
  119.     echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"99%\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
  120.     ."<tr><td bgcolor=\"#ffffff\" valign=\"top\">\n";
  121.     blocks(left);
  122.     echo "</td><td><img src=\"themes/NukeNews/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\" valign=top>\n";
  123. }
  124.  
  125. /************************************************************/
  126. /* Function themefooter()                                   */
  127. /*                                                          */
  128. /* Control the footer for your site. You don't need to      */
  129. /* close BODY and HTML tags at the end. In some part call   */
  130. /* the function for right blocks with: block(right);        */
  131. /* Also, $index variable need to be global and is used to   */
  132. /* determine if the page your're viewing is the Homepage or */
  133. /* and internal one.                                        */
  134. /************************************************************/
  135.  
  136. function themefooter() {
  137.     global $index;
  138.     if ($index == 1) {
  139.     echo "</td><td><img src=\"themes/NukeNews/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"150\">\n";
  140.     blocks(right);
  141.     }
  142.     echo "</td></tr></table>\n";
  143.     echo "<br>";
  144.     OpenTable();
  145.     echo "<center>";
  146.     footmsg();
  147.     echo "</center>";
  148.     CloseTable();
  149. }
  150.  
  151. /************************************************************/
  152. /* Function themeheader()                                   */
  153. /*                                                          */
  154. /* Control the header for your site. You need to define the */
  155. /* BODY tag and in some part of the code call the blocks    */
  156. /* function for left side with: block(left);                */
  157. /************************************************************/
  158.  
  159. function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
  160.     global $anonymous, $tipath;
  161.     $ThemeSel = get_theme();
  162.     if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
  163.     $t_image = "themes/$ThemeSel/images/topics/$topicimage";
  164.     } else {
  165.     $t_image = "$tipath$topicimage";
  166.     }
  167.     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>
  168.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/up-left2.gif\" alt=\"\" border=\"0\"></td>
  169.     <td background=\"themes/Kaput/images/up2.gif\" align=\"center\" width=\"100%\" height=\"15\"> </td>
  170.     <td><img src=\"themes/Kaput/images/up-right2.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  171.     <tr>
  172.     <td background=\"themes/Kaput/images/left2.gif\" width=\"15\"> </td>
  173.     <td bgcolor=\"ffffff\" width=\"100%\">
  174.     <font color=\"#999999\"><b><a href=\"modules.php?name=News&new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B></font>
  175.     <b>$title</b><br><br>";
  176.     FormatStory($thetext, $notes, $aid, $informant);
  177.     echo "</td>
  178.     <td background=\"themes/Kaput/images/right2.gif\"> </td></tr>
  179.     <tr>
  180.     <td width=\"15\" height=\"15\"><img src=\"themes/Kaput/images/middle-left.gif\" alt=\"\" border=\"0\"></td>
  181.     <td background=\"themes/Kaput/images/middle.gif\" align=\"center\" height=\"15\"> </td>
  182.     <td><img src=\"themes/Kaput/images/middle-right.gif\" width=\"15\" height=\"15\" alt=\"\" border=\"0\"></td></tr>
  183.     <tr>
  184.     <td background=\"themes/Kaput/images/left3.gif\" width=\"15\"> </td>
  185.     <td align=center>
  186.     <font color=\"#999999\" size=\"1\">"._POSTEDBY." ";
  187.     formatAidHeader($aid);
  188.     echo ""._ON." $time $timezone ($counter "._READS.")<br></font>
  189.     <font class=\"content\">$morelink</font></td>
  190.     <td background=\"themes/Kaput/images/right3.gif\" width=\"15\"> </td></tr>
  191.     <tr>
  192.     <td width=\"15\" height=\"11\" valign=top><img src=\"themes/Kaput/images/down-left3.gif\" alt=\"\" border=\"0\"></td>
  193.     <td background=\"themes/Kaput/images/down3.gif\" align=\"center\" height=\"11\" width=100%> </td>
  194.     <td><img src=\"themes/Kaput/images/down-right3.gif\" width=\"15\" height=\"11\" alt=\"\" border=\"0\">
  195.     </td></tr></table>
  196.     <br>";
  197. }
  198.  
  199. /************************************************************/
  200. /* Function themeheader()                                   */
  201. /*                                                          */
  202. /* Control the header for your site. You need to define the */
  203. /* BODY tag and in some part of the code call the blocks    */
  204. /* function for left side with: block(left);                */
  205. /************************************************************/
  206.  
  207. function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
  208.     global $admin, $sid, $tipath;
  209.     $ThemeSel = get_theme();
  210.     if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
  211.     $t_image = "themes/$ThemeSel/images/topics/$topicimage";
  212.     } else {
  213.     $t_image = "$tipath$topicimage";
  214.     }
  215.     Opentable();
  216.     echo "<font class=\"option\" color=\"#363636\"><b>$title</b></font><br>\n"
  217.         ."<font class=\"content\">Posted on $datetime by ";
  218.     formatAidHeader($aid);
  219.     if (is_admin($admin)) {
  220.     echo "<br>[ <a href=\"admin.php?op=EditStory&sid=$sid\">"._EDIT."</a> | <a href=\"admin.php?op=RemoveStory&sid=$sid\">"._DELETE."</a> ]\n";
  221.     }
  222.     echo "<br><br>";
  223.     echo "<a href=\"modules.php?name=News&new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
  224.     FormatStory($thetext, $notes="", $aid, $informant);
  225.     echo "<br>\n\n\n";
  226.     CloseTable();
  227. }
  228.  
  229. /************************************************************/
  230. /* Function themeheader()                                   */
  231. /*                                                          */
  232. /* Control the header for your site. You need to define the */
  233. /* BODY tag and in some part of the code call the blocks    */
  234. /* function for left side with: block(left);                */
  235. /************************************************************/
  236.  
  237. function themesidebox($title, $content) {
  238.     echo "<table border=0 cellspacing=0 cellpadding=0 width=150><tr>"
  239.     ."<td width=17 height=17><img src=themes/Kaput/images/up-left.gif alt=\"\" border=0></td>"
  240.         ."<td background=themes/Kaput/images/up.gif align=center width=100% height=17> </td>"
  241.         ."<td><img src=themes/Kaput/images/up-right.gif width=17 height=17 alt=\"\" border=0></td></tr>"
  242.         ."<tr>"
  243.         ."<td background=themes/Kaput/images/left.gif width=17> </td>"
  244.         ."<td background=themes/Kaput/images/backdot.gif width=126><center><font class=content><b>$title</b></font></center><br>$content</td>"
  245.         ."<td background=themes/Kaput/images/right.gif> </td></tr>"
  246.         ."<tr>"
  247.         ."<td width=17 height=17><img src=themes/Kaput/images/down-left.gif alt=\"\" border=0></td>"
  248.         ."<td background=themes/Kaput/images/down.gif align=center width=100% height=17> </td>"
  249.         ."<td><img src=themes/Kaput/images/down-right.gif width=17 height=17 alt=\"\" border=0></td></tr>"
  250.         ."</td></tr></table>"
  251.         ."<br>";
  252. }
  253.  
  254. ?>