35 lines
649 B
PHP
35 lines
649 B
PHP
<?php
|
|
/**
|
|
* Controller for contact page
|
|
*/
|
|
class ContactController{
|
|
private $model;
|
|
|
|
function __construct(){
|
|
$this->model = new ContactModel();
|
|
}
|
|
|
|
/**
|
|
* get contact information
|
|
* @return json list of contacts
|
|
*/
|
|
public function getContactInfo(){
|
|
echo json_encode($this->model->getContactInfo());
|
|
}
|
|
|
|
/**
|
|
* include contact template
|
|
*/
|
|
public function contactTemplate(){
|
|
global $user;
|
|
require_once('templates/ContactTemplate.php');
|
|
}
|
|
|
|
/**
|
|
* open contact page
|
|
*/
|
|
public function showPage(){
|
|
require_once('ContactPage.php');
|
|
}
|
|
}
|