Exemplo n.º 1
0
</head>
<body bgcolor="#0000c0" text="#eeeeee" class="Edit PageDetails Panel">
<?php 
#-- get current page data
$id = $_REQUEST["id"];
echo "<a href=\"edit.php?id=" . urlencode($id) . "\">{$id}</a><br>\n";
?>
<table border="0" cellpadding="2" cellspacing="0">
<colgroup cols="4"><col width="10%"><col width="20%"><col width="10%"><col width="15%"><col width="45%"></colgroup>
<tr>
 <th>Ver</th>
 <th>MTime</th>
 <th>Flags</th>
 <th>Size</th>
 <th>Author</th>
</tr>
<?php 
#-- show all versions
$data = ewiki_db::GET($id);
$version = $data["version"];
for ($ver = $version; $ver >= 1; $ver--) {
    $row = ewiki_db::GET($id, $ver);
    if (!$row) {
        continue;
    }
    $href = 'edit.php?id=' . urlencode($id) . "&version={$ver}";
    echo '<tr>' . "<td><a href=\"{$href}\">#{$ver}</a></td>" . "<td><a href=\"{$href}\">" . strftime("%Y-%m-%d", $row["lastmodified"]) . "</a></td>" . "<td align=\"center\">" . flag_text($row["flags"]) . "</td>" . "<td align=\"right\">" . strlen($row["content"]) . "</td>" . "<td>" . $row["author"] . "</td>" . "</tr>\n";
}
?>
</tr></table>
</body></html>
Exemplo n.º 2
0
    echo "<div class=\"msg\">filter regex /^{$regex}\$/i</div>\n";
    $regex = ":^{$regex}\$:i";
}
?>
<table border="0" cellpadding="2" cellspacing="0">
<colgroup cols="3"><col width="70%"><col width="10%"><col width="20%"></colgroup>
<tr>
 <th>Name</th>
 <th>Flags</th>
 <th>MTime</th>
</tr>
<?php 
#-- list all files
$all = ewiki_db::GETALL(array("id", "version", "flags", "lastmodified"));
while ($row = $all->GET()) {
    #-- prep
    $id = $row["id"];
    $url_id = urlencode($id);
    $title = htmlentities(substr($id, 0, 32));
    #-- filter?
    if ($regex && !preg_match($regex, $id)) {
        continue;
    }
    #-- out
    echo "<tr onClick=\"parent.select_id(event, this, '" . htmlentities($id) . "')\">" . '<td class="fn">' . "<a target=\"page\" href=\"edit.php?id={$url_id}\"" . " onClick=\"return parent.click_magic(event)\">{$title}</a></td>" . '<td align="right">' . flag_text($row["flags"]) . '</td>' . '<td>' . strftime("%Y-%m-%d", $row["lastmodified"]) . '</td>' . "</tr>\n";
}
?>
</table>
</body>
</html>