ini_set('error_reporting', E_ALL); ini_set('error_prepend_string', null); ini_set('error_append_string', null); } include_once "ressources/logs.inc"; include_once 'ressources/class.templates.inc'; include_once 'ressources/class.html.pages.inc'; include_once 'ressources/class.cyrus.inc'; include_once 'ressources/class.main_cf.inc'; include_once 'ressources/charts.php'; include_once 'ressources/class.syslogs.inc'; include_once 'ressources/class.system.network.inc'; include_once 'ressources/class.os.system.inc'; include_once 'ressources/class.stats-appliance.inc'; if (isset($_GET["pfx"])) { pfx(); exit; } $q = new mysql(); $results = $q->QUERY_SQL("SELECT CommonName,pks12 FROM sslcertificates ORDER BY CommonName", "artica_backup"); if (!$q->ok) { echo FATAL_ERROR_SHOW_128($q->mysql_error_html()); } while ($ligne = mysql_fetch_assoc($results)) { if (strlen($ligne["pks12"]) < 10) { continue; } $f[] = "<div style='float:left;width:128px;margin:10px;width:350px;' class=form>\n\t\t<center><a href=\"pfx.php?pfx={$ligne["CommonName"]}\"><img src='img/pfx-128.png'></center>\n\t\t<center style='font-size:30px;text-decoration:underline'>{$ligne["CommonName"]}</center>\n\t\t</div>"; } $tpl = new template_users("{certificate}", @implode("\n", $f), $_SESSION, 0, 0, 0, $cfg); $html = $tpl->web_page;
} // When the MAD begins.. if (!file_exists($files)) { echo '404'; } elseif (in_array($_csc->format, array('png', 'jpg', 'jpeg', 'gif'))) { header('Content-type: image/' . $_csc->format); readfile($files); } elseif (in_array($_csc->format, array('css', 'js'))) { $bc = file_get_contents($files); $xp = xp('/**', '**/'); if ($_csc->format == 'css') { header('Content-type: text/css'); $list = array('border-radius' => 'wm', 'box-sizing' => 'wm', 'column-count' => 'wm', 'transform' => 'woms', 'transition' => 'woms'); foreach ($list as $x => $v) { $preg[] = '/' . $x . ':(.*?);/is'; $replace[] = pfx($v, $x); } $bc = preg_replace($preg, $replace, $bc); } else { header('Content-type: text/javascript'); } // Remove comments $r = preg_replace('#/\\*.*?\\*/#s', '', $bc); // Remove whitespace $r = preg_replace('/\\s*([{}|:;,])\\s+/', '$1', $r); // Remove trailing whitespace at the start $r = preg_replace('/\\s\\s+(.*)/', '$1', $r); // Remove unnecessary ;'s $r = str_replace(';}', '}', $r); //echo ( $xp ? '/*' . $xp . '*/' . "\n" : '' ) . $r; echo $bc;