4 <title>Profile Manager Control Panel</title>
6 <style type="text/css">
7 #normal { background-color: white; font-family: sans-serif }
8 td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
9 td.back { background-color: #e6e6fa; color: brown }
10 #indent { margin-left: 1cm; margin-right: 1cm }
13 <script language="JavaScript">
15 function getParam(name, def)
17 var search = top.location.search;
18 search = search.slice(1);
19 var args = search.split("&");
21 for (var i = 0 ; i < args.length ; i++) {
22 var couple = args[i].split("=");
23 if (couple[0] == name) value = couple[1];
25 if (value == "-1") value = def;
29 function getInitialURL()
31 return getParam("pmURL", "http://mowgli.cs.unibo.it:58099/");
36 return document.pmURL.elements[0].value;
41 if (ss.selectedIndex == 0) {
42 document.pmURL.elements[0].value = "";
44 document.pmURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value;
48 function escapePassword(pwd)
53 return ("&password=" + escape(pwd));
57 function getAccess(ss)
59 return (ss.options[ss.selectedIndex].value);
68 <table border="0" width="100%" cellpadding="4">
69 <tr><td class="head" align="center"><big><big>Profile Manager Control Panel</big></big></td></tr>
75 This is a control panel for the profile manager. You can control a
76 local or remote profile manager by filling the appropriate field below
77 and sending the desired commands. Any command issued to the profile
78 manager results into an XML response. Note that in order to use this
79 page <i>you must have JavaScript enabled</i>. If you have troubles,
80 please send an email to the author: lpadovan at cs dot unibo dot it.
84 <div style="color: red">
85 <b>WARNING</b>: the information stored in a profile,
86 including the password, IS NOT encrypted in the profile nor while it
87 is travelling from your computer to the profile manager. DO NOT USE
88 THE PROFILE MANAGER FOR STORING SENSIBLE INFORMATION LIKE PASSWORDS
89 FOR SECURE ACCOUNTS OR ANY OTHER PERSONAL DATA. </div>
98 Profile Manager <b>URL</b>
99 <input type="text" value="http://localhost:58099/" size="50"/>
100 <select onChange="setURL(this)">
101 <option value="">---</option>
102 <option value="localhost:58099/">localhost</option>
103 <option value="mowgli.cs.unibo.it:58099/">mowgli</option>
109 <b>List</b> the profiles currently stored in the Profile Manager<br />
110 <input type="button" value="List"
111 onClick="top.result.location.replace(getURL() + 'list')"/>
117 <form name="newProfile">
118 <b>Create</b> a new profile<br />
120 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /> (leave blank if you want an ID to be assigned automatically)</td></tr>
121 <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
123 <input type="button" value="Create"
124 onClick="top.result.location.replace(getURL() +
125 'new?id=' + escape(document.newProfile.elements[0].value))"/>
131 <form name="delProfile">
132 <b>Delete</b> an existing profile<br />
134 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
135 <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
137 <input type="button" value="Delete"
138 onClick="top.result.location.replace(getURL() +
139 'del?id=' + escape(document.delProfile.elements[0].value) +
140 '&password=' + escape(document.delProfile.elements[1].value))"/>
146 <form name="getProfile">
147 <b>Retrieve</b> an existing profile<br />
149 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
150 <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
152 <input type="button" value="Get"
153 onClick="top.result.location.replace(getURL() +
154 'get?id=' + escape(document.getProfile.elements[0].value) +
155 '&password=' + escape(document.getProfile.elements[1].value))"/>
161 <form name="setProfile">
162 <b>Set</b> the value for a field in an existing profile<br />
164 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
165 <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
166 <tr><td>Field:</td><td><input type="text" name="field" value="" /></td></tr>
167 <tr><td>Value:</td><td><input type="text" name="value" value="" /> (optional, if blank will remove the field from the profile)</td></tr>
169 <input type="button" value="Set"
170 onClick="top.result.location.replace(getURL() +
171 'set?id=' + escape(document.setProfile.elements[0].value) +
172 '&password=' + escape(document.setProfile.elements[1].value) +
173 '&field=' + escape(document.setProfile.elements[2].value) +
174 '&value=' + escape(document.setProfile.elements[3].value))"/>
180 <form name="setPassword">
181 <b>Set/Change</b> the password for a profile<br />
183 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
184 <tr><td>Old password:</td><td><input type="text" name="old_password" value="" /> (optional)</td></tr>
185 <tr><td>New password:</td><td><input type="text" name="new_password" value="" /> (optional)</td></tr>
187 <input type="button" value="Set/Change"
188 onClick="top.result.location.replace(getURL() +
189 'password?id=' + escape(document.setPassword.elements[0].value) +
190 '&old_password=' + escape(document.setPassword.elements[1].value) +
191 '&new_password=' + escape(document.setPassword.elements[2].value))"/>
197 <form name="setAccess">
198 <b>Set</b> the access capabilities for a profile<br />
200 <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
201 <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
202 <tr><td>Read access:</td><td>
204 <option value="allowed">allowed</option>
205 <option value="denied">denied</option>
206 <option value="password">allowed with password</option>
209 <tr><td>Write access:</td><td>
211 <option value="allowed">allowed</option>
212 <option value="denied">denied</option>
213 <option value="password">allowed with password</option>
216 <tr><td>Profile access:</td><td>
218 <option value="allowed">allowed</option>
219 <option value="denied">denied</option>
220 <option value="password">allowed with password</option>
224 <input type="button" value="Set"
225 onClick="top.result.location.replace(getURL() +
226 'access?id=' + escape(document.setAccess.elements[0].value) +
227 '&password=' + escape(document.setAccess.elements[1].value) +
228 '&read=' + getAccess(document.setAccess.elements[2]) +
229 '&write=' + getAccess(document.setAccess.elements[3]) +
230 '&profile=' + getAccess(document.setAccess.elements[4]))"/>