本文整理汇总了PHP中Application_Model_DbTable_DbGlobal类的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal类的具体用法?PHP Application_Model_DbTable_DbGlobal怎么用?PHP Application_Model_DbTable_DbGlobal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Application_Model_DbTable_DbGlobal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:33,代码来源:FrmPopupGlobal.php
示例2: editAction
public function editAction()
{
$db = new agreement_Model_DbTable_DbAgreement();
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
try {
$db->addAgreement($data);
Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", "/agreement/imdex/add");
} catch (Exception $e) {
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$id = $this->getRequest()->getParam('id');
if (empty($id)) {
$this->_redirect("/agreement");
}
$this->view->row_agreement = $db->getAgreementById($id);
print_r($db->getAgreementById($id));
$db = new Application_Model_DbTable_DbGlobal();
$this->view->rs_tax = $db->getAllTax();
$owner = $db->getAllNameOwner();
$this->view->country = $db->getAllCountry();
$this->view->rows_owner = $owner;
$cus = new Booking_Model_DbTable_DbBooking();
$rows_cus = $cus->getIdNamecustomer();
$this->view->rows_cus = $rows_cus;
$row_vehicle = $cus->getVehiclerefNo();
$this->view->row_vehicle = $row_vehicle;
$db = new agreement_Model_DbTable_DbAgreement();
$this->view->rsbooking = $db->getAllBookingNumber();
}
开发者ID:samlanh,项目名称:lynacr,代码行数:32,代码来源:IndexController.php
示例3: 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
示例4: FrmAddSchool
public function FrmAddSchool($data = null)
{
$_classname = new Zend_Dojo_Form_Element_TextBox('schoolname');
$_classname->setAttribs(array('dojoType' => $this->tvalidate, 'required' => 'true', 'class' => 'fullside'));
$_province = new Zend_Dojo_Form_Element_FilteringSelect('province');
$_province->setAttribs(array('dojoType' => $this->filter, 'class' => 'fullside'));
$_db = new Application_Model_DbTable_DbGlobal();
$rows_school = $_db->getGlobalDb("SELECT province_id,province_en_name FROM rms_province ");
$opt_school = "";
if (!empty($rows_school)) {
foreach ($rows_school as $row) {
$opt_school[$row['province_id']] = $row['province_en_name'];
}
}
$_province->setMultiOptions($opt_school);
$_status = new Zend_Dojo_Form_Element_FilteringSelect('status');
$_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);
$_submit = new Zend_Dojo_Form_Element_SubmitButton('submit');
$_submit->setLabel("save");
$id = new Zend_Form_Element_Hidden('id');
if (!empty($data)) {
$_classname->setValue($data['school_name']);
$_status->setValue($data['status']);
$_province->setValue($data['province_id']);
$id->setValue($data['id']);
}
$this->addElements(array($_classname, $_status, $_submit, $_province, $id));
return $this;
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:31,代码来源:FrmAddSchool.php
示例5: addMeasure
public function addMeasure($data)
{
$db = new Application_Model_DbTable_DbGlobal();
$_arr = array("measure_name" => $data["measure_name"]);
$result = $db->addRecord($_arr, "tb_measure");
return $result;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:7,代码来源:DbAddLocation.php
示例6: FrmGeneraljurnal
public function FrmGeneraljurnal($data = null)
{
$Brance = new Zend_Dojo_Form_Element_FilteringSelect('branch_id');
$Brance->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getJurnalcode();'));
$db = new Application_Model_DbTable_DbGlobal();
$rows = $db->getAllBranchName();
$options = '';
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['branch_namekh'];
}
}
$rows = $db->getAllBranchName();
$options = array('' => '---Select Branch---');
if (!empty($rows)) {
foreach ($rows as $row) {
$options[$row['br_id']] = $row['branch_namekh'];
}
}
$Brance->setMultiOptions($options);
$_currency_type = new Zend_Dojo_Form_Element_FilteringSelect('currency_type');
$_currency_type->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside'));
$opt = $db->getVewOptoinTypeByType(15, 1, 3, 1);
$_currency_type->setMultiOptions($opt);
$_currency_type->setValue(2);
$parent = new Zend_Dojo_Form_Element_FilteringSelect('parent');
$parent->setAttribs(array('dojoType' => 'dijit.form.FilteringSelect', 'class' => 'fullside', 'required' => true, 'onchange' => 'getAllAccountNameByParents();'));
$db = new Accounting_Model_DbTable_DbChartaccount();
$option = $db->getAllchartaccount(3, 1);
$parent->setMultiOptions($option);
$Add_Date = new Zend_Dojo_Form_Element_DateTextBox('add_date');
$Add_Date->setAttribs(array('dojoType' => 'dijit.form.DateTextBox', 'class' => 'fullside', 'required' => true));
$Add_Date->setValue(date('Y-m-d'));
$Account_Number = new Zend_Dojo_Form_Element_TextBox('journal_code');
$Account_Number->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside', 'readOnly' => 'readOnly', 'required' => 'true'));
$invoice = new Zend_Dojo_Form_Element_TextBox('invoice');
$invoice->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Note = new Zend_Dojo_Form_Element_TextBox('note');
$Note->setAttribs(array('dojoType' => 'dijit.form.TextBox', 'class' => 'fullside'));
$Debit = new Zend_Dojo_Form_Element_NumberTextBox('debit');
$Debit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
// $Debit->setValue(0);
$Credit = new Zend_Dojo_Form_Element_NumberTextBox('credit');
$Credit->setAttribs(array('dojoType' => 'dijit.form.NumberTextBox', 'class' => 'fullside', 'required' => 1, 'readonly' => 'readonly'));
$id = new Zend_Form_Element_Hidden('id');
if ($data != null) {
$id->setValue($data['id']);
$Brance->setValue($data['branch_id']);
$Account_Number->setValue($data['journal_code']);
$invoice->setValue($data['receipt_number']);
$_currency_type->setValue($data['currency_id']);
$Note->setValue($data['note']);
$Add_Date->setValue($data['date']);
$Debit->setValue($data['debit']);
$Credit->setValue($data['credit']);
}
// $Credit->setValue(0);
$this->addElements(array($id, $invoice, $_currency_type, $parent, $Add_Date, $Account_Number, $Note, $Debit, $Credit, $Brance));
return $this;
}
开发者ID:samlanh,项目名称:lnms,代码行数:60,代码来源:FrmGeneraljurnal.php
示例7: editAction
public function editAction()
{
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
//print_r($data);exit();
try {
$db_make = new Vehicle_Model_DbTable_DbMake();
if (!empty($data['save_close'])) {
$db_make->updateMake($data);
Application_Form_FrmMessage::Sucessfull($this->tr->translate("INSERT_SUCCESS"), self::REDIRECT_URL_ADD_CLOSE);
}
} catch (Exception $e) {
Application_Form_FrmMessage::message($this->tr->translate("INSERT_FAIL"));
$err = $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($err);
}
}
$id = $this->getRequest()->getParam('id');
$db_make = new Vehicle_Model_DbTable_DbMake();
$rows = $db_make->getMakeById($id);
$this->view->row = $rows;
$db = new Application_Model_DbTable_DbGlobal();
$status = $db->getViews(2);
$this->view->status_view = $status;
}
开发者ID:samlanh,项目名称:lynacr,代码行数:25,代码来源:MakeController.php
示例8: SelectItem
public function SelectItem()
{
$db = $this->getAdapter();
$user_info = new Application_Model_DbTable_DbGetUserInfo();
$result = $user_info->getUserInfo();
$db = new Application_Model_DbTable_DbGlobal();
$productSql = "SELECT\n\t\t\t\tp.pro_id\n\t\t\t\t,p.item_name\n\t\t\t\t,p.item_code\n\t\t\t\t,(SELECT g.Name FROM tb_category AS g WHERE g.CategoryId = (SELECT cate_id FROM tb_product WHERE pro_id = pl.`pro_id` LIMIT 1)) AS Cate_name\n\t\t\t\t,(SELECT b.Name FROM tb_branch AS b WHERE b.branch_id = (SELECT brand_id FROM tb_product WHERE pro_id = pl.`pro_id` LIMIT 1 )) AS Branch\n\t\t\t\t,(SELECT lo.Name FROM tb_sublocation AS lo WHERE lo.LocationId = pl.LocationId LIMIT 1) AS LocationName\n\t\t\t\t,pl.qty\n\t\t\tFROM tb_prolocation AS pl,tb_product AS p WHERE pl.`pro_id`=p.pro_id ";
$str_condition = " AND pl.LocationId";
$productSql .= $db->getAccessPermission($result["level"], $str_condition, $result["location_id"]);
if ($this->getRequest()->isPost()) {
$post = $this->getRequest()->getPost();
$productName = $this->getRequest()->getParam('s_name');
if ($post['LocationId'] !== '' and $post['LocationId'] != 0) {
$productSql .= " AND pl.LocationId = " . trim($post['LocationId']);
}
if ($post['p_name'] != '') {
$productSql .= " AND p.item_name LIKE '%" . trim($post['p_name']) . "%'";
$productSql .= " OR p.item_code LIKE '%" . trim($post['p_name']) . "%'";
}
if ($post['category_id'] !== '' and $post['category_id'] != 0) {
//echo $post['category_id']; exit();
$productSql .= " AND p.cate_id =" . trim($post['category_id']);
}
if ($post['branch_id'] !== '' and $post['branch_id'] != 0) {
$productSql .= " AND p.brand_id =" . trim($post['branch_id']);
}
}
//echo $productSql;exit();
$productSql .= " ORDER BY p.item_name,p.cate_id DESC";
return $rows = $db_rs->fetchAll($productSql);
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:31,代码来源:DbAddStock.php
示例9: 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;
}
开发者ID:samlanh,项目名称:lynacr,代码行数:27,代码来源:IndexController.php
示例10: init
public function init()
{
$request = Zend_Controller_Front::getInstance()->getRequest();
$db = new Application_Model_DbTable_DbGlobal();
/////////////Filter stock/////////////////
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$nameElement = new Zend_Form_Element_Text('s_name');
$nameValue = $request->getParam('s_name');
$nameElement->setValue($nameValue);
$this->addElement($nameElement);
$phonevalue = $request->getParam('phone');
$phoneElement = new Zend_Form_Element_Text('phone');
$phoneElement->setValue($phonevalue);
$this->addElement($phoneElement);
$rs = $db->getGlobalDb('SELECT LocationId,Name FROM tb_sublocation ORDER BY LocationId DESC ');
$options = array('' => $tr->translate('Please_Select'));
$agentValue = $request->getParam('stock_location');
foreach ($rs as $read) {
$options[$read['LocationId']] = $read['Name'];
}
$sale_agent = new Zend_Form_Element_Select('stock_location');
$sale_agent->setMultiOptions($options);
$sale_agent->setAttribs(array('id' => 'LocationId', 'class' => 'demo-code-language'));
$sale_agent->setValue($agentValue);
$this->addElement($sale_agent);
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:27,代码来源:FrmStockFilter.php
示例11: editAction
public function editAction()
{
if ($this->getRequest()->isPost()) {
try {
$_data = $this->getRequest()->getPost();
$_dbmodel = new Application_Model_DbTable_DbDept();
$_dbmodel->UpdateDepartment($_data);
Application_Form_FrmMessage::Sucessfull("ការកៃប្រែដោយជោគជ័យ !", "/global/faculty/index");
//$this->_redirect("");
} catch (Exception $e) {
$err = $e->getMessage();
Application_Form_FrmMessage::message("Application Error!");
Application_Model_DbTable_DbUserLog::writeMessageError($err);
echo $e->getMessage();
exit;
}
}
$id = $this->getRequest()->getParam("id");
$_db = new Application_Model_DbTable_DbGlobal();
$_row = $_db->getDeptById($id);
$frm = new Application_Form_FrmOther();
$frm->FrmAddDept($_row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_dept = $frm;
}
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:25,代码来源:FacultyController.php
示例12: indexAction
public function indexAction()
{
try {
$db = new Other_Model_DbTable_DbZone();
if ($this->getRequest()->isPost()) {
$search = $this->getRequest()->getPost();
} else {
$search = array('adv_search' => '', 'search_status' => -1);
}
$rs_rows = $db->getAllZoneArea($search);
$glClass = new Application_Model_GlobalClass();
$rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
$list = new Application_Form_Frmtable();
$collumns = array("ZONE_NAME", "ZONE_NUMBER", "DATE", "STATUS", "BY");
$link = array('module' => 'other', 'controller' => 'zone', 'action' => 'edit');
$this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('zone_name' => $link, 'zone_num' => $link));
} catch (Exception $e) {
Application_Form_FrmMessage::message("Application Error");
echo $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
$frm = new Other_Form_FrmZone();
$frm_co = $frm->FrmAddZone();
Application_Model_Decorator::removeAllDecorator($frm_co);
$this->view->frm_zone = $frm_co;
$db = new Application_Model_DbTable_DbGlobal();
$this->view->district = $db->getAllDistricts();
$this->view->commune_name = $db->getCommune();
$this->view->result = $search;
}
开发者ID:samlanh,项目名称:lynacr,代码行数:30,代码来源:ZoneController.php
示例13: indexAction
function indexAction()
{
$dbbooking = new Application_Model_DbTable_Dbstuffrental();
$db_globle = new Application_Model_DbTable_DbGlobal();
if ($this->getRequest()->isPost()) {
$post = $this->getRequest()->getPost();
if (isset($post["term_condiction"])) {
$dbbooking->createSessionStuffBooking($post, 3);
//print_r("test");exit();
$this->_redirect("stuffbooking/index");
} elseif (isset($post["confirm_book"])) {
$dbbooking->createSessionStuffBooking($post, 4);
$this->_redirect("stuffbooking/index");
}
}
$customer_session = new Zend_Session_Namespace('customer');
$user_session = $customer_session->customer_session;
if (!empty($user_session)) {
$customer_user_session = $user_session;
$customer_user = $customer_session->customer_id;
$this->view->user_name = $customer_session->customer_name;
$this->view->user_info = $customer_session->user_info;
} else {
$customer_user_session = 0;
}
$db = new Application_Model_DbTable_Dbbookingtaxi();
$session = new Zend_Session_Namespace('stuffbooking');
$this->view->bookinginfo = $session;
$this->view->producttermcomdiction = $db_globle->getAllParameter('producttermcomdiction');
$frmbooks = new Application_Form_FrmBooking();
$frmbooking = $frmbooks->FromBooking();
Application_Model_Decorator::removeAllDecorator($frmbooking);
$this->view->frmbooking = $frmbooking;
$this->view->user_session = $customer_user_session;
}
开发者ID:samlanh,项目名称:lynacr,代码行数:35,代码来源:StuffbookingController.php
示例14: rptVillageAction
function rptVillageAction(){
$db = new Report_Model_DbTable_DbParamater();
$this->view->village_list = $db->getAllVillage();
//print_r($db->getAllstaff());
$key = new Application_Model_DbTable_DbKeycode();
$this->view->data=$key->getKeyCodeMiniInv(TRUE);
if($this->getRequest()->isPost()){
$search = $this->getRequest()->getPost();
//
if(isset($search['btn_search'])){
//print_r($search);exit();
$this->view->village_list = $db->getAllVillage($search);
}else{
$collumn = array("vill_id","village_namekh","village_name","displayby","commune_name","district_name","province_en_name","modify_date","status","user_name");
$this->exportFileToExcel('ln_village',$db->getAllVillage(),$collumn);
}
}else {
$search = array('adv_search' => '',
'search_status' => -1,
'province_name'=>0,
'district_name'=>'',
'commune_name'=>'');
}
$frm = new Other_Form_FrmVillage();
$frms = $frm->FrmAddVillage();
Application_Model_Decorator::removeAllDecorator($frms);
$this->view->frm_village= $frms;
$db= new Application_Model_DbTable_DbGlobal();
$this->view->district = $db->getAllDistricts();
$this->view->commune_name = $db->getCommune();
$this->view->result = $search;
}
开发者ID:sarankh80,项目名称:lnms,代码行数:33,代码来源:ParamaterController.php
示例15: editAction
public function editAction()
{
$db = new Other_Model_DbTable_DbVillage();
if ($this->getRequest()->isPost()) {
$_data = $this->getRequest()->getPost();
try {
$db->addVillage($_data);
Application_Form_FrmMessage::Sucessfull("ការបញ្ចូលជោគជ័យ !", '/other/Village');
} catch (Exception $e) {
Application_Form_FrmMessage::message("ការបញ្ចូលមិនជោគជ័យ");
$err = $e->getMessage();
Application_Model_DbTable_DbUserLog::writeMessageError($err);
}
}
$id = $this->getRequest()->getParam("id");
$row = $db->getVillageById($id);
$this->view->row = $row;
if (empty($row)) {
$this->_redirect('other/Village');
}
$fm = new Other_Form_FrmVillage();
$frm = $fm->FrmAddVillage($row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_village = $frm;
$db = new Application_Model_DbTable_DbGlobal();
$this->view->district = $db->getAllDistricts();
$this->view->commune_name = $db->getCommune();
}
开发者ID:samlanh,项目名称:currencyms,代码行数:28,代码来源:VillageController.php
示例16: addNewAgent
public function addNewAgent($data)
{
$db = new Application_Model_DbTable_DbGlobal();
$datainfo = array("name" => $data['agent_name'], "phone" => $data['phone'], "job_title" => $data['position'], "stock_id" => $data['location'], "description" => $data['desc']);
$agent_id = $db->addRecord($datainfo, "tb_sale_agent");
return $agent_id;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:7,代码来源:DbSalesAgent.php
示例17: editAction
public function editAction()
{
$db_model = new Driverguide_Model_DbTable_Dbvehicleprice();
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost();
try {
$id = $db_model->updateVehicleRental($data);
Application_Form_FrmMessage::Sucessfull("Edit Success", "/driverguide/vehicleprice");
} catch (Exception $e) {
Application_Form_FrmMessage::message("Application Error");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
}
$db = new Application_Model_GlobalClass();
$this->view->package_option = $db->getAllPackageDayOption();
$db = new Application_Model_DbTable_DbGlobal();
$this->view->rs_tax = $db->getAllTax();
$this->view->vehicle = $db_model->getVehecleName();
$id = $this->getRequest()->getParam("id");
$this->view->rows = $db_model->getVehiclePriceById($id);
// print_r($db_model->getVehiclePriceById($id));
$this->view->vehicle_id = $id;
// $db=new Vehicle_Model_DbTable_DbVehicle();
// $this->view->vehicle=$db->getVehicleById($id);
}
开发者ID:samlanh,项目名称:lynacr,代码行数:25,代码来源:VehiclepriceController.php
示例18: addTransactionJournal
function addTransactionJournal($data)
{
$arr = array('branch_id' => $data['branch_id'], 'client_id' => $data['client_id'], 'receipt_number' => $data['receipt_number'], 'date' => $data['date'], 'create_date' => date('Y-m-d'), 'note' => $data['note'], 'user_id' => $this->getUserId(), 'from_location' => $data['from_location'], 'receipt_number' => $data['receipt_number']);
$id = $this->insert($arr);
unset($arr);
$this->_name = 'ln_journal_detail';
$acc_id = 1;
$db_g = new Application_Model_DbTable_DbGlobal();
$db_g->getAccountBranchByOther($acc_id, $data['branch_id'], $data['currency_type'], $data['balance'], 1);
//update data to server
$arr = array('jur_id' => $id, 'branch_id' => $data['branch_id'], 'account_type' => 1, 'balance' => $data['balance'], 'account_id' => $acc_id, 'is_increase' => 1, 'currency_type' => $data['currency_type']);
$this->insert($arr);
$arr['is_increase'] = 0;
$acc_id = 2;
$arr['account_id'] = $acc_id;
$arr['account_type'] = 2;
$accs = $db_g->getAccountBranchByOther($arr['account_id'], $data['branch_id'], $data['currency_type'], $data['balance'], $arr['is_increase']);
$this->insert($arr);
if (!empty($data['loan_fee'])) {
$arr['is_increase'] = 1;
$arr['account_id'] = 2;
$arr['note'] = 'Admin fee from disburse loan ';
$this->insert($arr);
$db_g->getAccountBranchByOther($arr['account_id'], $data['branch_id'], $data['currency_type'], $data['loan_fee'], $arr['is_increase']);
$arr['is_increase'] = 1;
$arr['account_id'] = 3;
$this->insert($arr);
$db_g->getAccountBranchByOther($arr['account_id'], $data['branch_id'], $data['currency_type'], $data['loan_fee'], $arr['is_increase']);
}
}
开发者ID:sarankh80,项目名称:lnms,代码行数:30,代码来源:DbJournal.php
示例19: addBrand
public function addBrand($data = null)
{
$tr = Application_Form_FrmLanguages::getCurrentlanguage();
$db = new Application_Model_DbTable_DbGlobal();
$rowsbrand = $db->getGlobalDb('SELECT branch_id, Name
FROM tb_branch WHERE Name!="" ');
$options = array('' => $tr->translate('Please_Select'));
if ($rowsbrand) {
foreach ($rowsbrand as $readBrand) {
$options[$readBrand['branch_id']] = $readBrand['Name'];
}
}
$brandElement = new Zend_Form_Element_Select('Parent brand');
$brandElement->setAttribs(array('class' => 'demo-code-language'));
$brandElement->setMultiOptions($options);
$this->addElement($brandElement);
$b_nameElement = new Zend_Form_Element_Text('brand Name');
$b_nameElement->setAttribs(array('class' => 'validate[required]'));
$this->addElement($b_nameElement);
$optionsStatus = array(1 => $tr->translate("ACTIVE"), 2 => $tr->translate('DEACTIVE'));
$statusElement = new Zend_Form_Element_Select('status');
$statusElement->setAttribs(array('class' => 'demo-code-language'));
$statusElement->setMultiOptions($optionsStatus);
$this->addElement($statusElement);
if ($data != null) {
$idElement = new Zend_Form_Element_Hidden('id');
$this->addElement($idElement);
$statusElement->setValue($data["IsActive"]);
$idElement->setValue($data['branch_id']);
$b_nameElement->setValue($data['Name']);
$brandElement->setValue($data['parent_id']);
}
return $this;
}
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:34,代码来源:FrmInclude.php
示例20: 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());
}
}
开发者ID:samlanh,项目名称:lynacr,代码行数:26,代码来源:DbClient.php
注:本文中的Application_Model_DbTable_DbGlobal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论