Esempio n. 1
0
 public function editAction($id)
 {
     $request = Phalcon_Request::getInstance();
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $companies = Companies::findFirst('id="' . $id . '"');
         if (!$companies) {
             Flash::error("companies was not found", "alert alert-error");
             return $this->_forward("companies/index");
         }
         $this->view->setVar("id", $companies->id);
         Tag::displayTo("id", $companies->id);
         Tag::displayTo("name", $companies->name);
         Tag::displayTo("telephone", $companies->telephone);
         Tag::displayTo("address", $companies->address);
         Tag::displayTo("city", $companies->city);
     }
 }
Esempio n. 2
-1
 public function editAction($id)
 {
     $request = Phalcon_Request::getInstance();
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $producttypes = ProductTypes::findFirst('id="' . $id . '"');
         if (!$producttypes) {
             Flash::error("product types was not found", "alert alert-error");
             return $this->_forward("producttypes/index");
         }
         $this->view->setVar("id", $producttypes->id);
         Tag::displayTo("id", $producttypes->id);
         Tag::displayTo("name", $producttypes->name);
     }
 }