public function execute() { if (empty($_GET['uid'])) { throw new Exception('Enter uid'); } if (empty($_GET['website_id'])) { throw new Exception('Enter website_id'); } $Models_Websites = new Models_Websites(); $website_id = $Models_Websites->delete($_GET['uid'], $_GET['website_id']); $this->return = array('confirm' => 'New website created successfully', 'website_id' => $website_id); }
public function execute() { if (empty($_GET['id'])) { throw new Exception('missing id'); } $cache = 1; if (isset($_GET['cache'])) { $cache = $_GET['cache']; } $Models_Websites = new Models_Websites(); $return = $Models_Websites->detail($_GET['id'], $cache); $this->return = $return; }
public function execute() { $request = $_REQUEST; $data = $request['data']; if (empty($data)) { throw new Exception('Missing Data'); } if (empty($data['uid'])) { throw new Exception('Missing Uid'); } $Models_Websites = new Models_Websites(); $website_id = $Models_Websites->add($data); $this->return = array('confirm' => 'New website created successfully', 'website_id' => $website_id); }
public function execute() { $request = $_REQUEST; $data = $request['data']; if (empty($_GET['id'])) { throw new Exception('Missing ID'); } if (empty($data)) { throw new Exception('Missing Data'); } if (empty($data['uid'])) { throw new Exception('Missing Uid'); } $Models_Websites = new Models_Websites(); $Models_Websites->edit($_GET['id'], $data); $this->return = array('confirm' => 'Website updated successfully', 'website_id' => $_GET['id']); }
public function execute() { if (empty($_GET['uid'])) { throw new Exception('Enter uid'); } $nrows = 10000; $offset = 0; if (empty($_GET['offset'])) { $offset = $_GET['offset']; } $cache = 1; if (isset($_GET['cache'])) { $cache = $_GET['cache']; } $uid = $_GET['uid']; $Models_Websites = new Models_Websites(); $return = $Models_Websites->view($uid, $nrows, $offset, $cache); $this->return = $return; }