[ PHPXref.com ] [ Generated: Sun Jul 20 21:04:18 2008 ] [ WikyBlog 0.9.2 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/include/ -> specUpdateSend.php (source)

   1  <?
   2  
   3  if ( !defined('WikyBlog') ){
   4      die("Not an entry point...");
   5  }
   6  
   7  
   8  includeFile('search.php');
   9  
  10  class sendUpdate extends query{
  11      var $classes;
  12      var $result;
  13      var $selectA =array();
  14      
  15  	function sendUpdate(){
  16          global $dbInfo,$wbConfig,$wbTablePrefix;
  17          $this->rowLimit = 20;
  18          
  19          $this->selectA[] = 'lang';
  20          $this->selectA[] = 'title';
  21          $this->selectA[] = 'content';
  22          
  23          $this->query = 'SELECT SQL_CALC_FOUND_ROWS '.implode(',',$this->selectA);
  24          $this->query .= ' FROM `'.$wbTablePrefix.'help` WHERE 1=1 ';
  25          
  26          $_GET += array('v'=>'');
  27          if( $_GET['v'] != '2'){
  28              $this->result[] = 'error=true';
  29          }
  30          
  31          if( isset($_GET['m']) && isset($_GET['t']) ){
  32              if( is_numeric($_GET['m']) && is_numeric($_GET['t']) ){
  33                  $timeDiff = $_GET['t']-time();
  34                  $timeDiff = round($timeDiff/3600);    //round to full hours
  35                  $timeDiff = $timeDiff*3600;         //back to unix
  36                  $_GET['m'] = $_GET['m']-$timeDiff;
  37                  $this->query .= ' AND UNIX_TIMESTAMP(modified) > '.$_GET['m'];
  38              }
  39          }
  40          
  41          if( isset($_GET['f']) && is_array($_GET['f']) ){
  42              foreach($_GET['f'] as $file){
  43                  //$this->query .= ' AND title != CONCAT("wikyblog/","'.sqlescape($file).'")';
  44                  $temp = wbExplode('/',$file);
  45                  //$this->query .= ' AND title != CONCAT("","'.sqlescape($file).'")';
  46              }
  47          }
  48          $this->query .= ' ORDER BY modified DESC';
  49          $this->limit();
  50  
  51          browseSearch3($this,'Send Update');
  52      }
  53  	function displayNumbers(&$from,&$to,&$rowsFound,&$prev,&$next,&$current){
  54          global $page;
  55          $this->result[] = 'rowsFound='.$rowsFound;
  56      }
  57  	function displayEmpty(){
  58          return true;
  59      }
  60  	function display($row,$i){
  61          global $page;
  62          foreach($this->selectA as $key){
  63              $this->result[] = $i.'['.postEscape($key).']='.postEscape($row->$key);
  64          }
  65      }
  66  	function displayPost(&$prev,&$pages,&$next){
  67          //echo $prev.$pages.$next;
  68          if( isset($_GET['raw'])){
  69              ob_clean();
  70              header('Content-type: text/plain; charset=UTF-8');
  71          }
  72          
  73          echo implode('&',$this->result);
  74          
  75          if( isset($_GET['raw'])){
  76              exit();
  77          }
  78      }
  79  	function setLinks(&$currentPageNum,&$rowsFound,&$tabLabel){
  80          $this->currLabel = 'test';
  81      }
  82  	function displayPre(){ }
  83  
  84  }
  85                  
  86  $queryObj = new sendUpdate();
  87  
  88  
  89  //
  90  //
  91  //
  92  ///////////////////////////////////////////////////////////////////////////////////////////////////////
  93  ///////////////////////////////////////////////////////////////////////////////////////////////////////
  94  ///////////////////////////////////////////////////////////////////////////////////////////////////////
  95  //
  96  //            
  97  //
  98  
  99  function postEscape(&$text){
 100      return urlencode( $text);
 101      //return rawurlencode($text);
 102  }
 103  


[ Powered by PHPXref - Served by Debian GNU/Linux ]