| 1 | <?php $cycleClass = new Cycle('class="col1"', 'class="col2"'); ?> |
|---|
| 2 | <form action="" method="post"> |
|---|
| 3 | <table cellspacing="0" cellpadding="4" class="cycles entries"> |
|---|
| 4 | <caption><?php echo _T("$typeName $listName"); ?></caption> |
|---|
| 5 | <?php |
|---|
| 6 | |
|---|
| 7 | echo <<<TR |
|---|
| 8 | <tr> |
|---|
| 9 | |
|---|
| 10 | TR; |
|---|
| 11 | |
|---|
| 12 | if ($isphp) { |
|---|
| 13 | echo |
|---|
| 14 | th("entry.id") |
|---|
| 15 | ; |
|---|
| 16 | } |
|---|
| 17 | else { |
|---|
| 18 | echo |
|---|
| 19 | th("entry.remove") |
|---|
| 20 | ; |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | echo |
|---|
| 24 | th(N_("entry.name")) |
|---|
| 25 | , th(N_("entry.hits")) |
|---|
| 26 | , th(N_("entry.size")) |
|---|
| 27 | ; |
|---|
| 28 | |
|---|
| 29 | if ($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 | ; |
|---|
| 38 | echo |
|---|
| 39 | th(N_("entry.file_device")) |
|---|
| 40 | , th(N_("entry.file_inode")) |
|---|
| 41 | ; |
|---|
| 42 | } |
|---|
| 43 | echo |
|---|
| 44 | th(N_("entry.hash")) |
|---|
| 45 | , th(N_("entry.atime")) |
|---|
| 46 | , th(N_("entry.ctime")) |
|---|
| 47 | ; |
|---|
| 48 | |
|---|
| 49 | if ($listName == 'Deleted') { |
|---|
| 50 | echo |
|---|
| 51 | th(N_("entry.delete")) |
|---|
| 52 | ; |
|---|
| 53 | } |
|---|
| 54 | ?> |
|---|
| 55 | </tr> |
|---|
| 56 | <?php |
|---|
| 57 | foreach ($entries as $i => $entry) { |
|---|
| 58 | $class = $cycleClass->next(); |
|---|
| 59 | echo <<<TR |
|---|
| 60 | <tr $class> |
|---|
| 61 | |
|---|
| 62 | TR; |
|---|
| 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 | |
|---|
| 87 | ENTRY; |
|---|
| 88 | } |
|---|
| 89 | else { |
|---|
| 90 | echo <<<ENTRY |
|---|
| 91 | <td><label><input type="checkbox" name="remove[]" value="{$name}"/>{$entry['cache_name']} {$i}</label></td> |
|---|
| 92 | |
|---|
| 93 | ENTRY; |
|---|
| 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 | |
|---|
| 103 | ENTRY; |
|---|
| 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 | |
|---|
| 114 | ENTRY; |
|---|
| 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 | |
|---|
| 120 | ENTRY; |
|---|
| 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 | |
|---|
| 128 | ENTRY; |
|---|
| 129 | if ($listName == 'Deleted') { |
|---|
| 130 | echo <<<ENTRY |
|---|
| 131 | <td align="right" int="{$entry['dtime']}">{$dtime}</td> |
|---|
| 132 | |
|---|
| 133 | ENTRY; |
|---|
| 134 | } |
|---|
| 135 | |
|---|
| 136 | echo <<<TR |
|---|
| 137 | </tr> |
|---|
| 138 | |
|---|
| 139 | TR; |
|---|
| 140 | } |
|---|
| 141 | ?> |
|---|
| 142 | </table> |
|---|
| 143 | <?php if (!$isphp && $listName == 'Deleted') { ?> |
|---|
| 144 | <input type="submit" value="<?php echo _T("Remove Selected"); ?>"> |
|---|
| 145 | <?php } ?> |
|---|
| 146 | </form> |
|---|
| 147 | <?php |
|---|
| 148 | unset($cycleClass); |
|---|
| 149 | ?> |
|---|