<?php ini_set('html_errors', 0); ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); if (!is_file("/usr/share/artica-postfix/ressources/settings.new.inc")) { echo "/usr/share/artica-postfix/ressources/settings.new.inc no such file\n"; die; } @mkdir("/etc/artica-postfix/pids", 0755, true); $cachefile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".time"; if (is_file($cachefile)) { $time = _file_time_min($cachefile); if ($time < 2) { die; } } @unlink($cachefile); @file_put_contents($cachefile, time()); include "/usr/share/artica-postfix/ressources/settings.new.inc"; if (!isset($_GLOBAL["ldap_admin"])) { echo "ldap_admin pattern is not found\n"; if (!is_file("/etc/init.d/artica-process1")) { echo "/etc/init.d/artica-process1 not found\n"; die; } shell_exec("/etc/init.d/artica-process1 start"); die; } $t = @file_get_contents("/usr/share/artica-postfix/ressources/settings.new.inc"); if (preg_match("#<\\?php(.+?)\\?>#is", $t, $re)) {
function send_pageid() { $ID = $_GET["pageid"]; $cachepage = "/home/reverse_pages_content/{$ID}"; if (is_file($cachepage)) { $ligne = unserialize(@file_get_contents($cachepage)); $time = _file_time_min(); if ($time < $ligne["cachemin"]) { $date = strtotime($ligne["zDate"]); header("Cache-Control: private, max-age=0"); header("content-type: text/html; charset=ISO-8859-1"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", $date) . " GMT"); echo stripslashes($ligne["content"]); return; } } $q = new mysql_squid_builder(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_pages_content WHERE ID='{$ID}'")); $date = strtotime($ligne["zDate"]); header("Cache-Control: private, max-age=0"); header("content-type: text/html; charset=ISO-8859-1"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", $date) . " GMT"); @unlink($cachepage); @file_put_contents($cachepage, serialize($ligne)); echo stripslashes($ligne["content"]); }