Project

General

Profile

Download (19.2 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
    system_camanager.php
4

    
5
    Copyright (C) 2008 Shrew Soft Inc.
6
    All rights reserved.
7

    
8
    Redistribution and use in source and binary forms, with or without
9
    modification, are permitted provided that the following conditions are met:
10

    
11
    1. Redistributions of source code must retain the above copyright notice,
12
       this list of conditions and the following disclaimer.
13

    
14
    2. Redistributions in binary form must reproduce the above copyright
15
       notice, this list of conditions and the following disclaimer in the
16
       documentation and/or other materials provided with the distribution.
17

    
18
    THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20
    AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
    AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
    POSSIBILITY OF SUCH DAMAGE.
28
*/
29
/*
30
	pfSense_MODULE:	certificate_managaer
31
*/
32

    
33
##|+PRIV
34
##|*IDENT=page-system-camanager
35
##|*NAME=System: CA Manager
36
##|*DESCR=Allow access to the 'System: CA Manager' page.
37
##|*MATCH=system_camanager.php*
38
##|-PRIV
39

    
40
require("guiconfig.inc");
41
require_once("certs.inc");
42

    
43
$ca_methods = array(
44
	"existing" => gettext("Import an existing Certificate Authority"),
45
	"internal" => gettext("Create an internal Certificate Authority"));
46

    
47
$ca_keylens = array( "512", "1024", "2048", "4096");
48

    
49
$pgtitle = array(gettext("System"), gettext("Certificate Authority Manager"));
50

    
51
$id = $_GET['id'];
52
if (isset($_POST['id']))
53
	$id = $_POST['id'];
54

    
55
if (!is_array($config['ca']))
56
	$config['ca'] = array();
57

    
58
$a_ca =& $config['ca'];
59

    
60
if (!is_array($config['cert']))
61
	$config['cert'] = array();
62

    
63
$a_cert =& $config['cert'];
64

    
65
if (!is_array($config['crl']))
66
	$config['crl'] = array();
67

    
68
$a_crl =& $config['crl'];
69

    
70
$act = $_GET['act'];
71
if ($_POST['act'])
72
	$act = $_POST['act'];
73

    
74
if ($act == "del") {
75

    
76
	if (!$a_ca[$id]) {
77
		pfSenseHeader("system_camanager.php");
78
		exit;
79
	}
80

    
81
	$index = count($a_cert) - 1;
82
	for (;$index >=0; $index--)
83
		if ($a_cert[$index]['caref'] == $a_ca[$id]['refid'])
84
			unset($a_cert[$index]);
85

    
86
	$index = count($a_crl) - 1;
87
	for (;$index >=0; $index--)
88
		if ($a_crl[$index]['caref'] == $a_ca[$id]['refid'])
89
			unset($a_crl[$index]);
90

    
91
	$name = $a_ca[$id]['descr'];
92
	unset($a_ca[$id]);
93
	write_config();
94
	$savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted"), $name) . "<br/>";
95
}
96

    
97
if ($act == "edit") {
98
	if (!$a_ca[$id]) {
99
		pfSenseHeader("system_camanager.php");
100
		exit;
101
	}
102
	$pconfig['descr']  = $a_ca[$id]['descr'];
103
	$pconfig['refid']  = $a_ca[$id]['refid'];
104
	$pconfig['cert']   = base64_decode($a_ca[$id]['crt']);
105
	$pconfig['serial'] = $a_ca[$id]['serial'];
106
	if (!empty($a_ca[$id]['prv']))
107
		$pconfig['key'] = base64_decode($a_ca[$id]['prv']);
108
}
109

    
110
if ($act == "new") {
111
	$pconfig['method'] = $_GET['method'];
112
	$pconfig['keylen'] = "2048";
113
	$pconfig['lifetime'] = "3650";
114
	$pconfig['dn_commonname'] = "internal-ca";
115
}
116

    
117
if ($act == "exp") {
118

    
119
	if (!$a_ca[$id]) {
120
		pfSenseHeader("system_camanager.php");
121
		exit;
122
	}
123

    
124
	$exp_name = urlencode("{$a_ca[$id]['descr']}.crt");
125
	$exp_data = base64_decode($a_ca[$id]['crt']);
126
	$exp_size = strlen($exp_data);
127

    
128
	header("Content-Type: application/octet-stream");
129
	header("Content-Disposition: attachment; filename={$exp_name}");
130
	header("Content-Length: $exp_size");
131
	echo $exp_data;
132
	exit;
133
}
134

    
135
if ($act == "expkey") {
136

    
137
	if (!$a_ca[$id]) {
138
		pfSenseHeader("system_camanager.php");
139
		exit;
140
	}
141

    
142
	$exp_name = urlencode("{$a_ca[$id]['descr']}.key");
143
	$exp_data = base64_decode($a_ca[$id]['prv']);
144
	$exp_size = strlen($exp_data);
145

    
146
	header("Content-Type: application/octet-stream");
147
	header("Content-Disposition: attachment; filename={$exp_name}");
148
	header("Content-Length: $exp_size");
149
	echo $exp_data;
150
	exit;
151
}
152

    
153
if ($_POST) {
154

    
155
	unset($input_errors);
156
	$pconfig = $_POST;
157

    
158
	/* input validation */
159
	if ($pconfig['method'] == "existing") {
160
		$reqdfields = explode(" ", "descr cert");
161
		$reqdfieldsn = array(
162
				gettext("Descriptive name"),
163
				gettext("Certificate data"));
164
		if ($_POST['cert'] && (!strstr($_POST['cert'], "BEGIN CERTIFICATE") || !strstr($_POST['cert'], "END CERTIFICATE")))
165
			$input_errors[] = gettext("This certificate does not appear to be valid.");
166
		if ($_POST['key'] && strstr($_POST['key'], "ENCRYPTED"))
167
			$input_errors[] = gettext("Encrypted private keys are not yet supported.");
168
	}
169
	if ($pconfig['method'] == "internal") {
170
		$reqdfields = explode(" ",
171
				"descr keylen lifetime dn_country dn_state dn_city ".
172
				"dn_organization dn_email dn_commonname");
173
		$reqdfieldsn = array(
174
				gettext("Descriptive name"),
175
				gettext("Key length"),
176
				gettext("Lifetime"),
177
				gettext("Distinguished name Country Code"),
178
				gettext("Distinguished name State or Province"),
179
				gettext("Distinguished name City"),
180
				gettext("Distinguished name Organization"),
181
				gettext("Distinguished name Email Address"),
182
				gettext("Distinguished name Common Name"));
183
	}
184

    
185
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
186

    
187
	/* if this is an AJAX caller then handle via JSON */
188
	if (isAjax() && is_array($input_errors)) {
189
		input_errors2Ajax($input_errors);
190
		exit;
191
	}
192

    
193
	/* save modifications */
194
	if (!$input_errors) {
195

    
196
		$ca = array();
197
		if (!isset($pconfig['refid']) || empty($pconfig['refid']))
198
			$ca['refid'] = uniqid();
199
		else
200
			$ca['refid'] = $pconfig['refid'];
201

    
202
		if (isset($id) && $a_ca[$id])
203
			$ca = $a_ca[$id];
204

    
205
		$ca['descr'] = $pconfig['descr'];
206

    
207
		if ($_POST['edit'] == "edit") {
208
			$ca['descr']  = $pconfig['descr'];
209
			$ca['refid']  = $pconfig['refid'];
210
			$ca['serial'] = $pconfig['serial'];
211
			$ca['crt']    = base64_encode($pconfig['cert']);
212
			if (!empty($pconfig['key']))
213
				$ca['prv']    = base64_encode($pconfig['key']);
214
		} else {
215
			if ($pconfig['method'] == "existing")
216
				ca_import($ca, $pconfig['cert'], $pconfig['key'], $pconfig['serial']);
217

    
218
			if ($pconfig['method'] == "internal") {
219
				$dn = array(
220
					'countryName' => $pconfig['dn_country'],
221
					'stateOrProvinceName' => $pconfig['dn_state'],
222
					'localityName' => $pconfig['dn_city'],
223
					'organizationName' => $pconfig['dn_organization'],
224
					'emailAddress' => $pconfig['dn_email'],
225
					'commonName' => $pconfig['dn_commonname']);
226
				ca_create($ca, $pconfig['keylen'], $pconfig['lifetime'], $dn);
227
			}
228
		}
229

    
230
		if (isset($id) && $a_ca[$id])
231
			$a_ca[$id] = $ca;
232
		else
233
			$a_ca[] = $ca;
234

    
235
		write_config();
236

    
237
//		pfSenseHeader("system_camanager.php");
238
	}
239
}
240

    
241
include("head.inc");
242
?>
243

    
244
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
245
<?php include("fbegin.inc"); ?>
246
<script type="text/javascript">
247
<!--
248

    
249
function method_change() {
250

    
251
	method = document.iform.method.selectedIndex;
252

    
253
	switch (method) {
254
		case 0:
255
			document.getElementById("existing").style.display="";
256
			document.getElementById("internal").style.display="none";
257
			break;
258
		case 1:
259
			document.getElementById("existing").style.display="none";
260
			document.getElementById("internal").style.display="";
261
			break;
262
	}
263
}
264

    
265
//-->
266
</script>
267
<?php
268
	if ($input_errors)
269
		print_input_errors($input_errors);
270
	if ($savemsg)
271
		print_info_box($savemsg);
272
?>
273
<table width="100%" border="0" cellpadding="0" cellspacing="0">
274
	<tr>
275
		<td>
276
		<?php
277
			$tab_array = array();
278
			$tab_array[] = array(gettext("CAs"), true, "system_camanager.php");
279
			$tab_array[] = array(gettext("Certificates"), false, "system_certmanager.php");
280
			$tab_array[] = array(gettext("Certificate Revocation"), false, "system_crlmanager.php");
281
			display_top_tabs($tab_array);
282
		?>
283
		</td>
284
	</tr>
285
	<tr>
286
		<td id="mainarea">
287
			<div class="tabcont">
288

    
289
				<?php if ($act == "new" || $act == "edit" || $act == gettext("Save") || $input_errors): ?>
290

    
291
				<form action="system_camanager.php" method="post" name="iform" id="iform">
292
					<?php if ($act == "edit"): ?>
293
					<input type="hidden" name="edit" value="edit" id="edit">
294
					<input type="hidden" name="id" value="<?php echo $id; ?>" id="id">
295
					<input type="hidden" name="refid" value="<?php echo $pconfig['refid']; ?>" id="refid">
296
					<?php endif; ?>
297
					<table width="100%" border="0" cellpadding="6" cellspacing="0">
298
						<tr>
299
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Descriptive name");?></td>
300
							<td width="78%" class="vtable">
301
								<input name="descr" type="text" class="formfld unknown" id="descr" size="20" value="<?=htmlspecialchars($pconfig['descr']);?>"/>
302
							</td>
303
						</tr>
304
						<?php if (!isset($id) || $act == "edit"): ?>
305
						<tr>
306
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Method");?></td>
307
							<td width="78%" class="vtable">
308
								<select name='method' id='method' class="formselect" onchange='method_change()'>
309
								<?php
310
									foreach($ca_methods as $method => $desc):
311
									$selected = "";
312
									if ($pconfig['method'] == $method)
313
										$selected = "selected";
314
								?>
315
									<option value="<?=$method;?>"<?=$selected;?>><?=$desc;?></option>
316
								<?php endforeach; ?>
317
								</select>
318
							</td>
319
						</tr>
320
						<?php endif; ?>
321
					</table>
322

    
323
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="existing">
324
						<tr>
325
							<td colspan="2" class="list" height="12"></td>
326
						</tr>
327
						<tr>
328
							<td colspan="2" valign="top" class="listtopic"><?=gettext("Existing Certificate Authority");?></td>
329
						</tr>
330

    
331
						<tr>
332
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Certificate data");?></td>
333
							<td width="78%" class="vtable">
334
								<textarea name="cert" id="cert" cols="65" rows="7" class="formfld_cert"><?=htmlspecialchars($pconfig['cert']);?></textarea>
335
								<br>
336
								<?=gettext("Paste a certificate in X.509 PEM format here.");?></td>
337
							</td>
338
						</tr>
339
						<tr>
340
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Certificate Private Key");?><br/><?=gettext("(optional)");?></td>
341
							<td width="78%" class="vtable">
342
								<textarea name="key" id="key" cols="65" rows="7" class="formfld_cert"><?=htmlspecialchars($pconfig['key']);?></textarea>
343
								<br>
344
								<?=gettext("Paste the private key for the above certificate here. This is optional in most cases, but required if you need to generate a Certificate Revocation List (CRL).");?></td>
345
							</td>
346
						</tr>
347

    
348
					<?php if (!isset($id) || $act == "edit"): ?>
349
						<tr>
350
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Serial");?></td>
351
							<td width="78%" class="vtable">
352
								<input name="serial" type="text" class="formfld unknown" id="serial" size="20" value="<?=htmlspecialchars($pconfig['serial']);?>"/>
353
							</td>
354
						</tr>
355
					<?php endif; ?>
356
					</table>
357

    
358
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="internal">
359
						<tr>
360
							<td colspan="2" class="list" height="12"></td>
361
						</tr>
362
						<tr>
363
							<td colspan="2" valign="top" class="listtopic"><?=gettext("Internal Certificate Authority");?></td>
364
						</tr>
365
						<tr>
366
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Key length");?></td>
367
							<td width="78%" class="vtable">
368
								<select name='keylen' id='keylen' class="formselect">
369
								<?php
370
									foreach( $ca_keylens as $len):
371
									$selected = "";
372
									if ($pconfig['keylen'] == $len)
373
										$selected = "selected";
374
								?>
375
									<option value="<?=$len;?>"<?=$selected;?>><?=$len;?></option>
376
								<?php endforeach; ?>
377
								</select>
378
								<?=gettext("bits");?>
379
							</td>
380
						</tr>
381
						<tr>
382
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Lifetime");?></td>
383
							<td width="78%" class="vtable">
384
								<input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="5" value="<?=htmlspecialchars($pconfig['lifetime']);?>"/>
385
								<?=gettext("days");?>
386
							</td>
387
						</tr>
388
						<tr>
389
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Distinguished name");?></td>
390
							<td width="78%" class="vtable">
391
								<table border="0" cellspacing="0" cellpadding="2">
392
									<tr>
393
										<td align="right"><?=gettext("Country Code");?> : &nbsp;</td>
394
										<td align="left">
395
											<input name="dn_country" type="text" class="formfld unknown" maxlength="2" size="2" value="<?=htmlspecialchars($pconfig['dn_country']);?>"/>
396
											&nbsp;
397
											<em><?=gettext("ex:");?></em>
398
											&nbsp;
399
											<?=gettext("US");?>
400
											<em><?=gettext("( two letters )");?></em>
401
										</td>
402
									</tr>
403
									<tr>
404
										<td align="right"><?=gettext("State or Province");?> : &nbsp;</td>
405
										<td align="left">
406
											<input name="dn_state" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_state']);?>"/>
407
											&nbsp;
408
											<em><?=gettext("ex:");?></em>
409
											&nbsp;
410
											<?=gettext("Texas");?>
411
										</td>
412
									</tr>
413
									<tr>
414
										<td align="right"><?=gettext("City");?> : &nbsp;</td>
415
										<td align="left">
416
											<input name="dn_city" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_city']);?>"/>
417
											&nbsp;
418
											<em><?=gettext("ex:");?></em>
419
											&nbsp;
420
											<?=gettext("Austin");?>
421
										</td>
422
									</tr>
423
									<tr>
424
										<td align="right"><?=gettext("Organization");?> : &nbsp;</td>
425
										<td align="left">
426
											<input name="dn_organization" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['dn_organization']);?>"/>
427
											&nbsp;
428
											<em><?=gettext("ex:");?></em>
429
											&nbsp;
430
											<?=gettext("My Company Inc.");?>
431
										</td>
432
									</tr>
433
									<tr>
434
										<td align="right"><?=gettext("Email Address");?> : &nbsp;</td>
435
										<td align="left">
436
											<input name="dn_email" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_email']);?>"/>
437
											&nbsp;
438
											<em><?=gettext("ex:");?></em>
439
											&nbsp;
440
											<?=gettext("admin@mycompany.com");?>
441
										</td>
442
									</tr>
443
									<tr>
444
										<td align="right"><?=gettext("Common Name");?> : &nbsp;</td>
445
										<td align="left">
446
											<input name="dn_commonname" type="text" class="formfld unknown" size="25" value="<?=htmlspecialchars($pconfig['dn_commonname']);?>"/>
447
											&nbsp;
448
											<em><?=gettext("ex:");?></em>
449
											&nbsp;
450
											<?=gettext("internal-ca");?>
451
										</td>
452
									</tr>
453
								</table>
454
							</td>
455
						</tr>
456
					</table>
457

    
458
					<table width="100%" border="0" cellpadding="6" cellspacing="0">
459
						<tr>
460
							<td width="22%" valign="top">&nbsp;</td>
461
							<td width="78%">
462
								<input id="submit" name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
463
								<?php if (isset($id) && $a_ca[$id]): ?>
464
								<input name="id" type="hidden" value="<?=$id;?>" />
465
								<?php endif;?>
466
							</td>
467
						</tr>
468
					</table>
469
				</form>
470

    
471
				<?php else: ?>
472

    
473
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
474
					<tr>
475
						<td width="20%" class="listhdrr"><?=gettext("Name");?></td>
476
						<td width="10%" class="listhdrr"><?=gettext("Internal");?></td>
477
						<td width="10%" class="listhdrr"><?=gettext("Issuer");?></td>
478
						<td width="10%" class="listhdrr"><?=gettext("Certificates");?></td>
479
						<td width="40%" class="listhdrr"><?=gettext("Distinguished Name");?></td>
480
						<td width="10%" class="list"></td>
481
					</tr>
482
					<?php
483
						$i = 0;
484
						foreach($a_ca as $ca):
485
							$name = htmlspecialchars($ca['descr']);
486
							$subj = cert_get_subject($ca['crt']);
487
							$issuer = cert_get_issuer($ca['crt']);
488
							if($subj == $issuer)
489
							  $issuer_name = "<em>" . gettext("self-signed") . "</em>";
490
							else
491
							  $issuer_name = "<em>" . gettext("external") . "</em>";
492
							$subj = htmlspecialchars($subj);
493
							$issuer = htmlspecialchars($issuer);
494
							$certcount = 0;
495

    
496
							$issuer_ca = lookup_ca($ca['caref']);
497
							if ($issuer_ca)
498
								$issuer_name = $issuer_ca['descr'];
499

    
500
							// TODO : Need gray certificate icon
501

    
502
							if($ca['prv']) {
503
								$caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png";
504
								$internal = "YES";
505

    
506
							} else {
507
								$caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png";
508
								$internal = "NO";
509
							}
510
							foreach ($a_cert as $cert)
511
								if ($cert['caref'] == $ca['refid'])
512
									$certcount++;
513
  						foreach ($a_ca as $cert)
514
  							if ($cert['caref'] == $ca['refid'])
515
  								$certcount++;
516
					?>
517
					<tr>
518
						<td class="listlr">
519
							<table border="0" cellpadding="0" cellspacing="0">
520
								<tr>
521
									<td align="left" valign="center">
522
										<img src="<?=$caimg;?>" alt="CA" title="CA" border="0" height="16" width="16" />
523
									</td>
524
									<td align="left" valign="middle">
525
										<?=$name;?>
526
									</td>
527
								</tr>
528
							</table>
529
						</td>
530
						<td class="listr"><?=$internal;?>&nbsp;</td>
531
						<td class="listr"><?=$issuer_name;?>&nbsp;</td>
532
						<td class="listr"><?=$certcount;?>&nbsp;</td>
533
						<td class="listr"><?=$subj;?>&nbsp;</td>
534
						<td valign="middle" nowrap class="list">
535
							<a href="system_camanager.php?act=edit&id=<?=$i;?>")">
536
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("export ca");?>" alt="<?=gettext("edit ca");?>" width="17" height="17" border="0" />
537
							</a>
538
							<a href="system_camanager.php?act=exp&id=<?=$i;?>")">
539
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export ca");?>" alt="<?=gettext("export ca");?>" width="17" height="17" border="0" />
540
							</a>
541
							<?php if ($ca['prv']): ?>
542
							<a href="system_camanager.php?act=expkey&id=<?=$i;?>")">
543
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_down.gif" title="<?=gettext("export ca private key");?>" alt="<?=gettext("export ca private key");?>" width="17" height="17" border="0" />
544
							</a>
545
							<?php endif; ?>
546
							<a href="system_camanager.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate Authority and its CRLs, and unreference any associated certificates?");?>')">
547
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete ca");?>" alt="<?=gettext("delete ca"); ?>" width="17" height="17" border="0" />
548
							</a>
549
						</td>
550
					</tr>
551
					<?php
552
							$i++;
553
						endforeach;
554
					?>
555
					<tr>
556
						<td class="list" colspan="5"></td>
557
						<td class="list">
558
							<a href="system_camanager.php?act=new">
559
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add or import ca");?>" alt="<?=gettext("add ca");?>" width="17" height="17" border="0" />
560
							</a>
561
						</td>
562
					</tr>
563
					<tr>
564
						<td colspan="5">
565
							<p>
566
								<?=gettext("Additional trusted Certificate Authorities can be added here.");?>
567
							</p>
568
						</td>
569
					</tr>
570
				</table>
571

    
572
				<?php endif; ?>
573

    
574
			</div>
575
		</td>
576
	</tr>
577
</table>
578
<?php include("fend.inc");?>
579
<script type="text/javascript">
580
<!--
581

    
582
method_change();
583

    
584
//-->
585
</script>
586

    
587
</body>
(184-184/225)