changed git call from https to git readonly
[atutor.git] / mods / wiki / tools / t_commander / list_vers.php
1 <?php
2   include("t_config.php");
3 ?>
4 <html>
5 <head>
6  <title>WikiCommander:PageDetails:<?php echo $id; ?></title>
7  <link rel="stylesheet" type="text/css" href="80x25.css">
8 </head>
9 <body bgcolor="#0000c0" text="#eeeeee" class="Edit PageDetails Panel">
10 <?php
11
12   #-- get current page data
13   $id = $_REQUEST["id"];
14   echo "<a href=\"edit.php?id=".urlencode($id)."\">$id</a><br>\n";
15 ?>
16 <table border="0" cellpadding="2" cellspacing="0">
17 <colgroup cols="4"><col width="10%"><col width="20%"><col width="10%"><col width="15%"><col width="45%"></colgroup>
18 <tr>
19  <th>Ver</th>
20  <th>MTime</th>
21  <th>Flags</th>
22  <th>Size</th>
23  <th>Author</th>
24 </tr>
25 <?php
26
27
28   #-- show all versions
29   $data = ewiki_db::GET($id);
30   $version = $data["version"];
31   for ($ver=$version; $ver>=1; $ver--) {
32
33      $row = ewiki_db::GET($id, $ver);
34      if (!$row) {
35         continue;
36      }
37
38      $href = 'edit.php?id='.urlencode($id)."&version=$ver";
39      echo '<tr>'
40         . "<td><a href=\"$href\">#$ver</a></td>"
41         . "<td><a href=\"$href\">" . strftime("%Y-%m-%d", $row["lastmodified"]) . "</a></td>"
42         . "<td align=\"center\">".flag_text($row["flags"])."</td>"
43         . "<td align=\"right\">".strlen($row["content"])."</td>"
44         . "<td>".$row["author"]."</td>"
45         . "</tr>\n";
46
47   }
48
49 ?>
50 </tr></table>
51 </body></html>