[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

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

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


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