@ -1,14 +1,48 @@ |
|||||||
# coding:utf-8 |
# coding:utf-8 |
||||||
|
|
||||||
from dashboard import * |
import sys |
||||||
from site import * |
import io |
||||||
from files import * |
import os |
||||||
from soft import * |
import time |
||||||
from config import * |
import shutil |
||||||
from plugins import * |
|
||||||
from task import * |
from flask import Flask |
||||||
from system import * |
from flask import render_template |
||||||
from database import * |
|
||||||
from crontab import * |
sys.path.append(os.getcwd() + "/class/core") |
||||||
from control import * |
|
||||||
from firewall import * |
# from dashboard import * |
||||||
|
# from site import * |
||||||
|
# from files import * |
||||||
|
# from soft import * |
||||||
|
# from config import * |
||||||
|
# from plugins import * |
||||||
|
# from task import * |
||||||
|
# from system import * |
||||||
|
# from database import * |
||||||
|
# from crontab import * |
||||||
|
# from control import * |
||||||
|
# from firewall import * |
||||||
|
|
||||||
|
app = Flask(__name__, template_folder='templates/default') |
||||||
|
|
||||||
|
|
||||||
|
@app.route('/<reqClass>/<reqAction>', methods=['POST', 'GET']) |
||||||
|
@app.route('/<reqClass>/', methods=['POST', 'GET']) |
||||||
|
@app.route('/<reqClass>', methods=['POST', 'GET']) |
||||||
|
@app.route('/', methods=['POST', 'GET']) |
||||||
|
def index(reqClass=None, reqAction=None, reqData=None): |
||||||
|
print reqClass, reqAction, reqData |
||||||
|
|
||||||
|
if (reqClass == None): |
||||||
|
reqClass = 'index' |
||||||
|
classFile = ('config', 'control', 'crontab', |
||||||
|
'files', 'firewall', 'index', 'login', 'site', 'soft') |
||||||
|
if not reqClass in classFile: |
||||||
|
return '403 no access!' |
||||||
|
|
||||||
|
if reqAction == None: |
||||||
|
return render_template(reqClass + '.html') |
||||||
|
else: |
||||||
|
import classFile |
||||||
|
print classFile.classFile() |
||||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |