[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: clicktodial.php,v 1.5 2005/08/11 18:48:08 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/user/clicktodial.php,v $ 21 */ 22 23 /** 24 \file htdocs/user/clicktodial.php 25 \brief Gestion des infos de click to dial 26 \version $Revision: 1.5 $ 27 */ 28 29 require ("./pre.inc.php"); 30 require_once DOL_DOCUMENT_ROOT."/bookmark4u.class.php"; 31 32 $langs->load("users"); 33 34 $form = new Form($db); 35 36 if ($_POST["action"] == 'update') 37 { 38 $edituser = new User($db, $_GET["id"]); 39 40 $edituser->clicktodial_login = $_POST["login"]; 41 $edituser->clicktodial_password = $_POST["password"]; 42 $edituser->clicktodial_poste = $_POST["poste"]; 43 44 $edituser->update_clicktodial(); 45 46 Header("Location: clicktodial.php?id=".$_GET["id"]); 47 } 48 49 llxHeader("","Addon Utilisateur"); 50 51 52 /* ************************************************************************** */ 53 /* */ 54 /* Nouvel utilisateur */ 55 /* */ 56 /* ************************************************************************** */ 57 58 59 if ($_GET["id"]) 60 { 61 $fuser = new User($db, $_GET["id"]); 62 $fuser->fetch(); 63 $fuser->fetch_clicktodial(); 64 65 $bk4u = new Bookmark4u($db); 66 $bk4u->get_bk4u_uid($fuser); 67 68 /* 69 * Affichage onglets 70 */ 71 72 $h = 0; 73 74 $head[$h][0] = DOL_URL_ROOT.'/user/fiche.php?id='.$fuser->id; 75 $head[$h][1] = $langs->trans("UserCard"); 76 $h++; 77 78 $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$fuser->id; 79 $head[$h][1] = $langs->trans("UserRights"); 80 $h++; 81 82 $head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$fuser->id; 83 $head[$h][1] = $langs->trans("UserGUISetup"); 84 $h++; 85 86 if ($conf->bookmark4u->enabled) 87 { 88 $head[$h][0] = DOL_URL_ROOT.'/user/addon.php?id='.$fuser->id; 89 $head[$h][1] = $langs->trans("Bookmark4u"); 90 $h++; 91 } 92 93 if ($conf->clicktodial->enabled) 94 { 95 $head[$h][0] = DOL_URL_ROOT.'/user/clicktodial.php?id='.$fuser->id; 96 $head[$h][1] = $langs->trans("ClickToDial"); 97 $hselected=$h; 98 $h++; 99 } 100 101 dolibarr_fiche_head($head, $hselected, $langs->trans("User").": ".$fuser->fullname); 102 103 /* 104 * Fiche en mode visu 105 */ 106 107 print '<table class="border" width="100%">'; 108 109 print "<tr>".'<td width="25%" valign="top">'.$langs->trans("LastName").'</td>'; 110 print '<td width="25%" class="valeur">'.$fuser->nom.'</td>'; 111 print '<td width="25%" valign="top">'.$langs->trans("FirstName").'</td>'; 112 print '<td width="25%" class="valeur">'.$fuser->prenom.'</td>'; 113 print "</tr>\n"; 114 115 print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>'; 116 print '<td width="25%" class="valeur">'.$fuser->login.'</td>'; 117 print '<td width="25%" valign="top">'.$langs->trans("EMail").'</td>'; 118 print '<td width="25%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>'; 119 print "</tr>\n"; 120 121 print "</table>\n"; 122 print "<br>\n"; 123 124 if ($_GET["action"] == 'edit') 125 { 126 print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">'; 127 print '<input type="hidden" name="action" value="update"></td>'; 128 print '<table class="border" width="100%">'; 129 print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>'; 130 print '<td width="25%" class="valeur">'; 131 print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>'; 132 133 print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>'; 134 print '<td width="25%" class="valeur">'; 135 print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>'; 136 print "</tr>\n"; 137 138 print "<tr>".'<td width="25%" valign="top">Poste</td>'; 139 print '<td width="25%" class="valeur">'; 140 print '<input name="poste" value="'.$fuser->clicktodial_poste.'"></td>'; 141 print '<td width="25%" valign="top"> </td>'; 142 print '<td width="25%" valign="top"> </td>'; 143 144 print "</tr>\n"; 145 146 print '</table><input type="submit"</form>'; 147 } 148 else 149 { 150 151 print '<table class="border" width="100%">'; 152 153 print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>'; 154 print '<td width="25%" class="valeur">'.$fuser->clicktodial_login.'</td>'; 155 print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>'; 156 print '<td width="25%" class="valeur">XXXXXX</a></td>'; 157 print "</tr>\n"; 158 159 print "<tr>".'<td width="25%" valign="top">Poste</td>'; 160 print '<td width="25%" class="valeur">'.$fuser->clicktodial_poste.'</td>'; 161 print '<td width="25%" valign="top"> </td>'; 162 print '<td width="25%" valign="top"> </td>'; 163 164 print "</tr></table>\n"; 165 } 166 167 print "<br>\n"; 168 print "</div>\n"; 169 170 /* 171 * Barre d'actions 172 */ 173 print '<div class="tabsAction">'; 174 175 if ($user->admin && $_GET["action"] <> 'edit') 176 { 177 print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'&action=edit">'.$langs->trans("Edit").'</a>'; 178 } 179 180 if ($user->admin && $_GET["action"] == 'edit') 181 { 182 print '<a class="tabAction" href="clicktodial.php?id='.$fuser->id.'">'.$langs->trans("Cancel").'</a>'; 183 } 184 185 print "</div>\n"; 186 print "<br>\n"; 187 188 } 189 190 191 192 $db->close(); 193 194 llxFooter('$Date: 2005/08/11 18:48:08 $ - $Revision: 1.5 $'); 195 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |