SVN: toys/stbr/index.php

vip vip at pld-linux.org
Mon May 14 23:12:25 CEST 2007


Author: vip
Date: Mon May 14 23:12:21 2007
New Revision: 8536

Added:
   toys/stbr/index.php
Log:
- stbr log bot web interface


Added: toys/stbr/index.php
==============================================================================
--- (empty file)
+++ toys/stbr/index.php	Mon May 14 23:12:21 2007
@@ -0,0 +1,108 @@
+<?
+ob_start("ob_gzhandler");
+$db = sqlite_open("../ApHeX/scripts/stbrlog.db")
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
+<head>
+<title>Send To Builder Requests Logs From IRC</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+<style type="text/css">
+body, td { font-family: Verdana; font-size: 9pt }
+table { border-collapse: collapse }
+td { padding: 6px 15px; border-bottom: 1px solid #ebebe4 }
+thead td, tfoot td { background-color: #ebebe4 }
+thead td { border-bottom: 1px solid #c0c0c0; border-top: 1px solid #c0c0c0; padding: 5px 15px }
+thead td a { color: #000000 }
+tfoot td { border-top: 2px solid #c0c0c0; border-bottom: 1px solid #c0c0c0 }
+tfoot td a { display: block; padding: 2px 5px; border: 1px outset; float: left; border: 1px solid #c0c0c0; background-color: #ffffff; color: #000000; text-decoration: none; margin-left: 5px }
+</style>
+
+<script type="text/javascript">
+function vm(i)
+{
+// from Adam Major; http://ivpro.net
+// some modifications: Piotr Budny
+var proto = "mailto";
+var m = 'gro.xunil-dlp*' + i;
+var t='';
+
+for (i=m.length-1; i >= 0; i--)
+	if (m.charAt(i) == '*')
+		t += '@';
+	else
+		t +=m.charAt(i);
+
+document.write('<a href="' + proto + ':' + t + '">' + t +'</a>');
+}
+</script>
+</head>
+<body>
+
+<h2>Send To Builder Requests Log</h2>
+
+<div id="phonebookTable">
+<table>
+<thead>
+<tr>
+<td>Date</a></td>
+<td>Requester</a></td>
+<td>Application info</a></td>
+</tr>
+</thead>
+<tbody id="dataTable">
+<tr><td></td><td></td><td><div align="center">spec / recipient / builder</div></td></tr>
+<?
+$query = "SELECT * FROM stbr ORDER BY date DESC";
+$query = sqlite_query($db, $query);
+
+while($p = sqlite_fetch_array($query))
+{
+?>
+<tr>
+<td width="200px"><?=$p['date']?></td>
+<td width="150px"><?=$p['sender']?></td>
+<td>
+<!-- inner evil -->
+<table>
+<?
+$inner = "SELECT * FROM application WHERE date='{$p['date']}' ORDER BY date DESC";
+$inner = sqlite_query($db, $inner);
+
+while($q = sqlite_fetch_array($inner))
+{
+$q['recipient'] = strrev($q['recipient']);
+?>
+<tr>
+<td width="150px"><a href="http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/<?=$q['spec']?>"><?=$q['spec']?></a></td>
+<td width="200px"><script>vm("<?=$q['recipient']?>");</script></td>
+<td width="150px"><?=$q['builder']?></td>
+</tr>
+<?
+}
+?>
+</table>
+<!-- end of evil -->
+</td>
+</tr>
+<?
+}
+sqlite_close($db);
+?>
+</tbody>
+<tfoot>
+<tr>
+<td colspan="3">
+</td>
+</tr>
+</tfoot>
+</table>
+
+</div>
+<div align="right">
+<img src="http://pl.docs.pld-linux.org/zrzuty_ekr/logo_03.png"/>
+</div>
+
+</body>
+</html>


More information about the pld-cvs-commit mailing list