public function reviewAction() { if ($this->request->isPost()) { $i = 0; $item = $this->request->getPost('item'); $orderarray = array(); $order = array(); foreach ($item as $value) { $var = 'quantity' . $value; //echo $value; $quant = $this->request->getPost($var); //echo $quant; $result = Menudetails::findFirst(array("(m_id = :mid:)", 'bind' => array('mid' => $value))); $order[m_id] = $result->m_id; $order[m_name] = $result->m_name; $order[m_price] = $result->m_price; $order[m_type] = $result->m_type; $order[m_subtype] = $result->m_subtype; $order[m_category] = $result->m_category; $order[quant] = $quant; array_push($orderarray, $order); } $this->view->orderarray = $orderarray; //$this->view->orderarray=json_encode($orderarray); //echo $orderarray->quant; print_r($orderarray); } }
public function editAction($mid) { $auth = $this->session->get('auth'); $cid = $auth[cid]; //echo $cid; if ($cid == false) { $this->response->redirect("404"); } else { $menu = Menudetails::findFirst(array("(m_id = :mid:)", 'bind' => array('mid' => $mid))); $this->view->menu = $menu; } }