protected function _postDelete() { $modelUserFinance = new App_Model_Db_Table_UserFinance(); $modelUserFinance->delete("userId='" . $this->kopel . "'"); $modelUserInvoice = new App_Model_Db_Table_Invoice(); $modelUserInvoice->delete("uid='" . $this->kopel . "'"); $acl = Pandamp_Acl::manager(); $acl->deleteUser($this->username); $modelOrder = new App_Model_Db_Table_Order(); $fetchOrder = $modelOrder->fetchAll("userId='" . $this->kopel . "'"); foreach ($fetchOrder as $rowOrder) { $rowOrder->delete(); } $registry = Zend_Registry::getInstance(); $config = $registry->get(Pandamp_Keys::REGISTRY_APP_OBJECT); $cdn = $config->getOption('cdn'); $sDir = $cdn['static']['dir']['photo']; //$sDir = ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'photo'; try { if (file_exists($sDir . "/" . $this->kopel . ".gif")) { unlink($sDir . "/" . $this->kopel . ".gif"); } if (file_exists($sDir . "/" . $this->kopel . ".jpg")) { unlink($sDir . "/" . $this->kopel . ".jpg"); } if (file_exists($sDir . "/" . $this->kopel . ".jpeg")) { unlink($sDir . "/" . $this->kopel . ".jpeg"); } if (file_exists($sDir . "/" . $this->kopel . ".png")) { unlink($sDir . "/" . $this->kopel . ".png"); } } catch (Exception $e) { } }
public function trdetailAction() { $orderId = $this->_request->getParam('orderId'); $tblOrder = new App_Model_Db_Table_Order(); $tblOrderDetail = new App_Model_Db_Table_OrderDetail(); $tblOrderHistory = new App_Model_Db_Table_OrderHistory(); //$tblOrderPaypalHistory = new Kutu_Core_Orm_Table_PaypalPaymentHistory(); $tblOrderNsiapay = new App_Model_Db_Table_Nsiapay(); $rowset = $tblOrder->fetchAll("orderID ='" . $orderId . "'"); $rowsetDetail = $tblOrderDetail->fetchAll("orderId='" . $orderId . "'"); $rowsetHistory = App_Model_Show_OrderHistory::show()->getHistory($orderId); //$rowsetPaypalHistory = $tblOrderPaypalHistory->fetchAll($tblOrderPaypalHistory->select()->where("orderId='".$orderId."'")); $rowsetNsiapay = $tblOrderNsiapay->fetchAll("orderID ='" . $orderId . "'"); $this->view->listOrder = $rowset; $this->view->listOrderDetail = $rowsetDetail; $this->view->rowsetHistory = $rowsetHistory; //$this->view->rowsetPaypalHistory = $rowsetPaypalHistory; $this->view->rowsetNsiapay = $rowsetNsiapay; }