* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: antispam.php,v 1.6 2004-08-31 10:03:28 x2000habouzit Exp $
+ $Id: antispam.php,v 1.7 2004-08-31 22:01:30 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
require("mtic.inc.php");
-if (isset($_REQUEST['filtre']) and isset($_REQUEST['statut_filtre'])
- and !$no_update_bd) {
+if (isset($_REQUEST['filtre']) and isset($_REQUEST['statut_filtre'])) {
// mise à jour du filtre
$result = $globals->db->query("select find_in_set('drop', flags) from emails where uid = {$_SESSION['uid']} and num = 0 and find_in_set('active', flags)");
list($filtre) = mysql_fetch_row($result);
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: routage-mail.php,v 1.3 2004-08-31 10:03:28 x2000habouzit Exp $
+ $Id: routage-mail.php,v 1.4 2004-08-31 22:01:30 x2000habouzit Exp $
***************************************************************************/
require("auto.prepend.inc.php");
$redirect = new Redirect();
-if (!$no_update_bd && isset($_REQUEST['emailop'])) {
+if (isset($_REQUEST['emailop'])) {
if ($_REQUEST['emailop']=="retirer" && isset($_REQUEST['num'])) {
$page->assign('retour', $redirect->delete_email($_REQUEST['num']));
}
foreach ($redirect->emails as $mail)
$emails[] = $mail;
$page->assign('emails',$emails);
-$page->assign('no_update_bd',$no_update_bd);
$page->run();
?>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: get_skill.inc.php,v 1.2 2004-08-31 19:48:46 x2000habouzit Exp $
+ $Id: get_skill.inc.php,v 1.3 2004-08-31 22:01:31 x2000habouzit Exp $
***************************************************************************/
}
}
-if(isset($_REQUEST['comppros_op']) && !$no_update_bd){
+if(isset($_REQUEST['comppros_op'])){
if($_REQUEST['comppros_op']=='retirer'){
$globals->db->query("delete from competences_ins where uid='{$_SESSION['uid']}' and cid='{$_REQUEST['comppros_id']}'");
} elseif($_REQUEST['comppros_op'] == 'ajouter') {
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: valid_aliases.inc.php,v 1.13 2004-08-31 11:16:48 x2000habouzit Exp $
+ $Id: valid_aliases.inc.php,v 1.14 2004-08-31 22:01:31 x2000habouzit Exp $
***************************************************************************/
class AliasReq extends Validate {
function formu() { return 'include/form.valid.aliases.tpl'; }
function handle_formu () {
- global $no_update_bd;
- if($no_update_bd) return false;
-
if(empty($_REQUEST['submit'])
|| ($_REQUEST['submit']!="Accepter" && $_REQUEST['submit']!="Refuser"))
return false;
}
function commit () {
- global $no_update_bd,$globals;
- if($no_update_bd) return false;
+ global $globals;
$domain=$this->alias.'@melix.net';
$globals->db->query("DELETE FROM groupex.aliases WHERE id=12 AND email='{$this->username}'");
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: valid_epouses.inc.php,v 1.12 2004-08-31 11:16:48 x2000habouzit Exp $
+ $Id: valid_epouses.inc.php,v 1.13 2004-08-31 22:01:31 x2000habouzit Exp $
***************************************************************************/
function formu() { return 'include/form.valid.epouses.tpl'; }
function handle_formu () {
- global $no_update_bd;
- if($no_update_bd) return false;
-
if(empty($_REQUEST['submit'])
|| ($_REQUEST['submit']!="Accepter" && $_REQUEST['submit']!="Refuser"))
return false;
}
function commit () {
- global $no_update_bd, $globals;
- if($no_update_bd) return false;
+ global $globals;
$alias = ($this->epouse ? $this->alias : "");
$globals->db->query("UPDATE auth_user_md5 set epouse='".$this->epouse."',alias='".$this->alias."' WHERE user_id=".$this->uid);
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: valid_photos.inc.php,v 1.10 2004-08-31 11:16:48 x2000habouzit Exp $
+ $Id: valid_photos.inc.php,v 1.11 2004-08-31 22:01:31 x2000habouzit Exp $
***************************************************************************/
function formu() { return 'include/form.valid.photos.tpl'; }
function handle_formu () {
- global $no_update_bd;
- if($no_update_bd) return false;
-
if(empty($_REQUEST['submit'])
|| ($_REQUEST['submit']!="Accepter" && $_REQUEST['submit']!="Refuser"))
return false;
}
function commit () {
- global $no_update_bd, $globals;
- if($no_update_bd) return false;
+ global $globals;
$globals->db->query("REPLACE INTO photo set uid='".$this->uid."', attachmime = '".$this->mimetype."', attach='"
.addslashes($this->data)."', x='".$this->x."', y='".$this->y."'");
+++ /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: valid_sondages.inc.php,v 1.9 2004-08-31 11:16:48 x2000habouzit Exp $
- ***************************************************************************/
-
-
-class SondageReq extends Validate {
- var $sid;
- var $titre;
- var $alias;
-
- var $username;
- var $prenom;
- var $nom;
-
- function SondageReq ($_uid, $_sid, $_stamp) {
- global $globals;
- $this->Validate($_uid, false, 'sondage', $_stamp);
- $this->sid = $_sid;
-
- $sql = $globals->db->query("SELECT username,prenom,nom FROM auth_user_md5 "
- . "WHERE user_id='".$this->uid."'");
- list($this->username,$this->prenom,$this->nom) = mysql_fetch_row($sql);
- mysql_free_result($sql);
- $sql = $globals->db->query("SELECT titre FROM sondage.description_generale "
- . "WHERE ids='".$this->sid."'");
- list($this->titre) = mysql_fetch_row($sql);
- mysql_free_result($sql);
- $this->alias = substr($this->titre,0,min(15,strlen($this->titre)));
- }
-
- function get_request($uid,$stamp) {
- return parent::get_request($uid,'sondage',$stamp);
- }
-
- function formu() { return 'include/form.valid.sondages.tpl'; }
-
- function handle_formu () {
- global $no_update_bd,$baseurl, $globals;
- if($no_update_bd) return false;
-
- if(empty($_REQUEST['submit'])
- || ($_REQUEST['submit']!="Accepter" && $_REQUEST['submit']!="Refuser"))
- return false;
-
- if ($_REQUEST['submit']!="Refuser") {
- $alias = stripslashes($_REQUEST['alias']);
- if ($alias=="") {
- return '<p class="erreur">Il faut entrer un alias pour valider ce sondage.</p>';
- }
- else {
- if (strlen($alias)>15) {
- return "<p class='erreur'>L'alias est trop long.</p>";
- }
- else if (strpos($alias,"'")) {
- return "<p class='erreur'>L'alias ne doit pas contenir le caractère '</p>";
- }
- else {//on vérifie que l'alias n'existe pas déjà
- $resultat = $globals->db->query("select alias from sondage.description_generale ".
- "where alias='$alias'");
- if (mysql_num_rows($resultat)>0) {
- return "<p class='erreur'>Cet alias est déjà utilisé.</p>";
- }
- }
- }
- $this->alias=$alias;
- }
-
- require_once("tpl.mailer.inc.php");
-
- $lien = "$baseurl/sondage/questionnaire.php?alias=".urlencode($this->alias);
-
- $mymail = new TplMailer('valid.sondages.tpl');
- $mymail->assign('username', $this->username);
- $mymail->assign('alias', $this->alias);
- $mymail->assign('titre', '"'.str_replace(''',"'",$this->titre).'"');
-
- if($_REQUEST['submit']=="Accepter") {
- $this->commit();
- $mymail->assign('answer','yes');
- } else {
- $mymail->assign('answer','no');
- }
-
- $mymail->send();
- //Suppression de la demande
- $this->clean();
- return "Mail envoyé";
- }
-
- function commit () {
- global $no_update_bd;
- require_once("sondage.requetes.inc.php");
- if($no_update_bd) return false;
-
- passer_en_prod($this->sid,$this->alias);
- }
-}
-
-?>
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: validations.inc.php,v 1.12 2004-08-31 19:48:46 x2000habouzit Exp $
+ $Id: validations.inc.php,v 1.13 2004-08-31 22:01:31 x2000habouzit Exp $
***************************************************************************/
/* vim: set expandtab shiftwidth=4 tabstop=4 softtabstop=4 textwidth=100:
- * $Id: validations.inc.php,v 1.12 2004-08-31 19:48:46 x2000habouzit Exp $
+ * $Id: validations.inc.php,v 1.13 2004-08-31 22:01:31 x2000habouzit Exp $
*
*/
* cette fonction supprimme les doublons sur un couple ($user,$type) si $this->unique est vrai
*/
function submit () {
- global $no_update_bd, $globals;
- if($no_update_bd) return false;
+ global $globals;
if($this->unique)
$globals->db->query("DELETE FROM requests WHERE user_id='".$this->uid
. "' AND type='".$this->type."'");
* attention, tout est supprimé si c'est un unique
*/
function clean () {
- global $no_update_bd, $globals;
- if($no_update_bd) return false;
+ global $globals;
return $globals->db->query("DELETE FROM requests WHERE user_id='".$this->uid."' AND type='".$this->type."'"
.($this->unique ? "" : " AND stamp='".$this->stamp."'"));
}
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: config.xorg.inc.php,v 1.4 2004-08-31 21:57:51 x2000habouzit Exp $
+ $Id: config.xorg.inc.php,v 1.5 2004-08-31 22:01:32 x2000habouzit Exp $
***************************************************************************/
-/* $Id: config.xorg.inc.php,v 1.4 2004-08-31 21:57:51 x2000habouzit Exp $ */
+/* $Id: config.xorg.inc.php,v 1.5 2004-08-31 22:01:32 x2000habouzit Exp $ */
/* URL de la racine pour les mails contenant des URL (pas de slash final!) */
if (!isset($baseurl)) $baseurl="http://dev.m4x.org";
/* les parametres pour se connecter à la BDD */
$globals->dbhost='localhost';
$globals->dbdb = 'x4dat';
-$globals->dbuser = $no_update_bd ? 'webro' : 'web';
+$globals->dbuser = 'web';
$globals->dbpwd="*******";
$globals->root="...";
$globals->libroot="...";
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: routage-mail.tpl,v 1.4 2004-08-31 11:25:39 x2000habouzit Exp $
+ $Id: routage-mail.tpl,v 1.5 2004-08-31 22:01:32 x2000habouzit Exp $
***************************************************************************}
{dynamic}
-{if $no_update_bd}
-<p>
- Le site est en mode de consultation seulement, tu ne peux pas modifier tes adresses
- de redirections.
-</p>
-{/if}
{if $retour == $smarty.const.ERROR_INACTIVE_REDIRECTION}
<p class="erreur">
Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse