Adding files

This commit is contained in:
Tomasz 2021-01-23 12:23:24 +01:00
parent 13f59835f2
commit 67a2957d86
75 changed files with 26933 additions and 0 deletions

1
.envsample Normal file
View file

@ -0,0 +1 @@
SECRET_KEY = YOUR_SECRET_KEY_HERE

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

29
.github/workflows/python-app.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Python application
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
SECRET_KEY: SECRET_KEY123
services:
postgres:
image: postgres:10.8
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: psycopg2 prerequisites
run: sudo apt-get install python-dev libpq-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest-django
- name: Run tests
run: python manage.py test

151
.gitignore vendored Normal file
View file

@ -0,0 +1,151 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
### VisualStudioCode ###
.vscode/*
*.code-workspace
.idea/*
.venv/*
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv/*
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
node_modules/

33
README.md Normal file
View file

@ -0,0 +1,33 @@
# Wulkanowy-web
🌋 Unofficial browser VULCAN UONET+ register client for both students and their parents
![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg)
[![Discord](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56)](https://discord.gg/vccAQBr)
# Development
## 1. Install webpack and dependencies.
```shell
npm install webpack
pip install -r requirements.txt
```
## 2. Create .env and make migrations
In the .env file put the code:
```shell
SECRET_KEY = writeanythinghere
```
After saving the files, we migrate with these commands:
```shell
python manage.py makemigrations
python manage.py migrate
```
and modify the .envsample file as you would the .env file
THE SECRET KEY MUST BE THE SAME
## 3. Start the server!
```shell
npm run dev
python manage.py runserver
```
or if you run Windows you can run:
```shell
runserver.bat
```

33
app/API/attendance.py Normal file
View file

@ -0,0 +1,33 @@
import requests
import json
def get_attendance(register_id, register_r, oun, s, date):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
attendance_lessons = requests.post(oun+'/FrekwencjaStatystykiPrzedmioty.mvc/Get', headers=headers, cookies=cookies)
attendance_json_id = attendance_lessons.json()['data'][0]['Id']
attendance = requests.post(oun+'/Frekwencja.mvc/Get', headers=headers, cookies=cookies, json={'idTypWpisuFrekwencji': attendance_json_id, 'data': date})
return [attendance.json(), attendance_lessons.json()]

52
app/API/dashboard.py Normal file
View file

@ -0,0 +1,52 @@
import json
import requests
import re
from bs4 import BeautifulSoup
def get_dashboard(register_id, register_r, s, diary_url, symbol):
cookies = s
if diary_url != 'http://cufs.fakelog.cf/':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
diary_url = 'http://uonetplus.vulcan.net.pl/'
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
diary_url = 'http://uonetplus.fakelog.cf/'
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
index = requests.get(f'{diary_url}{symbol}/Start.mvc/Index', headers=headers, cookies=cookies)
permissions_value = re.search("permissions: '(.)*'", index.text)
permissions_value = permissions_value.group()
permissions_value = permissions_value.replace('permissions: ', '').replace("'", "")
json = {
"permissions": permissions_value
}
last_notes = requests.post(f'{diary_url}{symbol}/Start.mvc/GetLastNotes', headers=headers, cookies=cookies, json=json)
free_days = requests.post(f'{diary_url}{symbol}/Start.mvc/GetFreeDays', headers=headers, cookies=cookies, json=json)
lucky_number = requests.post(f'{diary_url}{symbol}/Start.mvc/GetKidsLuckyNumbers', headers=headers, cookies=cookies, json=json)
return_data = {
"last_notes": last_notes.json(),
"free_days": free_days.json(),
"lucky_number": lucky_number.json()
}
return return_data

31
app/API/exams.py Normal file
View file

@ -0,0 +1,31 @@
import json
import requests
def get_exams(register_id, register_r, oun, s, date, school_year):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
exams = requests.post(oun+'/Sprawdziany.mvc/Get', headers=headers, cookies=cookies, json={'data': date, 'rokSzkolny': school_year})
return exams.json()

31
app/API/grades.py Normal file
View file

@ -0,0 +1,31 @@
import json
import requests
def get_grades(register_id, register_r, oun, s):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
grades = requests.post(oun+'/Oceny.mvc/Get', headers=headers, cookies=cookies, json={'okres': register_id})
return grades.json()

31
app/API/homeworks.py Normal file
View file

@ -0,0 +1,31 @@
import requests
import json
def get_homeworks(register_id, register_r, oun, s, date, school_year):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headres = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
'User-Agent': 'Wulkanowy-web :)'
}
homeworks = requests.post(oun+'/Homework.mvc/Get', headers=headres, cookies=cookies, json={'schoolYear': school_year, 'date': date, 'statusFilter': '-1'})
return homeworks.json()

199
app/API/messages.py Normal file
View file

@ -0,0 +1,199 @@
import requests
import json
import calendar
import time
import re
def get_received_messages(register_id, register_r, oun, s, date, school_year, symbol):
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
now = calendar.timegm(time.gmtime())
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
received_messages = requests.get(f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}/Wiadomosc.mvc/GetInboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
else:
received_messages = requests.get(f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}/Wiadomosc.mvc/GetInboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
return received_messages.json()
def get_sent_messages(register_id, register_r, oun, s, date, school_year, symbol):
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
now = calendar.timegm(time.gmtime())
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
sent_messages = requests.get(f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}/Wiadomosc.mvc/GetInboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
else:
sent_messages = requests.get(f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}/Wiadomosc.mvc/GetInboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
return sent_messages.json()
def get_deleted_messages(register_id, register_r, oun, s, date, school_year, symbol):
headers = {
'Accept-Encoding': 'gzip, deflate, br7',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
now = calendar.timegm(time.gmtime())
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
deleted_messages = requests.get(f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}/Wiadomosc.mvc/GetOutboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
else:
deleted_messages = requests.get(f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}/Wiadomosc.mvc/GetOutboxMessages?_dc={now}&dataOd=&dataDo=&page=1&start=0&limit=25', headers=headers, cookies=s)
return deleted_messages.json()
def get_recipients(register_id, register_r, oun, s, date, school_year, symbol):
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
link = f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}'
else:
link = f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}'
get_jednostki = requests.get(f'{link}/NowaWiadomosc.mvc/GetJednostkiUzytkownika', headers=headers, cookies=s)
id_jednostka = get_jednostki.json()['data'][0]['IdJednostkaSprawozdawcza']
data = {
"paramsVo":{"IdJednostkaSprawozdawcza":id_jednostka, 'Rola': 2}
}
get_addressee = requests.post(f'{link}/Adresaci.mvc/GetAddressee', headers=headers, cookies=s, json=data)
return {'addressee': get_addressee.json(), 'unitId': id_jednostka}
def send_message(register_id, register_r, oun, s, date, school_year, symbol, send_data):
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Accet': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)",
'Content-Type': 'application/json',
'TE': "Trailers"
}
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
link = f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}'
else:
link = f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}'
student_data = register_r['data'][0]['UczenNazwisko']+' '+register_r['data'][0]['UczenImie']
sess = requests.Session()
sess.cookies.update(s)
sess.headers.update(headers)
index = sess.get(link)
antiForgeryToken = re.search("antiForgeryToken: '(.)*'", index.text)
antiForgeryToken = antiForgeryToken.group()
antiForgeryToken = antiForgeryToken.replace('antiForgeryToken: ', '').replace("'", "")
appGuid = re.search("appGuid: '(.)*'", index.text)
appGuid = appGuid.group()
appGuid = appGuid.replace('appGuid: ', '').replace("'", "")
sess.headers.update({
'X-V-RequestVerificationToken': antiForgeryToken,
'X-V-AppGuid': appGuid
})
payload = {
"incomming": {
"Id": 0,
"Nieprzeczytane": 0,
"Przeczytane": 0,
"Nieprzeczytana": False,
"FolderWiadomosci": 0,
"WiadomoscPowitalna": False,
"Data": None,
"Tresc": send_data['content'],
"Temat": send_data['subject'],
"IdWiadomosci": 0,
"HasZalaczniki": False,
"Zalaczniki": "",
"Adresaci": [
{
"Id": send_data['data']['Id'],
"IdReceiver": "",
"Name": send_data['data']['Name'],
"Role": send_data['data']['Role'],
"UnitId": send_data['data']['UnitId'],
"IdLogin": send_data['data']['IdLogin'],
"PushWiadomosc": False,
"Hash": send_data['data']['Hash'],
"Date": None,
"IsMarked": False
}
],
"WyslijJako": student_data,
"WiadomoscAdresatLogin": "",
"IdWiadomoscAdresatLogin": None,
"RolaNadawcy": 0,
"NieprzeczytanePrzeczytane": "0/0",
"NadawcaNazwa": "Brak nadawcy",
"IdNadawca": 0,
"AdresaciNazwa": "Brak adresata"
}
}
send = sess.post(f'{link}/NowaWiadomosc.mvc/InsertWiadomosc', data=json.dumps(payload))
return send.json()
def get_message_content(register_id, register_r, oun, s, date, school_year, symbol, message_id):
headers = {
'Accept-Encoding': 'gzip, deflate, br',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
if oun == 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
link = f'http://uonetplus-uzytkownik.fakelog.cf/{symbol}'
else:
link = f'https://uonetplus-uzytkownik.vulcan.net.pl/{symbol}'
sess = requests.Session()
sess.cookies.update(s)
sess.headers.update(headers)
index = sess.get(link)
antiForgeryToken = re.search("antiForgeryToken: '(.)*'", index.text)
antiForgeryToken = antiForgeryToken.group()
antiForgeryToken = antiForgeryToken.replace('antiForgeryToken: ', '').replace("'", "")
appGuid = re.search("appGuid: '(.)*'", index.text)
appGuid = appGuid.group()
appGuid = appGuid.replace('appGuid: ', '').replace("'", "")
sess.headers.update({
'X-V-RequestVerificationToken': antiForgeryToken,
'X-V-AppGuid': appGuid
})
payload = {
'messageId': message_id
}
content = sess.post(f'{link}/Wiadomosc.mvc/GetInboxMessageDetails', data=json.dumps(payload))
return content.json()

60
app/API/mobile_access.py Normal file
View file

@ -0,0 +1,60 @@
import json
import requests
def get_registered_devices(register_id, register_r, oun, s):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
registered = requests.post(oun+'/ZarejestrowaneUrzadzenia.mvc/Get', headers=headers, cookies=cookies)
return registered.json()
def register_device(register_id, register_r, oun, s):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
register_data = requests.post(oun+'/RejestracjaUrzadzeniaToken.mvc/Get', headers=headers, cookies=cookies)
return register_data.json()

31
app/API/notes.py Normal file
View file

@ -0,0 +1,31 @@
import json
import requests
def get_notes(register_id, register_r, oun, s):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
notes = requests.post(oun+'/UwagiIOsiagniecia.mvc/Get', headers=headers, cookies=cookies)
return notes.json()

31
app/API/school_data.py Normal file
View file

@ -0,0 +1,31 @@
import json
import requests
def get_school_data(register_id, register_r, oun, s):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
school_data = requests.post(oun+'/SzkolaINauczyciele.mvc/Get', headers=headers, cookies=cookies)
return school_data.json()

32
app/API/timetable.py Normal file
View file

@ -0,0 +1,32 @@
import json
import requests
from bs4 import BeautifulSoup
def get_timetable(register_id, register_r, oun, s, date):
cookies = s
if oun != 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458':
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyDziennikWychowankowie": f"{register_r['data'][0]['IdWychowankowieDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
else:
cookies.update({
"biezacyRokSzkolny": f"{register_r['data'][0]['DziennikRokSzkolny']}",
"idBiezacyDziennik": f"{register_r['data'][0]['IdDziennik']}",
"idBiezacyDziennikPrzedszkole": f"{register_r['data'][0]['IdPrzedszkoleDziennik']}",
"idBiezacyUczen": f"{register_r['data'][0]['IdUczen']}"
})
headers = {
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*',
'Connection': 'keep-alive',
"User-Agent": "Wulkanowy-web :)"
}
timetable = requests.post(oun+'/PlanZajec.mvc/Get', headers=headers, cookies=cookies, json={'data': date})
return timetable.json()

0
app/__init__.py Normal file
View file

3
app/admin.py Normal file
View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

5
app/apps.py Normal file
View file

@ -0,0 +1,5 @@
from django.apps import AppConfig
class WulkanowyConfig(AppConfig):
name = 'Wulkanowy'

9
app/decrypt.py Normal file
View file

@ -0,0 +1,9 @@
import json
from cryptography.fernet import Fernet
def decrypt_cookies(s, key):
s = bytes(s, 'utf-8')
key = Fernet(key)
s = key.decrypt(s)
s = json.loads(s.decode('utf-8'))
return s

2
app/forms.py Normal file
View file

@ -0,0 +1,2 @@
from django import forms

83
app/login.py Normal file
View file

@ -0,0 +1,83 @@
import os
import sys
import requests
from django.contrib.sessions.models import Session
from django.http import JsonResponse
from django import template
from django.utils.safestring import mark_safe
from django.shortcuts import render
import json
import requests
from django.shortcuts import redirect
from bs4 import BeautifulSoup
import datetime
def sender(url, loginName, Password, params_names, fail_phrase, symbol, diary_url, s):
data = [params_names[0], loginName, params_names[1], Password]
sender_return = send(url, data, fail_phrase, diary_url, symbol, s)
if sender_return == {'success': False}:
return {'success': False}
else:
return sender_return
def send(url, data, fail, diary_url, symbol, s):
ready_data = {data[0]: data[1], data[2]: data[3]}
page = s.post(url=url, data=ready_data)
if fail in page.text:
return {'success': False}
else:
if diary_url == 'http://cufs.fakelog.cf/':
page = s.get('http://cufs.fakelog.cf/powiatwulkanowy/FS/LS?wa=wsignin1.0&wtrealm=http://uonetplus.fakelog.localhost:300/powiatwulkanowy/LoginEndpoint.aspx&wctx=http://uonetplus.fakelog.localhost:300/powiatwulkanowy/LoginEndpoint.aspx')
bs = BeautifulSoup(page.text, 'html.parser')
wa = bs.find('input', {'name': 'wa'})['value']
cert = bs.find('input', {'name': 'wresult'})['value']
wctx = bs.find('input', {'name': 'wctx'})['value']
crtr = s.post(url=wctx, headers={"User-Agent": "Wulkanowy-web :)"}, data={"wa": wa, "wresult": cert, "wctx": wctx})
bs = BeautifulSoup(crtr.content, 'html.parser')
for a in bs.find_all('a', title='Uczeń'):
oun = a['href']
break
if diary_url == 'http://cufs.fakelog.cf/':
oun = 'http://uonetplus-uczen.fakelog.cf/powiatwulkanowy/123458'
cookies = get_cookies(symbol, oun, s, diary_url)
return cookies
def get_cookies(symbol, oun, s, diary_url):
register_r = s.post(oun+'/UczenDziennik.mvc/Get')
register_id = register_r.json()['data'][0]['Okresy'][0]['Id']
now = datetime.datetime.now()
weekday = now.weekday()
for x in range(7):
if weekday == x:
now = now - datetime.timedelta(days=x)
day = now.day
month = now.month
year = now.year
date = datetime.date(year, month, day).isoformat()
date = f'{date}T00:00:00'
school_year = register_r.json()['data'][0]['DziennikRokSzkolny']
data = {
'register_id': register_id,
'register_r': register_r.json(),
'oun': oun,
'date': str(date),
'school_year': school_year,
'symbol': symbol,
's': s.cookies.get_dict(),
'diary_url': diary_url
}
return data

View file

1
app/models.py Normal file
View file

@ -0,0 +1 @@
from django.db import models

3
app/tests.py Normal file
View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

306
app/views.py Normal file
View file

@ -0,0 +1,306 @@
from requests import get
from cryptography.fernet import Fernet
from django.contrib.sessions.backends.db import SessionStore
from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
import json
import requests
from django.core import serializers
from django.shortcuts import redirect
from django.contrib.sessions.models import Session
from .login import sender
from .API.grades import get_grades
from .API.exams import get_exams
from .API.timetable import get_timetable
from .API.notes import get_notes
from .API.attendance import get_attendance
from .API.messages import get_received_messages, get_sent_messages, get_deleted_messages, get_recipients, send_message, get_message_content
from .API.homeworks import get_homeworks
from .API.mobile_access import get_registered_devices, register_device
from .API.school_data import get_school_data
from .API.dashboard import get_dashboard
from .decrypt import decrypt_cookies
#API
def login(request, *args, **kwargs):
data = json.loads(request.body)
loginName = data['loginName']
Password = data['Password']
symbol = data['Symbol']
diary_url = data['diaryUrl']
if diary_url != 'http://cufs.fakelog.cf/':
link = f'{diary_url}{symbol}/Account/LogOn?ReturnUrl=%2F{symbol}%2FFS%2FLS%3Fwa%3Dwsignin1.0%26wtrealm%3Dhttps%253a%252f%252fuonetplus.vulcan.net.pl%252f{symbol}%252fLoginEndpoint.aspx%26wctx%3Dhttps%253a%252f%252fuonetplus.vulcan.net.pl%252f{symbol}%252fLoginEndpoint.aspx'
else:
link = 'http://cufs.fakelog.cf/powiatwulkanowy/FS/LS?wa=wsignin1.0&wtrealm=http://uonetplus.fakelog.localhost:300/powiatwulkanowy/LoginEndpoint.aspx&wctx=http://uonetplus.fakelog.localhost:300/powiatwulkanowy/LoginEndpoint.aspx'
s = requests.Session()
sender_return = sender(link, loginName, Password, ('loginName', 'Password'), 'Zła nazwa użytkownika lub hasło', symbol, diary_url, s)
if sender_return == {'success': False}:
data_response = {
'success': False
}
else:
key = Fernet.generate_key()
rkey = Fernet(key)
request.session[request.session.session_key] = key.decode('utf-8')
sender_return['s'] = json.dumps(sender_return['s'])
sender_return['s'] = sender_return['s'].encode()
sender_return['s'] = rkey.encrypt(sender_return['s'])
sender_return['s'] = sender_return['s'].decode('utf-8')
request.session['is_logged'] = True
data_response = {'success': True, 'data': sender_return}
return JsonResponse(data_response)
def grades(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
grades = get_grades(register_id, register_r, oun, s)
return JsonResponse(grades)
else:
return redirect('../')
def timetable(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
timetable = get_timetable(register_id, register_r, oun, s, date)
return JsonResponse(timetable)
else:
return redirect('../')
def exams(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
exams = get_exams(register_id, register_r, oun, s, date, school_year)
return JsonResponse(exams)
else:
return redirect('../')
def homeworks(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
homeworks = get_homeworks(register_id, register_r, oun, s, date, school_year)
return JsonResponse(homeworks)
else:
return redirect('../')
def attendance(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
attendance = get_attendance(register_id, register_r, oun, s, date)
return JsonResponse(attendance, safe=False)
else:
return redirect('../')
def notes(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
notes = get_notes(register_id, register_r, oun, s)
return JsonResponse(notes)
else:
return redirect('../')
def registered_devices(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
registered = get_registered_devices(register_id, register_r, oun, s)
return JsonResponse(registered)
else:
return redirect('../')
def register_device_(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
register_data = register_device(register_id, register_r, oun, s)
return JsonResponse(register_data)
else:
return redirect('../')
def received_messages(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
symbol = data['data']['symbol']
received_messages = get_received_messages(register_id, register_r, oun, s, date, school_year, symbol)
return JsonResponse(received_messages)
else:
return redirect('../')
def sent_messages(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
symbol = data['data']['symbol']
sent_messages = get_sent_messages(register_id, register_r, oun, s, date, school_year, symbol)
return JsonResponse(sent_messages)
else:
return redirect('../')
def deleted_messages(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
symbol = data['data']['symbol']
deleted_messages = get_deleted_messages(register_id, register_r, oun, s, date, school_year, symbol)
return JsonResponse(deleted_messages)
else:
return redirect('../')
def recipients(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = data['data']['date']
school_year = data['data']['school_year']
symbol = data['data']['symbol']
recipients = get_recipients(register_id, register_r, oun, s, date, school_year, symbol)
return JsonResponse(recipients)
else:
return redirect('../')
def school_data(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
oun = data['data']['oun']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
school_data = get_school_data(register_id, register_r, oun, s)
return JsonResponse(school_data)
else:
return redirect('../')
def dashboard(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
register_id = data['data']['register_id']
register_r = data['data']['register_r']
s = data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
diary_url = data['data']['diary_url']
symbol = data['data']['symbol']
dashboard = get_dashboard(register_id, register_r, s, diary_url, symbol)
return JsonResponse(dashboard)
else:
return redirect('../')
def send(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
cookies_data = json.loads(data['cookies_data'])
register_id = cookies_data['data']['register_id']
register_r = cookies_data['data']['register_r']
oun = cookies_data['data']['oun']
s = cookies_data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = cookies_data['data']['date']
school_year = cookies_data['data']['school_year']
symbol = cookies_data['data']['symbol']
send_data = {'data': data['data'], 'subject': data['subject'], 'content': data['content']}
send = send_message(register_id, register_r, oun, s, date, school_year, symbol, send_data)
return JsonResponse(send, safe=False)
else:
return redirect('../')
def message_content(request, *args, **kwargs):
if request.session.has_key('is_logged'):
data = json.loads(request.body)
cookies_data = json.loads(data['cookies_data'])
register_id = cookies_data['data']['register_id']
register_r = cookies_data['data']['register_r']
oun = cookies_data['data']['oun']
s = cookies_data['data']['s']
key = bytes(request.session[request.session.session_key], 'utf-8')
s = decrypt_cookies(s, key)
date = cookies_data['data']['date']
school_year = cookies_data['data']['school_year']
symbol = cookies_data['data']['symbol']
message_id = data['message_id']
content = get_message_content(register_id, register_r, oun, s, date, school_year, symbol, message_id)
return JsonResponse(content, safe=False)
else:
return redirect('../')

0
frontend/__init__.py Normal file
View file

3
frontend/admin.py Normal file
View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

5
frontend/apps.py Normal file
View file

@ -0,0 +1,5 @@
from django.apps import AppConfig
class FrontendConfig(AppConfig):
name = 'frontend'

View file

3
frontend/models.py Normal file
View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

2516
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

39
frontend/package.json Normal file
View file

@ -0,0 +1,39 @@
{
"name": "wulkanowy-web",
"version": "1.0.0",
"description": "🌋 Przeglądarkowy klient dzienniczka VULCAN UONET+ dla ucznia i rodzica",
"main": "index.js",
"browserslist": [
"defaults"
],
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack --mode development --watch",
"build": "webpack --mode productionSSSS"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wulkanowy/wulkanowy-web.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/wulkanowy/wulkanowy-web/issues"
},
"homepage": "https://github.com/wulkanowy/wulkanowy-web#readme",
"dependencies": {
"object-hash": "^2.1.1",
"reverse-md5": "0.0.5"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"babel-loader": "^8.2.2",
"webpack": "^5.17.0",
"webpack-cli": "^4.3.1"
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,72 @@
body {
padding: 0 !important;
height: 100vh;
background: #fff;
overflow: auto;
display: -webkit-box;
display: -ms-flexbox;
font-family: 'Poppins', sans-serif;
font-size: 14px;
margin: 0 !important;
color: black;
}
/*.logo img[data-v-cd2b8d62] {
width: 768px;
max-width: 30vw;
display: inline;
-webkit-filter: drop-shadow(0 5px 5px rgba(0,0,0,.2)) drop-shadow(0 8px 10px rgba(0,0,0,.14)) drop-shadow(0 3px 14px rgba(0,0,0,.12));
filter: drop-shadow(0 5px 5px rgba(0,0,0,.2)) drop-shadow(0 8px 10px rgba(0,0,0,.14)) drop-shadow(0 3px 14px rgba(0,0,0,.12));
}*/
#container{
width: 100%;
}
#menu{
width: 95%;
height: 18%;
margin-left: 2.5%;
border-bottom: 4px solid white;
border-radius: 3px;
font-family: 'Open Sans Condensed', sans-serif;
font-family: 'Quicksand', sans-serif;
}
.option{
cursor: pointer;
}
.grade {
display: block;
border-radius: 5px;
cursor: pointer !important;
font-size: 20px !important;
width: 25px !important;
height: 30px !important;
text-align: center !important;
margin-left: auto !important;
margin-right: auto !important;
margin-top: 5px !important;
}
.noteElement {
padding: 10px;
border: black 1px solid;
width: 90%;
height: 75px;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
}
.noteContent {
width: 50%;
}
.achievementElement {
padding: 10px;
border: black 1px solid;
width: 90%;
height: 75px;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
}

View file

@ -0,0 +1,122 @@
@media screen and (max-width: 768px) {
.box {
width: 60% !important;
height: 45% !important;
}
.logo img[data-v-cd2b8d62] {
margin: 0 !important;
margin-top: -55% !important;
}
#icons {
bottom: -36% !important;
size: 70% !important;
margin: 0 !important;
margin-top: 20% !important;
}
}
body {
height: 100vh;
background: -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.3)),to(rgba(0,0,0,.3))),url(../images/wallpaper.b24bba72.jpg);
background: linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,.3)),url(../images/wallpaper.jpg);
background-size: cover;
background-position: 50%;
background-attachment: fixed;
overflow: auto;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
font-family: 'Roboto', sans-serif;
font-size: 10px;
margin: 0 !important;
color: black;
}
#form {
margin-bottom: 20px;
}
.logo img[data-v-cd2b8d62] {
width: 768px;
max-width: 90vw;
max-height: 200px;
display: block;
margin-top: 2px;
margin-bottom: 5px;
-webkit-filter: drop-shadow(0 5px 5px rgba(0,0,0,.2)) drop-shadow(0 8px 10px rgba(0,0,0,.14)) drop-shadow(0 3px 14px rgba(0,0,0,.12));
filter: drop-shadow(0 5px 5px rgba(0,0,0,.2)) drop-shadow(0 8px 10px rgba(0,0,0,.14)) drop-shadow(0 3px 14px rgba(0,0,0,.12));
}
h1 {
font-size: 2em !important;
font-weight: bold;
}
img {
margin-top: -25em;
margin-left: 0em;
font-size: 70%;
}
.icon {
width: 50px;
margin: 0px;
margin-left: 0.6%;
margin-right: 0.6%;
padding: 0px;
}
#icons {
position: relative;
display: block;
bottom: -50%;
margin-left: 0em;
width: 100%;
margin-left: auto;
margin-right: auto;
text-align: center;
font-size: 80%;
}
a {
font-size: 120%;
color: blue;
margin-bottom: 5%;
}
#help-box {
font-size: 200%;
}
p {
size: 0px;
padding: 0px;
margin: 0px;
height: 48px;
margin-bottom: 15px;
margin-top: 10px;
}
label {
size: 0px;
padding: 0px;
margin: 0px;
font-size: 0px;
}
select {
display: inline !important;
font-size: 1.5em;
}
#button {
margin-left: 35rem;
}
#con {
margin-bottom: 12.5%;
}
#imgsym {
margin-top: 1%;
max-width: 100vh;
}
#error {
color: red;
font-size: 130%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
height="200"
width="200"
version="1.1"
viewBox="0 0 200 200"
id="Layer_1">
<metadata
id="metadata13">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs11" />
<style
id="style2">.st0{fill:#FFFFFF;}</style>
<path
style="fill:#ffffff"
id="path4"
d="m 81.9,83.9 c -5.7,0 -10.2,5 -10.2,11.1 0,6.1 4.6,11.1 10.2,11.1 5.7,0 10.2,-5 10.2,-11.1 0.1,-6.1 -4.5,-11.1 -10.2,-11.1 z m 36.5,0 c -5.7,0 -10.2,5 -10.2,11.1 0,6.1 4.6,11.1 10.2,11.1 5.7,0 10.2,-5 10.2,-11.1 0,-6.1 -4.5,-11.1 -10.2,-11.1 z"
class="st0" />
<path
style="fill:#ffffff"
id="path6"
d="M 167,0 H 33 C 21.7,0 12.5,9.2 12.5,20.6 v 135.2 c 0,11.4 9.2,20.6 20.5,20.6 h 113.4 l -5.3,-18.5 12.8,11.9 12.1,11.2 21.5,19 V 20.6 C 187.5,9.2 178.3,0 167,0 Z m -38.6,130.6 c 0,0 -3.6,-4.3 -6.6,-8.1 13.1,-3.7 18.1,-11.9 18.1,-11.9 -4.1,2.7 -8,4.6 -11.5,5.9 -5,2.1 -9.8,3.5 -14.5,4.3 -9.6,1.8 -18.4,1.3 -25.9,-0.1 -5.7,-1.1 -10.6,-2.7 -14.7,-4.3 -2.3,-0.9 -4.8,-2 -7.3,-3.4 -0.3,-0.2 -0.6,-0.3 -0.9,-0.5 -0.2,-0.1 -0.3,-0.2 -0.4,-0.3 -1.8,-1 -2.8,-1.7 -2.8,-1.7 0,0 4.8,8 17.5,11.8 -3,3.8 -6.7,8.3 -6.7,8.3 C 50.6,129.9 42.2,115.4 42.2,115.4 42.2,83.2 56.6,57.1 56.6,57.1 71,46.3 84.7,46.6 84.7,46.6 l 1,1.2 c -18,5.2 -26.3,13.1 -26.3,13.1 0,0 2.2,-1.2 5.9,-2.9 10.7,-4.7 19.2,-6 22.7,-6.3 0.6,-0.1 1.1,-0.2 1.7,-0.2 6.1,-0.8 13,-1 20.2,-0.2 9.5,1.1 19.7,3.9 30.1,9.6 0,0 -7.9,-7.5 -24.9,-12.7 l 1.4,-1.6 c 0,0 13.7,-0.3 28.1,10.5 0,0 14.4,26.1 14.4,58.3 0,0 -8.5,14.5 -30.6,15.2 z"
class="st0" />
</svg>

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg4"
viewBox="0 0 22 22"
height="22"
width="22"
version="1.1">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<path
style="fill:#ffffff"
id="path2"
d="M 19,7 11,12 3,7 V 5 l 8,5 8,-5 M 19,3 H 3 C 1.89,3 1,3.89 1,5 v 12 a 2,2 0 0 0 2,2 h 16 a 2,2 0 0 0 2,-2 V 5 C 21,3.89 20.1,3 19,3 Z" />
</svg>

After

Width:  |  Height:  |  Size: 896 B

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="11.493064mm"
height="11.209469mm"
viewBox="0 0 11.493064 11.209469"
version="1.1"
id="svg400"
inkscape:version="0.92.1 r15371"
sodipodi:docname="github.svg">
<defs
id="defs394" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="6.8325799"
inkscape:cy="15.756873"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1280"
inkscape:window-height="955"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata397">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-80.431998,-106.18693)">
<path
d="m 86.178042,106.18693 c -3.173236,0 -5.746044,2.57281 -5.746044,5.74675 0,2.53894 1.646414,4.69265 3.929944,5.45289 0.287514,0.0526 0.392289,-0.12488 0.392289,-0.27728 0,-0.13618 -0.0049,-0.49777 -0.0078,-0.9772 -1.598436,0.34713 -1.935692,-0.77047 -1.935692,-0.77047 -0.261408,-0.66392 -0.638174,-0.84066 -0.638174,-0.84066 -0.521759,-0.35631 0.03951,-0.34925 0.03951,-0.34925 0.576791,0.0406 0.88018,0.59231 0.88018,0.59231 0.512586,0.87806 1.345142,0.62442 1.67252,0.47731 0.05221,-0.37112 0.200377,-0.62442 0.364772,-0.768 -1.275997,-0.14499 -2.617611,-0.63817 -2.617611,-2.84021 0,-0.62724 0.224014,-1.14018 0.591608,-1.54199 -0.05927,-0.14535 -0.256469,-0.72955 0.05609,-1.52083 0,0 0.4826,-0.15452 1.580444,0.58914 0.458258,-0.12771 0.950031,-0.19121 1.438628,-0.19332 0.487891,0.002 0.979664,0.0656 1.438628,0.19332 1.097138,-0.74366 1.57868,-0.58914 1.57868,-0.58914 0.313619,0.79128 0.116417,1.37548 0.05715,1.52083 0.3683,0.40181 0.590903,0.91475 0.590903,1.54199 0,2.20768 -1.343731,2.69345 -2.623961,2.83562 0.206375,0.17745 0.390172,0.52811 0.390172,1.06433 0,0.768 -0.0071,1.38783 -0.0071,1.57622 0,0.15381 0.103364,0.33267 0.395111,0.27657 2.28177,-0.76164 3.926773,-2.91394 3.926773,-5.45218 0,-3.17394 -2.573161,-5.74675 -5.747103,-5.74675"
style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.35277775"
id="path198"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xml:space="preserve"
viewBox="0 0 128 128"
version="1.1"
id="Social_Icons"
enable-background="new 0 0 128 128"><metadata
id="metadata12"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs10" /><g
style="fill:#ffffff;stroke:#ff0000"
id="_x33__stroke"><g
style="fill:none;stroke:#ff0000"
id="PayPal_1_"><path
style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd;stroke:none"
id="PayPal"
d="M 114.136,37.621 C 108.386,64.141 90.057,78.176 60.97,78.176 H 50.422 L 42.556,128 h 17.108 c 2.472,0 4.572,-1.784 4.959,-4.204 l 0.202,-1.056 3.935,-24.728 0.254,-1.364 c 0.383,-2.42 2.488,-4.204 4.955,-4.204 h 3.125 c 20.212,0 36.042,-8.148 40.667,-31.708 1.855,-9.455 0.963,-17.383 -3.625,-23.115 z M 102.431,9.652 C 96.456,2.896 85.658,0 71.84,0 H 31.746 C 28.92,0 26.516,2.04 26.073,4.804 L 9.376,109.85 c -0.331,2.072 1.286,3.948 3.403,3.948 h 24.753 l 6.217,-39.119 -0.194,1.224 c 0.444,-2.764 2.83,-4.804 5.653,-4.804 H 60.97 c 23.111,0 41.203,-9.312 46.489,-36.247 0.157,-0.8 0.411,-2.332 0.411,-2.332 1.5,-9.968 -0.012,-16.732 -5.439,-22.868 z" /></g></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

View file

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="1024"
width="3584"
xml:space="preserve"
viewBox="0 0 3584 1024"
y="0px"
x="0px"
id="Layer_1"
version="1.1"
sodipodi:docname="wulkanowy-full-flat.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview25"
showgrid="false"
inkscape:zoom="0.33928571"
inkscape:cx="1860.4549"
inkscape:cy="586.56969"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="text8460" /><metadata
id="metadata15"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs13" /><style
id="style2"
type="text/css">
.st0{fill:#D32F2F;}
.st1{fill:#AD2A2A;}
.st2{fill:#FFFFFF;}
</style><g
style="display:none"
id="layer4"><rect
style="display:inline;fill:#d32f2f;stroke-width:1.02195609"
height="1024"
width="3584"
class="st0"
y="0"
x="0"
id="XMLID_57_" /></g><g
style="display:none"
id="layer3"><path
id="path18992"
d="M 3046.8164,390.66602 3134.3164,542 v 91.33398 L 3524.9824,1024 H 3584 V 732.18359 L 3242.4824,390.66602 h -23.666 l -53.0352,94.63086 -94.6308,-94.63086 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18990"
d="m 2746.9824,390.66602 62,242.66796 L 3199.6484,1024 H 3584 V 940.68359 L 3033.9824,390.66602 h -21 l -21.9043,90.92773 -90.9277,-90.92773 h -18.5 l -25.4043,88.26367 -88.2637,-88.26367 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18988"
d="m 2620.8164,387.33398 c -18.6667,0 -35.1667,4.60982 -49.5,13.83204 -14.3333,9.11111 -25.4451,22.22287 -33.334,39.33398 -7.7778,17 -11.666,36.5549 -11.666,58.66602 v 25 c 0,34.44444 8.7216,61.83463 26.166,82.16796 L 2970.1484,1024 h 323.168 l -623.166,-623.16602 c -14.2222,-9 -30.6673,-13.5 -49.334,-13.5 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18984"
d="M 2293.4824,390.66602 V 633.33398 L 2684.1484,1024 h 423.336 l -633.334,-633.33398 h -20.334 v 139.66601 l -139.666,-139.66601 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18978"
d="M 1864.8164,390.66602 V 633.33398 L 2255.4824,1024 h 413.334 l -633.334,-633.33398 h -25.832 l -60.584,63.75 -63.75,-63.75 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18976"
d="M 1684.8164,390.66602 V 633.33398 L 2075.4824,1024 h 263.334 l -633.334,-633.33398 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path19059"
d="m 1133.6504,390.66602 62,242.66796 L 1586.3164,1024 h 467.668 l -633.334,-633.33398 h -21 l -21.9043,90.92773 -90.9277,-90.92773 h -18.5 l -25.4043,88.26367 -88.2637,-88.26367 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18966"
d="m 1456.4824,390.66602 v 167.16796 c 0.5556,24.66667 8.5007,44 23.834,58 L 1888.4824,1024 h 372.168 l -633.334,-633.33398 h -20.666 V 520.5 l -129.834,-129.83398 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="path18982"
d="M 2146.3164,390.66602 2054.4824,633.33398 2445.1484,1024 h 354.002 l -633.334,-633.33398 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
id="XMLID_64_"
d="M 637.15234,214.95703 487.75,364.35742 466.01562,386.0918 c 0.31273,0.31271 0.54872,0.54666 0.70508,0.85937 0.0782,0.23454 0.23432,0.54671 0.3125,0.78125 0.31272,0.54726 0.47071,1.17339 0.47071,1.79883 0.0782,0.54726 -0.0799,1.01725 -0.31446,1.48633 -0.23454,0.54725 -0.70285,1.40597 -1.09375,1.79687 l 150.8086,149.71485 -23.68946,23.6875 -12.74414,-12.74219 -13.44726,-13.44727 -78.80469,-78.80664 -11.17969,-11.17968 -7.5039,-7.50391 -35.41602,-35.17969 -3.08984,-0.98047 -4.33594,4.26367 v 0.46876 c 0,7.34888 0.38998,15.00865 -1.48633,22.20117 -0.85998,3.28355 -2.34444,6.25595 -4.14258,8.91406 -0.15636,0.15636 -0.23627,0.23426 -0.31445,0.39062 -1.87631,2.57993 -4.06471,4.84619 -6.48828,6.95704 -5.3944,4.53442 -11.25752,8.67896 -17.27734,12.50976 -0.15637,0.0782 -0.23427,0.1562 -0.39063,0.23438 -2.11085,1.40723 -4.3012,2.7354 -6.49023,4.06445 -8.91248,5.39439 -18.37192,10.08772 -28.37891,13.13672 -1.25087,0.31272 -2.42317,-0.001 -3.36133,-0.70508 l -6.01953,5.94141 c 1.25087,0.62543 2.03136,1.87776 1.875,3.51953 -10e-6,0.15636 -0.0762,0.23231 -0.0762,0.38867 0,0.0782 -0.0781,0.23628 -0.0781,0.31445 -1.32905,4.45624 -2.34505,8.98897 -3.2832,13.60156 -0.15636,0.70363 -0.23622,1.33154 -0.39258,2.03516 -0.85997,4.37806 -1.64209,8.83288 -2.3457,13.21094 0.23453,5.3944 0.39263,11.0234 0.31445,16.65234 v 0.39258 c -0.0782,7.66161 -0.78373,15.32114 -2.8164,22.51367 -2.26721,8.28704 -6.64376,15.63728 -10.55274,23.22071 -0.0782,0.15636 -0.15815,0.23426 -0.23633,0.39062 -1.25088,2.42357 -2.49924,4.92399 -3.59375,7.50391 -4.84714,11.33605 -7.42749,23.92328 -10.55468,35.88476 -0.23454,0.70362 -0.39046,1.48578 -0.625,2.26758 0,0.15636 -0.0801,0.23427 -0.0801,0.39063 -2.97082,11.10151 -6.09819,22.28173 -10.94532,32.75781 -1.40724,2.97082 -2.81531,5.86322 -4.3789,8.75586 -0.15636,0.23454 -0.23231,0.46858 -0.38867,0.70312 -0.62544,1.09451 -1.25152,2.26871 -1.87696,3.44141 -0.0782,0.15636 -0.15619,0.23426 -0.23437,0.39062 -3.51809,6.25438 -7.27098,12.43118 -10.78906,18.68555 -5.0035,8.8343 -8.99075,18.13635 -13.83789,27.04883 -0.0782,0.15636 -0.1562,0.23426 -0.23438,0.39062 -0.70362,1.32905 -1.48579,2.65728 -2.26758,3.98633 -5.0035,8.20887 -10.63256,16.0279 -16.57422,23.61133 -0.15635,0.15636 -0.23426,0.3124 -0.39062,0.46875 -0.7818,1.01634 -1.48578,1.95443 -2.26758,2.89258 -3.90898,4.92532 -7.97378,9.85009 -11.96094,14.77539 -0.0782,0.15637 -0.23432,0.23622 -0.3125,0.39258 -8.75612,10.71061 -17.35628,21.49761 -24.54883,33.30273 0,0.70362 -0.15602,1.33159 -0.46874,1.95703 -1.25087,2.42357 -2.65734,4.68971 -3.90821,7.11328 -0.0782,0.15636 0.62511,1.24989 0.46875,1.40625 L 429.86133,1024 H 1463.0215 L 661.85547,222.92969 c -0.93816,2.11087 -5.23681,1.40935 -7.34766,-0.23242 -1.71995,-1.32906 -3.12603,-3.05147 -4.45508,-4.84961 -0.62544,-0.31271 -1.25168,-0.62288 -1.64257,-0.85743 -2.89265,-1.40723 -6.09933,-1.48632 -9.30469,-1.48632 -0.7818,-0.0782 -1.40588,-0.23416 -1.95313,-0.54688 z m -206.12304,191.41992 0.11914,-0.11523 -0.23438,0.0781 z"
style="display:inline;fill:#ad2a2a;stroke-width:0.78179646" /></g><g
style="display:inline"
id="layer2"><path
style="fill:#ffffff;stroke-width:0.78179646"
d="m 385.17894,776.98989 c 0.62544,2.03267 0.31272,4.2217 -0.7818,6.01983 l -15.08867,24.47023 c -1.48541,2.42357 -4.2217,3.98716 -7.19253,3.98716 H 220.92351 c -6.56709,0 -10.55425,-6.8798 -7.03616,-12.03966 l 90.92292,-133.92173 c 0.54726,-0.78179 0.85997,-1.64177 1.09451,-2.50174 l 41.66975,-177.93687 c 0.46908,-2.11085 1.87631,-3.90898 3.90898,-5.00349 l 56.4457,-30.95914 c 2.03267,-1.09452 3.43991,-2.89265 3.90899,-5.08168 l 7.58342,-33.06999 c 1.56359,-6.8798 11.41423,-8.36522 15.32321,-2.34538 l 2.73629,4.37806 c 1.17269,1.87631 1.48541,4.2217 0.70362,6.33255 l -51.44221,148.69767 c -0.3909,1.1727 -0.54726,2.42357 -0.31272,3.67445 l 12.82146,71.14347 c 0.23454,1.40723 0.0782,2.89265 -0.54725,4.2217 l -30.56824,68.64172 c -0.70362,1.64178 -0.85998,3.43991 -0.31272,5.08168 z m 417.94836,34.47722 h -97.25548 c -2.81446,0 -5.39439,-1.40723 -6.95798,-3.59626 l -65.43636,-92.01744 c -0.3909,-0.62543 -0.7818,-1.25087 -1.01634,-1.95449 L 600.01659,619.1452 c -0.62544,-1.87631 -2.11085,-3.51809 -3.98716,-4.45624 L 516.59891,574.5828 c -2.18903,-1.09451 -3.75262,-3.12718 -4.2217,-5.39439 l -11.72694,-58.16566 c -0.15636,-0.93815 -0.54726,-1.87631 -1.1727,-2.73628 L 472.5056,468.64939 c -1.48542,-2.18903 -1.71995,-4.84714 -0.62544,-7.19253 l 16.41772,-35.10266 c 1.25088,-2.6581 3.98717,-4.45624 7.11435,-4.6126 l 30.49006,-1.79813 c 1.79813,-0.0782 3.43991,-0.70361 4.76896,-1.79813 l 22.43756,-17.43406 c 4.2217,-3.28354 10.63243,-1.87631 12.89964,2.73629 l 77.31966,157.29744 c 0.31272,0.70361 0.54726,1.40723 0.70362,2.11085 l 9.53792,63.24733 c 0.23453,1.48541 0.85997,2.81446 1.87631,3.90898 l 154.01389,168.5553 c 4.53442,5.0035 0.70362,12.89964 -6.33255,12.89964 z M 424.97238,319.32628 c 0,-17.90314 11.33604,-33.30453 27.59741,-40.49706 -1.1727,-1.95449 -1.87631,-4.06534 -1.87631,-6.33255 0,-8.67794 10.00699,-15.71411 22.2812,-15.71411 0.31271,0 0.54725,0 0.85997,0 5.08168,-8.4434 14.77595,-14.15051 25.87746,-14.15051 0.7818,0 1.5636,0 2.34539,0.0782 1.01634,0.0782 2.03267,-0.3909 2.57993,-1.1727 8.20886,-12.50874 29.00465,-21.42122 53.31851,-21.42122 8.99066,0 17.51224,1.25088 25.09567,3.36173 1.79813,-2.97083 5.78529,-5.0035 10.39789,-5.0035 5.23804,0 9.69428,2.65811 11.02333,6.33255 6.41073,-7.42707 17.2777,-12.2742 29.63008,-12.2742 19.70127,0 35.64992,12.43056 35.64992,27.75377 0,1.87631 -0.23454,3.67444 -0.70362,5.47257 -0.31271,1.25088 0.3909,2.50175 1.71996,2.97083 12.58692,4.6126 21.1085,13.36872 21.1085,23.37571 0,11.41423 -11.02333,21.18669 -26.58108,25.01749 -1.25087,0.31272 -2.03267,1.40723 -2.03267,2.57993 0,0.0782 0,0.15635 0,0.23453 0,8.8343 -8.75612,16.10501 -20.01399,16.88681 0.0782,0.3909 0.0782,0.78179 0.0782,1.25087 0,16.96498 -32.28819,30.64642 -72.08163,30.64642 -8.59976,0 -16.80862,-0.62544 -24.39204,-1.79813 0,0.15636 0,0.23454 0,0.3909 0,7.03616 -9.06884,12.74328 -20.17035,12.74328 -0.62544,0 -1.1727,0 -1.71995,-0.0782 0.78179,1.71995 1.17269,3.51808 1.17269,5.39439 0,10.94515 -13.8378,19.77945 -30.95914,19.77945 -1.87631,0 -3.67444,-0.0782 -5.47257,-0.31272 -1.40724,-0.15635 -2.73629,0.70362 -3.04901,2.03268 -1.48541,5.47257 -6.25437,9.45973 -11.96148,9.45973 -6.87981,0 -12.35239,-5.86347 -12.35239,-13.056 0,-3.36172 1.1727,-6.41073 3.12719,-8.67794 0.70362,-0.78179 0.93816,-1.87631 0.46908,-2.81447 -1.09452,-2.03267 -1.5636,-4.14352 -1.5636,-6.41073 v 0 c 0,-1.25087 -1.01633,-2.26721 -2.2672,-2.57992 -21.18669,-4.69078 -37.13533,-22.35938 -37.13533,-43.46788 z m 179.50045,424.6718 c 0.31272,0.93816 0.3909,1.87632 0.3909,2.89265 l -4.53442,57.30568 c -0.31272,4.06534 -3.90898,7.2707 -8.28704,7.2707 H 445.68998 c -3.12718,0 -6.01983,-1.79813 -7.42707,-4.37806 l -24.1575,-44.87511 c -0.15636,-0.23454 -0.23454,-0.46908 -0.31272,-0.70362 l -22.75028,-55.11664 c -0.85997,-1.95449 -0.70361,-4.2217 0.23454,-6.09802 l 37.76077,-73.87976 c 0.93815,-1.79813 1.09451,-3.90898 0.3909,-5.78529 l -18.4504,-51.12948 c -0.62544,-1.79814 -0.54726,-3.83081 0.23454,-5.55076 l 30.80278,-65.59272 c 3.12718,-6.56709 13.36872,-6.01983 15.55775,0.85998 l 9.61609,29.86462 29.31737,78.49236 c 0.78179,2.18903 2.6581,3.90898 5.00349,4.69078 l 62.54372,21.34304 c 2.42357,0.85998 4.29988,2.65811 5.08167,4.92532 z"
id="XMLID_42_" /><g
id="text4752"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
aria-label="WULKANOWY" /></g><g
style="display:inline"
id="layer1"><g
aria-label="WULKANOWY"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
id="text8460"><path
d="m 1198.9832,567.83331 7.5,37.66667 9.1666,-36 52.6667,-178.83334 h 18.5 l 52,178.83334 9,36.33333 8,-38 43.8333,-177.16667 h 21 l -62.1666,242.66667 h -19.6667 l -55,-189.83334 -6.1667,-24 -6,24 -56.3333,189.83334 h -19.6667 l -62,-242.66667 h 21 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4764" /><path
d="m 1627.3165,390.66664 v 165.66667 q -0.1667,24.5 -10.8333,42.66667 -10.6667,18.16667 -30.1667,28 -19.3333,9.66667 -44.5,9.66667 -38.3333,0 -61.5,-20.83334 -23,-21 -23.8333,-58 V 390.66664 h 20.3333 v 164.16667 q 0,30.66667 17.5,47.66667 17.5,16.83333 47.5,16.83333 30,0 47.3333,-17 17.5,-17 17.5,-47.33333 V 390.66664 Z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4766" /><path
d="m 1705.4832,615.99998 h 119.8333 v 17.33333 h -140.5 V 390.66664 h 20.6667 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4768" /><path
d="m 1919.4832,512.83331 -34.1667,33.66667 v 86.83333 h -20.5 V 390.66664 h 20.5 v 130.83334 l 124.3333,-130.83334 h 25.8334 l -101.6667,108 109.5,134.66667 h -25 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4770" /><path
d="m 2211.1498,565.33331 h -110.1666 l -25,68 h -21.5 l 91.8333,-242.66667 h 19.5 l 91.8333,242.66667 h -21.3333 z m -103.8333,-17.5 h 97.3333 l -48.6666,-132.16667 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4772" /><path
d="m 2474.1499,633.33331 h -20.5 l -139.5,-207.66667 v 207.66667 h -20.6667 V 390.66664 h 20.6667 l 139.6666,207.83334 V 390.66664 h 20.3334 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4774" /><path
d="m 2715.4832,525.16664 q 0,33.5 -11.6667,58.83334 -11.5,25.33333 -33,39 -21.5,13.66667 -49.6667,13.66667 -42.5,0 -68.6666,-30.33334 -26.1667,-30.5 -26.1667,-82.16667 v -25 q 0,-33.16667 11.6667,-58.66667 11.8333,-25.66666 33.3333,-39.33333 21.5,-13.83333 49.5,-13.83333 28,0 49.3333,13.5 21.5,13.5 33.1667,38.16666 11.6667,24.66667 12.1667,57.16667 z m -20.5,-26.33333 q 0,-43.83334 -19.8334,-68.66667 -19.8333,-24.83333 -54.3333,-24.83333 -33.8333,0 -54,25 -20,24.83333 -20,69.5 v 25.33333 q 0,43.16667 20,68.50001 20,25.16666 54.3333,25.16666 34.8334,0 54.3334,-24.83333 19.5,-25 19.5,-69.5 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4776" /><path
d="m 2812.3165,567.83331 7.5,37.66667 9.1667,-36 52.6667,-178.83334 h 18.5 l 52,178.83334 9,36.33333 8,-38 43.8333,-177.16667 h 21 l -62.1667,242.66667 h -19.6666 l -55,-189.83334 -6.1667,-24 -6,24 -56.3333,189.83334 h -19.6667 l -62,-242.66667 h 21 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4778" /><path
d="m 3144.6499,522.99998 74.1666,-132.33334 h 23.6667 l -87.6667,151.33334 v 91.33333 h -20.5 v -91.33333 l -87.5,-151.33334 h 24.3334 z"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
id="path4780" /></g></g></svg>

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg91"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="wulkanowy_only_logo.svg">
<defs
id="defs85" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="400"
inkscape:cy="560"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1677"
inkscape:window-height="1030"
inkscape:window-x="192"
inkscape:window-y="0"
inkscape:window-maximized="0" />
<metadata
id="metadata88">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Warstwa 1"
inkscape:groupmode="layer"
id="layer1">
<g
style="display:inline"
id="layer2"
transform="matrix(0.26458333,0,0,0.26458333,-30.389283,3.6285705)">
<path
style="fill:#ffffff;stroke-width:0.781796"
d="m 385.17894,776.98989 c 0.62544,2.03267 0.31272,4.2217 -0.7818,6.01983 l -15.08867,24.47023 c -1.48541,2.42357 -4.2217,3.98716 -7.19253,3.98716 H 220.92351 c -6.56709,0 -10.55425,-6.8798 -7.03616,-12.03966 l 90.92292,-133.92173 c 0.54726,-0.78179 0.85997,-1.64177 1.09451,-2.50174 l 41.66975,-177.93687 c 0.46908,-2.11085 1.87631,-3.90898 3.90898,-5.00349 l 56.4457,-30.95914 c 2.03267,-1.09452 3.43991,-2.89265 3.90899,-5.08168 l 7.58342,-33.06999 c 1.56359,-6.8798 11.41423,-8.36522 15.32321,-2.34538 l 2.73629,4.37806 c 1.17269,1.87631 1.48541,4.2217 0.70362,6.33255 l -51.44221,148.69767 c -0.3909,1.1727 -0.54726,2.42357 -0.31272,3.67445 l 12.82146,71.14347 c 0.23454,1.40723 0.0782,2.89265 -0.54725,4.2217 l -30.56824,68.64172 c -0.70362,1.64178 -0.85998,3.43991 -0.31272,5.08168 z m 417.94836,34.47722 h -97.25548 c -2.81446,0 -5.39439,-1.40723 -6.95798,-3.59626 l -65.43636,-92.01744 c -0.3909,-0.62543 -0.7818,-1.25087 -1.01634,-1.95449 L 600.01659,619.1452 c -0.62544,-1.87631 -2.11085,-3.51809 -3.98716,-4.45624 L 516.59891,574.5828 c -2.18903,-1.09451 -3.75262,-3.12718 -4.2217,-5.39439 l -11.72694,-58.16566 c -0.15636,-0.93815 -0.54726,-1.87631 -1.1727,-2.73628 L 472.5056,468.64939 c -1.48542,-2.18903 -1.71995,-4.84714 -0.62544,-7.19253 l 16.41772,-35.10266 c 1.25088,-2.6581 3.98717,-4.45624 7.11435,-4.6126 l 30.49006,-1.79813 c 1.79813,-0.0782 3.43991,-0.70361 4.76896,-1.79813 l 22.43756,-17.43406 c 4.2217,-3.28354 10.63243,-1.87631 12.89964,2.73629 l 77.31966,157.29744 c 0.31272,0.70361 0.54726,1.40723 0.70362,2.11085 l 9.53792,63.24733 c 0.23453,1.48541 0.85997,2.81446 1.87631,3.90898 l 154.01389,168.5553 c 4.53442,5.0035 0.70362,12.89964 -6.33255,12.89964 z M 424.97238,319.32628 c 0,-17.90314 11.33604,-33.30453 27.59741,-40.49706 -1.1727,-1.95449 -1.87631,-4.06534 -1.87631,-6.33255 0,-8.67794 10.00699,-15.71411 22.2812,-15.71411 0.31271,0 0.54725,0 0.85997,0 5.08168,-8.4434 14.77595,-14.15051 25.87746,-14.15051 0.7818,0 1.5636,0 2.34539,0.0782 1.01634,0.0782 2.03267,-0.3909 2.57993,-1.1727 8.20886,-12.50874 29.00465,-21.42122 53.31851,-21.42122 8.99066,0 17.51224,1.25088 25.09567,3.36173 1.79813,-2.97083 5.78529,-5.0035 10.39789,-5.0035 5.23804,0 9.69428,2.65811 11.02333,6.33255 6.41073,-7.42707 17.2777,-12.2742 29.63008,-12.2742 19.70127,0 35.64992,12.43056 35.64992,27.75377 0,1.87631 -0.23454,3.67444 -0.70362,5.47257 -0.31271,1.25088 0.3909,2.50175 1.71996,2.97083 12.58692,4.6126 21.1085,13.36872 21.1085,23.37571 0,11.41423 -11.02333,21.18669 -26.58108,25.01749 -1.25087,0.31272 -2.03267,1.40723 -2.03267,2.57993 0,0.0782 0,0.15635 0,0.23453 0,8.8343 -8.75612,16.10501 -20.01399,16.88681 0.0782,0.3909 0.0782,0.78179 0.0782,1.25087 0,16.96498 -32.28819,30.64642 -72.08163,30.64642 -8.59976,0 -16.80862,-0.62544 -24.39204,-1.79813 0,0.15636 0,0.23454 0,0.3909 0,7.03616 -9.06884,12.74328 -20.17035,12.74328 -0.62544,0 -1.1727,0 -1.71995,-0.0782 0.78179,1.71995 1.17269,3.51808 1.17269,5.39439 0,10.94515 -13.8378,19.77945 -30.95914,19.77945 -1.87631,0 -3.67444,-0.0782 -5.47257,-0.31272 -1.40724,-0.15635 -2.73629,0.70362 -3.04901,2.03268 -1.48541,5.47257 -6.25437,9.45973 -11.96148,9.45973 -6.87981,0 -12.35239,-5.86347 -12.35239,-13.056 0,-3.36172 1.1727,-6.41073 3.12719,-8.67794 0.70362,-0.78179 0.93816,-1.87631 0.46908,-2.81447 -1.09452,-2.03267 -1.5636,-4.14352 -1.5636,-6.41073 v 0 c 0,-1.25087 -1.01633,-2.26721 -2.2672,-2.57992 -21.18669,-4.69078 -37.13533,-22.35938 -37.13533,-43.46788 z m 179.50045,424.6718 c 0.31272,0.93816 0.3909,1.87632 0.3909,2.89265 l -4.53442,57.30568 c -0.31272,4.06534 -3.90898,7.2707 -8.28704,7.2707 H 445.68998 c -3.12718,0 -6.01983,-1.79813 -7.42707,-4.37806 l -24.1575,-44.87511 c -0.15636,-0.23454 -0.23454,-0.46908 -0.31272,-0.70362 l -22.75028,-55.11664 c -0.85997,-1.95449 -0.70361,-4.2217 0.23454,-6.09802 l 37.76077,-73.87976 c 0.93815,-1.79813 1.09451,-3.90898 0.3909,-5.78529 l -18.4504,-51.12948 c -0.62544,-1.79814 -0.54726,-3.83081 0.23454,-5.55076 l 30.80278,-65.59272 c 3.12718,-6.56709 13.36872,-6.01983 15.55775,0.85998 l 9.61609,29.86462 29.31737,78.49236 c 0.78179,2.18903 2.6581,3.90898 5.00349,4.69078 l 62.54372,21.34304 c 2.42357,0.85998 4.29988,2.65811 5.08167,4.92532 z"
id="XMLID_42_" />
<g
id="text4752"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.333px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
aria-label="WULKANOWY" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

@ -0,0 +1,22 @@
const attendance_ = document.querySelector('#attendance_');
myStorage = window.sessionStorage;
const getAttendance = () => {
document.querySelector('#content').innerHTML = 'Here is attendance (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/attendance', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
})
}
attendance_.addEventListener('click', getAttendance);

View file

@ -0,0 +1,22 @@
const start_ = document.querySelector('#dashboard_');
const getDashboard = () => {
document.querySelector('#content').innerHTML = 'Dashboard';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/dashboard', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
})
}
window.addEventListener('load', getDashboard);
start_.addEventListener('click', getDashboard);

View file

@ -0,0 +1,22 @@
const exams_ = document.querySelector('#exams_');
myStorage = window.sessionStorage;
const getExams = () => {
document.querySelector('#content').innerHTML = 'Here is exams (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/exams', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data)
})
}
exams_.addEventListener('click', getExams);

View file

@ -0,0 +1,101 @@
var hash = require('object-hash');
const grades_ = document.querySelector('#grades_');
myStorage = window.sessionStorage;
const getGrades = () => {
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/grades', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
const allGrades = data.data.Oceny
const content = document.getElementById("content")
content.innerHTML = ""
const container = document.getElementsByClassName("gradeModals")[0]
allGrades.forEach((grade) => {
const czastkowe = grade.OcenyCzastkowe
czastkowe.forEach((czastkowa) => {
const gradeDiv = document.createElement("div")
gradeDiv.classList = "grade modal-trigger"
gradeDiv.dataset.target = `${hash.MD5(czastkowa)}`
gradeDiv.innerHTML = `${czastkowa.Wpis}`
switch (czastkowa.Wpis) {
case "6" || "6-":
czastkowa.Kolor = "#3dbbf5"
gradeDiv.style.background = "#3dbbf5"
break;
case "5" || "5-" || "5+":
czastkowa.Kolor = "#4caf50"
gradeDiv.style.background = "#4caf50"
break;
case "4" || "4-" || "4+":
czastkowa.Kolor = "#a0c431"
gradeDiv.style.background = "#a0c431"
break;
case "3" || "3-" || "3+":
czastkowa.Kolor = "#ffb940"
gradeDiv.style.background = "#ffb940"
break;
case "2" || "2-" || "2+":
czastkowa.Kolor = "#ff774d"
gradeDiv.style.background = "#ff774d"
break;
case "1" || "1+":
czastkowa.Kolor = "#d43f3f"
gradeDiv.style.background = "#d43f3f"
break;
default:
czastkowa.Kolor = "#607d8b"
gradeDiv.style.background = "#607d8b"
}
const gradeModal = document.createElement("div")
gradeModal.id = `${hash.MD5(czastkowa)}`
gradeModal.classList = "modal"
gradeModal.style.marginTop = "15rem"
gradeModal.innerHTML = `<div class="modal-content">
<h4>${grade.Przedmiot}</h4>
<h5>${czastkowa.KodKolumny} - ${czastkowa.NazwaKolumny}</h5>
<div style="float: right; background: ${czastkowa.Kolor}; width: 60px; height: 70px; text-align: center;"><h1>${czastkowa.Wpis}</h1></div>
<span class="teacher" style="font-size: 16px;">Nauczyciel</span>
<p>${czastkowa.Nauczyciel}</p>
<span class="weight" style="font-size: 16px;">Waga</span>
<p>${czastkowa.Waga}</p>
<span class="date" style="font-size: 16px;">Data</span>
<p>${czastkowa.DataOceny}</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close${hash.MD5(czastkowa)} waves-effect waves-white btn materialize-red">Zamknij</a>
</div>`
gradeDiv.addEventListener('click', () => {
console.log(czastkowa)
gradeModal.style.display = 'block'
})
container.append(gradeModal)
document.getElementsByClassName(`modal-close${hash.MD5(czastkowa)}`)[0].addEventListener('click', () => {
gradeModal.style.display = 'none'
})
content.append(gradeDiv)
})
})
})
}
grades_.addEventListener('click', getGrades);

View file

@ -0,0 +1,22 @@
const homeworks_ = document.querySelector('#homeworks_');
myStorage = window.sessionStorage;
const getHomeworks = () => {
document.querySelector('#content').innerHTML = 'Here is homeworks (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/homeworks', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
})
}
homeworks_.addEventListener('click', getHomeworks);

View file

@ -0,0 +1,66 @@
const button = document.querySelector('#button');
const login = () => {
const loginName = document.querySelector('#id_loginName').value;
const Password = document.querySelector('#id_Password').value;
const symbol = document.querySelector('#id_Symbol').value;
const diary = document.querySelector('#id_diary').value;
if(loginName != '' && Password != '' && symbol != ''){
switch(diary){
case 'Fakelog':
var diaryUrl = 'http://cufs.fakelog.cf/';
sessionStorage.setItem('diary_url', 'http://cufs.fakelog.cf/');
break;
case 'Vulcan UONET+':
var diaryUrl = 'https://cufs.vulcan.net.pl/';
sessionStorage.setItem('diary_url', 'https://cufs.vulcan.net.pl/');
break;
}
data = {
'loginName': loginName,
'Password': Password,
'Symbol': symbol,
'diaryUrl': diaryUrl
}
fetch(url = 'api/login', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie()
},
body: JSON.stringify(data)
}).then(response => response.json()).then(data => {
if(data['success']){
myStorage = window.sessionStorage;
sessionStorage.setItem('cookies_data', JSON.stringify(data));
sessionStorage.setItem('csrfcookie', csrfcookie());
sessionStorage.setItem('email', document.querySelector('#id_loginName').value);
sessionStorage.setItem('symbol', document.querySelector('#id_Symbol').value);
window.location.href = "/content/";
}
else{
document.querySelector('#error').innerHTML = 'Nieprawidłowy login, hasło lub symbol';
}
});
}
};
var csrfcookie = function() {
var cookieValue = null,
name = 'csrftoken';
if (document.cookie && document.cookie !== '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].trim();
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
};
button.addEventListener('click', login);

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,255 @@
const received_ = document.querySelector('#received_');
const sent_ = document.querySelector('#sent_');
const deleted_ = document.querySelector('#deleted_');
const content = document.getElementById("content");
const send_ = document.querySelector('#send_')
var hash = require('object-hash');
const getReceivedMessages = () => {
content.innerHTML = ""
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/messages/received', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
const wiadomosci = data.data
table = document.createElement("table")
table.className = "striped"
table.innerHTML = "<thead>\n" +
" <tr>\n" +
" <th>Temat</th>\n" +
" <th>Nadawca</th>\n" +
" <th>Data</th>\n" +
" </tr>\n" +
" </thead>" +
" <tbody>" +
" " +
" </tbody>"
content.append(table)
wiadomosci.forEach((wiadomosc) => {
const tbody = document.getElementsByTagName("tbody")[0]
wiadomoscRow = tbody.insertRow()
temat = wiadomoscRow.insertCell()
temat.innerHTML = `<span id="${wiadomosc.Id}">${wiadomosc.Temat}</span>`
wiadomoscRow.appendChild(temat)
nadawca = wiadomoscRow.insertCell()
nadawca.innerHTML = `<span>${wiadomosc.Nadawca.Name}</span>`
wiadomoscRow.appendChild(nadawca)
dataWyslania = wiadomoscRow.insertCell()
dataWyslania.innerHTML = `<span>${wiadomosc.Data}</span>`
wiadomoscRow.appendChild(dataWyslania)
document.getElementById(wiadomosc.Id).addEventListener('click', getMessageContent);
})
})
}
const getSentMessages = () => {
content.innerHTML = ""
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/messages/sent', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
const wiadomosci = data.data // haha spaghetti code goes brrr
table = document.createElement("table")
table.className = "striped"
table.innerHTML = "<thead>\n" +
" <tr>\n" +
" <th>Temat</th>\n" +
" <th>Adresat</th>\n" +
" <th>Data</th>\n" +
" </tr>\n" +
" </thead>" +
" <tbody>" +
" " +
" </tbody>"
content.append(table)
wiadomosci.forEach((wiadomosc) => {
const tbody = document.getElementsByTagName("tbody")[0]
wiadomoscRow = tbody.insertRow()
temat = wiadomoscRow.insertCell()
temat.innerHTML = `<span id="${wiadomosc.Id}">${wiadomosc.Temat}</span>`
wiadomoscRow.appendChild(temat)
nadawca = wiadomoscRow.insertCell()
nadawca.innerHTML = `<span>${wiadomosc.Adresaci[0]}</span>`
wiadomoscRow.appendChild(nadawca)
dataWyslania = wiadomoscRow.insertCell()
dataWyslania.innerHTML = `<span>${wiadomosc.Data}</span>`
wiadomoscRow.appendChild(dataWyslania)
document.getElementById(wiadomosc.Id).addEventListener('click', getMessageContent);
})
})
}
const getDeletedMessages = () => {
content.innerHTML = ""
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/messages/deleted', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
const wiadomosci = data.data
table = document.createElement("table")
table.className = "striped"
table.innerHTML = "<thead>\n" +
" <tr>\n" +
" <th>Temat</th>\n" +
" <th>Nadawca</th>\n" +
" <th>Data</th>\n" +
" </tr>\n" +
" </thead>" +
" <tbody>" +
" " +
" </tbody>"
content.append(table)
wiadomosci.forEach((wiadomosc) => {
const tbody = document.getElementsByTagName("tbody")[0]
wiadomoscRow = tbody.insertRow()
temat = wiadomoscRow.insertCell()
temat.innerHTML = `<span id="${wiadomosc.Id}">${wiadomosc.Temat}</span>`
wiadomoscRow.appendChild(temat)
nadawca = wiadomoscRow.insertCell()
nadawca.innerHTML = `<span>${wiadomosc.Nadawca.Name}</span>`
wiadomoscRow.appendChild(nadawca)
dataWyslania = wiadomoscRow.insertCell()
dataWyslania.innerHTML = `<span>${wiadomosc.Data}</span>`
wiadomoscRow.appendChild(dataWyslania)
document.getElementById(wiadomosc.Id).addEventListener('click', getMessageContent);
})
})
}
const getAddressee = () => {
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/messages/recipients', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
document.querySelector('#content').innerHTML = `
<form action="javascript:void(0);">
<div class="input-field">
<select id='recipients' style='display: inline !important;'>
</select>
</div>
<div class="input-field">
<input required="" placeholder="Temat" id="subject" class="input-field">
</div>
<div class="input-field">
<input required="" placeholder="Treść" id="message-content" class="input-field">
</div>
<button id="button" class="waves-light waves-effect btn red darken-1">WYŚLIJ</button>
</form>`
data.addressee.data.forEach((recipient) => {
const recipient_hash = `${hash.MD5(recipient)}`
document.querySelector('#recipients').insertAdjacentHTML('beforeend', '<option value="'+recipient_hash+'">'+recipient.Name+'</option>');
sessionStorage.setItem(recipient_hash, JSON.stringify(recipient));
const button_ = document.querySelector('#button');
button_.addEventListener('click', sendMessage);
})
})
}
const sendMessage = () => {
const recipient_hash_ = document.querySelector('#recipients').value;
const subject_ = document.querySelector('#subject').value;
const content_ = document.querySelector('#message-content').value;
const recipient_ = JSON.parse(sessionStorage.getItem(recipient_hash_));
if(subject_ != '' && content_ != ''){
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
send_data = {
'cookies_data': cookies_data,
'data': recipient_,
'subject': subject_,
'content': content_
}
fetch(url = '../api/messages/send', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: JSON.stringify(send_data)
}).then(response => response.json()).then(data => {
console.log(data)
})
}
}
const getMessageContent = (event) => {
send_data = {
'cookies_data': cookies_data,
'message_id': event.target.id
}
fetch(url = '../api/messages/content', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: JSON.stringify(send_data)
}).then(response => response.json()).then(data => {
console.log(data)
})
}
received_.addEventListener('click', getReceivedMessages);
sent_.addEventListener('click', getSentMessages);
deleted_.addEventListener('click', getDeletedMessages);
send_.addEventListener('click', getAddressee);

View file

@ -0,0 +1,41 @@
const registered_ = document.querySelector('#mobile_access_');
myStorage = window.sessionStorage;
const getRegisteredDevices = () => {
document.querySelector('#content').innerHTML = '<button id="register_device_">ZAJERESTRUJ URZĄDZENIE</button><div id="register_device_data"></div><br />Here is registered mobile devices (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/mobile/registered', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
const register_device_ = document.querySelector('#register_device_');
register_device_.addEventListener('click', registerDevice);
})
}
const registerDevice = () => {
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/mobile/register', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
document.querySelector('#register_device_data').innerHTML = data.data.QrCodeImage+'<br /> TOKEN:'+data.data.TokenKey+'<br /> PIN:'+data.data.PIN+'<br /> SYMBOL:'+data.data.CustomerGroup;
})
}
registered_.addEventListener('click', getRegisteredDevices);

View file

@ -0,0 +1,41 @@
const notes_ = document.querySelector('#notes_');
content = document.getElementById("content")
myStorage = window.sessionStorage;
const getNotes = () => {
content.innerHTML = ""
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/notes', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
const uwagi = data.data.Uwagi
const osiagniecia = data.data.Osiagniecia
console.log(data);
const uwagiList = document.createElement("ul")
uwagiList.id = "notesList"
content.append(uwagiList)
uwagi.forEach((uwaga) => {
uwagaElement = document.createElement("li")
uwagaElement.innerHTML = `<div class="noteElement"><h6 style="display:block; margin-top: -5px;">${uwaga.Kategoria}</h6><span style="display:block; float: right; margin-top: -25px; font-size: 13px;">${uwaga.Nauczyciel}</span><span style="display:block; width: 50%; font-size: 12px;">${uwaga.TrescUwagi}</span><span style="float:right; font-size: 20px; margin-top: -20px; font-weight: 700;">${uwaga.Punkty}</span></div>`
uwagiList.append(uwagaElement)
})
osiagniecia.forEach((osiagniecie) => {
osiagniecieElement = document.createElement("li")
osiagniecieElement.innerHTML = `<div class="achievementElement"><span>${osiagniecie}</span></div>`
uwagiList.append(osiagniecieElement)
})
})
}
notes_.addEventListener('click', getNotes);

View file

@ -0,0 +1,22 @@
const school_data = document.querySelector('#school_data_');
myStorage = window.sessionStorage;
const getSchoolData = () => {
document.querySelector('#content').innerHTML = 'Here is school data (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/school_data', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data);
})
}
school_data_.addEventListener('click', getSchoolData);

View file

@ -0,0 +1,16 @@
const name_ = document.querySelector('#name');
const email_ = document.querySelector('#email');
myStorage = window.sessionStorage;
const studentName = () => {
const cookies_data = JSON.parse(sessionStorage.getItem('cookies_data'))
name_.innerHTML = cookies_data['data']['register_r']['data'][0]['UczenImie']+' '+cookies_data['data']['register_r']['data'][0]['UczenImie2']+' '+cookies_data['data']['register_r']['data'][0]['UczenNazwisko']
};
const studentEmail = () => {
email_.innerHTML = sessionStorage.getItem('email')
};
window.addEventListener('load', studentName);
window.addEventListener('load', studentEmail);

View file

@ -0,0 +1,22 @@
const timetable_ = document.querySelector('#timetable_');
myStorage = window.sessionStorage;
const getTimetable = () => {
document.querySelector('#content').innerHTML = 'Here is timetable (in my imagination)';
cookies_data = sessionStorage.getItem('cookies_data');
csrfcookie_ = sessionStorage.getItem('csrfcookie');
fetch(url = '../api/timetable', {
method: 'POST',
mode: 'cors',
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfcookie_
},
body: cookies_data
}).then(response => response.json()).then(data => {
console.log(data)
})
}
timetable_.addEventListener('click', getTimetable);

View file

@ -0,0 +1,95 @@
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="{% static 'frontend/css/start.css' %}" type="text/css" />
<script src="{% static 'frontend/js/start.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/dashboard.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/dist/out-grades.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/timetable.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/exams.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/notes.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/attendance.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/homeworks.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/dist/out-messages.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/mobile_access.js' %}" type="text/javascript" defer></script>
<script src="{% static 'frontend/js/school_data.js' %}" type="text/javascript" defer></script>
<link rel="shortcut icon" href="{% static 'frontend/images/27146352.png' %}">
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Lora:wght@500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@300&family=Quicksand:wght@300&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="{% static 'frontend/css/materialize.min.css' %}" media="screen,projection"/>
<script src="{% static 'frontend/js/materializecss/materialize.min.js' %}"></script>
<title>Wulkanowy | Aplikacja ucznia i rodzica</title>
</head>
<body>
<div data-v-cd2b8d62 data-v-09be56d6 id="container">
<div class="gradeModals"></div> <!-- please don't touch it for scraping, you have an api :D -->
<nav>Wulkanowy web early access insider preview pre-alpha pre-beta alpha beta release canditate v. 0.0.1</nav>
<ul id="slide-out" class="sidenav">
<li><div class="user-view">
<div class="background">
<img src="{% static 'frontend/images/wallpaper.jpg' %}" width="300" height="176">
</div>
<a><img class="circle" src="{% static 'frontend/images/27146352.png' %}"></a>
<a><span class="white-text name" id='name'>Imie Imie2 Nazwisko</span></a>
<a><span class="white-text email" id='email'>E-mail</span></a>
</div></li>
<li><a id="dashboard_" class='option'><i class="material-icons">dashboard</i>Start</a></li>
<li><a id="grades_" class='option'><i class="material-icons">filter_6</i>Oceny</a></li>
<li><a id="timetable_" class='option'><i class="material-icons">event_note</i>Plan Lekcji</a></li>
<li><a id="exams_" class='option'><i class="material-icons">event</i>Sprawdziany</a></li>
<li><a id="homeworks_" class='option'><i class="material-icons">class</i>Zadania Domowe</a></li>
<li><a id="attendance_" class='option'><i class="material-icons">date_range</i>Frekwencja</a></li>
<li><a id="notes_" class='option'><i class="material-icons">emoji_events</i>Uwagi i Osiągnięcia</a></li>
<li><a id="mobile_access_" class='option'><i class="material-icons">devices</i>Dostęp Mobilny</a></li>
<li><a id="school_data_" class='option'><i class="material-icons">business</i>Szkoła i Nauczyciele</a></li>
<li><a id="messages_" class="dropdown-trigger" data-target="dropdown1"><i class="material-icons">email</i>Wiadomości</a></li>
<ul id='dropdown1' class='dropdown-content'>
<li><a id='received_' class='option'>Odebrane</a></li>
<li><a id='sent_' class='option'>Wysłane</a></li>
<li><a id='send_' class='option'>Napisz Wiadomość</a></li>
<li><a id='deleted_' class='option'>Usunięte</a></li>
</ul>
</ul>
<a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<div id="content">
</div>
</div>
<script>
var elem = document.querySelector('.tabs');
var options = {}
var instance = M.Tabs.init(elem, options);
// sidebar
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.sidenav');
var instances = M.Sidenav.init(elems, options);
});
// modal
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.modal');
var instances = M.Modal.init(elems, options);
});
var dropdowns = document.querySelectorAll('.dropdown-trigger')
for (var i = 0; i < dropdowns.length; i++){
M.Dropdown.init(dropdowns[i]);
}
</script>
</body>
</html>

View file

@ -0,0 +1,87 @@
{% load static %}
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{% static 'frontend/css/style.css' %}">
<link rel="shortcut icon" href="{% static 'frontend/images/27146352.png' %}">
<link href="https://fonts.googleapis.com/css2?family=Lora:wght@500&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="{% static 'frontend/css/materialize.min.css' %}" media="screen,projection"/>
<script src="{% static 'frontend/js/materializecss/materialize.min.js' %}"></script>
<title>Wulkanowy | Aplikacja ucznia i rodzica</title>
</head>
<body>
<div data-v-cd2b8d62 data-v-09be56d6 id="container">
<div id="row">
<h1 data-v-cd2b8d62="" class="logo">
<img data-v-cd2b8d62 src="{% static 'frontend/images/wulkanowy-full-flat.4ff8222a.svg' %}" alt="Wulkanowy">
</h1>
<form action="javascript:void(0);" class="box col s12" id="form">{% csrf_token %}
<div class="card white darken-1">
<div class="card-content">
<span class="card-title">Zaloguj się na konto rodzica lub ucznia</span>
<div class="input-field">
<input required="" placeholder="E-mail" id="id_loginName" class="validate">
</div>
<div class="input-field">
<input type="password" required="" placeholder="Password" id="id_Password">
</div>
<div class="input-field">
<input required="" placeholder="Symbol" id="id_Symbol" class="input-field">
</div>
<div class="input-field">
<select name="test" id="id_diary">
<option value="Vulcan UONET+">Vulcan UONET+</option>
<option value="Fakelog">Fakelog</option>
</select>
</div>
</div>
<div class="card-action">
<div id='error'></div>
<a href="https://wulkanowy.github.io/czesto-zadawane-pytania/co-to-jest-symbol">Gdzie mogę znaleźć symbol?</a>
<button id="button" class="waves-light waves-effect btn red darken-1">LOGIN</button>
</div>
</div>
</form>
</div>
<div id="icons">
<a href="mailto:wulkanowyinc@gmail.com" style="text-decoration: none;">
<img src="{% static 'frontend/images/email.ce588d18.svg' %}" class="icon" style="width: 55px;" alt="E-mail">
</a>
<a href="https://discord.com/invite/vccAQBr" style="text-decoration: none;">
<img src="{% static 'frontend/images/discord.e9241a54.svg' %}" class="icon" alt="Discord">
</a>
<a href="https://github.com/wulkanowy/" style="text-decoration: none;">
<img src="{% static 'frontend/images/github.9c30fa5a.svg' %}" class="icon" style="width: 55px;" alt="Github">
</a>
<a href="https://www.paypal.com/paypalme/wulkanowy" style="text-decoration: none;">
<img src="{% static 'frontend/images/paypal.9fd1b9bc.svg' %}" class="icon" alt="Paypal">
</a>
<a href="https://www.paypal.com/paypalme/wulkanowy" style="text-decoration: none;">
<img data-v-cec09316="" class='icon' src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANkAAADaCAYAAAArKufYAAAACXBIWXMAABcRAAAXEQHKJvM/AAAL8ElEQVR4nO3d/VEjRxrH8d6r/R9dBCtHgBwB2ghWGwHaCIwjOIjgcARGEZyIwCiCQxEYZbCKgKtZP1Mnq2dG06/TL99PFYVrFjAS+unp7umXD+/v7wpAOP/guQXCImRAYIQMCIyQAYF95AmexEwptTj53Fie/CI3lr/UUSn1Kv/9/eS/X84+IyJGF8NqQ9QEaC4ftgHypQ3i+QcCIWR+tYFqP3/K6HffSehe5POb9hWwQsjczCVMK/l8lfODOXNQSm0ldC/S/IQFQmauqVJrCdV1br+8g2cJ25YqZ4aQjdMGa5VZEzCUvVLqicCNQ8j6zSVUdwRr0LOE7Wnoi2pGyHQrqVpftH/BkKME7ZHq9neE7C8zCRZVy4+dhK2pcNWrPWTzk3CVNDKYimaE8r72pmStIZvLH/9W+xeEUHXYapu7OJc/9J8ELKqmCf679NXWFT3uH2qpZDNpEtIsTENVla2GkK2lE0640rOTsBU9cbnkkC0lXDXNysjVRloZRU7dKrFPNpNmyB8ELBu30l+7K/HBlVbJVhIwmob52knYill+U0olm8mNz/8QsOw16+3+K321IpRQyahe5drJwFXW07RyrmRt34vqVa4baTZmfW8t10q2kIAxsFGPbEcgc6xka7mvQsDqcit/90Vujzq3kD3J9Byah3W6lqBl1XzMpbk4o3rhzEMuI5A5VLKFdH4JGE79S1o2s9SfldQr2VLuf9E8RJ+9vE6SHRBJuZKtZWoUAcOQa2npJDsgkmolW8sABzDWUSpactOxUqxkjwQMFq5SHeJPrZI9sWIZjpKraClVMgIGH5KraKmEjIDBp6SClkLI2DUKISQTtKn7ZIwiIrTJ+2hThoyAIZajVLRJ1qVNFbKFrH4FYplsZsgUfbJF6VuAIUnXU+3NHztkM+YiYkI3U2yoGjtkW05NwcRuY69HixmyxwRO/geUDLgtYz0TsQY+GElM03HE0Pai0Ob9UQ4gCT4QEiNk7UAH/bBpHOX5f5WP744DT20FmJ3c6G2v5RbIXYyKFiNkrGqOrz3H+WWie0PLkxAupGKk+hoIvo1B6JA1/bBftKsIIfUD0lNegv855G2lkCFbyspmhJPTYegph+wgFTdI/yxUyGbyR6cfFs6DhCuXzT5T3xZtE2poP1TImmbLF+0qfMh1f/gc9h78GmJWSIiQ0UwM4yjhmmRqkAc5hCzIsL7vm9GzWk+4D2wvfYZcA5aLqxAjjb5Dds+0Ke82Uy7TqNAvvu+d+WwusnzFv2Cd8QnkdHzQ3ueKap+V7FG7Ahe/FhSw3Fz7PL/aVyVbyWF88KOkCtbK7SA8b4MgvioZVcyfEgOWI2+DID4q2b2csAF3yR+e4CDXw8l/ch10cq1kM59t18q198FKDFjOnKuZa8jumDrlzX2KhyXgx0rqucvT4NJcZH6iP1HWNU0s1+aicu0nu1Qyqpg/WRzLWjGnamYbMvpi/mzYIi8L1m+Ets3FJmD/1q7ChvPoVSZybi62rP5WtpWMKubHhjmJWbGqZjYhWzMJ2BtWLORlJV0lI7Yhg7sDfbHsXNm8/k1DtmCDUm+YipYn466Sacjoi/nDAsw8fTK9p2kSspm0SeFuz4BH1oyajCYhW3Hz2Rv6Ynm7NRkA+ahd6UcV8ye3puIslUPOE7IaOzo89mZ0M6XkT+0qbH1I/Jmby4toKR+0YHSjtygYW8moYv7sE/7d5nLD9Vb7F5y7lufrYt96bJ+Me2P+pLqc5V5aKwRsvFHFZ0zIUj6RI0epjSq2Rwyzut3cqOIzJmSlr3OKLbWRxUe2VLd2PWaUcUzI6I+Vi/6Xu4v5GDO6WMIShZSkMrLIiLEfz5eCdqmSDX4zssZqbD8udqcuhYz+WJmYIufP1aX7ZYQsrlTukTFFzq/BnAyFbMbQvXep7Kk4+KKAscFWwVDIBksgsua0jyA0g1kZChnvduVi4a1fg/0yQgb4YRWy3m8CoOnNS1/I5ow+AUaMQ9b7DQA69fZzCRngT2duCBngT+etkb6QGe+SCqC7OPWFrLd9CaDX6EpGFQPsjA5ZZ8kDcJFRnwyAuc7TjrpCxnQqwJ7W3eoKGQB7WnerK2RaEgHY6wqZlkQAo2lFqitkAOxpRYqQAYF1hUwrdwDsdYWMzXMAj7pCBoCQAfkgZEBgJmdGl6rZ1fcu0mNLZXPTz9qV8P6Y4P85BW3gkJD99cJP7cyw0GI/3prmw2pvpDQXEUPnEpBaEDLEQMjOHLQrgJuql091hSy1g8ORPyoZEFjniuFaEDKEps1KL5zWEuwKmTYECTiorak4KmSv2hXAXvWLgLtCBvhEc1H7ko4vAhzQXNS+pOOLAAc1rU88alcIGQKrranYOZ5ByBBSbU3FzpH5rpApWf4BuKq+kqmBkHUmEjBU/ciiGghZbeurEEb1I4tqIGSdXwwYqm3ns87i1BeyzrYlYKC2pmLvEjFChlBqayr2ZqYvZI2ddgUYj5FFMRSy3m8CRqgtZJ39MUXIEJC2NVrhrELW+03ACDcVPUmDkzeGQvY2NGICDKht0GOwIA2F7OI3Az0I2QlChhBq2wJuMCeEDCHUVMl2l+b6XtoL/006dSVPj1lEfDN5jXi4xZDQj7em4futduXMmAMntoWH7KqykTBV4eMN6eIb1piNdC4mFajUYcz95DEhe2UoH+g0qgCN3RKOagbonrQrHcaGbNQPAyoyqqmoDEJGkxH4u9GtO5MdhKlmwP89jn0uCBlgbm+yRYdJyJof+qxdBeozuoqZhkwxygj82IrbKAemIXtiAASV25ruS2pzdBJ9M9Ts3vSx24TMqD0KFGRnsyepTciaUrnRrgLlM65itiFTtv8zIGN72yVCtiF7o5qhMtbdJJczo6lmqMXBZcDPJWRUM9TCqaC4hExRzVCBvettK9eQUc1QOuc9WVxDpqSadZ76DmRu52PTIR8he+MGNQrlZWcxHyFTEjLmNKIkG1+HrvgK2XcGQVCQo8/9MX2FTMkIDAcHogT3pjPth/gMWWOtXQHysvc9xuA7ZM0gyIN2FciH90LhO2RKSu3goWhAoh5CnDAbImSKZiMytA81eBcqZK80G5GZYIUhVMgUzUZkJEgzsRUyZI0VU66QuF3oe7yhQ/ZG/wwJO0ohCCp0yJRsofWbdhWY3srnTec+MUKmZIoK/TOk5CHWMcaxQqbkRHz6Z0jBc8y5tjFD9l2CBkxpH3ucIGbIlAyTftOuAnEcY/XDTsUOmZLZ+tyoRmxHaUkZ7wDsaoqQKWkPszcIYroLecN5yFQhU9Iu5rwzxPBtyoNSpgyZkqAxtI+QJg2YSiBk7YgjQUMImxSO+po6ZIqgIZBNKlP6UgiZImjwLJmAqYRCpggaPPkttUnpKYVMETQ4+uZzKzdfUguZkqAtuI8GQ5OPIvb52HM9BW3Jv034d8T0jvJa2ab6t0ixkp1aM9cRA9qpUskGTGUQMiVNgK8sk8GZpt8+n2qqlIkcQqbknYoBEbQ28nqIOpveVi4hU/KOtWS+Y/V+lW5EFgFTmYVMyRO7kicadWmO5vo5x7PwcgtZ61GecM5Eq8Oz3NZJvv/VJdeQKXnCFzQfi3aUVkv01cw+5RwyddJ8ZPSxPDt5E83+qOTcQ9baynAuVS1/bfWaZKuAEEoJmTqravTV8lRM9TpVUshaW/lDsVlPPg7y5lhM9TpVYsjUyUHxP3GOdfIe5E0x6alRLkoNWetN3h0/04RMzkbeBL0egp6i0kPWepGBkW+EbXI7edNbl9g07FJLyFpPhG0ybbiWsQ56SEVtIWsRtnieaw1Xq9aQtdqwfWWAxLu2z7WqNVyt2kPWapfS/CwvDmaP2DnIjeR/1tTnuuTD+/v7hS+p0kzegZtNWa49PgG7RI6P8v1H38gbVbHD8C4I2WVzCVsTuk+OP6ukkO2kub0tfQjeFSEzs5BmkG3gcg/Zs/SvtjQFxyNk9uYStiY0X0b+lNxCdjgJ1QsVyw4h82d58tFUvKuOn5x6yNpQvZ58hqOU913MzcvZUPXi7OMmscdzkCZfG6ZXmoBhUMmAwLhPBgRGyIDACBkQGCEDAiNkQEhKqf8B3HeeO11S2y8AAAAASUVORK5CYII=" alt="Facebook">
</a>
</div>
</div>
<script type="text/javascript" src="{% static 'frontend/js/login.js' %}" defer></script>
<script>
var elem = document.querySelector('.tabs');
var options = {}
var instance = M.Tabs.init(elem, options);
</script>
</body>
</html>

3
frontend/tests.py Normal file
View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

11
frontend/views.py Normal file
View file

@ -0,0 +1,11 @@
from django.shortcuts import render
from django.shortcuts import redirect
def default_view(request, *args, **kwargs):
return render(request, 'frontend/index.html')
def content_view(request, *args, **kwargs):
if request.session.has_key('is_logged'):
return render(request, 'frontend/content.html')
else:
return redirect('../')

View file

@ -0,0 +1,37 @@
const path = require("path");
module.exports = {
entry: {
attedance : "./static/frontend/js/attendance.js",
exams : "./static/frontend/js/exams.js",
grades : "./static/frontend/js/grades.js",
homeworks : "./static/frontend/js/homeworks.js",
login : "./static/frontend/js/login.js",
messages : "./static/frontend/js/messages.js",
mobile_access : "./static/frontend/js/mobile_access.js",
notes : "./static/frontend/js/notes.js",
start : "./static/frontend/js/start.js",
timetable : "./static/frontend/js/timetable.js",
},
output: {
filename: "out-[name].js",
path: path.resolve(__dirname, "./static/frontend/js/dist")
},
watch: false,
mode: "development",
devtool: "source-map",
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
}
]
}
}

22
manage.py Normal file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wulkanowy.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()

6
requirements.txt Normal file
View file

@ -0,0 +1,6 @@
beautifulsoup4==4.9.3
bs4==0.0.1
Django==3.1.3
python-dotenv==0.15.0
requests==2.24.0
cryptography==3.2.1

3
runserver.bat Normal file
View file

@ -0,0 +1,3 @@
start npm run dev
cls
python manage.py runserver

0
tests/__init__.py Normal file
View file

43
tests/test_urls.py Normal file
View file

@ -0,0 +1,43 @@
from django.test import SimpleTestCase
from django.urls import reverse, resolve
from frontend.views import default_view, content_view
from app.views import login, grades, timetable, exams, homeworks, attendance, notes
class TestUrls(SimpleTestCase):
#views
def test_home_is_resolved(self):
url = reverse('home')
self.assertEquals(resolve(url).func, default_view)
def test_content_is_resolved(self):
url = reverse('content')
self.assertEquals(resolve(url).func, content_view)
#API
def test_login_is_resolved(self):
url = reverse('login')
self.assertEquals(resolve(url).func, login)
def test_grades_is_resolved(self):
url = reverse('grades')
self.assertEquals(resolve(url).func, grades)
def test_timetable_is_resolved(self):
url = reverse('timetable')
self.assertEquals(resolve(url).func, timetable)
def test_exams_is_resolved(self):
url = reverse('exams')
self.assertEquals(resolve(url).func, exams)
def test_homeworks_is_resolved(self):
url = reverse('homeworks')
self.assertEquals(resolve(url).func, homeworks)
def test_attendance_is_resolved(self):
url = reverse('attendance')
self.assertEquals(resolve(url).func, attendance)
def test_notes_is_resolved(self):
url = reverse('notes')
self.assertEquals(resolve(url).func, notes)

21
tests/test_views.py Normal file
View file

@ -0,0 +1,21 @@
from django.test import TestCase, Client
from django.urls import reverse
import json
class TestViews(TestCase):
def setUp(self):
self.client = Client()
self.list_url = reverse('home')
self.detail_url = reverse('content')
def test_views(self):
#DEFAULT_VIEW
response = self.client.get(self.list_url)
self.assertEquals(response.status_code, 200)
self.assertTemplateUsed(response, 'frontend/index.html')
#CONTENT_VIEW
response = self.client.get(self.detail_url)
self.assertEquals(response.status_code, 302)

0
wulkanowy/__init__.py Normal file
View file

16
wulkanowy/asgi.py Normal file
View file

@ -0,0 +1,16 @@
"""
ASGI config for wulkanowy project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wulkanowy.settings')
application = get_asgi_application()

138
wulkanowy/settings.py Normal file
View file

@ -0,0 +1,138 @@
"""
Django settings for mypage project.
Generated by 'django-admin startproject' using Django 3.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
import os
import dotenv
ROOT_PATH = os.path.dirname(__file__)
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
dotenv_file = os.path.join(BASE_DIR, ".env")
if os.path.isfile(dotenv_file):
dotenv.load_dotenv(dotenv_file)
SECRET_KEY = os.environ['SECRET_KEY'] # Instead of your actual secret key
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# My Apps
'app',
'frontend'
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_COOKIE_AGE = 1200
ROOT_URLCONF = 'wulkanowy.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'wulkanowy.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [(
os.path.join(BASE_DIR, 'files')
)]

48
wulkanowy/urls.py Normal file
View file

@ -0,0 +1,48 @@
"""mypage URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from frontend.views import default_view, content_view
from app.views import login, grades, timetable, exams, homeworks, attendance, notes, registered_devices, register_device_, received_messages, sent_messages, deleted_messages, school_data, dashboard, recipients, send, message_content
urlpatterns = [
#views
path('', default_view, name='home'),
path('content/', content_view, name='content'),
#api
path('api/login', login, name='login'),
path('api/grades', grades, name='grades'),
path('api/timetable', timetable, name='timetable'),
path('api/exams', exams, name='exams'),
path('api/homeworks', homeworks, name='homeworks'),
path('api/attendance', attendance, name='attendance'),
path('api/notes', notes, name='notes'),
path('api/school_data', school_data, name='school_data'),
path('api/dashboard', dashboard, name='dashboard'),
#MOBILE ACCESS
path('api/mobile/registered', registered_devices, name='registered_devices'),
path('api/mobile/register', register_device_, name='register_device'),
#MESSAGES
path('api/messages/received', received_messages, name='received_messages'),
path('api/messages/sent', sent_messages, name='sent_messages'),
path('api/messages/deleted', deleted_messages, name='deleted_messages'),
path('api/messages/recipients', recipients, name='recipients'),
path('api/messages/send', send, name='send_message'),
path('api/messages/content', message_content, name='message_content'),
]
urlpatterns += staticfiles_urlpatterns()

16
wulkanowy/wsgi.py Normal file
View file

@ -0,0 +1,16 @@
"""
WSGI config for wulkanowy project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wulkanowy.settings')
application = get_wsgi_application()