add notes field to members
This commit is contained in:
parent
df1646dac5
commit
a7034d7779
|
@ -321,6 +321,7 @@ install/reset_root.php -text
|
|||
install/upgrade_check.sh -text
|
||||
install/upgrades/0.9.1.sh -text
|
||||
install/upgrades/0.9.1.sql -text
|
||||
install/upgrades/0.9.10.sql -text
|
||||
install/upgrades/0.9.1_migrationldap.php -text
|
||||
install/upgrades/0.9.2.php -text
|
||||
install/upgrades/0.9.2.sql -text
|
||||
|
|
|
@ -74,6 +74,10 @@ if ($error) {
|
|||
?></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="notes"><?php __("Notes"); ?></label></th>
|
||||
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
|
||||
<td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td>
|
||||
|
|
|
@ -41,7 +41,7 @@ if ($pass != $passconf) {
|
|||
include("adm_add.php");
|
||||
exit();
|
||||
}
|
||||
if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type))) {
|
||||
if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, 0, $notes))) {
|
||||
$error=$err->errstr();
|
||||
include ("adm_add.php");
|
||||
exit;
|
||||
|
|
|
@ -46,7 +46,7 @@ if ($pass != $passconf) {
|
|||
exit();
|
||||
}
|
||||
|
||||
if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration)){
|
||||
if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration, $notes)){
|
||||
$error=$err->errstr();
|
||||
include("adm_edit.php");
|
||||
} else {
|
||||
|
|
|
@ -94,6 +94,10 @@ include("head.php");
|
|||
?></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="notes"><?php __("Notes"); ?></label></th>
|
||||
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $r['notes']; ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
|
||||
<td><input type="text" class="int" name="nom" id="nom" value="<?php echo $r["nom"]; ?>" size="20" maxlength="128" /> / <input type="text" class="int" name="prenom" id="prenom" value="<?php echo $r["prenom"]; ?>" size="20" maxlength="128" /></td>
|
||||
|
|
|
@ -302,7 +302,7 @@ class m_admin {
|
|||
* @return boolean Retourne FALSE si une erreur s'est produite, TRUE sinon.
|
||||
*
|
||||
*/
|
||||
function add_mem($login, $pass, $nom, $prenom, $mail, $canpass=1, $type='default', $duration=0) {
|
||||
function add_mem($login, $pass, $nom, $prenom, $mail, $canpass=1, $type='default', $duration=0, $notes = "") {
|
||||
global $err,$quota,$classes,$cuid,$mem,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN;
|
||||
$err->log("admin","add_mem",$login."/".$mail);
|
||||
if (!$this->enabled) {
|
||||
|
@ -347,7 +347,7 @@ class m_admin {
|
|||
if ($uid<=2000) $uid=2000;
|
||||
}
|
||||
// on le créé ensuite dans system.membres et system.local
|
||||
$db->query("INSERT INTO membres (uid,login,pass,mail,creator,canpass,type,created) VALUES ('$uid','$login','$pass','$mail','$cuid','$canpass', '$type', NOW());");
|
||||
$db->query("INSERT INTO membres (uid,login,pass,mail,creator,canpass,type,created, notes) VALUES ('$uid','$login','$pass','$mail','$cuid','$canpass', '$type', NOW(), '$notes');");
|
||||
$db->query("INSERT INTO local(uid,nom,prenom) VALUES('$uid','$nom','$prenom');");
|
||||
$this->renew_update($uid, $duration);
|
||||
exec("/usr/lib/alternc/mem_add ".$login." ".$uid);
|
||||
|
@ -400,7 +400,7 @@ class m_admin {
|
|||
* @return boolean Retourne FALSE si une erreur s'est produite, TRUE sinon.
|
||||
*
|
||||
*/
|
||||
function update_mem($uid, $mail, $nom, $prenom, $pass, $enabled, $canpass, $type='default', $duration=0) {
|
||||
function update_mem($uid, $mail, $nom, $prenom, $pass, $enabled, $canpass, $type='default', $duration=0, $notes = "") {
|
||||
global $err,$db;
|
||||
global $cuid, $quota;
|
||||
|
||||
|
@ -418,7 +418,7 @@ class m_admin {
|
|||
$ssq="";
|
||||
}
|
||||
if (($db->query("UPDATE local SET nom='$nom', prenom='$prenom' WHERE uid='$uid';"))
|
||||
&&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', type='$type' $ssq WHERE uid='$uid';"))){
|
||||
&&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', type='$type', notes='$notes' $ssq WHERE uid='$uid';"))){
|
||||
if($_POST['reset_quotas'] == "on")
|
||||
$quota->addquotas();
|
||||
$this->renew_update($uid, $duration);
|
||||
|
|
|
@ -13,6 +13,7 @@ alternc (0.9.10) unstable; urgency=low
|
|||
automatically created in their accoutn.
|
||||
* when adding a new domain to an account, a directory "www/example.net"
|
||||
is automatically created and the domain points to it instead of /.
|
||||
* add new field to member form: 'notes' which is just a text field
|
||||
|
||||
-- Antoine Beaupré <anarcat@koumbit.org> Mon, 20 Oct 2008 16:12:28 -0400
|
||||
|
||||
|
|
|
@ -224,6 +224,7 @@ CREATE TABLE IF NOT EXISTS membres (
|
|||
warnfailed tinyint(4) default '0', # TODO L'utilisateur veut-il recevoir un mail quand on tente de se logguer sur son compte ?
|
||||
admlist tinyint(4) default '0', # Mode d'affichage de la liste des membres pour les super admins
|
||||
type varchar(128) default 'default',
|
||||
notes TEXT NOT NULL,
|
||||
created datetime default NULL,
|
||||
renewed datetime default NULL,
|
||||
duration int(4) default NULL,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER IGNORE TABLE `membres` ADD COLUMN `notes` TEXT NOT NULL AFTER `type`;
|
Loading…
Reference in New Issue