Initial commit
This commit is contained in:
30
api-wiaas/server/components/v2/terms/TermsController.php
Normal file
30
api-wiaas/server/components/v2/terms/TermsController.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* TermsController controlls the actions for the terms and conditions page
|
||||
*/
|
||||
class TermsController{
|
||||
private $model;
|
||||
|
||||
function __construct(){
|
||||
$this->model = new TermsModel();
|
||||
}
|
||||
|
||||
/**
|
||||
* output file content for pdf verison of terms and conditions
|
||||
* @return file pdf file content
|
||||
*/
|
||||
public function pdfTerms(){
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-Disposition: inline; filename=\"".APPLICATION_NAME." Terms and Conditions.pdf\"");
|
||||
$idTerms = isset($_REQUEST['idTerms']) ? $_REQUEST['idTerms'] : 0;
|
||||
echo $this->model->pdfTerms($idTerms);
|
||||
}
|
||||
|
||||
/**
|
||||
* open shop page
|
||||
*/
|
||||
public function getTerms(){
|
||||
$idTerms = isset($_REQUEST['idTerms']) ? $_REQUEST['idTerms'] : 0;
|
||||
echo json_encode($this->model->getTermsHTML($idTerms));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user