branched
[mailer.git] / 0.2.1 / inc / libs / mediadata_functions.php
diff --git a/0.2.1/inc/libs/mediadata_functions.php b/0.2.1/inc/libs/mediadata_functions.php
deleted file mode 100644 (file)
index 9257c29..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 10/08/2005 *
- * ===============                              Last change: 10/08/2005 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : mediadata_functions.php                          *
- * -------------------------------------------------------------------- *
- * Short description : Functions for the mediadata extension            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Funktionen fuer die verbesserten Mediendaten     *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
-//
-function MEDIA_UPDATE_ENTRY($keys_array, $mode, $value)
-{
-       if (is_array($keys_array) && ($value > 0))
-       {
-               // Is an array so we can run it through
-               foreach ($keys_array as $key)
-               {
-                       // First check if it does exist
-                       $result_media = SQL_QUERY_ESC("SELECT media_key FROM "._MYSQL_PREFIX."_mediadata
-WHERE media_key = '%s' LIMIT 1", array($key), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result_media) == 0)
-                       {
-                               // Not found so we create it (mode will be ignored here!)
-                               $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mediadata (media_key, media_value)
-VALUES ('%s', '%s')", array($key, $value), __FILE__, __LINE__);
-                       }
-                        else
-                       {
-                               // Update entry
-                               switch ($mode)
-                               {
-                                       case "add": $mode = "+"; break;
-                                       case "sub": $mode = "-"; break;
-                               }
-                               if ($mode == "init")
-                               {
-                                       // Initialize entry
-                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=%s WHERE media_key='%s' LIMIT 1",
-                                        array($value, $key), __FILE__, __LINE__);
-                               }
-                                else
-                               {
-                                       // Update entry
-                                       $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_mediadata SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
-                                        array($value, $key), __FILE__, __LINE__);
-                               }
-                       }
-               }
-       }
-}
-//
-function MEDIA_GET_ENTRY($key)
-{
-       // Return nothing by default
-       $value = "";
-
-       // Check for entry
-       $result = SQL_QUERY_ESC("SELECT media_value FROM "._MYSQL_PREFIX."_mediadata WHERE media_key='%s' LIMIT 1",
-        array($key), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
-               // Load data
-               list($value) = SQL_FETCHROW($result);
-       }
-
-       // Return data
-       return $value;
-}
-//
-?>