source: ether_core/trunk/src/jsp/admin/utilisateur_proprietes.jsp @ 7

Last change on this file since 7 was 5, checked in by cbipsl, 18 years ago

ajout rep. src

  • Property svn:executable set to *
File size: 9.6 KB
Line 
1<!-- Projet Ether - $Id: utilisateur_proprietes.jsp,v 1.15 2002/07/18 12:45:46 pn Exp $ -->
2<html>
3<META HTTP-EQUIV="Cache-Control" content="no-cache">
4<META HTTP-EQUIV="Pragma" content="no-cache">
5<META HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT">
6
7<%@ page import="fr.alcatel.ether.app.user.*" %>
8<%@ page import="fr.alcatel.ether.tools.*"%>
9<%@ page import="fr.alcatel.ether.app.common.* "%>
10<%@ page import="org.apache.ecs.html.*" %>
11<%@ page import="java.util.Locale" %>
12<%@ page import="java.util.Collection" %>
13<%@ page import="java.util.Iterator" %>
14
15
16<jsp:useBean scope="request" id="userBean" class = "fr.alcatel.ether.bean.ContainerBean">
17</jsp:useBean>
18
19<SCRIPT language="JavaScript">
20
21
22function fermer()
23{
24        window.close();
25}
26 
27function sauver()
28{
29        <%
30        // Utilisateur precedemment selectionne?
31        if ( session.getAttribute( Config.SELECTED_USER ) == null )
32        { // Si non, c'est une creation
33        %>
34        document.utilisateurForm.action = "/ether/servlet/UserServlet?action=2";
35        <%
36        }
37        else
38        { // Si oui, c'est une mise a jour
39        %>     
40                document.utilisateurForm.action = "/ether/servlet/UserServlet?action=3"
41        <%
42        }
43        %>
44       
45        document.utilisateurForm.target= "_self";
46        document.utilisateurForm.submit();
47        // window.close();
48
49}
50
51</SCRIPT>
52
53<head>
54<% MultiLanguage ml = MultiLanguage.instance((Locale) JSPUtils.getSessionParameter(request, "langue")); %>
55
56<title><%= ml.get("UtilProp.titre")%></title>
57
58<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
59<link rel="stylesheet" href="/ether/ether.css"></head>
60
61<body background="/images/Ether_Fond1.gif">
62<%
63Config.getConfig();
64
65// initialisation des zones
66String login                                             = "";
67String passwd                                            = "";
68String name                                                      = "";
69String firstName                                 = "";
70String email                                             = "";
71String ipAddress               = "";
72String laboratoryName            = "";
73String laboratoryAddress = "";
74String telephone                                 = "";
75String repository                                = "";
76int networkQuota                                 = Config.networkQuota;
77int repositoryMaxSize            = Config.repositoryMaxSize;
78int repositoryLifeTime   = Config.repositoryLifeTime;
79int mediaId = 0;                                                ;
80String role                                                      = User.UTILISATEUR;
81
82User user = null;
83if ( ( user = (User)session.getAttribute( Config.SELECTED_USER ) ) != null )
84{
85        %>
86        <p class="titrePage" align="center">Propri&eacute;t&eacute;s de l'utilisateur </p>
87        <% 
88    login = user.getLogin();
89                name = user.getName();
90                firstName = user.getFirstName();
91                passwd = user.getPassword();
92                email = user.getEmail();
93                ipAddress = user.getIpAddress();
94                laboratoryName = user.getLaboratoryName();
95                laboratoryAddress  = user.getLaboratoryAddress();
96                telephone = user.getTelephone();
97                repository = user.getRepository();
98                networkQuota = user.getNetworkQuota();
99                repositoryMaxSize = user.getRepositoryMaxSize();
100                repositoryLifeTime = user.getOrderLifeTime();           
101                mediaId = user.getMediaId();
102                role = user.getRole();
103               
104                Config.getConfig();
105                Trace.getTrace("ether");
106                Trace.debug( this, "add="+laboratoryAddress );
107               
108                // Eviter les null dans les champs de saisie
109                if ( login == null ) login = "";
110                if ( name == null ) name = "";
111                if ( firstName == null ) firstName = "";
112                if ( passwd == null ) passwd = "";
113                if ( email == null ) email = "";
114                if ( ipAddress == null ) ipAddress = "";
115                if ( laboratoryName == null ) laboratoryName = "";
116                if ( laboratoryAddress == null ) laboratoryAddress = "";
117                if ( telephone == null ) telephone = "";
118                if ( repository == null ) repository = "";
119}
120else
121{%>
122   <p class="titrePage" align="center"><%= ml.get("UtilProp.creation")%></p>
123<%}
124%>
125
126<p class="titrePage" align="center"><%=Config.tag_image_ligne%></p>
127<p class="titrePage" align="center">&nbsp;</p>
128
129<form name="utilisateurForm" method="post">
130<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0">
131        <tr> 
132      <td width="22%" class="libelleChamp"> 
133        <p class="petit"><b><%= ml.get("Login")%></b> </p>
134      </td>
135      <td width="52%" class="valeurChamp"> 
136        <input type="text" name="login" value="<%=login%>">
137      </td>
138      <td width="26%" class="libelleChamp">&nbsp; </td>
139    </tr>
140    <tr> 
141      <td width="22%" class="libelleChamp"> 
142        <p class="petit"><b><%= ml.get("MotDePasse")%></b> </p>
143      </td>
144      <td width="52%" class="valeurChamp"> 
145        <input type="text" name="passwd" value="<%=passwd%>">
146      </td>
147      <td width="26%" class="libelleChamp">&nbsp; </td>
148    </tr>
149    <tr> 
150      <td width="22%" class="libelleChamp"> 
151        <p class="petit"><b>Nom</b> </p>
152      </td>
153      <td width="52%" class="valeurChamp"> 
154        <input type="text" name="name" value="<%=name%>" size="40">
155      </td>
156      <td width="26%" class="libelleChamp">&nbsp; </td>
157    </tr>
158    <tr> 
159      <td width="22%" class="libelleChamp"> 
160        <p class="petit"><b><%= ml.get("Labo")%></b> </p>
161      </td>
162      <td width="52%" class="valeurChamp"> 
163        <input type="text" name="labName" value="<%=laboratoryName%>" size="40">
164      </td>
165      <td width="26%" class="libelleChamp">&nbsp; </td>
166    </tr>
167    <tr> 
168      <td width="22%" class="libelleChamp"> 
169        <p class="petit"><b><%= ml.get("Adresse_e-mail")%></b></p>
170      </td>
171      <td width="52%" class="valeurChamp"> 
172        <input type="text" name="email" value="<%=email%>" size="40">
173      </td>
174      <td width="26%" class="libelleChamp">&nbsp; </td>
175    </tr>
176    <tr> 
177      <td width="22%" class="libelleChamp"> 
178        <p class="petit"><b><%= ml.get("AdresseIP")%></b></p>
179      </td>
180      <td width="52%" class="valeurChamp"> 
181        <input type="text" name="ip" value="<%=ipAddress%>">
182      </td>
183      <td width="26%" class="libelleChamp"> 
184        <p class="petit">&nbsp;</p>
185      </td>
186    </tr>
187    <tr> 
188      <td width="22%" class="libelleChamp"> 
189        <p class="petit"><b><%= ml.get("Telephone")%></b></p>
190      </td>
191      <td width="52%" class="valeurChamp"> 
192        <input type="text" name="tel" value="<%=telephone%>">
193      </td>
194      <td width="26%" class="libelleChamp">&nbsp; </td>
195    </tr>
196    <tr> 
197      <td width="22%" class="libelleChamp"> 
198        <p class="petit"><b><%= ml.get("Adresse")%> </b></p>
199      </td>
200      <td width="52%" class="valeurChamp"> 
201        <textarea name="labAdd" rows="3" cols="30" wrap="physical"><%=laboratoryAddress%> </textarea>
202      </td>
203      <td width="26%" class="libelleChamp">&nbsp; </td>
204    </tr>
205   
206   
207    <tr> 
208      <td width="22%" class="libelleChamp"> 
209        <p class="petit"><b><%= ml.get("EspaceUtil")%></b></p>
210      </td>
211      <td width="52%" class="valeurChamp"> 
212        <input type="text" name="rep" value="<%=repository%>">
213      </td>
214      <td width="26%" class="libelleChamp"> 
215        <p class="petit"><%= ml.get("CheminComplet")%></p>
216      </td>
217    </tr>
218   
219    <tr> 
220      <td width="22%" class="libelleChamp"> 
221        <p class="petit"><b><%= ml.get("TailleMaxEspUtil")%></b></p>
222      </td>
223      <td width="52%" class="valeurChamp"> 
224        <input type="text" name="maxSize" value="<%=repositoryMaxSize%>">
225      </td>
226      <td width="26%" class="libelleChamp"> 
227        <p class="petit">en Mo</p>
228      </td>
229    </tr>
230   
231    <tr> 
232      <td width="22%" class="libelleChamp"> 
233        <p class="petit"><b><%= ml.get("DureeVieCde")%></b></p>
234      </td>
235      <td width="52%" class="valeurChamp"> 
236        <input type="text" name="lifeTime" value="<%=repositoryLifeTime%>">
237      </td>
238      <td width="26%" class="libelleChamp"> 
239        <p class="petit"><%= ml.get("enJours")%></p>
240      </td>
241    </tr>
242   
243                <tr> 
244      <td width="22%" class="libelleChamp"> 
245        <p class="petit"><b><%= ml.get("TailleMaxTransfertReseau")%></b></p>
246      </td>
247      <td width="52%" class="valeurChamp"> 
248        <input type="text" name="quota" value="<%=networkQuota%>">
249      </td>
250      <td width="26%" class="libelleChamp"> 
251        <p class="petit">en Mo</p>
252      </td>
253    </tr>
254   
255    <tr> 
256      <td width="22%" class="libelleChamp"> 
257        <p class="petit"><b><%= ml.get("MediaDefaut")%></b></p>
258      </td>
259      <td width="52%" class="valeurChamp"> 
260        <select name="media">
261        <%
262          Collection coll = Config.media.values();
263          Iterator it = coll.iterator();
264         
265          Trace.debug( this, "media id=" + mediaId );
266         
267          while ( it.hasNext() )
268          {
269                Media m = (Media)it.next();
270                Trace.debug( this, "curr : " + m.getId() + "," + m.getName() );
271                String selected = "";
272                        if ( mediaId == m.getId() )
273                                selected = "selected";
274                                        %>
275                       
276                        <option value="<%=m.getId()%>" <%=selected%> ><%=m.getName()%>
277       
278                <%}%>
279       
280       
281        </select>
282      </td>
283      <td width="26%" class="libelleChamp"> 
284        <p class="petit">&nbsp;</p>
285      </td>
286    </tr>
287   
288   
289    <tr> 
290      <td width="22%" class="libelleChamp"> 
291        <p class="petit"><b>Role</b></p>
292      </td>
293      <td width="52%" class="valeurChamp"> 
294     
295      <%
296      boolean admin=role.equals( User.ADMINISTRATEUR );
297      %>
298     
299        <select name="role">
300                <option value="<%=User.UTILISATEUR%>" <%=admin?"":"selected"%>><%= ml.get("Utilisateur")%>
301                <option value="<%=User.ADMINISTRATEUR%>" <%=admin?"selected":""%>><%= ml.get("Administrateur")%>
302        </select>
303      </td>
304      <td width="26%" class="libelleChamp"> 
305        <p class="petit">&nbsp;</p>
306      </td>
307    </tr>
308   
309   
310&nbsp;<br>
311</table>
312<table width="14%" border="3" cellspacing="0" cellpadding="0" align="center">
313  <tr>
314    <td width="78%"> 
315        <p align="center"><a href="javascript:sauver()"><%= Config.bouton_sauver.toString() %></a></p>
316    </td>
317    <td width="22%">
318       <p align="center"><a href="javascript:fermer()"><%= Config.bouton_fermer.toString() %></a></p>
319    </td>
320  </tr>
321</table>
322</form>     
323
324</body>
325</html>
Note: See TracBrowser for help on using the repository browser.