本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getSettingById方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getSettingById方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getSettingById怎么用?PHP Application_Model_DbTable_DbGlobal::getSettingById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getSettingById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addAction
public function addAction()
{
if ($this->getRequest()->isPost()) {
try {
$add_product = new Product_Model_DbTable_DbAddProduct();
$post = $this->getRequest()->getPost();
$add_product->addProduct($post);
//
Application_Form_FrmMessage::message("INSERT_SUCCESS");
if (@$post['Save'] != "") {
Application_Form_FrmMessage::redirectUrl('/product/index/index');
}
} catch (Exception $e) {
Application_Form_FrmMessage::messageError("INSERT_ERROR", $err = $e->getMessage());
}
}
$formProduct = new Application_Form_FrmProduct(null);
$formStockAdd = $formProduct->AddProductForm(null);
Application_Model_Decorator::removeAllDecorator($formStockAdd);
$this->view->form = $formStockAdd;
//control
$formAddProdcut = new Application_Form_FrmAction(null);
$FrmAdd = $formAddProdcut->AllAction(null);
Application_Model_Decorator::removeAllDecorator($FrmAdd);
$this->view->control = $FrmAdd;
///view on select form
$items = new Application_Model_GlobalClass();
$locationRows = $items->getLocationOption();
$this->view->locations = $locationRows;
//for add location
$formpopup = new Application_Form_FrmPopup(null);
$formAdd = $formpopup->popuLocation(null);
Application_Model_Decorator::removeAllDecorator($formAdd);
$this->view->form_addstock = $formAdd;
$form_branch = $formpopup->popupBranch(null);
Application_Model_Decorator::removeAllDecorator($form_branch);
$this->view->form_brand = $form_branch;
$form_measure = $formpopup->popuMeasure(null);
Application_Model_Decorator::removeAllDecorator($form_measure);
$this->view->form_measure = $form_measure;
$form_category = $formpopup->popupCategory(null);
Application_Model_Decorator::removeAllDecorator($form_category);
$this->view->form_category = $form_category;
$db = new Application_Model_DbTable_DbGlobal();
$row = $db->getSettingById(12);
$this->view->setpricebybranch = $row['key_value'];
}
示例2: updatePurchaseOrderAction
public function updatePurchaseOrderAction()
{
$id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
$db_global = new Application_Model_DbTable_DbGlobal();
$sql = "SELECT * FROM tb_purchase_order WHERE order_id =" . $id;
$rs = $db_global->getGlobalDbRow($sql);
//print_r($rs);exit();
if ($rs["status"] == 4 or $rs["status"] == 5) {
$db = new Application_Model_DbTable_DbGlobal();
$row = $db->getSettingById(15);
if ($row['key_value'] == 0) {
Application_Form_FrmMessage::message("You don't have permission to update purchase that recieved already");
Application_Form_FrmMessage::redirectUrl("/purchase/index/index");
} else {
$this->ActionPurchaseAction();
}
} else {
$this->ActionPurchaseAction();
}
}