slitaz-forge view irc/src/html/index.php @ rev 328

forum, irc: add live irc link
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 28 21:32:32 2012 +0200 (2012-08-28)
parents efd18dbda796
children 134d8a603e7f
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <?php
3 include("config.inc.php");
4 ?>
5 <html><head>
6 <title>SliTaz IRC Logs</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
8 <meta name="description" content="SliTaz IRC Logs" />
9 <meta name="keywords" content="SliTaz IRC Logs" />
10 <link rel="stylesheet" href="style.css" type="text/css" />
11 </head>
12 <body>
13 <?php $now = date('Y-m-d'); ?>
14 <!-- Header -->
15 <div id="header">
16 <div id="logo"></div>
17 <div id="network">
18 <a href="http://www.slitaz.org/">Home</a>
19 <a href="http://scn.slitaz.org/">Community</a>
20 <a href="http://webchat.freenode.net/?channels=#slitaz">IRC</a>
21 <a href="http://doc.slitaz.org/">Doc</a>
22 <a href="http://forum.slitaz.org/">Forum</a>
23 <a href="http://slitaz.pro/">Pro</a>
24 <a href="http://shop.slitaz.org/">Shop</a>
25 <a href="http://bugs.slitaz.org/">Bugs</a>
26 <a href="http://hg.slitaz.org/">Hg</a>
27 </div>
28 <h1><a href="./">SliTaz IRC Logs</a></h1>
29 </div>
30 <?php
31 $date = $_GET['date'];
32 if (is_null($date)) {
33 $date = $now;
34 }
35 if (isset($date) && preg_match("/^\d\d\d\d-\d\d-\d\d$/", $date)) {
36 ?>
37 <div id="contentbox">
38 <h2>Log for <?php echo($date); ?></h2>
39 <p>Timestamps are GMT-6</p>
40 <p><a href="./index"><< Go to Index</a></p>
41 </div>
42 <div id="content">
43 <?php
44 readfile($date . ".log");
45 ?>
46 </div>
47 <?php
48 }
49 elseif (isset($date) && preg_match("/^index$/", $date)) {
50 $dir = opendir(".");
51 while (false !== ($file = readdir($dir))) {
52 if (strpos($file, ".log") == 10) {
53 $filearray[] = $file;
54 }
55 }
56 closedir($dir);
58 rsort($filearray);
59 ?>
60 <div id="contentbox">
61 <div style="text-align: justify; width: 48%; padding: 20px 10px 0pt 0pt;">
62 These are the logs from the #slitaz support channel on freenode.<br />
63 The main purpose of these are to provide records of meetings and<br />
64 dicussion we have on IRC - not that pankso is around much...<br /><br />
65 Please click on the date of the log you wish to view:<br />
66 </div>
67 </div>
68 <div id="content">
69 <ul>
70 <?php
71 foreach ($filearray as $file) {
72 $file = substr($file, 0, 10);
73 ?>
74 <li><a href="<?php echo($file); ?>"><?php echo($file); ?></a></li>
75 <?php
76 }
77 ?>
78 </ul>
79 </div>
80 <?php
81 }
82 ?>
83 <div id="footer">
84 <p>
85 Network:
86 <a href="http://www.slitaz.org/">Main Site</a>
87 <a href="http://scn.slitaz.org/">Community</a>
88 <a href="http://doc.slitaz.org/">Doc</a>
89 <a href="http://forum.slitaz.org/">Forum</a>
90 <a href="http://pkgs.slitaz.org/">Packages</a>
91 <a href="http://bugs.slitaz.org">Bugs</a>
92 <a href="http://hg.slitaz.org/">Hg</a>
93 <br>
94 SliTaz @
95 <a href="http://twitter.com/slitaz">Twitter</a>
96 <a href="http://www.facebook.com/slitaz">Facebook</a>
97 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
98 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
99 <a href="http://flattr.com/profile/slitaz">Flattr</a>
100 </p>
101 <p>
102 These logs were automatically created by <b><?php echo($nick); ?></b>
103 using <a href="http://www.jibble.org/logbot/">LogBot</a>
104 </p>
105 <div/>
106 </body></html>