[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

/blocks/ -> block-Big_Story_of_Today.php (source)

   1  <?php
   2  
   3  /************************************************************************/

   4  /* PHP-NUKE: Web Portal System                                          */

   5  /* ===========================                                          */

   6  /*                                                                      */

   7  /* Copyright (c) 2005 by Francisco Burzi                                */

   8  /* http://phpnuke.org                                                   */

   9  /*                                                                      */

  10  /* This program is free software. You can redistribute it and/or modify */

  11  /* it under the terms of the GNU General Public License as published by */

  12  /* the Free Software Foundation; either version 2 of the License.       */

  13  /************************************************************************/

  14  
  15  if ( !defined('BLOCK_FILE') ) {
  16      Header("Location: ../index.php");
  17      die();
  18  }
  19  
  20  global $cookie, $prefix, $multilingual, $currentlang, $db, $user, $userinfo;
  21  
  22  if ($multilingual == 1) {
  23      $querylang = "AND (alanguage='$currentlang' OR alanguage='')"; /* the OR is needed to display stories who are posted to ALL languages */
  24  } else {
  25      $querylang = "";
  26  }
  27  
  28  $today = getdate();
  29  $day = $today['mday'];
  30  if ($day < 10) {
  31      $day = "0$day";
  32  }
  33  $month = $today['mon'];
  34  if ($month < 10) {
  35      $month = "0$month";
  36  }
  37  $year = $today['year'];
  38  $tdate = "$year-$month-$day";
  39  $row = $db->sql_fetchrow($db->sql_query("SELECT sid, title FROM ".$prefix."_stories WHERE (time LIKE '%$tdate%') $querylang ORDER BY counter DESC LIMIT 0,1"));
  40  $fsid = intval($row['sid']);
  41  $ftitle = filter($row['title'], "nohtml");
  42  $content = "<span class=\"content\">";
  43  if ((!$fsid) AND (!$ftitle)) {
  44      $content .= ""._NOBIGSTORY."</font>";
  45  } else {
  46      $content .= ""._BIGSTORY."<br><br>";
  47      getusrinfo($user);
  48            if (!isset($mode) OR empty($mode)) {
  49              if(isset($userinfo['umode'])) {
  50                $mode = $userinfo['umode'];
  51              } else {
  52                $mode = "thread";
  53              }
  54            }
  55            if (!isset($order) OR empty($order)) {
  56              if(isset($userinfo['uorder'])) {
  57                $order = $userinfo['uorder'];
  58              } else {
  59                $order = 0;
  60              }
  61            }
  62            if (!isset($thold) OR empty($thold)) {
  63              if(isset($userinfo['thold'])) {
  64                $thold = $userinfo['thold'];
  65              } else {
  66                $thold = 0;
  67              }
  68            }
  69      $r_options = "";
  70      $r_options .= "&amp;mode=".$mode;
  71      $r_options .= "&amp;order=".$order;
  72      $r_options .= "&amp;thold=".$thold;
  73  
  74      $content .= "<a href=\"modules.php?name=News&amp;file=article&amp;sid=$fsid$r_options\">$ftitle</a></span>";
  75  }
  76  
  77  ?>


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