================================================================================
VERSION 0.9.13 ?? ?? 2007
+Bug/Wish:
+
+ * Register:
+ - #277: Improve ergonomy -FRU
+
From 0.9.12 branch:
* Search:
function run()
{
- global $globals;
+ global $globals, $platal;
$this->assign('globals', $globals);
- $this->_run('skin/'.S::v('skin', 'default.tpl'));
+ if ($platal->path == 'register') {
+ $skin = 'register.tpl';
+ } else {
+ $skin = S::v('skin', 'default.tpl');
+ }
+ $this->_run('skin/' . $skin);
}
}
case 1:
if (Post::has('promo')) {
$promo = Post::i('promo');
- if ($promo < 1900 || $promo > date('Y')) {
- $err = "La promotion saisie est incorrecte !";
+ $res = XDB::query("SELECT COUNT(*)
+ FROM auth_user_md5
+ WHERE perms='pending' AND deces = '0000-00-00'
+ AND promo = {?}",
+ $promo);
+ if (!$res->fetchOneCell()) {
+ $err = "La promotion saisie est incorrecte ou tous les camardes de cette promo sont inscrits !";
} else {
$sub_state['step'] = 2;
$sub_state['promo'] = $promo;
}
$_SESSION['sub_state'] = $sub_state;
- $page->changeTpl('register/step'.intval($sub_state['step']).'.tpl', SIMPLE);
+ $page->changeTpl('register/step'.intval($sub_state['step']).'.tpl');
if (isset($err)) {
$page->trig($err);
}
global $globals;
$page->changeTpl('register/end.tpl');
-
+ $_SESSION['sub_state'] = array('step' => 5);
require_once('user.func.inc.php');
if ($hash) {
{
$page->changeTpl('register/success.tpl');
+ $_SESSION['sub_state'] = array('step' => 5);
if (Env::has('response2')) {
$_SESSION['password'] = $password = Post::v('response2');
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2006 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 *}
+{* *}
+{**************************************************************************}
+
+{assign var="step" value=$smarty.session.sub_state.step}
+<div class="descr center">
+ <strong>Procédure d'inscription :</strong>
+ {if !$step}<span class="erreur">{/if}Charte{if !$step}</span>{/if} »
+ {if $step eq 1 || $step eq 2}<span class="erreur">{/if}Identification{if $step eq 1 || $step eq 2}</span>{/if} »
+ {if $step eq 4 || $step eq 3}<span class="erreur">{/if}Pré-Inscription{if $step eq 4 || $step eq 3}</span>{/if} »
+ {if $step eq 5}<span class="erreur">{/if}Validation{if $step eq 5}</span>{/if}
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
+
<h1>:'(</h1>
<p class="erreur">
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
<h1>Conditions générales</h1>
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
+
<h1>Identification</h1>
<form action="register" method="post">
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
+
<h1>Identification</h1>
<p>
<form action="register" method="post">
<table class="bicol" summary="Identification" cellpadding="3">
{if $smarty.session.sub_state.promo >= 1996}
+ {assign var="promo" value=$smarty.session.sub_state.promo}
<tr>
<th colspan="2">matricule</th>
</tr>
<tr class="pair">
<td></td>
<td>
- 6 chiffres terminant par le numéro d'entrée (ex: 960532 ou 101532)<br />
+ 6 chiffres terminant par le numéro d'entrée (ex:
+ {if $promo < 2000}
+ {math equation="promo % 100" promo=$promo}0532)<br />
+ {else}
+ {math equation="(promo % 100) + 100" promo=$promo}532)<br />
+ {/if}
Voir sur le GU ou un bulletin de solde pour trouver cette information<br /><br />
- Pour les élèves étrangers voie 2, il est du type :<br />
- Promotion: 1996, Matricule: 970XXX - Promotion: 2001, Matricule 102XXX.
+ Pour les élèves étrangers voie 2, il est du type :
+ {if $promo < 1999}
+ {math equation="(promo + 1) % 100" promo=$promo}0XXX
+ {else}
+ {math equation="((promo + 1) % 100) + 100" promo=$promo}XXX
+ {/if}
</td>
</tr>
{/if}
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
{if $smarty.session.sub_state.forlife}
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
<h1>Pré-inscription réussie</h1>
{* *}
{**************************************************************************}
+{include file="register/breadcrumb.tpl"}
+
<h1>Bravo !!!</h1>
<p>
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2006 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 *}
+{* *}
+{**************************************************************************}
+<?xml version="1.0" encoding="iso-8859-15"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <base href="{$globals->baseurl}/" />
+ <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
+ {include file=skin/common.header.tpl}
+ {include file=skin/common.bandeau.head.tpl}
+ </head>
+ <body>
+ {include file=skin/common.devel.tpl}
+ {if $smarty.session.suid}
+ <table id="suid" cellpadding="0" cellspacing="0">
+ <tr>
+ <td>
+ {$smarty.session.suid} ({$smarty.session.forlife})
+ [<a href="exit">exit</a>]
+ </td>
+ </tr>
+ </table>
+ {/if}
+
+ {if $simple}
+ <div id="content">
+ {include file="skin/common.content.tpl"}
+ </div>
+ {else}
+ {include file=skin/common.bandeau.tpl}
+ <table id="body" cellpadding="0" cellspacing="0">
+ <tr>
+ <td id="body-top">
+ <img src="images/skins/default_headlogo.jpg" alt="[ LOGO ]" style="display: block; float: left;" />
+ <img src="images/skins/default_ban.jpg" alt="[ Polytechnique.org ]" /><br />
+ <img src="images/skins/default_lesX.gif" alt="[LES X SUR LE WEB]" style="padding-top: 0.3em" />
+ </td>
+ </tr>
+ <tr>
+ <td id="content">
+ {include file="skin/common.content.tpl"}
+ </td>
+ </tr>
+ </table>
+ {/if}
+ </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}