[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

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

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


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