From 468e21b05d48e740eb652d3397f2f9a653328125 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sun, 5 Sep 2004 22:58:46 +0000 Subject: [PATCH] bugfixes. now I have to recode step4.php/tpl. I've test - quickly and not for proms > 1995 - the marketing AND the normal inscription. all seems to work smoothly atm --- htdocs/inscription/maj.php | 12 +++++++-- htdocs/marketing/utilisateurs_marketing.php | 40 +++++++++++++---------------- include/select_user.inc.php | 4 +-- templates/inscription/step1a.tpl | 4 +-- templates/inscription/step2.tpl | 4 +-- 5 files changed, 34 insertions(+), 30 deletions(-) diff --git a/htdocs/inscription/maj.php b/htdocs/inscription/maj.php index ee4e482..6e8b2af 100644 --- a/htdocs/inscription/maj.php +++ b/htdocs/inscription/maj.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: maj.php,v 1.1 2004-09-05 22:25:44 x2000habouzit Exp $ + $Id: maj.php,v 1.2 2004-09-05 22:58:46 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -32,6 +32,7 @@ if (isset($_REQUEST['n'])) { if (isset($ligne) && $ligne) { if(!isset($_REQUEST['charte'])) { new_skinned_page('inscription/step1a.tpl', AUTH_PUBLIC); + $page->run(); } // il faut remettre le matricule dans son format de saisie @@ -41,9 +42,16 @@ if (isset($ligne) && $ligne) { $_REQUEST['prenom'] = $ligne['prenom']; $_REQUEST['email'] = $ligne['email']; + new_skinned_page('inscription/step2.tpl', AUTH_PUBLIC); require("identification.inc.php"); + require("applis.func.inc.php"); + + $page->assign('homonyme', $homonyme); + $page->assign('forlife', $forlife); + $page->assign('mailorg', $mailorg); + $page->assign('prenom', $prenom); + $page->assign('nom', $nom); - new_skinned_page('inscrire/step2.tpl', AUTH_PUBLIC); $page->assign('envoidirect',$_REQUEST['n']); $page->run(); } diff --git a/htdocs/marketing/utilisateurs_marketing.php b/htdocs/marketing/utilisateurs_marketing.php index 736e4c7..0a3d36a 100644 --- a/htdocs/marketing/utilisateurs_marketing.php +++ b/htdocs/marketing/utilisateurs_marketing.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: utilisateurs_marketing.php,v 1.6 2004-09-03 00:15:49 x2000bedo Exp $ + $Id: utilisateurs_marketing.php,v 1.7 2004-09-05 22:58:46 x2000habouzit Exp $ ***************************************************************************/ require("auto.prepend.inc.php"); @@ -96,29 +96,25 @@ switch ($_REQUEST["submit"]) { SET matricule='{$_REQUEST['xmat']}',uid='$user_id',promo='$promo', prenom='".addslashes($prenom)."',nom='".addslashes($nom)."', email='{$_REQUEST['mail']}',sender='{$_REQUEST['sender']}',date_envoi='$date'"; - $result = $globals->db->query($requete); - if (mysql_errno() == 0 || mysql_affected_rows() == 1) { - // pas d'erreur pour l'insert + $globals->db->query($requete); + // pas d'erreur pour l'insert - // envoi du mail à l'utilisateur - require('tpl.mailer.inc.php'); - $mymail = new TplMailer('marketing.utilisateur.tpl'); + // envoi du mail à l'utilisateur + require('tpl.mailer.inc.php'); + $mymail = new TplMailer('marketing.utilisateur.tpl'); - $mymail->assign('from', $_REQUEST["from"]); - $mymail->assign('to', stripslashes($_REQUEST["mail"])); - $mymail->assign('femme', $femme); - $mymail->assign('baseurl', $baseurl); - $mymail->assign('user_id', $user_id); - $mymail->assign('num_users', $num_users); - $mymail->assign('mailorg', $mailorg); - $mymail->assign('envoyeur', $envoyeur); - $mymail->send(); - - new_admin_page('marketing/utilisateurs_marketing.tpl'); - $page->run(); - } else { - exit_error("Une erreur s'est produite lors de la tentative d'insertion de la pré-inscription."); - } + $mymail->assign('from', $_REQUEST["from"]); + $mymail->assign('to', stripslashes($_REQUEST["mail"])); + $mymail->assign('femme', $femme); + $mymail->assign('baseurl', $baseurl); + $mymail->assign('user_id', $user_id); + $mymail->assign('num_users', $num_users); + $mymail->assign('mailorg', $mailorg); + $mymail->assign('envoyeur', $envoyeur); + $mymail->send(); + + new_admin_page('marketing/utilisateurs_marketing.tpl'); + $page->run(); break; } diff --git a/include/select_user.inc.php b/include/select_user.inc.php index 8bf1dad..f57d058 100644 --- a/include/select_user.inc.php +++ b/include/select_user.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: select_user.inc.php,v 1.2 2004-08-31 11:16:48 x2000habouzit Exp $ + $Id: select_user.inc.php,v 1.3 2004-09-05 22:58:46 x2000habouzit Exp $ ***************************************************************************/ if(empty($_REQUEST["xmat"]) || empty($_REQUEST["submit"])) { @@ -63,7 +63,7 @@ if(empty($_REQUEST["xmat"]) || empty($_REQUEST["submit"])) { $sql = "SELECT id.*,user_id FROM identification AS id LEFT JOIN auth_user_md5 USING(matricule) - WHERE user_id IS NULL AND $where"; + WHERE user_id IS NULL AND deces=0 AND $where"; new_admin_page('marketing/utilisateurs_select.tpl'); $page->mysql_assign($sql, 'nonins'); diff --git a/templates/inscription/step1a.tpl b/templates/inscription/step1a.tpl index 6172522..446dbae 100644 --- a/templates/inscription/step1a.tpl +++ b/templates/inscription/step1a.tpl @@ -17,11 +17,11 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: step1a.tpl,v 1.1 2004-09-05 22:25:45 x2000habouzit Exp $ + $Id: step1a.tpl,v 1.2 2004-09-05 22:58:47 x2000habouzit Exp $ ***************************************************************************} -
+
Conditions générales
diff --git a/templates/inscription/step2.tpl b/templates/inscription/step2.tpl index 001c9e5..12d4637 100644 --- a/templates/inscription/step2.tpl +++ b/templates/inscription/step2.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: step2.tpl,v 1.2 2004-09-05 22:25:45 x2000habouzit Exp $ + $Id: step2.tpl,v 1.3 2004-09-05 22:58:47 x2000habouzit Exp $ ***************************************************************************} @@ -150,7 +150,7 @@ - + -- 2.1.4