* Paiments :
- #336 : Micro -> Tele(payments). -MC
- - Fixed little text mistake in Payments menu -CAT
+ - Fixed little text mistake in Payments menu. -CAT
+ - Direct link from and to events. -Car
* Profile :
- #330,333: Interface improvements. -Car
- #332: User can precise why he asks for a usage name. -Car
- - #335: Already assigned promotion don't generate a request -CAT
+ - #335: Already assigned promotion don't generate a request. -CAT
+ - User can accept/refuse synchronisatio from AX by admin. -Car
* Xnet :
- Various bug fixes in events management. -Car
- #334: Interface improvements. -Car
* User Interface:
- - #337: Added link to trackers and support website for admins -CAT
- - #338: Broken FSF link fixed on donation page -CAT
+ - #337: Added link to trackers and support website for admins. -CAT
+ - #338: Broken FSF link fixed on donation page. -CAT
================================================================================
VERSION 0.9.8 18 Jul 2005
if (may_update() && Post::get('intitule')) {
$short_name = Env::get('short_name');
//Quelques vérifications sur l'alias (caractères spéciaux)
- if ($short_name && !preg_match( "/^[a-zA-Z0-9\-.]{3,20}$/", $short_name)) {
+ if ($short_name && !preg_match( "/^[a-zA-Z0-9\-.]{3,20}$/", $short_name))
+ {
$page->trig("Le raccourci demandé n'est pas valide.
Vérifie qu'il comporte entre 3 et 20 caractères
et qu'il ne contient que des lettres non accentuées,
des chiffres ou les caractères - et .");
$short_name = $infos['short_name'];
$page->assign('get_form', true);
+ $get_form = true;
+ // set the field to the previously requested field
+ $page->assign('evt', $_REQUEST);
}
//vérifier que l'alias n'est pas déja pris
if ($short_name && $short_name != $infos['short_name']) {
$page->trig("Le raccourci demandé est déjà utilisé. Choisis en un autre.");
$short_name = $infos['short_name'];
$page->assign('get_form', true);
+ $get_form = true;
+ // set the field to the previously requested field
+ $page->assign('evt', $_REQUEST);
}
}
if ($short_name && $infos['short_name'] && $short_name != $infos['short_name']) {
debut = {?}, fin = {?},
membres_only = {?}, advertise = {?}, show_participants = {?}, short_name = {?}",
$eid, $globals->asso('id'), Session::get('uid'), Post::get('intitule'),
- (Post::get('paiement')>0)?Post::get('paiement'):NULL, Post::get('descriptif'),
+ (Post::get('paiement_id')>0)?Post::get('paiement_id'):NULL, Post::get('descriptif'),
Post::get('deb_Year')."-".Post::get('deb_Month')."-".Post::get('deb_Day')." ".Post::get('deb_Hour').":".Post::get('deb_Minute').":00",
Post::get('fin_Year')."-".Post::get('fin_Month')."-".Post::get('fin_Day')." ".Post::get('fin_Hour').":".Post::get('fin_Minute').":00",
Post::get('membres_only'), Post::get('advertise'), Post::get('show_participants'), $short_name, $eid);
}
// request for a new payment
- if (Post::get('paiement') == -1 && $money_defaut >= 0) {
+ if (Post::get('paiement_id') == -1 && $money_defaut >= 0) {
require_once ('validations.inc.php');
$p = new PayReq(Session::get('uid'), Post::get('intitule')." - ".$globals->asso('nom'), Post::get('site'), $money_defaut, Post::get('confirmation'),0, 999, $globals->asso('id'), $eid);
$p->submit();
$globals->xdb->execute("DELETE FROM requests WHERE type = 'paiements' AND data LIKE {?}", PayReq::same_event($eid, $globals->asso('id')));
}
-if (may_update() && (Env::has('add') || (Env::has('mod') && $eid))) {
+if (may_update() && (Env::has('add') || (Env::has('mod') && $eid || $get_form))) {
$page->assign('get_form', true);
$res = $globals->xdb->iterator
("SELECT id, text FROM {$globals->money->mpay_tprefix}paiements WHERE asso_id = {?}", $globals->asso('id'));
require_once('xnet/evenements.php');
$evt = get_event_detail(Env::get('eid'));
+
+if (!$evt)
+ header("Location: evenements.php");
+
if (Env::has('ins')) {
subscribe_lists_event($participate, Session::get("uid"), $evt['participant_list'], $evt['absent_list']);
header("Location: evenements.php?backfrom=".Env::get('eid'));
$page->trig("La transaction selectionnée est périmée.");
$pay = new Payment();
}
-$val = ($op=="submit" && Env::has('montant')) ? Env::get('montant') : $pay->montant_def;
+$val = (Env::has('montant')) ? Env::get('montant') : $pay->montant_def;
if (($e = $pay->check($val)) !== true) {
$page->trig($e);
if ($res->total()) $page->assign('transactions', $res);
}
+$val = floor($val).".".substr(floor(($val - floor($val))*100+100),1);
$page->assign('montant',$val);
$page->assign('meth', $meth);
$page->assign('pay', $pay);
+$page->assign('evtlink', $pay->event());
$page->assign('prefix',$globals->money->mpay_tprefix);
$page->run();
var $montant_min;
var $montant_max;
var $montant_def;
+ var $asso_id;
var $api = null;
{
global $globals;
$r = $ref==-1 ? $globals->money->mpay_def_id : $ref;
- $res = $globals->xdb->query("SELECT id, text, url, flags, mail, montant_min, montant_max, montant_def
+ $res = $globals->xdb->query("SELECT id, text, url, flags, mail, montant_min, montant_max, montant_def, asso_id
FROM {$globals->money->mpay_tprefix}paiements WHERE id={?}", $r);
list($this->id, $this->text, $this->url, $flags, $this->mail,
- $this->montant_min, $this->montant_max, $this->montant_def) = $res->fetchOneRow();
+ $this->montant_min, $this->montant_max, $this->montant_def, $this->asso_id) = $res->fetchOneRow();
$this->montant_min = (float)$this->montant_min;
$this->montant_max = (float)$this->montant_max;
$this->flags = new Flagset($flags);
+
+ return $link;
}
// }}}
{
return $this->api->prepareform($this);
}
+
+ function event()
+ {
+ global $globals;
+ if ($this->asso_id)
+ {
+ $res = $globals->xdb->query("SELECT eid, a.diminutif FROM groupex.evenements AS e, groupex.asso AS a WHERE e.asso_id = {?} AND a.id = {?}", $this->asso_id, $this->asso_id);
+ return $res->fetchOneAssoc();
+ }
+ return null;
+ }
}
// }}}
$page->assign('photo_pub',$photo_pub);
$page->assign('nouvellephoto', $nouvellephoto);
$page->assign('nickname', $nickname);
+
+$page->assign('synchro_ax', $synchro_ax);
?>
// on ramène les données du profil connecté (uid paramètre de session)
$sql = "SELECT u.nom, u.prenom, u.nom_ini, u.prenom_ini, u.promo, u.promo_sortie, u.nom_usage, u.nationalite,
q.profile_mobile, q.profile_mobile_pub, q.profile_web, q.profile_web_pub, q.profile_freetext, q.profile_freetext_pub, q.profile_nick,
+ q.profile_from_ax,
a1.aid, a1.type, a2.aid, a2.type
FROM auth_user_md5 AS u
INNER JOIN auth_user_quick AS q USING(user_id)
$result = $globals->xdb->query($sql, Session::getInt('uid', -1));
list($nom, $prenom, $nom_ini, $prenom_ini, $promo, $promo_sortie, $nom_usage, $nationalite,
$mobile, $mobile_pub, $web, $web_pub, $freetext, $freetext_pub, $nickname,
+ $synchro_ax,
$appli_id1,$appli_type1, $appli_id2,$appli_type2) = $result->fetchOneRow();
$result = $globals->xdb->query("SELECT pub FROM photo WHERE uid = {?}", Session::getInt('uid', -1));
replace_ifset($appli_type2,"appli_type2");
replace_ifset($nickname,"nickname");
-if(Env::has('modifier') || Env::has('suivant')) {
+if(Env::has('modifier') || Env::has('suivant') && Env::get('old_tab') == 'general') {
$mobile_pub = Env::get('mobile_pub');
$web_pub = Env::has('web_pub')?'public':'private';
$freetext_pub = Env::has('freetext_pub')?'public':'private';
$photo_pub = Env::has('photo_pub')?'public':'private';
+ $synchro_ax = Env::has("synchro_ax")?1:0;
}
require_once("xorg.misc.inc.php");
profile_nick={?},
profile_mobile={?}, profile_mobile_pub={?},
profile_web={?}, profile_web_pub={?},
- profile_freetext={?}, profile_freetext_pub={?}
+ profile_freetext={?}, profile_freetext_pub={?},
+ profile_from_ax = {?}
WHERE user_id = {?}",
$nickname,
$mobile, $mobile_pub,
$web, $web_pub,
$freetext, $freetext_pub,
+ $synchro_ax,
Session::getInt('uid', -1));
if ($nickname != $nickname_anc) {
$tabname_array = Array(
- "general" => "Informations\ngénérales",
+ "general" => "Général",
"adresses" => "Adresses\npersonnelles",
- "poly" => "Informations\npolytechniciennes",
+ "poly" => "Groupes X\nBinets",
"deco" => "Décorations\nMédailles",
"emploi" => "Informations\nprofessionnelles",
"skill" => "Compétences\ndiverses",
{$pay->api->text}
</p>
{/if}
+{if $evtlink}
+<p class="erreur">
+Si tu n'es pas encore inscrit à cet événement, n'oublie pas d'aller t'<a href='http://www.polytechnique.net/{$evtlink.diminutif}/evt-detail.php?eid={$evtlink.eid}'>inscrire</a>.
+</p>
+{/if}
{else}
</div>
<div class="blocunite">
+ <table class="bicol" cellspacing="0" cellpadding="0"
+ summary="Profil : Informations générales">
+ <tr>
+ <th>
+ Synchronisation avec l'AX
+ </th>
+ </tr>
+ <tr>
+ <td class"col">
+ Le service annuaire de l'<a href='http://www.polytechniciens.com'>AX</a> met à jour l'annuaire papier à partir des informations que tu lui envoies. Tu peux choisir ici de récupérer directement ces données pour l'annuaire en ligne.
+ </td>
+ </tr>
+ <tr>
+ <td class="col">
+ <table class="flags" cellspacing="0" summary="Flags">
+ <tr>
+ <td class="orange">
+ <input type="checkbox" name="synchro_ax" {if $synchro_ax}checked="checked" {/if}/>
+ </td>
+ <td class="texte">
+ Autoriser la synchronisation depuis l'AX.
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<div class="blocunite">
<table class="bicol" cellspacing="0" cellpadding="0"
summary="Profil: Trombinoscope">
<tr>
{**************************************************************************}
<h1>{$asso.nom} :
-{if ($smarty.request.add || $smarty.request.mod) && $admin}
+{if ($smarty.request.add || $smarty.request.mod || $get_form) && $admin}
<a href='{$smarty.server.PHP_SELF}'>Evénements</a>
{else}
Evénements
{if $montant > 0 || $paid > 0}
<p {if $montant > $paid}class="erreur"{/if}>
Pour cet événement tu dois payer {$montant|replace:'.':','} € {if $paid > 0}, et tu as déjà payé {$paid|replace:'.':','} €{/if}
- {if $evt.paiement_id} [<a href="https://www.polytechnique.org/paiement/?ref={$evt.paiement_id}">Effectuer le paiement</a>]{/if}
+ {if $evt.paiement_id && $montant > $paid} [<a href="https://www.polytechnique.org/paiement/?ref={$evt.paiement_id}&montant={math equation="x - y" x=$montant y=$paid}">Effectuer le paiement</a>]{/if}
</p>
{/if}
<div class="center">
<hr />
<table>
<tr>
- <td>Intitulé de l'événement :</td>
+ <td>Intitulé de l'événement :</td>
<td>
<input type="hidden" name="eid" value="{$evt.eid}" />
<input type="text" name="intitule" value="{$evt.intitule}" size="45" maxlength="100" />
</td>
</tr>
<tr>
- <td>Evénement en raccourci (pour les mailings listes) :</td>
+ <td>Evénement en raccourci (pour les mailings listes) :</td>
<td><input type="text" name="short_name" value="{$evt.short_name}" size="20"/></td>
</tr>
<tr>
</td>
</tr>
<tr>
- <td>Référence de paiement :
+ <td>Référence de paiement :
</td>
<td>
- <select name="paiement" onchange="document.getElementById('new_pay').style.display=(value < 0?'block':'none')">
+ <select name="paiement_id" onchange="document.getElementById('new_pay').style.display=(value < 0?'block':'none')">
{if $evt.paiement_id eq -2}
<option value='-2'>Paiement en attente de validation</option>
{/if}