home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 May / INTERNET103.ISO / pc / software / windows / building / php_nuke / html / themes / traditional / theme.php
Encoding:
PHP Script  |  2002-09-16  |  7.2 KB  |  227 lines

  1. <?php
  2.  
  3. $thename = "Cuadriculado";
  4. $bgcolor1 = "#cccccc";
  5. $bgcolor2 = "#999999";
  6. $bgcolor3 = "#cccccc";
  7. $textcolor1 = "#ffffff";
  8. $textcolor2 = "#000000";
  9.  
  10. function OpenTable() {
  11.     global $bgcolor1, $bgcolor2;
  12.     echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
  13.     echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
  14. }
  15.  
  16. function CloseTable() {
  17.     echo "</td></tr></table></td></tr></table>\n";
  18. }
  19.  
  20. function OpenTable2() {
  21.     global $bgcolor1, $bgcolor2;
  22.     echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
  23.     echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
  24. }
  25.  
  26. function CloseTable2() {
  27.     echo "</td></tr></table></td></tr></table>\n";
  28. }
  29.  
  30. function FormatStory($thetext, $notes, $aid, $informant) {
  31.     global $anonymous;
  32.     if ($notes != "") {
  33.     $notes = "<b>"._NOTE."</b> <i>$notes</i>\n";
  34.     } else {
  35.     $notes = "";
  36.     }
  37.     if ("$aid" == "$informant") {
  38.     echo "<font class=\"content\" color=\"#505050\">$thetext<br>$notes</font>\n";
  39.     } else {
  40.     if($informant != "") {
  41.         $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
  42.     } else {
  43.         $boxstuff = "$anonymous ";
  44.     }
  45.     $boxstuff .= "writes <i>\"$thetext\"</i> $notes\n";
  46.     echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
  47.     }
  48. }
  49.  
  50. function themeheader() {
  51.     echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\">"
  52.     ."<br>";
  53.     if ($banners) {
  54.     include("banners.php");
  55.     }
  56.     echo "<br>"
  57.     ."<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" width=\"100%\" bgcolor=\"FFFFFF\">"
  58.     ."<tr><td width=\"100%\">"
  59.     ."<a href=\"index.php\"><img src=\"themes/Traditional/images/logo.gif\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a>"
  60.     ."</td><td align=\"right\">"
  61.     ."<form action=\"modules.php?name=Search method=\"post\">"
  62.     ."<input type=\"text\" name=\"query\" width=\"20\" size=\"15\" length=\"20\">"
  63.     ."</td>"
  64.     ."<td width=\"60\" align=\"left\"><input type=\"submit\" value=\""._SEARCH."\"></td>"
  65.     ."</tr></table></form>"
  66.     ."<br>";
  67.     $public_msg = public_message();
  68.     echo "$public_msg<br>";    
  69.     echo "<table border=\"0\" width=\"100%\" cellspacing=\"5\"><tr><td valign=\"top\">";
  70. }
  71.  
  72. function themefooter() {
  73.     global $index;
  74.     if ($index == 1) {
  75.     echo "<td> </td><td valign=\"top\" width=\"200\">";
  76.     blocks(left);
  77.     blocks(right);
  78.     }
  79.     echo "</td></tr></table></td></tr></table>";
  80.     footmsg();
  81. }
  82.  
  83. function themesidebox($title, $content) {
  84.     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"200\" bgcolor=\"#000000\"><tr><td>"
  85.         ."<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\"><tr><td bgcolor=\"#cccccc\">"
  86.         ."<img src=\"themes/Traditional/images/tic.gif\" border=\"0\" alt=\"\">"
  87.         ."<font class=\"option\">$title</font></td></tr>"
  88.         ."<tr><td bgcolor=\"#ffffff\">"
  89.         ."<font class=\"content\">$content</font>"
  90.         ."</td></tr></table></td></tr></table>"
  91.         ."<br>";
  92. }
  93.  
  94.  
  95.  
  96. function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
  97.     global $anonymous, $tipath;
  98.     $ThemeSel = get_theme();
  99.     if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
  100.     $t_image = "themes/$ThemeSel/images/topics/$topicimage";
  101.     } else {
  102.     $t_image = "$tipath$topicimage";
  103.     }
  104.     if ("$aid" == "$informant") { ?>
  105.  
  106.  
  107. <table border=0 cellpadding=3 cellspacing=1 width=100%>
  108. <tr><td bgcolor=CCCCCC>
  109. <font class=title>
  110. <b><?php echo"$title"; ?></b><br>
  111. </td></tr><tr><td bgcolor=FFFFFF>
  112. <a href="modules.php?name=News&new_topic=<?php echo"$topic"; ?>&author="><img src=<?php echo"$t_image"; ?> border=0 Alt=<?php echo"\"$topictext\""; ?> align=right hspace=10 vspace=10></a>
  113. <font class=tiny>
  114. Posted by <b><?php formatAidHeader($aid); echo "$aid"; ?></b> on <?php echo"$time $timezone"; ?><br>(<?php echo $counter; ?> reads)
  115. </font><br><br>
  116. <font class=content>
  117. <?php echo"$thetext<br><br></font>
  118. </td></tr><tr><td align=left>
  119. <font class=content>$morelink"; ?></font>
  120. </td>
  121. </tr>
  122. </table>
  123. <br>
  124.  
  125.  
  126. <?php    } else {
  127.         if($informant != "") $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
  128.         else $boxstuff = "$anonymous ";
  129.         $boxstuff .= "writes <i>\"$thetext\"</i> $notes";
  130. ?>
  131.  
  132. <table border=0 cellpadding=3 cellspacing=1 width=100%>
  133. <tr><td bgcolor=CCCCCC>
  134. <font class=title>
  135. <b><?php echo"$title"; ?></b><br>
  136. <font class=option>
  137. </td></tr><tr><td bgcolor=FFFFFF>
  138. <a href="modules.php?name=News&new_topic=<?php echo"$topic"; ?>&author="><img src=<?php echo"$t_image"; ?> border=0 Alt=<?php echo"\"$topictext\""; ?> align=right hspace=10 vspace=10></a>
  139. <font class=option>
  140. Posted by <?php formatAidHeader($aid); ?> on <?php echo"$time $timezone"; ?><br>(<?php echo $counter; ?> reads)
  141. <br><br>
  142. </font>
  143. <font class=content>
  144. <?php echo"$boxstuff<br><br></font>
  145. </td></tr><tr><td align=left>
  146. <font class=option>$morelink"; ?></font>
  147. </td>
  148. </tr>
  149. </table>
  150. <br>
  151.  
  152. <?php    }
  153. }
  154.  
  155. function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
  156.     global $admin, $sid, $tipath;
  157.     $ThemeSel = get_theme();
  158.     if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
  159.     $t_image = "themes/$ThemeSel/images/topics/$topicimage";
  160.     } else {
  161.     $t_image = "$tipath$topicimage";
  162.     }
  163.     if ("$aid" == "$informant") {
  164. echo"
  165.  
  166. <table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%>
  167. <tr><td>
  168.  
  169. <table border=0 cellpadding=3 cellspacing=1 width=100%>
  170. <tr><td bgcolor=CCCCCC>
  171. $font2
  172. <b>$title</b><br>$font2 Enviado el $datetime
  173. ";
  174. if ($admin) {
  175.     echo "   $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Edit</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Delete</a> ]";
  176. }
  177. echo "
  178. </td>
  179. </tr>
  180. <tr>
  181. <td bgcolor=ffffff>
  182. <a href=modules.php?name=News&new_topic=$topic><img src=$t_image border=0 Alt=\"$topictext\" align=right hspace=10 vspace=10></a>
  183. $thetext
  184. </td>
  185. </tr>
  186. </table>
  187. </td>
  188. </tr>
  189. </table><br>
  190. ";
  191.  
  192.     } else {
  193.         if($informant != "") $informant = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\">$informant</a> ";
  194.         else $boxstuff = "$anonymous ";
  195.         $boxstuff .= "writes <i>\"$thetext\"</i> $notes";
  196. echo "
  197.  
  198. <table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%>
  199. <tr><td>
  200. <table border=0 cellpadding=3 cellspacing=1 width=100%>
  201. <tr><td bgcolor=CCCCCC>
  202. $font3
  203. <b>$title</b><br>$font2 Contributed by $informant on $datetime</font>
  204. ";
  205. if ($admin) {
  206.     echo "   $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Edit</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Delete</a> ]";
  207. }
  208. echo "
  209. </td>
  210. </tr>
  211. <tr>
  212. <td bgcolor=ffffff>
  213. <a href=modules.php?name=News&new_topic=$topic><img src=$t_image border=0 Alt=\"$topictext\" align=right hspace=10 vspace=10></a>
  214. $font3 $thetext
  215. </td>
  216. </tr>
  217. </table>
  218. </td>
  219. </tr>
  220. </table><br>
  221. ";
  222.  
  223.     }
  224. }
  225.  
  226. ?>
  227.