update
4
app.py
|
|
@ -6,8 +6,10 @@ import os
|
|||
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
import config
|
||||
from route import app
|
||||
|
||||
app = config.config().makeApp(__name__)
|
||||
|
||||
# app = config.config().makeApp(__name__)
|
||||
|
||||
try:
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -1,14 +1,48 @@
|
|||
# coding:utf-8
|
||||
|
||||
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 *
|
||||
import sys
|
||||
import io
|
||||
import os
|
||||
import time
|
||||
import shutil
|
||||
|
||||
from flask import Flask
|
||||
from flask import render_template
|
||||
|
||||
sys.path.append(os.getcwd() + "/class/core")
|
||||
|
||||
# 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 |