function hacked_reports_export_select in Hacked! 6        
                          
                  
                        
1 string reference to 'hacked_reports_export_select'
  - hacked_menu in ./hacked.module
- Implementation of hook_menu().
File
 
   - ./hacked.export.inc, line 4
Code
function hacked_reports_export_select() {
  global $user;
  
  $rows = array();
  $header = array();
  $cache_results = db_query("SELECT cid, data, created, headers, expire, serialized FROM {" . HACKED_CACHE_TABLE . "} WHERE cid LIKE '%s%%'", 'hacked:clean:hashes:');
  while ($cache = db_fetch_object($cache_results)) {
    if (isset($cache->data)) {
      
      if ($cache->expire == CACHE_PERMANENT || !variable_get('cache_lifetime', 0)) {
        $cache->data = db_decode_blob($cache->data);
        if ($cache->serialized) {
          $cache->data = unserialize($cache->data);
        }
      }
      else {
        if ($user->cache > $cache->created) {
          
          continue;
        }
        else {
          $cache->data = db_decode_blob($cache->data);
          if ($cache->serialized) {
            $cache->data = unserialize($cache->data);
          }
        }
      }
      
      $key_split = explode(':', $cache->cid);
      if (count($key_split) == 6) {
        $row = array();
        $row[] = t('!type - !name - !version', array(
          '!type' => $key_split[3],
          '!name' => $key_split[4],
          '!version' => $key_split[5],
        ));
        $row[] = l(t('Export'), 'admin/reports/hacked-export/' . $cache->cid);
        $rows[] = $row;
      }
    }
  }
  return theme('table', $header, $rows);
}