本文整理汇总了PHP中string::han2zen方法的典型用法代码示例。如果您正苦于以下问题:PHP string::han2zen方法的具体用法?PHP string::han2zen怎么用?PHP string::han2zen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类string
的用法示例。
在下文中一共展示了string::han2zen方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
$val = trim($val, "\"");
// 常勤区分を取得
if ($fields[$key] == "cteiinkb") {
if ($val == "1") {
$joukin_kbn = JOUKIN_KBN_FULLTIME;
$post_code_nm = "syksy_cde";
$job_code_nm = "knmei_cde";
} else {
$joukin_kbn = JOUKIN_KBN_PARTTIME;
$post_code_nm = "hjksyk_misy_cde";
$job_code_nm = "hjksyk_skin_cde";
}
}
// カナ名は全角に
if ($fields[$key] == "cnamekna" || $fields[$key] == "kyu_kn_nme") {
$val = string::han2zen($val);
$val = str_replace(" ", " ", $val);
}
// 非常勤の場合役職コードに文字列を付与(特殊処理)
if ($fields[$key] == "hjksyk_skin_cde") {
if ($joukin_kbn == JOUKIN_KBN_PARTTIME) {
$val = "HJK_" . $val;
}
}
// 掛講座が「000000」の場合、空にする
if ($fields[$key] == "kkrkoza_cde") {
if ($val == "000000") {
$val = "";
}
}
$vals[$fields[$key]] = $val;
示例2: set_include_path
<?php
set_include_path('.:/usr/share/pear:/var/www/phplib');
require_once "mgr/common_mgr.class.php";
$oMgr = new common_mgr();
$pass = $argv[1];
$kanjiname = str_replace(" ", " ", "渋田 和芳");
print_r($kanjiname);
print_r(":");
$kanjiname = string::han2zen($kanjiname);
print_r($kanjiname);
print_r(":");
$strUser .= string::mb_str_pad($kanjiname, 20, " ");
print_r($strUser);
print_r(":");
$passwd = trim($pass, "\"");
$passwd = $oMgr->passwordDecrypt($passwd);
exit;
示例3: checkInputdata
function checkInputdata()
{
$user_id = @$this->request['user_id'];
if ($user_id != "") {
$aryOld = $this->oMgr->getUserData($user_id);
$old_login_id = $aryOld['login_id'];
$old_mail_acc = $aryOld['mail_acc'];
unset($aryOld);
}
// 職員番号
if (!$this->oMgr->checkEmpty($this->request['staff_id'])) {
// エラーメッセージをセット
//$this->oMgr->setErr('E001',"職員ID");
} else {
if (!string::strlen($this->request['staff_id']) > STAFF_ID_LEN) {
// エラーメッセージをセット
$param = array();
$param[0] = "職員番号";
$param[1] = "半角" . STAFF_ID_LEN . "桁以内";
$this->oMgr->setErr('E004', $param);
} else {
if ($this->oMgr->existsStaffId($this->request['staff_id'], $user_id)) {
$this->oMgr->setErr('E017', "職員番号");
}
}
}
// 漢字姓
if (!$this->oMgr->checkEmpty($this->request['kanjisei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名(姓)");
}
// 漢字名
if (!$this->oMgr->checkEmpty($this->request['kanjimei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名(名)");
}
// カナ姓
$this->request['kanasei'] = string::han2zen($this->request['kanasei']);
if (!$this->oMgr->checkEmpty($this->request['kanasei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名カナ(姓)");
} else {
if (!string::chackKatakana3($this->request['kanasei'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名カナ(姓)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// カナ名
$this->request['kanamei'] = string::han2zen($this->request['kanamei']);
if (!$this->oMgr->checkEmpty($this->request['kanamei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名カナ(名)");
} else {
if (!string::chackKatakana3($this->request['kanamei'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名カナ(名)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// 英字姓
$this->request['eijisei'] = string::zen2han($this->request['eijisei']);
$this->request['eijisei'] = strtolower($this->request['eijisei']);
$chkEijisei = str_replace("-", "", $this->request['eijisei']);
if (!$this->oMgr->checkEmpty($this->request['eijisei'])) {
// 任意
} else {
if (!string::checkAlphabet($chkEijisei)) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名英字(姓)';
$param[1] = '半角英字';
$this->oMgr->setErr('E004', $param);
}
}
// 英字名
$this->request['eijimei'] = string::zen2han($this->request['eijimei']);
$this->request['eijimei'] = strtolower($this->request['eijimei']);
$chkEijimei = str_replace("-", "", $this->request['eijimei']);
if (!$this->oMgr->checkEmpty($this->request['eijimei'])) {
// 任意
} else {
if (!string::checkAlphabet($chkEijimei)) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名英字(名)';
$param[1] = '半角英字';
$this->oMgr->setErr('E004', $param);
}
}
// HIS連携する場合
if ($this->request['his_flg'] == '1') {
// 性別
$this->request['sex'] = (string) $this->request['sex'];
if (!$this->oMgr->checkEmpty($this->request['sex'])) {
// エラーメッセージをセット
//.........这里部分代码省略.........
示例4: checkKyotoCardData
function checkKyotoCardData()
{
// 所属情報1~4
for ($i = 1; $i <= 4; $i++) {
$col = "belong_info_" . $i;
$nam = "所属情報" . string::han2zen($i);
// 半角に変換
$this->request[$col] = string::zen2han($this->request[$col]);
if (!$this->oMgr->checkEmpty($this->request[$col])) {
// if ($i == 1)
// {
// $this->oMgr->setErr('E001', $nam);
// }
} else {
if (!(string::checkNumber($this->request[$col], 8) || string::checkNumber($this->request[$col], 10))) {
// エラーメッセージをセット
$param = array();
$param[0] = $nam;
$param[1] = '半角数字8桁か10桁';
$this->oMgr->setErr('E004', $param);
}
}
}
// キー番号
$this->request['key_number'] = string::zen2han($this->request['key_number']);
if (!$this->oMgr->checkEmpty($this->request['key_number'])) {
$this->oMgr->setErr('E001', "キー番号");
} else {
if (!string::checkAlphanum($this->request['key_number'])) {
// エラーメッセージをセット
$param = array();
$param[0] = "キー番号";
$param[1] = '半角英数字';
$this->oMgr->setErr('E004', $param);
}
}
// UID
$this->request['uid'] = string::zen2han($this->request['uid']);
if (!$this->oMgr->checkEmpty($this->request['uid'])) {
$this->oMgr->setErr('E001', "UID");
} else {
if (!string::checkAlphanum($this->request['uid'])) {
// エラーメッセージをセット
$param = array();
$param[0] = "UID";
$param[1] = '半角英数字';
$this->oMgr->setErr('E004', $param);
}
}
// 利用期間
if (!$this->oMgr->checkEmpty($this->request['start_date'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "利用期間(開始日)");
$has_date_err = true;
} else {
if (!$this->oMgr->checkDateFormat($this->request['start_date'])) {
// エラーメッセージをセット
$param = array();
$param[0] = "利用期間(開始日)";
$param[1] = "yyyy/mm/dd";
$this->oMgr->setErr('E004', $param);
$has_date_err = true;
} else {
if (!$this->oMgr->checkDate($this->request['start_date'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E013', "利用期間(開始日)");
$has_date_err = true;
}
}
}
// 利用期間
if (!$this->oMgr->checkEmpty($this->request['end_date'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "利用期間(終了日)");
$has_date_err = true;
} else {
if (!$this->oMgr->checkDateFormat($this->request['end_date'])) {
// エラーメッセージをセット
$param = array();
$param[0] = "利用期間(終了日)";
$param[1] = "yyyy/mm/dd";
$this->oMgr->setErr('E004', $param);
$has_date_err = true;
} else {
if (!$this->oMgr->checkDate($this->request['end_date'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E013', "利用期間(終了日)");
$has_date_err = true;
}
}
}
if (!$has_date_err) {
if (!$this->oMgr->checkDateTerm($this->request['start_date'], $this->request['end_date'])) {
// エラーメッセージをセット
$param = array();
$param[0] = "利用期間(開始日)";
$param[1] = "利用期間(終了日)";
$this->oMgr->setErr('E012', $param);
}
}
//.........这里部分代码省略.........
示例5: getSearchArgs
function getSearchArgs($request)
{
$args = $this->getSqlArgs();
$args['COND'] = "";
$aryCond = array();
// 統合ID
if (@$request['login_id'] != "") {
$aryCond[] = "UM.login_id LIKE '%" . string::replaceSql($request['login_id']) . "%'";
}
// カードNo.
if (@$request['staffcode'] != "") {
$aryCond[] = "EXISTS (SELECT * FROM kyoto_user_card_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND key_number LIKE '%" . string::replaceSql($request['staffcode']) . "%')";
}
// カナ氏名
if (@$request['kananame'] != "") {
$kananame = string::han2zen($request['kananame']);
$kananame = str_replace(" ", " ", $kananame);
$kananame = str_replace(" ", "", $kananame);
$strBuff = "(";
$strBuff .= "COALESCE(UM.kanasei, ' ') || COALESCE(UM.kanamei, ' ') LIKE '%" . string::replaceSql($request['kananame']) . "%'";
$strBuff .= " OR ";
$strBuff .= "COALESCE(UM.kanjisei, ' ') || COALESCE(UM.kanjimei, ' ') LIKE '%" . string::replaceSql($request['kananame']) . "%'";
$strBuff .= " OR ";
$strBuff .= "UM.kanasei || UM.kanamei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= " OR ";
$strBuff .= "UM.kanjisei || UM.kanjimei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_his_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND replace(replace(kananame, ' ', ' '), ' ', '') LIKE '%" . string::replaceSql($kananame) . "%')";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_his_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND replace(replace(kanjiname, ' ', ' '), ' ', '') LIKE '%" . string::replaceSql($kananame) . "%')";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
// 職種
if (@$request['job_id'] != "") {
$strBuff = "(";
$strBuff .= "UM.job_id = " . string::replaceSql($request['job_id']);
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_job_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND job_id = " . string::replaceSql($request['job_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
// 役職
if (@$request['post_id'] != "") {
$strBuff = "(";
$strBuff .= "UM.post_id = " . string::replaceSql($request['post_id']);
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_post_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND post_id = " . string::replaceSql($request['post_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
// 常勤/非常勤
if (@$request['joukin_kbn'] != "") {
$aryCond[] = "UM.joukin_kbn = '" . string::replaceSql($request['joukin_kbn']) . "'";
}
// 所属
if (@$request['belong_chg_id'] != "") {
$strBuff = "(";
$strBuff .= "UM.belong_chg_id = " . string::replaceSql($request['belong_chg_id']);
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl WHERE UM.user_id = user_id AND del_flg = '0' AND belong_chg_id = " . string::replaceSql($request['belong_chg_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
} else {
if (@$request['belong_sec_id'] != "") {
$strBuff = "(";
$strBuff .= "EXISTS (SELECT * FROM belong_chg_mst WHERE UM.belong_chg_id = belong_chg_id AND del_flg = '0' AND belong_sec_id = " . string::replaceSql($request['belong_sec_id']) . ")";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.del_flg = '0' AND BCM.belong_sec_id = " . string::replaceSql($request['belong_sec_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
} else {
if (@$request['belong_dep_id'] != "") {
$strBuff = "(";
$strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BSM.belong_dep_id = " . string::replaceSql($request['belong_dep_id']) . ")";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BSM.belong_dep_id = " . string::replaceSql($request['belong_dep_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
} else {
if (@$request['belong_div_id'] != "") {
$strBuff = "(";
$strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BDM.belong_div_id = " . string::replaceSql($request['belong_div_id']) . ")";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BDM.belong_div_id = " . string::replaceSql($request['belong_div_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
} else {
if (@$request['belong_class_id'] != "") {
$strBuff = "(";
$strBuff .= "EXISTS (SELECT * FROM belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM,belong_div_mst AS BVM WHERE UM.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BDM.belong_div_id = BVM.belong_div_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BVM.del_flg = '0' AND BVM.belong_class_id = " . string::replaceSql($request['belong_class_id']) . ")";
$strBuff .= " OR ";
$strBuff .= "EXISTS (SELECT * FROM user_sub_chg_tbl AS USC,belong_chg_mst AS BCM,belong_sec_mst AS BSM,belong_dep_mst AS BDM,belong_div_mst AS BVM WHERE UM.user_id = USC.user_id AND USC.belong_chg_id = BCM.belong_chg_id AND BCM.belong_sec_id = BSM.belong_sec_id AND BSM.belong_dep_id = BDM.belong_dep_id AND BDM.belong_div_id = BVM.belong_div_id AND BCM.del_flg = '0' AND BSM.del_flg = '0' AND BDM.del_flg = '0' AND BVM.del_flg = '0' AND BVM.belong_class_id = " . string::replaceSql($request['belong_class_id']) . ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
}
}
}
}
//.........这里部分代码省略.........
示例6: getSearchArgs
function getSearchArgs($request)
{
$args = $this->getSqlArgs();
$args['COND'] = "";
$args['ENTRY_STATUS_ENTRY'] = $this->sqlItemChar(ENTRY_STATUS_ENTRY);
$args['ENTRY_STATUS_REJECT'] = $this->sqlItemChar(ENTRY_STATUS_REJECT);
// ソート処理のために以下の定数をSQLパラメータに追加
$args['IP_KBN_DHCP'] = $this->sqlItemChar(IP_KBN_DHCP);
$args['IP_KBN_FREE'] = $this->sqlItemChar(IP_KBN_FREE);
$args['DUMY_IP_ADDR_DHCP'] = $this->sqlItemChar(DUMY_IP_ADDR_DHCP);
$args['DUMY_IP_ADDR_NONE'] = $this->sqlItemChar(DUMY_IP_ADDR_NONE);
$args['WIRE_KBN_WLESS'] = $this->sqlItemChar(WIRE_KBN_WLESS);
$args['WIRE_KBN_FREE'] = $this->sqlItemChar(WIRE_KBN_FREE);
$aryCond = array();
// 機器種別
if (@$request['app_type_id'] != "") {
$aryCond[] = "APP.app_type_id = " . string::replaceSql($request['app_type_id']);
}
// 設置場所
if (@$request['vlan_id'] != "") {
$aryCond[] = "APP.vlan_id = " . string::replaceSql($request['vlan_id']);
} else {
if (@$request['vlan_room_id'] != "") {
$aryCond[] = "APP.vlan_room_id = " . string::replaceSql($request['vlan_room_id']);
} else {
if (@$request['vlan_floor_id'] != "") {
$aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst WHERE APP.vlan_room_id = vlan_room_id AND del_flg = '0' AND vlan_floor_id = " . string::replaceSql($request['vlan_floor_id']) . ")";
} else {
if (@$request['vlan_ridge_id'] != "") {
$aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst AS VRM,vlan_floor_mst AS VFM WHERE APP.vlan_room_id = VRM.vlan_room_id AND VRM.vlan_floor_id = VFM.vlan_floor_id AND VRM.del_flg = '0' AND VFM.del_flg = '0' AND VFM.vlan_ridge_id = " . string::replaceSql($request['vlan_ridge_id']) . ")";
}
}
}
}
// 申請者名(漢字・カナ)
if (@$request['app_user_name'] != "") {
$kananame = string::han2zen($request['app_user_name']);
$kananame = str_replace(" ", " ", $kananame);
$kananame = str_replace(" ", "", $kananame);
$strBuff = "EXISTS (SELECT * FROM user_mst AS UM ";
$strBuff .= "WHERE (";
$strBuff .= "APP.app_user_id = UM.user_id ";
$strBuff .= " OR ";
$strBuff .= "APP.entry_id = UM.user_id ";
$strBuff .= ") AND (";
$strBuff .= "UM.kanasei || UM.kanamei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= " OR ";
$strBuff .= "UM.kanjisei || UM.kanjimei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
// MACアドレス
if (@$request['mac_addr'] != "") {
$mac_addr = strtolower($request['mac_addr']);
$mac_addr = str_replace(":", "", $mac_addr);
$mac_addr = str_replace("-", "", $mac_addr);
$aryCond[] = "APP.mac_addr LIKE '%" . string::replaceSql($mac_addr) . "%'";
}
// IPアドレス
if (@$request['ip_addr'] != "") {
$aryCond[] = "APP.ip_addr LIKE '%" . string::replaceSql($request['ip_addr']) . "%'";
}
// 名称
if (@$request['app_name'] != "") {
$aryCond[] = "APP.app_name LIKE '%" . string::replaceSql($request['app_name']) . "%'";
}
$cnt = 0;
if (is_array($request['entry_kbn_status'])) {
foreach ($request['entry_kbn_status'] as $key => $val) {
if ($val != "1") {
continue;
}
if ($key == 'agreed') {
$aryKbnStat[] = "(APP.entry_kbn IS NULL AND APP.entry_status IS NULL)";
}
list($entry_kbn, $entry_status) = explode("_", $key);
$aryKbnStat[] = "(APP.entry_kbn = '" . string::replaceSql($entry_kbn) . "' AND APP.entry_status = '" . string::replaceSql($entry_status) . "')";
$cnt++;
}
}
if ($cnt > 0) {
$aryCond[] = "(" . implode(" OR ", $aryKbnStat) . ")";
}
// ログインユーザの権限によって処理分け
// 管理権限があるか?
if (!$this->hasAdminActType('apps_search.php')) {
// 一般ユーザの場合自分の申請したもののみ表示
$user_id = $this->getSessionData('LOGIN_USER_ID');
$uid = string::replaceSql($user_id);
$usersCond = <<<SQL
(
EXISTS (SELECT * FROM app_head_entry WHERE APP.app_id = app_id AND entry_id = {$uid})
OR
APP.app_user_id = {$uid}
SQL;
if ($this->isVlanAdminUser()) {
// VLAN管理者の場合
$usersCond .= <<<SQL
//.........这里部分代码省略.........
示例7: outputLibraryData
function outputLibraryData($mode, $is_inf_format = false)
{
$tel_len = 12;
$pbno_len = 3;
if ($is_inf_format) {
$tel_len = 13;
$pbno_len = 4;
}
$sql = $this->getQuery('GET_LIBRARY_OUTPUT_DATA');
$aryRet = $this->oDb->getAll($sql);
$strUser = "";
if (is_array($aryRet)) {
foreach ($aryRet as $data) {
// 固定
$strUser .= "1601";
// 職員コード
$strUser .= str_pad($data['staffcode'], 10);
// 新旧フラグ固定
$strUser .= "0";
// 予備
$strUser .= str_pad("", 15);
// 所属部署コード
$strUser .= str_pad($data['wardcode'], 5);
// 職種コード
$strUser .= str_pad($data['professioncode'], 3);
// パスワード
$password = $data['password'];
$password = $this->passwordDecrypt($password);
if (strlen($password) > 5) {
$password = substr($password, 0, 5);
}
$strUser .= str_pad($password, 5);
// 職員カナ名称
$kananame = str_replace(" ", " ", $data['kananame']);
$kananame = string::zen2han($kananame);
$strUser .= string::mb_str_pad($kananame, 20);
// 職員漢字名称
$strUser .= string::mb_str_pad($data['kanjiname'], 20, " ");
// 発行番号
$strUser .= str_pad("", 4);
// 給与職員番号
$strUser .= str_pad("", 4);
// 所属科コード
$strUser .= str_pad($data['deptcode'], 2);
// 役職コード
$strUser .= str_pad($data['gradecode'], 2);
// 棒給表コード
$strUser .= str_pad("", 2);
// 所属科コード
$strUser .= str_pad($data['deptcode'], 2);
// 予約項目コード
$strUser .= str_pad($data['appcode'], 5);
// 予備
$strUser .= str_pad("", 19);
// ローマ字氏名
$eijiname = $data['eijiname'];
if (strlen($eijiname) > 25) {
list($sei, $mei) = explode(".", $eijiname);
$sei = substr($sei, 0, 1);
$eijiname = $sei . "." . $mei;
}
$strUser .= str_pad($eijiname, 25);
// 住所
$strUser .= string::mb_str_pad("", 60, " ");
// 備考
$note = string::han2zen($date['note']);
$note = string::nr2null($note);
if (string::strlen($note) > 60) {
$note = mb_substr($note, 0, 60, 'UTF-8');
}
$strUser .= string::mb_str_pad($note, 60, " ");
// 電話番号
$strUser .= str_pad("", $tel_len);
// 生年月日
$strUser .= str_pad($data['birthday'], 8);
// 性別
$sex = "";
if ($data['sex'] == "0") {
$sex = "M";
} else {
if ($data['sex'] == "1") {
$sex = "F";
}
}
$strUser .= str_pad($sex, 1);
// 終了区分
$strUser .= "0";
// PHS番号
$pbno_start = 4 - $pbno_len;
$pbno = substr($data['pbno'], $pbno_start, $pbno_len);
$strUser .= str_pad($pbno, $pbno_len);
// 内線
$strUser .= substr(str_pad($data['naisen'], 4), 0, 4);
// 有効開始日
$strUser .= str_pad($data['validstartdate'], 8);
// 有効終了日
$strUser .= str_pad($data['validenddate'], 8);
// 予備
$strUser .= str_pad("", 10);
// 更新日
//.........这里部分代码省略.........
示例8: getSearchArgs
function getSearchArgs($request)
{
$args = $this->getSqlArgs();
$args['COND'] = "";
$args['ENTRY_STATUS_ENTRY'] = $this->sqlItemChar(ENTRY_STATUS_ENTRY);
// ソート処理のために以下の定数をSQLパラメータに追加
$args['IP_KBN_DHCP'] = $this->sqlItemChar(IP_KBN_DHCP);
$args['IP_KBN_FREE'] = $this->sqlItemChar(IP_KBN_FREE);
$args['DUMY_IP_ADDR_DHCP'] = $this->sqlItemChar(DUMY_IP_ADDR_DHCP);
$args['DUMY_IP_ADDR_NONE'] = $this->sqlItemChar(DUMY_IP_ADDR_NONE);
$args['WIRE_KBN_WLESS'] = $this->sqlItemChar(WIRE_KBN_WLESS);
$args['WIRE_KBN_FREE'] = $this->sqlItemChar(WIRE_KBN_FREE);
$aryCond = array();
// 機器種別
if (@$request['app_type_id'] != "") {
$aryCond[] = "AHE.app_type_id = " . string::replaceSql($request['app_type_id']);
}
// 設置場所
if (@$request['vlan_id'] != "") {
$aryCond[] = "AHE.vlan_id = " . string::replaceSql($request['vlan_id']);
} else {
if (@$request['vlan_room_id'] != "") {
$aryCond[] = "AHE.vlan_room_id = " . string::replaceSql($request['vlan_room_id']);
} else {
if (@$request['vlan_floor_id'] != "") {
$aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst WHERE AHE.vlan_room_id = vlan_room_id AND del_flg = '0' AND vlan_floor_id = " . string::replaceSql($request['vlan_floor_id']) . ")";
} else {
if (@$request['vlan_ridge_id'] != "") {
$aryCond[] = "EXISTS (SELECT * FROM vlan_room_mst AS VRM,vlan_floor_mst AS VFM WHERE AHE.vlan_room_id = VRM.vlan_room_id AND VRM.vlan_floor_id = VFM.vlan_floor_id AND VRM.del_flg = '0' AND VFM.del_flg = '0' AND VFM.vlan_ridge_id = " . string::replaceSql($request['vlan_ridge_id']) . ")";
}
}
}
}
// 申請者名(漢字・カナ)
if (@$request['entry_user_name'] != "") {
$kananame = string::han2zen($request['entry_user_name']);
$kananame = str_replace(" ", " ", $kananame);
$kananame = str_replace(" ", "", $kananame);
$strBuff = "EXISTS (SELECT * FROM user_mst AS UM WHERE AHE.entry_id = UM.user_id AND ";
$strBuff .= "(";
$strBuff .= "UM.kanasei || UM.kanamei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= " OR ";
$strBuff .= "UM.kanjisei || UM.kanjimei LIKE '%" . string::replaceSql($kananame) . "%'";
$strBuff .= ")";
$strBuff .= ")";
$aryCond[] = $strBuff;
}
// MACアドレス
if (@$request['mac_addr'] != "") {
$mac_addr = strtolower($request['mac_addr']);
$mac_addr = str_replace(":", "", $mac_addr);
$mac_addr = str_replace("-", "", $mac_addr);
$aryCond[] = "AHE.mac_addr LIKE '%" . string::replaceSql($mac_addr) . "%'";
}
// IPアドレス
if (@$request['ip_addr'] != "") {
$aryCond[] = "AHE.ip_addr LIKE '%" . string::replaceSql($request['ip_addr']) . "%'";
}
// 名称
if (@$request['app_name'] != "") {
$aryCond[] = "AHE.app_name LIKE '%" . string::replaceSql($request['app_name']) . "%'";
}
// ログインユーザの権限によって処理分け
// 管理権限があるか?
if (!$this->hasAdminActType('apps_req.php')) {
// VLAN管理者になっているもののみ表示
$user_id = $this->getSessionData('LOGIN_USER_ID');
$uid = string::replaceSql($user_id);
$aryCond[] = <<<SQL
(
EXISTS (SELECT * FROM vlan_admin_list WHERE AHE.vlan_id = vlan_id AND del_flg = '0' AND user_id = {$uid})
OR
EXISTS (SELECT * FROM vlan_admin_list AS VA, app_list_entry AS AL WHERE VA.vlan_id = AL.vlan_id AND AL.app_id = AHE.app_id AND AL.entry_no = AHE.entry_no AND VA.del_flg = '0' AND AL.del_flg = '0' AND VA.user_id = {$uid})
)
SQL;
}
if (count($aryCond) > 0) {
$args['COND'] = " AND " . join(" AND ", $aryCond);
}
return $args;
}
示例9: checkInputdata
function checkInputdata()
{
// 職員番号
if (!$this->oMgr->checkEmpty($this->request['staff_id'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "個人番号");
} else {
if (!string::strlen($this->request['staff_id']) > STAFF_ID_LEN) {
// エラーメッセージをセット
$param = array();
$param[0] = "個人番号";
$param[1] = "半角" . STAFF_ID_LEN . "桁";
$this->oMgr->setErr('E004', $param);
} else {
if ($this->oMgr->existsStaffId($this->request['staff_id'])) {
$this->oMgr->setErr('E017', "個人番号");
}
}
}
// 漢字姓
if (!$this->oMgr->checkEmpty($this->request['kanjisei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名(姓)");
}
// 漢字名
if (!$this->oMgr->checkEmpty($this->request['kanjimei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名(名)");
}
// カナ姓
$this->request['kanasei'] = string::han2zen($this->request['kanasei']);
if (!$this->oMgr->checkEmpty($this->request['kanasei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名カナ(姓)");
} else {
if (!string::chackKatakana3($this->request['kanasei'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名カナ(姓)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// カナ名
$this->request['kanamei'] = string::han2zen($this->request['kanamei']);
if (!$this->oMgr->checkEmpty($this->request['kanamei'])) {
// エラーメッセージをセット
$this->oMgr->setErr('E001', "氏名カナ(名)");
} else {
if (!string::chackKatakana3($this->request['kanamei'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名カナ(名)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// カナ姓
$this->request['kanasei_real'] = string::han2zen($this->request['kanasei_real']);
if (!$this->oMgr->checkEmpty($this->request['kanasei_real'])) {
//
} else {
if (!string::chackKatakana3($this->request['kanasei_real'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '戸籍氏名カナ(姓)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// カナ名
$this->request['kanamei_real'] = string::han2zen($this->request['kanamei_real']);
if (!$this->oMgr->checkEmpty($this->request['kanamei_real'])) {
//
} else {
if (!string::chackKatakana3($this->request['kanamei_real'])) {
// エラーメッセージをセット
$param = array();
$param[0] = '戸籍氏名カナ(名)';
$param[1] = 'カタカナ';
$this->oMgr->setErr('E004', $param);
}
}
// 英字姓
$this->request['eijisei'] = string::zen2han($this->request['eijisei']);
$this->request['eijisei'] = strtolower($this->request['eijisei']);
$chkEijisei = str_replace("-", "", $this->request['eijisei']);
if (!$this->oMgr->checkEmpty($this->request['eijisei'])) {
// 任意
} else {
if (!string::checkAlphabet($chkEijisei)) {
// エラーメッセージをセット
$param = array();
$param[0] = '氏名英字(姓)';
$param[1] = '半角英字';
$this->oMgr->setErr('E004', $param);
}
}
// 英字名
$this->request['eijimei'] = string::zen2han($this->request['eijimei']);
//.........这里部分代码省略.........
示例10: str_pad
// 予約項目コード
$strUser .= str_pad($data['appcode'], 5);
// 予備
$strUser .= str_pad("", 19);
// ローマ字氏名
$eijiname = $data['eijiname'];
if (strlen($eijiname) > 25) {
list($sei, $mei) = explode(".", $eijiname);
$sei = substr($sei, 0, 1);
$eijiname = $sei . "." . $mei;
}
$strUser .= str_pad($eijiname, 25);
// 住所
$strUser .= string::mb_str_pad("", 60, " ");
// 備考
$note = string::han2zen($date['note']);
$note = string::nr2null($note);
if (string::strlen($note) > 60) {
$note = mb_substr($note, 0, 60, 'UTF-8');
}
$strUser .= string::mb_str_pad($note, 60, " ");
// 電話番号
$strUser .= str_pad("", 12);
// 生年月日
$strUser .= str_pad($data['birthday'], 8);
// 性別
$sex = "";
if ($data['sex'] == "0") {
$sex = "M";
} else {
if ($data['sex'] == "1") {