Bin will be removed on June 1, 2014 in favor of http://gist.github.com. Please save all your pastes before then. So long, and thanks for all the fish!×
1
2
3
4
5
6
7
8
9
10
11
    function getEula($id = null) {
        if ($id == null) {
            $eula = $this->eula->find('first', array('order' => array("eula.id DESC")));
        } else {
            $eula = $this->eula->find('first', array('conditions' => array('eula.id' => $id)));
        }
        header("Content-type: application/pdf");
        header("Content-Disposition: attachment; filename=ObchodniPodminkySien.pdf");
        echo $eula["eula"]["eula"];
        exit;
    }