Example #1
0
 function execute($caveID, $caves)
 {
     // get model
     $model = new Contacts_Model($caveID, $caves);
     // init error
     $error = CONTACTS_NOERROR;
     // add contact
     $contact = Request::getVar('contact', '');
     $error = $model->addContact($contact);
     // return Show Controller
     $controller = new Contacts_Show_Controller($error);
     return $controller->execute($caveID, $caves);
 }
Example #2
0
 function execute($caveID, $caves)
 {
     // get model
     $model = new Contacts_Model($caveID, $caves);
     // init error
     $error = CONTACTS_NOERROR;
     // delete contact
     $contactID = Request::getVar('contactID', 0);
     $error = $model->deleteContact($contactID);
     // return Show Controller
     $controller = new Contacts_Show_Controller($error);
     return $controller->execute($caveID, $caves);
 }
Example #3
0
 function execute($caveID, $caves)
 {
     global $params, $config;
     // get model
     $model = new Contacts_Model($caveID, $caves);
     // init error
     $error = CONTACTS_NOERROR;
     // add contact
     $contact = $params->POST->contact;
     $error = $model->addContact($contact);
     // return Show Controller
     $controller = new Contacts_Show_Controller($error);
     return $controller->execute($caveID, $caves);
 }