source: trunk/htdocs/cacher/sub/entrylist.tpl.php @ 1078

Last change on this file since 1078 was 1078, checked in by moo, 2 years ago

htdocs/cache: re-adds help

  • Property svn:eol-style set to native
File size: 3.2 KB
RevLine 
[1072]1<?php $cycleClass = new Cycle('class="col1"', 'class="col2"'); ?>
2<form action="" method="post">
3    <table cellspacing="0" cellpadding="4" class="cycles entries">
[1078]4        <caption><?php echo _("$typeName $listName"); ?></caption>
[1072]5<?php
6
7echo <<<TR
[1076]8        <tr>
[1072]9
10TR;
11
12if ($isphp) {
13    echo
14        th("entry.id")
15        ;
16}
17else {
18    echo
19        th("entry.remove")
20        ;
21}
22
23echo
24    th(N_("entry.name"))
25    , th(N_("entry.hits"))
26    , th(N_("entry.size"))
27    ;
28
29if ($isphp) {
30    echo
31        th(N_("entry.refcount"))
32        , th(N_("entry.phprefcount"))
33        , th(N_("entry.class_cnt"))
34        , th(N_("entry.function_cnt"))
35        , th(N_("entry.file_size"))
36        , th(N_("entry.file_mtime"))
37        ;
[1078]38    echo
39        th(N_("entry.file_device"))
40        , th(N_("entry.file_inode"))
41        ;
[1072]42}
43echo
44    th(N_("entry.hash"))
45    , th(N_("entry.atime"))
46    , th(N_("entry.ctime"))
47    ;
48
49if ($listName == 'Deleted') {
50    echo
51        th(N_("entry.delete"))
52        ;
53}
54?>
55        </tr>
56<?php
57foreach ($entries as $i => $entry) {
58    $class = $cycleClass->next();
59    echo <<<TR
60        <tr $class>
61
62TR;
63    $name     = htmlspecialchars($entry['name']);
64    $hits     = number_format($entry['hits']);
65    $size     = size($entry['size']);
66    if ($isphp) {
67        $class_cnt    = number_format($entry['class_cnt']);
68        $function_cnt = number_format($entry['function_cnt']);
69        $phprefcount  = number_format($entry['phprefcount']);
70        $file_size    = size($entry['file_size']);
71    }
72
73    if ($isphp) {
74        $file_mtime = age($entry['file_mtime']);
75    }
76    $ctime = age($entry['ctime']);
77    $atime = age($entry['atime']);
78    if ($listName == 'Deleted') {
79        $dtime = age($entry['dtime']);
80    }
81
82    if ($isphp) {
83        $namelink = $name;
84        echo <<<ENTRY
85            <td>{$entry['cache_name']} {$i}</td>
86
87ENTRY;
88    }
89    else {
90        echo <<<ENTRY
91            <td><label><input type="checkbox" name="remove[]" value="{$name}"/>{$entry['cache_name']} {$i}</label></td>
92
93ENTRY;
94        $uname = urlencode($entry['name']);
95        $namelink = "<a href=\"edit.php?name=$uname\">$name</a>";
96    }
97
98    echo <<<ENTRY
99            <td>{$namelink}</td>
100            <td align="right" int="{$entry['hits']}">{$entry['hits']}</td>
101            <td align="right" int="{$entry['size']}">{$size}</td>
102
103ENTRY;
104    if ($isphp) {
105        $refcount = number_format($entry['refcount']);
106        echo <<<ENTRY
107            <td align="right" int="{$entry['refcount']}">{$entry['refcount']}</td>
108            <td align="right" int="{$entry['phprefcount']}">{$phprefcount}</td>
109            <td align="right" int="{$entry['class_cnt']}">{$class_cnt}</td>
110            <td align="right" int="{$entry['function_cnt']}">{$function_cnt}</td>
111            <td align="right" int="{$entry['file_size']}">{$file_size}</td>
112            <td align="right" int="{$entry['file_mtime']}">{$file_mtime}</td>
113
114ENTRY;
115        if (isset($entry['file_inode'])) {
116            echo <<<ENTRY
117            <td align="right" int="{$entry['file_device']}">{$entry['file_device']}</td>
118            <td align="right" int="{$entry['file_inode']}">{$entry['file_inode']}</td>
119
120ENTRY;
121        }
122    }
123    echo <<<ENTRY
124            <td align="right" int="{$entry['hvalue']}">{$entry['hvalue']}</td>
125            <td align="right" int="{$entry['atime']}">{$atime}</td>
126            <td align="right" int="{$entry['ctime']}">{$ctime}</td>
127
128ENTRY;
129    if ($listName == 'Deleted') {
130        echo <<<ENTRY
131            <td align="right" int="{$entry['dtime']}">{$dtime}</td>
132
133ENTRY;
134    }
135
136    echo <<<TR
137        </tr>
138
139TR;
140}
141?>
142    </table>
143<?php if (!$isphp && $listName == 'Deleted') { ?>
144    <input type="submit" value="<?php echo _("Remove Selected"); ?>">
145<?php } ?>
146</form>
147<?php
148unset($cycleClass);
149?>
Note: See TracBrowser for help on using the repository browser.