summaryrefslogtreecommitdiffstats
path: root/base/tps/apache/docroot/tokendb/searchCertificateResults.template
blob: bb6dcabf3f53024a8baa9092eba56f3886ee6834 (plain)
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
<!-- --- BEGIN COPYRIGHT BLOCK ---
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; version 2 of the License.

     This program 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 General Public License for more details.

     You should have received a copy of the GNU General Public License along
     with this program; 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">
<link rel="shortcut icon" href="/pki/images/favicon.ico" />
<HEAD>
<TITLE>TPS</Title>
</HEAD>

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
  <tr>
    <td>
      <table border="0" cellspacing="12" cellpadding="0">
        <tr>
          <td><img src="/pki/images/logo_header.gif"></td>
          <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p>

<BODY>

<CMS_TEMPLATE>

<SCRIPT type="text/JavaScript">
<!--
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;
}

var uri = "";
if (typeof(uriBase) == "undefined") {
    uri += "/tus";
} else {
    uri += uriBase;
}
if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
               "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Certificate Results</font>\n");
    cert_uri = uri + "?op=show_certificate&top=operator&cn=";
    uri += "?op=show&top=operator&tid=";
} else {
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
               "<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Certificate Results</font>\n");
    cert_uri = uri + "?op=show_certificate&cn=";
    uri += "?op=show&tid=";
}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
		"<b>UID:</b>" +
                userid + "</td></tr></table>\n");
document.write("<HR NOSHADE SIZE=1>\n");

if (typeof(results) == "undefined" || results.length == 0) {
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Token Not Found</font>\n");
} else {
    document.write("<BR>");
    document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
    document.write("<tr bgcolor=#e5e5e5>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "ID</font>\n");
    document.write("</td>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Serial Number</font>\n");
    document.write("</td>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Subject</font>\n");
    document.write("</td>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Token ID</font>\n");
    document.write("</td>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Key Type</font>\n");
    document.write("</td>\n");
    document.write("<td>\n");
    document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                   "Last Status</font>\n");
    document.write("</td>\n");
    document.write("<td>\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\">"+
                   "Last Modified At</font>\n");
    document.write("</td>\n");
    document.write("</tr>\n");

	for (var i = 0; i < results.length; i++) {
        document.write("<tr>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\""+ cert_uri +
                        results[i].cn+"\">" + results[i].cn + "</a></font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        "0x" + results[i].tokenSerial+"</font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        results[i].tokenSubject+"</font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
                        results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        results[i].tokenKeyType+"</font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        results[i].tokenStatus+"</font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        results[i].tokenUserID+"</font>\n");
        document.write("</td>\n");
        document.write("<td>\n");
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
                        checkDate(results[i].dateOfModify)+"</font>\n");
        document.write("</td>\n");
        document.write("</tr>\n");
    }
    document.write("</table>\n");
    document.write("<DIV ALIGN=LEFT>\n");
    document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
    document.write("<tr>\n");
    if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
        (typeof(num_entries_per_page) != "undefined") &&
        (typeof(my_query) != "undefined")) {

        var new_start = start_entry_val - num_entries_per_page;
        if (new_start < 0) new_start = 0;
        var query = my_query.replace(/&*start_entry_val=\d*/,"");
        var query_array = query.split("&");
        document.write("<td> <form name=prev_entries method=get >");
        for (var i=0; i< query_array.length ; i++) {
            var a = query_array[i].split("=");
            document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
        }
        document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
        document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
    }

    if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
        (typeof(num_entries_per_page) != "undefined") &&
        (typeof(my_query) != "undefined")) {

        var new_start = start_entry_val + num_entries_per_page;
        var query = my_query.replace(/&*start_entry_val=\d*/,"");
        var query_array = query.split("&");
        document.write("<td> <form method=get name=next_entries >");
        for (var i=0; i< query_array.length ; i++) {
            var a = query_array[i].split("=");
            document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
        }
        document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
        document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
    }
    document.write("</tr>\n");
    document.write("</table>\n");
    document.write("</div>\n");

    document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
    if (typeof(results) != "undefined" && results.length > 0) {
        document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
        if (typeof(results) != "undefined" || results.length == 0) {
            if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
                document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
            } else if (typeof(total) != "undefined") {
                document.write("<br>Total Search Results Returned: " + total + "\n");
            }
        }
        document.write("</font>");
    }
}

//-->
</SCRIPT>

</BODY>
</HTML>