Log in n 6 0 n adminpage userpage

  • Slides: 9
Download presentation

영화 예매, Log in 구성 n 로그인과 영화예매는 비주얼베이직6. 0으 로 구현하며 n 프로젝트의

영화 예매, Log in 구성 n 로그인과 영화예매는 비주얼베이직6. 0으 로 구현하며 n 프로젝트의 구성 폼은 다음과 같다 admin_page user_page Login_preview movie_main entry_form movie_advance_enter movie_manage_form movie_add_form 3

영화 예매, Log in 몇가지 정리 Public Function id_hash_function(id_text As String) '사용자 정보 구성

영화 예매, Log in 몇가지 정리 Public Function id_hash_function(id_text As String) '사용자 정보 구성 요소 type화 '-----id문자열에서 문자 하나씩 추출하여 배열에 저장하기 Public Type entry_info Dim id_len As Integer 'id의 길이를 저장하기 위한 변수 Dim i As Integer memory_space As Boolean '1 id_len = Len(Trim(id_text)) permission_info As Boolean id_info As String * 20 'id로 hashkey 구하는 해쉬함수 '2 '3 pw_info As String * 32 For i = 1 To id_len id_hash(i) = Mid(id_text, i, 1) '4 name_info As String * 30 Dim id_hash(1 To 20) As String 'id의 각 문자열한개씩 저장하기위한 배열 선언 id_hash[] '5 nick_info As String * 30 '6 ssn_info As String * 20 '7 address_info(1 To 2) As String * 80 '8, 9 Next i '-----id해쉬 하여 해쉬key만들기 Dim hash(1 To 20) As Integer Dim hashkey As Integer hashkey = 0 For i = 1 To id_len hash(i) = Val(Asc(id_hash(i))) hashkey = hashkey + hash(i) 'id의 문자 하나씩 아스키화해서 수치값으로 바꿔 hash(i)에 저장 'hashkey변수에 계속 더해줌 Next i phone_info As String * 30 '10 email_info As String * 30 '11 hashkey = (hashkey Mod HASH_SIZE) + 1 'hashkey의 MAX SIZE를 해쉬테이블 내로 제한 id_hash_function = hashkey 'hashkey 반환 '-----hash 끝 link As Integer End Type '12 End Function 7

영화 예매, Log in '************************************ '영화 시간(및 좌석) type room_confirm(1 To 5) As Boolean

영화 예매, Log in '************************************ '영화 시간(및 좌석) type room_confirm(1 To 5) As Boolean room(1 To 5) As movie_room Private Type movie_time_info '상영관 시간 좌석정보 '상영관은 5개로 설정 at_time As String * 10 End Type seat_cnt As Integer '************************************ End Type '영화 구조체 '************************************ Public Type movie_info '영화 상영관 (및 시간 정보 및 좌석)type picture_name As String * 100 Private Type movie_room memory_space As Boolean '그림파일 저장 변수 '메모리 사용 유무 room_number As String * 10 name As String * 60 '영화이름 time_confirm(1 To 7) As Boolean gnere As String * 60 '영화장르 director As String * 60 '영화감독 time(1 To 7) As movie_time_info '영화시간과 좌석 End Type open_date As String * 50 '************************************ act As String * 100 '영화 날짜 (및 상영관, 시간, 좌석 정보) type sysnopsis As String * 1500 '시놉시스, 줄거리 Private Type movie_date_confirm(1 To 10) As Boolean month As String * 3 '월 day As String * 4 '일 '개봉일 '출연배우 date(1 To 10) As movie_date '영화 날짜, 상영관 시간 좌석 정보 상영날짜 max는 10 End Type 8