New: Ajoute fonction de personalisation des paramètres interface par utilisateur
This commit is contained in:
parent
de34d978ac
commit
70be160005
@ -35,14 +35,22 @@ $form = new Form($db);
|
|||||||
|
|
||||||
if ($_GET["action"] == 'create_bk4u_login')
|
if ($_GET["action"] == 'create_bk4u_login')
|
||||||
{
|
{
|
||||||
$edituser = new User($db, $_GET["id"]);
|
$edituser = new User($db, $_GET["id"]);
|
||||||
$edituser->fetch($_GET["id"]);
|
$edituser->fetch($_GET["id"]);
|
||||||
|
|
||||||
$bk4u = new Bookmark4u($db);
|
$bk4u = new Bookmark4u($db);
|
||||||
$bk4u->get_bk4u_uid($fuser);
|
$bk4u->get_bk4u_uid($fuser);
|
||||||
$bk4u->create_account_from_user($edituser);
|
$result=$bk4u->create_account_from_user($edituser);
|
||||||
|
|
||||||
Header("Location: addon.php?id=".$_GET["id"]);
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
Header("Location: addon.php?id=".$_GET["id"]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db,$bk4u->error);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llxHeader("","Addon Utilisateur");
|
llxHeader("","Addon Utilisateur");
|
||||||
@ -56,103 +64,102 @@ llxHeader("","Addon Utilisateur");
|
|||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
$fuser = new User($db, $_GET["id"]);
|
$fuser = new User($db, $_GET["id"]);
|
||||||
$fuser->fetch();
|
$fuser->fetch();
|
||||||
|
|
||||||
$bk4u = new Bookmark4u($db);
|
$bk4u = new Bookmark4u($db);
|
||||||
$bk4u->get_bk4u_uid($fuser);
|
$bk4u->get_bk4u_uid($fuser);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Affichage onglets
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id;
|
||||||
$head[$h][1] = $langs->trans("UserCard");
|
$head[$h][1] = $langs->trans("UserCard");
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if ($user->admin)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
|
||||||
$head[$h][1] = $langs->trans("UserRights");
|
$head[$h][1] = $langs->trans("UserRights");
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->bookmark4u->enabled)
|
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$fuser->id;
|
||||||
{
|
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
|
||||||
$head[$h][1] = $langs->trans("Bookmark4u");
|
|
||||||
$hselected=$h;
|
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->clicktodial->enabled)
|
if ($conf->bookmark4u->enabled)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
||||||
$head[$h][1] = $langs->trans("ClickToDial");
|
$head[$h][1] = $langs->trans("Bookmark4u");
|
||||||
$h++;
|
$hselected=$h;
|
||||||
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
|
if ($conf->clicktodial->enabled)
|
||||||
|
|
||||||
/*
|
|
||||||
* Fiche en mode visu
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->nom.'</td>';
|
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->prenom.'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->login.'</td>';
|
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
|
|
||||||
print '<td width="25%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login Boobkmark4u").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">';
|
|
||||||
|
|
||||||
if ($bk4u->uid == 0)
|
|
||||||
{
|
{
|
||||||
print $langs->trans("NoLogin");
|
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
|
||||||
|
$head[$h][1] = $langs->trans("ClickToDial");
|
||||||
|
$h++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fiche en mode visu
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
||||||
|
print '<td class="valeur">'.$fuser->nom.'</td></tr>';
|
||||||
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
|
||||||
|
print '<td class="valeur">'.$fuser->prenom.'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||||
|
print '<td class="valeur">'.$fuser->login.'</td></tr>';
|
||||||
|
print '<tr><td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
|
||||||
|
print '<td class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login Boobkmark4u").'</td>';
|
||||||
|
print '<td class="valeur">';
|
||||||
|
|
||||||
|
if ($bk4u->uid == 0)
|
||||||
{
|
{
|
||||||
$bk4u->get_bk4u_login();
|
print $langs->trans("NoLogin");
|
||||||
print $bk4u->login;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
print '</td>';
|
|
||||||
print '<td width="25%" valign="top"> </td>';
|
|
||||||
print '<td width="25%" class="valeur"> </td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
print "</div>\n";
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Barre d'actions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->admin)
|
|
||||||
{
|
{
|
||||||
print '<a class="tabAction" href="addon.php?id='.$fuser->id.'&action=create_bk4u_login">'.$langs->trans("Créer login Bookmark4u").'</a>';
|
$bk4u->get_bk4u_login();
|
||||||
|
print $bk4u->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>\n";
|
print '</td>';
|
||||||
print "<br>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "</div>\n";
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Barre d'actions
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
if ($user->admin)
|
||||||
|
{
|
||||||
|
print '<a class="tabAction" href="addon.php?id='.$fuser->id.'&action=create_bk4u_login">'.$langs->trans("Créer login Bookmark4u").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</div>\n";
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,5 +167,5 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -21,9 +21,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/user/clicktodial.php
|
\file htdocs/user/clicktodial.php
|
||||||
\brief Gestion des infos de click to dial
|
\brief Gestion des infos de click to dial
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -58,130 +58,132 @@ llxHeader("","Addon Utilisateur");
|
|||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
$fuser = new User($db, $_GET["id"]);
|
$fuser = new User($db, $_GET["id"]);
|
||||||
$fuser->fetch();
|
$fuser->fetch();
|
||||||
$fuser->fetch_clicktodial();
|
$fuser->fetch_clicktodial();
|
||||||
|
|
||||||
$bk4u = new Bookmark4u($db);
|
$bk4u = new Bookmark4u($db);
|
||||||
$bk4u->get_bk4u_uid($fuser);
|
$bk4u->get_bk4u_uid($fuser);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage onglets
|
* Affichage onglets
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id;
|
||||||
$head[$h][1] = $langs->trans("UserCard");
|
$head[$h][1] = $langs->trans("UserCard");
|
||||||
if ($_GET["action"] != 'perms') { $hselected=$h; }
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
|
|
||||||
$head[$h][1] = $langs->trans("UserRights");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->bookmark4u->enabled)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
|
||||||
$head[$h][1] = $langs->trans("Bookmark4u");
|
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->clicktodial->enabled)
|
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id;
|
||||||
{
|
$head[$h][1] = $langs->trans("UserRights");
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
|
|
||||||
$head[$h][1] = $langs->trans("ClickToDial");
|
|
||||||
$hselected=$h;
|
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
|
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$fuser->id;
|
||||||
|
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||||
|
$h++;
|
||||||
|
|
||||||
/*
|
if ($conf->bookmark4u->enabled)
|
||||||
* Fiche en mode visu
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->nom.'</td>';
|
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->prenom.'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">'.$fuser->login.'</td>';
|
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
|
|
||||||
print '<td width="25%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
if ($_GET["action"] == 'edit')
|
|
||||||
{
|
{
|
||||||
print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">';
|
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
||||||
print '<input type="hidden" name="action" value="update"></td>';
|
$head[$h][1] = $langs->trans("Bookmark4u");
|
||||||
print '<table class="border" width="100%">';
|
$h++;
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">';
|
|
||||||
print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>';
|
|
||||||
|
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
|
||||||
print '<td width="25%" class="valeur">';
|
|
||||||
print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
|
||||||
print '<td width="25%" class="valeur">';
|
|
||||||
print '<input name="poste" value="'.$fuser->clicktodial_poste.'"></td>';
|
|
||||||
print '<td width="25%" valign="top"> </td>';
|
|
||||||
print '<td width="25%" valign="top"> </td>';
|
|
||||||
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print '</table><input type="submit"</form>';
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ($conf->clicktodial->enabled)
|
||||||
|
{
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id;
|
||||||
|
$head[$h][1] = $langs->trans("ClickToDial");
|
||||||
|
$hselected=$h;
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fiche en mode visu
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
|
||||||
|
print '<td width="25%" class="valeur">'.$fuser->nom.'</td>';
|
||||||
|
print '<td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
|
||||||
|
print '<td width="25%" class="valeur">'.$fuser->prenom.'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||||
|
print '<td width="25%" class="valeur">'.$fuser->login.'</td>';
|
||||||
|
print '<td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
|
||||||
|
print '<td width="25%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print "</table>\n";
|
||||||
|
print "<br>\n";
|
||||||
|
|
||||||
|
if ($_GET["action"] == 'edit')
|
||||||
|
{
|
||||||
|
print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">';
|
||||||
|
print '<input type="hidden" name="action" value="update"></td>';
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||||
|
print '<td width="25%" class="valeur">';
|
||||||
|
print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>';
|
||||||
|
|
||||||
|
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
||||||
|
print '<td width="25%" class="valeur">';
|
||||||
|
print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
||||||
|
print '<td width="25%" class="valeur">';
|
||||||
|
print '<input name="poste" value="'.$fuser->clicktodial_poste.'"></td>';
|
||||||
|
print '<td width="25%" valign="top"> </td>';
|
||||||
|
print '<td width="25%" valign="top"> </td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '</table><input type="submit"</form>';
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||||
print '<td width="25%" class="valeur">'.$fuser->clicktodial_login.'</td>';
|
print '<td width="25%" class="valeur">'.$fuser->clicktodial_login.'</td>';
|
||||||
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
||||||
print '<td width="25%" class="valeur">XXXXXX</a></td>';
|
print '<td width="25%" class="valeur">XXXXXX</a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
||||||
print '<td width="25%" class="valeur">'.$fuser->clicktodial_poste.'</td>';
|
print '<td width="25%" class="valeur">'.$fuser->clicktodial_poste.'</td>';
|
||||||
print '<td width="25%" valign="top"> </td>';
|
print '<td width="25%" valign="top"> </td>';
|
||||||
print '<td width="25%" valign="top"> </td>';
|
print '<td width="25%" valign="top"> </td>';
|
||||||
|
|
||||||
print "</tr></table>\n";
|
print "</tr></table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
*
|
*/
|
||||||
*/
|
print '<div class="tabsAction">';
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->admin && $_GET["action"] <> 'edit')
|
if ($user->admin && $_GET["action"] <> 'edit')
|
||||||
{
|
{
|
||||||
print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'&action=edit">'.$langs->trans("Edit").'</a>';
|
print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'&action=edit">'.$langs->trans("Edit").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->admin && $_GET["action"] == 'edit')
|
if ($user->admin && $_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'">'.$langs->trans("Cancel").'</a>';
|
print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'">'.$langs->trans("Cancel").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,5 +191,5 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -102,7 +102,6 @@ if ($_POST["action"] == 'add' && $user->admin)
|
|||||||
$edituser->email = trim($_POST["email"]);
|
$edituser->email = trim($_POST["email"]);
|
||||||
$edituser->admin = trim($_POST["admin"]);
|
$edituser->admin = trim($_POST["admin"]);
|
||||||
$edituser->webcal_login = trim($_POST["webcal_login"]);
|
$edituser->webcal_login = trim($_POST["webcal_login"]);
|
||||||
$edituser->gui_lang = trim($_POST["gui_lang"]);
|
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -169,7 +168,6 @@ if ($_POST["action"] == 'update' && $user->admin)
|
|||||||
$edituser->email = $_POST["email"];
|
$edituser->email = $_POST["email"];
|
||||||
$edituser->admin = $_POST["admin"];
|
$edituser->admin = $_POST["admin"];
|
||||||
$edituser->webcal_login = $_POST["webcal_login"];
|
$edituser->webcal_login = $_POST["webcal_login"];
|
||||||
$edituser->gui_lang = $_POST["gui_lang"];
|
|
||||||
|
|
||||||
$ret=$edituser->update();
|
$ret=$edituser->update();
|
||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
@ -217,7 +215,7 @@ if ($_POST["action"] == 'update' && $user->admin)
|
|||||||
|
|
||||||
// Action modif mot de passe
|
// Action modif mot de passe
|
||||||
if ((($_POST["action"] == 'confirm_password' && $_POST["confirm"] == 'yes')
|
if ((($_POST["action"] == 'confirm_password' && $_POST["confirm"] == 'yes')
|
||||||
|| $_GET["action"] == 'passwordsend') && $user->admin)
|
|| $_GET["action"] == 'confirm_passwordsend') && $user->admin)
|
||||||
{
|
{
|
||||||
$edituser = new User($db, $_GET["id"]);
|
$edituser = new User($db, $_GET["id"]);
|
||||||
$edituser->fetch();
|
$edituser->fetch();
|
||||||
@ -231,7 +229,7 @@ if ((($_POST["action"] == 'confirm_password' && $_POST["confirm"] == 'yes')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Succes
|
// Succes
|
||||||
if ($_GET["action"] == 'passwordsend')
|
if ($_GET["action"] == 'confirm_passwordsend')
|
||||||
{
|
{
|
||||||
if ($edituser->send_password($user,$newpassword) > 0)
|
if ($edituser->send_password($user,$newpassword) > 0)
|
||||||
{
|
{
|
||||||
@ -303,15 +301,10 @@ if ($action == 'create')
|
|||||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
||||||
print '<td class="valeur"><input size="30" type="text" name="webcal_login" value=""></td></tr>';
|
print '<td class="valeur"><input size="30" type="text" name="webcal_login" value=""></td></tr>';
|
||||||
}
|
}
|
||||||
// Langue par defaut
|
|
||||||
print '<tr><td width="30%">'.$langs->trans("GuiLanguage").'</td><td>';
|
|
||||||
$html=new Form($db);
|
|
||||||
$html->select_lang(MAIN_LANG_DEFAULT,'gui_lang');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "<tr>".'<td align="center" colspan="2"><input value="'.$langs->trans("CreateUser").'" type="submit"></td></tr>';
|
print "<tr>".'<td align="center" colspan="2"><input class="button" value="'.$langs->trans("CreateUser").'" type="submit"></td></tr>';
|
||||||
print "</form>";
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print "</form>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -342,6 +335,10 @@ else
|
|||||||
$head[$h][1] = $langs->trans("UserRights");
|
$head[$h][1] = $langs->trans("UserRights");
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$fuser->id;
|
||||||
|
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||||
|
$h++;
|
||||||
|
|
||||||
if ($conf->bookmark4u->enabled)
|
if ($conf->bookmark4u->enabled)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
||||||
@ -360,7 +357,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation modification mot depasse
|
* Confirmation réinitialisation mot de passe
|
||||||
*/
|
*/
|
||||||
if ($action == 'password')
|
if ($action == 'password')
|
||||||
{
|
{
|
||||||
@ -369,6 +366,16 @@ else
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Confirmation envoi mot de passe
|
||||||
|
*/
|
||||||
|
if ($action == 'passwordsend')
|
||||||
|
{
|
||||||
|
$html = new Form($db);
|
||||||
|
$html->form_confirm("fiche.php?id=$fuser->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$fuser->login),"confirm_passwordsend");
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation désactivation
|
* Confirmation désactivation
|
||||||
*/
|
*/
|
||||||
@ -475,13 +482,8 @@ else
|
|||||||
print '<td colspan="2">'.$fuser->webcal_login.' </td>';
|
print '<td colspan="2">'.$fuser->webcal_login.' </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
// Langue par defaut
|
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("GuiLanguage").'</td>';
|
|
||||||
print '<td colspan="2">'.$fuser->gui_lang.' </td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
// print "<br>\n";
|
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
@ -526,8 +528,7 @@ else
|
|||||||
* Liste des groupes dans lequel est l'utilisateur
|
* Liste des groupes dans lequel est l'utilisateur
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre($langs->trans("ListOfGroupsForUser"));
|
print_fiche_titre($langs->trans("ListOfGroupsForUser"));
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// On sélectionne les groups
|
// On sélectionne les groups
|
||||||
$uss = array();
|
$uss = array();
|
||||||
@ -693,12 +694,6 @@ else
|
|||||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
||||||
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" name="webcal_login" value="'.$fuser->webcal_login.'"></td></tr>';
|
||||||
|
|
||||||
// Langue par defaut
|
|
||||||
print '<tr><td width="30%">'.$langs->trans("GuiLanguage").'</td><td>';
|
|
||||||
$html=new Form($db);
|
|
||||||
$html->select_lang(MAIN_LANG_DEFAULT,'gui_lang');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="3"><input value="'.$langs->trans("Save").'" type="submit"></td></tr>';
|
print '<tr><td align="center" colspan="3"><input value="'.$langs->trans("Save").'" type="submit"></td></tr>';
|
||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|||||||
@ -157,9 +157,9 @@ if ($action == 'create')
|
|||||||
print "<textarea name=\"note\" rows=\"12\" cols=\"40\">";
|
print "<textarea name=\"note\" rows=\"12\" cols=\"40\">";
|
||||||
print "</textarea></td></tr>\n";
|
print "</textarea></td></tr>\n";
|
||||||
|
|
||||||
print "<tr>".'<td align="center" colspan="2"><input value="'.$langs->trans("CreateGroup").'" type="submit"></td></tr>';
|
print "<tr>".'<td align="center" colspan="2"><input class="button" value="'.$langs->trans("CreateGroup").'" type="submit"></td></tr>';
|
||||||
print "</form>";
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
print "</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -246,8 +246,7 @@ else
|
|||||||
* Liste des utilisateurs dans le groupe
|
* Liste des utilisateurs dans le groupe
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print_titre($langs->trans("ListOfUsersInGroup"));
|
print_fiche_titre($langs->trans("ListOfUsersInGroup"));
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
// On sélectionne les users qui ne sont pas déjà dans le groupe
|
// On sélectionne les users qui ne sont pas déjà dans le groupe
|
||||||
$uss = array();
|
$uss = array();
|
||||||
|
|||||||
@ -40,9 +40,9 @@ if ($user->admin) $lien='<a href="'.DOL_URL_ROOT.'/user/admin/index.php">'.img_p
|
|||||||
print_fiche_titre($langs->trans("MenuUsersAndGroups"),$lien);
|
print_fiche_titre($langs->trans("MenuUsersAndGroups"),$lien);
|
||||||
|
|
||||||
|
|
||||||
print '<table border="0" width="100%">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
print '<tr><td valign="top" width="30%">';
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ print $langs->trans("Ref").' : <input class="flat" type="text" name="search_user
|
|||||||
print "</form></table><br>\n";
|
print "</form></table><br>\n";
|
||||||
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="70%">';
|
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -86,6 +86,10 @@ if ($_GET["id"])
|
|||||||
$hselected=$h;
|
$hselected=$h;
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$fuser->id;
|
||||||
|
$head[$h][1] = $langs->trans("UserGUISetup");
|
||||||
|
$h++;
|
||||||
|
|
||||||
if ($conf->bookmark4u->enabled)
|
if ($conf->bookmark4u->enabled)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user