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 / Slash / theme.php
PHP Script  |  2004-01-29  |  16KB  |  292 lines

  1. <?php
  2.  
  3. $bgcolor1 = "#FFFFFF";
  4. $bgcolor2 = "#660000";
  5. $bgcolor3 = "#e6e6e6";
  6. $bgcolor4 = "#660000";
  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&username=$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.     global $slogan, $sitename;
  52. echo "<body bgcolor=DDDDDD text=222222 link=660000 vlink=222222>
  53. <br>";
  54. if ($banners) {
  55.     include("banners.php");
  56. }
  57. echo "<br>
  58. <center>
  59. <table cellpadding=0 cellspacing=0 border=0 width=99% align=center><tr><td align=left>
  60. <a href=$nukeurl><img src=themes/Slash/images/logo.gif border=0></a>
  61. </td><td align=right width=100%>
  62.     <form action=modules.php?name=Search&method=post>
  63.     <font class=content><input type=text name=query width=20 size=20 length=20>
  64.     </td>
  65.     <td align=right>  <input type=submit value=\""._SEARCH."\"></td>
  66.     </form>";
  67.     echo "</td></tr></table><br>";
  68. echo "
  69. <table cellpadding=0 cellspacing=1 border=0 width=99% bgcolor=660000><tr><td>
  70. <table cellpadding=5 cellspacing=1 border=0 width=100% bgcolor=FFFFFF><tr><td>
  71. <font class=content>$slogan</td></tr></table></td></tr></table>";
  72.     $public_msg = public_message();
  73.     echo "$public_msg<br>";    
  74. echo "<table width=99% align=center cellpadding=0 cellspacing=0 border=0><tr><td valign=top rowspan=5>";
  75.  
  76. blocks(left);
  77.  
  78. echo "</td><td> </td><td valign=top width=100%>";
  79. }
  80.  
  81. function themefooter() {
  82.     global $index;
  83. if ($index == 1) {
  84.     echo "<td> </td><td valign=\"top\">";
  85.     blocks(right);
  86.     echo "</td>";
  87. }
  88. echo "</tr></table></td></tr></table>";
  89. footmsg();
  90. }
  91.  
  92. function themeindex ($aid, $informant, $datetime, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
  93.     global $anonymous, $tipath;
  94.     $ThemeSel = get_theme();
  95.     if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
  96.     $t_image = "themes/$ThemeSel/images/topics/$topicimage";
  97.     } else {
  98.     $t_image = "$tipath$topicimage";
  99.     }
  100.     if ("$aid" == "$informant") { ?>
  101.         <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DDDDDD"><tr valign="top" bgcolor="#660000">
  102.             <td><img src="themes/Slash/images/cl.gif" width="7" height="10" alt=""><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""></td>
  103.             <td width="100%">
  104.             <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td>
  105.             <font class="option" color="#FFFFFF"><B><?php echo"$title"; ?></B></font>
  106.             </td></tr></table>
  107.             </td><td align="right"><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""><img src="themes/Slash/images/cr.gif" width="7" height="10" alt=""></td>
  108.              </tr></table>
  109.         <table border="0" cellpadding="0" cellspacing="0"><tr bgcolor="#e6e6e6">
  110.             <td background="themes/Slash/images/gl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  111.             <td width="100%">
  112.                 <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr>
  113.                 <td><font class="tiny">Posted by <?php formatAidHeader($aid) ?> on <?php echo"$datetime $timezone"; ?> (<?php echo $counter; ?> reads)</font></td>
  114.                 </tr></table>
  115.             </td>
  116.             <td background="themes/Slash/images/gr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  117.         </tr>
  118.         <tr bgcolor="#006666"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  119.         <tr bgcolor="#ffffff">
  120.             <td background="themes/Slash/images/wl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  121.             <td width="100%"><table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td>
  122.             
  123.             <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>
  124.             
  125.             <?php echo "$thetext"; ?>
  126.                  </td></tr></table></td>
  127.                  <td background="themes/Slash/images/wr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  128.         </tr>
  129.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  130.         </table><table border="0" cellpadding="0" cellspacing="0">
  131.         <tr bgcolor="#ffffff">
  132.             <td background="themes/Slash/images/wl_cccccc.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  133.             <td width="100%">
  134.             <table width="100%" border="0" cellpadding="5" cellspacing="0"> 
  135.             <tr><td bgcolor="#cccccc"><font class="content"><?php echo"$morelink"; ?></font></td></tr></table>
  136.             </td>
  137.             <td background="themes/Slash/images/wr_cccccc.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  138.         </tr>
  139.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  140.         </table><BR><BR>
  141. <?php    } else {
  142.         if($informant != "") $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
  143.         else $boxstuff = "$anonymous ";
  144.         $boxstuff .= "writes <i>\"$thetext\"</i> $notes";
  145. ?>        <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DDDDDD"><tr valign="top" bgcolor="#660000">
  146.             <td><img src="themes/Slash/images/cl.gif" width="7" height="10" alt=""><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""></td>
  147.             <td width="100%"><table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td>
  148.             <font class="option" color="#FFFFFF"><B><?php echo"$title"; ?></B></font>
  149.             </td></tr></table></td>
  150.                      <td align="right"><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""><img src="themes/Slash/images/cr.gif" width="7" height="10" alt=""></td>
  151.              </tr></table>
  152.         <table border="0" cellpadding="0" cellspacing="0"><tr bgcolor="#e6e6e6">
  153.             <td background="themes/Slash/images/gl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  154.             <td width="100%">
  155.                 <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr>
  156.                 <td><font class="tiny">Posted by <?php formatAidHeader($aid) ?> on <?php echo"$datetime $timezone"; ?> (<?php echo $counter; ?> reads)</font></td>
  157.                 </tr></table>
  158.             </td>
  159.             <td background="themes/Slash/images/gr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  160.         </tr>
  161.         <tr bgcolor="#006666"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  162.         <tr bgcolor="#ffffff">
  163.             <td background="themes/Slash/images/wl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  164.             <td width="100%"><table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td>
  165.             <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>
  166.             <?php echo "$boxstuff"; ?>
  167.                  </td></tr></table></td>
  168.                  <td background="themes/Slash/images/wr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  169.         </tr>
  170.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  171.         </table><table border="0" cellpadding="0" cellspacing="0">
  172.         <tr bgcolor="#ffffff">
  173.             <td background="themes/Slash/images/wl_cccccc.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  174.             <td width="100%">
  175.             <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td bgcolor="#cccccc"><font class="content"><?php echo"$morelink"; ?></font></td></tr></table>
  176.             </td>
  177.             <td background="themes/Slash/images/wr_cccccc.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  178.         </tr>
  179.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  180.         </table><BR><BR>
  181. <?php    }
  182. }
  183.  
  184. function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
  185.     global $admin, $sid, $tipath;
  186.     if ("$aid" == "$informant") { ?>
  187.         <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DDDDDD"><tr valign="top" bgcolor="#660000">
  188.             <td><img src="themes/Slash/images/cl.gif" width="7" height="10" alt=""><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""></td>
  189.             <td width="100%">
  190.             <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td>
  191.             <font class="option" color="#FFFFFF"><B><?php echo"$title"; ?></B></font>
  192.             </td></tr></table>
  193.             </td><td align="right"><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""><img src="themes/Slash/images/cr.gif" width="7" height="10" alt=""></td>
  194.              </tr></table>
  195.         <table border="0" cellpadding="0" cellspacing="0"><tr bgcolor="#e6e6e6">
  196.             <td background="themes/Slash/images/gl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  197.             <td width="100%">
  198.                 <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr>
  199.                 <td><font class="tiny">Posted by <?php formatAidHeader($aid) ?> on <?php echo"$datetime $timezone"; ?></font>
  200.  
  201. <?php
  202. if ($admin) {
  203.     echo "   $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Edit</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Delete</a> ]";
  204. }
  205. ?>
  206.                 </td>
  207.                 </tr></table>
  208.             </td>
  209.             <td background="themes/Slash/images/gr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  210.         </tr>
  211.         <tr bgcolor="#006666"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  212.         <tr bgcolor="#ffffff">
  213.             <td background="themes/Slash/images/wl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  214.             <td width="100%"><table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td>
  215.         <?php 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>"; ?>
  216.             <?php echo "$thetext"; ?>
  217.                  </td></tr></table></td>
  218.                  <td background="themes/Slash/images/wr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  219.         </tr>
  220.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  221.         </table>
  222. <?php    } else {
  223.         if($informant != "") $boxstuff = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
  224.         else $boxstuff = "$anonymous ";
  225.         $boxstuff .= "writes <i>\"$thetext\"</i> $notes";
  226. ?>        <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#DDDDDD"><tr valign="top" bgcolor="#660000">
  227.             <td><img src="themes/Slash/images/cl.gif" width="7" height="10" alt=""><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""></td>
  228.             <td width="100%">
  229.             <table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td>
  230.             <font class="option" color="#FFFFFF"><B><?php echo"$title"; ?></B></font>
  231.             </td></tr></table>
  232.             </td><td align="right"><img src="themes/Slash/images/pix.gif" width="4" height="4" alt=""><img src="themes/Slash/images/cr.gif" width="7" height="10" alt=""></td>
  233.              </tr></table>
  234.         <table border="0" cellpadding="0" cellspacing="0"><tr bgcolor="#e6e6e6">
  235.             <td background="themes/Slash/images/gl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  236.             <td width="100%">
  237.                 <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr>
  238.                 <td><font class="tiny">Posted by <?php formatAidHeader($aid) ?> on <?php echo"$datetime $timezone"; ?></font>
  239.                 
  240. <?php
  241. if ($admin) {
  242.     echo "   $font2 [ <a href=admin.php?op=EditStory&sid=$sid>Editar</a> | <a href=admin.php?op=RemoveStory&sid=$sid>Borrar</a> ]";
  243. }
  244. ?>
  245. <br><?php echo "$font1"; ?>
  246. <?php echo "Contributed by <a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a>"; ?>
  247.                 </td>
  248.                 </tr></table>
  249.             </td>
  250.             <td background="themes/Slash/images/gr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  251.         </tr>
  252.         <tr bgcolor="#006666"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  253.         <tr bgcolor="#ffffff">
  254.             <td background="themes/Slash/images/wl.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  255.             <td width="100%"><table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td>
  256.         <?php 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>"; ?>
  257.             <?php echo "$thetext"; ?>
  258.                  </td></tr></table></td>
  259.                  <td background="themes/Slash/images/wr.gif"><img src="themes/Slash/images/pix.gif" width="11" height="11" alt=""></td>
  260.         </tr>
  261.         <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  262.         </table>
  263. <?php    }
  264. }
  265.  
  266. function themesidebox($title, $content) { 
  267. ?>    
  268.     <table width="150" border="0" cellpadding="0" cellspacing="0">
  269.     <tr valign="top" bgcolor="#660000">
  270.         <td bgcolor="#dddddd"><img src="themes/Slash/images/pix.gif" width="3" height="3" alt=""></td>
  271.         <td><img src="themes/Slash/images/cl.gif" width="7" height="10" alt=""></td>
  272.         <td><font class="tiny" color="#ffffff"><B><?php echo"$title"; ?></B></font></td>
  273.         <td align="right"><img src="themes/Slash/images/cr.gif" width="7" height="10" alt=""></td>
  274.         <td bgcolor="#dddddd" align="right"><img src="themes/Slash/images/pix.gif" width="3" height="3" alt=""></td>
  275.     </tr>
  276.     </table>
  277.     <table width="100%" border="0" cellpadding="0" cellspacing="0">
  278.     <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  279.     <tr bgcolor="#ffffff">
  280.         <td background="themes/Slash/images/sl.gif"><img src="themes/Slash/images/pix.gif" width="3" height="3" alt=""></td>
  281.         <td width="100%">
  282.         <table width="100%" border="0" cellpadding="5" cellspacing="0"><tr><td><?php echo"$font2"; ?><?php echo"$content"; ?>
  283.         </td></tr></table></td>
  284.         <td background="themes/Slash/images/sr.gif" align="right"><img src="themes/Slash/images/pix.gif" width="3" height="3" alt=""></td>
  285.     </tr>
  286.     <tr bgcolor="#660000"><td colspan="3"><img src="themes/Slash/images/pix.gif" width="1" height="1"></td></tr>
  287.     </table><br><br>
  288. <?php
  289. }
  290.  
  291. ?>
  292.