当前位置: 首页>>代码示例>>PHP>>正文


PHP Application_Model_DbTable_DbGlobal::getAllBrand方法代码示例

本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getAllBrand方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getAllBrand方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getAllBrand怎么用?PHP Application_Model_DbTable_DbGlobal::getAllBrand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application_Model_DbTable_DbGlobal的用法示例。


在下文中一共展示了Application_Model_DbTable_DbGlobal::getAllBrand方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FrmBrand

 public function FrmBrand($frm = null)
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $status = new Zend_Form_Element_Select('status');
     $_arr_status = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $status->setMultiOptions($_arr_status);
     $status->setAttribs(array('class' => 'form-control validate[required]'));
     $parent = new Zend_Form_Element_Select("parent_id");
     $parent->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $category = $db->getAllBrand();
     if (empty($category)) {
         $option_category = array('0' => 'No Brand To Select');
     } else {
         $option_category = array('0' => 'Choose Brand');
         foreach ($category as $row_cat) {
             $option_category[$row_cat["brand_id"]] = $row_cat["name_kh"];
         }
     }
     $parent->setMultiOptions($option_category);
     $brand_en = new Zend_Form_Element_Text("name_en");
     $brand_en->setAttribs(array('class' => 'validate[required]', 'placeholder' => ' Brand Name In English', "OnChange" => "GetBrandName(1)"));
     $brand_km = new Zend_Form_Element_Text("name_km");
     $brand_km->setAttribs(array('class' => 'validate[required]', 'placeholder' => ' Brand Name In Khmer', "OnChange" => "GetBrandName(2)"));
     $icon = new Zend_Form_Element_File("icon");
     $this->addElements(array($icon, $status, $brand_en, $brand_km, $parent));
     if ($frm != "") {
         $parent->setValue($frm["parent_id"]);
         $brand_en->setValue($frm["name_en"]);
         $brand_km->setValue($frm["name_kh"]);
         $status->setValue($frm["status"]);
     }
     return $this;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:33,代码来源:FrmBrand.php

示例2: frmSearch

 public function frmSearch($data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $search_text = new Zend_Form_Element("txt_search");
     $search_text->setValue($request->getParam("txt_search"));
     $cat_id = new Zend_Form_Element_Select("cat_id");
     $cat_id->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $category = $db->getAllProCategories();
     $option_category = array(0 => $this->tr->translate("CHOOSE_CATEGORY"));
     foreach ($category as $row_cat) {
         $option_category[$row_cat["cat_id"]] = $row_cat["cat_name_km"] . " - " . $row_cat["cat_name_en"];
     }
     $cat_id->setMultiOptions($option_category);
     $cat_id->setValue($request->getParam("cat_id"));
     $brand = new Zend_Form_Element_Select("brand");
     $brand->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $row_brand = $db->getAllBrand();
     $option_brand = array(0 => $this->tr->translate("CHOOSE_BRAND"));
     foreach ($row_brand as $rs) {
         $option_brand[$rs["brand_id"]] = $rs["name_kh"] . " - " . $rs["name_en"];
     }
     $brand->setMultiOptions($option_brand);
     $brand->setValue($request->getParam("brand"));
     if ($data != null) {
     }
     return $this->addElements(array($search_text, $cat_id, $brand));
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:28,代码来源:Frmproduct.php

示例3: FrmSearch

 public function FrmSearch($data = null)
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     $search = new Zend_Form_Element_Text("txt_search");
     $search->setValue($request->getParam("txt_search"));
     $start_date = new Zend_Form_Element_Text("start_date");
     $c_date = date('Y-m-d');
     $start_date->setAttribs(array('id' => 'datepicker', 'style' => 'float:left;width:100%', 'class' => 'form-control'));
     $_date_s = $request->getParam("start_date");
     if (empty($_date_s)) {
         $_date_s = date('Y-m-d');
     }
     $start_date->setValue($_date_s);
     $end_date = new Zend_Form_Element_Text("end_date");
     $end_date->setAttribs(array('class' => 'datepicker', 'style' => 'width:100% !important'));
     $_date_t = $request->getParam("end_date");
     if (empty($_date_t)) {
         $_date_t = date('Y-m-d');
     }
     $end_date->setValue($_date_t);
     $pay_status = new Zend_Form_Element_Select("pay_status");
     $options = array('-1' => $this->tr->translate("SELECT"), '1' => $this->tr->translate("FULL_PAID"), '2' => $this->tr->translate("BALANCE"));
     $pay_status->setMultiOptions($options);
     $pay_status->setValue($request->getParam("pay_status"));
     $option = array('-1' => $this->tr->translate("SELECT"), '1' => $this->tr->translate("ACTIVE"), '0' => $this->tr->translate("DEACTIVE"));
     $status = new Zend_Form_Element_Select("status");
     $status->setMultiOptions($option);
     $status->setValue($request->getParam("status"));
     // Product Blog
     $cat_id = new Zend_Form_Element_Select("cat_id");
     $cat_id->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $category = $db->getAllProCategories();
     $option_category = array(0 => $this->tr->translate("CHOOSE_CATEGORY"));
     foreach ($category as $row_cat) {
         $option_category[$row_cat["cat_id"]] = $row_cat["cat_name_km"] . " - " . $row_cat["cat_name_en"];
     }
     $cat_id->setMultiOptions($option_category);
     $cat_id->setValue($request->getParam("cat_id"));
     $brand = new Zend_Form_Element_Select("brand");
     $brand->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $row_brand = $db->getAllBrand();
     $option_brand = array(0 => $this->tr->translate("CHOOSE_BRAND"));
     foreach ($row_brand as $rs) {
         $option_brand[$rs["brand_id"]] = $rs["name_kh"] . " - " . $rs["name_en"];
     }
     $brand->setMultiOptions($option_brand);
     $brand->setValue($request->getParam("brand"));
     // Sale Blog
     $row_cu = $db->getCustomer();
     $option_cu = array(0 => $this->tr->translate("CHOOSE_CUSTOMER"));
     foreach ($row_cu as $rs_cu) {
         $option_cu[$rs_cu["customer_id"]] = $rs_cu["name_kh"] . "-" . $rs_cu["name_en"];
     }
     $customer = new Zend_Form_Element_Select("customer");
     $customer->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $customer->setMultiOptions($option_cu);
     $customer->setValue($request->getParam("customer"));
     $row_order = $db->getOrderNo();
     $option_order = array(-1 => $this->tr->translate("CHOOSE_ORDER_NO"));
     foreach ($row_order as $rs_order) {
         $option_order[$rs_order["so_id"]] = $rs_order["order_no"];
     }
     $invoice_no = new Zend_Form_Element_Select("invoice_no");
     $invoice_no->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $invoice_no->setMultiOptions($option_order);
     $invoice_no->setValue($request->getParam("invoice_no"));
     // Purchase Blog
     $supplier = new Zend_Form_Element_Select("supplier");
     $dbv = new phurchase_Model_DbTable_DbVendor();
     $vendors = $dbv->getAllCate();
     $option_vendor = array("" => '​ - - - ជ្រើរើសអ្នកផ្គត់ផ្គង  - - - ', -1 => " + បន្ថែមអ្នកផ្គត់ផ្គង");
     foreach ($vendors as $row_vendors) {
         $option_vendor[$row_vendors["vendor_id"]] = $row_vendors["v_name"];
     }
     $supplier = new Zend_Form_Element_Select("supplier");
     $supplier->setMultiOptions($option_vendor);
     $supplier->setValue($request->getParam("supplier"));
     $row_pu = $db->getPurchaseNo();
     $options = array("-1" => '​ - - - ជ្រើរើសអ្នកលេខវិក៍យបត្រ  - - - ');
     foreach ($row_pu as $rs) {
         $options[$rs["order_id"]] = $rs["order"];
     }
     $purchase_no = new Zend_Form_Element_Select("purchase_no");
     $purchase_no->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $purchase_no->setMultiOptions($options);
     $purchase_no->setValue($request->getParam("purchase_no"));
     if ($data != null) {
     }
     return $this->addElements(array($search, $start_date, $end_date, $pay_status, $status, $cat_id, $brand, $customer, $invoice_no, $supplier, $purchase_no));
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:91,代码来源:FrmReport.php


注:本文中的Application_Model_DbTable_DbGlobal::getAllBrand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。