git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-375
}
}
+if (Env::get('action') == 'ajouter') {
+ $globals->xdb->execute(
+ "INSERT INTO register_marketing
+ SET uid = {?}, sender = {?}, email = {?},
+ date = NOW(), type = {?}",
+ $uid, Session::get('uid'), Env::get('email'), Env::get('type'));
+}
+
$res = $globals->xdb->iterator(
"SELECT r.*, a.alias
FROM register_marketing AS r
<h2>Adresses connues</h2>
+<form action="{$smarty.request.PHP_SELF}" method="post">
<table class="bicol" cellpadding="0" cellspacing="0">
<tr>
<th>Adresse</th>
<td></td>
<td colspan='5' class='smaller'>(*): mail perso</td>
</tr>
+ <tr>
+ <td>
+ <input type='text' name='email' />
+ </td>
+ <td colspan="4">
+ <select name="type">
+ <option value="staff">staff</option>
+ <option value="user">user</option>
+ </select>
+ </td>
+ <td class='action'>
+ <input type='hidden' name='uid' value='{$smarty.request.uid}' />
+ <input type='submit' name='action' value='ajouter' />
+ </td>
+ </tr>
</table>
+</form>
{if $rel_to}
<form action="{$smarty.request.PHP_SELF}" method="post">