Пример #1
0
 public function indexAction()
 {
     //Pega as apresentações que estão no banco.
     $dbTablePresentation = new Application_Model_DbTable_Presentation();
     $sqlPresentation = $dbTablePresentation->getText();
     $this->view->presentation = $sqlPresentation;
     //pega as noticias do banco.
     $dbTableNews = new Application_Model_DbTable_News();
     $sqlNews = $dbTableNews->getText();
     $this->view->news = $sqlNews;
     $dbTableText = new Application_Model_DbTable_Text();
     $sqlBlock = $dbTableText->getText();
     $this->view->text = $sqlBlock;
     $dbTableBlock = new Application_Model_DbTable_Block();
     $sqlBlock = $dbTableBlock->getText();
     $this->view->block = $sqlBlock;
 }
Пример #2
0
 public function downloadInstructionAction()
 {
     $dbTable = new Application_Model_DbTable_Block();
     $linkfile = $dbTable->getTextById($_GET['id']);
     $this->download = $linkfile;
     foreach ($this->download as $download) {
         $link = $download['link_instruction'];
         $name = $download['name_document'];
         header("Content-Type: application/octet-stream");
         header("Content-Disposition: attachment; filename='{$name}'");
         readfile($link);
         exit;
     }
 }