query( $sql ); if( $objConn2->nf() != 0 ) { while( $objConn2->next_record() ) { $pseq = $objConn2->f(0); $pname = $objConn2->f(2); $pip = $objConn2->f(3); $pport = $objConn2->f(4); $ptype = $objConn2->f(5); $pmonitor_yn = $objConn2->f(6); if ($ptype != "RCDB" || strstr($pname, "DBLB") == FALSE || $pmonitor_yn !='Y') continue; $dblbip = $pip; $dblbport = $pport; } } $objConn2->close(); if(empty($dblbip) || empty($dblbport) ) { echo "
"; exit(); } $objConn = new DB_Sql2; $objConn->Host = $dblbip; $objConn->Port = $dblbport; $objConn->Database = "localdb"; if ($mode == "del") { $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; $sql = " START TRANSACTION "; $objConn->query( $sql ); $sql = "UPDATE t_dav_resource SET deleted_yn = 'Y' "; $sql .= "WHERE uri like '/$ptranid/%' AND deleted_yn = 'N';"; $sql .= "DELETE FROM t_dav_space_in_use WHERE sp_svc_tran_id = $ptranid;"; $sql .= "DELETE FROM t_dav_use_dir WHERE sp_svc_tran_id = $ptranid;"; $sql .= "DELETE FROM t_sms_sp_svc_product WHERE sp_svc_tran_id = $ptranid;"; if ($objConn->query( $sql )) { $sql = "COMMIT;"; $objConn->query( $sql ); $success_flag = 1; } else { $sql = "ROLLBACK;"; $objConn->query( $sql ); echo "
"; } $objConn->close(); echo "
"; } ?>