}
$this->id = intval($this->data['id']);
$this->shortname = $this->data['diminutif'];
+ if (!is_null($this->axDate)) {
+ $this->axDate = format_datetime($this->axDate, '%d/%m/%Y');
+ }
}
public function __get($name)
$page->trigError('Ni le nom ni le diminutif du groupe ne peuvent être vide.');
return;
}
+ $axDate = make_datetime(Post::v('axDate'));
+ if (Post::t('axDate') != '') {
+ $axDate = make_datetime(Post::v('axDate'))->format('Y-m-d');
+ } else {
+ $axDate = null;
+ }
XDB::execute(
"UPDATE groups
SET nom={?}, diminutif={?}, cat={?}, dom={?},
descr={?}, site={?}, mail={?}, resp={?},
- forum={?}, mail_domain={?}, ax={?}, pub={?},
+ forum={?}, mail_domain={?}, ax={?}, axDate = {?}, pub={?},
sub_url={?}, inscriptible={?}, unsub_url={?},
flags={?}
WHERE id={?}",
Post::v('descr'), $site,
Post::v('mail'), Post::v('resp'),
Post::v('forum'), Post::v('mail_domain'),
- Post::has('ax'), Post::v('pub'),
+ Post::has('ax'), $axDate, Post::v('pub'),
Post::v('sub_url'), Post::v('inscriptible'),
Post::v('unsub_url'), $flags, $globals->asso('id'));
if (Post::v('mail_domain')) {
<tr>
<td class="titre center" colspan="2">
<label><input type="checkbox" value="1" name="ax" {if $asso->ax}checked="checked"{/if} />
- groupe agréé par l'AX</label>
+ groupe agréé par l'AX</label> le <input type="text" size="10" maxlength="10" value="{$asso->axDate}" name="axDate" />
+ <small>(ex: 01/01/1970)</small>
</td>
</tr>
</table>