[ PHPXref.com ] [ Generated: Sun Jul 20 18:53:27 2008 ] [ myPHPNuke 1.8.8_8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> mymsg2_functions.php (source)

   1  <?php
   2  
   3  if ( ! @include_once ( './mainfile.php' ) ) { exit( '!! INCLUDE ERROR. ACCESS DENIED !!' ); }
   4  error_reporting( _E_VALUE );
   5  
   6  
   7  /* vim: set expandtab tabstop=4 shiftwidth=4: */
   8  // +----------------------------------------------------------------------+
   9  // | myPHPNuke Version 188_8 RC2                                          |
  10  // +----------------------------------------------------------------------+
  11  // | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html              |
  12  // +----------------------------------------------------------------------+
  13  // | Support: http://myphpnuke.com/                                       |
  14  // +----------------------------------------------------------------------+
  15  // | Author: myPHPNuke Dev Team                                           |
  16  // +----------------------------------------------------------------------+
  17  // | Copyright:  2001-2004 myPHPNuke Dev Team                            |
  18  // +----------------------------------------------------------------------+
  19  // $Id: mymsg2_functions.php,v 1.3.2.2 2004/04/18 12:45:43 ajvwaay Exp $
  20  
  21  
  22  
  23  /************************************************************************/
  24  /*  myMessage II v1.2.1 (MPN Addon)                                     */
  25  /*  Kazumi Ono                                                          */
  26  /*  http://www.myweb.ne.jp                                              */
  27  /*                                                                      */
  28  /*                                                                      */
  29  /* This addon will let you add your own messages at the top of your     */
  30  /* home page and each category page. There is also a function to        */
  31  /* add your own message to each topic page, but this feature            */
  32  /* will not be used in MPN1.8.6. Only the admin can add/edit/delete     */
  33  /* messages.                                                            */
  34  /*                                                                      */
  35  /************************************************************************/
  36  
  37  function display_mymsg2(){
  38      global $admin, $phpEx, $mpnTables, $cat, $topic;
  39  
  40          if($cat>0){
  41              $query="SELECT title,text FROM ".$mpnTables['mymsg2']." WHERE catid='$cat' and topicid=0 and display=1";
  42          }elseif($topic>0){
  43              $query="SELECT title,text FROM ".$mpnTables['mymsg2']." WHERE catid=0 and topicid=$topic and display=1";
  44          }else{
  45              $query="SELECT title,text FROM ".$mpnTables['mymsg2']." WHERE catid=0 and topicid=0 and display=1 ORDER BY time DESC";
  46          }
  47  
  48      $result=mysql_query("$query");
  49      if(mysql_num_rows($result)>0){
  50          while(list($title,$text)=mysql_fetch_row($result)){
  51              $title = StripSlashes($title);
  52              $text = StripSlashes($text);
  53              if(isset($admin)){
  54                  $text .= "<br><br>[<a href=\"admin.$phpEx?fct=mymsg2\">".translate("Edit"). "</a>]";
  55              }
  56              themecenterposts($title, $text);
  57          }
  58      }
  59  }
  60  
  61  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]