function checkInputdata() { $app_id = @$this->request['app_id']; // 機器種別 if (!$this->oMgr->checkEmpty($this->request['app_type_id'])) { // エラーメッセージをセット $this->oMgr->setErr('E007', "機器種別"); // 続きのチェックはしない // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; } // 名称 if (!$this->oMgr->checkEmpty($this->request['app_name'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "名称"); } // 区分別にチェック list($wire_kbn, $ip_kbn) = $this->oMgr->getAppTypeKbns($this->request['app_type_id']); if ($wire_kbn == WIRE_KBN_FREE) { $wire_kbn = $this->request['wire_kbn']; } if ($ip_kbn == IP_KBN_FREE) { $ip_kbn = $this->request['ip_kbn']; } // 設置場所 if ($wire_kbn == WIRE_KBN_WIRED) { if (!$this->oMgr->checkEmpty($this->request['vlan_id'])) { // エラーメッセージをセット $this->oMgr->setErr('E007', "VLAN管理者"); } } else { if ($wire_kbn == WIRE_KBN_WLESS) { if (!$this->oMgr->checkEmpty($this->request['vlan_room_id'])) { // エラーメッセージをセット $this->oMgr->setErr('E007', "部屋"); } } } // MACアドレス if (!$this->oMgr->checkEmpty($this->request['mac_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "MACアドレス"); } else { if (!string::checkMacAddr($this->request['mac_addr'])) { $this->oMgr->setErr('E006', 'MACアドレス'); } else { if ($this->oMgr->existsMacAddr($this->request['mac_addr'], $app_id)) { // 新規申請で有線の場合 $is_mac_err = true; if ($wire_kbn == WIRE_KBN_WIRED && $this->oMgr->isNormalUser() && $app_id == "") { $aryOrg = array(); if ($this->request['mac_addr'] != "" && $this->request['vlan_id'] != "") { if ($this->oMgr->isUnknownUsersApp($this->request['mac_addr'], $this->request['vlan_id'], &$aryOrg)) { $is_mac_err = false; $this->request['unknown_data'] = $aryOrg; } } } // エラー if ($is_mac_err) { $this->oMgr->setErr('E017', "MACアドレス"); } } } } // システム管理者の場合 if ($this->oMgr->isAdminUser()) { if ($ip_kbn == IP_KBN_FIXD) { if (!$this->oMgr->checkEmpty($this->request['ip_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "IPアドレス"); } else { if (!string::checkIpAddr($this->request['ip_addr'])) { $this->oMgr->setErr('E006', 'IPアドレス'); } } } if (!$this->oMgr->checkEmpty($this->request['app_user_id'])) { $this->oMgr->setErr('E007', '機器利用者'); } } // 無線の場合 if ($wire_kbn == WIRE_KBN_WLESS) { $aryVlan = $this->oMgr->getTempVlanList(); if (count($aryVlan) == 0) { // 利用中VLANがない場合新規VLAN必須 if (!$this->oMgr->checkEmpty($this->request['wl_vlan_id'])) { $this->oMgr->setErr('E007', '無線VLAN'); } } else { // 重複チェック if ($this->oMgr->checkEmpty($this->request['wl_vlan_id'])) { if (in_array($this->request['wl_vlan_id'], $aryVlan)) { $this->oMgr->setErr('E017', "無線VLAN"); } } } } // プリンタの場合 $this->is_vdi_app = $this->oMgr->checkVdiApp($this->request['app_type_id']); if ($this->is_vdi_app && ($this->isVlanAdminUser() || $this->isAdminUser())) { if ($this->request['use_sbc'] == "") { if ($this->oMgr->checkDeviceUsed($this->request['app_id'])) { $this->oMgr->setErr('D002'); } } } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }
function checkInputdata() { $aryTmp = $this->oMgr->getAppHead($this->request['app_id'], @$this->request['entry_no']); list($wire_kbn, $ip_kbn) = $this->oMgr->getAppTypeKbns($aryTmp['app_type_id']); if ($ip_kbn == IP_KBN_FREE) { $ip_kbn = @$aryTmp['ip_kbn']; } if ($ip_kbn == IP_KBN_FIXD) { if (!$this->oMgr->checkEmpty($this->request['ip_addr'])) { // エラーメッセージをセット $this->oMgr->setErr('E001', "固定IPアドレス"); } else { if (!string::checkIpAddr($this->request['ip_addr'])) { $this->oMgr->setErr('E006', '固定IPアドレス'); } } } // エラーなし if (sizeof($this->oMgr->aryErrMsg) == 0) { return true; } // エラー発生 $this->errMsg = $this->oMgr->getErrMsg(); return false; }