Changeset 123
- Timestamp:
- 09/02/2006 02:13:29 AM (2 years ago)
- Location:
- trunk/admin
- Files:
-
- 5 added
- 5 modified
-
common-en.lang.php (added)
-
common-zh-simplified-utf-8.lang.php (added)
-
common.php (added)
-
config.php.example (modified) (2 diffs)
-
help-en.lang.php (added)
-
help-zh-simplified-utf-8.lang.php (added)
-
help.php (modified) (4 diffs)
-
xcache.css (modified) (1 diff)
-
xcache.php (modified) (3 diffs)
-
xcache.tpl.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/config.php.example
r34 r123 4 4 // write your own config and name it as config.php 5 5 6 // detected by browser 7 // $lang = 'en-us'; 8 6 9 $charset = "UTF-8"; 10 11 // developers only 12 $show_todo_strings = false; 7 13 8 14 // this function is detected by xcache.tpl.php, and enabled if function_exists … … 10 16 function ob_filter_path_nicer($o) 11 17 { 18 $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}/", $o); 12 19 $o = str_replace("/home/", "{H}/", $o); 13 20 return $o; -
trunk/admin/help.php
r106 r123 1 1 <?php 2 $charset = "UTF-8"; 3 if (file_exists("./config.php")) { 4 include("./config.php"); 5 } 2 include("./common.php"); 6 3 ?> 7 4 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … … 12 9 echo <<<HEAD 13 10 <meta http-equiv="Content-Type" content="text/html; charset=$charset" /> 11 <meta http-equiv="Content-Language" content="$lang" /> 14 12 <script type="text/javascript" src="tablesort.js" charset="$charset"></script> 15 13 HEAD; … … 17 15 18 16 <link rel="stylesheet" type="text/css" href="xcache.css" /> 19 <title> XCache Administration Help</title>17 <title><?php echo _T('XCache Administration Help'); ?></title> 20 18 <script> 21 19 function toggle(o) … … 27 25 28 26 <body> 29 <h1>XCache Administration Help</h1> 30 <a href="javascript:" onclick="toggle(document.getElementById('help'));return false" style="display:block; float: right">Help</a> 27 <h1><?php echo _T('XCache Administration Help'); ?></h1> 31 28 <div id1="help"> 32 <h2>Cache Legends</h2> 33 <pre> 34 <b>Slots: </b>Number of hash slots. the setting from your php.ini 35 <b>Size: </b>Cache Size, Size of the cache (or cache chunk), in bytes 36 <b>Avail: </b>Available Memory, free memory in bytes of this cache 37 <b>Used: </b>Used Percent, A bar shows how much memory used in percent 38 <b>Clear: </b>Clear Button, Press the button to clean this cache 39 <b>Compiling: </b>Compiling flag, "yes" if the cache is busy compiling php script 40 <b>Hits: </b>Cache Hits, hit=a var/php is loaded from this cache 41 <b>Misses: </b>Cache Misses, miss=a var/php is requested but not in the cache 42 <b>Clogs: </b>Compiling Clogs, clog=compiling is needed but avoided to wait(be blocked) 43 when the cache is busy compiling already 44 <b>OOMs: </b>Out Of Memory, how many times a new item should be stored but there isn't 45 enough memory in the cache, think of increasing the xcache.size or xcache.var_size 46 <b>Protected: </b>Whether readonly_protection is available and enable on this cache 47 <b>Cached: </b>Number of entries stored in this cache 48 <b>Deleted: </b>Number of entries is pending in delete list (expired but referenced) 49 <b>Free Blocks:</b>Free blocks list in the specified cache 50 </pre> 51 52 <h2>List Legends</h2> 53 <pre> 54 <b>entry: </b>The entry name or filename 55 <b>Hits: </b>Times this entry is hit (loaded from this cache) 56 <b>Refcount: </b>Reference count this entry is holded by a php request 57 <b>Size: </b>Size in bytes of this entry in the cache 58 <b>SrcSize: </b>Size of the source file 59 <b>Modify: </b>Last modified time of the source file 60 <b>device: </b>device number of the source file 61 <b>inode: </b>inode number of the source file 62 <b>Access: </b>Last access time of the cached entry 63 <b>Create: </b>The time when this entry is stored 64 </pre> 29 <?php include(get_language_file("help")); ?> 65 30 </div> 66 31 67 See also: <a href="http://trac.lighttpd.net/xcache/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://trac.lighttpd.net/xcache/">XCache wiki</a>32 <?php echo _T('See also'); ?>: <a href="http://trac.lighttpd.net/xcache/wiki/PhpIni">setting php.ini for XCache</a> in the <a href="http://trac.lighttpd.net/xcache/">XCache wiki</a> 68 33 </body> 69 34 </html> -
trunk/admin/xcache.css
r110 r123 19 19 #help { display: block; float: right; } 20 20 .footnote { text-align: right; font-size: 12px; } 21 dl { overflow: hidden; } 22 dt { font-weight: bold; clear: both; float: left; width: 100px; text-align: right; margin: 0; } 23 dd { margin: 0; } -
trunk/admin/xcache.php
r114 r123 1 1 <?php 2 2 3 error_reporting(E_ALL); 4 define('REQUEST_TIME', time()); 3 include("./common.php"); 5 4 6 5 class Cycle … … 82 81 } 83 82 return implode(' ', $html); 84 }85 86 $charset = "UTF-8";87 88 if (file_exists("config.php")) {89 include("config.php");90 83 } 91 84 … … 189 182 $type_php = XC_TYPE_PHP; 190 183 $type_var = XC_TYPE_VAR; 191 $types = array($type_none => 'Statistics', $type_php =>'List PHP', $type_var =>'List Var Data');184 $types = array($type_none => _T('Statistics'), $type_php => _T('List PHP'), $type_var => _T('List Var Data')); 192 185 $xcache_version = XCACHE_VERSION; 193 186 $xcache_modules = XCACHE_MODULES; -
trunk/admin/xcache.tpl.php
r118 r123 11 11 12 12 <link rel="stylesheet" type="text/css" href="xcache.css" /> 13 <title> XCache <?php echo $xcache_version; ?> Administration</title>13 <title><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></title> 14 14 </head> 15 15 16 16 <body> 17 <h1> XCache <?php echo $xcache_version; ?> Administration</h1>18 <a href="help.php" target="_blank" id="help"> Help»</a>17 <h1><?php echo sprintf(_T("XCache %s Administration"), $xcache_version); ?></h1> 18 <a href="help.php" target="_blank" id="help"><?php echo _T("Help") ?> »</a> 19 19 <span class="switcher"><?php echo switcher("type", $types); ?></span> 20 20 <?php … … 22 22 $b = new Cycle('class="col1"', 'class="col2"'); 23 23 ?> 24 Caches:24 <?php echo _T('Caches'); ?>: 25 25 <table cellspacing="0" cellpadding="4" class="cycles"> 26 26 <col /> … … 41 41 <tr <?php echo $a->next(); ?>> 42 42 <th>-</th> 43 <th> Slots</th>44 <th> Size</th>45 <th> Avail</th>46 <th> %</th>47 <th> Clear</th>48 <th> Compiling</th>49 <th> Hits</th>50 <th> Misses</th>51 <th> Clogs</th>52 <th> OOMs</th>53 <th> Protected</th>54 <th> Cached</th>55 <th> Deleted</th>56 <th> GC</th>43 <th><?php echo _T('Slots'); ?></th> 44 <th><?php echo _T('Size'); ?></th> 45 <th><?php echo _T('Avail'); ?></th> 46 <th><?php echo _T('%'); ?></th> 47 <th><?php echo _T('Clear'); ?></th> 48 <th><?php echo _T('Compiling'); ?></th> 49 <th><?php echo _T('Hits'); ?></th> 50 <th><?php echo _T('Misses'); ?></th> 51 <th><?php echo _T('Clogs'); ?></th> 52 <th><?php echo _T('OOMs'); ?></th> 53 <th><?php echo _T('Protected'); ?></th> 54 <th><?php echo _T('Cached'); ?></th> 55 <th><?php echo _T('Deleted'); ?></th> 56 <th><?php echo _T('GC'); ?></th> 57 57 </tr> 58 58 <?php 59 59 $numkeys = explode(',', 'hits,misses,clogs,ooms,cached,deleted'); 60 $l_clear = _T('Clear'); 61 $l_clear_confirm = _T('Sure to clear?'); 60 62 foreach ($cacheinfos as $i => $ci) { 61 63 echo " … … 81 83 <input type="hidden" name="type" value="{$ci['type']}"> 82 84 <input type="hidden" name="cacheid" value="{$ci['cacheid']}"> 83 <input type="submit" name="clearcache" value=" Clear" class="submit" onclick="return confirm('Sure to clear?');" />85 <input type="submit" name="clearcache" value="{$l_clear}" class="submit" onclick="return confirm('{$l_clear_confirm}');" /> 84 86 </div> 85 87 </form> … … 101 103 <?php } ?> 102 104 </table> 103 Free Blocks:105 <?php echo _T('Free Blocks'); ?>: 104 106 <?php 105 107 foreach ($cacheinfos as $i => $ci) { … … 108 110 <table cellspacing="0" cellpadding="4" class="cycles freeblocks"> 109 111 <tr> 110 <th><?php echo $ci['cache_name']; ?> size<br>offset</th>112 <th><?php echo $ci['cache_name']; ?> <?php echo _T("size"); ?><br><?php echo _T("offset"); ?></th> 111 113 <?php 112 114 foreach ($ci['free_blocks'] as $block) { … … 136 138 $a->reset(); 137 139 echo " 138 <caption> {$cachelist['type_name']} $listname</caption>";140 <caption>", _T("{$cachelist['type_name']} $listname"), "</caption>"; 139 141 ?> 140 142 … … 162 164 ?> 163 165 164 <th><a href="javascript:" onclick="resort(this); return false"> Cache</a></th>165 <th><a href="javascript:" onclick="resort(this); return false"> entry</a></th>166 <th><a href="javascript:" onclick="resort(this); return false"> Hits</a></th>167 <th><a href="javascript:" onclick="resort(this); return false"> Ref count</a></th>168 <th><a href="javascript:" onclick="resort(this); return false"> Size</a></th>166 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Cache'); ?></a></th> 167 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('entry'); ?></a></th> 168 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Hits'); ?></a></th> 169 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Refcount'); ?></a></th> 170 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Size'); ?></a></th> 169 171 <?php if ($isphp) { ?> 170 <th><a href="javascript:" onclick="resort(this); return false"> SrcSize</a></th>171 <th><a href="javascript:" onclick="resort(this); return false"> Modify</a></th>172 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('SrcSize'); ?></a></th> 173 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Modify'); ?></a></th> 172 174 <?php if ($haveinode) { ?> 173 <th><a href="javascript:" onclick="resort(this); return false"> device</a></th>174 <th><a href="javascript:" onclick="resort(this); return false"> inode</a></th>175 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('device'); ?></a></th> 176 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('inode'); ?></a></th> 175 177 <?php } ?> 176 178 <?php } ?> 177 <th><a href="javascript:" onclick="resort(this); return false"> Access</a></th>178 <th><a href="javascript:" onclick="resort(this); return false"> Create</a></th>179 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Access'); ?></a></th> 180 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Create'); ?></a></th> 179 181 <?php if ($listname == 'Deleted') { ?> 180 <th><a href="javascript:" onclick="resort(this); return false"> Delete</a></th>182 <th><a href="javascript:" onclick="resort(this); return false"><?php echo _T('Delete'); ?></a></th> 181 183 <?php } ?> 182 184 </tr> … … 245 247 <div class="footnote"> 246 248 <?php echo <<<EOS 247 Powered By: {$xcache_version}, {$xcache_modules}249 Powered By: XCache {$xcache_version}, {$xcache_modules} 248 250 EOS; 249 251 ?>

