server/onyx/include/admin/home.php

22 lines
493 B
PHP
Raw Normal View History

2013-11-08 18:15:17 +00:00
<?php
if(!defined('ONYX')) exit;
2013-11-25 14:38:06 +00:00
if (is_writable(ONYX."../misc/") && !is_dir(ONYX."../misc/pki/"))
mkdir(ONYX."../misc/pki/");
$wright = is_writable(ONYX."../misc/pki/");
$template->assign("cert_writable", $wright);
//TODO handle the path ?
2013-11-25 14:38:06 +00:00
$ca_file = ONYX . '../misc/pki/cacert.crt';
//TODO check permission ?
if (file_exists($ca_file))
{
2013-11-25 14:38:06 +00:00
$data = openssl_x509_parse(file_get_contents(ONYX . '../misc/pki/cacert.crt'));
$template->assign("cert", $data);
}
return "admin/home";