예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->selectedTables = array();
     foreach ($this->db->getTables() as $table) {
         $this->tables[] = $table;
         // If any tables are requested, only show them
         if (isset($_GET['tables']) && count($_GET['tables']) > 0) {
             if (in_array($table->getName(), $_GET['tables'])) {
                 $this->selectedTables[$table->getName()] = $table;
             }
         } else {
             // Otherwise, default to all linked tables
             $referenced = count($table->getReferencingTables()) > 0;
             $referencing = count($table->getReferencedTables()) > 0;
             if ($referenced || $referencing) {
                 $this->selectedTables[$table->getName()] = $table;
             }
         }
     }
 }
예제 #2
0
 protected function send_file($ext, $mime, $content, $download_name = false)
 {
     $download_name = date('Y-m-d') . '_' . $this->table->getName();
     parent::send_file($ext, $mime, $content, $download_name);
 }