本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getclientdtype方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getclientdtype方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getclientdtype怎么用?PHP Application_Model_DbTable_DbGlobal::getclientdtype使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getclientdtype方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
$db_model = new Driverguide_Model_DbTable_DbDriver();
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
try {
$id = $db_model->updateDriver($data);
Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESSS", "/driverguide");
} catch (Exception $e) {
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$db = new Application_Model_DbTable_DbGlobal();
$client_type = $db->getclientdtype();
array_unshift($client_type, array('id' => -1, 'name' => '---Add New ---'));
$this->view->clienttype = $client_type;
$dbpop = new Application_Form_FrmPopupGlobal();
$this->view->frm_popup_clienttype = $dbpop->frmPopupclienttype();
$id = $this->getRequest()->getParam("id");
$row = $db_model->getDriverById($id);
$this->view->rs = $row;
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmaddGuide($row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
}
示例2: editAction
public function editAction(){
$db = new Group_Model_DbTable_DbClient();
if($this->getRequest()->isPost()){
try{
$data = $this->getRequest()->getPost();
//print_r($data);exit();
$id= $db->addClient($data);
if($data['chackcall']==1){
Application_Form_FrmMessage::message("វានឹងបន្ថែមទ្រព្យបញ្ចាំរបស់អតិថិជនដោយស្វ័យប្រវត្តិ!");
Application_Form_FrmMessage::redirectUrl("/group/callteral/add/id/".$id);
}
Application_Form_FrmMessage::Sucessfull('EDIT_SUCCESS',"/group/index");
}catch (Exception $e){
Application_Form_FrmMessage::message("EDIT_FAILE");
echo $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$id = $this->getRequest()->getParam("id");
$row = $db->getClientById($id);
$this->view->row=$row;
$this->view->photo = $row['photo_name'];
if(empty($row)){
$this->_redirect("/group/client");
}
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmAddClient($row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
$dbpop = new Application_Form_FrmPopupGlobal();
$this->view->frm_popup_village = $dbpop->frmPopupVillage();
$this->view->frm_popup_comm = $dbpop->frmPopupCommune();
$this->view->frm_popup_district = $dbpop->frmPopupDistrict();
$this->view->frm_popup_clienttype = $dbpop->frmPopupclienttype();
$db = new Application_Model_DbTable_DbGlobal();
$client_type = $db->getclientdtype();
array_unshift($client_type,array(
'id' => -1,
'name' => '---Add New ---',
) );
$this->view->clienttype = $client_type;
}
示例3: addAction
public function addAction(){
if($this->getRequest()->isPost()){
$data = $this->getRequest()->getPost();
//print_r($data);exit();
$db = new Group_Model_DbTable_DbClient();
try{
if(isset($data['save_new'])){
$id= $db->addClient($data);
Application_Form_FrmMessage::message("ការបញ្ចូលជោគជ័យ !");
if($data['chackcall']==1){
Application_Form_FrmMessage::message("វានឹងបន្ថែមទ្រព្យបញ្ចាំរបស់អតិថិជនដោយស្វ័យប្រវត្តិ!");
Application_Form_FrmMessage::redirectUrl("/group/Callteral/add/id/".$id);
}
}
else if (isset($data['save_close'])){
$id= $db->addClient($data);
Application_Form_FrmMessage::message("ការបញ្ចូលជោគជ័យ !");
if($data['chackcall']==1){
Application_Form_FrmMessage::message("វានឹងបន្ថែមទ្រព្យបញ្ចាំរបស់អតិថិជនដោយស្វ័យប្រវត្តិ!");
Application_Form_FrmMessage::redirectUrl("/group/Callteral/add/id/".$id);
}
Application_Form_FrmMessage::redirectUrl("/group/index");
}
}catch (Exception $e){
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$db = new Application_Model_DbTable_DbGlobal();
$this->view->allclient = $db->getAllClient();// for filter
$this->view->allclient_number = $db->getAllClientNumber();//for filter
$client_type = $db->getclientdtype();
array_unshift($client_type,array(
'id' => -1,
'name' => '---Add New ---',
) );
$this->view->clienttype = $client_type;
$districts = $db->getAllDistricts();
array_unshift($districts,array(
'id' => -1,
'name' => '---Add New ---',
'pro_id' => -1 ) );
$this->view->district = $districts;
$commune = $db->getCommune();
array_unshift($commune,array(
'id' => -1,
'name' => '---Add New ---',
'district_id' => -1 ) );
$this->view->commune_name = $commune;
$village = $db->getVillage();
array_unshift($village,array(
'id' => -1,
'name' => '---Add New Village Name---',
'commune_id' => -1 ) );
$this->view->village_name =$village;
$fm = new Group_Form_FrmClient();
$frm = $fm->FrmAddClient();
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_client = $frm;
$dbpop = new Application_Form_FrmPopupGlobal();
$this->view->frm_popup_village = $dbpop->frmPopupVillage();
$this->view->frm_popup_comm = $dbpop->frmPopupCommune();
$this->view->frm_popup_district = $dbpop->frmPopupDistrict();
$this->view->frm_popup_clienttype = $dbpop->frmPopupclienttype();
}