* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: checkdb.php,v 1.2 2004-10-02 15:28:11 x2000habouzit Exp $
+ $Id: checkdb.php,v 1.3 2004-10-02 15:34:53 x2000habouzit Exp $
***************************************************************************/
/*
* verifie qu'il n'y a pas d'incoherences dans les tables de jointures
*
- * $Id: checkdb.php,v 1.2 2004-10-02 15:28:11 x2000habouzit Exp $
+ * $Id: checkdb.php,v 1.3 2004-10-02 15:34:53 x2000habouzit Exp $
*/
-ini_set("include_path","/usr/share/php");
-
-require("../../include/xorg.misc.inc.php");
-require("../../include/config.xorg.inc.php");
-mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd);
-mysql_select_db($globals->dbdb);
-
+require('./connect.db.inc.php');
require("Console/Getopt.php");
function check($sql, $commentaire='') {
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: clean.php,v 1.2 2004-10-02 15:28:11 x2000habouzit Exp $
+ $Id: clean.php,v 1.3 2004-10-02 15:34:53 x2000habouzit Exp $
***************************************************************************/
-require("../../include/xorg.misc.inc.php");
-require("../../include/config.xorg.inc.php");
-mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd);
-mysql_select_db($globals->dbdb);
+
+require('./connect.db.inc.php');
function query ($sql) {
mysql_query($sql);
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 Polytechnique.org *
+ * http://opensource.polytechnique.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., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************
+ $Id: connect.db.inc.php,v 1.1 2004-10-02 15:34:53 x2000habouzit Exp $
+ ***************************************************************************/
+
+ini_set("include_path","/usr/share/php:../../include");
+require("../../include/xorg.misc.inc.php");
+require("../../include/config.xorg.inc.php");
+mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd);
+mysql_select_db($globals->dbdb);
+?>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: cron_validations.php,v 1.1 2004-10-02 15:28:11 x2000habouzit Exp $
+ $Id: cron_validations.php,v 1.2 2004-10-02 15:34:53 x2000habouzit Exp $
***************************************************************************/
/* vim: set sw=4 ts=4 sts=4 tw=100:
* vérifie qu'il n'y a pas de validations en cours, et maile si c'est le cas
*
- * $Id: cron_validations.php,v 1.1 2004-10-02 15:28:11 x2000habouzit Exp $
+ * $Id: cron_validations.php,v 1.2 2004-10-02 15:34:53 x2000habouzit Exp $
*/
$M_PERIOD = "INTERVAL 3 HOUR"; // période d'envoi des mails de 3h
$R_PERIOD = "INTERVAL 6 HOUR"; // période de réponse moyenne de 6h
-ini_set("include_path","/usr/share/php");
-require("../../include/xorg.misc.inc.php");
-require("../../include/config.xorg.inc.php");
require("../../../diogenes/lib/diogenes.mailer.inc.php");
-
-mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd);
-mysql_select_db($globals->dbdb);
+require('./connect.db.inc.php');
$sql = mysql_query("SELECT count(stamp), sum(stamp < NOW() - $M_PERIOD), sum(stamp < NOW() - $R_PERIOD) FROM x4dat.requests");
list($nb,$nbold,$nbveryold) = mysql_fetch_row($sql);
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: recherche.php,v 1.3 2004-10-02 15:02:06 x2000habouzit Exp $
+ $Id: recherche.php,v 1.4 2004-10-02 15:34:53 x2000habouzit Exp $
***************************************************************************/
-require("../../include/xorg.misc.inc.php");
-require("../../include/config.xorg.inc.php");
-
-mysql_connect($globals->dbhost,$globals->dbuser,$globals->dbpwd);
-mysql_select_db($globals->dbdb);
+require('./connect.db.inc.php');
$result = mysql_query("SELECT matricule,nom1,nom2,nom3,prenom1,prenom2,promo FROM recherche");