[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /***************************************************** 3 * This file is part of Agora, web based content management system. 4 * 5 * Agora is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; version 2 of the License. 8 * 9 * Agora is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details (file "COPYING"). 13 * 14 * Copyright © Arnaud Martin, Antoine Pitrou et Philippe Rivière. 15 * List of authors detailed in "copyright_fr.html" file. 16 * E-mail : agora@sig.premier-ministre.gouv.fr 17 * Web site : http://www.agora.gouv.fr 18 *****************************************************/ 19 if (defined("_DB_WRAPPERMYSQL")) 20 return; 21 22 define("_DB_WRAPPERMYSQL", "1"); 23 24 require_once("PEAR.php"); 25 require_once("DB.php"); 26 27 require_once dirname(__FILE__). "/../DBWrapper.php"; 28 29 class DBWrapper_mysql extends DBWrapper { 30 31 /* 32 function _queryFilter($query) { 33 34 //echo '<br><br><br>Debut du filtre '.$query; 35 36 if(ereg("<!spipDATE_COURANTEspip!>", $query)) { 37 $maDate = new Date(); 38 $query = ereg_replace("<!spipDATE_COURANTEspip!>", $maDate->getDate(), $query); 39 } 40 41 echo '<br><br><br>Fin du filtre '.$query; 42 43 return $query; 44 } 45 46 function query($query) { 47 $db = $this->_getDB(); 48 if (DB::isError($db)) { 49 return PEAR::raiseError("[".get_class($this)." DBWrapper : query] ".$db->getMessage()."", null, 50 null, null, null, null, false); 51 } 52 $query = $this->_queryFilter($query); 53 54 $this->_dbResult = $db->query($query); 55 $dbResult = $this->_dbResult; 56 57 if(DB::isError($this->_dbResult)) { 58 return PEAR::raiseError("[".get_class($this)." DBWrapper : query] ".$dbResult->getMessage()."", null, 59 null, null, null, null, false); 60 } 61 $this->_rowsBuilder(); 62 } 63 64 function limitQuery($query, $limitStart, $limitSize) { 65 $db = $this->_getDB(); 66 if (DB::isError($db)) { 67 return PEAR::raiseError("[".get_class($this)." DBWrapper : query] ".$db->getMessage()."", null, 68 null, null, null, null, false); 69 } 70 $query = $this->_queryFilter($query); 71 72 $this->_dbResult = $db->limitQuery($query, $limitStart, $limitSize); 73 $dbResult = $this->_dbResult; 74 75 if(DB::isError($this->_dbResult)) { 76 return PEAR::raiseError("[".get_class($this)." DBWrapper : query] ".$dbResult->getMessage()."", null, 77 null, null, null, null, false); 78 } 79 $this->_rowsBuilder(); 80 } 81 82 function _rowsBuilder() { 83 $dbResult = $this->_dbResult; 84 while($row = $dbResult->fetchRow()) { 85 $this->_rows[] = $row; 86 } 87 $this->_currentPointer = 0; 88 } 89 */ 90 } 91 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |