diff --git a/.gitattributes b/.gitattributes
index bfedd275..3490091b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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
diff --git a/bureau/admin/adm_add.php b/bureau/admin/adm_add.php
index eac9067f..90d6924f 100644
--- a/bureau/admin/adm_add.php
+++ b/bureau/admin/adm_add.php
@@ -74,6 +74,10 @@ if ($error) {
?>
+
+ |
+ |
+
|
/ |
diff --git a/bureau/admin/adm_doadd.php b/bureau/admin/adm_doadd.php
index c6e14753..7af2ea98 100644
--- a/bureau/admin/adm_doadd.php
+++ b/bureau/admin/adm_doadd.php
@@ -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;
diff --git a/bureau/admin/adm_doedit.php b/bureau/admin/adm_doedit.php
index da97416a..cd1bbe07 100644
--- a/bureau/admin/adm_doedit.php
+++ b/bureau/admin/adm_doedit.php
@@ -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 {
diff --git a/bureau/admin/adm_edit.php b/bureau/admin/adm_edit.php
index d7393d0f..f2e18a23 100644
--- a/bureau/admin/adm_edit.php
+++ b/bureau/admin/adm_edit.php
@@ -94,6 +94,10 @@ include("head.php");
?>
+
+ |
+ |
+
/ "._("First Name"); ?> |
" size="20" maxlength="128" /> / " size="20" maxlength="128" /> |
diff --git a/bureau/class/m_admin.php b/bureau/class/m_admin.php
index 0b561f60..e2b9e4ca 100644
--- a/bureau/class/m_admin.php
+++ b/bureau/class/m_admin.php
@@ -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);
diff --git a/debian/changelog b/debian/changelog
index bfb94802..31b459bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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é Mon, 20 Oct 2008 16:12:28 -0400
diff --git a/install/mysql.sql b/install/mysql.sql
index bcc00081..e393bfe8 100644
--- a/install/mysql.sql
+++ b/install/mysql.sql
@@ -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,
diff --git a/install/upgrades/0.9.10.sql b/install/upgrades/0.9.10.sql
new file mode 100644
index 00000000..ce8efc3d
--- /dev/null
+++ b/install/upgrades/0.9.10.sql
@@ -0,0 +1 @@
+ALTER IGNORE TABLE `membres` ADD COLUMN `notes` TEXT NOT NULL AFTER `type`;
\ No newline at end of file