* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once('diogenes.core.globals.inc.php');
-require_once('diogenes.database.inc.php');
+require_once('diogenes/diogenes.core.globals.inc.php');
+require_once('diogenes/diogenes.database.inc.php');
require_once('xorg/iterator.inc.php');
require_once('xorg/database.inc.php');
/** The x.org version */
var $version = '@VERSION@';
- var $debug = false;
+ var $debug = 0;
/** db params */
var $dbdb = 'x4dat';
$globals->hook->menu(null);
$globals->dbconnect();
- if ($globals->debug) {
+ if ($globals->debug & 1) {
$globals->db->trace_on();
}
$globals->xdb =& new XOrgDB;
if ($this->_page_type == NO_SKIN) {
$this->display($this->_tpl);
- } else {
- $this->assign('menu', $globals->menu->menu());
- if ($globals->debug) {
+ exit;
+ }
+
+ $this->assign('menu', $globals->menu->menu());
+
+ if ($globals->debug) {
+
+ if ($globals->debug & 1) {
$this->assign('db_trace', $globals->db->trace_format($this, 'database-debug.tpl'));
- $this->assign('validate', urlencode($globals->baseurl.'/valid.html'));
+ }
+
+ $this->assign('validate', urlencode($globals->baseurl.'/valid.html'));
+ $result = $this->fetch('skin/'.Session::get('skin'));
+ $ttime = sprintf('Temps total: %.02fs<br />', microtime_float() - $TIME_BEGIN);
+ $replc = "<span class='erreur'>VALIDATION HTML INACTIVE</span><br />";
+
+ if ($globals->debug & 2) {
- $result = $this->fetch('skin/'.Session::get('skin'));
- $total_time = sprintf('Temps total: %.02fs<br />', microtime_float() - $TIME_BEGIN);
$fd = fopen($this->compile_dir."/valid.html","w");
fwrite($fd, $result);
fclose($fd);
-
- exec($globals->spoolroot."/bin/devel/xhtml.validate.pl ".$this->compile_dir."/valid.html", $val);
- foreach ($val as $h) {
- if (preg_match("/^X-W3C-Validator-Errors: (\d+)$/", $h, $m)) {
- if ($m[1]) {
- echo str_replace("@HOOK@",
- "$total_time<span class='erreur'><a href='http://validator.w3.org/check?uri="
- .$globals->baseurl."/valid.html&ss=1#result'>{$m[1]} ERREUR(S) !!!</a></span><br />",
- $result);
- } else {
- echo str_replace("@HOOK@", "$total_time", $result);
- }
- exit;
- }
+
+ exec($globals->spoolroot."/bin/devel/xhtml.validate.pl ".$this->compile_dir."/valid.html", $val);
+ foreach ($val as $h) {
+ if (preg_match("/^X-W3C-Validator-Errors: (\d+)$/", $h, $m)) {
+ $replc = '';
+ if ($m[1]) {
+ $replc .= "<span class='erreur'><a href='http://validator.w3.org/check?uri={$globals->baseurl}"
+ ."/valid.html&ss=1#result'>{$m[1]} ERREUR(S) !!!</a></span><br />";
+ }
+ break;
+ }
}
- } else {
- $this->display('skin/'.Session::get('skin'));
}
+
+ echo str_replace("@HOOK@", $ttime.$replc, $result);
+ exit;
}
+
+ $this->display('skin/'.Session::get('skin'));
exit;
}