[ Index ]
 

Code source de PHP NUKE 7.9

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

title

Body

[fermer]

/includes/ -> functions_nuke.php (source)

   1  <?php
   2  /***************************************************************************
   3   *                            functions_nuke.php
   4   *                            -------------------
   5   *   begin                : Saturday, Feb 13, 2001
   6   *   copyright            : (C) 2002 Tom Nitzschner
   7   *   email                : tom@toms-home.com
   8   *
   9   ***************************************************************************/
  10  
  11  /***************************************************************************
  12  * phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
  13  *
  14  * Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
  15  * and debugging completed by the Elite Nukers and site members.
  16  *
  17  * You run this package at your sole risk. Nuke Cops and affiliates cannot
  18  * be held liable if anything goes wrong. You are advised to test this
  19  * package on a development system. Backup everything before implementing
  20  * in a production environment. If something goes wrong, you can always
  21  * backout and restore your backups.
  22  *
  23  * Installing and running this also means you agree to the terms of the AUP
  24  * found at Nuke Cops.
  25  *
  26  * This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
  27  * on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
  28  * on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
  29  * now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
  30  * invalid_session error message.
  31  ***************************************************************************/
  32  
  33  /***************************************************************************
  34   *   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
  35   *   by Tom Nitzschner (tom@toms-home.com)
  36   *   http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
  37   *
  38   *   As always, make a backup before messing with anything. All code
  39   *   release by me is considered sample code only. It may be fully
  40   *   functual, but you use it at your own risk, if you break it,
  41   *   you get to fix it too. No waranty is given or implied.
  42   *
  43   *   Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
  44   *   then on my site. All original header code and copyright messages will be maintained
  45   *   to give credit where credit is due. If you modify this, the only requirement is
  46   *   that you also maintain all original copyright messages. All my work is released
  47   *   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
  48   *
  49   ***************************************************************************/
  50  
  51  /***************************************************************************
  52   *
  53   *   This program is free software; you can redistribute it and/or modify
  54   *   it under the terms of the GNU General Public License as published by
  55   *   the Free Software Foundation; either version 2 of the License, or
  56   *   (at your option) any later version.
  57   *
  58   *
  59   ***************************************************************************/
  60  
  61  if (!defined('IN_PHPBB')) {
  62      die();
  63  }
  64   
  65  function nuke_sql($query)
  66  {
  67  //echo "before = $query<br>";
  68          $nuke_sql = str_replace(" username", " username", $query);
  69          if (ereg ('privmsgs_text', $nuke_sql)){
  70              $nuke_sql = str_replace("uname_", "username_", $query);
  71          }
  72          $nuke_sql = str_replace("u.username", "u.username", $nuke_sql);
  73          $nuke_sql = str_replace("u2.username", "u2.username", $nuke_sql);
  74          $nuke_sql = str_replace("user_password", "user_password", $nuke_sql);
  75          $nuke_sql = str_replace("user_website", "user_website", $nuke_sql);
  76          if ((stristr($nuke_sql, "user_email,")) || (stristr($nuke_sql, "user_email "))){
  77              $nuke_sql = str_replace("user_email", "user_email", $nuke_sql);
  78          }
  79          $nuke_sql = str_replace("user_interests", "user_intrest", $nuke_sql);
  80          if (stristr($nuke_sql,"topics_watch") || (stristr($nuke_sql,"user_group"))){
  81          } else {
  82              $nuke_sql = str_replace(" user_id", " user_id", $nuke_sql);
  83          }
  84          $nuke_sql = str_replace("uid_", "user_id_", $nuke_sql);
  85          $nuke_sql = str_replace("\(user_id", "\(user_id", $nuke_sql);
  86          $nuke_sql = str_replace("u.user_id", "u.user_id", $nuke_sql);
  87          $nuke_sql = str_replace("u2.user_id", "u2.user_id", $nuke_sql);
  88  //echo "after  = $nuke_sql<br><br>";
  89  
  90      return $nuke_sql;
  91  }
  92  
  93  ?>


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