강상위

Project Final Commit

Showing 66 changed files with 2455 additions and 287 deletions
1 -# 이승민씨를 위한 간단 GIT 설정법 1 +# 시설물 대여 시스템
2 -## 1.설치 2 +## 개요
3 -- 깃을 설치해주세요 3 +- 많은 사람들이 공통적으로 느끼고 있는 강의실 대여 시스템의 불편함을 해소해보고자 유저가 대여 현황 조회와 대여 예약을 할 수 있는 프로그램을 구상했습니다.
4 -> https://git-scm.com/downloads 4 +- 실제 통합된 시설물 대여 시스템을 구현하였고 실제로 시설물 조회, 예약, 취소 등 필요한 기능을 사용할 수 있습니다.
5 - 5 +
6 -## 2.GIT bash 열기 6 +
7 -- 깃을 설치하고 GIT bash를 열어주세요. 7 +## 운용환경 및 준비
8 - 8 +- Linux환경에서 MySQL, Python Flask로 동작하며 pymsql을 통해 연결됩니다.
9 -## 3.GIT 설정하기 9 +- 웹 기반 시스템이며 마이크로소프트 엣지, 구글 크롬 브라우저를 권장합니다.
10 -- 깃을 설정해주세요. username과 email을 설정하면 됩니다. 10 +- MySQL에 아래와 같은 테이블이 필요합니다. 사전에 준비하시기 바랍니다.
11 -- global 옵션은 깃을 설치한 컴퓨터 전체에 대한 설정이라는 뜻입니다. 11 +
12 -> git config --global user.name "이름" 12 +> \<Tables\>
13 -> git config --global user.email 메일@khu.ac.kr 13 +> - users - reservations_id : int(11), user_id : varchar(45), facility_id : int(11), start_time : datetime, endtime : datetime
14 - 14 +> - departments - department_id : int(11), department_name : int(45), manager_name : varchar(45), department_location : varchar(45)
15 -## 4.Clone하기 15 +> - reservations - reservations_id : int(11), user_id : int(45), facility_id : int(11), start_time : datetime, endtime : datetime
16 -- GIT bash에서 적당한 폴더를 만들고 들어가주세요. 16 +> - facilities - facility_id : int(11), department_id : int(11), facility_type : varchar(45), capacity : int(11), location : varchar(45), location_detail : varchar(45), equipment : varchar(45)
17 -> cd \<만드신 폴더\> 17 +
18 +- 세부 제약조건과 내용은 최종보고서를 참고해주시기 바랍니다.
19 +
20 +
21 +## 1.설치 및 초기설정
22 +- GIT Clone
23 +
18 > git clone http://khuhub.khu.ac.kr/2013104043/db-frs.git 24 > git clone http://khuhub.khu.ac.kr/2013104043/db-frs.git
19 > cd db-frs 25 > cd db-frs
20 26
21 -## 5.Branch 파기 27 +- 파이썬 가상환경 만들기
22 -- master는 위험하니 님을 위한 브랜치를 하나 만드세요. 28 +
23 -- git branch "브랜치이름"을 입력하시면 "브랜치이름"이라는 브랜치를 만들겠다는 뜻입니다. 29 +> python3 -m venv env
24 -- 브랜치 이름은 맘대로 하시고 30 +> source evn/bin/activate
25 -- checkout은 뒤에 입력한 브랜치를 사용하겠다는 뜻입니다. 31 +
26 -- git branch 를 입력하시면 전체 브랜치를 볼 수 있습니다. 32 +- 파이썬 패키지 설치
27 -> git branch \<브랜치이름\> 33 +
28 -> git checkout \<브랜치이름\> 34 +> pip install flask
29 - 35 +> pip install pymysql
30 -## 6.Branch push 36 +
31 -- 만든 브랜치를 khuhub에 올려주세요. 37 +- user_info에서 자신의 MySQL 계정과 비밀번호 설정
32 -> git push origin \<브랜치이름\> 38 +- ReservationControl.py, Users.py에서 각 함수마다 DB의 호스트 주소와 사용할 DB이름을 설정
33 - 39 +
34 -## 자 이제 마음대로 가지고 노세요! 40 +> db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd, db='dbname', charset='utf8')
35 - 41 +
36 -## 7.ADD와 COMMIT과 PUSH 42 +- flask서버 구동
37 -- clone한 폴더를 기준으로(여기서는 db-frs) 43 +
38 -- Add를 할 수 있습니다. 이왕이면 파일을 지정해서 사용해주세요. 안그러면 설정파일 다 올라가요... 44 +
39 -> git add .(현재 폴더를 모두 add하겠다는 뜻) 45 +## 2.기능
40 -> git add filename.py(filename.py만 add하겠다는 뜻) 46 +- 모든 화면에서 로고를 선택하면 처음화면으로 돌아갈 수 있습니다.
41 -- Add된 현황을 봅니다. 47 +
42 -> git status 48 +### 1) 첫 로그인 화면
43 -- 마음에 들었으면 커밋을 하죠. 참고로 -m "커밋메시지"는 꼭 들어가야 합니다. 49 +- 첫 화면에서는 로그인이 가능하며, 회원가입을 통해 가입한 후 서비스를 사용할 수 있습니다.
44 -> git commit -m \<커밋메시지\> 50 +
45 -- push를 합시다! push는 웹에 업로드 하는 기능입니다. 51 +### 2) 메인화면
46 -> git push origin \<브랜치이름\> 52 +- 로그인 후 처음으로 보여지는 화면으로 '대여하기', '대여현황', '로그아웃'을 선택할 수 있습니다.
53 +- '대여하기'를 선택하면 대여화면으로 이동합니다.
54 +- '대여현황'을 선택하면 대여현황화면으로 이동합니다.
55 +- '로그아웃'을 선택하면 로그아웃 후 처음화면으로 돌아갑니다.
56 +
57 +### 3-1) 대여화면
58 +- 사용자가 원하는 조건으로 시설물을 검색할 수 있는 화면입니다.
59 +- '건물'에서 사용자가 원하는 건물을 선택할 수 있습니다.
60 +- '사용 인원 수'에서 사용자가 원하는 규모의 시설물을 선택할 수 있습니다.
61 +- '시작시간'과 '종료시간'을 설정합니다.
62 +- '검색'을 선택하여 대여가능한 시설물을 확인할 수 있습니다.
63 +
64 +### 3-2) 검색결과화면
65 +- 사용자가 선택한 시간에 사용 가능한 시설물이 나타납니다.
66 +- '예약'을 선택하여 시설물 예약을 완료합니다.
67 +
68 +### 4) 대여현황화면
69 +- 사용자가 대여한 시설물들을 확인할 수 있습니다.
70 +- 대여현황 옆의 각각의 버튼을 선택하여 해당 시설물의 대여를 취소할 수 있습니다.
47 71
48 72
73 +
74 +##### 기타 문의사항은 2018-2 데이터베이스 'DB아파트209호'로 연락주시고 얼마든지 가져다 쓰시면 감사하겠습니다.
...\ No newline at end of file ...\ No newline at end of file
......
1 +# -*- coding: utf-8 -*-
2 +# 한글 인코딩을 위한 주석입니다.
3 +
4 +# 사전설정:
5 +# pymysql 패키지가 있어야 합니다.
6 +# pip install pymysql
7 +# 보안상 user_info에서 DB id, password를 가져옵니다.
8 +# user_info.py에서 DB id, password를 설정하고 사용해주세요.
9 +# 외부에서 사용법:
10 +# from ReservationControl import *
11 +
12 +import pymysql
13 +import user_info
14 +import datetime
15 +
16 +
17 +# getReservations - 대여현황반환 함수
18 +# input:
19 +# string user_id
20 +# output:
21 +# 성공시 : tuple형태로 반환 => ( (1 ,"steven123", 7, "전자정보대학", "136호", 10, datetime.datetime(2018,12,5,12,0,0), datetime.datetime(2018,12,5,12,10,0), ), )
22 +# 순서 : reservations_id, user_id, facility_id, location, location_detail, capacity, start_time, end_time
23 +
24 +# 실패시 : result[0][0]="SQL Error!"인 tuple 반환 => ( ("SQL Error!", ), )
25 +# 사용예:
26 +# result = getReservations("khucse123")
27 +# reservation_start_time = result[0][3]
28 +
29 +def getReservations(user_id):
30 + try:
31 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
32 + db='dbname', charset='utf8')
33 + curs = db.cursor()
34 +
35 + # curs.execute("select * from reservations where user_id=%s", user_id)
36 + curs.execute(
37 + "select r.reservations_id, r.user_id, r.facility_id, f.location, f.location_detail, f.capacity, r.start_time, r.end_time from reservations r, facilities f where r.user_id=%s AND r.facility_id=f.facility_id;",
38 + user_id)
39 + result = curs.fetchall()
40 + print("Fetch Success!")
41 + return result
42 + except:
43 + print("SQL Error!")
44 + return (("SQL Error!",),)
45 +
46 + finally:
47 + db.close()
48 +
49 +
50 +# deleteReservations - 대여현황삭제 함수
51 +# input:
52 +# int reservations_id
53 +# output:
54 +# 성공시 : True
55 +# 실패시 : False
56 +# 사용예:
57 +# deleteReservations(5)
58 +# 주의사항:
59 +# 테스트환경에서 없는 reservations_id를 넣으면 에러가 날 수 있음
60 +
61 +def deleteReservations(reservations_id):
62 + try:
63 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
64 + db='dbname', charset='utf8')
65 + curs = db.cursor()
66 +
67 + curs.execute("delete from reservations where reservations_id=%s", reservations_id)
68 + db.commit()
69 + print("Delete Success!")
70 + return True
71 + except:
72 + print("SQL Error!")
73 + return False
74 +
75 + finally:
76 + db.close()
77 +
78 +
79 +# addReservations - 대여현황추가 함수
80 +# input:
81 +# string user_id
82 +# int facility_id
83 +# datetime.datetime start_time
84 +# datetime.datetime end_time
85 +# output:
86 +# 성공시 : True
87 +# 실패시 : False
88 +# 사용예:
89 +# tstart = datetime.datetime(2018,12,5,0,11,12)
90 +# tend = datetime.datetime(2018,12,5,0,20,12)
91 +# addReservations("khucse123", 6, tstart, tend)
92 +# 주의사항:
93 +# 테스트환경에서 없는 user_id를 넣으면 에러가 날 수 있음
94 +# 테스트환경에서 없는 facility_id를 넣으면 에러가 날 수 있음
95 +
96 +def addReservations(user_id, facility_id, start_time, end_time):
97 + try:
98 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
99 + db='dbname', charset='utf8')
100 + curs = db.cursor()
101 +
102 + curs.execute("insert into reservations (user_id, facility_id, start_time, end_time) values (%s,%s,%s,%s)",
103 + (user_id, facility_id, start_time, end_time))
104 + db.commit()
105 + print("Add Reservation Success!")
106 + return True
107 + except:
108 + print("SQL Error!")
109 + return False
110 +
111 + finally:
112 + db.close()
113 +
114 +
115 +# getAvailableFacilities - 사용가능시설물 반환함수
116 +# input:
117 +# string location
118 +# int capacity
119 +# datetime.datetime start_time
120 +# datetime.datetime end_time
121 +# output:
122 +# 성공시 : tuple형태로 반환 => ( (1, "전자정보대학", "B01호", 40, "강의실", "빔프로젝터", ), )
123 +# 순서 : facility_id, location, location_detail, capacity, facility_type, equipment
124 +# 사용가능한 시설물이 없을 시 : result[0][0]="NoAvailableFacilites"인 tuple 반환 => ( ("NoAvailableFacilites", ), )
125 +
126 +# 실패시 : result[0][0]="SQL Error!"인 tuple 반환 => ( ("SQL Error!", ), )
127 +# 사용예:
128 +# tstart = datetime.datetime(2018,12,5,12,11,12)
129 +# tend = datetime.datetime(2018,12,5,14,20,12)
130 +# result = getAvailableFacilities("전자정보대학", 40, tstart, tend)
131 +# facility_id = result[0][0]
132 +
133 +def getAvailableFacilities(location, capacity, start_time, end_time):
134 + try:
135 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
136 + db='dbname', charset='utf8')
137 + curs = db.cursor()
138 +
139 + curs.execute(
140 + "select facility_id, location, location_detail, capacity, facility_type, equipment from facilities where (facility_id not in(select facility_id from reservations where (start_time<=%s AND %s<end_time) OR (start_time<%s AND %s<=end_time) OR (%s<=start_time AND end_time<=%s))) AND location=%s AND %s<=capacity;",
141 + (start_time, start_time, end_time, end_time, start_time, end_time, location, capacity))
142 +
143 + result = curs.fetchall()
144 + print("Fetch Success!")
145 +
146 + # 사용 가능한 시설물이 있을 경우
147 + if (len(result) != 0):
148 + return result
149 + # 사용 가능한 시설물이 없을 경우
150 + else:
151 + print("No Available Facilities")
152 + return (("NoAvailableFacilities",),)
153 +
154 + except:
155 + print("SQL Error!")
156 + return (("SQL Error!",),)
157 +
158 + finally:
159 + db.close()
1 +# -*- coding: utf-8 -*-
2 +# 한글 인코딩을 위한 주석입니다.
3 +
4 +# 사전설정:
5 +# pymysql 패키지가 있어야 합니다.
6 +# pip install pymysql
7 +# 보안상 user_info에서 DB id, password를 가져옵니다.
8 +# user_info.py에서 DB id, password를 설정하고 사용해주세요.
9 +# 외부에서 사용법:
10 +# from Users import *
11 +
12 +import pymysql
13 +import user_info
14 +
15 +
16 +# UserLogin - 유저 로그인 함수
17 +# input:
18 +# string user_id
19 +# string password
20 +# output:
21 +# 성공시 : True
22 +# 실패시 : False
23 +# 사용예:
24 +# UserLogin("khucse124", "steven1234")
25 +
26 +def UserLogin(user_id, password):
27 + try:
28 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
29 + db='dbname', charset='utf8')
30 + curs = db.cursor()
31 +
32 + curs.execute("select exists (select user_name from users where user_id=%s and password=%s) as result",
33 + (user_id, password))
34 + result = curs.fetchall()
35 +
36 + if (result[0][0] == 1):
37 + print("User login Success!")
38 + return True
39 + else:
40 + print("User login Failed!")
41 + return False
42 +
43 + except:
44 + print("SQL ERROR!!")
45 + return False
46 +
47 + finally:
48 + db.close()
49 +
50 +
51 +# UserJoin - 유저 회원가입 함수
52 +# input:
53 +# string user_id
54 +# int dept_id
55 +# string user_name
56 +# string pwd
57 +# string phone
58 +# string mail
59 +# output:
60 +# 성공시 : True
61 +# 실패시 : False
62 +# 사용예:
63 +# UserJoin("khucse124", 7, "Steven", "steven1234", "031-201-2566", "cs@khu.ac.kr")
64 +# 주의사항:
65 +# 테스트환경에서 같은 user_id가 있으면 에러가 날 수 있음
66 +# 테스트환경에서 dept_id는 departments 테이블에 없는 값을 넣으면 에러가 날 수 있음
67 +
68 +def UserJoin(user_id, dept_id, user_name, pwd, phone, mail):
69 + try:
70 + db = pymysql.connect(host='host-address', port=3306, user=user_info.user_id, password=user_info.user_passwd,
71 + db='dbname', charset='utf8')
72 + curs = db.cursor()
73 +
74 + curs.execute(
75 + "insert into users (user_id, department_id, user_name, password, phone, mail_address) values (%s,%s,%s,%s,%s,%s)",
76 + (user_id, dept_id, user_name, pwd, phone, mail))
77 + db.commit()
78 + print("User Join Success!")
79 + return True
80 +
81 + except:
82 + print("SQL ERROR!!")
83 + return False
84 +
85 + finally:
86 + db.close()
87 +
1 +# -*- coding: utf8 -*-
2 +from flask import request, render_template, redirect, session, flash, Flask
3 +from Users import *
4 +from ReservationControl import *
5 +from datetime import datetime
6 +
7 +app = Flask(__name__)
8 +app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT'
9 +
10 +@app.route('/', redirect_to="/login")
11 +def http_prepost_response():
12 + return "helloworld"
13 +
14 +
15 +@app.route('/login', methods=["GET"])
16 +def login():
17 + if session.get('ID'):
18 + return redirect('/myhome')
19 + elif request.args.get('retry') == 'true':
20 + return render_template("login.html", retry=True)
21 + return render_template("login.html", retry=False)
22 +
23 +
24 +@app.route('/join')
25 +def join():
26 + return render_template('join.html')
27 +
28 +
29 +@app.route('/join/confirm', methods=['POST'])
30 +def join_confirm():
31 + join_item = request.form
32 + print(join_item)
33 + if UserJoin(join_item.get('id'),join_item.get('deptid'),join_item.get('name'),join_item.get('password'),join_item.get('phone'),join_item.get('email')):
34 + flash('회원가입 성공!')
35 + return redirect('/login')
36 + flash('회원가입 실패!')
37 + return redirect('/join')
38 +
39 +
40 +@app.route('/logincheck', methods=["POST"])
41 +def login_check():
42 + IDPW = request.form
43 + if UserLogin(IDPW.get('id'),IDPW.get('pw')):
44 + session['ID'] = IDPW.get('id')
45 + welcome = IDPW.get('id')+" 님 안녕하세요!"
46 + flash(welcome)
47 + return redirect('/myhome')
48 + flash("ID와 비밀번호를 확인해주세요.")
49 + return redirect('/login?retry=true')
50 +
51 +
52 +@app.route('/myhome')
53 +def mystat():
54 + return render_template("myhome.html", ID=session['ID'])
55 +
56 +
57 +@app.route('/viewresv')
58 +def view_resv():
59 + resv_list = getReservations(session['ID'])
60 + print(resv_list)
61 + return render_template('resv_view.html', resv_list=resv_list)
62 +
63 +@app.route('/deleteresv', methods=['POST'])
64 +def delete_resv():
65 + resv_id = request.form
66 + if deleteReservations(resv_id.get('resv_id')):
67 + flash("예약이 삭제되었습니다")
68 + else:
69 + flash("예약 삭제에 실패했습니다")
70 + return redirect('/viewresv')
71 +
72 +
73 +
74 +@app.route('/search')
75 +def book():
76 + return render_template("resv_sch.html", ID=session['ID'])
77 +
78 +
79 +@app.route('/search/result', methods=['POST'])
80 +def search_result():
81 + searchdata = request.form
82 + starttime = datetime.strptime(searchdata.get('starttime'),'%Y-%m-%dT%H:%M')
83 + endtime = datetime.strptime(searchdata.get('endtime'),'%Y-%m-%dT%H:%M')
84 + if(starttime.strftime('%Y%m%d') == endtime.strftime('%Y%m%d')):
85 + result = getAvailableFacilities(searchdata.get('deptid'),searchdata.get('capacity'),starttime,endtime)
86 + print(result)
87 + return render_template("searchresult.html", resv_list=result, starttime=starttime, endtime=endtime)
88 + else:
89 + flash("2일 이상의 일정으로 예약 불가합니다")
90 + return redirect("/search")
91 +
92 +
93 +
94 +@app.route('/search/resv', methods=['POST'])
95 +def book_confirm():
96 + book_query=request.form
97 + print(book_query)
98 + starttime = datetime.strptime(book_query.get('start_time'), '%Y-%m-%d%H:%M')
99 + endtime = datetime.strptime(book_query.get('end_time'), '%Y-%m-%d%H:%M')
100 + if addReservations(session['ID'],book_query.get('fac_id'),starttime,endtime):
101 + flash("예약에 성공했습니다")
102 + return redirect('/myhome')
103 + else:
104 + flash("예약에 실패했습니다.")
105 + return redirect('/search')
106 +
107 +
108 +
109 +
110 +@app.route('/logout')
111 +def logout():
112 + session.clear()
113 + flash("로그아웃 되었습니다.")
114 + return redirect('/login')
115 +
116 +
117 +if __name__ == '__main__':
118 +
119 + print("done")
120 + app.config['SESSION_TYPE'] = 'filesystem'
121 + app.run(host="0.0.0.0", port=80)
1 +100 B
2 +101 B
3 +102 B
4 +103 B
5 +104 B
6 +105 B
7 +106 B
8 +107 B
9 +108 B
10 +109 B
11 +110 B
12 +120 B
13 +121 B
14 +130 B
15 +140 B
16 +141 B
17 +142 B
18 +143 B
19 +144 B
20 +145 B
21 +146 B
22 +147 B
23 +148 B
24 +150 B
25 +151 B
26 +152 B
27 +153 B
28 +160 B
29 +162 B
30 +171 B
31 +172 B
32 +173 B
33 +201 B
34 +202 B
35 +240 B
36 +241 B
37 +242 B
38 +260 B
39 +261 B
40 +262 B
41 +270 B
42 +271 B
43 +272 B
44 +273 B
45 +301 B
46 +302 B
47 +303 B
48 +320 B
49 +333 B
50 +340 B
51 +341 B
52 +342 B
53 +343 B
54 +350 B
55 +360 B
56 +362 B
57 +370 B
58 +400 B
59 +401 B
60 +402 B
61 +405 B
62 +406 B
63 +420 B
64 +421 B
65 +440 B
66 +441 B
67 +452 B
68 +461 B
69 +463 B
70 +470 B
71 +472 B
72 +500 B
73 +501 B
74 +502 B
75 +503 B
76 +504 B
77 +505 B
78 +506 B
79 +507 B
80 +540 B
81 +541 B
82 +542 B
83 +571 B
84 +600 B
85 +601 B
86 +602 B
87 +603 B
88 +604 B
89 +605 B
90 +606 B
91 +640 B
92 +641 B
93 +643 B
94 +650 B
95 +651 B
96 +652 B
97 +653 B
98 +654 B
99 +661 B
100 +662 B
101 +670 B
102 +672 B
103 +673 B
104 +674 B
105 +700 B
106 +701 B
107 +702 B
108 +704 B
109 +705 B
110 +707 B
111 +708 B
112 +710 B
113 +720 B
114 +721 B
115 +740 B
116 +741 B
117 +750 B
118 +751 B
119 +752 B
120 +753 B
121 +761 B
122 +771 B
123 +773 B
124 +774 B
125 +0017 G
126 +1014 G
127 +1017 G
128 +1020 G
129 +1111 G
130 +1113 G
131 +1114 G
132 +1115 G
133 +1116 G
134 +1119 G
135 +1120 G
136 +1122 G
137 +1124 G
138 +1126 G
139 +1127 G
140 +1128 G
141 +1129 G
142 +1130 G
143 +1131 G
144 +1132 G
145 +1133 G
146 +1135 G
147 +1136 G
148 +1137 G
149 +1138 G
150 +1139 G
151 +1140 G
152 +1141 G
153 +1142 G
154 +1143 G
155 +1144 G
156 +1154 G
157 +1155 G
158 +1156 G
159 +1162 G
160 +1164 G
161 +1165 G
162 +1167 G
163 +1213 G
164 +1218 G
165 +1221 G
166 +1222 G
167 +1224 G
168 +1226 G
169 +1227 G
170 +1711 G
171 +2012 G
172 +2013 G
173 +2014 G
174 +2015 G
175 +2016 G
176 +2112 G
177 +2113 G
178 +2114 G
179 +2115 G
180 +2211 G
181 +2221 G
182 +2222 G
183 +2224 G
184 +2227 G
185 +2230 G
186 +2233 G
187 +2234 G
188 +2235 G
189 +2311 G
190 +2312 G
191 +2412 G
192 +2413 G
193 +2415 G
194 +8221 G
195 +3011 G
196 +3012 G
197 +3212 G
198 +3214 G
199 +3216 G
200 +3217 G
201 +3220 G
202 +3313 G
203 +3314 G
204 +3315 G
205 +3316 G
206 +3317 G
207 +3318 G
208 +3319 G
209 +3321 G
210 +3322 G
211 +3411 G
212 +3412 G
213 +3413 G
214 +3414 G
215 +3416 G
216 +3417 G
217 +3422 G
218 +3425 G
219 +3426 G
220 +8331 G
221 +4211 G
222 +4212 G
223 +4318 G
224 +4319 G
225 +4412 G
226 +4419 G
227 +4432 G
228 +4433 G
229 +4435 G
230 +8441 G
231 +5012 G
232 +5413 G
233 +5511 G
234 +5513 G
235 +5515 G
236 +5516 G
237 +5517 G
238 +5519 G
239 +5522 G
240 +5523 G
241 +5524 G
242 +5525 G
243 +5528 G
244 +5530 G
245 +5531 G
246 +5534 G
247 +5535 G
248 +5536 G
249 +5537 G
250 +5615 G
251 +5616 G
252 +5617 G
253 +5618 G
254 +5619 G
255 +5620 G
256 +5621 G
257 +5623 G
258 +5624 G
259 +5625 G
260 +5626 G
261 +5627 G
262 +5630 G
263 +5633 G
264 +5712 G
265 +5713 G
266 +5714 G
267 +8541 G
268 +8551 G
269 +8552 G
270 +6211 G
271 +6411 G
272 +6511 G
273 +6512 G
274 +6513 G
275 +6514 G
276 +6515 G
277 +6516 G
278 +6611 G
279 +6613 G
280 +6614 G
281 +6615 G
282 +6616 G
283 +6617 G
284 +6620 G
285 +6623 G
286 +6624 G
287 +6625 G
288 +6627 G
289 +6628 G
290 +6629 G
291 +6630 G
292 +6631 G
293 +6632 G
294 +6635 G
295 +6637 G
296 +6638 G
297 +6640 G
298 +6642 G
299 +6645 G
300 +6647 G
301 +6648 G
302 +6649 G
303 +6654 G
304 +6657 G
305 +6712 G
306 +6714 G
307 +6715 G
308 +6716 G
309 +7011 G
310 +7013 G
311 +7016 G
312 +7017 G
313 +7018 G
314 +7019 G
315 +7021 G
316 +7022 G
317 +7024 G
318 +7025 G
319 +7211 G
320 +7212 G
321 +7611 G
322 +7612 G
323 +7613 G
324 +7711 G
325 +7713 G
326 +7715 G
327 +7719 G
328 +7720 G
329 +7722 G
330 +7723 G
331 +7726 G
332 +7727 G
333 +7728 G
334 +7730 G
335 +7734 G
336 +7737 G
337 +7738 G
338 +7739 G
339 +8761 G
340 +8771 G
341 +8772 G
342 +8774 G
343 +8777 G
344 +9401 R
345 +9403 R
346 +9404 R
347 +9408 R
348 +9701 R
349 +9703 R
350 +9707 R
351 +9709 R
352 +9711A R
353 +9714 R
354 +N13 N
355 +N15 N
356 +N16 N
357 +N26 N
358 +N30 N
359 +N37 N
360 +N61 N
361 +N62 N
362 +N65 N
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html>
2 -<html>
3 -<head>
4 - <title>대여화면2</title>
5 -</head>
6 -<style>
7 -body {
8 - background-color: rgb(230, 243, 255);
9 -}
10 -img {
11 - display:block;
12 - margin:auto;
13 -}
14 -input[type=text] {
15 - width: 300px;
16 - box-sizing: border-box;
17 - border: 3px solid lightgray;
18 - border-radius: 4px;
19 - font-size: 16px;
20 - background-color: rgb(230, 243, 255);
21 - background-image: searchicon.png;
22 - background-position: 10px 10px;
23 - background-repeat: no-repeat;
24 - padding: 12px 20px 12px 40px;
25 - -webkit-transition: width 0.4s ease-in-out;
26 - transition: width 0.4s ease-in-out;
27 -}
28 -
29 -input[type=text]:focus {
30 - width: 50%;
31 -}
32 -#btn1 {
33 - width: 300px;
34 - height: 50px;
35 - font-size:25px;
36 - font-family: '배달의민족 도현';
37 - color: gray;
38 - background: white;
39 - border: solid 5px white;
40 - border-radius: 5px;
41 -}
42 -
43 -</style>
44 -
45 -<body>
46 -
47 -<br><br>
48 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/>
49 -<form>
50 -
51 -<br>
52 -
53 -<center><input type="text" name="search" placeholder="Search.."><image width="30px"src="searchicon.png"></center><br>
54 -
55 -<center><button id="btn1">강의실</button></center><br>
56 -<center><button id="btn1">회의 공간</button></center><br>
57 -<center><button id="btn1">체육 시설</button></center><br>
58 -<center><button id="btn1">예술 / 문화 시설</button></center>
59 -
60 -<img width="100;" height="70;" align="bottom;" src="khu.png"/>
61 -
62 -</form>
63 -
64 -
65 -
66 -</body>
67 -
68 -</html>
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html>
2 -<html>
3 -<head>
4 - <title>처음화면</title>
5 -</head>
6 -<style>
7 -body {
8 - background-color: rgb(230, 243, 255);
9 -}
10 -img {
11 - display:block;
12 - margin:auto;
13 - border-radius: 50%;
14 - width: 350px;
15 - height: 340px;
16 -}
17 -
18 -</style>
19 -
20 -<body>
21 -
22 -<br><br><br><br><br>
23 -<img src="캡처5.png"/>
24 -
25 -</body>
26 -
27 -</html>
...\ No newline at end of file ...\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
1 +language: node_js
2 +node_js:
3 + - "8"
4 +before_script:
5 + - "export DISPLAY=:99.0"
6 + - "sh -e /etc/init.d/xvfb start"
7 + - sleep 3 # give xvfb some time to start
...\ No newline at end of file ...\ No newline at end of file
1 +Copyright (c) 2013 http://xdsoft.net
2 +
3 +Permission is hereby granted, free of charge, to any person obtaining a copy
4 +of this software and associated documentation files (the "Software"), to deal
5 +in the Software without restriction, including without limitation the rights
6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 +copies of the Software, and to permit persons to whom the Software is
8 +furnished to do so, subject to the following conditions:
9 +
10 +The above copyright notice and this permission notice shall be included in
11 +all copies or substantial portions of the Software.
12 +
13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 +THE SOFTWARE.
...\ No newline at end of file ...\ No newline at end of file
1 +# jQuery DateTimePicker
2 +[Demo and Documentation](https://xdsoft.net/jqplugins/datetimepicker/)
3 +
4 +[![Build Status](https://travis-ci.org/xdan/datetimepicker.svg?branch=master)](https://travis-ci.org/xdan/datetimepicker)
5 +[![npm version](https://badge.fury.io/js/jquery-datetimepicker.svg)](https://badge.fury.io/js/jquery-datetimepicker)
6 +[![npm](https://img.shields.io/npm/dm/jquery-datetimepicker.svg)](https://www.npmjs.com/package/jquery-datetimepicker)
7 +
8 +
9 +
10 +PLEASE. Help me update documentation.
11 +[Doc.tpl](https://github.com/xdan/datetimepicker/blob/master/doc.tpl)
12 +This file will be automatically displayed on the site
13 +
14 +# Installation
15 +
16 +```bash
17 +npm install jquery-datetimepicker
18 +```
19 +OR
20 +```bash
21 +yarn add jquery-datetimepicker
22 +```
23 +or download [zip](https://github.com/xdan/datetimepicker/releases)
24 +# datetimepicker
25 +==============
26 +
27 +**!!! The latest version of the options 'lang' obsolete. The language setting is now global. !!!**
28 +
29 +Use this:
30 +```javascript
31 +jQuery.datetimepicker.setLocale('en');
32 +```
33 +[Documentation][doc]
34 +
35 +jQuery Plugin Date and Time Picker
36 +
37 +DateTimePicker
38 +
39 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/1.png)
40 +
41 +DatePicker
42 +
43 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/2.png)
44 +
45 +TimePicker
46 +
47 +![ScreenShot](https://raw.github.com/xdan/datetimepicker/master/screen/3.png)
48 +
49 +Options to highlight individual dates or periods
50 +
51 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/4.png)
52 +
53 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/5.png)
54 +
55 +![ScreenShot](https://raw.github.com/Mingpao/datetimepicker/master/screen/6.png)
56 +
57 +[doc]: https://xdsoft.net/jqplugins/datetimepicker/
58 +
59 +### JS Build help
60 +
61 +**Requires Node and NPM** [Download and install node.js](http://nodejs.org/download/).
62 +
63 +Install:
64 +
65 +1. Install `bower` globally with `npm install -g bower`.
66 +2. Run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies.
67 +3. Run `bower install`, which installs front-end packages defined in `bower.json`.
68 +
69 +Notice: If you use Bower v1.5.2, you will get error: `The "main" field cannot contain minified files`
70 +You can regress to version 1.3.12
71 +
72 +1. `npm uninstall bower -g`
73 +2. `npm install -g bower@1.3.12`
74 +
75 +Build:
76 +
77 +First install npm requirements: `npm install -g uglifycss concat-cli`
78 +Then build the files: `npm run build`
79 +
80 +When build completed, you'll have the following files:
81 +- **build/jquery.datetimepicker.full.js** - browser file
82 +- **build/jquery.datetimepicker.full.min.js** - browser minified file
83 +- **build/jquery.datetimepicker.min.js** - amd module style minified file
1 +{
2 + "name": "datetimepicker",
3 + "version": "2.5.11",
4 + "main": [
5 + "build/jquery.datetimepicker.full.min.js",
6 + "jquery.datetimepicker.css"
7 + ],
8 + "ignore": [
9 + "**/screen",
10 + "**/datetimepicker.jquery.json",
11 + "**/*.png",
12 + "**/*.txt",
13 + "**/*.md",
14 + "**/*.html",
15 + "**/*.tpl",
16 + "**/jquery.js",
17 + "bower_components",
18 + "node_modules"
19 + ],
20 + "keywords": [
21 + "calendar",
22 + "date",
23 + "time",
24 + "form",
25 + "datetime",
26 + "datepicker",
27 + "timepicker",
28 + "datetimepicker",
29 + "validation",
30 + "ui",
31 + "scroller",
32 + "picker",
33 + "i18n",
34 + "input",
35 + "jquery",
36 + "touch"
37 + ],
38 + "authors": [
39 + {
40 + "name": "Chupurnov Valeriy",
41 + "email": "chupurnov@gmail.com",
42 + "homepage": "http://xdsoft.net/contacts.html"
43 + }
44 + ],
45 + "dependencies": {
46 + "jquery": ">= 1.7.2",
47 + "jquery-mousewheel": ">= 3.1.13",
48 + "php-date-formatter": ">= 1.3.3"
49 + },
50 + "license": "MIT",
51 + "homepage": "http://xdsoft.net/jqplugins/datetimepicker/",
52 + "repository": {
53 + "type": "git",
54 + "url": "git://github.com:xdan/datetimepicker.git"
55 + }
56 +}
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +{
2 + "name": "datetimepicker",
3 + "version": "2.5.4",
4 + "title": "jQuery Date and Time picker",
5 + "description": "jQuery plugin for date, time, or datetime manipulation in form",
6 + "keywords": [
7 + "calendar",
8 + "date",
9 + "time",
10 + "form",
11 + "datetime",
12 + "datepicker",
13 + "timepicker",
14 + "datetimepicker",
15 + "validation",
16 + "ui",
17 + "scroller",
18 + "picker",
19 + "i18n",
20 + "input",
21 + "jquery",
22 + "touch"
23 + ],
24 + "author": {
25 + "name": "Chupurnov Valeriy",
26 + "email": "chupurnov@gmail.com",
27 + "url": "http://xdsoft.net/contacts.html"
28 + },
29 + "maintainers": [{
30 + "name": "Chupurnov Valeriy",
31 + "email": "chupurnov@gmail.com",
32 + "url": "http://xdsoft.net"
33 + }],
34 + "licenses": [
35 + {
36 + "type": "MIT",
37 + "url": "https://github.com/xdan/datetimepicker/blob/master/MIT-LICENSE.txt"
38 + }
39 + ],
40 + "bugs": "https://github.com/xdan/datetimepicker/issues",
41 + "homepage": "http://xdsoft.net/jqplugins/datetimepicker/",
42 + "docs": "http://xdsoft.net/jqplugins/datetimepicker/",
43 + "download": "https://github.com/xdan/datetimepicker/archive/master.zip",
44 + "dependencies": {
45 + "jquery": ">=1.7"
46 + }
47 +}
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 +<!DOCTYPE html>
2 +<html lang="en">
3 +<head>
4 +<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
5 +<link rel="stylesheet" type="text/css" href="./jquery.datetimepicker.css"/>
6 +<style type="text/css">
7 +
8 +.custom-date-style {
9 + background-color: red !important;
10 +}
11 +
12 +.input{
13 +}
14 +.input-wide{
15 + width: 500px;
16 +}
17 +
18 +</style>
19 +</head>
20 +<body>
21 +
22 + <p><a href="http://xdsoft.net/jqplugins/datetimepicker/">Homepage</a></p>
23 + <h3>DateTimePicker</h3>
24 + <input type="text" value="" id="datetimepicker"/><br><br>
25 + <h3>DateTimePickers selected by class</h3>
26 + <input type="text" class="some_class" value="" id="some_class_1"/>
27 + <input type="text" class="some_class" value="" id="some_class_2"/>
28 + <h3>Mask DateTimePicker</h3>
29 + <input type="text" value="" id="datetimepicker_mask"/><br><br>
30 + <h3>TimePicker</h3>
31 + <input type="text" id="datetimepicker1"/><br><br>
32 + <h3>DatePicker</h3>
33 + <input type="text" id="datetimepicker2"/><br><br>
34 + <h3>Inline DateTimePicker</h3>
35 + <!--<div id="console" style="background-color:#fff;color:red">sdfdsfsdf</div>-->
36 + <input type="text" id="datetimepicker3"/><input type="button" onclick="$('#datetimepicker3').datetimepicker({value:'2011/12/11 12:00'})" value="set inline value 2011/12/11 12:00"/><br><br>
37 + <h3>Button Trigger</h3>
38 + <input type="text" value="2013/12/03 18:00" id="datetimepicker4"/><input id="open" type="button" value="open"/><input id="close" type="button" value="close"/><input id="reset" type="button" value="reset"/>
39 + <h3>TimePicker allows time</h3>
40 + <input type="text" id="datetimepicker5"/><br><br>
41 + <h3>Destroy DateTimePicker</h3>
42 + <input type="text" id="datetimepicker6"/><input id="destroy" type="button" value="destroy"/>
43 + <h3>Set options runtime DateTimePicker</h3>
44 + <input type="text" id="datetimepicker7"/>
45 + <p>If select day is Saturday, the minimum set 11:00, otherwise 8:00</p>
46 + <h3>onGenerate</h3>
47 + <input type="text" id="datetimepicker8"/>
48 + <h3>disable all weekend</h3>
49 + <input type="text" id="datetimepicker9"/>
50 + <h3>Default date and time </h3>
51 + <input type="text" id="default_datetimepicker"/>
52 + <h3>Show inline</h3>
53 + <a href="javascript:void(0)" onclick="var si = document.getElementById('show_inline').style; si.display = (si.display=='none')?'block':'none';return false; ">Show/Hide</a>
54 + <div id="show_inline" style="display:none">
55 + <input type="text" id="datetimepicker10"/>
56 + </div>
57 + <h3>Disable Specific Dates</h3>
58 + <p>Disable the dates 2 days from now.</p>
59 + <input type="text" id="datetimepicker11"/>
60 + <h3>Custom Date Styling</h3>
61 + <p>Make the background of the date 2 days from now bright red.</p>
62 + <input type="text" id="datetimepicker12"/>
63 + <h3>Dark theme</h3>
64 + <p>thank for this <a href="https://github.com/lampslave">https://github.com/lampslave</a></p>
65 + <input type="text" id="datetimepicker_dark"/>
66 + <h3>Date time format and locale</h3>
67 + <p></p>
68 + <select id="datetimepicker_format_locale">
69 + <option value="en">English</option>
70 + <option value="de">German</option>
71 + <option value="ru">Russian</option>
72 + <option value="uk">Ukrainian</option>
73 + <option value="fr">French</option>
74 + <option value="es">Spanish</option>
75 + </select>
76 + <input type="text" value="D, l, M, F, Y-m-d H:i:s" id="datetimepicker_format_value"/>
77 + <input type="button" value="applay =>" id="datetimepicker_format_change"/>
78 + <input type="text" id="datetimepicker_format" class="input input-wide"/>
79 +</body>
80 +<script src="./jquery.js"></script>
81 +<script src="node_modules/php-date-formatter/js/php-date-formatter.min.js"></script>
82 +<script src="node_modules/jquery-mousewheel/jquery.mousewheel.js"></script>
83 +<script src="jquery.datetimepicker.js"></script>
84 +<script>/*
85 +window.onerror = function(errorMsg) {
86 + $('#console').html($('#console').html()+'<br>'+errorMsg)
87 +}*/
88 +
89 +$.datetimepicker.setLocale('en');
90 +
91 +$('#datetimepicker_format').datetimepicker({value:'2015/04/15 05:03', format: $("#datetimepicker_format_value").val()});
92 +console.log($('#datetimepicker_format').datetimepicker('getValue'));
93 +
94 +$("#datetimepicker_format_change").on("click", function(e){
95 + $("#datetimepicker_format").data('xdsoft_datetimepicker').setOptions({format: $("#datetimepicker_format_value").val()});
96 +});
97 +$("#datetimepicker_format_locale").on("change", function(e){
98 + $.datetimepicker.setLocale($(e.currentTarget).val());
99 +});
100 +
101 +$('#datetimepicker').datetimepicker({
102 +dayOfWeekStart : 1,
103 +lang:'en',
104 +disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
105 +startDate: '1986/01/05'
106 +});
107 +$('#datetimepicker').datetimepicker({value:'2015/04/15 05:03', step:10});
108 +
109 +$('.some_class').datetimepicker();
110 +
111 +$('#default_datetimepicker').datetimepicker({
112 + formatTime:'H:i',
113 + formatDate:'d.m.Y',
114 + //defaultDate:'8.12.1986', // it's my birthday
115 + defaultDate:'+03.01.1970', // it's my birthday
116 + defaultTime:'10:00',
117 + timepickerScrollbar:false
118 +});
119 +
120 +$('#datetimepicker10').datetimepicker({
121 + step:5,
122 + inline:true
123 +});
124 +$('#datetimepicker_mask').datetimepicker({
125 + mask:'9999/19/39 29:59'
126 +});
127 +
128 +$('#datetimepicker1').datetimepicker({
129 + datepicker:false,
130 + format:'H:i',
131 + step:5
132 +});
133 +$('#datetimepicker2').datetimepicker({
134 + yearOffset:222,
135 + lang:'ch',
136 + timepicker:false,
137 + format:'d/m/Y',
138 + formatDate:'Y/m/d',
139 + minDate:'-1970/01/02', // yesterday is minimum date
140 + maxDate:'+1970/01/02' // and tommorow is maximum date calendar
141 +});
142 +$('#datetimepicker3').datetimepicker({
143 + inline:true
144 +});
145 +$('#datetimepicker4').datetimepicker();
146 +$('#open').click(function(){
147 + $('#datetimepicker4').datetimepicker('show');
148 +});
149 +$('#close').click(function(){
150 + $('#datetimepicker4').datetimepicker('hide');
151 +});
152 +$('#reset').click(function(){
153 + $('#datetimepicker4').datetimepicker('reset');
154 +});
155 +$('#datetimepicker5').datetimepicker({
156 + datepicker:false,
157 + allowTimes:['12:00','13:00','15:00','17:00','17:05','17:20','19:00','20:00'],
158 + step:5
159 +});
160 +$('#datetimepicker6').datetimepicker();
161 +$('#destroy').click(function(){
162 + if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){
163 + $('#datetimepicker6').datetimepicker('destroy');
164 + this.value = 'create';
165 + }else{
166 + $('#datetimepicker6').datetimepicker();
167 + this.value = 'destroy';
168 + }
169 +});
170 +var logic = function( currentDateTime ){
171 + if (currentDateTime && currentDateTime.getDay() == 6){
172 + this.setOptions({
173 + minTime:'11:00'
174 + });
175 + }else
176 + this.setOptions({
177 + minTime:'8:00'
178 + });
179 +};
180 +$('#datetimepicker7').datetimepicker({
181 + onChangeDateTime:logic,
182 + onShow:logic
183 +});
184 +$('#datetimepicker8').datetimepicker({
185 + onGenerate:function( ct ){
186 + $(this).find('.xdsoft_date')
187 + .toggleClass('xdsoft_disabled');
188 + },
189 + minDate:'-1970/01/2',
190 + maxDate:'+1970/01/2',
191 + timepicker:false
192 +});
193 +$('#datetimepicker9').datetimepicker({
194 + onGenerate:function( ct ){
195 + $(this).find('.xdsoft_date.xdsoft_weekend')
196 + .addClass('xdsoft_disabled');
197 + },
198 + weekends:['01.01.2014','02.01.2014','03.01.2014','04.01.2014','05.01.2014','06.01.2014'],
199 + timepicker:false
200 +});
201 +var dateToDisable = new Date();
202 + dateToDisable.setDate(dateToDisable.getDate() + 2);
203 +$('#datetimepicker11').datetimepicker({
204 + beforeShowDay: function(date) {
205 + if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
206 + return [false, ""]
207 + }
208 +
209 + return [true, ""];
210 + }
211 +});
212 +$('#datetimepicker12').datetimepicker({
213 + beforeShowDay: function(date) {
214 + if (date.getMonth() == dateToDisable.getMonth() && date.getDate() == dateToDisable.getDate()) {
215 + return [true, "custom-date-style"];
216 + }
217 +
218 + return [true, ""];
219 + }
220 +});
221 +$('#datetimepicker_dark').datetimepicker({theme:'dark'})
222 +
223 +
224 +</script>
225 +</html>
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +module.exports = function(config) {
2 + config.set({
3 + basePath: '',
4 + frameworks: ['mocha', 'chai'],
5 + files: [
6 + 'jquery.datetimepicker.css',
7 + 'node_modules/php-date-formatter/js/php-date-formatter.js',
8 + 'jquery.js',
9 + 'jquery.datetimepicker.js',
10 + 'tests/bootstrap.js',
11 + 'tests/tests/*.js'
12 + ],
13 + reporters: ['progress'],
14 + port: 9876,
15 + colors: true,
16 + logLevel: config.LOG_INFO,
17 + browsers: ['Firefox'],
18 + autoWatch: true,
19 + singleRun: false, // Karma captures browsers, runs the tests and exits
20 + concurrency: Infinity,
21 + plugins: [
22 + 'karma-firefox-launcher',
23 + 'karma-mocha',
24 + 'karma-chai'
25 + ],
26 + client: {
27 + captureConsole: true
28 + }
29 + })
30 +};
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +{
2 + "name": "jquery-datetimepicker",
3 + "version": "2.5.20",
4 + "description": "jQuery Plugin DateTimePicker it is DatePicker and TimePicker in one",
5 + "main": "build/jquery.datetimepicker.full.min.js",
6 + "scripts": {
7 + "test": "karma start --browsers Firefox karma.conf.js --single-run",
8 + "concat": "concat-cli -f node_modules/php-date-formatter/js/php-date-formatter.min.js jquery.datetimepicker.js node_modules/jquery-mousewheel/jquery.mousewheel.js -o build/jquery.datetimepicker.full.js",
9 + "minify": "uglifyjs jquery.datetimepicker.js -c -m -o build/jquery.datetimepicker.min.js && uglifycss jquery.datetimepicker.css > build/jquery.datetimepicker.min.css",
10 + "minifyconcat": "uglifyjs build/jquery.datetimepicker.full.js -c -m -o build/jquery.datetimepicker.full.min.js",
11 + "github": "git add --all && git commit -m \"New version %npm_package_version% \" && git tag %npm_package_version% && git push --tags origin HEAD:master && npm publish",
12 + "build": "npm run minify && npm run concat && npm run minifyconcat",
13 + "public": "npm run test && npm version patch --no-git-tag-version && npm run build && npm run github"
14 + },
15 + "repository": {
16 + "type": "git",
17 + "url": "https://github.com/xdan/datetimepicker.git"
18 + },
19 + "keywords": [
20 + "jquery-plugin",
21 + "calendar",
22 + "date",
23 + "time",
24 + "datetime",
25 + "datepicker",
26 + "timepicker"
27 + ],
28 + "author": "Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)",
29 + "license": "MIT",
30 + "bugs": {
31 + "url": "https://github.com/xdan/datetimepicker/issues"
32 + },
33 + "homepage": "https://github.com/xdan/datetimepicker",
34 + "dependencies": {
35 + "jquery": ">= 1.7.2",
36 + "jquery-mousewheel": ">= 3.1.13",
37 + "php-date-formatter": "^1.3.4"
38 + },
39 + "devDependencies": {
40 + "chai": "^4.1.2",
41 + "concat": "azer/concat",
42 + "concat-cli": "^4.0.0",
43 + "karma": "^2.0.0",
44 + "karma-chai": "^0.1.0",
45 + "karma-firefox-launcher": "^1.1.0",
46 + "karma-mocha": "^1.3.0",
47 + "mocha": "^5.0.4",
48 + "uglifycss": "^0.0.27",
49 + "uglifyjs": "^2.4.10"
50 + }
51 +}
1 +<!doctype html>
2 +<html>
3 +<head>
4 + <meta charset="UTF-8"/>
5 + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
6 + <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
7 + <title>jQuery DateTimepicker Tests </title>
8 + <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
9 +</head>
10 +<body>
11 +<div id="mocha"></div>
12 +
13 +<script src="../node_modules/mocha/mocha.js"></script>
14 +<script src="../node_modules/chai/chai.js"></script>
15 +
16 +<script>
17 + mocha.ui('bdd');
18 + mocha.reporter('html');
19 +</script>
20 +
21 +<link rel="stylesheet" href="./app.css" />
22 +<link rel="stylesheet" href="../jquery.datetimepicker.css" />
23 +<script src="../jquery.js"></script>
24 +
25 +<script src="../node_modules/php-date-formatter/js/php-date-formatter.js"></script>
26 +<script src="../jquery.datetimepicker.js"></script>
27 +
28 +<script src="./tests/bootstrap.js"></script>
29 +<script src="./tests/init.js"></script>
30 +<script src="./tests/destroy.js"></script>
31 +<script src="./tests/options.js"></script>
32 +<script src="./tests/methods.js"></script>
33 +<script src="./tests/events.js"></script>
34 +
35 +<script>
36 + window.onload = function() {
37 + if (window.mochaPhantomJS) {
38 + mochaPhantomJS.run();
39 + } else {
40 + mocha.run();
41 + }
42 + };
43 +</script>
44 +</body>
45 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +var inputs = [];
2 +
3 +var box = document.createElement('div');
4 +document.body.appendChild(box);
5 +
6 +
7 +var getInput = function () {
8 + var input = document.createElement('input');
9 + input.setAttribute('type', 'text');
10 + inputs.push(input);
11 + box.appendChild(input);
12 + return input;
13 +};
14 +
15 +var clear = function() {
16 + inputs.forEach(function (inp) {
17 + $(inp).datetimepicker('destroy');
18 + inp.parentNode && inp.parentNode.removeChild(inp)
19 + });
20 +};
21 +
22 +var PICKER = 'xdsoft_datetimepicker';
23 +
24 +var simulateEvent = function (type, element, keyCodeArg, options) {
25 + if (!keyCodeArg) {
26 + keyCodeArg = 0;
27 + }
28 +
29 + if (element instanceof jQuery) {
30 + element = element[0];
31 + }
32 +
33 + var evt = (element.ownerDocument || document).createEvent('HTMLEvents')
34 + evt.initEvent(type, true, true);
35 + evt.keyCode = keyCodeArg;
36 + evt.which = keyCodeArg;
37 +
38 + if (options) {
39 + options(evt);
40 + }
41 +
42 + if (type.match(/^mouse/)) {
43 + ['pageX', 'pageY', 'clientX', 'clientY'].forEach(function (key) {
44 + if (evt[key] === undefined) {
45 + evt[key] = 0;
46 + }
47 + })
48 + }
49 +
50 + element.dispatchEvent(evt);
51 +};
52 +
53 +afterEach(clear);
54 +var expect = chai.expect;
55 +chai.config.includeStack = true
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Check destructor', function () {
2 + describe('Init picker and after this init again with command destroy', function () {
3 + it('Should remove picker from DOM and remove all listeners from original input', function (done) {
4 + var input = getInput();
5 + $(input).datetimepicker();
6 + var dtp = $(input).data('xdsoft_datetimepicker');
7 + expect(dtp).to.be.not.equal(null);
8 + expect(dtp[0].tagName).to.be.equal('DIV');
9 + expect(dtp[0].classList.contains('xdsoft_datetimepicker')).to.be.true;
10 + expect(dtp.is(':hidden')).to.be.true;
11 +
12 + $(input).datetimepicker('destroy');
13 + expect($(input).data('xdsoft_datetimepicker')).to.be.equal(null);
14 +
15 + $(input).trigger('mousedown')
16 + setTimeout(function () {
17 + expect(dtp.is(':hidden')).to.be.true;
18 + done();
19 + }, 150)
20 + });
21 + });
22 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test events', function () {
2 + describe('onSelectDate', function () {
3 + it('Should fired after user selected day', function (done) {
4 + var input= $(getInput()).val('2011/04/15');
5 +
6 + var picker = input.datetimepicker({
7 + onSelectDate: function (time, inp, evt) {
8 + expect(picker).to.be.equal(this);
9 + expect(time.getDate()).to.be.equal(17);
10 + expect(time.getMonth()).to.be.equal(3);
11 + expect(time.getFullYear()).to.be.equal(2011);
12 + expect(inp[0]).to.be.equal(input[0]);
13 + expect(evt.type).to.be.equal('click');
14 + done();
15 + },
16 + format: 'Y/m/d'
17 + }).trigger('mousedown').data(PICKER);
18 +
19 + setTimeout(function () {
20 + var select = picker.find('td[data-date="17"][data-month="3"][data-year="2011"]');
21 + expect(select.length).to.be.equal(1);
22 + select.trigger('click');
23 + }, 100);
24 + });
25 + });
26 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Init', function () {
2 + describe('jQuery.fn', function () {
3 + it('Should have datetimepicker method', function () {
4 + expect(typeof jQuery.fn.datetimepicker).to.be.equal('function');
5 + expect(typeof $.fn.datetimepicker).to.be.equal('function');
6 + });
7 + });
8 + describe('jQuery.fn.datetimepicker', function () {
9 + it('Should have `defaults` property', function () {
10 + expect(typeof jQuery.fn.datetimepicker.defaults).to.be.equal('object');
11 + expect(jQuery.fn.datetimepicker.defaults.format).to.be.equal('Y/m/d H:i');
12 + });
13 + });
14 + describe('Create datetimepicker', function () {
15 + describe('Without parameters', function () {
16 + it('Should create plugin with default options', function (done) {
17 + var input = getInput();
18 + $(input).datetimepicker();
19 + var dtp = $(input).data('xdsoft_datetimepicker');
20 + expect(dtp).to.be.not.equal(null);
21 + expect(dtp[0].tagName).to.be.equal('DIV');
22 + expect(dtp[0].classList.contains('xdsoft_datetimepicker')).to.be.true;
23 + expect(dtp.is(':hidden')).to.be.true;
24 + $(input).trigger('mousedown')
25 + setTimeout(function () {
26 + expect(dtp.is(':hidden')).to.be.false;
27 + done();
28 + }, 150)
29 + });
30 + });
31 + describe('In inline mode', function () {
32 + it('Should create picker and replace original input', function () {
33 + var input = getInput();
34 + $(input).datetimepicker({
35 + inline: true
36 + });
37 + var dtp = $(input).data('xdsoft_datetimepicker');
38 + expect(dtp.is(':hidden')).to.be.false;
39 + expect($(input).is(':hidden')).to.be.true;
40 + });
41 + });
42 + });
43 + describe('Set locale', function () {
44 + describe('Change locale', function () {
45 + it('Should create different pickers fro all locales', function (done) {
46 + $.datetimepicker.setLocale('en');
47 + var $input = $(getInput());
48 + $input.datetimepicker({inline: true});
49 + setTimeout(function () {
50 + var text = $input.data('xdsoft_datetimepicker').text();
51 + $input.datetimepicker('destroy');
52 + $.datetimepicker.setLocale('ru');
53 + $input.datetimepicker({inline: true});
54 + setTimeout(function () {
55 + expect($input.data('xdsoft_datetimepicker').text()).to.be.not.equal(text);
56 + done();
57 + }, 100)
58 + }, 100)
59 + });
60 + });
61 + });
62 + describe('Select day', function () {
63 + it('Should set selected date to input by format', function (done) {
64 + var input= $(getInput()).val('2011/04/15');
65 +
66 + var picker = input.datetimepicker({
67 + format: 'Y/m/d'
68 + }).trigger('mousedown').data(PICKER);
69 +
70 + setTimeout(function () {
71 + var start = picker.find('td[data-date="15"][data-month="3"][data-year="2011"]');
72 + expect(start.length).to.be.equal(1);
73 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
74 + expect(start.hasClass('xdsoft_current')).to.be.true;
75 + var select = picker.find('td[data-date="17"][data-month="3"][data-year="2011"]');
76 + expect(start.length).to.be.equal(1);
77 + select.trigger('click');
78 + expect(input.val()).to.be.equal('2011/04/17')
79 + done();
80 + }, 100);
81 + });
82 + });
83 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test methods', function () {
2 + describe('Show', function () {
3 + it('Should show picker', function () {
4 + var input= $(getInput());
5 + var picker = input
6 + .datetimepicker()
7 + .datetimepicker('show')
8 + .data(PICKER);
9 +
10 + expect(picker.is(':hidden')).to.be.false;
11 + });
12 + });
13 + describe('Hide', function () {
14 + it('Should hide picker', function () {
15 + var input= $(getInput());
16 + var picker = input
17 + .datetimepicker()
18 + .datetimepicker('show')
19 + .data(PICKER);
20 +
21 + expect(picker.is(':hidden')).to.be.false;
22 + input.datetimepicker('hide')
23 + expect(picker.is(':hidden')).to.be.true;
24 + });
25 + });
26 + describe('Toggle', function () {
27 + it('Should hide/show picker', function () {
28 + var input= $(getInput());
29 + var picker = input
30 + .datetimepicker()
31 + .datetimepicker('show')
32 + .data(PICKER);
33 +
34 + expect(picker.is(':hidden')).to.be.false;
35 + input.datetimepicker('toggle')
36 + expect(picker.is(':hidden')).to.be.true;
37 + input.datetimepicker('toggle')
38 + expect(picker.is(':hidden')).to.be.false;
39 + });
40 + });
41 + describe('Reset', function () {
42 + it('Should restore default value', function (done) {
43 + var input= $('<input type="text" value="15.12.2008"/>').appendTo(document.body);
44 +
45 + var picker = input
46 + .datetimepicker({format: 'd.m.Y'})
47 + .datetimepicker('show')
48 + .data(PICKER);
49 +
50 + setTimeout(function () {
51 + var select = picker.find('td[data-date="16"][data-month="11"][data-year="2008"]');
52 + expect(select.length).to.be.equal(1);
53 + select.trigger('click');
54 + expect(input.val()).to.be.equal('16.12.2008');
55 + input.datetimepicker('reset');
56 + expect(input.val()).to.be.equal('15.12.2008');
57 + input.datetimepicker('destroy').remove();
58 + done();
59 + }, 100)
60 + });
61 + });
62 +});
...\ No newline at end of file ...\ No newline at end of file
1 +describe('Test options', function () {
2 + describe('dayOfWeekStart', function () {
3 + it('Should change default start of week', function (done) {
4 + $.datetimepicker.setLocale('en');
5 + var input = $(getInput());
6 + var picker = input.datetimepicker({inline: true}).trigger('mousedown').data('xdsoft_datetimepicker');
7 + setTimeout(function () {
8 + var day = picker.find('th').eq(0).text();
9 + var date = picker.find('td').eq(0).text();
10 + input.datetimepicker('destroy');
11 +
12 + var picker2 = $(getInput()).datetimepicker({
13 + inline: true,
14 + dayOfWeekStart: 2
15 + }).trigger('mousedown').data(PICKER);
16 +
17 + setTimeout(function () {
18 + expect(picker2.find('th').eq(0).text()).to.be.not.equal(day);
19 + expect(picker2.find('td').eq(0).text()).to.be.not.equal(date);
20 + done();
21 + }, 100);
22 + }, 100);
23 + });
24 + });
25 + describe('disabledDates and startDate', function () {
26 + it('Should disable some dates in picker and picker should be open on startDate', function (done) {
27 + var input= $(getInput());
28 + var picker = input.datetimepicker({
29 + disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
30 + startDate: '1986/01/05'
31 + }).trigger('mousedown').data(PICKER);
32 +
33 + setTimeout(function () {
34 + var day = picker.find('td[data-date="8"][data-month="0"][data-year="1986"]');
35 + expect(day.hasClass('xdsoft_disabled')).to.be.true;
36 + var start = picker.find('td[data-date="5"][data-month="0"][data-year="1986"]');
37 + expect(start.length).to.be.equal(1);
38 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
39 + done();
40 + }, 100);
41 + });
42 + });
43 + describe('defaultDate', function () {
44 + it('Should open picker on some date', function (done) {
45 + var input= $(getInput());
46 + var picker = input.datetimepicker({formatDate:'d.m.Y', defaultDate: '+03.01.1970'}).trigger('mousedown').data(PICKER);
47 +
48 + setTimeout(function () {
49 + var now = new Date();
50 + now.setDate(now.getDate() + 2)
51 + var start = picker.find('td[data-date="' + now.getDate() + '"][data-month="' + now.getMonth() + '"][data-year="' + now.getFullYear() + '"]');
52 + expect(start.length).to.be.equal(1);
53 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
54 + expect(start.hasClass('xdsoft_current xdsoft_today')).to.be.true;
55 + done();
56 + }, 100);
57 + });
58 + });
59 + describe('Value', function () {
60 + it('Should set value to plugin', function (done) {
61 + var input= $(getInput());
62 + var picker = input.datetimepicker({value: '2011/04/15 05:03'}).trigger('mousedown').data(PICKER);
63 +
64 + setTimeout(function () {
65 + var start = picker.find('td[data-date="15"][data-month="3"][data-year="2011"]');
66 + expect(start.length).to.be.equal(1);
67 + expect(start.hasClass('xdsoft_disabled')).to.be.false;
68 + done();
69 + }, 100);
70 + });
71 + });
72 + describe('timepicker = false', function () {
73 + it('Should create only datepicker', function (done) {
74 + var input= $(getInput());
75 + var picker = input.datetimepicker({
76 + timepicker: false
77 + }).trigger('mousedown').data(PICKER);
78 +
79 + setTimeout(function () {
80 + var timepicker = picker.find('.xdsoft_timepicker');
81 + expect(timepicker.length).to.be.equal(1);
82 + expect(timepicker.is(':hidden')).to.be.true;
83 + done();
84 + }, 100);
85 + });
86 + });
87 + describe('datepicker = false', function () {
88 + it('Should create only timepicker', function (done) {
89 + var input= $(getInput());
90 + var picker = input.datetimepicker({
91 + datepicker: false
92 + }).trigger('mousedown').data(PICKER);
93 +
94 + setTimeout(function () {
95 + var datepicker = picker.find('.xdsoft_datepicker');
96 + expect(datepicker.length).to.be.equal(1);
97 + expect(datepicker.is(':hidden')).to.be.true;
98 + done();
99 + }, 100);
100 + });
101 + });
102 +});
...\ No newline at end of file ...\ No newline at end of file
1 +@font-face{
2 + font-family: 'MyWebFont';
3 + src: url('WebFont.ttf') format('truetype');
4 +}
...\ No newline at end of file ...\ No newline at end of file
1 +<html>
2 +<head>
3 + <link rel="stylesheet" href="toast.css"/>
4 + <script src="toast.js" charset="utf-8"></script>
5 +</head>
6 +<script type="text/javascript">
7 +function init () {
8 + drawToast("HTML toast likes Android");
9 +}
10 +</script>
11 +<body onload="init();">
12 +</body>
13 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 +#toast{
2 + position: fixed;
3 + top: 80%;
4 + left: 50%;
5 + width: 200px;
6 + background-color: black;
7 + color:white;
8 + margin-left: -100px;
9 + border: 1px solid #666;
10 + padding: 10px 0 ;
11 + text-align:center;
12 + opacity: .9;
13 +
14 +
15 + /* opacity time */
16 + -webkit-transition: opacity 0.5s ease-out;
17 + -moz-transition: opacity 0.5s ease-out;
18 + -ms-transition: opacity 0.5s ease-out;
19 + -o-transition: opacity 0.5s ease-out;
20 + transition: opacity 0.5s ease-out;
21 +
22 + /* round border */
23 + -webkit-border-radius: 10px;
24 + -moz-border-radius: 10px;
25 + border-radius: 10px;
26 +}
...\ No newline at end of file ...\ No newline at end of file
1 +var intervalCounter = 0;
2 +
3 +function hideToast(){
4 + var alert = document.getElementById("toast");
5 + alert.style.opacity = 0;
6 + clearInterval(intervalCounter);
7 +}
8 +
9 +function drawToast(message){
10 +
11 + var alert = document.getElementById("toast");
12 +
13 + if (alert == null){
14 + var toastHTML = '<div id="toast">' + message + '</div>';
15 + document.body.insertAdjacentHTML('beforeEnd', toastHTML);
16 + }
17 + else{
18 + alert.style.opacity = .9;
19 + }
20 +
21 +
22 + intervalCounter = setInterval("hideToast()", 1000);
23 +}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block head %}
3 +
4 +{% endblock %}
5 +{% block style %}
6 +<style>
7 +#btn2 {
8 + width: 150px;
9 + height: 47px;
10 + font-size:25px;
11 + font-family: '배달의민족 도현';
12 + color: gray;
13 + background: white;
14 + border: solid 5px white;
15 + border-radius: 5px;
16 +}
17 +input[type=text] {
18 + width: 60%;
19 + padding: 12px 20px;
20 + box-sizing: border-box;
21 + border: 3px solid #ccc;
22 + -webkit-transition: 0.5s;
23 + transition: 0.5s;
24 + outline: none;
25 + font-family: '배달의민족 도현';
26 + display: inline;
27 + float: right;
28 +}
29 +input[type=text]:focus {
30 + border: 3px solid #555;
31 +}
32 +input[type=password] {
33 + width: 60%;
34 + padding: 12px 20px;
35 + box-sizing: border-box;
36 + border: 3px solid #ccc;
37 + -webkit-transition: 0.5s;
38 + transition: 0.5s;
39 + outline: none;
40 + display: inline;
41 + float: right;
42 +}
43 +input[type=password]:focus {
44 + border: 3px solid #555;
45 +}
46 +select{
47 + width: 60%;
48 + padding: 12px 20px;
49 + box-sizing: border-box;
50 + border: 3px solid #ccc;
51 + -webkit-transition: 0.5s;
52 + transition: 0.5s;
53 + outline: none;
54 + font-family: '배달의민족 도현';
55 + display: inline;
56 + float: right;
57 + border-radius: 5px;
58 +}
59 +h2 {
60 + display: inline;
61 + vertical-align: bottom;
62 +
63 +}
64 +input{
65 +
66 +}
67 +#wrapper {
68 + width: 400px;
69 +
70 +}
71 +
72 +.item{
73 + height: 50px;
74 +
75 +}
76 +
77 +</style>
78 +{% endblock %}
79 +{% block content %}
80 +<a href="/myhome"> <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/></a>
81 +<form action="/join/confirm" method="post">
82 +
83 +<br><br>
84 + <div id="wrapper">
85 + <div class="item"><H2>ID</H2><input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required></div>
86 + <div class="item"><H2>PW</H2><input style="border-radius:10px;" type="password" name="password" placeholder="비밀번호 입력" required><br></div>
87 + <div class="item"><H2>이름</H2><input style="border-radius:10px;" type="text" name="name" placeholder="사용자 이름 입력" required><br></div>
88 + <div class="item"><H2>메일주소</H2><input style="border-radius:10px;" type="text" name="email" placeholder="메일주소 입력" required><br></div>
89 + <div class="item"><H2>전화번호</H2><input style="border-radius:10px;" type="text" name="phone" placeholder="전화번호 입력" required><br></div>
90 + <div class="item"><H2>부서 ID</H2>
91 + <select name="deptid" required><option value="1">전자정보대학</option>
92 + <option value="2">외국어대학</option>
93 + <option value="3">공과대학</option>
94 + <option value="4">예술디자인대학</option>
95 + <option value="5">체육대학</option>
96 + <option value="6">국제대학</option>
97 + <option value="7">대학본부</option></select>
98 + <br></div>
99 +
100 +</div>
101 +<br>
102 +
103 +<center><input type="submit" id="btn2" value="회원가입"></center><br>
104 +
105 +</form>
106 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +<!doctype html>
2 +<html>
3 + <head>
4 + {% block head %}
5 + <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
6 + <title>{% block title %}{% endblock %} - My Webpage</title>
7 + {% endblock %}
8 + </head>
9 +<body>
10 + <div id="content">{% block content %}{% endblock %}</div>
11 + <div id="footer">
12 + {% block footer %}
13 + &copy; Copyright 2010 by <a href="http://domain.invalid/">you</a>.
14 + {% endblock %}
15 + </div>
16 +</body>
...\ No newline at end of file ...\ No newline at end of file
1 -<!DOCTYPE html>
2 -<html>
3 -<head>
4 - <title>로그인화면</title>
5 -</head>
6 -<style>
7 -body {
8 - background-color: rgb(230, 243, 255);
9 -}
10 -img {
11 - display:block;
12 - margin:auto;
13 -}
14 -input[type=text] {
15 - width: 20%;
16 - padding: 12px 20px;
17 - margin: 8px 0;
18 - box-sizing: border-box;
19 - border: 3px solid #ccc;
20 - -webkit-transition: 0.5s;
21 - transition: 0.5s;
22 - outline: none;
23 -}
24 -input[type=text]:focus {
25 - border: 3px solid #555;
26 -}
27 -input[type=password] {
28 - width: 20%;
29 - padding: 12px 20px;
30 - margin: 8px 0;
31 - box-sizing: border-box;
32 - border: 3px solid #ccc;
33 - -webkit-transition: 0.5s;
34 - transition: 0.5s;
35 - outline: none;
36 - margin-right: 7px;
37 -}
38 -input[type=password]:focus {
39 - border: 3px solid #555;
40 -}
41 -#btn1 {
42 - width: 120px;
43 - height: 45px;
44 - font-size:25px;
45 - font-family: '배달의민족 도현';
46 - color: gray;
47 - background: white;
48 - border: solid 5px white;
49 - border-radius: 5px;
50 -}
51 -#btn2 {
52 - width: 150px;
53 - height: 47px;
54 - font-size:25px;
55 - font-family: '배달의민족 도현';
56 - color: gray;
57 - background: white;
58 - border: solid 5px white;
59 - border-radius: 5px;
60 -}
61 -h2 {
62 - font-family: '배달의민족 도현';
63 -}
64 -
65 -</style>
66 -
67 -
68 -<body>
69 -
70 -<br><br>
71 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/>
72 -<form>
73 -
74 -<br>
75 -<center><H2>ID&nbsp;&nbsp;<input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required><br></H2></center>
76 -<center><H2>PW&nbsp;<input style="border-radius:10px;" type="password" name="password" placeholder="비밀번호 입력" required><br></H2></center>
77 -<br>
78 -
79 -<center><button id="btn1">로그인</button></center><br>
80 -<center><button id="btn2">회원가입</button></center><br>
81 -<!--<center><button class="btn;" id="btn;" type="submit;"><img width="120;" height="45;" class="btn-img" src="로그인.png"></button></center><br>
82 -<center><button class="btn;" id="btn;" type="submitl"><img width="150;" height="47;" class="btn-img" src="회원가입.png"></button></center><br>-->
83 -<img width="100;" height="70;" align="bottom;" src="khu.png"/>
84 -
85 -</form>
86 -
87 -
88 -</body>
89 -
90 -</html>
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block title %}Select Menu{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +body {
9 + background-color: rgb(230, 243, 255);
10 +}
11 +img {
12 + display:block;
13 + margin:auto;
14 +}
15 +input[type=text] {
16 + width: 20%;
17 + padding: 12px 20px;
18 + margin: 8px 0;
19 + box-sizing: border-box;
20 + border: 3px solid #ccc;
21 + -webkit-transition: 0.5s;
22 + transition: 0.5s;
23 + outline: none;
24 + font-family: 'MyWebFont';
25 + min-width: 200px;
26 +}
27 +input[type=text]:focus {
28 + border: 3px solid #555;
29 +}
30 +input[type=password] {
31 + width: 20%;
32 + padding: 12px 20px;
33 + margin: 8px 0;
34 + box-sizing: border-box;
35 + border: 3px solid #ccc;
36 + -webkit-transition: 0.5s;
37 + transition: 0.5s;
38 + outline: none;
39 + margin-right: 7px;
40 + font-family: 'MyWebFont';
41 + min-width: 200px;
42 +}
43 +input[type=password]:focus {
44 + border: 3px solid #555;
45 +}
46 +#btn1 {
47 + width: 120px;
48 + height: 45px;
49 + font-size:25px;
50 + font-family: 'MyWebFont';
51 + color: gray;
52 + background: white;
53 + border: solid 5px white;
54 + border-radius: 5px;
55 +}
56 +#btn2 {
57 + width: 150px;
58 + height: 47px;
59 + font-size:25px;
60 + font-family: 'MyWebFont';
61 + color: gray;
62 + background: white;
63 + border: solid 5px white;
64 + border-radius: 5px;
65 +}
66 +h2 {
67 + font-family: 'MyWebFont';
68 +}
69 +
70 +
71 +</style>
72 +{% endblock %}
73 +{% block content %}
74 +<br><br>
75 +<br><br>
76 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/>
77 +
78 +
79 +<br>
80 + <form action="/logincheck" method="post">
81 +<center><H2>ID&nbsp;&nbsp;<input style="border-radius:10px;" type="text" name="id" placeholder="ID 입력" required><br></H2></center>
82 +<center><H2>PW&nbsp;<input style="border-radius:10px;" type="password" name="pw" placeholder="비밀번호 입력" required><br></H2></center>
83 +<br>
84 +
85 +<center><input type="submit" id="btn1" value="로그인" ></center><br></form>
86 +<center><button id="btn2" onclick="window.location.href='/join'">회원가입</button></center><br>
87 +{% endblock %}
......
1 -<!DOCTYPE html> 1 +<!DOCTYPE html>
2 -<html> 2 +<html>
3 -<head> 3 +<head>
4 - <title>대여화면1</title> 4 + {% block head %}
5 -</head> 5 + <title>{% block title %}{% endblock %} - My Webpage</title>
6 -<style> 6 + {% endblock %}
7 -body { 7 +<link rel="stylesheet" href="{{url_for('static', filename='toast/toast.css')}}"/>
8 - background-color: rgb(230, 243, 255); 8 + <script src="{{url_for('static', filename='toast/toast.js')}}" charset="utf-8"></script>
9 -} 9 +</head>
10 -img { 10 +<script type="text/javascript">
11 - display:block; 11 +function init () {
12 - margin:auto; 12 + drawToast("HTML toast likes Android");
13 -} 13 +}
14 -#btn1 { 14 +</script>
15 - width: 150px; 15 +<link type="text/css" rel="stylesheet" href="{{url_for('static', filename='font.css')}}"/>
16 - height: 150px; 16 +<style>
17 - font-size:32px; 17 +body {
18 - font-family: '배달의민족 도현'; 18 + background-color: rgb(230, 243, 255);
19 - color: rgb(165, 210, 134); 19 + font-family: 'MyWebFont';
20 - background: white; 20 +}
21 - border: solid 5px white; 21 +img {
22 - border-radius: 50%; 22 + display:block;
23 - margin-right: 150px; 23 + margin:auto;
24 - margin-top: 50px; 24 +}
25 -} 25 +#page_title{
26 -#btn2 { 26 + font-family : 'MyWebFont';
27 - width: 150px; 27 + text-align: center;
28 - height: 150px; 28 + color: gray;
29 - font-size:32px; 29 +}
30 - font-family: '배달의민족 도현'; 30 +#btn1 {
31 - color: rgb(251, 199, 205); 31 + width: 150px;
32 - background: white; 32 + height: 150px;
33 - border: solid 5px white; 33 + font-size:32px;
34 - border-radius: 50%; 34 + font-family: 'MyWebFont';
35 - margin-left: 150px; 35 + color: rgb(165, 210, 134);
36 - margin-top: 50px; 36 + background: white;
37 -} 37 + border: solid 5px white;
38 - 38 + border-radius: 50%;
39 -</style> 39 + margin-top: 50px;
40 - 40 +}
41 -<body> 41 +#btn2 {
42 - 42 + width: 150px;
43 -<br><br> 43 + height: 150px;
44 -<img style="border-radius:15px;" width="300px;" src="캡처6.png"/><br> 44 + font-size:32px;
45 -<form> 45 + font-family: 'MyWebFont';
46 - 46 + color: rgb(251, 199, 205);
47 -<br> 47 + background: white;
48 - 48 + border: solid 5px white;
49 -<center><button id="btn1">대여하기</button></center> 49 + border-radius: 50%;
50 -<center><button id="btn2">대여현황</button></center> 50 + margin-top: 50px;
51 -<br><br><br><br> 51 +}
52 -<img width="100;" height="70;" align="bottom;" src="khu.png"/> 52 + #btn3 {
53 - 53 + width: 150px;
54 -</form> 54 + height: 150px;
55 - 55 + font-size:32px;
56 - 56 + font-family: 'MyWebFont';
57 - 57 + color: rgb(165, 210, 134);
58 -</body> 58 + background: white;
59 - 59 + border: solid 5px white;
60 + border-radius: 50%;
61 + margin-top: 50px;
62 +}
63 +
64 +</style>
65 +{% block style %}{% endblock %}
66 +
67 +<body>
68 +{% with messages = get_flashed_messages(with_categories=true) %}
69 + {% if messages %}
70 + {% for category, message in messages %}
71 + <script type="text/javascript">drawToast("{{ message }}")</script>
72 + {% endfor %}
73 + {% endif %}
74 +{% endwith %}
75 +<br><br>
76 +
77 +
78 +<br>
79 +
80 +<center><div id="content">{% block content %}{% endblock %}</div></center>
81 +<br><br><br><br>
82 +<img width="100;" height="70;" align="bottom;" src="{{ url_for('static', filename = 'khu.PNG') }}"/>
83 +
84 +
85 +
86 +
87 +
88 +</body>
89 +
60 </html> 90 </html>
...\ No newline at end of file ...\ No newline at end of file
......
1 +{% extends "main.html" %}
2 +{% block title %}Select Menu{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +body {
9 + background-color: rgb(230, 243, 255);
10 +}
11 +img {
12 + display:block;
13 + margin:auto;
14 +}
15 +#btn1 {
16 + width: 150px;
17 + height: 150px;
18 + font-size:32px;
19 + font-family: 'MyWebFont';
20 + color: rgb(165, 210, 134);
21 + background: white;
22 + border: solid 5px white;
23 + border-radius: 50%;
24 + margin-top: 50px;
25 +}
26 +#btn2 {
27 + width: 150px;
28 + height: 150px;
29 + font-size:32px;
30 + font-family: 'MyWebFont';
31 + color: rgb(251, 199, 205);
32 + background: white;
33 + border: solid 5px white;
34 + border-radius: 50%;
35 + margin-top: 50px;
36 +}
37 + #btn3 {
38 + width: 150px;
39 + height: 150px;
40 + font-size:32px;
41 + font-family: 'MyWebFont';
42 + color: rgb(165, 210, 134);
43 + background: white;
44 + border: solid 5px white;
45 + border-radius: 50%;
46 + margin-top: 50px;
47 +}
48 +
49 +
50 +</style>
51 +{% endblock %}
52 +{% block content %}
53 +<br><br>
54 +<img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/><br>
55 +
56 +<br>
57 +
58 +<center><button id="btn1" onclick="window.location.href='/search'">대여하기</button></center>
59 +<center><button id="btn2" onclick="window.location.href='/viewresv'">대여현황</button></center>
60 +<center><button id="btn3" onclick="window.location.href='/logout'">로그아웃</button></center>
61 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block head %}
3 +
4 +{% endblock %}
5 +{% block style %}
6 +<style>
7 +body {
8 + background-color: rgb(230, 243, 255);
9 +}
10 +
11 +#select1 {
12 + width: 300px;
13 + border: 3px solid rgb(191, 191, 191);
14 + border-radius: 4px;
15 + font-size: 20px;
16 + font-family: '배달의민족 도현';
17 + background-color: rgb(230, 243, 255);
18 + background-position: 5px 2.5px;
19 + -webkit-appearance: none;
20 + -moz-appearance: none;
21 + background: url('select-arrow.png') no-repeat 95% 50%;
22 + padding: 10px 10px 10px 20px;
23 +}
24 +select::-ms-expand {
25 + display: none;
26 +}
27 +#select2 {
28 + width: 150px;
29 + border: 3px solid rgb(191, 191, 191);
30 + border-radius: 4px;
31 + font-size: 20px;
32 + font-family: '배달의민족 도현';
33 + background-color: rgb(230, 243, 255);
34 + background-position: 5px 2.5px;
35 + -webkit-appearance: none;
36 + -moz-appearance: none;
37 + background: url('select-arrow.png') no-repeat 95% 50%;
38 + padding: 10px 10px 10px 20px;
39 + margin-left: 50;
40 +}
41 +input[type=number] {
42 + width: 109px;
43 + border: 3px solid rgb(191, 191, 191);
44 + border-radius: 4px;
45 + font-size: 20px;
46 + font-family: '배달의민족 도현';
47 + background-color: rgb(230, 243, 255);
48 + background-position: 5px 2.5px;
49 + padding: 10px 10px 10px 20px;
50 + margin-left: 50;
51 +}
52 +input[type=text] {
53 + width: 300px;
54 + box-sizing: border-box;
55 + border: 3px solid rgb(191, 191, 191);
56 + border-radius: 4px;
57 + font-size: 18px;
58 + font-family: '배달의민족 도현';
59 + background-color: rgb(230, 243, 255);
60 + padding: 10px 10px 10px 20px;
61 +}
62 +input[type=submit] {
63 + width: 300px;
64 + box-sizing: border-box;
65 + border: 3px solid rgb(251, 199, 205);
66 + border-radius: 4px;
67 + font-size: 25px;
68 + font-family: '배달의민족 도현';
69 + background-color: rgb(251, 199, 205);
70 + padding: 10px 10px 10px 10px;
71 +}
72 +input[type=datetime-local] {
73 + width: 320px;
74 + box-sizing: border-box;
75 + border: 3px solid rgb(191, 191, 191);
76 + border-radius: 4px;
77 + font-size: 18px;
78 + font-family: '배달의민족 도현';
79 + background-color: rgb(230, 243, 255);
80 + padding: 10px 10px 10px 20px;
81 +}
82 +#btn1 {
83 + width: 147px;
84 + height: 60px;
85 + font-size:16px;
86 + font-family: '배달의민족 도현';
87 + text-align: left;
88 + color: gray;
89 + background: white;
90 + border: solid 5px white;
91 + border-radius: 5px;
92 + vertical-align: bottom;
93 +}
94 +#btn2 {
95 + width: 147px;
96 + height: 60px;
97 + font-size:25px;
98 + font-family: '배달의민족 도현';
99 + color: rgb(045, 098, 155);
100 + background: white;
101 + border: solid 5px white;
102 + border-radius: 5px;
103 +}
104 +#btn3 {
105 + width: 147px;
106 + height: 60px;
107 + font-size:25px;
108 + font-family: '배달의민족 도현';
109 + color: rgb(164, 025, 018);
110 + background: white;
111 + border: solid 5px white;
112 + border-radius: 5px;
113 +}
114 +#btn3 {
115 + width: 65px;
116 + height: 65px;
117 + font-size:25px;
118 + font-family: '배달의민족 도현';
119 + color: rgb(164, 025, 018);
120 + border-radius: 50%;
121 + border: solid 5px rgb(230, 243, 255);
122 + background-image: url('back-arrow.png');
123 +}
124 +form {
125 + font-family: '배달의민족 도현';
126 + font-size:20px;
127 +}
128 +#wrapper {
129 + width: 400px;
130 + text-align: center;
131 + display: inline-block;
132 +
133 +}
134 +select{
135 + width: 60%;
136 + padding: 12px 20px;
137 + box-sizing: border-box;
138 + border: 3px solid #ccc;
139 + -webkit-transition: 0.5s;
140 + transition: 0.5s;
141 + outline: none;
142 + font-family: '배달의민족 도현';
143 + display: inline;
144 + float: right;
145 + border-radius: 5px;
146 +}
147 +#maxpeople{
148 + width: 60%;
149 + padding: 12px 20px;
150 + box-sizing: border-box;
151 + border: 3px solid #ccc;
152 + -webkit-transition: 0.5s;
153 + transition: 0.5s;
154 + outline: none;
155 + font-family: '배달의민족 도현';
156 + display: inline;
157 + float: right;
158 + border-radius: 5px;
159 +}
160 +.item{
161 + height: 50px;
162 + margin: 10px;
163 +
164 +}
165 +h3 {
166 + display: inline-block;
167 + vertical-align: middle;
168 +margin-top: 15px;
169 +
170 +}
171 +</style>
172 +{% endblock %}
173 +{% block content %}
174 +
175 +
176 +
177 +<br>
178 +<a href="/myhome"> <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/></a>
179 +<div id="wrapper">
180 +<form action="/search/result" method="post">
181 +
182 +<br><br>
183 +
184 +<div class="item"><H3>건물</H3>
185 + <select name="deptid" required><option value="전자정보대학">전자정보대학</option>
186 + <option value="외국어대학">외국어대학</option>
187 + <option value="공과대학">공과대학</option>
188 + <option value="예술,디자인대학">예술,디자인대학</option>
189 + <option value="체육대학">체육대학</option>
190 + <option value="국제대학">국제대학</option>
191 + <option value="1호관 테니스장">1호관 테니스장</option>
192 + <option value="3호관 운동장">3호관 운동장</option>
193 + <option value="3호관 테니스장">3호관 테니스장</option>
194 + <option value="6호관 야구장">6호관 야구장</option>
195 + <option value="6호관 운동장">6호관 운동장</option>
196 + <option value="골프 연습장">골프 연습장</option>
197 + <option value="6호관 운동장">6호관 운동장</option>
198 + <option value="수영장">수영장</option>
199 + <option value="필드 하키장(공과대학 앞)">필드 하키장(공과대학 앞)</option>
200 + <option value="학생회관">학생회관</option></select>
201 + <br></div>
202 + <center><div class="item"><H3>사용 인원 수</H3><input type="number" id="maxpeople" name="capacity" min="1" max="200"></div></center><br>
203 +
204 +
205 +<center>시작 시간<br><br><input type="datetime-local" name="starttime"></center><br>
206 +<center>종료 시간<br><br><input type="datetime-local" name="endtime"></center><br>
207 +
208 +
209 +<br>
210 + <center><input type="submit" value="검색"></center></form>
211 + </div>
212 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block title %}예약 현황{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +#list_item{
9 + width: 275px;
10 + height: 100px;
11 + font-size:20px;
12 + font-family: '배달의민족 도현';
13 + color: gray;
14 + background: white;
15 + border: solid 5px white;
16 + border-radius: 5px;
17 + vertical-align: bottom;
18 + line-height: 150%;
19 + display: inline-block;
20 +}
21 +#delete_btn{
22 + width: 47px;
23 + height: 110px;
24 + box-sizing: border-box;
25 + font-size: 20px;
26 + font-family: '배달의민족 도현';
27 + background-color: rgb(255, 101, 101);
28 + color: white;
29 + border-radius:5px;
30 + border: solid 5px rgb(255, 101, 101);
31 + float: right;
32 + display: inline-block;
33 +
34 +}
35 +
36 +</style>
37 +{% endblock %}
38 +{% block content %}
39 + <a href="/myhome"> <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/></a>
40 + <h1>예약 현황</h1>
41 + {% if not resv_list %}
42 + <p>예약 데이터가 없습니다.</p>
43 +{% endif %}
44 + <table>
45 + {% for resv_item in resv_list %}
46 + <tr><td><form method="post" action="/deleteresv"><div id="list_item">{{ resv_item[3] }} {{ resv_item[4] }}<br>{{ resv_item[6].strftime('%Y-%m-%d') }}<br>{{ resv_item[6].strftime('%H:%M') }} ~ {{ resv_item[7].strftime('%H:%M') }}<form method="post" action="/deleteresv"><input type="hidden" name="resv_id" value="{{ resv_item[0] }}"></div><input type="submit" id="delete_btn" value="X"></form></td></tr>
47 + {% endfor %}
48 + </table>
49 +{% endblock %}
...\ No newline at end of file ...\ No newline at end of file
1 +{% extends "main.html" %}
2 +{% block title %}예약 현황{% endblock %}
3 +{% block head %}
4 +
5 +{% endblock %}
6 +{% block style %}
7 +<style>
8 +#list_item{
9 + width: 263px;
10 + height: 100px;
11 + font-size:20px;
12 + font-family: '배달의민족 도현';
13 + color: gray;
14 + background: white;
15 + border: solid 5px white;
16 + border-radius: 5px;
17 + vertical-align: bottom;
18 + line-height: 150%;
19 + display: inline-block;
20 + padding-left: 7px;
21 +}
22 +#delete_btn{
23 + width: 60px;
24 + height: 110px;
25 + box-sizing: border-box;
26 + font-size: 20px;
27 + font-family: '배달의민족 도현';
28 + background-color: rgb(90, 200, 90);
29 + color: white;
30 + border-radius:5px;
31 + border: solid 5px rgb(90, 200, 90);
32 + float: right;
33 + display: inline-block;
34 +
35 +}
36 +
37 +</style>
38 +{% endblock %}
39 +{% block content %}
40 + <a href="/myhome"> <img style="border-radius:15px;" width="300px;" src="{{ url_for('static', filename = 'logo.png') }}"/></a><br>
41 + <h1>검색 결과</h1>
42 + {% if resv_list[0][0] == "NoAvailableFacilities" %}
43 + <p>가능한 강의실이 없습니다.</p>
44 +{% else %}
45 + <table>
46 + {% for resv_item in resv_list %}
47 + <tr><td><form method="post" action="/search/resv"><div id="list_item">{{ resv_item[1] }} {{ resv_item[2] }}<br>{{ starttime.strftime('%Y-%m-%d') }}<br>{{ starttime.strftime('%H:%M') }} ~ {{ endtime.strftime('%H:%M') }}
48 + <input type="hidden" name="fac_id" value="{{ resv_item[0] }}">
49 + <input type="hidden" name="start_time" value="{{ starttime.strftime('%Y-%m-%d%H:%M') }}">
50 + <input type="hidden" name="end_time" value="{{ endtime.strftime('%Y-%m-%d%H:%M') }}">
51 + </div><input type="submit" id="delete_btn" value="예약"></form></td></tr>
52 + {% endfor %}
53 + </table>
54 + {% endif %}
55 +{% endblock %}
56 +
1 +user_id = ' '
2 +user_passwd = ' '
...\ No newline at end of file ...\ No newline at end of file