當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DaoFactory::LicenseMst方法代碼示例

本文整理匯總了PHP中DaoFactory::LicenseMst方法的典型用法代碼示例。如果您正苦於以下問題:PHP DaoFactory::LicenseMst方法的具體用法?PHP DaoFactory::LicenseMst怎麽用?PHP DaoFactory::LicenseMst使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DaoFactory的用法示例。


在下文中一共展示了DaoFactory::LicenseMst方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: perform

 function perform()
 {
     //パラメータ取得
     $order_id = $this->af->get('order_id');
     $service_list = json_decode($this->af->get('service_list'), true);
     $user_id = $this->session->get('user_id');
     $params = array('order_id' => $order_id, 'service_list' => $service_list, 'pgm' => get_class(), 'uid' => $user_id);
     try {
         $dao = DaoFactory::LicenseMst();
         $exist = $dao->Retrieve(' ORDER_ID = ? ', array($order_id));
         if (!empty($exist)) {
             echo 0;
             exit;
         }
         $dao->BeginTransaction();
         $dao->insertNewLicense($params);
         //commit
         $dao->CommitTransaction();
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $dao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     echo 0;
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:27,代碼來源:Entry.php

示例2: check_license_id_exists

 /**
  * リクエストのライセンスがDBに登録されているかチェックする
  * @param string $name フォーム名
  */
 public function check_license_id_exists($name)
 {
     // ライセンスを取得
     $params = array('company_id' => $this->backend->getSession()->get('company_id'), 'license_id' => $this->form_vars['license_id']);
     $license = DaoFactory::LicenseMst()->Retrieve(' company_id = ? AND license_id = ? ', $params);
     // ライセンスが存在しない場合
     if (empty($license)) {
         $this->ae->add($name, "入力された{form}は登録されていません", E_FORM_INVALIDCHAR);
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:14,代碼來源:Search.php

示例3: perform

 /**
  * 
  * @see Ethna_ActionClass::perform()
  */
 function perform()
 {
     $days = $this->config->get('license_warning_days');
     try {
         $licenseDao = DaoFactory::LicenseMst();
         $userDao = DaoFactory::UserMst();
         $companyDao = DaoFactory::CompanyMst();
         sort($days, SORT_NUMERIC);
         $result = array();
         foreach ($days as $day) {
             $params = array('day' => $day);
             $res = $licenseDao->LicenseMST_GetLicenseValidDays($params)->fetchAll(PDO::FETCH_ASSOC);
             $result = array_merge($result, $res);
         }
         foreach ($result as $value) {
             $send_email[$value['COMPANY_ID']][] = array('TERMINAL_ID' => $value['TERMINAL_ID'], 'END_YMD' => $value['END_YMD']);
         }
         //send e-mail
         $headers = "From: {$this->config->get('admin_email_address')}";
         foreach ($send_email as $company => $arr) {
             $invalid_terminal_list = '';
             foreach ($arr as $key => $value) {
                 $invalid_terminal_list .= "\n{$value['TERMINAL_ID']}\t\t\t{$value['END_YMD']}";
             }
             //get admin user's e-mail address and language
             $companyInfo = $companyDao->Retrieve('COMPANY_ID = ?', array($company));
             //$companyInfo['CONTACT']
             $userInfo = $userDao->Retrieve("LOGIN_ID = 'admin' AND COMPANY_ID = ? ", array($company));
             //$userInfo['E_MAIL']
             //$userInfo['DEFAULT_LOCALE']  zh-Hans-CN en_US ja_JP
             if ($userInfo['DEFAULT_LOCALE'] == 'zh-Hans-CN') {
                 $this->backend->getController()->setLocale('zh-Hans-CN');
                 $subject = _et($this->config->get('system_name')) . "終端證書即將到期";
                 $send_message = "\n{$companyInfo['COMPANY_NAME']} \n{$companyInfo['CONTACT']} 您好!\n        \t\n非常感謝您使用我們的{$this->config->get('app_name')}服務。\n您的以下終端的證書即將過期,為了不影響業務請盡快到證書管理頁麵購買新的證書。\n\n終端\t\t\t到期日\n" . $invalid_terminal_list . "\n\n新的證書可以從後台管理係統的證書管理頁麵購買,也可以直接到AsShop購買。\n如有任何問題請隨即和我們取得聯係。\n\n服務總站 http://www.asx4.net\nAsWiki\t\thttps://wiki.asx4.net\nAsHelp \thttps://support.asx4.net\nAsShop\thttps://ec.asx4.net\n    \t\n";
             } elseif ($userInfo['DEFAULT_LOCALE'] == 'ja_JP') {
                 $this->backend->getController()->setLocale('ja_JP');
                 $subject = _et($this->config->get('system_name')) . "端末のライセンスの期限が近づいています";
                 $send_message = "\n{$companyInfo['COMPANY_NAME']} \n{$companyInfo['CONTACT']} 様\n        \t\n{$this->config->get('app_name')}をご利用いただきまして誠にありがとうございます。\n下記の端末のライセンスの期限が近づいています。業務に影響を與えないように早めに新しいライセンスをご購入ください。\n\n端末ID\t\t\t期限\n" . $invalid_terminal_list . "\n\nライセンスは管理畫麵のライセンスマスタ畫麵か、AsShopからご購入いただけます。\nご不明な點がございましたら、お問い合わせください。\n\nサービスホーム http://www.asx4.net\nAsWiki \t\t\t\thttps://wiki.asx4.net\nAsHelp \t\t\t\thttps://support.asx4.net\nAsShop  \t\t\t\thttps://ec.asx4.net    \n    \t\n";
             } else {
                 $this->backend->getController()->setLocale('en_US');
                 $subject = _et($this->config->get('system_name')) . " Terminal will be out of license soon";
                 $send_message = "\n{$companyInfo['COMPANY_NAME']} \nHi {$companyInfo['CONTACT']}\n        \t\nThanks for using our {$this->config->get('app_name')} service. \nThe following terminal will be out of license soon. Please buy new license as soon as possible.\n\nTerminal ID\t\t\tValid Until\n" . $invalid_terminal_list . "\n\nYou can buy new licenses from the LICENSE MANAGEMENT page in our admin system or buy form the AsShop directly.\nIf you have any question, please don't hesitate to contact us.\n\nService Home\t\thttp://www.asx4.net\nAsWiki \t\t\thttps://wiki.asx4.net\nAsHelp \t\t\thttps://support.asx4.net\nAsShop  \t\t\thttps://ec.asx4.net\n";
             }
             mb_send_mail($userInfo['E_MAIL'], $subject, $send_message, $headers);
         }
     } catch (Exception $e) {
         $this->logger->log(LOG_ERR, $e->getMessage());
         die($e->getMessage());
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:54,代碼來源:License.php

示例4: checkLicense

 public function checkLicense()
 {
     $company_id = $this->session->get('company_id');
     $days = $this->config->get('license_warning_days');
     //$days排序 降序
     rsort($days, SORT_NUMERIC);
     try {
         $dao = DaoFactory::LicenseMst();
         $params = array('company_id' => $company_id, 'day' => $days[0]);
         $res = $dao->LicenseMST_GetLicenseValidDaysWarning($params)->fetchAll(PDO::FETCH_ASSOC);
         $this->af->setApp('daysn_terminal_num', count($res));
         $this->af->setApp('day_num', $res[0]['DAYS']);
     } catch (Exception $e) {
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
     }
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:16,代碼來源:ActionClass.php

示例5: perform

 /**
  * ライセンスマスタのデータをJSON形式で返す
  * @access public
  * @return array ライセンスマスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // 初期化
     $not_license_id = $this->af->get('not_license_id');
     $limit = $this->af->get('limit');
     // default 50
     $page = $this->af->get('page');
     // default 1
     $order = $this->af->get('order');
     // default asc
     $column = $this->af->get('column');
     // default shop_cd
     $keyword = $this->af->get('keyword');
     $license_id = $this->af->get('license_id');
     $search_terminal_id = $this->af->get('search_terminal_id');
     $terminal_name = $this->af->get('terminal_name');
     $joutai = $this->af->get('joutai');
     $company_id = $this->session->get('company_id');
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $not_license_id = explode(',', urldecode($not_license_id));
     $terminal_id = $this->af->get('terminal_id');
     $from_flg = $this->af->get('from_flg');
     try {
         // 一覧を取得
         if ($from_flg == 'terminal') {
             $params = array('terminal_id' => $terminal_id, 'not_license_id' => $not_license_id, 'limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
             $list = DaoFactory::LicenseMst()->LicenseMST_GetMasterLicenseListForTerminal($params)->fetchAll();
         } else {
             $params = array('limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page, 'license_id' => $license_id, 'search_terminal_id' => $search_terminal_id, 'terminal_name' => $terminal_name, 'joutai' => $joutai);
             $list = DaoFactory::LicenseMst()->LicenseMST_GetMasterLicenseList($params)->fetchAll();
         }
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => ($page - 1) * $limit + 1, 'result_end_num' => ($page - 1) * $limit + $limit, 'result_all_count' => count($list) ? $list[0]['FOUND_ROWS'] : 0, 'result_get_count' => count($list), 'result_limit' => $limit);
         // output にセット
         $output['totalData'] = array();
         $output['listData'] = $list;
         $output['pagerData'] = $pager;
     } catch (Exception $e) {
         // 致命的なエラーが発生
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:51,代碼來源:Get.php

示例6: perform

 /**
  * 端末マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $terminal_id = $this->af->get('terminal_id');
     $terminal_name = $this->af->get('terminal_name');
     $password = $this->af->get('password');
     $warehouse_id = $this->af->get('warehouse_id');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     $licenses = $this->af->get('license_id');
     //add
     $oya_terminal_id = null;
     if (!is_null($oya_terminal_flg) && $mode_kbn == 1) {
         $oya_terminal_id = $terminal_id;
     }
     // dao
     $terminalDao = DaoFactory::TerminalMst();
     try {
         // begin
         $terminalDao->BeginTransaction();
         //
         // 			$wheresql = 'company_id=? ORDER BY UPD_DATE desc';
         // 			$params = array(
         // 				'company_id' => $company_id,
         // 			);
         // 			$license = DaoFactory::LicenseD()->Retrieve($wheresql, $params);
         // 			if (DaoFactory::TerminalMst()->Column('COUNT(*)', 'company_id=?', $params) >= $license['MAX_TERMINAL']) {
         // 				return array('400', array('terminal_id' => '端末數が申込まれた端末數に達しています。新たに端末を追加するには削除するか端末數を増やす申請を行ってください'));
         // 			}
         // set params
         $params = array('terminal_id' => $terminal_id, 'terminal_name' => $terminal_name, 'status_flg' => '1', 'password' => md5($password), 'company_id' => $company_id, 'UID' => $s_user_id, 'PGM' => get_class());
         //terminal insert
         $terminalDao->Insert($params);
         $TanmatsuLicenseDao = Daofactory::TanmatsuLicense();
         //add
         $licenseDao = DaoFactory::LicenseMst();
         //add
         //license
         //-- delete
         $params = array('company_id' => $company_id, 'terminal_id' => $terminal_id);
         $TanmatsuLicenseDao->Delete(' company_id = ? AND terminal_id = ? ', $params);
         if ($licenses != '') {
             $licenses = explode(',', $licenses);
             //terminal_license insert
             foreach ($licenses as $license_id) {
                 //exists ( license_id )
                 $exist = $licenseDao->Retrieve(' company_id = ? AND license_id = ? ', array($company_id, $license_id));
                 if (empty($exist)) {
                     $def1 = $this->af->getDef('license_id');
                     $err_msg = array('license_id_err' => "入力された" . $def1['name'] . "は登録されていません");
                     return array(400, $err_msg);
                 }
                 $params = array('company_id' => $company_id, 'terminal_id' => $terminal_id, 'license_id' => $license_id, 'UID' => $user_id, 'PGM' => get_class());
                 $TanmatsuLicenseDao->Insert($params);
                 //if start_time is null
                 $params = array('license_id' => $license_id, 'company_id' => $company_id);
                 $result = $licenseDao->Column('START_YMD_HMS', ' LICENSE_ID = ? AND COMPANY_ID = ? ', $params);
                 if (empty($result)) {
                     $params = array('company_id' => $company_id, 'license_id' => $license_id, 'uid' => $s_user_id, 'pgm' => get_class());
                     //update start_date end_date of license_mst
                     $licenseDao->UpdateLicense($params);
                 }
             }
         }
         //endif license != ''
         // commit
         $terminalDao->CommitTransaction();
     } catch (Exception $e) {
         $terminalDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:80,代碼來源:Insert.php

示例7: perform

 /**
  * 端末マスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $terminal_id = $this->af->get('terminal_id');
     $terminal_name = $this->af->get('terminal_name');
     $password = $this->af->get('password');
     $warehouse_id = $this->af->get('warehouse_id');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     $licenses = $this->af->get('license_id');
     //add
     // dao
     $terminalDao = DaoFactory::TerminalMst();
     $TanmatsuLicenseDao = Daofactory::TanmatsuLicense();
     //add
     $licenseDao = DaoFactory::LicenseMst();
     //add
     try {
         // begin
         $terminalDao->BeginTransaction();
         // set params
         $params = array('terminal_name' => $terminal_name, 'status_flg' => '1', 'UID' => $s_user_id, 'PGM' => get_class());
         // password がリクエストにあれば update に含める
         if ($password != '') {
             $params['password'] = md5($password);
         }
         // dao update
         $terminalDao->Update($params, ' company_id = ? AND terminal_id = ? ', array($company_id, $terminal_id));
         //license
         //-- delete
         $params = array('company_id' => $company_id, 'terminal_id' => $terminal_id);
         $TanmatsuLicenseDao->Delete(' company_id = ? AND terminal_id = ? ', $params);
         if ($licenses != '') {
             $licenses = explode(',', $licenses);
             //  insert
             foreach ($licenses as $license_id) {
                 //exists ( license_id )
                 $exist = $licenseDao->Retrieve(' company_id = ? AND license_id = ? ', array($company_id, $license_id));
                 if (empty($exist)) {
                     $def1 = $this->af->getDef('license_id');
                     $err_msg = array('license_id_err' => "入力された" . $def1['name'] . "は登録されていません");
                     return array(400, $err_msg);
                 }
                 $params = array('company_id' => $company_id, 'terminal_id' => $terminal_id, 'license_id' => $license_id, 'UID' => $s_user_id, 'PGM' => get_class());
                 $TanmatsuLicenseDao->Insert($params);
                 //if start_time is null
                 $params = array('license_id' => $license_id, 'company_id' => $company_id);
                 $result = $licenseDao->Column('START_YMD_HMS', ' LICENSE_ID = ? AND COMPANY_ID = ? ', $params);
                 if (empty($result)) {
                     $params = array('company_id' => $company_id, 'license_id' => $license_id, 'uid' => $s_user_id, 'pgm' => get_class());
                     //update start_date end_date of license_mst
                     $licenseDao->UpdateLicense($params);
                 }
             }
         }
         //endif license != ''
         // commit
         $terminalDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $terminalDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
開發者ID:weiweiabc109,項目名稱:test_project1,代碼行數:72,代碼來源:Update.php


注:本文中的DaoFactory::LicenseMst方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。