From dd91526fab49afa181daeff2380e9ab6e820eef0 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 7 Jan 2019 23:31:13 +0800 Subject: [PATCH] up --- class/core/site_api.py | 4 +++- plugins/mysql/js/mysql.js | 31 ++++++++++++++++++++++++++++++- plugins/php/index.py | 4 ++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/class/core/site_api.py b/class/core/site_api.py index f1a216828..b65b68e1c 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -1,6 +1,5 @@ # coding: utf-8 -import psutil import time import os import sys @@ -9,6 +8,9 @@ import re import json import pwd +sys.path.append("/usr/local/lib/python2.7/site-packages") +import psutil + from flask import request diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index 38f2d832d..d16ff9a8b 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -536,6 +536,27 @@ function delDb(id, name){ }); } +function openPhpmyadmin(name,username,password){ + + if($("#toPHPMyAdmin").attr('action').indexOf('phpmyadmin') == -1){ + layer.msg(lan.database.phpmyadmin_err,{icon:2,shade: [0.3, '#000']}) + setTimeout(function(){ window.location.href = '/soft'; },3000); + return; + } + + var murl = $("#toPHPMyAdmin").attr('action'); + $("#pma_username").val(username); + $("#pma_password").val(password); + $("#db").val(name); + + layer.msg(lan.database.phpmyadmin,{icon:16,shade: [0.3, '#000'],time:1000}); + + setTimeout(function(){ + $("#toPHPMyAdmin").submit(); + },200); + +} + function dbList(page, search){ var _data = {}; if (typeof(page) =='undefined'){ @@ -577,7 +598,7 @@ function dbList(page, search){ var con = '
\ \ \ - \ + \ \ \ \ @@ -604,6 +625,14 @@ function dbList(page, search){
\ '; + con += ''; + $(".soft-man-con").html(con); $('#databasePage').html(rdata.page); }); diff --git a/plugins/php/index.py b/plugins/php/index.py index 197401b06..a72f60a6b 100755 --- a/plugins/php/index.py +++ b/plugins/php/index.py @@ -174,6 +174,10 @@ def initReplace(version): phpFpmWwwReplace(version) phpFpmReplace(version) + session_path = '/tmp/session' + if not os.path.exists(session_path): + os.mkdir(session_path) + return file_bin