[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/themes/Milo/ -> theme.php (source)

   1  <?php
   2  
   3  /************************************************************/
   4  /* Ported Theme Name: Milo (v1.0)                           */
   5  /* Original Theme Name: FungKu (v1.0)                       */
   6  /* Copyright (c) 2001 Somara Sem (http://www.somara.com)    */
   7  /* Last Updated: 09/21/2001 by dezina.com                   */
   8  /************************************************************/
   9  
  10  
  11  /************************************************************/
  12  /* Theme Colors Definition                                  */
  13  /*                                                          */
  14  /* Define colors for your web site. $bgcolor2 is generaly   */
  15  /* used for the tables border as you can see on OpenTable() */
  16  /* function, $bgcolor1 is for the table background and the  */
  17  /* other two bgcolor variables follows the same criteria.   */
  18  /* $texcolor1 and 2 are for tables internal texts           */
  19  /************************************************************/
  20  
  21  $bgcolor1 = "#efefef";
  22  $bgcolor2 = "#808080";
  23  $bgcolor3 = "#efefef";
  24  $bgcolor4 = "#808080";
  25  $textcolor1 = "#000000";
  26  $textcolor2 = "#000000";
  27  
  28  /************************************************************/
  29  /* OpenTable Functions                                      */
  30  /*                                                          */
  31  /* Define the tables look&feel for you whole site. For this */
  32  /* we have two options: OpenTable and OpenTable2 functions. */
  33  /* Then we have CloseTable and CloseTable2 function to      */
  34  /* properly close our tables. The difference is that        */
  35  /* OpenTable has a 100% width and OpenTable2 has a width    */
  36  /* according with the table content                         */
  37  /************************************************************/
  38  
  39  function OpenTable() {
  40      global $bgcolor1, $bgcolor2;
  41      echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\"><tr><td>\n";
  42      echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
  43  }
  44  
  45  function CloseTable() {
  46      echo "</td></tr></table></td></tr></table>\n";
  47  }
  48  
  49  function OpenTable2() {
  50      global $bgcolor1, $bgcolor2;
  51      echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" bgcolor=\"$bgcolor2\" align=\"center\"><tr><td>\n";
  52      echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"8\" bgcolor=\"$bgcolor1\"><tr><td>\n";
  53  }
  54  
  55  function CloseTable2() {
  56      echo "</td></tr></table></td></tr></table>\n";
  57  }
  58  
  59  /************************************************************/
  60  /* FormatStory                                              */
  61  /*                                                          */
  62  /* Here we'll format the look of the stories in our site.   */
  63  /* If you dig a little on the function you will notice that */
  64  /* we set different stuff for anonymous, admin and users    */
  65  /* when displaying the story.                               */
  66  /************************************************************/
  67  
  68  function FormatStory($thetext, $notes, $aid, $informant) {
  69      global $anonymous;
  70      if (!empty($notes)) {
  71      $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
  72      } else {
  73      $notes = "";
  74      }
  75      if ("$aid" == "$informant") {
  76      echo "<font class=\"content\" color=\"#505050\">$thetext$notes</font>\n";
  77      } else {
  78      if(!empty($informant)) {
  79          $boxstuff = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
  80      } else {
  81          $boxstuff = "$anonymous ";
  82      }
  83      $boxstuff .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
  84      echo "<font class=\"content\" color=\"#505050\">$boxstuff</font>\n";
  85      }
  86  }
  87  
  88  /************************************************************/
  89  /* Function themeheader()                                   */
  90  /*                                                          */
  91  /* Control the header for your site. You need to define the */
  92  /* BODY tag and in some part of the code call the blocks    */
  93  /* function for left side with: blocks(left);               */
  94  /************************************************************/
  95  
  96  function themeheader() {
  97      global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $anonymous;
  98      cookiedecode($user);
  99      $username = $cookie[1];
 100      if (empty($username)) {
 101          $username = $anonymous;
 102      }
 103      echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
 104      ."<br>\n";
 105      ads(0);
 106      echo "<br>\n"
 107      ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
 108      ."<tr>\n"
 109      ."<td bgcolor=\"#ffffff\" width=\"306\">\n"
 110      ."<a href=\"index.php\"><img src=\"themes/Milo/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\"></a></td>\n"
 111      ."</tr>\n"
 112      ."</table><br>\n"
 113      ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
 114      ."<tr>\n"
 115      ."<td bgcolor=\"#808080\">\n"
 116      ."<img src=\"themes/Milo/images/tophighlight.gif\"></td>\n"
 117      ."</tr>\n"
 118      ."</table>\n"
 119      ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
 120      ."<tr valign=\"middle\">\n"
 121      ."<td width=\"400\" bgcolor=\"#C0C0C0\" align=\"left\">\n"
 122      ."&nbsp;</td>\n"
 123      ."<td bgcolor=\"#C0C0C0\" align=\"center\">\n"
 124      ."<form action=\"modules.php?name=Search\" method=\"post\"><font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>\n"
 125      ."<input type=\"text\" name=\"query\" size=\"14\"></font></form></td>\n"
 126      ."<td bgcolor=\"#C0C0C0\" align=\"center\">\n"
 127      ."<form action=\"modules.php?name=Search\" method=\"get\"><font class=\"content\"><b>"._TOPICS." </b>\n";
 128      $toplist = $db->sql_query("select topicid, topictext from $prefix"._topics." order by topictext");
 129      echo "<select name=\"topic\"onChange='submit()'>\n"
 130      ."<option value=\"\">"._ALLTOPICS."</option>\n";
 131      while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
 132      $topicid = intval($topicid);
 133      if ($topicid==$topic) { $sel = "selected "; }
 134      echo "<option $sel value=\"$topicid\">$topics</option>\n";
 135      $sel = "";
 136      }
 137      echo "</select></font></form></td>\n"
 138      ."</tr></table>\n"
 139      ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
 140      ."<tr>\n"
 141      ."<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/Milo/images/pixel.gif\" width=\"1\" height=1 alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
 142      ."</tr>\n"
 143      ."<tr valign=\"middle\" bgcolor=\"#808080\">\n"
 144      ."<td width=\"15%\" nowrap><font class=\"content\" color=\"#363636\">\n";
 145      if ($username == "Anonymous") {
 146  echo "&nbsp;&nbsp;<font color=\"#363636\"><a href=\"modules.php?name=Your_Account\">Create</a></font> an account\n";
 147      } else {
 148      echo "&nbsp;&nbsp;"._HELLO." $username! &nbsp;&nbsp;[ <a href=\"modules.php?name=Your_Account&amp;op=logout\">Logout</a> ]";
 149      }
 150      echo "</font></td>\n"
 151      ."<td align=\"center\" height=\"20\" width=\"60%\"><font class=\"content\">\n"
 152          ."&nbsp;\n"
 153          ."</td>\n"
 154          ."<td align=\"right\" width=\"25%\"><font class=\"content\">\n"
 155          ."<script type=\"text/javascript\">\n\n"
 156          ."<!--   // Array ofmonth Names\n"
 157          ."var monthNames = new Array( \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n"
 158          ."var now = new Date();\n"
 159          ."thisYear = now.getYear();\n"
 160          ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
 161          ."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
 162          ."// -->\n\n"
 163          ."</script></font></td>\n"
 164          ."<td>&nbsp;</td>\n"
 165          ."</tr>\n"
 166          ."<tr>\n"
 167          ."<td bgcolor=\"#000000\" colspan=\"4\"><IMG src=\"themes/Milo/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
 168          ."</tr>\n"
 169          ."</table>\n"
 170      ."<!-- FIN DEL TITULO -->\n"
 171      ."<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\">\n"
 172      ."<tr valign=\"top\">\n"
 173      ."<td bgcolor=\"#C0C0C0\"><img src=\"themes/Milo/images/pixel.gif\" width=\"1\" height=\"3\" border=\"0\" alt=\"\"></td>\n"
 174      ."</tr>\n"
 175      ."<tr valign=\"top\">\n"
 176      ."<td bgcolor=\"#ffffff\"><img src=\"themes/Milo/images/pixel.gif\" width=\"1\" height=\"5\" border=\"0\" alt=\"\"></td>\n"
 177      ."</tr>\n"
 178      ."</table>\n"
 179  ;
 180      $public_msg = public_message();
 181          echo "$public_msg<br>";
 182      echo "<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\"><tr valign=\"top\">\n"
 183      ."<td bgcolor=\"#eeeeee\" width=\"150\" valign=\"top\">\n";
 184      blocks("left");
 185      echo "</td><td><img src=\"themes/Milo/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\">\n";
 186  }
 187  
 188  /************************************************************/
 189  /* Function themefooter()                                   */
 190  /*                                                          */
 191  /* Control the footer for your site. You don't need to      */
 192  /* close BODY and HTML tags at the end. In some part call   */
 193  /* the function for right blocks with: blocks(right);       */
 194  /* Also, $index variable need to be global and is used to   */
 195  /* determine if the page your're viewing is the Homepage or */
 196  /* and internal one.                                        */
 197  /************************************************************/
 198  
 199  function themefooter() {
 200      if (defined('INDEX_FILE')) {
 201      echo "</td><td><img src=\"themes/Milo/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td valign=\"top\" width=\"150\" bgcolor=\"#eeeeee\">\n";
 202      blocks("right");
 203      }
 204      echo "</td>\n"
 205      ."</tr></table>\n"
 206          ."<table bgcolor=\"#000000\" width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
 207          ."<tr>\n"
 208          ."<td width=\"750\" height=\"5\"><img src=\"themes/Milo/images/bottombar.gif\" width=\"750\" height=\"5\" border=\"0\" alt=\"\"></td>\n"
 209          ."</tr>\n"
 210          ."<tr>\n"
 211          ."<td width=\"100%\"><img src=\"themes/Milo/images/pixel.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n"
 212          ."</tr>\n"
 213          ."</table>\n"
 214          ."<br>\n"
 215          ."<br>\n"
 216          ."<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
 217          ."<tr align=\"center\">\n"
 218          ."<td width=\"100%\" colspan=\"3\">\n";
 219      footmsg();
 220      echo "</td>\n"
 221          ."</tr>\n"
 222          ."</table>\n";
 223  }
 224  
 225  /************************************************************/
 226  /* Function themeindex()                                    */
 227  /*                                                          */
 228  /* This function format the stories on the Homepage         */
 229  /************************************************************/
 230  
 231  function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
 232      global $anonymous, $tipath;
 233      $ThemeSel = get_theme();
 234      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 235      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 236      } else {
 237      $t_image = "$tipath$topicimage";
 238      }
 239      echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"420\"><tr><td>\n"
 240      ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\"><tr><td>\n"
 241      ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#C0C0C0\" width=\"100%\"><tr><td align=\"left\">\n"
 242      ."<font class=\"option\" color=\"#363636\"><b>$title</b></font>\n"
 243      ."</td></tr></table></td></tr></table>\n"
 244      ."<font color=\"#999999\"><b><a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a></B></font>\n";
 245      FormatStory($thetext, $notes, $aid, $informant);
 246      echo "</td></tr></table><br>\n"
 247      ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#eeeeee\" width=\"100%\"><tr><td>\n"
 248      ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\"><tr><td align=\"center\">\n"
 249      ."<font color=\"#999999\" size=\"1\">"._POSTEDBY." ";
 250      formatAidHeader($aid);
 251      echo " "._ON." $time $timezone ($counter "._READS.")<br></font>\n"
 252      ."<font class=\"content\">$morelink</font>\n"
 253      ."</td></tr></table></td></tr></table>\n"
 254      ."<br>\n\n\n";
 255  }
 256  
 257  /************************************************************/
 258  /* Function themeindex()                                    */
 259  /*                                                          */
 260  /* This function format the stories on the story page, when */
 261  /* you click on that "Read More..." link in the home        */
 262  /************************************************************/
 263  
 264  function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
 265      global $admin, $sid, $tipath;
 266      $ThemeSel = get_theme();
 267      if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
 268      $t_image = "themes/$ThemeSel/images/topics/$topicimage";
 269      } else {
 270      $t_image = "$tipath$topicimage";
 271      }
 272      echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" width=\"100%\"><tr><td>\n"
 273          ."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\"><tr><td>\n"
 274          ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#808080\" width=\"100%\"><tr><td align=\"left\">\n"
 275          ."<font class=\"option\" color=\"#363636\"><b>$title</b></font><br>\n"
 276          ."<font class=\"content\">"._POSTEDON." $datetime "._BY." ";
 277      formatAidHeader($aid);
 278      echo "</td></tr></table></td></tr></table><br>";
 279      echo "<a href=\"modules.php?name=News&amp;new_topic=$topic\"><img src=\"$t_image\" border=\"0\" Alt=\"$topictext\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n";
 280      FormatStory($thetext, $notes="", $aid, $informant);
 281      echo "</td></tr></table><br>\n\n\n";
 282  }
 283  
 284  /************************************************************/
 285  /* Function themesidebox()                                  */
 286  /*                                                          */
 287  /* Control look of your blocks. Just simple.                */
 288  /************************************************************/
 289  
 290  function themesidebox($title, $content) {
 291      echo "<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"150\"><tr><td>\n"
 292      ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#C0C0C0\" width=\"100%\"><tr><td align=left>\n"
 293      ."<font class=\"content\" color=\"#363636\"><b>$title</b></font>\n"
 294      ."</td></tr></table></td></tr></table>\n"
 295      ."<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"150\">\n"
 296      ."<tr valign=\"top\"><td>\n"
 297      ."$content\n"
 298      ."</td></tr></table>\n"
 299      ."<br>\n\n\n";
 300  }
 301  
 302  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7