kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Source for file view_cache.php

Documentation is available at view_cache.php

  1. <?php
  2. /**
  3.  * @version $Header: /cvsroot/bitweaver/_bit_kernel/view_cache.php,v 1.6 2006/03/01 18:35:14 spiderr Exp $
  4.  * @package kernel
  5.  * @subpackage functions
  6.  */
  7.  
  8. // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
  9. // All Rights Reserved. See copyright.txt for details and a complete list of authors.
  10. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
  11.  
  12.  
  13.  
  14. /**
  15.  * required setup
  16.  */
  17. require_once'../bit_setup_inc.php' );
  18. require_onceWIKI_PKG_PATH.'BitPage.php' );
  19.  
  20. /*
  21. if($gBitSystem->getConfig('wiki_list_pages') != 'y') {
  22.   $gBitSmarty->assign('msg',tra("This feature is disabled"));
  23.   $gBitSystem->display( 'error.tpl' );
  24.   die;  
  25. }
  26. */
  27. if (isset($_REQUEST['url'])) {
  28.     $id $wikilib->isCached($_REQUEST['url']);
  29.  
  30.     if (!$id{
  31.         $gBitSmarty->assign('msg'tra("No cache information available"));
  32.  
  33.         $gBitSystem->display'error.tpl' );
  34.         die;
  35.     }
  36.  
  37.     $_REQUEST["cache_id"$id;
  38. }
  39.  
  40. if (!isset($_REQUEST["cache_id"])) {
  41.     $gBitSmarty->assign('msg'tra("No page indicated"));
  42.  
  43.     $gBitSystem->display'error.tpl' );
  44.     die;
  45. }
  46.  
  47. // Get a list of last changes to the Wiki database
  48. $info $gBitSystem->get_cache($_REQUEST["cache_id"]);
  49. $ggcacheurl 'http://google.com/search?q=cache:'.urlencode(strstr($info['url'],'http://'));
  50.  
  51. // test if url ends with .txt : formatting for text
  52. if (substr($info["url"]-44== ".txt"{
  53.     $info["data""<pre>" $info["data""</pre>";
  54. }
  55.  
  56. $gBitSmarty->assign('ggcacheurl'$ggcacheurl);
  57. $gBitSmarty->assign_by_ref('info'$info);
  58. $gBitSystem->display'bitpackage:kernel/view_cache.tpl');
  59. $gBitSmarty->display('bitpackage:kernel/view_cache.tpl');
  60.  
  61. ?>

Documentation generated on Thu, 15 Feb 2007 20:51:01 +0000 by phpDocumentor 1.3.0