Changeset 2452


Ignore:
Timestamp:
01/29/09 01:40:49 (4 years ago)
Author:
anarcat
Message:

add notes field to members

Location:
alternc/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/adm_add.php

    r2247 r2452  
    7676</tr> 
    7777<tr> 
     78        <th><label for="notes"><?php __("Notes"); ?></label></th> 
     79        <td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td> 
     80</tr> 
     81<tr> 
    7882        <th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th> 
    7983        <td><input class="int" type="text" id="nom" name="nom" value="<?php echo $nom; ?>" size="20" maxlength="128" />&nbsp;/&nbsp;<input type="text" name="prenom" id="prenom" value="<?php echo $prenom; ?>" class="int" size="20" maxlength="128" /></td> 
  • alternc/trunk/bureau/admin/adm_doadd.php

    r2247 r2452  
    4242        exit(); 
    4343} 
    44 if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type))) { 
     44if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type, 0, $notes))) { 
    4545        $error=$err->errstr(); 
    4646        include ("adm_add.php"); 
  • alternc/trunk/bureau/admin/adm_doedit.php

    r982 r2452  
    4747} 
    4848 
    49 if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration)){ 
     49if (!$admin->update_mem($uid, $nmail, $nom, $prenom, $pass, $enabled, $canpass, $type, $duration, $notes)){ 
    5050  $error=$err->errstr(); 
    5151  include("adm_edit.php"); 
  • alternc/trunk/bureau/admin/adm_edit.php

    r982 r2452  
    9696</tr> 
    9797<tr> 
     98        <th><label for="notes"><?php __("Notes"); ?></label></th> 
     99        <td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $r['notes']; ?></textarea></td> 
     100</tr> 
     101<tr> 
    98102        <th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th> 
    99103        <td><input type="text" class="int" name="nom" id="nom" value="<?php echo $r["nom"]; ?>" size="20" maxlength="128" />&nbsp;/&nbsp;<input type="text" class="int" name="prenom" id="prenom" value="<?php echo $r["prenom"]; ?>" size="20" maxlength="128" /></td> 
  • alternc/trunk/bureau/class/m_admin.php

    r2447 r2452  
    303303   * 
    304304   */ 
    305   function add_mem($login, $pass, $nom, $prenom, $mail, $canpass=1, $type='default', $duration=0) { 
     305  function add_mem($login, $pass, $nom, $prenom, $mail, $canpass=1, $type='default', $duration=0, $notes = "") { 
    306306    global $err,$quota,$classes,$cuid,$mem,$L_MYSQL_DATABASE,$L_MYSQL_LOGIN; 
    307307    $err->log("admin","add_mem",$login."/".$mail); 
     
    348348      } 
    349349      // on le créé ensuite dans system.membres et system.local 
    350       $db->query("INSERT INTO membres (uid,login,pass,mail,creator,canpass,type,created) VALUES ('$uid','$login','$pass','$mail','$cuid','$canpass', '$type', NOW());"); 
     350      $db->query("INSERT INTO membres (uid,login,pass,mail,creator,canpass,type,created, notes) VALUES ('$uid','$login','$pass','$mail','$cuid','$canpass', '$type', NOW(), '$notes');"); 
    351351      $db->query("INSERT INTO local(uid,nom,prenom) VALUES('$uid','$nom','$prenom');"); 
    352352      $this->renew_update($uid, $duration); 
     
    401401   *  
    402402   */ 
    403   function update_mem($uid, $mail, $nom, $prenom, $pass, $enabled, $canpass, $type='default', $duration=0) { 
     403  function update_mem($uid, $mail, $nom, $prenom, $pass, $enabled, $canpass, $type='default', $duration=0, $notes = "") { 
    404404    global $err,$db; 
    405405    global $cuid, $quota; 
     
    419419    } 
    420420    if (($db->query("UPDATE local SET nom='$nom', prenom='$prenom' WHERE uid='$uid';")) 
    421         &&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', type='$type' $ssq WHERE uid='$uid';"))){ 
     421        &&($db->query("UPDATE membres SET mail='$mail', canpass='$canpass', enabled='$enabled', type='$type', notes='$notes' $ssq WHERE uid='$uid';"))){ 
    422422      if($_POST['reset_quotas'] == "on") 
    423423        $quota->addquotas(); 
  • alternc/trunk/debian/changelog

    r2451 r2452  
    1414    * when adding a new domain to an account, a directory "www/example.net" 
    1515      is automatically created and the domain points to it instead of /. 
     16    * add new field to member form: 'notes' which is just a text field 
    1617 
    1718 -- Antoine Beaupré <anarcat@koumbit.org>  Mon, 20 Oct 2008 16:12:28 -0400 
  • alternc/trunk/install/mysql.sql

    r2326 r2452  
    225225  admlist tinyint(4) default '0',                       # Mode d'affichage de la liste des membres pour les super admins 
    226226  type varchar(128) default 'default', 
     227  notes TEXT NOT NULL, 
    227228  created datetime default NULL,  
    228229  renewed datetime default NULL,  
Note: See TracChangeset for help on using the changeset viewer.