More formatting
This commit is contained in:
@@ -124,7 +124,7 @@ switch ($form_stage) {
|
||||
printHeader();
|
||||
?>
|
||||
|
||||
<form action='<?php echo $PHP_SELF?>' method=post>
|
||||
<form action='<?php echo $PHP_SELF?>' method=post>
|
||||
<input type=submit name=submit value='Go Back'>
|
||||
<font color=#ff0000><?php echo $er?></font>
|
||||
<br><input type=submit name=submit value='Go Back'>
|
||||
@@ -220,14 +220,14 @@ switch ($form_stage) {
|
||||
# Save user's defaults
|
||||
$fp = fopen($user_cnf, 'w');
|
||||
$x = '<?php
|
||||
$country = \''.addslashes($country).'\';
|
||||
$locality = \''.addslashes($locality).'\';
|
||||
$province = \''.addslashes($province).'\';
|
||||
$organization = \''.addslashes($organization).'\';
|
||||
$unit = \''.addslashes($unit).'\';
|
||||
$expiry = \''.addslashes($expiry).'\';
|
||||
$keysize = \''.addslashes($keysize).'\';
|
||||
?>';
|
||||
$country = \''.addslashes($country).'\';
|
||||
$locality = \''.addslashes($locality).'\';
|
||||
$province = \''.addslashes($province).'\';
|
||||
$organization = \''.addslashes($organization).'\';
|
||||
$unit = \''.addslashes($unit).'\';
|
||||
$expiry = \''.addslashes($expiry).'\';
|
||||
$keysize = \''.addslashes($keysize).'\';
|
||||
?>';
|
||||
fwrite($fp, $x);
|
||||
fclose($fp);
|
||||
|
||||
@@ -336,110 +336,109 @@ switch ($form_stage) {
|
||||
|
||||
<body onLoad="self.focus();document.request.common_name.focus();document.request.cert_type.onchange();">
|
||||
<form action="<?php echo $PHP_SELF?>" method=post name=request>
|
||||
<table width=99%>
|
||||
<th colspan=2><h3>Certificate Request Form</h3></th>
|
||||
|
||||
<tr>
|
||||
<td width=30%>Common Name<font color=red size=3>*</font><br>(i.e. User real name or computer hostname - used as SubjectAltName)</td>
|
||||
<td><input type=text name=common_name value="<?php echo htvar($common_name)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>E-mail Address <font color=red size=3>*</font></td>
|
||||
<td><input type=text name=email value="<?php echo htvar($email)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Organization (Company/Agency)<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=organization value="<?php echo htvar($organization)?>" size=60 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department/Unit<font color=red size=3>*</font> </td><td><input type=text name=unit value="<?php echo htvar($unit) ?>" size=40 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Locality (City/County)<font color=red size=3>*</font></td><td><input type=text name=locality value="<?php echo htvar($locality) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>State/Province<font color=red size=3>*</font></td><td><input type=text name=province value="<?php echo htvar($province) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Country<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=country value="<?php echo htvar($country) ?>" size=2 maxlength=2></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Password<font color=red size=3>*</font><br>(Mandatory for Email,SSL Client,Code signing)</td>
|
||||
<td><input type=password name=passwd value="<?php echo htvar($passwd) ?>" size=30> Again <input type=password name=passwdv value="<?php echo htvar($passwdv) ?>" size=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Life<font color=red size=3>*</font> </td>
|
||||
<td><select name=expiry>
|
||||
<table width=99%>
|
||||
<th colspan=2><h3>Certificate Request Form</h3></th>
|
||||
|
||||
<tr>
|
||||
<td width=30%>Common Name<font color=red size=3> *</font><br>(i.e. User real name or computer hostname - used as SubjectAltName)</td>
|
||||
<td><input type=text name=common_name value="<?php echo htvar($common_name)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>E-mail Address<font color=red size=3> *</font></td>
|
||||
<td><input type=text name=email value="<?php echo htvar($email)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Organization (Company/Agency)<font color=red size=3> *</font></td>
|
||||
<td><input type=text name=organization value="<?php echo htvar($organization)?>" size=60 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department/Unit<font color=red size=3> *</font> </td><td><input type=text name=unit value="<?php echo htvar($unit) ?>" size=40 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Locality (City/County)<font color=red size=3> *</font></td><td><input type=text name=locality value="<?php echo htvar($locality) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>State/Province<font color=red size=3> *</font></td><td><input type=text name=province value="<?php echo htvar($province) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Country<font color=red size=3> *</font></td>
|
||||
<td><input type=text name=country value="<?php echo htvar($country) ?>" size=2 maxlength=2></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Password<font color=red size=3> *</font><br>(Min 8 chars - Mandatory for Email,SSL Client,Code signing)</td>
|
||||
<td><input type=password name=passwd value="<?php echo htvar($passwd) ?>" size=30> Again <input type=password name=passwdv value="<?php echo htvar($passwdv) ?>" size=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Life<font color=red size=3>*</font> </td>
|
||||
<td><select name=expiry>
|
||||
|
||||
<?php
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ($i = 2; $i <= 5; $i++) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Key Size<font color=red size=3>*</font> </td>
|
||||
<td><select name=keysize>
|
||||
<?php
|
||||
for ($i = 512; $i <= 4096; $i+= 512) {
|
||||
print "<option value=$i " . ($keysize == $i ? "selected='selected'" : "") . ">$i bits</option>\n" ;
|
||||
}
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Use:<font color=red size=3>*</font> </td>
|
||||
<td><select name=cert_type onchange="if (this.value=='server')
|
||||
{setVisibility('testrow1',true);setVisibility('testrow2',true);} else {setVisibility('testrow1',false);setVisibility('testrow2',false);}">
|
||||
<?php
|
||||
print '<option value="email" '.($cert_type=='email'?'selected':'').'>E-mail, SSL Client</option>';
|
||||
print '<option value="email_signing" '.($cert_type=='email_signing'?'selected':'').'>E-mail, SSL Client, Code Signing</option>';
|
||||
print '<option value="server" '.($cert_type=='server'?'selected':'').'>SSL Server</option>';
|
||||
print '<option value="vpn_client" '.($cert_type=='vpn_client'?'selected':'').'>VPN Client Only</option>';
|
||||
print '<option value="vpn_server" '.($cert_type=='vpn_server'?'selected':'').'>VPN Server Only</option>';
|
||||
print '<option value="vpn_client_server" '.($cert_type=='vpn_client_server'?'selected':'').'>VPN Client, VPN Server</option>';
|
||||
print '<option value="time_stamping" '.($cert_type=='time_stamping'?'selected':'').'>Time Stamping</option>';
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow2" name="testrow2" style="visibility:hidden;display:none;">
|
||||
<td>Alternative DNS Names<br>(only one per Line)</td><td><textarea name=dns_names cols=30 rows=5><?php echo htvar($dns_names) ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow1" name="testrow1" style="visibility:hidden;display:none;">
|
||||
<td>IP's<br>(only one per Line)</td><td><textarea name=ip_addr cols=30 rows=5><?php echo htvar($ip_addr) ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color=red size=3>* Fields are required</td><td><input type=submit name=submit value='Submit Request'><input type=hidden name=form_stage value='validate'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ($i = 2; $i <= 5; $i++) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Key Size<font color=red size=3>*</font> </td>
|
||||
<td><select name=keysize>
|
||||
<?php
|
||||
for ($i = 512; $i <= 4096; $i+= 512) {
|
||||
print "<option value=$i " . ($keysize == $i ? "selected='selected'" : "") . ">$i bits</option>\n" ;
|
||||
}
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Use:<font color=red size=3>*</font> </td>
|
||||
<td><select name=cert_type onchange="if (this.value=='server')
|
||||
{setVisibility('testrow1',true);setVisibility('testrow2',true);} else {setVisibility('testrow1',false);setVisibility('testrow2',false);}">
|
||||
<?php
|
||||
print '<option value="email" '.($cert_type=='email'?'selected':'').'>E-mail, SSL Client</option>';
|
||||
print '<option value="email_signing" '.($cert_type=='email_signing'?'selected':'').'>E-mail, SSL Client, Code Signing</option>';
|
||||
print '<option value="server" '.($cert_type=='server'?'selected':'').'>SSL Server</option>';
|
||||
print '<option value="vpn_client" '.($cert_type=='vpn_client'?'selected':'').'>VPN Client Only</option>';
|
||||
print '<option value="vpn_server" '.($cert_type=='vpn_server'?'selected':'').'>VPN Server Only</option>';
|
||||
print '<option value="vpn_client_server" '.($cert_type=='vpn_client_server'?'selected':'').'>VPN Client, VPN Server</option>';
|
||||
print '<option value="time_stamping" '.($cert_type=='time_stamping'?'selected':'').'>Time Stamping</option>';
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow2" name="testrow2" style="visibility:hidden;display:none;">
|
||||
<td>Alternative DNS Names<br>(only one per Line)</td><td><textarea name=dns_names cols=30 rows=5><?php echo htvar($dns_names) ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow1" name="testrow1" style="visibility:hidden;display:none;">
|
||||
<td>IP's<br>(only one per Line)</td><td><textarea name=ip_addr cols=30 rows=5><?php echo htvar($ip_addr) ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color=red size=3>* Fields are required</td><td><input type=submit name=submit value='Submit Request'><input type=hidden name=form_stage value='validate'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
printFooter();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user