summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 789e951)
raw | patch | inline | side by side (parent: 789e951)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 May 2005 22:30:40 +0000 (22:30 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 25 May 2005 22:30:40 +0000 (22:30 +0000) |
html/main.php | patch | blob | history | |
ihtml/themes/altlinux/framework.tpl | patch | blob | history |
diff --git a/html/main.php b/html/main.php
index 1376ea2a694feb30165b2034305aab5104ba443d..af4f52d67c42fbc4dc41aa406a0f3046be658fae 100644 (file)
--- a/html/main.php
+++ b/html/main.php
} else {
$smarty->assign ("plug", "");
}
-$mtmp="<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
+$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
/* React on clicks */
} else {
$smarty->assign("php_errors", "");
}
-$display = $mtmp.$smarty->fetch(get_template_path('framework.tpl'));
-print $display;
-
-if(file_exists("dow3ccheck.chk"))
- {
- $fp = fopen("/tmp/current.html","w+");
- fwrite($fp,$display,strlen($display));
- $str = shell_exec( "curl -F uploaded_file=@/tmp/current.html http://127.0.0.1/w3c-markup-validator/check ");
- if(!preg_match("/This Page Is Valid/",$str ))
- print $str;
- else
- print '<p>
- <a href="http://dyn-209/w3c-markup-validator/check?uri=referer"><img alt=\"\" border="0"
- src="http://dyn-209/w3c-markup-validator/images/vh401.png"
- alt="Valid HTML 4.01!" height="31" width="88"></a>
- </p>';
+$smarty->assign("w3c", "");
+$display= $header.$smarty->fetch(get_template_path('framework.tpl'));
+
+/* For development, perform a W3C conformance check if specified in gosa.conf */
+if (isset($config->data['MAIN']['W3CTEST'])) {
+ $fp = fopen("/tmp/gosa.html","w+");
+ fwrite($fp, $display, strlen($display));
+ $url= $config->data['MAIN']['W3CTEST'];
+ $str = shell_exec( "curl -F uploaded_file=@/tmp/gosa.html $url/check");
+ if(!preg_match("/This Page Is Valid/i",$str )){
+ /* Show errors */
+ echo $str;
+ } else {
+ /* Re-render page with W3C logo */
+ $smarty->assign("w3c", "<a href=\"$url/check?uri=referer\"><img alt=\"\" border=\"0\" src=\"$url/images/vh401.png\" alt=\"Valid HTML 4.01!\" height=\"31\" width=\"88\"></a>");
+ $display= $header.$smarty->fetch(get_template_path('framework.tpl'));
}
+}
+
+/* Show page... */
+echo $display;
+/* Save plist */
$_SESSION['plist']= $plist;
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index fce13251ea82808a2a72b169e11876ca1383cbb0..b8ed5da13f605c7786c43484428c7632e522515e 100644 (file)
<td style="background-color:#5353ad; vertical-align:top;">
<div style="background-color:#5353ad; height:12px; width:100%;"> </div>
{$menu}
+ <br>
+ <center>{$w3c}</center>
<div style="height:100px; width:140px;"></div>
</td>