本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getServiceType方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getServiceType方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getServiceType怎么用?PHP Application_Model_DbTable_DbGlobal::getServiceType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getServiceType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addProgramName
public function addProgramName($data = null, $type = null)
{
$_title = new Zend_Dojo_Form_Element_TextBox('title');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_db = new Application_Model_DbTable_DbGlobal();
if (!empty($type)) {
$rows = $_db->getServiceType(2);
} else {
$rows = $_db->getServiceType(1);
}
//array_unshift($rows,array('id' => '-1',"title"=>$this->tr->translate("ADD")) );
$opt = "";
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['title'];
}
}
$_service_name = new Zend_Dojo_Form_Element_FilteringSelect("type");
$_service_name->setMultiOptions($opt);
$_service_name->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
$_desc = new Zend_Dojo_Form_Element_Textarea('desc');
$_desc->setAttribs(array('dojoType' => $this->tarea, 'class' => 'fullside', 'style' => 'width:96%;min-height:50px;'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status_program');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 2 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
if (!empty($data)) {
$_title->setValue($data['title']);
$_desc->setValue($data['desc']);
}
$this->addElements(array($_service_name, $_title, $_desc, $_status));
return $this;
}
示例2: addServiceCategoryAction
public function addServiceCategoryAction()
{
if ($this->getRequest()->isPost()) {
try {
$_data = $this->getRequest()->getPost();
$_model = new Application_Model_DbTable_DbGlobalinsert();
$id = $_model->insertSerViceProgramType($_data);
$_model = new Application_Model_DbTable_DbGlobal();
$service_type = $_model->getServiceType(1);
$rs = array('id' => $id, "msg" => "INSERT_SUCCESS", "service_type" => $service_type);
print_r(Zend_Json::encode($rs));
exit;
} catch (Exception $e) {
Application_Form_FrmMessage::message("INSERT_FAIL");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
}
示例3: addProgramName
public function addProgramName($data = null)
{
$_db = new Application_Model_DbTable_DbGlobal();
$rows = $_db->getServiceType();
$opt = array();
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['title'];
}
}
$_type_service = new Zend_Dojo_Form_Element_FilteringSelect('title');
$_type_service->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_type_service->setMultiOptions($opt);
$_type = new Zend_Dojo_Form_Element_FilteringSelect('type');
$_status_type = array("-1" => "", 1 => $this->tr->translate("SERVICE"), 2 => $this->tr->translate("PROGRAM"));
$_type->setMultiOptions($_status_type);
$_type->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside', 'required' => 'true', 'onchange' => 'getProgramByType();'));
$_title = new Zend_Dojo_Form_Element_TextBox('add_title');
$_title->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_desc = new Zend_Dojo_Form_Element_Textarea('desc');
$_desc->setAttribs(array('dojoType' => $this->tarea, 'class' => 'fullside', 'style' => 'width:96%;min-height:50px;'));
//$_desc->setAttribs(array('dojoType'=>$this->tarea,'class'=>'fullside', ));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
if (!empty($data)) {
$_title->setValue($data['title']);
$_desc->setValue($data['desc']);
$_title->setValue($data['title']);
$_type->setValue($data['ser_cate_id']);
$_type_service->setValue($data['service_id']);
$_status->setValue($data['status']);
}
$this->addElements(array($_type, $_type_service, $_title, $_desc, $_status));
return $this;
}
示例4: frmAddProgramCharge
public function frmAddProgramCharge($data = null)
{
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getServiceType(2);
array_unshift($rows, array('id' => '-1', "title" => $this->tr->translate("ADD")));
$opt = "";
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['title'];
}
}
$_service_name = new Zend_Dojo_Form_Element_FilteringSelect("service_name");
$_service_name->setMultiOptions($opt);
$_service_name->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside', 'onchange' => 'PopupServiceCate();'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
$_status->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
$_rs = $db->AllStatus();
$_status->setMultiOptions($_rs);
$_status_hour = new Zend_Dojo_Form_Element_FilteringSelect("type_hour");
$_status_hour->setAttribs(array('dojoType' => $this->filter, 'required' => 'true', 'class' => 'fullside'));
$_rs = $db->AllStatusHour();
$_status_hour->setMultiOptions($_rs);
$_total_hour = new Zend_Dojo_Form_Element_NumberTextBox("total_hour");
$_total_hour->setAttribs(array('dojoType' => $this->t_num, 'required' => 'true', 'class' => 'fullside'));
$_create_date = new Zend_Dojo_Form_Element_DateTextBox("create_date");
$_create_date->setAttribs(array('dojoType' => $this->date, 'required' => 'true', 'class' => 'fullside'));
$_create_date->setValue(date("Y-m-d"));
$id = new Zend_Form_Element_Hidden("id");
if ($data != null) {
$id->setValue($data[0]['service_id']);
$_service_name->setValue($data[0]['ser_cate_id']);
$_status->setValue($data[0]['status']);
$_create_date->setValue($data[0]['ser_cate_id']);
$originalDate = $data[0]['create_date'];
$newDate = date("Y-m-d", strtotime($originalDate));
$_create_date->setValue($newDate);
}
$this->addElements(array($_service_name, $_status, $id, $_create_date, $_status_hour, $_total_hour));
return $this;
}
示例5: frmSearchServiceChageFee
public function frmSearchServiceChageFee($_data = null)
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$_code = new Zend_Dojo_Form_Element_TextBox('service_code');
$_code->setAttribs(array('dojoType' => $this->text, 'placeholder' => $this->tr->translate("SEARCH_BY_CODE")));
$_code->setValue($request->getParam('service_code'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status_search');
$_status->setAttribs(array('dojoType' => $this->filter));
$_status_opt = array(-1 => $this->tr->translate("ALL_STATUS"), 1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_status->setValue($request->getParam("status_search"));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getServiceType();
$opt = array(-1 => $this->tr->translate("CHOOSE"));
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['title'];
}
}
$_cate_type = new Zend_Dojo_Form_Element_FilteringSelect('cate_type');
$_cate_type->setAttribs(array('dojoType' => $this->filter));
$_cate_type->setMultiOptions($opt);
$_cate_type->setValue($request->getParam("cate_type"));
$rows = $db->getAllServiceItemsName(0);
$_service_name = new Zend_Dojo_Form_Element_FilteringSelect('service_name');
$_service_name->setAttribs(array('dojoType' => $this->filter));
$opt = array(-1 => $this->tr->translate("CHOOSE"));
if (!empty($rows)) {
foreach ($rows as $row) {
$opt[$row['id']] = $row['title'];
}
}
$_service_name->setMultiOptions($opt);
$_service_name->setValue($request->getParam("service_name"));
$this->addElements(array($_service_name, $_cate_type, $_code, $_status));
if (!empty($_data)) {
}
return $this;
}