4 |
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> |
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> |
5 |
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> |
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> |
6 |
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com> |
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com> |
7 |
|
* Copyright (C) 2005 Lionel COUSTEIX <etm_ltd@tiscali.co.uk> |
8 |
* |
* |
9 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
10 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
72 |
$edituser = new User($db, $_GET["id"]); |
$edituser = new User($db, $_GET["id"]); |
73 |
$edituser->fetch($_GET["id"]); |
$edituser->fetch($_GET["id"]); |
74 |
$edituser->disable(); |
$edituser->disable(); |
75 |
Header("Location: index.php"); |
Header("Location: ".DOL_URL_ROOT.'/user/fiche.php?id='.$_GET["id"]); |
76 |
} |
} |
77 |
} |
} |
78 |
|
|
108 |
$edituser->note = trim($_POST["note"]); |
$edituser->note = trim($_POST["note"]); |
109 |
$edituser->prenom = trim($_POST["prenom"]); |
$edituser->prenom = trim($_POST["prenom"]); |
110 |
$edituser->login = trim($_POST["login"]); |
$edituser->login = trim($_POST["login"]); |
111 |
|
$edituser->office_phone = trim($_POST["office_phone"]); |
112 |
|
$edituser->office_fax = trim($_POST["office_fax"]); |
113 |
|
$edituser->user_mobile = trim($_POST["user_mobile"]); |
114 |
$edituser->email = trim($_POST["email"]); |
$edituser->email = trim($_POST["email"]); |
115 |
$edituser->admin = trim($_POST["admin"]); |
$edituser->admin = trim($_POST["admin"]); |
116 |
$edituser->webcal_login = trim($_POST["webcal_login"]); |
$edituser->webcal_login = trim($_POST["webcal_login"]); |
177 |
$edituser->note = $_POST["note"]; |
$edituser->note = $_POST["note"]; |
178 |
$edituser->prenom = $_POST["prenom"]; |
$edituser->prenom = $_POST["prenom"]; |
179 |
$edituser->login = $_POST["login"]; |
$edituser->login = $_POST["login"]; |
180 |
|
$edituser->office_phone = $_POST["office_phone"]; |
181 |
|
$edituser->office_fax = $_POST["office_fax"]; |
182 |
|
$edituser->user_mobile = $_POST["user_mobile"]; |
183 |
$edituser->email = $_POST["email"]; |
$edituser->email = $_POST["email"]; |
184 |
$edituser->admin = $_POST["admin"]; |
$edituser->admin = $_POST["admin"]; |
185 |
$edituser->webcal_login = $_POST["webcal_login"]; |
$edituser->webcal_login = $_POST["webcal_login"]; |
298 |
print '<tr><td valign="top">'.$langs->trans("Password").'</td>'; |
print '<tr><td valign="top">'.$langs->trans("Password").'</td>'; |
299 |
print '<td class="valeur"><input size="30" type="text" name="password" value=""></td></tr>'; |
print '<td class="valeur"><input size="30" type="text" name="password" value=""></td></tr>'; |
300 |
|
|
301 |
|
print '<tr><td valign="top">'.$langs->trans("Phone").'</td>'; |
302 |
|
print '<td class="valeur"><input size="20" type="text" name="office_phone" value=""></td></tr>'; |
303 |
|
|
304 |
|
print '<tr><td valign="top">'.$langs->trans("Fax").'</td>'; |
305 |
|
print '<td class="valeur"><input size="20" type="text" name="office_fax" value=""></td></tr>'; |
306 |
|
|
307 |
|
print '<tr><td valign="top">'.$langs->trans("Mobile").'</td>'; |
308 |
|
print '<td class="valeur"><input size="20" type="text" name="user_mobile" value=""></td></tr>'; |
309 |
|
|
310 |
print '<tr><td valign="top">'.$langs->trans("EMail").'</td>'; |
print '<tr><td valign="top">'.$langs->trans("EMail").'</td>'; |
311 |
print '<td class="valeur"><input size="40" type="text" name="email" value=""></td></tr>'; |
print '<td class="valeur"><input size="40" type="text" name="email" value=""></td></tr>'; |
312 |
|
|
430 |
|
|
431 |
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>'; |
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>'; |
432 |
print '<td width="50%" class="valeur">'.$fuser->nom.'</td>'; |
print '<td width="50%" class="valeur">'.$fuser->nom.'</td>'; |
433 |
print '<td align="center" valign="middle" width="25%" rowspan="8">'; |
print '<td align="center" valign="middle" width="25%" rowspan="11">'; |
434 |
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg")) |
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg")) |
435 |
{ |
{ |
436 |
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">'; |
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">'; |
454 |
{ |
{ |
455 |
print '<td width="50%" class="error">'.$langs->trans("LoginAccountDisable").'</td></tr>'; |
print '<td width="50%" class="error">'.$langs->trans("LoginAccountDisable").'</td></tr>'; |
456 |
} |
} |
457 |
|
|
458 |
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Phone").'</td>'; |
459 |
|
print '<td width="50%" class="valeur">'.$fuser->office_phone.'</td>'; |
460 |
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Fax").'</td>'; |
461 |
|
print '<td width="50%" class="valeur">'.$fuser->office_fax.'</td>'; |
462 |
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Mobile").'</td>'; |
463 |
|
print '<td width="50%" class="valeur">'.$fuser->user_mobile.'</td>'; |
464 |
|
|
465 |
print '<tr><td width="25%" valign="top">'.$langs->trans("EMail").'</td>'; |
print '<tr><td width="25%" valign="top">'.$langs->trans("EMail").'</td>'; |
466 |
print '<td width="50%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>'; |
print '<td width="50%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>'; |
467 |
print "</tr>\n"; |
print "</tr>\n"; |
571 |
# $sql .= " WHERE ug.fk_usergroup IS NULL"; |
# $sql .= " WHERE ug.fk_usergroup IS NULL"; |
572 |
$sql .= " ORDER BY ug.nom"; |
$sql .= " ORDER BY ug.nom"; |
573 |
|
|
574 |
$result = $db->query($sql); |
$resql = $db->query($sql); |
575 |
if ($result) |
if ($resql) |
576 |
{ |
{ |
577 |
$num = $db->num_rows(); |
$num = $db->num_rows($resql); |
578 |
$i = 0; |
$i = 0; |
579 |
|
|
580 |
while ($i < $num) |
while ($i < $num) |
581 |
{ |
{ |
582 |
$obj = $db->fetch_object(); |
$obj = $db->fetch_object($resql); |
583 |
|
|
584 |
$uss[$obj->rowid] = $obj->nom; |
$uss[$obj->rowid] = $obj->nom; |
585 |
$i++; |
$i++; |
680 |
print '<table width="100%" class="border">'; |
print '<table width="100%" class="border">'; |
681 |
|
|
682 |
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>'; |
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>'; |
683 |
print '<td width="50%" class="valeur"><input size="30" type="text" name="nom" value="'.$fuser->nom.'"></td>'; |
print '<td width="50%" class="valeur"><input class="flat" size="30" type="text" name="nom" value="'.$fuser->nom.'"></td>'; |
684 |
print '<td align="center" valign="middle" width="25%" rowspan="6">'; |
print '<td align="center" valign="middle" width="25%" rowspan="9">'; |
685 |
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg")) |
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg")) |
686 |
{ |
{ |
687 |
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">'; |
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">'; |
690 |
{ |
{ |
691 |
print '<img src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">'; |
print '<img src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">'; |
692 |
} |
} |
693 |
print '<br><br><table class="noborder"><tr><td>'.$langs->trans("PhotoFile").'</td></tr><tr><td><input type="file" name="photo" class="flat"></td></tr></table>'; |
print '<br><br><table class="noborder"><tr><td>'.$langs->trans("PhotoFile").'</td></tr><tr><td><input type="file" class="flat" name="photo"></td></tr></table>'; |
694 |
print '</td></tr>'; |
print '</td></tr>'; |
695 |
|
|
696 |
print "<tr>".'<td valign="top">'.$langs->trans("Firstname").'</td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("Firstname").'</td>'; |
697 |
print '<td><input size="30" type="text" name="prenom" value="'.$fuser->prenom.'"></td></tr>'; |
print '<td><input size="30" type="text" class="flat" name="prenom" value="'.$fuser->prenom.'"></td></tr>'; |
698 |
|
|
699 |
print "<tr>".'<td valign="top">'.$langs->trans("Login").'</td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("Login").'</td>'; |
700 |
print '<td><input size="12" maxlength="8" type="text" name="login" value="'.$fuser->login.'"></td></tr>'; |
print '<td><input size="12" maxlength="8" type="text" class="flat" name="login" value="'.$fuser->login.'"></td></tr>'; |
701 |
|
|
702 |
|
print "<tr>".'<td valign="top">'.$langs->trans("Phone").'</td>'; |
703 |
|
print '<td><input size="20" type="text" name="office_phone" class="flat" value="'.$fuser->office_phone.'"></td></tr>'; |
704 |
|
|
705 |
|
print "<tr>".'<td valign="top">'.$langs->trans("Fax").'</td>'; |
706 |
|
print '<td><input size="20" type="text" name="office_fax" class="flat" value="'.$fuser->office_fax.'"></td></tr>'; |
707 |
|
|
708 |
|
print "<tr>".'<td valign="top">'.$langs->trans("Mobile").'</td>'; |
709 |
|
print '<td><input size="20" type="text" name="user_mobile" class="flat" value="'.$fuser->user_mobile.'"></td></tr>'; |
710 |
|
|
711 |
print "<tr>".'<td valign="top">'.$langs->trans("EMail").'</td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("EMail").'</td>'; |
712 |
print '<td><input size="30" type="text" name="email" value="'.$fuser->email.'"></td></tr>'; |
print '<td><input size="30" type="text" name="email" class="flat" value="'.$fuser->email.'"></td></tr>'; |
713 |
|
|
714 |
print "<tr>".'<td valign="top">'.$langs->trans("Administrator").'</td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("Administrator").'</td>'; |
715 |
if ($fuser->societe_id > 0) |
if ($fuser->societe_id > 0) |
726 |
} |
} |
727 |
|
|
728 |
print "<tr>".'<td valign="top">'.$langs->trans("Note").'</td><td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("Note").'</td><td>'; |
729 |
print '<textarea name="note" rows="10" cols="40">'; |
print '<textarea class="flat" name="note" rows="6" cols="40">'; |
730 |
print $fuser->note; |
print $fuser->note; |
731 |
print "</textarea></td></tr>"; |
print "</textarea></td></tr>"; |
732 |
|
|
733 |
// Autres caractéristiques issus des autres modules |
// Autres caractéristiques issus des autres modules |
734 |
$langs->load("other"); |
$langs->load("other"); |
735 |
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>'; |
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>'; |
736 |
print '<td class="valeur" colspan="2"><input size="30" type="text" name="webcal_login" value="'.$fuser->webcal_login.'"></td></tr>'; |
print '<td class="valeur" colspan="2"><input size="30" type="text" class="flat" name="webcal_login" value="'.$fuser->webcal_login.'"></td></tr>'; |
737 |
|
|
738 |
print '<tr><td align="center" colspan="3"><input value="'.$langs->trans("Save").'" class="button" type="submit"></td></tr>'; |
print '<tr><td align="center" colspan="3"><input value="'.$langs->trans("Save").'" class="button" type="submit"></td></tr>'; |
739 |
|
|