Ejemplo n.º 1
0
 public function index()
 {
     $affiliates = new Affiliates($this->db);
     $this->f3->set('affiliates', $affiliates->read(array('status=?', 'Active'), []));
     $this->f3->set('content', 'app/themes/' . $this->f3->get('theme') . '/views/affiliates.htm');
     echo Template::instance()->render('app/themes/' . $this->f3->get('theme') . '/templates/default.htm');
 }
Ejemplo n.º 2
0
 public function edit($id)
 {
     $affiliates = new Affiliates($this->db);
     if (!$affiliates->count(array('id=?', $id))) {
         $this->f3->error(404);
     } else {
         $this->f3->set('affiliate', $affiliates->read(array('id=?', $id), [])[0]);
         echo Template::instance()->render('app/themes/' . $this->f3->get('admintheme') . '/views/mytcg/affiliates_edit_form.htm');
     }
 }