1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
|
<!-- --- BEGIN COPYRIGHT BLOCK ---
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
Copyright (C) 2007 Red Hat, Inc.
All rights reserved.
--- END COPYRIGHT BLOCK --- -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<HEAD>
<TITLE>TPS</Title>
</HEAD>
<table border="0" width="100%" cellspacing="0" cellpadding="6">
<tr bgcolor="#666699">
<td width=25%>
<table border="0" cellspacing="0" cellpadding="6">
<tr>
<td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>®<br>
Certificate<br>System</b></font> </td>
</tr>
</table>
</td>
<td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
<td width="10%"> </td>
</tr>
</table>
<p>
<BODY>
<CMS_TEMPLATE>
<SCRIPT type="text/JavaScript">
<!--
var uri0 = "";
if (typeof(uriBase) == "undefined") {
uri0 += "/tus";
} else {
uri0 += uriBase;
}
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
document.write("<HR NOSHADE SIZE=1>\n");
function breakLines(str) {
str = str.replace('#', '<br>');
return str;
}
function trim(str) {
var i, k, newString;
for (i = 0; i < str.length; i++) {
if (str.charAt(i) != ' ' )
break;
}
for (k = str.length - 1; k >= i; k--) {
if (str.charAt(k) != ' ' ) {
k++;
break;
}
}
if (k > i)
newString = str.substring(i, k);
else
newString = null;
return newString;
}
function checkDate(str) {
var newString;
if (str.length == 15 && str.charAt(14) == 'Z') {
newString = str.substring(0, 4);
newString += '/';
newString += str.substring(4, 6);
newString += '/';
newString += str.substring(6, 8);
newString += ' ';
newString += str.substring(8, 10);
newString += ':';
newString += str.substring(10, 12);
newString += ':';
newString += str.substring(12, 14);
} else {
newString = str;
}
return newString;
}
function doSave(form) {
if (form.uid.value.length > 0) {
var trimmedList = "";
var uids = form.uid.value.split(',');
for (var i=0; i < uids.length; i++) {
if (i > 0) trimmedList += ",";
trimmedList += trim(uids[i]);
}
form.uid.value = trimmedList;
}
if (form.status.value.length > 0) {
form.status.value = trim(form.status.value);
}
if (form.status.value == "") {
alert("Enter token status");
} else {
var uri = "";
if (typeof(uriBase) == "undefined") {
uri += "/tus";
} else {
uri += uriBase;
}
uri += "?op=save&tid="+results[0].cn;
if (results[0].tokenUserID != form.uid.value) {
uri += "&uid=" + form.uid.value;
}
if (results[0].tokenStatus != form.status.value) {
uri += "&s=" + form.status.value;
}
uri += "&m=" + results[0].modified;
location.href = uri;
}
}
function doCancel() {
var uri = "";
if (typeof(uriBase) == "undefined") {
uri += "/tus";
} else {
uri += uriBase;
}
location.href = uri;
}
if (typeof(results) == "undefined" || results.length == 0) {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Token Not Found</font>\n");
} else if (results.length > 1) {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Found too many tokens to edit</font>\n");
} else {
document.write("<BR>");
document.write("<p>\n");
document.write("<b>Token Information:</b>");
document.write("<p>\n");
document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Token: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].cn+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"User ID: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].tokenUserID+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Status: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].tokenStatus+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Reason: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].tokenReason+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Policy: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].tokenPolicy+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
document.write("<p>\n");
document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Key Info: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].keyInfo+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Applet ID: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
results[0].tokenAppletID+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Creation Date: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
checkDate(results[0].dateOfCreate)+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("<tr>\n");
document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Modification Date: </font>\n");
document.write("</td>\n");
document.write("<td>\n");
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
checkDate(results[0].dateOfModify)+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
document.write("</table>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
document.write("<tr>\n");
document.write("<td width=60%>\n");
document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">This token has been physically damaged.</option><option value=\"2\">This token has been permanently lost.</option><option value=\"3\">This token has been temporarily lost.</option><option value=\"4\">This temporarily lost token has been found.</option><option value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option><option value=\"6\">This token has been terminated.</option></select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
document.write("</td>\n");
document.write("<td align=right width=10%>\n");
document.write("</td>\n");
document.write("<td align=right width=10%>\n");
document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
document.write("</td>\n");
document.write("<td align=right width=10%>\n");
document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
document.write("</td>\n");
document.write("<td align=right width=10%>\n");
document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
document.write("</td>\n");
document.write("</tr>\n");
document.write("</table>\n");
}
//-->
</SCRIPT>
</BODY>
</HTML>
|