$addr = array(
"ac" => array("SRPMS", "i386", "i586", "i686", "alpha", "amd64", "athlon",
"ppc", "sparc", "sparc64"),
- "th" => array("SRPMS", "i486", "i686", "alpha", "athlon", "ppc", "x86_64"),
- "ti" => array("SRPMS", "i586", "i686", "x86_64"),
- "ti-dev" => array("SRPMS", "i586", "i686", "x86_64")
+ "th" => array("SRPMS", "i486", "i686", "alpha", "athlon", "ppc", "x86_64")
);
?>
.error {
background-color: #b00;
}
+.verbose {
+ color: #886;
+}
+.section {
+ color: #111;
+ background-color: #161;
+}
//-->
</style>
</head>
getenv("SCRIPT_NAME") . "?idx=$idx&ok=$ok&id=$id</a>" .
"</td></tr>"; */
- echo "</table><h2>"._("Content:")."</h2>";
+ echo "</table>";
# what can I say beside PHP suxx? how the fuck should I create
if ($tail)
$cmd = "$cmd | tail -n 100";
$fd = popen($cmd, "r");
- start_pre();
+ $toc = array();
+ ob_start();
while (($s = fgets($fd, 102400)) != false) {
if (strlen($s) > 800) {
$s = chunk_split($s, 800, "\n ");
// highlight errors
if (preg_match("/errors?:/i", $s)) {
$s = "<span class=error>$s</span>";
+ } elseif (substr($s, 0, 2) == "+ ") {
+ // shell verbose
+ $s = "<span class=verbose>$s</span>";
+ } elseif (preg_match("/^Executing\(%(?P<section>\w+)\)/", $s, $m)) {
+ // rpm build section
+ $s = "<span class=section id={$m['section']}>$s</span>";
+ $toc[] = $m['section'];
}
echo $s;
}
- end_pre();
pclose($fd);
+ $code = ob_get_contents();
+ ob_end_clean();
+
+ if (!empty($toc)) {
+ echo "<h2>"._("Toc:")."</h2>";
+ echo "<ul class=toc>";
+ foreach ($toc as $section) {
+ echo "<li><a href=#{$section}>{$section}</a></li>";
+ }
+ echo "</ul>";
+ }
+
+ echo "<h2>"._("Content:")."</h2>";
+
+ start_pre();
+ echo $code;
+ end_pre();
?>
<table width="100%">
"alt=\""._("Powered by PLD Linux")."\" border=\"0\" /></a><br />\n" .
"<small>(c) 2002 ".
"<a href=\"mailto:feedback@pld-linux.org\">PLD Team</a><br />\n".
- '$Revision: 1.15 $'.
+ '$Revision: 1.16 $'.
"</small></div>\n";
# smile ;)
<!-- ech... niech strace... -->
<a href="mailto:feedback@pld-linux.org"><?=_("to us")?></a>. <?=_("Positive opinions are also")?>
<a href="mailto:feedback@pld-linux.org"><?=_("welcome")?></a> ;)</p>
-<p>Version: $Id: index.php,v 1.15 2012/02/08 13:25:08 glen Exp $</p>
+<p>Version: $Id: index.php,v 1.16 2012/02/08 21:03:01 glen Exp $</p>
</td><td width="20%"> </td></tr>
</table>
<?php