changed git call from https to git readonly
[atutor.git] / mods / wiki / tools / t_commander / list.php
1 <?php
2   include("t_config.php");
3 ?>
4 <html>
5 <head>
6  <title>WikiCommander:PageList</title>
7  <link rel="stylesheet" type="text/css" href="80x25.css">
8 </head>
9 <body bgcolor="#0000c0" text="#eeeeee" class="PageList Panel">
10 <?php
11
12   #-- any filters
13   if ($filter = $_REQUEST["filter"]) {
14      $regex = preg_quote($filter);
15      $regex = str_replace("\\*", ".*", $regex);
16      echo "<div class=\"msg\">filter regex /^$regex$/i</div>\n";
17      $regex = ":^$regex$:i";
18   }
19
20 ?>
21 <table border="0" cellpadding="2" cellspacing="0">
22 <colgroup cols="3"><col width="70%"><col width="10%"><col width="20%"></colgroup>
23 <tr>
24  <th>Name</th>
25  <th>Flags</th>
26  <th>MTime</th>
27 </tr>
28 <?php
29   
30   #-- list all files
31   $all = ewiki_db::GETALL(array("id","version","flags","lastmodified"));
32   while ($row = $all->GET()) {
33
34      #-- prep
35      $id = $row["id"];
36      $url_id = urlencode($id);
37      $title = htmlentities(substr($id, 0, 32));
38      
39      #-- filter?
40      if ($regex && !preg_match($regex, $id)) {
41         continue;
42      }
43
44      #-- out
45      echo "<tr onClick=\"parent.select_id(event, this, '".htmlentities($id)."')\">"
46         . '<td class="fn">'
47           . "<a target=\"page\" href=\"edit.php?id=$url_id\""
48           . " onClick=\"return parent.click_magic(event)\">$title</a></td>"
49         . '<td align="right">' . flag_text($row["flags"]) . '</td>'
50         . '<td>' . strftime("%Y-%m-%d", $row["lastmodified"]) . '</td>'
51         . "</tr>\n";
52   }
53   
54   
55   
56 ?>
57 </table>
58 </body>
59 </html>