".$mode; echo "
"; echo "arrange-->".$parrange; echo "
"; echo "rcid-->".$prcid; echo "
"; echo "rcseq-->".$prcseq; echo "
"; echo "size : ".sizeof($pname); echo "
"; for ($i=0; $i < sizeof($pname); $i++) { echo "name -->".$pname[$i]; echo " ip-->".$pip[$i]; echo " port-->".$pport[$i]; echo " type-->".$ptype[$i]; echo " monitor-->".$pmonitor[$i]; echo "
"; } */ // 성공 플래그 $success_flag = 0; $objConn = new DB_Sql; // 기존에 동일한 server명이 존재하면, 추가 금지 조치. for ($i=0; $i < sizeof($pname); $i++) { if ($mode == "add") { $strSQL = " SELECT COUNT(name) FROM t_rms_rc_server_index "; $strSQL .= " WHERE rcid = '$prcid' AND name = '$pname[$i]' AND deleted_yn = 'N'"; $objConn->query( $strSQL ); if( $objConn->nf() != 0 ) { $objConn->next_record(); $cnt = $objConn->f(0); } if( $cnt > 0 ) { $objConn->close(); AlertBack( "동일한 서버이름이 존재합니다.\n\n다른 서버이름을 입력하세요." ); exit; } } } /* decision server type */ for ($i=0; $i < sizeof($pname); $i++) { switch($ptype[$i]) { case "RC" : $servType[$i] = "0"; $to_align[$i] = "A"; break; case "STAT" : $servType[$i] = "1"; $to_align[$i] = "B"; break; case "RTS" : $servType[$i] = "2"; $to_align[$i] = "C"; break; case "RCTS" : $servType[$i] = "3"; $to_align[$i] = "D"; break; case "RCDB" : $servType[$i] = "4"; $to_align[$i] = "E"; break; case "CACHE" : $servType[$i] = "5"; $to_align[$i] = "AB"; break; case "TIMED" : $servType[$i] = "9"; $to_aign[$i] = "K"; default : break; } } $sql = " START TRANSACTION "; $objConn->query( $sql ); $sql = ""; for ($i=0; $i < sizeof($pname); $i++) { if ($mode == "add") { $title = "등록"; $loginid = $_COOKIE["cookie_admin_id"] ; $reg_date = date( "Y-m-d H:i:s", time() ); $update_date = date( "Y-m-d H:i:s", time() ); $remoteaddr = getenv('REMOTE_ADDR'); $alert_msg = "[서버등록] POP ID:" . $prcid ." 서버 이름:" . $pname[$i]; $servicetype = "INSERT"; $sql = " INSERT INTO t_rms_rc_server_index "; $sql .= " ( rcid, name, ip, port, type, reg_datetime, update_datetime, monitor_yn, etc1, etc2, deleted_yn) "; $sql .= " VALUES ( '$prcid', '$pname[$i]', '$pip[$i]', '$pport[$i]', '$ptype[$i]', now(), now(), '$pmonitor[$i]', '$to_align[$i]', '$parrange', 'N') "; $res_sql[$i] = $objConn->query( $sql ); } } for ($i=0; $i < sizeof($res_sql); $i++) { if ($res_sql[$i]) $succ = 1; else $succ = 0; } if ($succ == 1) { $sql = " COMMIT "; $objConn->query( $sql ); $success_flag = 1; } else { $sql = " ROLLBACK "; $objConn->query( $sql ); $success_flag = 0; } $objConn->close(); // mod 가 실패할 경우.. if ($success_flag == 0) { echo "
"; } switch($ptype) { case "RTS" : $ptype = "RTS"; break; case "RCDB" : $ptype = "RCDB"; break; case "RCTS" : $ptype = "RCTS"; break; } ?>

서버 완료

서버명 | IP | port | 서버타입 | 서버감시