initial commit
This commit is contained in:
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
venv
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
*.sql
|
||||||
|
*.pyc
|
||||||
|
__pycahe__
|
||||||
|
.DS_Store
|
||||||
|
static/img/prepfot/
|
||||||
|
terminal.sqlite
|
||||||
|
log/
|
||||||
208
api/actions.py
Normal file
208
api/actions.py
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
|
||||||
|
def getGroups(returnJson = 0):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/task3,7_fastview.php"
|
||||||
|
|
||||||
|
|
||||||
|
response = requests.get(url = url, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
soup = BeautifulSoup(response.content, 'lxml')
|
||||||
|
|
||||||
|
groups = {}
|
||||||
|
for td in soup.findAll("ul"):
|
||||||
|
for a in td.findAll("li"):
|
||||||
|
groups[a.text.lower()] = a['value']
|
||||||
|
|
||||||
|
if returnJson:
|
||||||
|
return json.dumps(groups, ensure_ascii=False)
|
||||||
|
|
||||||
|
return(groups)
|
||||||
|
|
||||||
|
def getGroupsList(returnJson = 0):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/task3,7_fastview.php"
|
||||||
|
|
||||||
|
|
||||||
|
response = requests.get(url = url, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
soup = BeautifulSoup(response.content, 'lxml')
|
||||||
|
|
||||||
|
groups = {}
|
||||||
|
for td in soup.findAll("ul"):
|
||||||
|
for a in td.findAll("li"):
|
||||||
|
groups[a.text.lower()] = a.text.lower()
|
||||||
|
|
||||||
|
if returnJson:
|
||||||
|
return json.dumps(groups, ensure_ascii=False)
|
||||||
|
|
||||||
|
return(groups)
|
||||||
|
|
||||||
|
|
||||||
|
def getDepart(returnJson = 0):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/task11_kafview.php"
|
||||||
|
|
||||||
|
|
||||||
|
response = requests.get(url = url, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
soup = BeautifulSoup(response.content, 'lxml')
|
||||||
|
|
||||||
|
departaments = {}
|
||||||
|
for td in soup.findAll('tr'):
|
||||||
|
for t in td.findAll('td'):
|
||||||
|
for a in t.findAll('option'):
|
||||||
|
departaments[a.text.lower()] = a['value']
|
||||||
|
|
||||||
|
if returnJson:
|
||||||
|
return json.dumps(departaments, ensure_ascii=False)
|
||||||
|
|
||||||
|
return(departaments)
|
||||||
|
|
||||||
|
def getTeach(returnJson = 0):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/task8_prepview.php"
|
||||||
|
|
||||||
|
|
||||||
|
response = requests.get(url = url, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
soup = BeautifulSoup(response.content, 'lxml')
|
||||||
|
|
||||||
|
teaches = {}
|
||||||
|
for td in soup.findAll('tr'):
|
||||||
|
for t in td.findAll('td'):
|
||||||
|
for a in t.findAll('option'):
|
||||||
|
teaches[a.text.lower()] = a['value']
|
||||||
|
|
||||||
|
if returnJson:
|
||||||
|
return json.dumps(teaches, ensure_ascii=False)
|
||||||
|
|
||||||
|
return(teaches)
|
||||||
|
|
||||||
|
|
||||||
|
def getFastPlan(gp_name, gp_id):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '7',
|
||||||
|
'gp_name': gp_name,
|
||||||
|
'gp_id': gp_id}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
table_data = [[cell.text for cell in row()]
|
||||||
|
for row in BeautifulSoup(response.text, 'lxml')("tr")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dictOfWords = { i : table_data[i] for i in range(0, len(table_data) ) }
|
||||||
|
|
||||||
|
|
||||||
|
return(json.dumps(dict(dictOfWords), ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def getExtPlan(gp_name, gp_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '7',
|
||||||
|
'gp_name': gp_name,
|
||||||
|
'gp_id': gp_id,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
table_data = [[cell.text for cell in row()]
|
||||||
|
for row in BeautifulSoup(response.text, 'lxml')("tr")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dictOfWords = { i : table_data[i] for i in range(0, len(table_data) ) }
|
||||||
|
|
||||||
|
|
||||||
|
return(json.dumps(dict(dictOfWords), ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def getDeptPlan(dep_name, dep_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '11',
|
||||||
|
'kf_name': dep_name,
|
||||||
|
'kf_id': dep_id,
|
||||||
|
'sort': 1,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
table_data = [[cell.text for cell in row()]
|
||||||
|
for row in BeautifulSoup(response.text, 'lxml')("tr")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dictOfWords = { i : table_data[i] for i in range(0, len(table_data) ) }
|
||||||
|
|
||||||
|
|
||||||
|
return(json.dumps(dict(dictOfWords), ensure_ascii=False))
|
||||||
|
|
||||||
|
|
||||||
|
def getTeachPlan(teach_name, teach_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '8',
|
||||||
|
'pr_name': teach_name,
|
||||||
|
'pr_id': teach_id,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
table_data = [[cell.text for cell in row()]
|
||||||
|
for row in BeautifulSoup(response.text, 'lxml')("tr")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dictOfWords = { i : table_data[i] for i in range(0, len(table_data) ) }
|
||||||
|
|
||||||
|
|
||||||
|
return(json.dumps(dict(dictOfWords), ensure_ascii=False))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
getGroups()
|
||||||
|
|
||||||
|
|
||||||
113
api/app.py
Normal file
113
api/app.py
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
from flask import Flask, redirect, request
|
||||||
|
from manual import man
|
||||||
|
import actions
|
||||||
|
import table_actions as t_actions
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
groups = actions.getGroups()
|
||||||
|
dept = actions.getDepart()
|
||||||
|
teach = actions.getTeach()
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def hello():
|
||||||
|
return redirect("/api/v1.0/manual", code=302)
|
||||||
|
|
||||||
|
@app.errorhandler(404)
|
||||||
|
def not_found(e):
|
||||||
|
return redirect("/api/v1.0/manual", code=302)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/tplan1', methods=['GET'])
|
||||||
|
def getTplan1():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/tplan1?gp_name=2мбд1
|
||||||
|
gp_name = request.args.get('gp_name', None)
|
||||||
|
gp_id = groups[gp_name.lower()]
|
||||||
|
return actions.getFastPlan(gp_name, gp_id)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/table/tplan1', methods=['GET'])
|
||||||
|
def getTableTplan1():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/table/tplan1?gp_name=2мбд1
|
||||||
|
gp_name = request.args.get('gp_name', None)
|
||||||
|
gp_id = groups[gp_name.lower()]
|
||||||
|
return t_actions.getFastPlanTable(gp_name, gp_id)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/tplan2', methods=['GET'])
|
||||||
|
def getTplan2():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/tplan2?gp_name=2мбд1&sem_no=1&tp_year=19
|
||||||
|
gp_name = request.args.get('gp_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
gp_id = groups[gp_name.lower()]
|
||||||
|
return actions.getExtPlan(gp_name, gp_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/table/tplan2', methods=['GET'])
|
||||||
|
def getTableTplan2():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/table/tplan2?gp_name=2мбд1&sem_no=1&tp_year=19
|
||||||
|
gp_name = request.args.get('gp_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
gp_id = groups[gp_name.lower()]
|
||||||
|
return t_actions.getExtPlanTable(gp_name, gp_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/dep_plan', methods=['GET'])
|
||||||
|
def getDplan():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/dep_plan?dep_name=физики&sem_no=1&tp_year=19
|
||||||
|
dep_name = request.args.get('dep_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
dep_id = dept[dep_name.lower()]
|
||||||
|
return actions.getDeptPlan(dep_name, dep_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/table/dep_plan', methods=['GET'])
|
||||||
|
def getTableDplan():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/table/dep_plan?dep_name=физики&sem_no=1&tp_year=19
|
||||||
|
dep_name = request.args.get('dep_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
dep_id = dept[dep_name.lower()]
|
||||||
|
return t_actions.getDeptPlanTable(dep_name, dep_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/teach_plan', methods=['GET'])
|
||||||
|
def getTeacPlan():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/teach_plan?teach_name=суркова%20н.е.&sem_no=1&tp_year=19
|
||||||
|
teach_name = request.args.get('teach_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
teach_id = teach[teach_name.lower()]
|
||||||
|
return actions.getTeachPlan(teach_name, teach_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/table/teach_plan', methods=['GET'])
|
||||||
|
def getTableTeacPlan():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/table/teach_plan?teach_name=суркова%20н.е.&sem_no=1&tp_year=19
|
||||||
|
teach_name = request.args.get('teach_name', None)
|
||||||
|
sem_no = request.args.get('sem_no', None)
|
||||||
|
tp_year = request.args.get('tp_year', None)
|
||||||
|
teach_id = teach[teach_name.lower()]
|
||||||
|
return t_actions.getTeachPlanTable(teach_name, teach_id, sem_no, tp_year)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/groups', methods=['GET'])
|
||||||
|
def getGroupsDict():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/groups
|
||||||
|
return actions.getGroups(returnJson = 1)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/groupslist', methods=['GET'])
|
||||||
|
def getGroupsListDict():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/groups
|
||||||
|
return actions.getGroupsList(returnJson = 1)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/departaments', methods=['GET'])
|
||||||
|
def getDepartDict():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/departaments
|
||||||
|
return actions.getDepart(returnJson = 1)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/teaches', methods=['GET'])
|
||||||
|
def getTeachDict():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/teaches
|
||||||
|
return actions.getTeach(returnJson = 1)
|
||||||
|
|
||||||
|
@app.route('/api/v1.0/manual', methods=['GET'])
|
||||||
|
def getManual():
|
||||||
|
# http://127.0.0.1:5000/api/v1.0/manual
|
||||||
|
return man()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(debug=True, port=5501)
|
||||||
47
api/manual.py
Normal file
47
api/manual.py
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
def man():
|
||||||
|
return(
|
||||||
|
'''
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>Инструкция к API "Расписание МАДИ"</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Получить список групп</h2>
|
||||||
|
<p><a href=/api/v1.0/groups>/api/v1.0/groups</a></p>
|
||||||
|
|
||||||
|
<h2>Получить список кафедр</h2>
|
||||||
|
<p><a href=/api/v1.0/departaments>/api/v1.0/departaments</a></p>
|
||||||
|
|
||||||
|
<h2>Получить список преподавателей</h2>
|
||||||
|
<p><a href=/api/v1.0/teaches>/api/v1.0/teaches</a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание для группы в json (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/tplan1?gp_name=2мбд1>/api/v1.0/tplan1?<gp_name></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание для группы в HTML (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/table/tplan1?gp_name=2мбд1>/api/v1.0/table/tplan1?<gp_name></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расширенное расписание для группы в json (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/tplan2?gp_name=2мбд1&sem_no=1&tp_year=19>/api/v1.0/tplan2?<gp_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расширенное расписание для группы в HTML (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/table/tplan2?gp_name=2мбд1&sem_no=1&tp_year=19>/api/v1.0/table/tplan2?<gp_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание по кафедре в json (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/dep_plan?dep_name=физики&sem_no=1&tp_year=19>/api/v1.0/dep_plan?<dep_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание по кафедре в HTML (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/table/dep_plan?dep_name=физики&sem_no=1&tp_year=19>/api/v1.0/table/dep_plan?<dep_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание по преподавателю в json (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/teach_plan?teach_name=суркова%20н.е.&sem_no=1&tp_year=19>/api/v1.0/teach_plan?<teach_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
<h2>Получить расписание по преподавателю в HTML (метод GET)</h2>
|
||||||
|
<p><a href=/api/v1.0/table/teach_plan?teach_name=суркова%20н.е.&sem_no=1&tp_year=19>/api/v1.0/table/teach_plan?<teach_name>&<sem_no>&<tp_year></a></p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
'''
|
||||||
|
)
|
||||||
76
api/table_actions.py
Normal file
76
api/table_actions.py
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import requests
|
||||||
|
|
||||||
|
def getFastPlanTable(gp_name, gp_id):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '7',
|
||||||
|
'gp_name': gp_name,
|
||||||
|
'gp_id': gp_id}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
return(response.text)
|
||||||
|
|
||||||
|
def getExtPlanTable(gp_name, gp_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '7',
|
||||||
|
'gp_name': gp_name,
|
||||||
|
'gp_id': gp_id,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
return(response.text)
|
||||||
|
|
||||||
|
|
||||||
|
def getDeptPlanTable(dep_name, dep_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '11',
|
||||||
|
'kf_name': dep_name,
|
||||||
|
'kf_id': dep_id,
|
||||||
|
'sort': 1,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
return(response.text)
|
||||||
|
|
||||||
|
|
||||||
|
def getTeachPlanTable(teach_name, teach_id, sem_no, tp_year):
|
||||||
|
headers = {'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
'User-Agent': 'Mozilla/5.0',
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
|
||||||
|
|
||||||
|
url = "http://tplan.madi.ru/tasks/tableFiller.php"
|
||||||
|
params = {
|
||||||
|
'tab': '8',
|
||||||
|
'pr_name': teach_name,
|
||||||
|
'pr_id': teach_id,
|
||||||
|
'sem_no': sem_no,
|
||||||
|
'tp_year': tp_year}
|
||||||
|
response = requests.post(url = url, data = params, headers=headers)
|
||||||
|
response.encoding = 'utf-8'
|
||||||
|
|
||||||
|
return(response.text)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
getFastPlanTable()
|
||||||
|
|
||||||
|
|
||||||
16
api/tests.py
Normal file
16
api/tests.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!flask/bin/python
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
import os
|
||||||
|
from app import app
|
||||||
|
|
||||||
|
class BasicTestCase(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.app = app.test_client()
|
||||||
|
|
||||||
|
def test_main_page(self):
|
||||||
|
response = self.app.get('/api/v1.0/manual', content_type='html/text')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
145
app.py
Normal file
145
app.py
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
from flask import Flask, render_template, request, redirect
|
||||||
|
from getApi import getGroup, GetPrep, getGroupRasp, getCountTable, getCountTable1, getPrepRasp
|
||||||
|
from data_func import getDays, getDayWeek, getWeek
|
||||||
|
from forms import SelectGroupForm, LoginForm, addPrepForm
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UPLOAD_FOLDER = 'static/img'
|
||||||
|
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
SECRET_KEY = os.urandom(32)
|
||||||
|
app.config['SECRET_KEY'] = SECRET_KEY
|
||||||
|
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///terminal.sqlite3'
|
||||||
|
app.config['UPLOAD_FOLDER']=UPLOAD_FOLDER
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
@app.route('/index.html', methods=['GET', 'POST'])
|
||||||
|
def index():
|
||||||
|
return render_template('index.html', days=getDays(), day_week=getDayWeek(), wek=getWeek())
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/rasp_group.html', methods=['GET', 'POST'])
|
||||||
|
def rasp_group():
|
||||||
|
getGroup()
|
||||||
|
|
||||||
|
raspform = SelectGroupForm(request.form)
|
||||||
|
grp = getGroup()
|
||||||
|
for i in grp:
|
||||||
|
print("i = ",i)
|
||||||
|
raspform.group.choices.append(i)
|
||||||
|
|
||||||
|
raspform.day.choices = ['Понедельник','Вторник','Среда','Четверг','Пятница','Суббота']
|
||||||
|
if request.method == 'POST':
|
||||||
|
pass
|
||||||
|
#print(raspform.group.data)
|
||||||
|
#print(raspform.day.data)
|
||||||
|
# print(getGroupRasp(raspform.group.data, raspform.day.data))
|
||||||
|
# getCountTable(getGroupRasp(raspform.group.data))
|
||||||
|
|
||||||
|
return render_template('rasp_group.html', days=getDays(),
|
||||||
|
day_week=getDayWeek(),
|
||||||
|
dataGr=getGroup(),
|
||||||
|
form=raspform,
|
||||||
|
daysOfWeek=raspform.day,
|
||||||
|
table=getGroupRasp(raspform.group.data, raspform.day.data),
|
||||||
|
countStr=getCountTable(getGroupRasp(raspform.group.data, raspform.day.data)))
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/rasp_prep.html',methods=['GET', 'POST'])
|
||||||
|
def rasp_prep():
|
||||||
|
|
||||||
|
GetPrep()
|
||||||
|
raspform = addPrepForm(request.form)
|
||||||
|
|
||||||
|
grp = GetPrep()
|
||||||
|
# print(grp)
|
||||||
|
j = 0
|
||||||
|
raspform.stepenField.choices = []
|
||||||
|
for i in grp:
|
||||||
|
j += 1
|
||||||
|
if j <= 6:
|
||||||
|
continue
|
||||||
|
# print("i = ",i)
|
||||||
|
raspform.stepenField.choices.append(i)
|
||||||
|
raspform.day.choices = ['Понедельник','Вторник','Среда','Четверг','Пятница','Суббота']
|
||||||
|
if request.method == 'POST':
|
||||||
|
pass
|
||||||
|
|
||||||
|
# return render_template('rasp_group.html', days=getDays(), day_week=getDayWeek(), dataGr=getGroup(), daysOfWeek=raspform.day,
|
||||||
|
# table=getGroupRasp(raspform.group.data, raspform.day.data),
|
||||||
|
# countStr=getCountTable(getGroupRasp(raspform.group.data, raspform.day.data)))
|
||||||
|
|
||||||
|
|
||||||
|
return render_template('rasp_prep.html',form=raspform,daysOfWeek=raspform.day,days=getDays(),day_week=getDayWeek(),
|
||||||
|
table=getPrepRasp(raspform.stepenField.data, raspform.day.data),wek=getWeek(),
|
||||||
|
countStr=getCountTable1(getPrepRasp(raspform.stepenField.data, raspform.day.data)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/rasp_dop.html')
|
||||||
|
def rasp_dop():
|
||||||
|
return render_template('rasp_dop.html')
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/rasp_ekz.html')
|
||||||
|
def rasp_ekz():
|
||||||
|
return render_template('rasp_ekz.html')
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/raspform.html', methods=['GET', 'POST'])
|
||||||
|
@app.route('/raspform', methods=['GET', 'POST'])
|
||||||
|
def frm():
|
||||||
|
raspform = SelectGroupForm(request.form)
|
||||||
|
grp = getGroup()
|
||||||
|
for i in grp:
|
||||||
|
raspform.group.choices.append(i)
|
||||||
|
|
||||||
|
raspform.day.choices = ['Понедельник', 'Вторнник']
|
||||||
|
if request.method == 'POST':
|
||||||
|
print(raspform.group.data)
|
||||||
|
print(raspform.day.data)
|
||||||
|
|
||||||
|
return render_template('form.html', form=raspform)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/adminloigned')
|
||||||
|
def adminLogined():
|
||||||
|
|
||||||
|
return render_template('admin.html')
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/admin', methods=['GET', 'POST'])
|
||||||
|
def admin():
|
||||||
|
form = LoginForm()
|
||||||
|
if request.method == "POST":
|
||||||
|
if form.username.data == 'malon':
|
||||||
|
return redirect('/adminlogined')
|
||||||
|
|
||||||
|
return render_template('adminLogin.html', form=form)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/addsql', methods=['GET', 'POST'])
|
||||||
|
def addsql():
|
||||||
|
form = addPrepForm(request.form)
|
||||||
|
if request.method == 'POST':
|
||||||
|
fio = form.fioField.data
|
||||||
|
dolgnost = form.dolgnostField.data
|
||||||
|
stepen = form.stepenField.data
|
||||||
|
photo = form.photoField.data
|
||||||
|
file = request.files['file[]']
|
||||||
|
#image_data = photo.filename
|
||||||
|
print(fio, dolgnost, stepen, file)
|
||||||
|
#photo.save(os.path.join(app.instance_path, 'photos', filename))
|
||||||
|
|
||||||
|
|
||||||
|
return render_template('addsql.html', form=form)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(debug=True, host='0.0.0.0', port=3800)
|
||||||
77
data_func.py
Normal file
77
data_func.py
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
from datetime import date
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
def getCountTable(table):
|
||||||
|
a = 0
|
||||||
|
for i in table:
|
||||||
|
a = a + 1
|
||||||
|
print(a)
|
||||||
|
return a
|
||||||
|
|
||||||
|
|
||||||
|
def getDays():
|
||||||
|
curdate = datetime.today()
|
||||||
|
l_date = date(curdate.year, curdate.month, curdate.day)
|
||||||
|
a = l_date.day
|
||||||
|
b = l_date.month
|
||||||
|
if (b == 1):
|
||||||
|
b = "Января"
|
||||||
|
elif (b == 2):
|
||||||
|
b = "Февраля"
|
||||||
|
elif (b == 3):
|
||||||
|
b = "Марта"
|
||||||
|
elif (b == 4):
|
||||||
|
b = "Апреля"
|
||||||
|
elif (b == 5):
|
||||||
|
b = "Мая"
|
||||||
|
elif (b == 6):
|
||||||
|
b = "Июня"
|
||||||
|
elif (b == 7):
|
||||||
|
b = "Июля"
|
||||||
|
elif (b == 8):
|
||||||
|
b = "Августа"
|
||||||
|
elif (b == 9):
|
||||||
|
b = "Сентября"
|
||||||
|
elif (b == 10):
|
||||||
|
b = "Октября"
|
||||||
|
elif (b == 11):
|
||||||
|
b = "Ноября"
|
||||||
|
else:
|
||||||
|
b = "Декабря"
|
||||||
|
c = l_date.year
|
||||||
|
result = str(a) + " " + str(b) + " " + str(c) + " г."
|
||||||
|
return str(result)
|
||||||
|
|
||||||
|
|
||||||
|
def getDayWeek():
|
||||||
|
curdate = datetime.today()
|
||||||
|
day = datetime.isoweekday(curdate)
|
||||||
|
if day == 1:
|
||||||
|
day_str = "Понедельник"
|
||||||
|
elif day == 2:
|
||||||
|
day_str = "Вторник"
|
||||||
|
elif day == 3:
|
||||||
|
day_str = "Среда"
|
||||||
|
elif day == 4:
|
||||||
|
day_str = "Четверг"
|
||||||
|
elif day == 5:
|
||||||
|
day_str = "Пятница"
|
||||||
|
elif day == 6:
|
||||||
|
day_str = "Суббота"
|
||||||
|
else:
|
||||||
|
day_str = "Воскресенье"
|
||||||
|
return str(day_str)
|
||||||
|
|
||||||
|
# if int(delta / 7) % 2 == 1:
|
||||||
|
|
||||||
|
|
||||||
|
def getWeek():
|
||||||
|
# curdate = datetime.today()
|
||||||
|
# f_date = date(2017, 10, 26)
|
||||||
|
# l_date = date(curdate.year, curdate.month, curdate.day)
|
||||||
|
# delta = l_date - f_date
|
||||||
|
|
||||||
|
# wek = 1
|
||||||
|
# return week
|
||||||
|
return str(2)
|
||||||
119
dbFunc.py
Normal file
119
dbFunc.py
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
from app import app
|
||||||
|
from flask import json
|
||||||
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
from sqlalchemy.orm.attributes import QueryableAttribute
|
||||||
|
|
||||||
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
class Base(db.Model):
|
||||||
|
__abstract__ = True
|
||||||
|
|
||||||
|
def to_dict(self, show=None, _hide=[], _path=[]):
|
||||||
|
show = show or []
|
||||||
|
|
||||||
|
hidden = self._hidden_fields if hasattr(self, "_hidden_fields") else []
|
||||||
|
default = self._default_fields if hasattr(self, "_default_fields") else []
|
||||||
|
default.extend(['id', 'modified_at', 'created_at'])
|
||||||
|
|
||||||
|
hidden = self._hidden_fields if hasattr(self, "_hidden_fields") else []
|
||||||
|
default = self._default_fields if hasattr(self, "_default_fields") else []
|
||||||
|
default.extend(['id', 'modified_at', 'created_at'])
|
||||||
|
|
||||||
|
if not _path:
|
||||||
|
_path = self.__tablename__.lower()
|
||||||
|
|
||||||
|
def prepend_path(item):
|
||||||
|
item = item.lower()
|
||||||
|
if item.split(".", 1)[0] == _path:
|
||||||
|
return item
|
||||||
|
if len(item) == 0:
|
||||||
|
return item
|
||||||
|
if item[0] != ".":
|
||||||
|
item = ".%s" % item
|
||||||
|
item = "%s%s" % (_path, item)
|
||||||
|
return item
|
||||||
|
|
||||||
|
_hide[:] = [prepend_path(x) for x in _hide]
|
||||||
|
show[:] = [prepend_path(x) for x in show]
|
||||||
|
|
||||||
|
columns = self.__table__.columns.keys()
|
||||||
|
relationships = self.__mapper__.relationships.keys()
|
||||||
|
properties = dir(self)
|
||||||
|
|
||||||
|
ret_data = {}
|
||||||
|
|
||||||
|
for key in columns:
|
||||||
|
if key.startswith("_"):
|
||||||
|
continue
|
||||||
|
check = "%s.%s" % (_path, key)
|
||||||
|
if check in _hide or key in hidden:
|
||||||
|
continue
|
||||||
|
if check in show or key in default:
|
||||||
|
ret_data[key] = getattr(self, key)
|
||||||
|
|
||||||
|
for key in relationships:
|
||||||
|
if key.startswith("_"):
|
||||||
|
continue
|
||||||
|
check = "%s.%s" % (_path, key)
|
||||||
|
if check in _hide or key in hidden:
|
||||||
|
continue
|
||||||
|
if check in show or key in default:
|
||||||
|
_hide.append(check)
|
||||||
|
is_list = self.__mapper__.relationships[key].uselist
|
||||||
|
if is_list:
|
||||||
|
items = getattr(self, key)
|
||||||
|
if self.__mapper__.relationships[key].query_class is not None:
|
||||||
|
if hasattr(items, "all"):
|
||||||
|
items = items.all()
|
||||||
|
ret_data[key] = []
|
||||||
|
for item in items:
|
||||||
|
ret_data[key].append(
|
||||||
|
item.to_dict(
|
||||||
|
show=list(show),
|
||||||
|
_hide=list(_hide),
|
||||||
|
_path=("%s.%s" % (_path, key.lower())),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
if (
|
||||||
|
self.__mapper__.relationships[key].query_class is not None
|
||||||
|
or self.__mapper__.relationships[key].instrument_class
|
||||||
|
is not None
|
||||||
|
):
|
||||||
|
item = getattr(self, key)
|
||||||
|
if item is not None:
|
||||||
|
ret_data[key] = item.to_dict(
|
||||||
|
show=list(show),
|
||||||
|
_hide=list(_hide),
|
||||||
|
_path=("%s.%s" % (_path, key.lower())),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
ret_data[key] = None
|
||||||
|
else:
|
||||||
|
ret_data[key] = getattr(self, key)
|
||||||
|
|
||||||
|
for key in list(set(properties) - set(columns) - set(relationships)):
|
||||||
|
if key.startswith("_"):
|
||||||
|
continue
|
||||||
|
if not hasattr(self.__class__, key):
|
||||||
|
continue
|
||||||
|
attr = getattr(self.__class__, key)
|
||||||
|
if not (isinstance(attr, property) or isinstance(attr, QueryableAttribute)):
|
||||||
|
continue
|
||||||
|
check = "%s.%s" % (_path, key)
|
||||||
|
if check in _hide or key in hidden:
|
||||||
|
continue
|
||||||
|
if check in show or key in default:
|
||||||
|
val = getattr(self, key)
|
||||||
|
if hasattr(val, "to_dict"):
|
||||||
|
ret_data[key] = val.to_dict(
|
||||||
|
show=list(show),
|
||||||
|
_hide=list(_hide), _path=("%s.%s" % (_path, key.lower()))
|
||||||
|
_path = ('%s.%s' % (path, key.lower())),)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
ret_data[key] = json.loads(json.dumps(val))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return ret_data
|
||||||
39
forms.py
Normal file
39
forms.py
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
from wtforms.fields import SelectField, StringField, PasswordField, SubmitField, FileField
|
||||||
|
from flask_wtf import FlaskForm
|
||||||
|
|
||||||
|
|
||||||
|
class SelectGroupForm(FlaskForm):
|
||||||
|
grChoices = []
|
||||||
|
group = SelectField('group', choices=grChoices)
|
||||||
|
dayChoice = []
|
||||||
|
day = SelectField('day', choices=dayChoice)
|
||||||
|
submit = SubmitField('Показать')
|
||||||
|
|
||||||
|
|
||||||
|
class LoginForm(FlaskForm):
|
||||||
|
username = StringField('Username')
|
||||||
|
password = PasswordField('Password')
|
||||||
|
submit = SubmitField('Submit')
|
||||||
|
|
||||||
|
|
||||||
|
class addPrepForm(FlaskForm):
|
||||||
|
fioField = StringField('Фамилия Имя Отчество')
|
||||||
|
dolgnostField = StringField('Должность')
|
||||||
|
stepenChoices = ['нет', 'к.т.н', 'д.т.н']
|
||||||
|
stepenField = SelectField('Науч. степень', choices=stepenChoices)
|
||||||
|
photoField = FileField()
|
||||||
|
submit = SubmitField('Добавить')
|
||||||
|
|
||||||
|
|
||||||
|
class addPrepForm(FlaskForm):
|
||||||
|
fioField = StringField('Фамилия Имя Отчество')
|
||||||
|
dolgnostField = StringField('Должность')
|
||||||
|
grChoices = []
|
||||||
|
group = SelectField('group', choices=grChoices)
|
||||||
|
dayChoice = []
|
||||||
|
day = SelectField('day', choices=dayChoice)
|
||||||
|
stepenChoices = ['нет', 'к.т.н', 'д.т.н']
|
||||||
|
stepenField = SelectField('Науч. степень', choices=stepenChoices)
|
||||||
|
photoField = FileField()
|
||||||
|
submit1 = SubmitField('Показать')
|
||||||
|
|
||||||
238
getApi.py
Normal file
238
getApi.py
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
def getCountTable(table):
|
||||||
|
a = 0
|
||||||
|
# print(table)
|
||||||
|
for i in table:
|
||||||
|
if table[int(a)] == '':
|
||||||
|
if table[int(a+1)] == '':
|
||||||
|
if table[int(a+2)] == '':
|
||||||
|
a = a + 1
|
||||||
|
a = a + 1
|
||||||
|
break
|
||||||
|
a = a + 1
|
||||||
|
# print("A =================== ",int(a))
|
||||||
|
return int((a)/6)
|
||||||
|
|
||||||
|
|
||||||
|
def getCountTable1(table):
|
||||||
|
# print("1111111111111",table)
|
||||||
|
a = 0
|
||||||
|
# print(table)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in range(len(table)):
|
||||||
|
if table[i] == '':
|
||||||
|
break
|
||||||
|
|
||||||
|
else:
|
||||||
|
a += 1
|
||||||
|
# print("a === ",a)
|
||||||
|
except TypeError:
|
||||||
|
print("ошибка")
|
||||||
|
a = 0
|
||||||
|
# for i in table:
|
||||||
|
# if table[int(a)] == '':
|
||||||
|
# if table[int(a+1)] == '':
|
||||||
|
# a = a + 1
|
||||||
|
# break
|
||||||
|
|
||||||
|
# a = a + 1
|
||||||
|
# print("A =================== ",int(a))
|
||||||
|
return int(a/6)
|
||||||
|
|
||||||
|
|
||||||
|
def GetPrep():
|
||||||
|
# gp = requests.get('http://127.0.0.1:5501/api/v1.0/dep_plan?dep_name=%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B8%D0%B7%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D1%85%20%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%20%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F&sem_no=1&tp_year=20').json()
|
||||||
|
gp = requests.get('http://127.0.0.1:5501/api/v1.0/teaches').json()
|
||||||
|
return gp
|
||||||
|
|
||||||
|
|
||||||
|
def getGroup():
|
||||||
|
gr = requests.get('http://127.0.0.1:5501/api/v1.0/groups').json()
|
||||||
|
return gr
|
||||||
|
|
||||||
|
|
||||||
|
def getPrepRasp(NamePrep, DayOfWeek="Понедельник"):
|
||||||
|
|
||||||
|
# print("Name Prep === ",NamePrep)
|
||||||
|
try:
|
||||||
|
grn = requests.get('http://127.0.0.1:5501/api/v1.0/teach_plan?teach_name=' +
|
||||||
|
NamePrep + '&sem_no=1&tp_year=20').json()
|
||||||
|
except TypeError:
|
||||||
|
grn = requests.get(
|
||||||
|
'http://127.0.0.1:5501/api/v1.0/teach_plan?teach_name=баринов к.а.&sem_no=1&tp_year=20').json()
|
||||||
|
table = ["", "", ""]
|
||||||
|
return table
|
||||||
|
a = 0
|
||||||
|
j = 0
|
||||||
|
table = ["", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", ""]
|
||||||
|
|
||||||
|
# f = False
|
||||||
|
for i in grn:
|
||||||
|
|
||||||
|
# print(DayOfWeek)
|
||||||
|
try:
|
||||||
|
if grn[i][0] == DayOfWeek:
|
||||||
|
# print(i)
|
||||||
|
# print("find day of week, i = ",i)
|
||||||
|
a = int(i) + 1
|
||||||
|
if a > 36:
|
||||||
|
return table
|
||||||
|
for j in grn:
|
||||||
|
a = a + 1
|
||||||
|
# print('j = ', int(j))
|
||||||
|
# print(a)
|
||||||
|
|
||||||
|
# print(len(grn[str(a)]))
|
||||||
|
|
||||||
|
if len(grn[str(a)]) == 1:
|
||||||
|
# print(table)
|
||||||
|
return table
|
||||||
|
|
||||||
|
table[6 * int(j)] = (grn[str(a)][0])
|
||||||
|
table[1 + 6 * int(j)] = (grn[str(a)][1])
|
||||||
|
table[2 + 6 * int(j)] = (grn[str(a)][2])
|
||||||
|
table[3 + 6 * int(j)] = (grn[str(a)][3])
|
||||||
|
table[4 + 6 * int(j)] = (grn[str(a)][4])
|
||||||
|
table[5 + 6 * int(j)] = (grn[str(a)][5])
|
||||||
|
except KeyError:
|
||||||
|
print("KeyError")
|
||||||
|
for i in range(48):
|
||||||
|
table[i] == ''
|
||||||
|
return table
|
||||||
|
|
||||||
|
|
||||||
|
def getGroupRasp(NameGroup, DayOfWeek="Понедельник"):
|
||||||
|
|
||||||
|
try:
|
||||||
|
grn = requests.get(
|
||||||
|
'http://127.0.0.1:5501/api/v1.0/tplan1?gp_name=' + NameGroup).json()
|
||||||
|
except TypeError:
|
||||||
|
grn = requests.get(
|
||||||
|
'http://127.0.0.1:5501/api/v1.0/tplan1?gp_name=' + '1басу1').json()
|
||||||
|
table = ["", "", ""]
|
||||||
|
return table
|
||||||
|
|
||||||
|
# print(DayOfWeek)
|
||||||
|
# table = ["","","","","",""]
|
||||||
|
a = 0
|
||||||
|
j = 0
|
||||||
|
table = ["", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", ""]
|
||||||
|
|
||||||
|
# f = False
|
||||||
|
for i in grn:
|
||||||
|
try:
|
||||||
|
# print(DayOfWeek)
|
||||||
|
if grn[i][0] == DayOfWeek:
|
||||||
|
# print(i)
|
||||||
|
|
||||||
|
a = int(i) + 1
|
||||||
|
if a > 36:
|
||||||
|
return table
|
||||||
|
for j in grn:
|
||||||
|
a = a + 1
|
||||||
|
# print('j = ', int(j))
|
||||||
|
# print(a)
|
||||||
|
|
||||||
|
# print(len(grn[str(a)]))
|
||||||
|
if len(grn[str(a)]) == 1:
|
||||||
|
return table
|
||||||
|
|
||||||
|
table[6 * int(j)] = (grn[str(a)][0])
|
||||||
|
table[1 + 6 * int(j)] = (grn[str(a)][1])
|
||||||
|
table[2 + 6 * int(j)] = (grn[str(a)][2])
|
||||||
|
table[3 + 6 * int(j)] = (grn[str(a)][3])
|
||||||
|
table[4 + 6 * int(j)] = (grn[str(a)][4])
|
||||||
|
table[5 + 6 * int(j)] = (grn[str(a)][5])
|
||||||
|
# print(table)
|
||||||
|
# print(len(grn[a + 1]))
|
||||||
|
# if len(grn[str(a + 1)]) == 1:
|
||||||
|
# return table
|
||||||
|
except KeyError:
|
||||||
|
print("KeyError")
|
||||||
|
for i in range(48):
|
||||||
|
table[i] == ''
|
||||||
|
return table
|
||||||
|
|
||||||
|
|
||||||
|
def getPrep(NamePrep):
|
||||||
|
url = 'https://bazis.madi.ru/stud/schedule.php?teacher='
|
||||||
|
tch = 'Остроух А.В.'
|
||||||
|
req = url + tch
|
||||||
|
prep = requests.get(req).json()
|
||||||
|
print(prep)
|
||||||
|
|
||||||
|
try:
|
||||||
|
grn = requests.get('http://127.0.0.1:5501/api/v1.0/teach_plan?teach_name=' +
|
||||||
|
NamePrep + '&sem_no=1&tp_year=20').json()
|
||||||
|
except TypeError:
|
||||||
|
grn = requests.get(
|
||||||
|
'http://127.0.0.1:5501/api/v1.0/teach_plan?teach_name=баринов к.а.&sem_no=1&tp_year=20').json()
|
||||||
|
table = ["", "", ""]
|
||||||
|
return table
|
||||||
|
a = 0
|
||||||
|
j = 0
|
||||||
|
table = ["", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", "",
|
||||||
|
"", "", "", "", "", ""]
|
||||||
|
print(grn)
|
||||||
|
f = False
|
||||||
|
# for i in grn:
|
||||||
|
|
||||||
|
# # print(DayOfWeek)
|
||||||
|
# if grn[i][0] == DayOfWeek:
|
||||||
|
# # print(i)
|
||||||
|
|
||||||
|
# a = int(i) + 1
|
||||||
|
# if a > 36:
|
||||||
|
# return table
|
||||||
|
# for j in grn:
|
||||||
|
# a = a + 1
|
||||||
|
# print('j = ', int(j))
|
||||||
|
# print(a)
|
||||||
|
|
||||||
|
# print(len(grn[str(a)]))
|
||||||
|
# if len(grn[str(a)]) == 1:
|
||||||
|
# return table
|
||||||
|
|
||||||
|
# table[6 * int(j)] = (grn[str(a)][0])
|
||||||
|
# table[1 + 6 * int(j)] = (grn[str(a)][1])
|
||||||
|
# table[2 + 6 * int(j)] = (grn[str(a)][2])
|
||||||
|
# table[3 + 6 * int(j)] = (grn[str(a)][3])
|
||||||
|
# table[4 + 6 * int(j)] = (grn[str(a)][4])
|
||||||
|
# table[5 + 6 * int(j)] = (grn[str(a)][5])
|
||||||
|
|
||||||
|
# def getRaspPrep():
|
||||||
|
# url = 'http://127.0.0.1:5501/api/v1.0/dep_plan?dep_name=%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%B0%D1%82%D0%B8%D0%B7%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D1%8B%D1%85%20%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%20%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F&sem_no=1&tp_year=20'
|
||||||
|
# prep = requests.get(url).json()
|
||||||
|
# print(prep)
|
||||||
|
|
||||||
|
# def getAllPrep():
|
||||||
|
# allprep = requests.get('https://bazis.madi.ru/stud/schedule.php?teachers=1').json()
|
||||||
|
# print(allprep)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
getPrep()
|
||||||
31
models.py
Normal file
31
models.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
from flask_marshmallow import Marshmallow
|
||||||
|
from app import app
|
||||||
|
|
||||||
|
db = SQLAlchemy(app)
|
||||||
|
|
||||||
|
ma = Marshmallow(app)
|
||||||
|
|
||||||
|
class User(db.Model):
|
||||||
|
fio = db.Column(db.String)
|
||||||
|
dolgnost = db.Column(db.String)
|
||||||
|
zvanie = db.Column(db.String)
|
||||||
|
date_created = db.Column(db.DateTime, auto_now_add=True)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return '<User %r>' % self.username
|
||||||
|
|
||||||
|
|
||||||
|
class UserSchema(ma.Schema):
|
||||||
|
class Meta:
|
||||||
|
# Fields to expose
|
||||||
|
fields = ("fio", "dolgnost", "zvanie", "_links")
|
||||||
|
|
||||||
|
# Smart hyperlinking
|
||||||
|
_links = ma.Hyperlinks(
|
||||||
|
{"self": ma.URLFor("user_detail", id="<id>"), "collection": ma.URLFor("users")}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
27
requirements.txt
Normal file
27
requirements.txt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
beautifulsoup4==4.9.1
|
||||||
|
bs4==0.0.1
|
||||||
|
certifi==2020.6.20
|
||||||
|
chardet==3.0.4
|
||||||
|
click==7.1.2
|
||||||
|
dnspython==2.0.0
|
||||||
|
email-validator==1.1.1
|
||||||
|
Flask==1.1.2
|
||||||
|
Flask-Admin==1.5.6
|
||||||
|
Flask-Login==0.5.0
|
||||||
|
flask-marshmallow==0.13.0
|
||||||
|
Flask-SQLAlchemy==2.4.4
|
||||||
|
Flask-WTF==0.14.3
|
||||||
|
idna==2.10
|
||||||
|
itsdangerous==1.1.0
|
||||||
|
Jinja2==2.11.2
|
||||||
|
lxml==4.5.2
|
||||||
|
MarkupSafe==1.1.1
|
||||||
|
marshmallow==3.7.1
|
||||||
|
requests==2.24.0
|
||||||
|
six==1.15.0
|
||||||
|
soupsieve==2.0.1
|
||||||
|
SQLAlchemy==1.3.18
|
||||||
|
urllib3==1.25.9
|
||||||
|
Werkzeug==1.0.1
|
||||||
|
WTForms==2.3.1
|
||||||
|
WTForms-SQLAlchemy==0.1
|
||||||
7
static/css/bootstrap-grid.min.css
vendored
Normal file
7
static/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/css/bootstrap-grid.min.css.map
Normal file
1
static/css/bootstrap-grid.min.css.map
Normal file
File diff suppressed because one or more lines are too long
7
static/css/bootstrap.min.css
vendored
Normal file
7
static/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/css/bootstrap.min.css.map
Normal file
1
static/css/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
50
static/css/egg.css
Normal file
50
static/css/egg.css
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
body {
|
||||||
|
background-image: url('../img/fon.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.group_img {
|
||||||
|
width: 50%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.data_text_up {
|
||||||
|
font-size: 150%;
|
||||||
|
margin-top: 120%;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.data_text_down {
|
||||||
|
font-size: 150%;
|
||||||
|
margin-bottom: 100%;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_text {
|
||||||
|
font-size: 150%;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.group_text, .ekz_text, .prep_text, .dop_text {
|
||||||
|
color: #790506;
|
||||||
|
font-size: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group, .ekz, .prep, .dop {
|
||||||
|
background-color: #f4cb06;
|
||||||
|
/* border-radius: 5%; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading {
|
||||||
|
font-size: 45px;
|
||||||
|
color:#d0a701;
|
||||||
|
}
|
||||||
|
|
||||||
48
static/css/main.css
Normal file
48
static/css/main.css
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
body {
|
||||||
|
/* background-image: url(images/bg.png); */
|
||||||
|
|
||||||
|
/*background: url('../img/fon.png');*/
|
||||||
|
background: url('../img/fon.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.group_img {
|
||||||
|
width: 50%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
.data_text_up {
|
||||||
|
font-size: 150%;
|
||||||
|
margin-top: 120%;
|
||||||
|
}
|
||||||
|
.data_text_down {
|
||||||
|
font-size: 150%;
|
||||||
|
margin-bottom: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data_text {
|
||||||
|
font-size: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group_text, .ekz_text, .prep_text, .dop_text {
|
||||||
|
color:white;
|
||||||
|
font-size: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group, .ekz, .prep, .dop {
|
||||||
|
background-color: #034876;
|
||||||
|
/* border-radius: 5%; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.heading {
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
94
static/css/rasp_dop.css
Normal file
94
static/css/rasp_dop.css
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
body {
|
||||||
|
|
||||||
|
background-image: url('../img/fon.png');
|
||||||
|
/* */
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
.btn_back {
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 3%;
|
||||||
|
margin-left: 3%;
|
||||||
|
font-size: 30px;
|
||||||
|
color:#1f446e;
|
||||||
|
}
|
||||||
|
.btn_back:hover {
|
||||||
|
color:#1f446e
|
||||||
|
}
|
||||||
|
.rasp_data {
|
||||||
|
position: absolute;
|
||||||
|
padding-bottom: 1%;
|
||||||
|
padding-left: 1%;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.back_image {
|
||||||
|
position: fixed;
|
||||||
|
width: 5%;
|
||||||
|
margin-left: 2%;
|
||||||
|
margin-top: 2%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.modal-header {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
}
|
||||||
|
.custom-select {
|
||||||
|
background-color: #1e2e50;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0%;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data {
|
||||||
|
background-color: #034876;
|
||||||
|
color:white;
|
||||||
|
padding-top: 1%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
border-radius: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17spx;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
hr
|
||||||
|
{
|
||||||
|
height: 5px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
color:white;
|
||||||
|
border-color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
94
static/css/rasp_ekz.css
Normal file
94
static/css/rasp_ekz.css
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
body {
|
||||||
|
|
||||||
|
background-image: url('../img/fon.png');
|
||||||
|
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
.rasp_data {
|
||||||
|
position: absolute;
|
||||||
|
padding-bottom: 1%;
|
||||||
|
padding-left: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back_image {
|
||||||
|
position: fixed;
|
||||||
|
width: 5%;
|
||||||
|
margin-left: 2%;
|
||||||
|
margin-top: 2%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.btn_back {
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 3%;
|
||||||
|
margin-left: 3%;
|
||||||
|
font-size: 30px;
|
||||||
|
color:#1f446e;
|
||||||
|
}
|
||||||
|
.btn_back:hover {
|
||||||
|
color:#1f446e
|
||||||
|
}
|
||||||
|
.modal-header {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
}
|
||||||
|
.custom-select {
|
||||||
|
background-color: #1e2e50;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0%;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data {
|
||||||
|
background-color: #034876;
|
||||||
|
color:white;
|
||||||
|
padding-top: 1%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
border-radius: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17spx;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
hr
|
||||||
|
{
|
||||||
|
height: 5px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
color:white;
|
||||||
|
border-color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
147
static/css/rasp_group.css
Normal file
147
static/css/rasp_group.css
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
body {
|
||||||
|
/*
|
||||||
|
font:BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||||
|
/* background-image: url(images/bg.png); */
|
||||||
|
|
||||||
|
background-image: url('../img/fon.png');
|
||||||
|
|
||||||
|
/* */
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.rasp_data {
|
||||||
|
position: absolute;
|
||||||
|
padding-bottom: 1%;
|
||||||
|
padding-left: 1%;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.frm1 {
|
||||||
|
opacity: 0;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.frm {
|
||||||
|
|
||||||
|
font-size: 25px;
|
||||||
|
color: white;
|
||||||
|
/* background-color: #1e2e50; */
|
||||||
|
background-color: white;
|
||||||
|
color:#1f446e;
|
||||||
|
border: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
.c_form {
|
||||||
|
background-color: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
background-color: white;
|
||||||
|
color: #1f446e;
|
||||||
|
text-decoration: bold;
|
||||||
|
border-radius: 2%;
|
||||||
|
outline: none;
|
||||||
|
font-size: 25px;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.modal-header {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
background-color: white;
|
||||||
|
color: #1f446e;
|
||||||
|
text-decoration: bold;
|
||||||
|
border-radius: 2%;
|
||||||
|
outline: none;
|
||||||
|
font-size: 25px;
|
||||||
|
border: 0;
|
||||||
|
position: relative;
|
||||||
|
-webkit-appearance: none;/* Chrome */
|
||||||
|
-moz-appearance: none;/* Firefox */
|
||||||
|
appearance: none;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.div-select {
|
||||||
|
background-color: #1f446e;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0%;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.custom-select {
|
||||||
|
background-color: #1f446e;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0%;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
.data {
|
||||||
|
background-color: #034876;
|
||||||
|
color:white;
|
||||||
|
padding-top: 1%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
border-radius: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17spx;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
hr
|
||||||
|
{
|
||||||
|
height: 5px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
color:white;
|
||||||
|
border-color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.back_image {
|
||||||
|
position: fixed;
|
||||||
|
width: 5%;
|
||||||
|
margin-left: 2%;
|
||||||
|
margin-top: 2%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_back {
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 3%;
|
||||||
|
margin-left: 3%;
|
||||||
|
font-size: 30px;
|
||||||
|
color:#1f446e;
|
||||||
|
}
|
||||||
|
.btn_back:hover {
|
||||||
|
color:#1f446e
|
||||||
|
}
|
||||||
94
static/css/rasp_prep.css
Normal file
94
static/css/rasp_prep.css
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
body {
|
||||||
|
|
||||||
|
background-image: url('../img/fon.png');
|
||||||
|
/* */
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: fixed;
|
||||||
|
width: 6%;
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 92%;
|
||||||
|
}
|
||||||
|
.rasp_data {
|
||||||
|
position: absolute;
|
||||||
|
padding-bottom: 1%;
|
||||||
|
padding-left: 1%;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.modal-header {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
}
|
||||||
|
.custom-select {
|
||||||
|
background-color: #1e2e50;
|
||||||
|
color: white;
|
||||||
|
border-radius: 0%;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data {
|
||||||
|
background-color: #034876;
|
||||||
|
color:white;
|
||||||
|
padding-top: 1%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
border-radius: 0%;
|
||||||
|
}
|
||||||
|
.btn_back {
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 3%;
|
||||||
|
margin-left: 3%;
|
||||||
|
font-size: 30px;
|
||||||
|
color:#1f446e;
|
||||||
|
}
|
||||||
|
.btn_back:hover {
|
||||||
|
color:#1f446e
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.back_image {
|
||||||
|
position: fixed;
|
||||||
|
width: 5%;
|
||||||
|
margin-left: 2%;
|
||||||
|
margin-top: 2%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17spx;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
hr
|
||||||
|
{
|
||||||
|
height: 5px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
|
||||||
|
background-color: #1f446e;
|
||||||
|
color:white;
|
||||||
|
border-color:black;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
32
static/css/styles.css
Normal file
32
static/css/styles.css
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
.box1 {
|
||||||
|
background-color: wheat;
|
||||||
|
}
|
||||||
|
.box1 img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box2 {
|
||||||
|
background-color: sandybrown;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box2 img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box3 {
|
||||||
|
background-color: tan;
|
||||||
|
}
|
||||||
|
.box3 img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box4 {
|
||||||
|
background-color: peru
|
||||||
|
}
|
||||||
|
|
||||||
|
.box_main {
|
||||||
|
|
||||||
|
background-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BIN
static/img/fon.png
Normal file
BIN
static/img/fon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
static/img/logo.png
Normal file
BIN
static/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
static/img/rasp_dop.png
Normal file
BIN
static/img/rasp_dop.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
BIN
static/img/rasp_ekz.png
Normal file
BIN
static/img/rasp_ekz.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
static/img/rasp_group.png
Normal file
BIN
static/img/rasp_group.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
static/img/rasp_prep.png
Normal file
BIN
static/img/rasp_prep.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
7
static/js/group.js
Normal file
7
static/js/group.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function SomeFunc() {
|
||||||
|
console.log("started");
|
||||||
|
var elem = document.getElementById("grpselector");
|
||||||
|
var strUser = e.options[e.selectedIndex].text;
|
||||||
|
console.log(strUser)
|
||||||
|
}
|
||||||
|
window.onload = SomeFunc;
|
||||||
1
static/js/js
Normal file
1
static/js/js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
t
|
||||||
2
static/js/js.js
Normal file
2
static/js/js.js
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
a = getElementById('group__time')
|
||||||
|
alert(a)
|
||||||
21
templates/addsql.html
Normal file
21
templates/addsql.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form method="post" action="{{ url_for('addsql') }}">
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ form.fioField.label.text }}
|
||||||
|
{{ form.fioField }}
|
||||||
|
{{ form.dolgnostField.label.text }}
|
||||||
|
{{ form.dolgnostField }}
|
||||||
|
{{ form.stepenField.label.text }}
|
||||||
|
{{ form.stepenField }}
|
||||||
|
{{ form.photoField }}
|
||||||
|
{{ form.submit }}
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
templates/admin.html
Normal file
10
templates/admin.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
18
templates/adminLogin.html
Normal file
18
templates/adminLogin.html
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>AdminLogin</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Назови имя, друг и пройдешь</h1>
|
||||||
|
<form action="{{ url_for('adminLogin') }}" method="post">
|
||||||
|
{{ form.username }}
|
||||||
|
{{ form.password }}
|
||||||
|
{{ form.submit }}
|
||||||
|
{{ form.csrf_token }}
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
93
templates/egg.html
Normal file
93
templates/egg.html
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="styles/egg.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background-image: url('images/fon_egg.jpg');">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="main.html"><img class="logo" src="images/logo_egg.png"></a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-light justify-content-center">
|
||||||
|
<h1 class="col-10 mt-3 text-center heading" style="float:center"> <b>Информационная система кафедры АСУ</b></h1>
|
||||||
|
<!-- <a class="navbar-brand" href=""><img class="col-12" style="float:right" src="img/madi2500.png"></a> -->
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container mt-3" id="buttons">
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center group rounded border border-danger">
|
||||||
|
<a class="btn " href="rasp_group.html">
|
||||||
|
<p class="group_text pt-2"><b>Расписание по группам</b></p>
|
||||||
|
<img class="group_img align-middle" src="images/group_img.png" alt="">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center "> <p class="data_text_up ">Четверг</p></div>
|
||||||
|
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center ekz rounded border border-danger">
|
||||||
|
<a class="btn " href="rasp_ekz.html">
|
||||||
|
<p class="ekz_text pt-2"><b>Расписание экзаменов</b></p>
|
||||||
|
<img class="ekz_img align-middle" src="images/ekz_img.png" alt="">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
<div class="col-12 text-center ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-5"></div>
|
||||||
|
<div class="col-2"> <p class="data_text">10:00<br>12 июля</p> </div>
|
||||||
|
<div class="col-5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded border border-danger">
|
||||||
|
<a class="btn "href="rasp_prep.html">
|
||||||
|
<p class="prep_text pt-2"><b>Расписание преподавателей<br>кафедры АСУ</b></p>
|
||||||
|
<img class="prep_img align-middle" src="images/prep_img.png" alt="">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center "> <p class="data_text_down ">Знаменатель</p></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded border border-danger">
|
||||||
|
<a class="btn" href="rasp_dop.html">
|
||||||
|
<p class="dop_text pt-2"><b>Расписание дополнительных занятий<br>кафедры АСУ</b></p>
|
||||||
|
<img class="dop_img align-middle" src="images/dop_img.png" alt="">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||||
|
</html>
|
||||||
14
templates/form.html
Normal file
14
templates/form.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Form</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form method="post" action="{{ url_for('frm') }}">
|
||||||
|
{{ form.group }}
|
||||||
|
{{ form.day }}
|
||||||
|
<input type="submit">
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
91
templates/index.html
Normal file
91
templates/index.html
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-grid.min.css')}}">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css')}}">
|
||||||
|
<!---<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> -->
|
||||||
|
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css')}}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background-image: url({{ url_for('static', filename='img/fon.png') }})">
|
||||||
|
<nav class="navbar navbar-expand-sm pb-3 navbar-light justify-content-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-center">
|
||||||
|
<h1 class="zagolovok" style="float:center"> Информационная система кафедры АСУ</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="container mt-3" id="buttons">
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center group rounded">
|
||||||
|
<a class="btn " href="rasp_group.html">
|
||||||
|
<p class="group_text pt-2" onclick="proverka()">Расписание по группам</p>
|
||||||
|
<img class="group_img align-middle" src="{{url_for('static', filename='img/rasp_group.png')}}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center ">
|
||||||
|
<p class="data_text_up ">{{day_week}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center ekz rounded">
|
||||||
|
<a class="btn " href="rasp_ekz.html">
|
||||||
|
<p class="ekz_text pt-2">Расписание экзаменов</p>
|
||||||
|
<img class="group_img align-middle" src="{{url_for('static', filename='img/rasp_ekz.png')}}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
<div class="col-12 text-center ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-5"></div>
|
||||||
|
<div class="col-2">
|
||||||
|
<p class="data_text">{{days}}<br></p>
|
||||||
|
</div>
|
||||||
|
<div class="col-5"></div>
|
||||||
|
|
||||||
|
<div class=flash>{{ message }}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded">
|
||||||
|
<a class="btn " href="rasp_prep.html">
|
||||||
|
<p class="prep_text pt-2">Расписание преподавателей<br>кафедры АСУ</p>
|
||||||
|
<img class="prep_img align-middle" src="{{url_for('static', filename='img/rasp_prep.png')}}">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center ">
|
||||||
|
<p class="data_text_down ">{{week}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded">
|
||||||
|
<a class="btn" href="rasp_dop.html">
|
||||||
|
<p class="dop_text pt-2">Расписание дополнительных занятий<br>кафедры АСУ</p>
|
||||||
|
<img class="dop_img align-middle" src="{{url_for('static', filename='img/rasp_dop.png')}}">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</html>
|
||||||
93
templates/main.html
Normal file
93
templates/main.html
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css')}}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background-image: url('images/bg.png');">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="egg.html"><img class="logo" src="images/logo.png"></a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-light justify-content-center">
|
||||||
|
<h1 class="col-10 mt-3 text-center heading" style="float:center"> Информационная система кафедры АСУ</h1>
|
||||||
|
<!-- <a class="navbar-brand" href=""><img class="col-12" style="float:right" src="img/madi2500.png"></a> -->
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container mt-3" id="buttons">
|
||||||
|
<div class="row justify-content-between">
|
||||||
|
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center group rounded">
|
||||||
|
<a class="btn " href="href='{{ url_for( 'rasp_group.html' ) }}'">
|
||||||
|
<p class="group_text pt-2">Расписание по группам</p>
|
||||||
|
<img class="group_img align-middle" src="images/group_img.png" alt="">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center "> <p class="data_text_up ">Четверг</p></div>
|
||||||
|
|
||||||
|
<div class="col-5 pt-3 pb-3 mb-2 text-center ekz rounded">
|
||||||
|
<a class="btn " href="rasp_ekz.html">
|
||||||
|
<p class="ekz_text pt-2">Расписание экзаменов</p>
|
||||||
|
<img class="ekz_img align-middle" src="images/ekz_img.png" alt="">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
<div class="col-12 text-center ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-5"></div>
|
||||||
|
<div class="col-2"> <p class="data_text">10:00<br>12 июля</p> </div>
|
||||||
|
<div class="col-5"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100"></div>
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded">
|
||||||
|
<a class="btn "href="rasp_prep.html">
|
||||||
|
<p class="prep_text pt-2">Расписание преподавателей<br>кафедры АСУ</p>
|
||||||
|
<img class="prep_img align-middle" src="images/prep_img.png" alt="">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-2 text-center "> <p class="data_text_down ">Знаменатель</p></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-5 mt-1 text-center prep rounded">
|
||||||
|
<a class="btn" href="rasp_dop.html">
|
||||||
|
<p class="dop_text pt-2">Расписание дополнительных занятий<br>кафедры АСУ</p>
|
||||||
|
<img class="dop_img align-middle" src="images/dop_img.png" alt="">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||||
|
</html>
|
||||||
191
templates/rasp_dop.html
Normal file
191
templates/rasp_dop.html
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/rasp_dop.css')}}">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a href="#" class="" ><img class="logo align-middle" src="{{url_for('static', filename='img/logo.png')}}"></a>
|
||||||
|
|
||||||
|
<a href="index.html" class="btn_back"> Назад </a>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-light justify-content-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-center">
|
||||||
|
<h1 class="" style="float:center"> Расписание дополнительных занятий</h1>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container" id=dropdownMenu>
|
||||||
|
<div class="row justify-content-around ">
|
||||||
|
<div class="form-group col-lg-3 text-center">
|
||||||
|
<label for="exampleFormControlSelect3 ">День недели</label>
|
||||||
|
<select class="custom-select form-control-lg border-0 text-center" id="exampleFormControlSelect1">
|
||||||
|
<option>Не выбрано</option>
|
||||||
|
<option>Понедельник</option>
|
||||||
|
<option>Вторник</option>
|
||||||
|
<option>Среда</option>
|
||||||
|
<option>Четверг</option>
|
||||||
|
<option>Пятница</option>
|
||||||
|
<option>Суббота</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="form-group col-lg-3 text-center">
|
||||||
|
<label for="exampleFormControlSelect4">Тип недели</label>
|
||||||
|
<select class="custom-select form-control-lg border-0 text-center" id="exampleFormControlSelect1">
|
||||||
|
<option>Не выбрано</option>
|
||||||
|
<option>Числитель</option>
|
||||||
|
<option>Знаменатель</option>
|
||||||
|
</select>
|
||||||
|
</div> -->
|
||||||
|
<div class="form-group col-4 text-center">
|
||||||
|
<label for="exampleFormControlSelect1">Преподаватель</label>
|
||||||
|
<select class="custom-select form-control-lg border-top text-center" id="exampleFormControlSelect1">
|
||||||
|
<option>Не выбрано</option>
|
||||||
|
<!-- <option></option> -->
|
||||||
|
<option>Сальный А.Г</option>
|
||||||
|
<!-- <option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option> -->
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr >
|
||||||
|
<div class="container " id=table>
|
||||||
|
<table class="table table-striped table-bordered ">
|
||||||
|
<thead >
|
||||||
|
<tr>
|
||||||
|
<th scope="col">№</th>
|
||||||
|
<th scope="col">Время занятий</th>
|
||||||
|
<th scope="col">Группа</th>
|
||||||
|
<th scope="col">Наименование дисциплины</th>
|
||||||
|
<th scope="col">Вид занятий</th>
|
||||||
|
<th scope="col">Аудитория</th>
|
||||||
|
<th scope="col">Преподаватель</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">1</th>
|
||||||
|
<td class="col-auto">10:00 - 11:30</td>
|
||||||
|
<td class="col-auto">2бАСУ1</td>
|
||||||
|
<td class="col-auto">Основы компьютерной и инженерной графики </td>
|
||||||
|
<td class="col-auto">Консультация</td>
|
||||||
|
<td class="col-auto">617л </td>
|
||||||
|
<td class="col-auto">Сальный А.Г.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">2</th>
|
||||||
|
<td class="col-auto">11:30 - 13:00</td>
|
||||||
|
<td class="col-auto">2бАСУ2</td>
|
||||||
|
<td class="col-auto">Основы компьютерной и инженерной графики </td>
|
||||||
|
<td class="col-auto">Дополнительный экзамен</td>
|
||||||
|
<td class="col-auto">620л </td>
|
||||||
|
<td class="col-auto">Сальный А.Г.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">3</th>
|
||||||
|
<td class="col-auto">14:00 - 14:30</td>
|
||||||
|
<td class="col-auto">2МС1</td>
|
||||||
|
<td class="col-auto">Информатика </td>
|
||||||
|
<td class="col-auto">Консультация</td>
|
||||||
|
<td class="col-auto">617л </td>
|
||||||
|
<td class="col-auto">Сальный А.Г.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4</th>
|
||||||
|
<td class="col-auto">14:30 - 16:00</td>
|
||||||
|
<td class="col-auto">2МС1</td>
|
||||||
|
<td class="col-auto">Информатика</td>
|
||||||
|
<td class="col-auto">Дополнительный экзамен</td>
|
||||||
|
<td class="col-auto">620л </td>
|
||||||
|
<td class="col-auto">Сальный А.Г.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<div class="container data text-center" id="fotdata">
|
||||||
|
<div class="row justify-content-around">
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">{{days}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3 ">
|
||||||
|
<h5 class="justify-content-center ">{{day_week}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">Числитель</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center " id="group__time">10:00</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog border-0" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col modul-foto">
|
||||||
|
<img src="images/Alex.jpg" class="border border-dark">
|
||||||
|
</div>
|
||||||
|
<div class="col text-center">
|
||||||
|
Сальный Александр Геннадьевич, Старший преподаватель
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary " data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<footer class="page-footer justify-content-center mx-auto ">
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
<!-- Footer -->
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
187
templates/rasp_ekz.html
Normal file
187
templates/rasp_ekz.html
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/rasp_ekz.css')}}">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" class="" ><img class="logo align-middle" src="{{url_for('static', filename='img/logo.png')}}"></a>
|
||||||
|
<a href="index.html" class="btn_back"> Назад </a>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-light justify-content-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-center">
|
||||||
|
<h1 class="" style="float:center"> Расписание экзаменов</h1>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-center pt-3">
|
||||||
|
<h1 >Актуальная информация появится позже</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<div class="container" id=dropdownMenu>
|
||||||
|
<div class="row justify-content-around ">
|
||||||
|
<div class="form-group col-4 text-center">
|
||||||
|
<label for="exampleFormControlSelect1">Курс</label>
|
||||||
|
<select class="custom-select form-control-lg border-top text-center" id="exampleFormControlSelect1">
|
||||||
|
<option>Не выбрано</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-lg-4 text-center">
|
||||||
|
<label for="exampleFormControlSelect2">Группа</label>
|
||||||
|
<select class="custom-select form-control-lg border-0 text-center" id="exampleFormControlSelect1">
|
||||||
|
<option>Не выбрано</option>
|
||||||
|
<option>4ЗбАСУс</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
<option>5</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
<!-- <hr >
|
||||||
|
<div class="container " id=table>
|
||||||
|
<table class="table table-striped table-bordered ">
|
||||||
|
<thead >
|
||||||
|
<tr>
|
||||||
|
<th scope="col">№</th>
|
||||||
|
<th scope="col">Наименование дисциплины</th>
|
||||||
|
<th scope="col">Дата экзамена</th>
|
||||||
|
<th scope="col">Время начала экзамена</th>
|
||||||
|
<th scope="col">Аудитория</th>
|
||||||
|
<th scope="col">Преподаватель</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">1</th>
|
||||||
|
<td class="col-auto">Основы компьютерной и демонтстрацинной графики</td>
|
||||||
|
<td class="col-auto">10.07.20</td>
|
||||||
|
<td class="col-auto">10:00</td>
|
||||||
|
<td class="col-auto">609л</td>
|
||||||
|
<td class="col-auto"><a data-toggle="modal" data-target="#exampleModal" href="#">Сальный А.Г.</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">2</th>
|
||||||
|
<td class="col-auto">Инженерная и компьютерная графика
|
||||||
|
</td>
|
||||||
|
<td class="col-auto">10.07.20</td>
|
||||||
|
<td class="col-auto">10:00</td>
|
||||||
|
<td class="col-auto">609л</td>
|
||||||
|
<td class="col-auto"><a data-toggle="modal" data-target="#exampleModal" href="#">Сальный А.Г.</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">3</th>
|
||||||
|
<td class="col-auto">Визуальное программирование</td>
|
||||||
|
<td class="col-auto">10.07.20</td>
|
||||||
|
<td class="col-auto">10:00</td>
|
||||||
|
<td class="col-auto">609л</td>
|
||||||
|
<td class="col-auto"><a data-toggle="modal" data-target="#exampleModal" href="#">Сальный А.Г.</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4</th>
|
||||||
|
<td class="col-auto">Информатика</td>
|
||||||
|
<td class="col-auto">10.07.20</td>
|
||||||
|
<td class="col-auto">10:00</td>
|
||||||
|
<td class="col-auto">609л</td>
|
||||||
|
<td class="col-auto"><a data-toggle="modal" data-target="#exampleModal" href="#">Сальный А.Г.</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<div class="container-fluid data text-center" id="fotdata">
|
||||||
|
<div class="row justify-content-around">
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">10 июля 2020</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3 ">
|
||||||
|
<h5 class="justify-content-center ">Четверг</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">Числитель</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">10:00</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog border-0" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col modul-foto">
|
||||||
|
<img src="images/Alex.jpg" class="border border-dark">
|
||||||
|
</div>
|
||||||
|
<div class="col text-center">
|
||||||
|
Сальный Александр Геннадьевич, Старший преподаватель
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary " data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<footer class="page-footer justify-content-center mx-auto ">
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
<!-- Footer -->
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
176
templates/rasp_group.html
Normal file
176
templates/rasp_group.html
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
|
||||||
|
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
|
||||||
|
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='/css/rasp_group.css')}}">
|
||||||
|
<script src="{{url_for('static', filename='js/js.js')}}"> </script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background-image: url_for('static', filename='img/fon.png');">
|
||||||
|
|
||||||
|
<a href="#" class=""><img class="logo align-middle" src="{{url_for('static', filename='img/logo.png')}}"></a>
|
||||||
|
|
||||||
|
<a href="index.html" class="btn_back"> Назад </a>
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm pb-3 navbar-light justify-content-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-center">
|
||||||
|
<h1 class="" style="float:center"> Расписание занятий по группам</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- <div class="container bg" id="dropdownMenu">
|
||||||
|
<div class="row justify-content-around "> -->
|
||||||
|
|
||||||
|
<div class="container justify-content-around pt-3 form-group c_form pt-1 text-center">
|
||||||
|
|
||||||
|
|
||||||
|
<form method="post" class="form-control-lg border-0 text-center" action="{{ url_for('rasp_group') }}">
|
||||||
|
<div class="row justify-content-around text-center ">
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">Группа<p class="pt-1">{{ form.group }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">День недели<p class="pt-1">{{ form.day }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">
|
||||||
|
<p class="pt-3"></p>{{form.submit }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container" id=table>
|
||||||
|
<table class="table table-striped table-bordered ">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">№</th>
|
||||||
|
<th scope="col">Время занятий</th>
|
||||||
|
<th scope="col">Наименование дисциплины</th>
|
||||||
|
<th scope="col">Вид занятий</th>
|
||||||
|
<th scope="col">Периодичность занятий</th>
|
||||||
|
<th scope="col">Аудитория</th>
|
||||||
|
<th scope="col">Преподаватель</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for i in range(countStr) %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{{i + 1}}</th>
|
||||||
|
<td class="col-auto">{{table[6 * i]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 1]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 2]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 3]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 4]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 5]}}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
|
<th scope="row">1</th>
|
||||||
|
<td class="col-auto">{{table[i][0]}}</td>
|
||||||
|
<td class="col-auto">{{table[i][1]}}</td>
|
||||||
|
<td class="col-auto">{{table[i][2]}}</td>
|
||||||
|
<td class="col-auto">{{table[i][3]}}</td>
|
||||||
|
<td class="col-auto">{{table[i][4]}}</td>
|
||||||
|
<td class="col-auto"><a data-toggle="modal" data-target="#exampleModal" href="#">{{table[5]}}</a></td>
|
||||||
|
</tr> -->
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container data text-center" id="fotdata">
|
||||||
|
<div class="row justify-content-around">
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">{{days}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3 ">
|
||||||
|
<h5 class="justify-content-center ">{{day_week}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">Числитель</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center " id="group__time">10:00</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog border-0" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col modul-foto">
|
||||||
|
<img src="images/Alex.jpg" class="border border-dark">
|
||||||
|
</div>
|
||||||
|
<div class="col text-center">
|
||||||
|
Сальный Александр Геннадьевич, Старший преподаватель
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary " data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<footer class="page-footer justify-content-center mx-auto ">
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
<!-- Footer -->
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</html>
|
||||||
158
templates/rasp_prep.html
Normal file
158
templates/rasp_prep.html
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Терминал АСУ</title>
|
||||||
|
<link rel="stylesheet" href="css/bootstrap-grid.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
|
||||||
|
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
|
||||||
|
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
|
||||||
|
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='/css/rasp_group.css')}}">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#" class=""><img class="logo align-middle" src="{{url_for('static', filename='img/logo.png')}}"></a>
|
||||||
|
<a href="index.html" class="btn_back"> Назад </a>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-sm navbar-light justify-content-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 text-center">
|
||||||
|
<h1 class="" style="float:center"> Расписание по преподавателям</h1>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container justify-content-around pt-3 form-group c_form pt-1 text-center">
|
||||||
|
|
||||||
|
|
||||||
|
<form method="post" class="form-control-lg border-0 text-center" action="{{ url_for('rasp_prep') }}">
|
||||||
|
<div class="row justify-content-around text-center ">
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">Преподаватель<p class="pt-1">{{ form.stepenField }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">День недели<p class="pt-1">{{ form.day }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group div-select col-lg-4 pt-2 text-center">
|
||||||
|
<p class="pt-3"></p>{{form.submit1 }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container" id=table>
|
||||||
|
<table class="table table-striped table-bordered ">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">№</th>
|
||||||
|
<th scope="col">Время занятий</th>
|
||||||
|
<th scope="col">Занятия на неделе</th>
|
||||||
|
<th scope="col">Аудитория</th>
|
||||||
|
<th scope="col">Группа</th>
|
||||||
|
<th scope="col">Дисциплина</th>
|
||||||
|
<th scope="col">Тип занятий</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for i in range(countStr) %}
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{{i + 1}}</th>
|
||||||
|
<td class="col-auto">{{table[6 * i]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 1]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 2]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 3]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 4]}}</td>
|
||||||
|
<td class="col-auto">{{table[6 * i + 5]}}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
<div class="container-fluid data text-center" id="fotdata">
|
||||||
|
<div class="row justify-content-around">
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">{{days}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3 ">
|
||||||
|
<h5 class="justify-content-center ">{{day_week}}</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">Числитель</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="data col-3">
|
||||||
|
<h5 class="justify-content-center ">10:00</h5>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||||
|
aria-hidden="true">
|
||||||
|
<div class="modal-dialog border-0" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel"></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col modul-foto">
|
||||||
|
<img src="images/Alex.jpg" class="border border-dark">
|
||||||
|
</div>
|
||||||
|
<div class="col text-center">
|
||||||
|
Сальный Александр Геннадьевич, Старший преподаватель
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary " data-dismiss="modal">Close</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<footer class="page-footer justify-content-center mx-auto ">
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
<!-- Footer -->
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user