26 require_once(
"../class/config.php");
30 "filter" => array(
"request",
"integer",
null),
31 "filter1" => array(
"request",
"integer", 0),
32 "filter2" => array(
"request",
"integer", 0),
33 "filter4" => array(
"request",
"integer", 0),
34 "filter8" => array(
"request",
"integer", 0),
39 if (isset($filter1) && isset($filter2) && isset($filter4) && isset($filter8)) {
40 $filter = $filter1 + $filter2 + $filter4 + $filter8;
45 $r = $ssl->get_list($filter);
51 $ssl::STATUS_PENDING => _(
"Pending Certificate"),
52 $ssl::STATUS_OK => _(
"Valid"),
53 $ssl::STATUS_EXPIRED =>
"<span style=\"color: red; font-weight:bold\">" . _(
"Expired") .
"</span>",
58 if ($v[
"certif"] == 0) {
59 $info=_(
"Some of your hosting are using a <b>self-signed</b> certificate. <br>Your browser will not let you surf those domains properly<br>To fix this, buy a properly signed certificate").
"<br>".
$info;
62 include_once(
"head.php");
65 echo
"<p class=\"alert alert-danger\">$error</p>";
68 echo
"<p class=\"alert alert-info\">$info</p>";
71 <h3><?php
__(
"Your Certificates"); ?></h3>
73 <p><?php
__(
"Please find below your SSL Certificates. Some may be provided by the administrator of the server, some may be Expired or Pending (waiting for a CRT from your Certificate Provider)"); ?></p>
74 <form method=
"get" action=
"ssl_list.php" name=
"filter">
75 <p><?php
__(
"Only show the following certificates:"); ?> <br />
76 <label
for=
"filter1"><input type=
"checkbox" onclick=
"document.forms['filter'].submit()" name=
"filter1" id=
"filter1" value=
"1" <?php
cbox($filter & $ssl::FILTER_PENDING); ?>><?php
__(
"Pending Certificates"); ?></label>
77 <label
for=
"filter2"><input type=
"checkbox" onclick=
"document.forms['filter'].submit()" name=
"filter2" id=
"filter2" value=
"2" <?php
cbox($filter & $ssl::FILTER_OK); ?>><?php
__(
"Valid Certificates"); ?></label>
78 <label
for=
"filter4"><input type=
"checkbox" onclick=
"document.forms['filter'].submit()" name=
"filter4" id=
"filter4" value=
"4" <?php
cbox($filter & $ssl::FILTER_EXPIRED); ?>><?php
__(
"Expired Certificates"); ?></label>
80 <label
for=
"filter8"><input type=
"checkbox" onclick=
"document.forms['filter'].submit()" name=
"filter8" id=
"filter8" value=
"8" <?php
cbox($filter & $ssl::FILTER_SHARED); ?>><?php
__(
"Certificates Shared by the Administrator"); ?></label>
82 <input type=
"submit" name=
"go" value=
"<?php __("Filter
"); ?>"/>
85 <tr><th></th><th><?php
__(
"Domain Name"); ?></th><th><?php
__(
"Status"); ?></th><th><?php
__(
"Validity period"); ?></th><th><?php
__(
"Used by"); ?></th></tr>
91 <td><div
class=
"ina edit"><a href=
"ssl_view.php?id=<?php echo $val["id"] ?>"><?php
__(
"Details"); ?></a></div></td>
93 <td><?php echo
$val[
"fqdn"]; ?></td>
97 echo
" <i>" . _(
"(shared)") .
"</i>";
100 if (
$val[
"status"] != $ssl::STATUS_PENDING) {
102 <td><?php echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$val[
"validstartts"])); ?><br>
104 if (
$val[
"validendts"] < (time() + 86400 * 31))
105 echo
"<span style=\"color: red; font-weight:bold\">";
106 echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$val[
"validendts"]));
107 if (
$val[
"validendts"] < (time() + 86400 * 31))
111 <td><?php
__(
"Requested on: "); ?><br>
112 <?php echo
format_date(_(
'%3$d-%2$d-%1$d %4$d:%5$d'), date(
"Y-m-d H:i:s",
$val[
"validstartts"])); ?></td>
116 if ($v[
"certif"] ==
$val[
"id"]) {
117 $v[
"fqdn"] = (($v[
"sub"]) ? ($v[
"sub"] .
".") :
"") . $v[
"domaine"];
118 echo
"<a href=\"dom_edit.php?domain=" . $v[
"domaine"] .
"\">" . $v[
"fqdn"] .
"</a><br>\n";
127 if ($v[
"certif"] == 0) {
128 $v[
"fqdn"] = (($v[
"sub"]) ? ($v[
"sub"] .
".") :
"") . $v[
"domaine"];
129 echo
"<tr><td><div class=\"ina add\"><a href=\"ssl_new.php?fqdn=" . $v[
"fqdn"] .
"\">" . _(
"Create one") .
"</a></div></td>";
130 echo
"<td colspan=\"3\"><span style=\"color: red; font-weight:bold\">" . _(
"This hosting has no valid certificate<br>a self-signed one has been created") .
"</span></td>";
131 echo
"<td><a href=\"dom_edit.php?domain=" . $v[
"domaine"] .
"\">" . $v[
"fqdn"] .
"</a></td>";
140 <span
class=
"inb add"><a href=
"ssl_new.php"><?php
__(
"Create or Import a new SSL Certificate"); ?></a></span>
144 <?php include_once(
"foot.php"); ?>
format_date($format, $date)
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
if(!isset($is_include)) if(isset($filter1) &&isset($filter2) &&isset($filter4) &&isset($filter8)) $r
if(empty($_POST['key'])||empty($_POST['val'])) $key