Changeset 373 in svn for branches/1.2


Ignore:
Timestamp:
2007-05-05T10:40:31Z (8 years ago)
Author:
Xuefer
Message:

merged [371] from trunk->1.2: remove/edit variable data in admin page

Location:
branches/1.2
Files:
7 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/1.2

    • Property svnmerge-integrated changed
      /trunkmerged: 371
  • branches/1.2/NEWS

    r370 r373  
    66
    77== ChangeLog ==
     8 * #86: remove/edit variable in admin page
    89 * fixed #56: xcache_set segfaults when xcache.var_size=0
    910 
  • branches/1.2/admin/common-zh-simplified-utf-8.lang.php

    r147 r373  
    9393        'Module Info'
    9494        => '模块信息',
    95         ''
    96         => '',
    97         ''
    98         => '',
     95        'Remove Selected'
     96        => '删除所选',
     97        'Editing Variable %s'
     98        => '正在编辑变量 %s',
    9999        ''
    100100        => '',
  • branches/1.2/admin/common-zh-traditional-utf-8.lang.php

    r147 r373  
    9393        'Module Info'
    9494        => '組元訊息',
    95         ''
    96         => '',
    97         ''
    98         => '',
     95        'Remove Selected'
     96        => '移除所选',
     97        'Editing Variable %s'
     98        => '正在编辑变量 %s',
    9999        ''
    100100        => '',
  • branches/1.2/admin/xcache.css

    r361 r373  
    2323.percent div { font-size: 1px; line-height: 1px; width: 100%;}
    2424.percent .pavail { background: blue; }
    25 .switcher, h1 { text-align: center; display: block; }
     25.switcher, h1, h2 { text-align: center; display: block; }
    2626.switcher * { color: blue; }
    2727.switcher a.active { font-weight: bold; font-size: 130%; color: black; }
  • branches/1.2/admin/xcache.php

    r250 r373  
    100100$pcnt = xcache_count(XC_TYPE_PHP);
    101101$vcnt = xcache_count(XC_TYPE_VAR);
     102
     103if ($_SERVER['REQUEST_METHOD'] == 'POST') {
     104    $remove = @ $_POST['remove'];
     105    if ($remove && is_array($remove)) {
     106        foreach ($remove as $name) {
     107            xcache_unset($name);
     108        }
     109    }
     110}
    102111
    103112$moduleinfo = null;
  • branches/1.2/admin/xcache.tpl.php

    r364 r373  
    1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml">
    3 <head>
    4 <?php
    5 echo <<<HEAD
    6     <meta http-equiv="Content-Type" content="text/html; charset=$charset" />
    7     <meta http-equiv="Content-Language" content="$lang" />
    8     <script type="text/javascript" src="tablesort.js" charset="$charset"></script>
    9 HEAD;
    10 ?>
    11 
    12     <link rel="stylesheet" type="text/css" href="xcache.css" />
    13     <title><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></title>
    14 </head>
    15 
    16 <body>
    17 <h1><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></h1>
     1<?php include("header.tpl.php"); ?>
    182<a href="help.php" target="_blank" id="help"><?php echo _T("Help") ?> &raquo;</a>
    193<span class="switcher"><?php echo switcher("type", $types); ?></span>
     
    143127        ?>
    144128
     129    <form action="" method="post">
    145130    <table cellspacing="0" cellpadding="4" class="cycles entrys" width="100%">
    146131        <col />
    147132        <col />
     133        <col />
    148134        <col align="right" />
    149135        <col align="right" />
     
    166152        ?>
    167153
     154            <?php if (!$isphp) { ?>
     155            <th width="20">R</th>
     156            <?php } ?>
    168157            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Cache'); ?></a></th>
    169158            <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('entry'); ?></a></th>
     
    206195            }
    207196
     197            if (!$isphp) {
     198                echo <<<ENTRY
     199                    <td><input type="checkbox" name="remove[]" value="{$name}"/></td>
     200ENTRY;
     201                $uname = urlencode($entry['name']);
     202                $namelink = "<a href=\"edit.php?name=$uname\">$name</a>";
     203            }
     204            else {
     205                $namelink = $name;
     206            }
     207
    208208            echo <<<ENTRY
    209209            <td>{$entry['cache_name']} {$i}</td>
    210             <td>{$name}</td>
     210            <td>{$namelink}</td>
    211211            <td int="{$entry['hits']}">{$entry['hits']}</td>
    212212            <td int="{$entry['refcount']}">{$entry['refcount']}</td>
     
    242242
    243243    </table>
     244    <input type="submit" value="<?php echo _T("Remove Selected"); ?>">
     245    </form>
    244246<?php
    245247    }
     
    256258}
    257259?>
    258 <div class="footnote">
    259 <?php echo <<<EOS
    260 Powered By: XCache {$xcache_version}, {$xcache_modules}
    261 EOS;
    262 ?>
    263 </div>
    264 
    265 </body>
    266 </html>
     260<?php include("footer.tpl.php"); ?>
Note: See TracChangeset for help on using the changeset viewer.