git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-168
$mymail->setSubject("Dans 2 semaines, suppression de $loginbis@polytechnique.org");
$mymail->addTo("$prenom $nom <$forlife@polytechnique.org>");
$mymail->addCc($cc);
- $mymail->setTxtBody(stripslashes(Env::get('mailbody')));
+ $mymail->setTxtBody(Env::get('mailbody'));
$mymail->send();
$op = 'list';
break;
$mymail->setSubject("Mise en place du robot $loginbis@polytechnique.org");
$mymail->addTo("$prenom $nom <$forlife@polytechnique.org>");
$mymail->addCc($cc);
- $mymail->setTxtBody(stripslashes(Env::get('mailbody')));
+ $mymail->setTxtBody(Env::get('mailbody'));
$mymail->send();
$op = 'list';
break;
/* on verifie qu'on n'a pas demandé une
variable inexistante ! */
if (isset($_SESSION[$val])) {
- $tohash .= stripslashes($_SESSION[$val]);
+ $tohash .= $_SESSION[$val];
} else if ($val == 'username') {
$sql = "SELECT alias
FROM aliases AS al
ORDER BY LENGTH(alias)";
$res = mysql_query($sql);
list($min_username) = mysql_fetch_array($res);
- $tohash .= stripslashes($min_username);
+ $tohash .= $min_username;
}
}
$tohash .= "1";
// action si on recoit un formulaire
if (Env::get('submit') == 'Envoyer')
{
- $to2 = stripslashes(join(', ', Env::getMixed('contacts', Array())));
- $txt = str_replace('^M', '', stripslashes(Env::get('contenu')));
- $to = stripslashes(Env::get('to'));
- $subj = stripslashes(Env::get('sujet'));
- $from = stripslashes(Env::get('from'));
- $cc = stripslashes(Env::get('cc'));
- $bcc = stripslashes(Env::get('bcc'));
+ $to2 = join(', ', Env::getMixed('contacts', Array()));
+ $txt = str_replace('^M', '', Env::get('contenu'));
+ $to = Env::get('to');
+ $subj = Env::get('sujet');
+ $from = Env::get('from');
+ $cc = Env::get('cc');
+ $bcc = Env::get('bcc');
if (empty($to) && empty($cc) && empty($to2)) {
$page->trig("Indique au moins un destinataire.");
require_once("xorg.inc.php");
new_skinned_page('evenements.tpl', AUTH_MDP);
-$titre = stripslashes(Post::get('titre'));
-$texte = stripslashes(Post::get('texte'));
+$titre = Post::get('titre');
+$texte = Post::get('texte');
$promo_min = Post::getInt('promo_min');
$promo_max = Post::getInt('promo_max');
$peremption = Post::getInt('peremption');
mot de passe.");
}
-$nom = stripslashes($nom);
-$prenom = stripslashes($prenom);
$sql = "UPDATE auth_user_md5 SET password='$password', nationalite='$nationalite', perms='user',
date='$date', naissance='$naissance', date_ins = NULL WHERE matricule='$matricule'";
$globals->db->query($sql);
}
if(Post::has('sdel')) {
- $client->handle_request($liste,Post::get('sdel'),2,stripslashes(Post::get('reason'))); /* 2 = REJECT */
+ $client->handle_request($liste,Post::get('sdel'),2,Post::get('reason')); /* 2 = REJECT */
}
if(Env::has('mid')) {
} elseif (Env::has('mno')) {
$action = 2; /** 2 = REJECT **/
$subject = "Message refusé";
- $reason = stripslashes(Post::get('reason'));
+ $reason = Post::get('reason');
$append = "a été refusé par $prenom $nom avec la raison :\n\n"
. $reason;
} elseif (Env::has('mdel')) {
$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
if (Post::has('submit')) {
- $values = array_map('stripslashes',$_POST);
+ $values = $_POST;
$client->set_bogo_level($liste, intval($values['bogo_level']));
switch($values['moderate']) {
case '0':
$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
if(Post::has('submit')) {
- $values = array_map('stripslashes', $_POST);
+ $values = $_POST;
unset($values['submit']);
$values['advertised'] = empty($values['advertised']) ? false : true;
$values['archive'] = empty($values['archive']) ? false : true;
if ($myrow = mysql_fetch_assoc($result))
exit_error("Le matricule existe déjà dans la table auth_user_md5.");
- if (!isvalid_email_redirection(stripslashes($_REQUEST["mail"])))
+ if (!isvalid_email_redirection($_REQUEST["mail"]))
exit_error("L'email n'est pas valide.");
$result=$globals->db->query("SELECT prenom,nom,promo,FIND_IN_SET('femme', flags)
$mymail = new XOrgMailer('marketing.utilisateur.tpl');
$mymail->assign('from', $_REQUEST["from"]);
- $mymail->assign('to', stripslashes($_REQUEST["mail"]));
+ $mymail->assign('to', $_REQUEST["mail"]);
$mymail->assign('femme', $femme);
$mymail->assign('baseurl', $globals->baseurl);
$mymail->assign('user_id', $user_id);
function add_email($email)
{
global $globals;
- $email_stripped = strtolower(stripslashes(trim($email)));
+ $email_stripped = strtolower(trim($email));
if (!isvalid_email($email_stripped)) {
return ERROR_INVALID_EMAIL;
}
// {{{ function title()
function title()
- { return stripslashes($this->_title); }
+ { return $this->_title; }
// }}}
// {{{ function head()
function head()
- { return stripslashes($this->_head); }
+ { return $this->_head; }
// }}}
// {{{ function getArt()
// {{{ function title()
function title()
- { return stripslashes(trim($this->_title)); }
+ { return trim($this->_title); }
// }}}
// {{{ function body()
function body()
- { return stripslashes(trim($this->_body)); }
+ { return trim($this->_body); }
// }}}
// {{{ function append()
function append()
- { return stripslashes(trim($this->_append)); }
+ { return trim($this->_append); }
// }}}
// {{{ function toText()
function enriched_to_text($input,$html=false,$just=false,$indent=0,$width=68)
{
- $text = stripslashes(trim($input));
+ $text = trim($input);
if ($html) {
$text = htmlspecialchars($text);
$text = str_replace('[b]','<strong>', $text);
function replace_ifset(&$var,$req) {
if (Env::has($req)){
- $var = stripslashes(Env::get($req));
+ $var = Env::get($req);
}
}
function replace_ifset_i(&$var,$req,$i) {
if (isset($_REQUEST[$req][$i])){
- $var[$i] = stripslashes($_REQUEST[$req][$i]);
+ $var[$i] = $_REQUEST[$req][$i];
}
}
function replace_ifset_i_j(&$var,$req,$i,$j) {
if (isset($_REQUEST[$req][$j])){
- $var[$i] = stripslashes($_REQUEST[$req][$j]);
+ $var[$i] = $_REQUEST[$req][$j];
}
}
//pour rentrer qqchose dans la base
function put_in_db($string){
- return trim(addslashes($string));
+ return trim($string);
}
?>
$globals->db->query("INSERT INTO mentor_pays(uid, pid) VALUES('{$_SESSION['uid']}', '$id_ajoutee')");
$nb_mentor_pays++;
$mentor_pid[$nb_mentor_pays] = $id_ajoutee;
- $mentor_pays[$nb_mentor_pays] = stripslashes($_POST['mentor_pays_name']);
+ $mentor_pays[$nb_mentor_pays] = $_POST['mentor_pays_name'];
}
}
VALUES('{$_SESSION['uid']}', '$sid_ajoutee',".( ($ssid_ajoutee == '')?'NULL':"'$ssid_ajoutee'" ).")");
$nb_mentor_secteurs++;
$mentor_sid[$nb_mentor_secteurs] = $sid_ajoutee;
- $mentor_secteur[$nb_mentor_secteurs] = stripslashes($_POST['mentor_secteur_name']);
+ $mentor_secteur[$nb_mentor_secteurs] = $_POST['mentor_secteur_name'];
$mentor_ssid[$nb_mentor_secteurs] = $ssid_ajoutee;
- $mentor_ss_secteur[$nb_mentor_secteurs] = stripslashes($_POST['mentor_ss_secteur_name']);
+ $mentor_ss_secteur[$nb_mentor_secteurs] = $_POST['mentor_ss_secteur_name'];
}
} elseif(isset($_POST['mentor_secteur_id_new'])){
$mentor_secteur_id_new = $_POST['mentor_secteur_id_new'];
function replace_ifset_adr($varname, $i){
if (isset($_REQUEST[$varname][$i]))
- $GLOBALS['adresses'][$i][$varname] = stripslashes($_REQUEST[$varname][$i]);
+ $GLOBALS['adresses'][$i][$varname] = $_REQUEST[$varname][$i];
}
function set_flag_adr($varname,$i){
}
//validité du poste
-if (strlen(strtok(stripslashes($poste[$i]),"<>{}~?!§*`|%$^=+")) < strlen(stripslashes($poste[$i])))
+if (strlen(strtok($poste[$i],"<>{}~?!§*`|%$^=+")) < strlen($poste[$i]))
{
$str_error = $str_error."Le champ 'Poste $j' contient un caractère interdit.<BR />";
}
$str_error = $str_error."Le champ 'Curriculum vitae' contient un caractère interdit.<BR />";
}
-if (strlen(strtok(stripslashes($adrpro1[$i]),"<>{}@~?!§*`|%$^=+")) < strlen(stripslashes($adrpro1[$i])))
+if (strlen(strtok($adrpro1[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro1[$i]))
{
$str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 1' contient un caractère interdit.<BR />";
}
- if (strlen(strtok(stripslashes($adrpro2[$i]),"<>{}@~?!§*`|%$^=+")) < strlen(stripslashes($adrpro2[$i])))
+ if (strlen(strtok($adrpro2[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro2[$i]))
{
$str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 2' contient un caractère interdit.<BR />";
}
- if (strlen(strtok(stripslashes($adrpro3[$i]),"<>{}@~?!§*`|%$^=+")) < strlen(stripslashes($adrpro3[$i])))
+ if (strlen(strtok($adrpro3[$i],"<>{}@~?!§*`|%$^=+")) < strlen($adrpro3[$i]))
{
$str_error = $str_error."Le champ 'Adresse professionnelle $j - Ligne 3' contient un caractère interdit.<BR />";
}
- if (strlen(strtok(stripslashes($cppro[$i]),"<>{}@~?!§*`|%$^=+")) < strlen(stripslashes($cppro[$i])))
+ if (strlen(strtok($cppro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($cppro[$i]))
{
$str_error = $str_error."Le champ 'Code Postal professionnel $j' contient un caractère interdit.<BR />";
}
- if (strlen(strtok(stripslashes($villepro[$i]),"<>{}@~?!§*`|%$^=+")) < strlen(stripslashes($villepro[$i])))
+ if (strlen(strtok($villepro[$i],"<>{}@~?!§*`|%$^=+")) < strlen($villepro[$i]))
{
$str_error = $str_error."Le champ 'Ville professionnelle $j' contient un caractère interdit.<BR />";
}
//au cas ou le submit du formulaire vient d'un changement du nouveau secteur
if(isset($_POST['mentor_expertise'])){
- $mentor_expertise = stripslashes($_POST['mentor_expertise']);
+ $mentor_expertise = $_POST['mentor_expertise'];
if(!empty($mentor_expertise)){
if (strlen(strtok($mentor_expertise,"<>{}~§`|%$^")) < strlen($mentor_expertise)){//TODO: affiner la liste
$page->trig("L'expertise contient un caractère interdit.");
}
function make_forlife($prenom,$nom,$promo) {
- /* on traite le prenom */
- $prenomUS=replace_accent(trim($prenom));
- $prenomUS=stripslashes($prenomUS);
+ $prenomUS = replace_accent(trim($prenom));
+ $nomUS = replace_accent(trim($nom));
- /* on traite le nom */
- $nomUS=replace_accent(trim($nom));
- $nomUS=stripslashes($nomUS);
-
- // calcul du login
$forlife = strtolower($prenomUS.".".$nomUS.".".$promo);
$forlife = str_replace(" ","-",$forlife);
$forlife = str_replace("'","",$forlife);
+++ /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 *
- ***************************************************************************/
-
-// {{{ function smarty_modifier_stripslashes()
-
-/**
- * smarty modifier that perform a glob in the templates directory
- */
-function smarty_modifier_stripslashes($string)
-{
- return stripslashes($string);
-}
-
-// }}}
-
-?>
<td>
<input type='hidden' name='signature' value='1' />
<input type='text' name='from' size='60' value='{if $smarty.request.from}
-{$smarty.request.from|stripslashes}
+{$smarty.request.from}
{else}
"{$smarty.session.prenom} {$smarty.session.nom}" <{$smarty.session.bestalias}@{#globals.mail.domain#}>
{/if}' />
<tr>
<td class="titre">à :</td>
<td>
- <input type='text' name='to' size='60' value="{$smarty.request.to|stripslashes}" />
+ <input type='text' name='to' size='60' value="{$smarty.request.to}" />
</td>
</tr>
<tr>
<td class="titre">copie :</td>
<td>
- <input type='text' name='cc' size='60' value="{$smarty.request.cc|stripslashes}" />
+ <input type='text' name='cc' size='60' value="{$smarty.request.cc}" />
</td>
</tr>
<tr>
<td class="titre">copie cachée :</td>
<td>
- <input type='text' name='bcc' size='60' value="{$smarty.request.bcc|stripslashes}" />
+ <input type='text' name='bcc' size='60' value="{$smarty.request.bcc}" />
</td>
</tr>
</table>
</tr>
<tr>
<td class="center">
- <input type='text' name='sujet' size='75' value="{$smarty.request.sujet|stripslashes}" />
+ <input type='text' name='sujet' size='75' value="{$smarty.request.sujet}" />
</td>
</tr>
<tr>
<tr>
<td class="center">
<textarea name='contenu' rows="30" cols="75">
-{$smarty.request.contenu|stripslashes}
+{$smarty.request.contenu}
{if !$smarty.request.contenu}
--
{$smarty.session.prenom} {$smarty.session.nom}
<tr>
<td class='titre'>Addresse souhaitée :</td>
<td>
- <input type='text' name='liste' value='{$smarty.post.liste|stripslashes}' />@polytechnique.org
+ <input type='text' name='liste' value='{$smarty.post.liste}' />@polytechnique.org
</td>
</tr>
<tr>
<td class='titre'>Sujet (bref) :</td>
<td>
- <input type='text' name='desc' size='50' value="{$smarty.post.desc|stripslashes}" />
+ <input type='text' name='desc' size='50' value="{$smarty.post.desc}" />
</td>
</tr>
<tr>