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


PHP MY_Model::returnData方法代码示例

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


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

示例1: getDriverDetailFromUserID

 public function getDriverDetailFromUserID($userID)
 {
     $this->db->select("*");
     $this->db->where("user_id", $userID);
     $this->db->from("wp_drivers");
     $query = $this->db->get();
     if ($query->num_rows()) {
         return parent::returnData($query->row());
     }
     return parent::returnData(false, ConstExceptionCode::DATA_NOT_FOUND);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:11,代码来源:driver_model.php

示例2: getDashboardDetail


//.........这里部分代码省略.........
             $feb_info->gst += $feb_info->grossIncome / 10;
             $march_info->gst += $march_info->grossIncome / 10;
             $april_info->gst += $april_info->grossIncome / 10;
             $may_info->gst += $may_info->grossIncome / 10;
             $jun_info->gst += $jun_info->grossIncome / 10;
             $july_info->gst += $july_info->grossIncome / 10;
             $august_info->gst += $august_info->grossIncome / 10;
             $sep_info->gst += $sep_info->grossIncome / 10;
             $oct_info->gst += $oct_info->grossIncome / 10;
             $nov_info->gst += $nov_info->grossIncome / 10;
             $dec_info->gst += $dec_info->grossIncome / 10;
             $jan_info->netIncome += $jan_info->grossIncome - $jan_info->totalExpense - $jan_info->gst;
             $feb_info->netIncome += $feb_info->grossIncome - $feb_info->totalExpense - $feb_info->gst;
             $march_info->netIncome += $march_info->grossIncome - $march_info->totalExpense - $march_info->gst;
             $april_info->netIncome += $april_info->grossIncome - $april_info->totalExpense - $april_info->gst;
             $may_info->netIncome += $may_info->grossIncome - $may_info->totalExpense - $may_info->gst;
             $jun_info->netIncome += $jun_info->grossIncome - $jun_info->totalExpense - $jun_info->gst;
             $july_info->netIncome += $july_info->grossIncome - $july_info->totalExpense - $july_info->gst;
             $august_info->netIncome += $august_info->grossIncome - $august_info->totalExpense - $august_info->gst;
             $sep_info->netIncome += $sep_info->grossIncome - $sep_info->totalExpense - $sep_info->gst;
             $oct_info->netIncome += $oct_info->grossIncome - $oct_info->totalExpense - $oct_info->gst;
             $nov_info->netIncome += $nov_info->grossIncome - $nov_info->totalExpense - $nov_info->gst;
             $dec_info->netIncome += $dec_info->grossIncome - $dec_info->totalExpense - $dec_info->gst;
             $q1_info->shiftPay = $jan_info->shiftPay + $feb_info->shiftPay + $march_info->shiftPay;
             $q1_info->fuelCost = $jan_info->fuelCost + $feb_info->fuelCost + $march_info->fuelCost;
             $q1_info->otherCost = $jan_info->otherCost + $feb_info->otherCost + $march_info->otherCost;
             $q1_info->cash = $jan_info->cash + $feb_info->cash + $march_info->cash;
             $q1_info->eftposShiftTotal = $jan_info->eftposShiftTotal + $feb_info->eftposShiftTotal + $march_info->eftposShiftTotal;
             $q1_info->docket = $jan_info->docket + $feb_info->docket + $march_info->docket;
             $q1_info->kilometer = $jan_info->kilometer + $feb_info->kilometer + $march_info->kilometer;
             $q1_info->totalExpense = $jan_info->totalExpense + $feb_info->totalExpense + $march_info->totalExpense;
             $q1_info->grossIncome = $jan_info->grossIncome + $feb_info->grossIncome + $march_info->grossIncome;
             $q1_info->gst = $jan_info->gst + $feb_info->gst + $march_info->gst;
             $q1_info->netIncome = $jan_info->netIncome + $feb_info->netIncome + $march_info->netIncome;
             $q2_info->shiftPay = $april_info->shiftPay + $may_info->shiftPay + $jun_info->shiftPay;
             $q2_info->fuelCost = $april_info->fuelCost + $may_info->fuelCost + $jun_info->fuelCost;
             $q2_info->otherCost = $april_info->otherCost + $may_info->otherCost + $jun_info->otherCost;
             $q2_info->cash = $april_info->cash + $may_info->cash + $jun_info->cash;
             $q2_info->eftposShiftTotal = $april_info->eftposShiftTotal + $may_info->eftposShiftTotal + $jun_info->eftposShiftTotal;
             $q2_info->docket = $april_info->docket + $may_info->docket + $jun_info->docket;
             $q2_info->kilometer = $april_info->kilometer + $may_info->kilometer + $jun_info->kilometer;
             $q2_info->totalExpense = $april_info->totalExpense + $may_info->totalExpense + $jun_info->totalExpense;
             $q2_info->grossIncome = $april_info->grossIncome + $may_info->grossIncome + $jun_info->grossIncome;
             $q2_info->gst = $april_info->gst + $may_info->gst + $jun_info->gst;
             $q2_info->netIncome = $april_info->netIncome + $may_info->netIncome + $jun_info->netIncome;
             $q3_info->shiftPay = $july_info->shiftPay + $august_info->shiftPay + $sep_info->shiftPay;
             $q3_info->fuelCost = $july_info->fuelCost + $august_info->fuelCost + $sep_info->fuelCost;
             $q3_info->otherCost = $july_info->otherCost + $august_info->otherCost + $sep_info->otherCost;
             $q3_info->cash = $july_info->cash + $august_info->cash + $sep_info->cash;
             $q3_info->eftposShiftTotal = $july_info->eftposShiftTotal + $august_info->eftposShiftTotal + $sep_info->eftposShiftTotal;
             $q3_info->docket = $july_info->docket + $august_info->docket + $sep_info->docket;
             $q3_info->kilometer = $july_info->kilometer + $august_info->kilometer + $sep_info->kilometer;
             $q3_info->totalExpense = $july_info->totalExpense + $august_info->totalExpense + $sep_info->totalExpense;
             $q3_info->grossIncome = $july_info->grossIncome + $august_info->grossIncome + $sep_info->grossIncome;
             $q3_info->gst = $july_info->gst + $august_info->gst + $sep_info->gst;
             $q3_info->netIncome = $july_info->netIncome + $august_info->netIncome + $sep_info->netIncome;
             $q4_info->shiftPay = $oct_info->shiftPay + $nov_info->shiftPay + $dec_info->shiftPay;
             $q4_info->fuelCost = $oct_info->fuelCost + $nov_info->fuelCost + $dec_info->fuelCost;
             $q4_info->otherCost = $oct_info->otherCost + $nov_info->otherCost + $dec_info->otherCost;
             $q4_info->cash = $oct_info->cash + $nov_info->cash + $dec_info->cash;
             $q4_info->eftposShiftTotal = $oct_info->eftposShiftTotal + $nov_info->eftposShiftTotal + $dec_info->eftposShiftTotal;
             $q4_info->docket = $oct_info->docket + $nov_info->docket + $dec_info->docket;
             $q4_info->kilometer = $oct_info->kilometer + $nov_info->kilometer + $dec_info->kilometer;
             $q4_info->totalExpense = $oct_info->totalExpense + $nov_info->totalExpense + $dec_info->totalExpense;
             $q4_info->grossIncome = $oct_info->grossIncome + $nov_info->grossIncome + $dec_info->grossIncome;
             $q4_info->gst = $oct_info->gst + $nov_info->gst + $dec_info->gst;
             $q4_info->netIncome = $oct_info->netIncome + $nov_info->netIncome + $dec_info->netIncome;
             $fin_info->shiftPay = $q1_info->shiftPay + $q2_info->shiftPay + $q3_info->shiftPay + $q4_info->shiftPay;
             $fin_info->fuelCost = $q1_info->fuelCost + $q2_info->fuelCost + $q3_info->fuelCost + $q4_info->fuelCost;
             $fin_info->otherCost = $q1_info->otherCost + $q2_info->otherCost + $q3_info->otherCost + $q4_info->otherCost;
             $fin_info->cash = $q1_info->cash + $q2_info->cash + $q3_info->cash + $q4_info->cash;
             $fin_info->eftposShiftTotal = $q1_info->eftposShiftTotal + $q2_info->eftposShiftTotal + $q3_info->eftposShiftTotal + $q4_info->eftposShiftTotal;
             $fin_info->docket = $q1_info->docket + $q2_info->docket + $q3_info->docket + $q4_info->docket;
             $fin_info->kilometer = $q1_info->kilometer + $q2_info->kilometer + $q3_info->kilometer + $q4_info->kilometer;
             $fin_info->totalExpense = $q1_info->totalExpense + $q2_info->totalExpense + $q3_info->totalExpense + $q4_info->totalExpense;
             $fin_info->grossIncome = $q1_info->grossIncome + $q2_info->grossIncome + $q3_info->grossIncome + $q4_info->grossIncome;
             $fin_info->gst = $q1_info->gst + $q2_info->gst + $q3_info->gst + $q4_info->gst;
             $fin_info->netIncome = $q1_info->netIncome + $q2_info->netIncome + $q3_info->netIncome + $q4_info->netIncome;
             $dashboardProfitData[0] = $jan_info;
             $dashboardProfitData[1] = $feb_info;
             $dashboardProfitData[2] = $march_info;
             $dashboardProfitData[3] = $april_info;
             $dashboardProfitData[4] = $may_info;
             $dashboardProfitData[5] = $jun_info;
             $dashboardProfitData[6] = $july_info;
             $dashboardProfitData[7] = $august_info;
             $dashboardProfitData[8] = $sep_info;
             $dashboardProfitData[9] = $oct_info;
             $dashboardProfitData[10] = $nov_info;
             $dashboardProfitData[11] = $dec_info;
             $dashboardProfitData[12] = $q1_info;
             $dashboardProfitData[13] = $q2_info;
             $dashboardProfitData[14] = $q3_info;
             $dashboardProfitData[15] = $q4_info;
             $dashboardProfitData[16] = $fin_info;
             $data['profitData'] = $dashboardProfitData;
         }
     }
     return parent::returnData($data);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:101,代码来源:dashboard_model.php

示例3: removeTaxi

 public function removeTaxi($userID, $taxiID)
 {
     if ($userID == $this->getUserID($taxiID)) {
         $this->db->where("ID", $taxiID, false);
         if ($this->db->delete('wp_taxi_details')) {
             return parent::returnData(true);
         } else {
             return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
         }
     }
     return parent::returnData(false, ConstExceptionCode::INVALID_ACTION);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:12,代码来源:taxi_model.php

示例4: removeMaintenance

 public function removeMaintenance($userID, $maintenanceID)
 {
     if ($userID == $this->getUserID($maintenanceID)) {
         $this->db->where("ID", $maintenanceID, false);
         if ($this->db->delete('wp_maintenance_history')) {
             return parent::returnData(true);
         } else {
             return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
         }
     }
     return parent::returnData(false, ConstExceptionCode::INVALID_ACTION);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:12,代码来源:maintenance_model.php

示例5: removeAds

 public function removeAds($userID, $adsID)
 {
     if ($userID == $this->getUserID($adsID)) {
         $this->db->where("ID", $adsID, false);
         if ($this->db->delete('wp_general_ads_driver_wanted')) {
             return parent::returnData(true);
         } else {
             return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
         }
     }
     return parent::returnData(false, ConstExceptionCode::INVALID_ACTION);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:12,代码来源:generaladsdriverwanted_model.php

示例6: removeRoster

 public function removeRoster($userID, $rosterID)
 {
     if ($userID == $this->getUserID($rosterID)) {
         $this->db->where("ID", $rosterID, false);
         if ($this->db->delete('wp_roster_paying')) {
             return parent::returnData(true);
         } else {
             return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
         }
     }
     return parent::returnData(false, ConstExceptionCode::INVALID_ACTION);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:12,代码来源:roster_model.php

示例7: removeJournal

 public function removeJournal($userID, $journalID)
 {
     if ($userID == $this->getUserID($journalID)) {
         $this->db->where("ID", $journalID, false);
         if ($this->db->delete('wp_driver_journal')) {
             return parent::returnData(true);
         } else {
             return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
         }
     }
     return parent::returnData(false, ConstExceptionCode::INVALID_ACTION);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:12,代码来源:journal_model.php

示例8: updateProfile

 public function updateProfile($userID)
 {
     $this->db->trans_start();
     $newUserEntity = new stdClass();
     $newUserEntity->email_id = $this->input->post('email_id');
     $newUserEntity->first_name = $this->input->post('first_name');
     $newUserEntity->last_name = $this->input->post('last_name');
     //        $newUserEntity->is_active = $this->input->post('is_active');
     //        $newUserEntity->password = $this->input->post('password');
     //        $newUserEntity->subscription_id = $this->input->post('subscription_id');
     //        $newUserEntity->user_name = $this->input->post('user_name');
     //        $newUserEntity->user_type = $this->input->post('user_type');
     $this->db->where("ID", $userID, false);
     if ($this->db->update("wp_server_users", $newUserEntity)) {
         UserEntity::setUserValues($newUserEntity);
         if ($this->updateUserDetail($userID)) {
             $user_type = $this->getUserType($userID);
             if ($user_type && strcmp($user_type, 'operator') == 0) {
                 $this->load->model("Operator_model");
                 if ($this->Operator_model->addOperator($userID)) {
                     return parent::returnData(true);
                 }
             } else {
                 $this->load->model("Driver_model");
                 if ($this->Driver_model->addDriver($userID)) {
                     return parent::returnData(true);
                 }
             }
         }
     }
     $this->db->trans_complete();
     if ($this->db->trans_status() === FALSE) {
         return parent::returnData(false, ConstExceptionCode::DATA_NOT_SAVED);
     }
     return parent::returnData(false, ConstExceptionCode::UNKNOWN_ERROR_CODE);
 }
开发者ID:nignjatov,项目名称:TaxiDev,代码行数:36,代码来源:user_model.php


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