/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to admin/cacheinfo.php

  • Committer: Suren A. Chilingaryan
  • Date: 2019-02-22 17:52:45 UTC
  • Revision ID: csa@suren.me-20190222175245-fpp327t7p200dqos
Update cache overview in the administrative interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
}
91
91
*/
92
92
 
93
 
$flags = REQUEST::NEED_ITEMINFO|REQUEST::NEED_INFO|CACHE::TABLE_INFO|CACHE::NEED_REQUESTS|CACHE::FIND_BROKEN|REQUEST::LIST_WILDCARDED;
 
93
 
 
94
$flags = REQUEST::NEED_INFO|CACHE::TABLE_INFO|CACHE::NEED_REQUESTS|CACHE::FIND_BROKEN|REQUEST::LIST_WILDCARDED;
 
95
 
 
96
if (isset($_GET['item_info']))
 
97
    $flags |= REQUEST::NEED_ITEMINFO;
 
98
 
 
99
if (isset($_GET['reader_info']))
 
100
    $flags |= REQUEST::NEED_READERINFO;
94
101
 
95
102
$cache = new CACHEDB();
96
103
$list = $cache->GetCacheList($flags);
300
307
        
301
308
        echo "<br/>";
302
309
 
303
 
        if ($info['info']['dbsize']) {
304
 
            echo translate("Database Size: %s", dsPrintSize($info['info']['dbsize'])) . "<br/>";
305
 
        }
306
 
 
307
 
        if ($info['info']['records']) {
308
 
            echo translate("Number of records: %s", $info['info']['records']) . "<br/>";
309
 
        }
310
 
 
311
 
        if ($info['info']['width']) {
 
310
        if (isset($info['info']['dbsize'])) {
 
311
            echo translate("Cache Size: %s", dsPrintSize($info['info']['dbsize'])) . "<br/>";
 
312
        }
 
313
 
 
314
        if (isset($info['info']['records'])||isset($info['records'])) {
 
315
            if (!isset($info['records']))
 
316
                echo translate("Number of records: %s (CACHE)", $info['info']['records']);
 
317
            else if (!isset($info['info']['records']))
 
318
                echo translate("Number of records: %s (READER)", $info['records']);
 
319
            else if (abs($info['records'] - $info['info']['records']) < 100)
 
320
                echo translate("Number of records: %s (IN SYNC)", $info['info']['records']);
 
321
            else
 
322
                echo translate("Number of records: %s (CACHE) %s (READER)", $info['info']['records'], $info['records']);
 
323
            echo "<br/>";
 
324
        }
 
325
 
 
326
        if (isset($info['info']['width'])) {
312
327
            echo translate("Number of items: %s", $info['info']['width']);
313
328
 
314
329
            if (is_array($info['info']['items'])) {
334
349
            }
335
350
        }
336
351
 
337
 
        if (($info['info']['first'])&&($info['info']['last'])) {
338
 
            echo translate("First record: %s", date("r", $info['info']['first'])) . "<br/>";
339
 
            echo translate("Last record: %s", date("r", $info['info']['last'])) . "<br/>";
 
352
        if ((isset($info['info']['first'])&&isset($info['info']['last']))||(isset($info['first'])&&isset($info['last']))) {
 
353
            if ($info['first'] == $info['info']['first'])
 
354
                echo translate("First record (ALL)   : %s", date("r", $info['info']['first'])) . "<br/>";
 
355
            else if (!isset($info['first']))
 
356
                echo translate("First record (CACHE) : %s", date("r", $info['info']['first'])) . "<br/>";
 
357
            else if (!isset($info['info']['first']))
 
358
                echo translate("First record (READER): %s", date("r", $info['first'])) . "<br/>";
 
359
            else {
 
360
                echo translate("First record (CACHE) : %s", date("r", $info['info']['first'])) . "<br/>";
 
361
                echo translate("First record (READER): %s", date("r", $info['first'])) . "<br/>";
 
362
            }
 
363
                
 
364
            if ($info['last'] == $info['info']['last'])
 
365
                echo translate("Last record (ALL)   : %s", date("r", $info['info']['last'])) . "<br/>";
 
366
            else if (!isset($info['last']))
 
367
                echo translate("Last record (CACHE) : %s", date("r", $info['info']['last'])) . "<br/>";
 
368
            else if (!isset($info['info']['last']))
 
369
                echo translate("Last record (READER): %s", date("r", $info['last'])) . "<br/>";
 
370
            else {
 
371
                echo translate("Last record (CACHE) : %s", date("r", $info['info']['last'])) . "<br/>";
 
372
                echo translate("Last record (READER): %s", date("r", $info['last'])) . "<br/>";
 
373
            }
340
374
        }
341
375
        
342
376
        if ($info['info']['tables']) {