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


PHP DaoFactory::UserMst方法代码示例

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


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

示例1: perform

 /**
  * ユーザマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id_arr = $this->af->get('user_id_arr');
     // get session params
     $s_user_id = $this->session->get('user_id');
     $company_id = $this->session->get('company_id');
     // dao
     $userDao = DaoFactory::UserMst();
     try {
         // begin
         $userDao->BeginTransaction();
         if ($_REQUEST['del'] == 'all') {
             $userDao->Delete(' company_id = ? AND user_id <> ? ', array($company_id, $s_user_id));
         } else {
             foreach ($user_id_arr as $user_id) {
                 $userDao->Delete('company_id = ? AND user_id = ? ', array($company_id, $user_id));
             }
         }
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:34,代码来源:Delete.php

示例2: authenticate

 function authenticate()
 {
     $this->af->setApp('app_name', $this->config->get('app_name'));
     // ログインチェック
     $login = new LoginController();
     if (!$login->isLogin()) {
         return 'login';
     }
     // パスワード期限チェック
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $params = array('company_id' => $company_id, 'user_id' => $user_id);
     if (DaoFactory::UserMst()->isExpiredPassword($params)) {
         return 'password_list';
     }
     // get params
     $kengen_flg = intval($this->session->get('kengen_flg'));
     // 権限取得
     // 権限フラグチェック
     if ($kengen_flg != Konst::KENGEN_FLG_KANRI && $kengen_flg != Konst::KENGEN_FLG_SUPER) {
         // 管理者ユーザ(8)、スーパーユーザ(9)以外であれば弾く
         $login->Logout();
         return 'login';
     }
     $locale = $this->session->get('current_locale');
     if ($locale) {
         $this->backend->getController()->setLocale($locale);
     }
     $this->setGuideModal();
     $this->checkLicense();
     return null;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:32,代码来源:ActionClass.php

示例3: perform

 /**
  * ユーザアンロックが成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id_arr = $this->af->get('user_id_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     // dao
     $userDao = DaoFactory::UserMst();
     try {
         // begin
         $userDao->BeginTransaction();
         foreach ($user_id_arr as $user_id) {
             // exists ( user_id )
             $exist = $userDao->Retrieve(' company_id = ? AND user_id = ?', array($company_id, $user_id));
             if (empty($exist)) {
                 $def1 = $this->af->getDef('user_id');
                 $err_msg = array('user_id' => "入力された" . $def1['name'] . "は登録されていません");
                 return array(400, $err_msg);
             }
             // set params
             $params = array('PWD_UNLOCK' => '', 'UID' => $s_user_id, 'PGM' => get_class());
             // dao insert
             $userDao->Update($params, ' company_id = ? AND user_id = ? ', array($company_id, $user_id));
         }
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:39,代码来源:Unlock.php

示例4: validateParams

 function validateParams($params)
 {
     $error_message_list = array();
     // 現在のパスワード
     $UserMst = DaoFactory::UserMst();
     $userData = $UserMst->UserMst_GetByUserId($params);
     if ($params['current_pwd'] == '') {
         $error_message_list['current_pwd'] = '現在のパスワードが入力されていません。';
     } else {
         if ($userData['USER_PWD'] != $params['current_pwd_hash']) {
             $error_message_list['current_pwd'] = '現在のパスワードが正しくありません。';
         }
     }
     // 新しいパスワード
     if ($params['new_pwd1'] == '') {
         $error_message_list['new_pwd1'] = '新しいパスワードが入力されていません。';
     }
     // 新しいパスワード(確認用)
     if ($params['new_pwd2'] == '') {
         $error_message_list['new_pwd2'] = '新しいパスワード(確認用)が入力されていません。';
     }
     if ($params['new_pwd1'] != $params['new_pwd2']) {
         $error_message_list['new_pwd1'] = '二つの新しいパスワードの入力内容が異なっています。';
     }
     return $error_message_list;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:26,代码来源:Update.php

示例5: perform

 /**
  * ユーザマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id = $this->af->get('user_id');
     $login_id = $this->af->get('login_id');
     $user_name = $this->af->get('user_name');
     $e_mail = $this->af->get('e_mail');
     $role_id = $this->af->get('role_id');
     $default_locale = $this->af->get('default_locale');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     // dao
     $userDao = DaoFactory::UserMst();
     $roleDao = DaoFactory::RoleMst();
     try {
         // begin
         $userDao->BeginTransaction();
         // exists ( user_id, login_id )
         $exist = $userDao->Retrieve(' company_id = ? AND user_id = ?', array($company_id, $user_id));
         if (empty($exist)) {
             $def1 = $this->af->getDef('user_id');
             $err_msg = array('user_id' => "入力された" . $def1['name'] . "は登録されていません");
             return array(400, $err_msg);
         }
         // 入力したログインIDとuser_idで引っ張ってきたログインIDを比較し、
         // 異なっていれば(変更しようとしていれば)login_idの一意チェックを行う
         if ($exist['LOGIN_ID'] !== $login_id) {
             // exists ( user_id, login_id )
             $wheresql = ' company_id = ? AND login_id = ? ';
             $bindarr = array($company_id, $login_id);
             $exist = $userDao->Retrieve($wheresql, $bindarr);
             if (!empty($exist)) {
                 $def = $this->af->getDef('login_id');
                 $err_msg = array('login_id' => "入力された" . $def['name'] . "は既に登録されています");
                 return array(400, $err_msg);
             }
         }
         // exists ( role_id )
         $exist = $roleDao->Retrieve(' company_id = ? AND role_id = ?  ', array($company_id, $role_id));
         if (empty($exist)) {
             $def1 = $this->af->getDef('role_id');
             $err_msg = array('role_id' => "入力された" . $def1['name'] . "は登録されていません");
             return array(400, $err_msg);
         }
         // set params
         $params = array('login_id' => $login_id, 'user_name' => $user_name, 'e_mail' => $e_mail, 'role_id' => $role_id, 'default_locale' => $default_locale, 'UID' => $s_user_id, 'PGM' => get_class());
         // dao update
         $userDao->Update($params, ' company_id = ? AND user_id = ? ', array($company_id, $user_id));
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         // rollback
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:64,代码来源:Update.php

示例6: perform

 /**
  * ユーザマスタの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $login_id = $this->af->get('login_id');
     $user_name = $this->af->get('user_name');
     $warehouse_id = $this->af->get('warehouse_id');
     $e_mail = $this->af->get('e_mail');
     $pwd_settei = $this->af->get('pwd_settei');
     $default_locale = $this->af->get('default_locale');
     $raw_user_pwd = Util::makeRandomPassword();
     //パスワード生成
     $user_pwd = $pwd_settei == 1 ? md5($raw_user_pwd) : '';
     // pwd_settei が 1 であれば、ランダムな文字を生成してパスワードとする。
     $role_id = $this->af->get('role_id');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     $kengen_flg = $this->session->get('kengen_flg');
     // dao
     $userDao = DaoFactory::UserMst();
     $roleDao = DaoFactory::RoleMst();
     try {
         // begin
         $userDao->BeginTransaction();
         // FIXME: このへんのトランザクション内存在チェック処理、共通化できればもう少しスッキリする… @ 2012/05/01 myoshii@asx.co.jp
         // exists ( user_id, login_id )
         $wheresql = ' company_id = ? AND login_id = ? ';
         $bindarr = array($company_id, $login_id);
         $exist = $userDao->Retrieve($wheresql, $bindarr);
         if (!empty($exist)) {
             $def = $this->af->getDef('login_id');
             $err_msg = array('login_id' => "入力された" . $def['name'] . "は既に登録されています");
             return array(400, $err_msg);
         }
         // exists ( role_id )
         $exist = $roleDao->Retrieve(' company_id = ? AND role_id = ?  ', array($company_id, $role_id));
         if (empty($exist)) {
             $def1 = $this->af->getDef('role_id');
             $err_msg = array('role_id' => "入力された" . $def1['name'] . "は登録されていません");
             return array(400, $err_msg);
         }
         // set params
         $params = array('login_id' => $login_id, 'user_name' => $user_name, 'warehouse_id' => $warehouse_id, 'e_mail' => $e_mail, 'kengen_flg' => $kengen_flg, 'user_pwd' => $user_pwd, 'company_id' => $company_id, 'role_id' => $role_id, 'default_locale' => $default_locale, 'upd_uid' => $s_user_id, 'crt_uid' => $s_user_id, 'upd_pgm' => get_class(), 'crt_pgm' => get_class());
         // dao insert
         $userDao->UserMst_Insert($params);
         // commit
         $userDao->CommitTransaction();
         if ($pwd_settei == 1) {
             $params = array('login_id' => $login_id, 'user_name' => $user_name, 'email' => $e_mail, 'user_pwd' => $raw_user_pwd, 'url' => $this->config->get('url'), 'current_locale' => $default_locale);
             Util::sendPasswordMail($params);
         }
     } catch (Exception $e) {
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:63,代码来源:Insert.php

示例7: authenticate

 function authenticate()
 {
     $this->af->setApp('app_name', $this->config->get('app_name'));
     // ログインチェック
     $login = new LoginController();
     if (!$login->isLogin()) {
         return 'login';
     }
     // パスワード期限チェック
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $params = array('company_id' => $company_id, 'user_id' => $user_id);
     if (DaoFactory::UserMst()->isExpiredPassword($params)) {
         return 'password_list';
     }
     // get params
     $action = $this->backend->ctl->getCurrentActionName();
     // アクション名を取得
     $kengen_flg = intval($this->session->get('kengen_flg'));
     // 権限取得
     $company_id = $this->session->get('company_id');
     // 会社CD取得
     $role_id = $this->session->get('role_id');
     // ロールID取得
     // 権限フラグチェック
     if ($kengen_flg != Konst::KENGEN_FLG_KANRI && $kengen_flg != Konst::KENGEN_FLG_SUPER) {
         // 管理者ユーザ(8)、スーパーユーザ(9)以外であれば弾く
         $login->Logout();
         return 'login';
     }
     // スーパーユーザはロール権限のチェックを行わない
     if ($kengen_flg != Konst::KENGEN_FLG_SUPER) {
         // ロールD と ActionName を比較して有効であれば通す
         $params = array('company_id' => $company_id, 'role_id' => $role_id, 'action_name' => $action);
         $enable = DaoFactory::MenuRoleD()->getCheckEnableRole($params)->fetch();
         if (empty($enable)) {
             return array('redirect', '?action_error=true');
         }
     }
     // パンくず
     // アクション名からメニューを取得
     $params = array('company_id' => $company_id, 'action_name' => $action);
     $current = DaoFactory::MenuRoleD()->getMenuByActionName($params)->fetch();
     // 取得したメニューから親メニューを取得
     $params = array('company_id' => $company_id, 'menu_id' => $current['PARENT_ID']);
     $parent = DaoFactory::MenuRoleD()->getParentMenuByMenuId($params)->fetch();
     $this->af->setApp('crumbs_root', array_change_key_case((array) $parent));
     $this->af->setApp('crumbs_parent', array_change_key_case((array) $current));
     $locale = $this->session->get('current_locale');
     if ($locale) {
         $this->backend->getController()->setLocale($locale);
     }
     $this->setGuideModal();
     $this->checkLicense();
     return null;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:56,代码来源:Screen_ActionClass.php

示例8: check_mail_not_exists

 /**
  * ログインIDがDBに登録されているかチェックする
  * @param string $name フォーム名
  */
 public function check_mail_not_exists($name)
 {
     $bind = array('mail' => $this->form_vars['mail']);
     // ログインIDを取得
     $dao = DaoFactory::UserMst();
     $result = $dao->Retrieve(' E_MAIL = ? ', $bind);
     if (empty($result)) {
         $this->ae->add($name, "入力された{form}が登録されていません", E_FORM_INVALIDCHAR);
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:14,代码来源:Control.php

示例9: check_login_id_is_update

 /**
  * リクエストのログインIDがUpdate可能であることをチェックする。
  * @param string $name フォーム名
  */
 public function check_login_id_is_update($name)
 {
     // ユーザID、ログインIDを取得
     $params = array('company_id' => $this->backend->getSession()->get('company_id'), 'user_id' => $this->form_vars['user_id'], 'login_id' => $this->form_vars['login_id']);
     // リクエストした user_id 以外で login_id が存在する場合ことを確認
     $user = DaoFactory::UserMst()->Retrieve(' company_id = ? AND user_id != ? AND login_id = ? ', $params);
     // login_id が存在する場合
     if (!empty($user)) {
         $this->ae->add($name, "入力された{form}は既に登録されています", E_FORM_INVALIDCHAR);
     }
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:15,代码来源:Control.php

示例10: 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

示例11: _setDefault

 public function _setDefault(&$renderer)
 {
     // get session params
     $company_id = $this->session->get('company_id');
     $user_id = $this->session->get('user_id');
     $kengen_flg = $this->session->get('kengen_flg');
     // su?
     if ($kengen_flg == Konst::KENGEN_FLG_SUPER) {
         // get menu mst
         $top_menu = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null ORDER BY MENU_ID ', array('company_id' => $company_id))->fetchAll();
         // get menu
         $global_menu = array();
         foreach ($top_menu as $menu) {
             $params = array('company_id' => $company_id, 'parent_id' => $menu['MENU_ID']);
             $child_menu = DaoFactory::MenuMst()->Select(' company_id = ? AND parent_id = ? ORDER BY MENU_ID ', $params)->fetchAll();
             if (!empty($child_menu)) {
                 $global_menu[$menu['MENU_ID']]['child_menu'] = $child_menu;
                 $global_menu[$menu['MENU_ID']]['top_menu_name'] = $menu['MENU_NAME'];
             }
         }
     } else {
         // get user
         $params = array('company_id' => $company_id, 'user_id' => $user_id);
         $user = DaoFactory::UserMst()->Retrieve(' company_id = ? and user_id = ? and del_flg = 0 ', $params);
         $user_role_id = $user['ROLE_ID'];
         // get menu mst
         $top_menu = DaoFactory::MenuMst()->Select(' company_id = ? and parent_id is null ORDER BY MENU_ID ', array('company_id' => $company_id))->fetchAll();
         // get menu
         $global_menu = array();
         foreach ($top_menu as $menu) {
             $params = array('company_id' => $company_id, 'role_id' => $user_role_id, 'parent_id' => $menu['MENU_ID']);
             $child_menu = DaoFactory::MenuRoleD()->getMenuRoleDAtParentIdByRoleIdAndParentId($params)->fetchAll();
             if (!empty($child_menu)) {
                 $global_menu[$menu['MENU_ID']]['child_menu'] = $child_menu;
                 $global_menu[$menu['MENU_ID']]['top_menu_name'] = $menu['MENU_NAME'];
             }
         }
     }
     // Renderer からテンプレートエンジンを取得
     $smarty =& $renderer->getEngine();
     $smarty->assign('global_menu', $global_menu);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:42,代码来源:ViewClass.php

示例12: perform

 /**
  * ユーザのパスワードの再設定が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $user_id_arr = $this->af->get('user_id_arr');
     // get session params
     $company_id = $this->session->get('company_id');
     $s_user_id = $this->session->get('user_id');
     // dao
     $userDao = DaoFactory::UserMst();
     try {
         // begin
         $userDao->BeginTransaction();
         // exists ( user_id )
         foreach ($user_id_arr as $user_id) {
             $user_pwd = Util::makeRandomPassword();
             $exist = $userDao->Retrieve(' company_id = ? AND user_id = ?', array($company_id, $user_id));
             if (empty($exist)) {
                 $def1 = $this->af->getDef('user_id');
                 $err_msg = array('user_id' => "入力された" . $def1['name'] . "は登録されていません");
                 return array(400, $err_msg);
             }
             // set params
             $params = array('user_pwd' => md5($user_pwd), 'company_id' => $company_id, 'user_id' => $user_id, 'upd_uid' => $s_user_id, 'upd_pgm' => get_class());
             // dao update
             $userDao->UserMst_PwdSaisettei($params);
             // get user
             $user = $userDao->Retrieve(' company_id = ? AND user_id = ? ', array($company_id, $user_id));
             // メールのパラメータをセット
             $params = array('login_id' => $user['LOGIN_ID'], 'user_name' => $user['USER_NAME'], 'email' => $user['E_MAIL'], 'user_pwd' => $user_pwd, 'url' => $this->config->get('url'));
             // メール送信 FIXME: 送信者が文字化けしている @ 2012/05/01 myoshii@asx.co.jp
             Util::sendPasswordMail($params);
         }
         // commit
         $userDao->CommitTransaction();
     } catch (Exception $e) {
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:46,代码来源:Password.php

示例13: perform

 /**
  * ユーザマスタのデータをJSON形式で返す
  * @access public
  * @return array ユーザマスタ
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // get request params ( search )
     $login_id = $this->af->get('login_id');
     $user_name = $this->af->get('user_name');
     $email = $this->af->get('email');
     $misettei = $this->af->get('misettei');
     $kigengire = $this->af->get('kigengire');
     $locking = $this->af->get('locking');
     $role_id = $this->af->get('role_id');
     $keyword = $this->af->get('keyword');
     // get request params ( pager )
     $limit = $this->af->get('limit');
     $page = $this->af->get('page');
     $order = $this->af->get('order');
     $column = $this->af->get('column');
     // get session params
     $company_id = $this->session->get('company_id');
     $kengen_flg = $this->session->get('kengen_flg');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     try {
         $params = array('login_id' => $login_id, 'user_name' => $user_name, 'email' => $email, 'kengen' => $kengen_flg, 'misettei' => $misettei, 'kigengire' => $kigengire, 'locking' => $locking, 'role_id' => $role_id, 'keyword' => $keyword, 'order' => $order, 'column' => $column, 'company_id' => $company_id, 'start_page' => $start_page, 'end_page' => $end_page);
         // 一覧を取得
         $list = DaoFactory::UserMst()->UserMst_GetUser($params)->fetchAll();
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => $start_page, 'result_end_num' => $end_page, '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,代码行数:45,代码来源:Get.php

示例14: perform

 /**
  * 担当マスタのデータをJSON形式で返す
  * @access public
  * @return array 担当マスタのデータを返す
  * @see Admin_ActionClass::perform()
  */
 public function perform()
 {
     // 初期化
     $company_id = $this->session->get('company_id');
     $not_user_id = $this->af->get('not_user_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');
     // pager setting
     $start_page = ($page - 1) * $limit + 1;
     $end_page = ($page - 1) * $limit + $limit;
     $userGroup = DaoFactory::UserMst();
     if ($not_user_id != "") {
         $not_user_id = explode(',', urldecode($not_user_id));
     }
     try {
         // DAO パラメータ定義
         $params = array('company_id' => $company_id, 'not_user_id' => $not_user_id, 'limit' => $limit, 'page' => $page, 'order' => $order, 'column' => $column, 'keyword' => $keyword, 'start_page' => $start_page, 'end_page' => $end_page);
         // 一覧を取得
         $list = $userGroup->UserMst_GetAll($params)->fetchAll();
         // ページ情報を設定
         $pager = array('result_page' => $page, 'result_start_num' => $start_page, 'result_end_num' => $end_page, '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) {
         // 致命的なエラーが発生
         return array('500', $e->getMessage());
     }
     return array('json', $output);
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:44,代码来源:Get.php

示例15: perform

 /**
  * パスワードリセットの保存が成功したかJSON形式で返す
  * @access public
  * @see Admin_ActionClass::perform()
  */
 function perform()
 {
     // get request params
     $mail = $this->af->get('mail');
     try {
         $userDao = DaoFactory::UserMst();
         // begin
         $userDao->BeginTransaction();
         $params = array('mail' => $mail);
         $users = DaoFactory::UserMst()->UserMst_GetByEMail($params);
         if (!empty($users)) {
             $pwd = Util::makeRandomPassword();
             //パスワード生成
             $user_pwd = md5($pwd);
             $params = array('USER_PWD' => $user_pwd, 'PWD_MISMATCH' => '0', 'PWD_UNLOCK' => NULL, 'UID' => $user_id, 'PGM' => get_class());
             $userDao->Update($params, " E_MAIL = ?  ", array($mail));
             // commit
             $userDao->CommitTransaction();
             $companyarr = array();
             $namearr = array();
             $idarr = array();
             $current_locale = $users[0]['DEFAULT_LOCALE'];
             foreach ($users as $someone) {
                 $companyarr[$someone['COMPANY_ID']] = $someone['COMPANY_ID'];
                 $namearr[] = $someone['USER_NAME'];
                 $idarr[] = $someone['LOGIN_ID'];
             }
             $params = array('company_id' => implode(',', $companyarr), 'login_id' => implode(',', $idarr), 'email' => $mail, 'user_pwd' => $pwd, 'url' => $this->config->get('url'), 'user_name' => implode(',', $namearr), 'current_locale' => $current_locale);
             Util::sendPasswordMail($params);
             //return 'login';
         }
     } catch (Exception $e) {
         $userDao->AbortTransaction();
         $this->logger->log(LOG_DEBUG, $e->getTraceAsString());
         return array(500, $e->getMessage());
     }
     exit;
 }
开发者ID:weiweiabc109,项目名称:test_project1,代码行数:43,代码来源:Update.php


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