db.inc.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 #
00003 #  DaCMS Content Management System
00004 #  Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
00005 #
00006 #  This program is free software; you can redistribute it and/or
00007 #  modify it under the terms of the GNU General Public License
00008 #  as published by the Free Software Foundation; either version 2
00009 #  of the License, or (at your option) any later version.
00010 #
00011 #  This program is distributed in the hope that it will be useful,
00012 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 #  GNU General Public License for more details.
00015 #
00016 #  You should have received a copy of the GNU General Public License
00017 #  along with this program; if not, write to the Free Software
00018 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 #
00020 
00021 
00022 // Namen der Datenbanktabellen in Variablen schreiben
00023 //
00024 require( 'serviceClasses/Sql.class.php');
00025 
00026 function table_names( $dbid )
00027 {
00028      $t = array();
00029      global $conf;
00030      global $SESS;
00031 
00032      if   ( empty($dbid) )
00033      {
00034           $db = Session::getDatabase();
00035           if   ( is_object( $db ) )
00036                $conf_db_prefix = $db->conf['prefix'];
00037           else
00038                $conf_db_prefix = '';
00039      }
00040      else
00041      {
00042           $conf_db_prefix = $conf['database'][$dbid]['prefix'];
00043      }
00044 
00045      $t['t_include']         = $conf_db_prefix.'include';
00046      $t['t_element']         = $conf_db_prefix.'element';
00047      $t['t_template']        = $conf_db_prefix.'template';
00048      $t['t_templatemodel']   = $conf_db_prefix.'templatemodel';
00049      $t['t_projectmodel']    = $conf_db_prefix.'projectmodel';
00050      $t['t_model']           = $conf_db_prefix.'projectmodel';
00051      $t['t_page']            = $conf_db_prefix.'page';
00052      $t['t_language']        = $conf_db_prefix.'language';
00053      $t['t_value']           = $conf_db_prefix.'value';
00054      $t['t_user']            = $conf_db_prefix.'user';
00055      $t['t_usergroup']       = $conf_db_prefix.'usergroup';
00056      $t['t_project']         = $conf_db_prefix.'project';
00057      $t['t_group']           = $conf_db_prefix.'group';
00058      $t['t_folder']          = $conf_db_prefix.'folder';
00059      $t['t_file']            = $conf_db_prefix.'file';
00060      $t['t_acl']             = $conf_db_prefix.'acl';
00061      $t['t_object']          = $conf_db_prefix.'object';
00062      $t['t_name']            = $conf_db_prefix.'name';
00063      $t['t_link']            = $conf_db_prefix.'link';
00064      
00065      return $t;
00066 }
00067 
00068 
00069 
00070 function db_connection()
00071 {
00072 
00073      return Session::getDatabase();
00074 }
00075 
00076 //extract( table_names() );
00077 
00078 
00079 
00080  
00081 ?>

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8