本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getNewClientId方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getNewClientId方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getNewClientId怎么用?PHP Application_Model_DbTable_DbGlobal::getNewClientId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getNewClientId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addClient
public function addClient($_data)
{
$photoname = str_replace(" ", "_", $_data['name_en'] . '-AGN') . '.jpg';
$upload = new Zend_File_Transfer();
$upload->addFilter('Rename', array('target' => PUBLIC_PATH . '/images/' . $photoname, 'overwrite' => true), 'photo');
$receive = $upload->receive();
if ($receive) {
$_data['photo'] = $photoname;
} else {
$_data['photo'] = !empty($_data['id']) ? $_data['id'] : "";
}
try {
$db = new Application_Model_DbTable_DbGlobal();
$client_code = $db->getNewClientId();
$_arr = array('title' => $_data['title'], 'customer_code' => $client_code, 'first_name' => $_data['name_kh'], 'last_name' => $_data['name_en'], 'sex' => $_data['sex'], 'dob' => $_data['dob_client'], 'pob' => $_data['country'], 'occupation' => $_data['occupation'], 'nationality' => $_data['nationality'], 'company_name' => $_data['company_name'], 'customer_type' => $_data['customer_type'], 'photo' => $_data['photo'], 'note' => $_data['desc'], 'passport_name' => $_data['passport'], 'pass_issuedate' => $_data['pissue_date'], 'pass_expireddate' => $_data['pexpired_date'], 'card_name' => $_data['card_code'], 'card_issuedate' => $_data['cissue_date'], 'card_expireddate' => $_data['cexpired_date'], 'ftb' => $_data['ftb'], 'ftb_issuedate' => $_data['fissue_date'], 'ftb_expireddate' => $_data['fexpired_date'], 'phone' => $_data['phone'], 'email' => $_data['email'], 'fax' => $_data['fax'], 'group_num' => $_data['group_num'], 'house_num' => $_data['address'], 'street' => $_data['street'], 'commune' => $_data['commune'], 'district' => $_data["district"], 'province_id' => $_data['province'], 'balance' => $_data['balance'], 'address1' => $_data['address1'], 'address2' => $_data['address2'], 'i_city' => $_data['i_city'], 'i_zipcode' => $_data['i_zipcode'], 'i_state' => $_data['state'], 'country' => $_data['countries'], 'i_phone' => $_data['i_phone'], 'status' => $_data['status'], 'date' => date("Y-m-d"));
if (!empty($_data['id'])) {
$where = 'id = ' . $_data['id'];
$this->update($_arr, $where);
return $_data['id'];
} else {
return $this->insert($_arr);
}
} catch (Exception $e) {
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
示例2: signUp
public function signUp($data)
{
$db = $this->getAdapter();
try {
$db_globle = new Application_Model_DbTable_DbGlobal();
$client_code = $db_globle->getNewClientId();
$arr = array('customer_code' => $client_code, 'first_name' => $data["first_name"], 'last_name' => $data["last_name"], 'email' => $data["email"], 'phone' => $data["phone"], 'user_account' => $data["s_user_name"], 'password' => md5($data["s_password"]), 'status' => 1, 'dob' => $data["dob"], 'sex' => $data["gender"]);
$this->_name = "ldc_customer";
$row = $this->insert($arr);
return $row;
} catch (Exception $e) {
echo $e->getMessage();
exit;
}
}
示例3: FrmAddClient
public function FrmAddClient($data = null)
{
$_group = new Zend_Dojo_Form_Element_CheckBox('is_group');
$_group->setAttribs(array('dojoType' => 'dijit.form.CheckBox', 'onchange' => 'getGroupCode();'));
$_group_code = new Zend_Dojo_Form_Element_TextBox('group_code');
$_group_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
// $db = new Application_Model_DbTable_DbGlobal();
// $id_client = $db->getNewClientId();
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['displayby'] == 1 ? $row['branch_namekh'] : $row['branch_nameen'];
}
}
$_branch_id->setMultiOptions($options);
$_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
$_member->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getClientByType();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['client_id']] = $row['name_en'];
}
}
$_member->setMultiOptions($options);
$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
$_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$id_client = $db->getNewClientId();
$_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
$_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readonly' => 'readonly', 'style' => 'color:red;'));
$_clientno->setValue($id_client);
$_nameen = new Zend_Dojo_Form_Element_TextBox('name_en');
$_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
$_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = array(1 => "Male", 2 => "Femail");
$_sex->setMultiOptions($opt);
$_situ_status = new Zend_Dojo_Form_Element_FilteringSelect('situ_status');
$_situ_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt_status = $db->getAllSituation();
$_situ_status->setMultiOptions($opt_status);
$_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
$_province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$rows = $db->getAllProvince();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['province_id']] = $row['province_en_name'];
}
}
$_province->setMultiOptions($options);
$_district = new Zend_Dojo_Form_Element_FilteringSelect('district');
$rows = $db->getAllDistrict();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['dis_id']] = $row['district_name'];
}
}
$_district->setMultiOptions($options);
$_district->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckDistrict();'));
$_commune = new Zend_Dojo_Form_Element_FilteringSelect('commune');
$rows = $db->getCommune();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['com_id']] = $row['commune_name'];
}
}
$_commune->setMultiOptions($options);
$_commune->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'onchange' => 'popupCheckCommune();'));
$_village = new Zend_Dojo_Form_Element_FilteringSelect('village');
$_village->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true', 'onchange' => 'popupCheckVillage();'));
$rows = $db->getVillage();
$options = array('' => "------Select------", -1 => "Add New");
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['vill_id']] = $row['village_name'];
}
}
$_village->setMultiOptions($options);
$_house = new Zend_Dojo_Form_Element_TextBox('house');
$_house->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
$_street = new Zend_Dojo_Form_Element_TextBox('street');
$_street->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_id_type = new Zend_Dojo_Form_Element_FilteringSelect('id_type');
$_id_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
$rows = $db->GetAllIDType();
$_id_type->setMultiOptions($rows);
$_id_no = new Zend_Dojo_Form_Element_TextBox('id_no');
$_id_no->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_phone = new Zend_Dojo_Form_Element_TextBox('phone');
$_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$_spouse = new Zend_Dojo_Form_Element_TextBox('spouse');
$_spouse->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
//.........这里部分代码省略.........
示例4: FrmAddClient
public function FrmAddClient($data = null)
{
$_dob = new Zend_Dojo_Form_Element_DateTextBox('dob_client');
$_dob->setValue(date("Y-m-d"));
$_dob->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
$_namekh->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
$_clientno->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'color:red;', 'readOnly' => true));
$id_client = $db->getNewClientId();
$_clientno->setValue($id_client);
$_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
$_nameen->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside', 'required' => 'true'));
$_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
$_sex->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt_status = $db->getVewOptoinTypeByType(1, 1);
unset($opt_status[-1]);
unset($opt_status['']);
$_sex->setMultiOptions($opt_status);
$_situ_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_situ_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$group_num = new Zend_Dojo_Form_Element_TextBox('group_num');
$group_num->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$country = new Zend_Dojo_Form_Element_TextBox('country');
$country->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$commune = new Zend_Dojo_Form_Element_TextBox('commune');
$commune->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$district = new Zend_Dojo_Form_Element_TextBox('district');
$district->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$province = new Zend_Dojo_Form_Element_FilteringSelect('province');
$province->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = $db->getAllProvince(1);
$province->setMultiOptions($opt);
$_street = new Zend_Dojo_Form_Element_TextBox('street');
$_street->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
$_id_type = new Zend_Dojo_Form_Element_FilteringSelect('id_type');
$_id_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => 'true'));
$address = new Zend_Dojo_Form_Element_TextBox('address');
$address->setAttribs(array('dojoType' => 'dijit.form.ValidationTextBox', 'class' => 'fullside'));
$_phone = new Zend_Dojo_Form_Element_TextBox('phone');
$_phone->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$photo = new Zend_Form_Element_File('photo');
$photo->setAttribs(array());
$job = new Zend_Dojo_Form_Element_TextBox('job');
$job->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$national_id = new Zend_Dojo_Form_Element_TextBox('national_id');
$national_id->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$email = new Zend_Dojo_Form_Element_TextBox('email');
$email->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$fax = new Zend_Dojo_Form_Element_TextBox('fax');
$fax->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$balance = new Zend_Dojo_Form_Element_TextBox('balance');
$balance->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$_id = new Zend_Form_Element_Hidden("id");
$_desc = new Zend_Dojo_Form_Element_TextBox('desc');
$_desc->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'style' => 'width:96%;min-height:30px;'));
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_status->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_title = new Zend_Dojo_Form_Element_FilteringSelect('title');
$_title->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("Mr."), 2 => $this->tr->translate("Ms"), 3 => $this->tr->translate("Miss"));
$_title->setMultiOptions($_status_opt);
$customer_type = new Zend_Dojo_Form_Element_FilteringSelect('customer_type');
$customer_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$_status_opt = array(1 => $this->tr->translate("Self"), 2 => $this->tr->translate("Agency"));
$customer_type->setMultiOptions($_status_opt);
$nationality = new Zend_Dojo_Form_Element_TextBox('nationality');
$nationality->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$company_name = new Zend_Dojo_Form_Element_TextBox('company_name');
$company_name->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$passport = new Zend_Dojo_Form_Element_TextBox('passport');
$passport->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$p_issuedate = new Zend_Dojo_Form_Element_DateTextBox('pissue_date');
$p_issuedate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$p_issuedate->setValue(date("Y-m-d"));
$p_expireddate = new Zend_Dojo_Form_Element_DateTextBox('pexpired_date');
$p_expireddate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$p_expireddate->setValue(date("Y-m-d"));
$card_code = new Zend_Dojo_Form_Element_TextBox('card_code');
$card_code->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$c_issuedate = new Zend_Dojo_Form_Element_DateTextBox('cissue_date');
$c_issuedate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$c_issuedate->setValue(date("Y-m-d"));
$c_expireddate = new Zend_Dojo_Form_Element_DateTextBox('cexpired_date');
$c_expireddate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$c_expireddate->setValue(date("Y-m-d"));
$ftb = new Zend_Dojo_Form_Element_TextBox('ftb');
$ftb->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$f_issuedate = new Zend_Dojo_Form_Element_DateTextBox('fissue_date');
$f_issuedate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$f_issuedate->setValue(date("Y-m-d"));
$f_expireddate = new Zend_Dojo_Form_Element_DateTextBox('fexpired_date');
$f_expireddate->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside'));
$f_expireddate->setValue(date("Y-m-d"));
$address1 = new Zend_Dojo_Form_Element_TextBox('address1');
$address1->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
//.........这里部分代码省略.........
示例5: FrmAddClient
//.........这里部分代码省略.........
$_branch_id = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$_branch_id->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'Onchange'=>'getFunction();'
));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options=array(''=>"---Select Branch Name---");
if(!empty($rows))foreach($rows AS $row) $options[$row['br_id']]=$row['displayby']==1?$row['branch_namekh']:$row['branch_nameen'];
$_branch_id->setMultiOptions($options);
$_member = new Zend_Dojo_Form_Element_FilteringSelect('group_id');
$_member->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
'onchange'=>'getGroupCode();'
));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getClientByType(1);
$options=array(''=>"---Select Group Name---");
if(!empty($rows))foreach($rows AS $row) $options[$row['client_id']]=$row['name_en'];
$_member->setMultiOptions($options);
$_namekh = new Zend_Dojo_Form_Element_TextBox('name_kh');
$_namekh->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside',
'required' =>'true'
));
$id_client = $db->getNewClientId();
$_clientno = new Zend_Dojo_Form_Element_TextBox('client_no');
$_clientno->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
'readonly'=>'readonly',
'style'=>'color:red;'
));
$_clientno->setValue($id_client);
$_nameen = new Zend_Dojo_Form_Element_ValidationTextBox('name_en');
$_nameen->setAttribs(array(
'dojoType'=>'dijit.form.ValidationTextBox',
'class'=>'fullside',
'required' =>'true'
));
$_join_with = new Zend_Dojo_Form_Element_TextBox('join_with');
$_join_with->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$_join_nation_id = new Zend_Dojo_Form_Element_TextBox('join_nation_id');
$_join_nation_id->setAttribs(array(
'dojoType'=>'dijit.form.TextBox',
'class'=>'fullside',
));
$_sex = new Zend_Dojo_Form_Element_FilteringSelect('sex');
$_sex->setAttribs(array(
'dojoType'=>'dijit.form.FilteringSelect',
'class'=>'fullside',
示例6: FrmCustomer
public function FrmCustomer($data = null)
{
$_dob = new Zend_Form_Element_Text('dob_client');
$_dob->setValue(date("d-m-Y"));
$_dob->setAttribs(array('class' => 'fullside', "style" => "width:100%"));
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
$_namekh = new Zend_Form_Element_Text('name_kh');
$_namekh->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_clientno = new Zend_Form_Element_Text('client_no');
$_clientno->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$id_client = $db->getNewClientId();
$_clientno->setValue($id_client);
$_nameen = new Zend_Form_Element_Text('name_en');
$_nameen->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_sex = new Zend_Form_Element_Select('sex');
$_sex->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$opt_status = $db->getVewOptoinTypeByType(1, 1);
unset($opt_status[-1]);
unset($opt_status['']);
$_sex->setMultiOptions($opt_status);
$_situ_status = new Zend_Form_Element_Select('status');
$_situ_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$home = new Zend_Form_Element_Text('home');
$home->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$group_num = new Zend_Form_Element_Text('group_num');
$group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$i_group_num = new Zend_Form_Element_Text('igroup_num');
$i_group_num->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$country = new Zend_Form_Element_Select('country');
$country->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$row = $db->getAllCountry();
$opt_country = array();
if (!empty($row)) {
foreach ($row as $rs) {
$opt_country[$rs['id']] = $rs['country_name'];
}
}
$country->setMultiOptions($opt_country);
$state = new Zend_Form_Element_Text('state');
$state->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$commune = new Zend_Form_Element_Text('commune');
$commune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$district = new Zend_Form_Element_Text('district');
$district->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$icommune = new Zend_Form_Element_Text('zip');
$icommune->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$city = new Zend_Form_Element_Text('city');
$city->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$province = new Zend_Form_Element_Select('province');
$province->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$opt = $db->getAllProvince(1);
$province->setMultiOptions($opt);
$_street = new Zend_Form_Element_Text('street');
$_street->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$address1 = new Zend_Form_Element_Text('address1');
$address1->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_id_type = new Zend_Form_Element_Select('id_type');
$_id_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$address = new Zend_Form_Element_Text('address');
$address->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_phone = new Zend_Form_Element_Text('phone');
$_phone->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$photo = new Zend_Form_Element_File('photo');
$photo->setAttribs(array());
$job = new Zend_Form_Element_Text('job');
$job->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$national_id = new Zend_Form_Element_Text('national_id');
$national_id->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$email = new Zend_Form_Element_Text('email');
$email->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$iemail = new Zend_Form_Element_Text('iemail');
$iemail->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$fax = new Zend_Form_Element_Text('fax');
$fax->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$balance = new Zend_Form_Element_Text('balance');
$balance->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_id = new Zend_Form_Element_Hidden("id");
$_desc = new Zend_Form_Element_Text('desc');
$_desc->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_status = new Zend_Form_Element_Select('status');
$_status->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_status_opt = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
$_status->setMultiOptions($_status_opt);
$_title = new Zend_Form_Element_Select('title');
$_title->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$_status_opt = array(1 => $this->tr->translate("Mr."), 2 => $this->tr->translate("Ms"), 3 => $this->tr->translate("Miss"));
$_title->setMultiOptions($_status_opt);
$customer_type = new Zend_Form_Element_Select('customer_type');
$customer_type->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;'));
$_status_opt = array(1 => $this->tr->translate("Self"), 2 => $this->tr->translate("Agency"));
$customer_type->setMultiOptions($_status_opt);
$nationality = new Zend_Form_Element_Text('nationality');
$nationality->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$company_name = new Zend_Form_Element_Text('company_name');
$company_name->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$passport = new Zend_Form_Element_Text('passport');
$passport->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
$p_issuedate = new Zend_Form_Element_Text('pissue_date');
$p_issuedate->setAttribs(array('style' => 'width: 100% !important;padding:1px !important;', 'class' => 'control_style'));
//.........这里部分代码省略.........