Example #1
0
 /**
  * Action tables
  *
  * Lists tables in the currently configured database.
  *
  */
 public function action_tables()
 {
     // reset data
     Table::reset_data();
     // get post input
     if ($input = \Input::post(null)) {
         // update stencil selection via post
         if (\Input::post('change_stencil')) {
             $input['STENCIL_NAME'] = \Input::post('STENCIL_NAME');
             $input['STENCIL_DESC'] = Stencil::get(\Input::post('STENCIL_NAME'), 'desc');
             Table::update_data($input);
         }
     }
     // set global stencil template vars
     $this->template->set_global('stencil', array('data' => Stencil::get(Table::get('crud.STENCIL_NAME'))));
     // get list of tables in currently configured database
     $this->template->set_global('tables', Table::get_listing());
     // set common template vars
     self::_set_template_vars($this->template);
 }