├── Template ├── Admin │ ├── fs │ ├── footer.html │ ├── edit_pwd.html │ ├── login_log.html │ ├── add_link.html │ ├── edit_link.html │ ├── login.html │ ├── access_log.html │ ├── edit_user.html │ ├── header.html │ ├── control_link.html │ ├── index.html │ ├── add.html │ ├── control_feedback.html │ ├── edit.html │ ├── control.html │ └── control_post.html ├── Home │ ├── footer.html │ ├── not_auth.html │ ├── error.html │ ├── jump.html │ ├── 404.html │ ├── close.html │ ├── friendlinks.html │ ├── about.html │ └── header.html └── Install │ ├── start.html │ ├── step_4.html │ ├── step_3.html │ ├── step_1.html │ ├── step_2.html │ └── localhost_test.sql ├── Core ├── Database │ └── .empty_file ├── Config │ ├── apikey.php │ ├── loginInfo.php │ ├── webSet.php │ └── server.php ├── init.php └── install.php ├── Include ├── 404.php ├── About.php ├── Home.php ├── Jump.php ├── Error.php ├── Friendlinks.php ├── Doc.php ├── Admin.php ├── Install.php ├── Firewall │ ├── DisSQL.php │ └── CCProtect.php ├── PHPMailer │ └── Exception.php ├── Index.php └── Common.php ├── favicon.ico ├── index.php ├── assets ├── images │ ├── 404.png │ ├── app.png │ ├── fix.png │ ├── pay │ │ ├── ali.jpg │ │ ├── qq.jpg │ │ └── wechat.jpg │ ├── user_bg.jpg │ └── background.png ├── fonts │ └── roboto │ │ ├── Roboto-Black.woff │ │ ├── Roboto-Bold.woff │ │ ├── Roboto-Bold.woff2 │ │ ├── Roboto-Light.woff │ │ ├── Roboto-Thin.woff │ │ ├── Roboto-Thin.woff2 │ │ ├── Roboto-Black.woff2 │ │ ├── Roboto-Light.woff2 │ │ ├── Roboto-Medium.woff │ │ ├── Roboto-Medium.woff2 │ │ ├── Roboto-Regular.woff │ │ ├── Roboto-Regular.woff2 │ │ ├── Roboto-BoldItalic.woff │ │ ├── Roboto-ThinItalic.woff │ │ ├── Roboto-BlackItalic.woff │ │ ├── Roboto-BlackItalic.woff2 │ │ ├── Roboto-BoldItalic.woff2 │ │ ├── Roboto-LightItalic.woff │ │ ├── Roboto-LightItalic.woff2 │ │ ├── Roboto-MediumItalic.woff │ │ ├── Roboto-MediumItalic.woff2 │ │ ├── Roboto-RegularItalic.woff │ │ ├── Roboto-ThinItalic.woff2 │ │ └── Roboto-RegularItalic.woff2 ├── css │ ├── 994575169312f0027615406d265202f2.png │ ├── 113e7623163d4cb7f965cd8f8d3859eb.woff2 │ ├── 33d48155cd9f38c64e71b9d016dd61fb.woff │ ├── 3a0ee5b0beec8d0ead1336016cbe19ad.woff2 │ ├── 3b52bc86749058f144deb815c481ca5b.woff2 │ ├── 770a8fca674a3550e241a6de7fa82d8b.woff │ ├── 83bebaf37c09c7e1c3ee52682892ae14.woff │ ├── 8bd7856b64b4313341ebfbc0136c9d74.woff │ ├── 8be651082cc0d07c84f633965e8ced59.woff │ ├── b92cc2170a4d5438fd3d19f349ce3785.woff2 │ ├── c065bd9fa03a7a797d95ba7f198a9dcf.woff2 │ ├── cff684e59ffb052d72cb8d5e49471553.woff2 │ ├── d85436fa35b78a399a68b44491fa3478.woff │ ├── eb797abfa6a5cca2463e423c07c4f6ea.woff │ ├── f21b7e045fd077321cdaf92cab817cd3.woff2 │ ├── highlight.min.css │ ├── 4fb701ba006326e351298a120baa1284.svg │ ├── 0a3424f1a2cc42d9637f8ab1f9d55733.svg │ ├── 4a718302573d384b438fc47f8a3c5031.svg │ └── style.css ├── icons │ └── material-icons │ │ ├── MaterialIcons-Regular.woff │ │ └── MaterialIcons-Regular.woff2 └── js │ ├── jquery.cookie.min.js │ ├── index.js │ ├── smooth-scroll.polyfills.min.js │ └── clipboard.min.js ├── API ├── yiyan.php └── function.php ├── Data ├── init.php └── api.php ├── config.inc.php ├── config.php └── README.md /Template/Admin/fs: -------------------------------------------------------------------------------- 1 | fs 2 | -------------------------------------------------------------------------------- /Core/Database/.empty_file: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Core/Config/apikey.php: -------------------------------------------------------------------------------- 1 | query("SELECT username,password FROM `mxgapi_config`")->fetch_assoc(); 3 | -------------------------------------------------------------------------------- /assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/images/background.png -------------------------------------------------------------------------------- /assets/images/pay/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/images/pay/wechat.jpg -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Black.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Black.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-BoldItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-ThinItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-ThinItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-BlackItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-BlackItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-BlackItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-BoldItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-LightItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-LightItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-LightItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-MediumItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-MediumItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-MediumItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-RegularItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-RegularItalic.woff -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-ThinItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-ThinItalic.woff2 -------------------------------------------------------------------------------- /assets/css/994575169312f0027615406d265202f2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/css/994575169312f0027615406d265202f2.png -------------------------------------------------------------------------------- /assets/fonts/roboto/Roboto-RegularItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/renyancheng/MuXiuGeAPIAdmin/HEAD/assets/fonts/roboto/Roboto-RegularItalic.woff2 -------------------------------------------------------------------------------- /API/yiyan.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM `mxgapi_friendlinks`;")->fetch_all(MYSQLI_ASSOC); 4 | 5 | // 载入友链页面 6 | require_once __TEMPLATE_DIR__.'/Home/friendlinks.html'; -------------------------------------------------------------------------------- /Core/Config/webSet.php: -------------------------------------------------------------------------------- 1 | query("SELECT title,subtitle,description,keywords,favicon,email,qq,url,icp,copyright,theme,accent,qqqrcode,vxqrcode,aliqrcode,post_id,close_site,cc_protect,fire_wall,end_script FROM `mxgapi_config`")->fetch_assoc(); 3 | -------------------------------------------------------------------------------- /Data/init.php: -------------------------------------------------------------------------------- 1 | expand_less 2 | 3 | 4 | -------------------------------------------------------------------------------- /config.inc.php: -------------------------------------------------------------------------------- 1 | 2 | expand_less 3 | 4 | '; 7 | echo $config['end_script']; 8 | echo ''; 9 | } 10 | ?> -------------------------------------------------------------------------------- /Core/Config/server.php: -------------------------------------------------------------------------------- 1 | PHP_VERSION, 4 | 'php_uname' => PHP_OS, 5 | 'server_software' => $_SERVER['SERVER_SOFTWARE'], 6 | 'upload_max_filesize' => get_cfg_var("upload_max_filesize")?get_cfg_var ("upload_max_filesize"):"不允许上传附件", 7 | 'max_execution_time' => get_cfg_var("max_execution_time")."秒 ", 8 | 'memory_limit' => get_cfg_var ("memory_limit")?get_cfg_var("memory_limit"):"无" 9 | ); -------------------------------------------------------------------------------- /Include/Doc.php: -------------------------------------------------------------------------------- 1 | query("SELECT name,status FROM `mxgapi_api` WHERE `id`='{$id}';")->fetch_assoc(); 13 | $status = $result['status']; 14 | if($status == '0'){ 15 | include __DIR__.'/error.php'; 16 | exit; 17 | } 18 | } 19 | 20 | 21 | 22 | // 载入文档页面 23 | include __TEMPLATE_DIR__.'/Home/doc.html'; -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 0){ 13 | /* 连接字符串构成文件 */ 14 | $file = __TEMPLATE_DIR__.'/Install/step_'.$step.'.html'; 15 | }else{ 16 | $file = __TEMPLATE_DIR__.'/Install/start.html'; 17 | $_SESSION['install_step'] = 1; 18 | } 19 | 20 | /* 若有该页面,直接包含 */ 21 | if(file_exists($file)){ 22 | include $file; 23 | }else{ 24 | include __TEMPLATE_DIR__.'/Install/start.html'; 25 | $_SESSION['install_step'] = 1; 26 | } -------------------------------------------------------------------------------- /assets/css/highlight.min.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:0.5em;background:#FFFFDF;}.hljs,.hljs-type,.hljs-function,.hljs-name,.hljs-number,.hljs-attr,.hljs-params,.hljs-subst{color:#000000;}.hljs-comment,.hljs-regexp,.hljs-section,.hljs-selector-pseudo,.hljs-addition{color:#00AAAA;}.hljs-title,.hljs-tag,.hljs-variable,.hljs-code{color:#006666;}.hljs-keyword,.hljs-class,.hljs-meta-keyword,.hljs-selector-class,.hljs-built_in,.hljs-builtin-name{color:#006666;font-weight:bold;}.hljs-string,.hljs-selector-attr{color:#0080FF;}.hljs-symbol,.hljs-link,.hljs-deletion,.hljs-attribute{color:#924B72;}.hljs-meta,.hljs-literal,.hljs-selector-id{color:#924B72;font-weight:bold;}.hljs-strong,.hljs-name{font-weight:bold;}.hljs-emphasis{font-style:italic;} -------------------------------------------------------------------------------- /assets/css/4fb701ba006326e351298a120baa1284.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Include/Firewall/DisSQL.php: -------------------------------------------------------------------------------- 1 | $value) { 3 | $value = addslashes($value); 4 | $value = str_replace("%", "\%", $value); // 把' % '过滤掉 5 | $value = nl2br($value); // 回车转换 6 | $value = htmlspecialchars($value); // html标记转换 7 | $_REQUEST[$key] = $value; 8 | } 9 | foreach ($_GET as $key => $value) { 10 | $value = addslashes($value); 11 | $value = str_replace("%", "\%", $value); // 把' % '过滤掉 12 | $value = nl2br($value); // 回车转换 13 | $value = htmlspecialchars($value); // html标记转换 14 | $_GET[$key] = $value; 15 | } 16 | foreach ($_POST as $key => $value) { 17 | $value = addslashes($value); 18 | $value = str_replace("%", "\%", $value); // 把' % '过滤掉 19 | $value = nl2br($value); // 回车转换 20 | $value = htmlspecialchars($value); // html标记转换 21 | $_POST[$key] = $value; 22 | } -------------------------------------------------------------------------------- /Include/Firewall/CCProtect.php: -------------------------------------------------------------------------------- 1 | = $timestamp) { 24 | header('HTTP/1.0 444'); 25 | exit; 26 | } 27 | 28 | // 判断时间间隔 29 | if (($cc_nowtime - $cc_lasttime) < 30) { 30 | // 判断访问次数 31 | if ($cc_times >= 10) { 32 | // 达到访问限制,进行封锁,‘+‘后面为封禁时间,单位是秒 33 | $_SESSION['cc_locktime'] = $timestamp + 60; 34 | header('HTTP/1.0 444'); 35 | exit; 36 | } 37 | } else { 38 | $cc_times = 0; 39 | $_SESSION['cc_lasttime'] = $cc_nowtime; 40 | $_SESSION['cc_times'] = $cc_times; 41 | } 42 | -------------------------------------------------------------------------------- /assets/css/0a3424f1a2cc42d9637f8ab1f9d55733.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /assets/css/4a718302573d384b438fc47f8a3c5031.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MuXiuGeAPIAdmin 2 | ## 前言 3 | ### 为什么做这一套管理程序? 4 | 在我没有一套完整的管理程序前,我在每次添加API时都要自己打开html文件去自己编辑才可以,而且又麻烦,就很烦,于是就有了这么一个系统。 5 | 6 | ## 功能 7 | + 添加,修改,删除接口 8 | + 添加,修改,删除友情链接 9 | + 管理你的站点信息 10 | + 访问日志 11 | + 使用邮件接口反馈 12 | + 后台登陆记录 13 | + 自定义添加公告 14 | + 接口调用统计 15 | 等等等...更多功能等你来探索! 16 | 17 | ## 常见的问题 18 | [Wiki](https://github.com/mufeng233/MuXiuGeAPIAdmin/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) 19 | 20 | ## Demo 21 | [api.mwind.top](https://api.mwind.top/) 22 | 23 | ## Docs 24 | [doc.muxiuge.cn](http://doc.muxiuge.cn/) 25 | 26 | ## 用到的技术 27 | + MDUI框架 28 | + JQuery.js 29 | + Vue.js 30 | + SweetAlert.js 31 | + ClipBoard.js 32 | + HighLight.js 33 | + Smooth-Scroll.polyfills.js 34 | + Chart.js 35 | 36 | ## 联系方式 37 | + 微信:mufeng_vx 38 | + QQ:2441260435 39 | + 邮箱:2441260435@qq.com 40 | 41 | ## 请我喝咖啡☕️ 42 |
43 | qq_pay 44 | wechat_pay 45 | ali_pay 46 | -------------------------------------------------------------------------------- /assets/js/jquery.cookie.min.js: -------------------------------------------------------------------------------- 1 | /*! jquery.cookie v1.4.1 | MIT */ 2 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); -------------------------------------------------------------------------------- /Template/Home/not_auth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 该站点未授权 5 | 6 | 7 | 8 | 21 | 22 | 23 |
24 |
25 | error_outline 26 |

该站点未授权,请联系作者沐风,去查授权

27 |

请不要妄想任何破解授权的方法!

28 |
29 |
30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Include/PHPMailer/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Jim Jagielski (jimjag) 11 | * @author Andy Prevost (codeworxtech) 12 | * @author Brent R. Matzelle (original founder) 13 | * @copyright 2012 - 2020 Marcus Bointon 14 | * @copyright 2010 - 2012 Jim Jagielski 15 | * @copyright 2004 - 2009 Andy Prevost 16 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License 17 | * @note This program is distributed in the hope that it will be useful - WITHOUT 18 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 19 | * FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | namespace PHPMailer\PHPMailer; 23 | 24 | /** 25 | * PHPMailer exception handler. 26 | * 27 | * @author Marcus Bointon 28 | */ 29 | class Exception extends \Exception 30 | { 31 | /** 32 | * Prettify error message output. 33 | * 34 | * @return string 35 | */ 36 | public function errorMessage() 37 | { 38 | return '' . htmlspecialchars($this->getMessage()) . "
\n"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Template/Home/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 接口维护中 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 33 | 34 | 35 |
36 | 37 |
38 |

接口正在维护中

39 |

不妨先去看看其他接口吧

40 |
41 | 42 |
43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Template/Home/jump.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 跳转中…… 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | 48 | 49 | -------------------------------------------------------------------------------- /Template/Home/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 未找到页面 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 33 | 34 | 35 |
36 | 37 |
38 |

404 NotFound

39 |

这个页面似乎什么都没有

40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Template/Home/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 站点维护中 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 33 | 34 | 35 |
36 | 37 | 38 |
39 |

站点正在维护

40 |

很抱歉,站点正在维护中,请稍后访问

41 |
42 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Include/Index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 预备安装 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 安装前须知 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
开始
28 |
29 |
30 |

欢迎使用 MXGAPI管理系统,在开始前,我们需要您数据库的一些信息,请你准备好如下信息并为MXGAPI管理系统创建一个数据库:

31 |
    32 |
  1. 数据库名
  2. 33 |
  3. 数据库用户名
  4. 34 |
  5. 数据库密码
  6. 35 |
  7. 数据库地址
  8. 36 |
  9. 数据库端口
  10. 37 |
38 |

这些信息应该由你的服务器商提供,如果准备好了的话,现在开始

39 | 现在开始 40 |
41 |
42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Template/Install/step_4.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 安装完成! 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 安装完成! 22 |
23 |
24 |
25 |
26 |
27 |
28 | 29 |
30 |
31 |
32 |
完成!
33 |
34 |
35 |

还沉浸在安装过程中?不过现在已经完成了,您现在可以访问前台,也可以到后台编辑更多信息。

36 | 去前台 37 | 去后台设置 38 |
39 |
40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Template/Admin/edit_pwd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 修改密码 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | arrow_back 返回 21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 |
33 | 34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 64 | 65 | -------------------------------------------------------------------------------- /Template/Admin/login_log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 登录日志 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
#登录时间登录IP登录地址
{{log.id}}{{log.time}}{{log.ip}}{{log.address}}
38 |
39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 73 | 74 | -------------------------------------------------------------------------------- /Template/Install/step_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 第三步 - 配置邮件信息 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |

网站信息配置成功,接下来是需要填您的邮件信息,这非常重要,但是您仍然不必担心填错,以后可以再次修改并测试。

26 |

如果你不知道你的邮件信息,请到你的邮件服务商中查看。

27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |
37 | 38 | 39 |
40 |
41 | 42 | 43 |
44 |
45 | 46 | 51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Template/Home/friendlinks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 友情链接 - 6 | <?php echo $config['title'];?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 |
25 | 45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Template/Install/step_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 第一步 - 安装数据库 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |

请在下方填写你的数据库连接信息,如果你不确定,请联系你的服务器商。

26 |
27 |
28 | 29 | 30 |
31 | 32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 |
48 | 49 | 50 |
51 | 52 | 53 | 54 |
55 |
56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Template/Install/step_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 第二步 - 配置网站信息 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |

很好,MXGAPI管理系统已经成功连接了数据库并创建了数据表。

26 |

现在,您需要填写一些信息,无需担心填错,这些信息以后可以再次修改。

27 |
28 |
29 | 30 | 31 |
例:沐朽阁API
32 |
33 | 34 |
35 | 36 | 37 |
38 | 39 |
40 | 41 | 42 |
43 | 44 |
45 | 46 | 47 | 48 |
49 | 50 |
51 | 52 | 53 |
例:api.muxiuge.cn
54 |
55 | 56 | 57 | 58 |
59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /Template/Admin/add_link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 添加友链 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | arrow_back 返回 20 |
21 | 22 | 41 | 42 | 43 | 44 | 45 | 73 | 74 | -------------------------------------------------------------------------------- /Template/Admin/edit_link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编辑友链 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | arrow_back 返回 20 |
21 | 22 | 41 | 42 | 43 | 44 | 45 | 77 | 78 | -------------------------------------------------------------------------------- /Template/Admin/login.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 后台登录 - <?php echo $config['title'];?> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 43 | 44 | 45 | 46 |
47 |
48 | 49 |
50 |
登录
51 |
你正在该站点上登录!
52 |
53 |
54 |
55 | 56 | 57 |
58 |
59 | 60 | 61 |
62 |
63 |
64 | 65 |
66 |
67 |
68 | 69 |
70 |
71 |
加载中......
72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /API/function.php: -------------------------------------------------------------------------------- 1 | query("INSERT INTO `mxgapi_access`(`id`, `host`, `user_agent`, `protocol`, `method`, `ip`, `time`) VALUES (NULL,'{$host}','{$user_agent}','{$protocol}','{$method}','{$ip}','{$time}');"); 17 | if ($result) { 18 | return true; 19 | } else { 20 | return false; 21 | } 22 | } 23 | 24 | /* 25 | * 添加接口统计函数 26 | * @param int $id 接口id 27 | * @return bool 添加成功为true,失败则为false 28 | */ 29 | function addApiAccess($id) 30 | { 31 | require __DIR__ . '/../Core/Database/connect.php'; 32 | if (intval($id)) { 33 | $get_access = $db->query("SELECT access FROM `mxgapi_api` WHERE `id` = '{$id}';"); 34 | if ($get_access) { 35 | $get_access = $get_access->fetch_assoc(); 36 | $update_access = $get_access['access'] + 1; 37 | $update_result = $db->query("UPDATE `mxgapi_api` SET `access` = '{$update_access}' WHERE `id` = '{$id}';"); 38 | if ($update_result) { 39 | return true; 40 | } else { 41 | return false; 42 | } 43 | } else { 44 | return false; 45 | } 46 | } else { 47 | return false; 48 | } 49 | } 50 | 51 | //Curl请求,参数:地址,方法,头,参数 52 | function curl($url, $method, $headers, $params){ 53 | if (is_array($params)) { 54 | $requestString = http_build_query($params); 55 | } else { 56 | $requestString = $params ? : ''; 57 | } 58 | if (empty($headers)) { 59 | $headers = array('Content-type: text/json'); 60 | } elseif (!is_array($headers)) { 61 | parse_str($headers,$headers); 62 | } 63 | // setting the curl parameters. 64 | $ch = curl_init(); 65 | curl_setopt($ch, CURLOPT_URL, $url); 66 | curl_setopt($ch, CURLOPT_VERBOSE, 1); 67 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 68 | // turning off the server and peer verification(TrustManager Concept). 69 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 70 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 71 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 72 | curl_setopt($ch, CURLOPT_POST, 1); 73 | // setting the POST FIELD to curl 74 | switch ($method){ 75 | case "GET" : curl_setopt($ch, CURLOPT_HTTPGET, 1);break; 76 | case "POST": curl_setopt($ch, CURLOPT_POST, 1); 77 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString);break; 78 | case "PUT" : curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "PUT"); 79 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString);break; 80 | case "DELETE": curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); 81 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString);break; 82 | } 83 | // getting response from server 84 | $response = curl_exec($ch); 85 | 86 | //close the connection 87 | curl_close($ch); 88 | 89 | //return the response 90 | if (stristr($response, 'HTTP 404') || $response == '') { 91 | return array('Error' => '请求错误'); 92 | } 93 | return $response; 94 | } -------------------------------------------------------------------------------- /Template/Home/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 关于 - 6 | <?php echo $config['title'];?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 |
24 |
25 |
26 | avatar 27 |
28 |
{{ info.username }}
29 |
30 |
31 | 32 | 46 | 62 |
63 |
64 |
给我打钱:D(请备注QQ)
65 |
66 |
67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 | 76 |
77 |
78 |
79 |
80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /Template/Admin/access_log.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 访问日志 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
时间IP地址协议方法UA 30 |
31 | 32 | 42 |
43 |
{{access.time}}{{access.ip}}{{access.host}}{{access.protocol}}{{access.method}}{{access.user_agent}}
58 |
59 |
60 | 61 | 62 | 63 | 64 | 65 | 66 | 118 | 119 | -------------------------------------------------------------------------------- /Template/Home/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | menu 5 | 6 | 7 |
8 | 9 | 10 | 17 |
18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 | 45 | 52 |
53 |
54 |
55 | 后台登录 56 |
57 |
58 |
59 | 60 | 61 |
62 |
63 | 64 | 65 |
66 |
67 | 68 |
69 |
70 |
71 |
72 |
加载中......
73 |
74 |
75 |
76 |
77 |
78 |
-------------------------------------------------------------------------------- /Template/Admin/edit_user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 用户信息 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | arrow_back 返回 21 |
22 | 23 |
24 |
25 | 26 |
    27 |
  • 用户名
    {{ info.username }}
  • 28 |
  • 邮箱
    {{ info.email }}
  • 29 |
  • QQ号
    {{ info.qq }}
  • 30 |
  • QQ支付二维码
  • 31 |
  • 微信支付二维码
  • 32 |
  • 支付宝支付二维码
  • 33 |
34 | 35 | 36 |
37 |
38 | 修改信息 39 |
40 |
41 |
42 | 43 | 44 |
用户名不能为空
45 |
46 |
47 | 48 | 49 |
邮箱格式不正确
50 |
51 |
52 | 53 | 54 |
QQ格式不正确
55 |
56 |
57 |

Q:如何快速获取图片链接?
A:打开https://sm.ms/后,上传完图片即可看到链接,复制粘贴过来即可!

58 |
59 |
60 | 61 | 62 |
链接格式不正确
63 |
64 |
65 | 66 | 67 |
链接格式不正确
68 |
69 |
70 | 71 | 72 |
链接格式不知道
73 |
74 | 75 |
76 |
77 | 78 | 79 |
80 |
81 | 82 | 83 | 84 | 85 | 86 | 110 | 111 | -------------------------------------------------------------------------------- /Template/Admin/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | menu 5 | 6 | 后台管理 7 |
8 | 9 | 10 | 21 |
22 |
23 | 24 |
25 |
    26 |
  • 27 | dashboard 28 |
    仪表盘
    29 |
  • 30 | 31 |
  • 32 | flag 33 |
    访问前台
    34 |
  • 35 | 36 |
  • 37 | settings 38 |
    网站配置
    39 |
  • 40 | 41 |
  • 42 | person 43 |
    用户信息
    44 |
  • 45 | 46 |
  • 47 | insert_drive_file 48 |
    访问日志
    49 |
  • 50 | 51 |
  • 52 | add 53 |
    添加接口
    54 |
  • 55 | 56 |
  • 57 | apps 58 |
    管理接口
    59 |
  • 60 | 61 | 65 | 66 | 70 |
  • 71 | library_books 72 |
    管理公告
    73 |
  • 74 |
  • 75 | feedback 76 |
    管理反馈
    77 |
  • 78 |
79 | 88 |
-------------------------------------------------------------------------------- /Template/Admin/control_link.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 管理友链 - 5 | <?php echo $config['title'];?> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /assets/js/index.js: -------------------------------------------------------------------------------- 1 | var theme = localStorage.getItem('theme'); 2 | if (theme == 'dark') { 3 | $('body').addClass('mdui-theme-layout-dark'); 4 | $('#change_style').html('brightness_7'); 5 | } 6 | $('#change_style').click(function() { 7 | var theme = localStorage.getItem('theme'); 8 | if (theme == 'dark') { 9 | localStorage.setItem('theme', 'white'); 10 | $(this).html('brightness_4'); 11 | $('body').removeClass('mdui-theme-layout-dark'); 12 | } else { 13 | localStorage.setItem('theme', 'dark'); 14 | $(this).html('brightness_7'); 15 | $('body').addClass('mdui-theme-layout-dark'); 16 | } 17 | }); 18 | 19 | 20 | var page = getRequestParam('page'); 21 | var action = getRequestParam('action'); 22 | if (action == 'admin') { 23 | if (!page) { 24 | page = 'index'; 25 | } 26 | $('.' + page).addClass('mdui-list-item-active'); 27 | } else { 28 | if (!action) { 29 | action = 'index'; 30 | } 31 | $('.' + action).addClass('mdui-list-item-active'); 32 | } 33 | 34 | 35 | /* 36 | function loading(type){ 37 | if(type == 'start'){ 38 | $('#loading').empty(); 39 | $('#loading').append('
'); 40 | $('#submit').attr('disabled', 'disabled'); 41 | }else if(type == 'stop'){ 42 | $('#loading').empty(); 43 | $('#submit').attr('disabled', null); 44 | }else{ 45 | return false; 46 | } 47 | } 48 | */ 49 | 50 | var loadingDialog = new mdui.Dialog('#loading', { 51 | history: false, 52 | modal: true, 53 | closeOnEsc: false, 54 | }); 55 | 56 | function loading(type) { 57 | if (type == 'open') { 58 | loadingDialog.open(); 59 | } else if (type == 'close') { 60 | loadingDialog.close(); 61 | } else { 62 | return false; 63 | } 64 | } 65 | 66 | function scroll(id) { 67 | document.querySelector(id).scrollIntoView({ behavior: 'smooth' }); 68 | } 69 | 70 | $(window).scroll(function() { 71 | var scrollTop = $(window).scrollTop(); 72 | if (scrollTop > 130) { 73 | $('#fabUp').removeClass('mdui-fab-hide'); 74 | } else { 75 | $('#fabUp').addClass('mdui-fab-hide'); 76 | } 77 | }); 78 | 79 | function goTop() { 80 | document.querySelector('#top').scrollIntoView({ behavior: 'smooth' }); 81 | setTimeout(function() { 82 | mdui.snackbar({ 83 | message: '吖,撞到头辣QAQ', 84 | position: 'top', 85 | timeout: 800 86 | }); 87 | }, 500); 88 | } 89 | // 90 | // $('.like').click(function(){ 91 | // alert('点赞成功!QWQ'); 92 | // //$() 93 | // }); 94 | 95 | function formSumbit() { 96 | var options = { 97 | success: submit, 98 | timeout: 3000, 99 | } 100 | 101 | function submit(data) { 102 | var code = JSON.parse(data).code; 103 | var msg = JSON.parse(data).msg; 104 | if (code == "200") { 105 | mdui.snackbar(msg); 106 | setTimeout(function() { 107 | window.location.reload(); 108 | }, 1500); 109 | } else { 110 | mdui.snackbar(msg); 111 | } 112 | }; 113 | 114 | $('form').submit(function() { 115 | $(this).ajaxSubmit(options); 116 | return false; 117 | }); 118 | } 119 | 120 | $('#back').click(function() { 121 | window.history.go(-1); 122 | }); 123 | 124 | function getRequestParam(variable) { 125 | var query = window.location.search.substring(1); 126 | var vars = query.split("&"); 127 | for (var i = 0; i < vars.length; i++) { 128 | var pair = vars[i].split("="); 129 | if (pair[0] == variable) { return pair[1]; } 130 | } 131 | return (false); 132 | } 133 | 134 | function jump(url) { 135 | if (!url) { 136 | return false; 137 | } else { 138 | window.open('?action=jump&url=' + url); 139 | } 140 | } 141 | 142 | function checkMailAddress(v) { 143 | var reg = /^\w+((.\w+)|(-\w+))@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+).[A-Za-z0-9]+$/; //正则表达式 144 | if (!reg.test(v)) { //正则验证不通过,格式不对 145 | return false; 146 | } else { 147 | return true; 148 | } 149 | } 150 | 151 | 152 | $('#exit_login').click(function() { 153 | var exitLogin = confirm('你真的要退出登录吗?'); 154 | if (exitLogin) { 155 | fetch('./Data/api.php?type=exitLogin') 156 | .then(response => response.json()) 157 | .then(json => { 158 | mdui.snackbar(json.msg); 159 | if (json.code == 0) { 160 | setTimeout(function() { 161 | window.location.href = '?action=admin&page=login'; 162 | }, 1000); 163 | } 164 | }) 165 | } 166 | }); 167 | 168 | $('#submit').click(function() { 169 | var username = $('#username').val(); 170 | var password = $('#password').val(); 171 | if (username && password) { 172 | $.ajax({ 173 | url: './Data/post.php', 174 | method: 'POST', 175 | data: { 176 | type: 'login', 177 | username: username, 178 | password: password 179 | }, 180 | beforeSend: function() { 181 | loading('open'); 182 | }, 183 | success: function(data) { 184 | var code = JSON.parse(data).code; 185 | var msg = JSON.parse(data).msg; 186 | mdui.snackbar(msg); 187 | if (code == 0) { 188 | window.location.href = '?action=admin'; 189 | } 190 | }, 191 | error: function() { 192 | mdui.snackbar('网络错误!'); 193 | }, 194 | complete: function() { 195 | loading('close'); 196 | } 197 | }); 198 | } else { 199 | mdui.snackbar('请输入完整!'); 200 | } 201 | }); -------------------------------------------------------------------------------- /assets/js/smooth-scroll.polyfills.min.js: -------------------------------------------------------------------------------- 1 | /*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ 2 | window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;to.durationMax?o.durationMax:o.durationMin&&u=v)return C.cancelScroll(!0),x(a,t,c),H("scrollStop",i,a,r),!(O=l=null)})(d,g)||(O=M.requestAnimationFrame(E),l=e)};0===M.pageYOffset&&M.scrollTo(0,0),f=a,h=i,c||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?x(a,Math.floor(g),!1):(H("scrollStart",i,a,r),C.cancelScroll(!0),M.requestAnimationFrame(E))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(b.ignore)&&a.hostname===M.location.hostname&&a.pathname===M.location.pathname&&/#/.test(a.href)){var t,n;try{t=r(decodeURIComponent(a.hash))}catch(e){t=r(a.hash)}if("#"===t){if(!b.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=M.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||M.pageYOffset},document.title,t||M.location.href)}})(b),C.animateScroll(n,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(b)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||C.animateScroll(t,null,{updateURL:!1})}};C.destroy=function(){b&&(document.removeEventListener("click",t,!1),M.removeEventListener("popstate",n,!1),C.cancelScroll(),O=A=a=b=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";C.destroy(),b=I(q,e||{}),A=b.header?document.querySelector(b.header):null,document.addEventListener("click",t,!1),b.updateURL&&b.popstate&&M.addEventListener("popstate",n,!1)})(),C}})); -------------------------------------------------------------------------------- /Template/Admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 仪表盘 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 |
数据总量
21 |
22 |
23 |
24 |
25 |
调用量
26 |
{{ num.access }}
27 |
28 |
29 |
接口量
30 |
{{ num.api }}
31 |
32 |
33 |
友链量
34 |
{{ num.link }}
35 |
36 |
37 |
蜘蛛量
38 |
{{ num.spider }}
39 |
40 |
41 |
公告量
42 |
{{ num.post }}
43 |
44 |
45 |
待处理反馈
46 |
{{ num.feedback }}
47 |
48 |
49 |
50 |
51 | 52 |
53 |
54 |
55 |
56 |
服务器信息
57 |
58 |
    59 |
  • PHP版本
  • 60 |
  • 服务器系统
  • 61 |
  • PHP运行方式
  • 62 |
  • 文件上传限制
  • 63 |
  • 脚本执行最长时间
  • 64 |
65 |
66 |
67 |
68 |
69 |
70 |
接口调用排行
71 |
72 |
    73 |
  • 74 | filter_{{index+1}} 75 |
    {{api.name}}
    76 | 调用:{{api.access}} 77 |
  • 78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
访问数据
86 |
87 | 88 |
89 |
90 |
91 |
92 |
93 |
蜘蛛数量
94 |
95 | 96 |
97 |
98 |
99 |
100 | 101 |
102 | 103 | 104 | 105 | 106 | 107 | 186 | 187 | -------------------------------------------------------------------------------- /Template/Admin/add.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 添加接口 - 6 | <?php echo $config['title'];?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | arrow_back 返回 22 |
23 | 24 |
25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 |
33 |
34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 |
56 |
57 |
58 |
59 | 60 |
61 |
62 |
63 |
64 | 65 | 66 |
67 |
68 | 69 | 70 |
71 |
72 | 73 | 74 |
[名称--类型--必填--备注]
75 | 76 |
77 |
78 | 79 | 80 |
[名称--类型--说明]
81 |
82 |
83 | 84 | 85 |
[状态码--状态信息]
86 |
87 |
88 | 89 | 90 |
91 |
92 | 93 | 94 |
95 | 96 |
97 | 98 | 99 | 100 | 101 | 102 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /Template/Install/localhost_test.sql: -------------------------------------------------------------------------------- 1 | SET FOREIGN_KEY_CHECKS=0; 2 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 3 | SET AUTOCOMMIT = 0; 4 | START TRANSACTION; 5 | SET time_zone = "+00:00"; 6 | 7 | CREATE TABLE `mxgapi_access` ( 8 | `id` int(11) NOT NULL, 9 | `host` varchar(255) NOT NULL, 10 | `user_agent` varchar(255) NOT NULL, 11 | `protocol` varchar(255) NOT NULL, 12 | `status` varchar(255) NOT NULL, 13 | `method` varchar(255) NOT NULL, 14 | `ip` varchar(25) NOT NULL, 15 | `address` varchar(255) NOT NULL, 16 | `time` int(20) NOT NULL 17 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 18 | 19 | CREATE TABLE `mxgapi_api` ( 20 | `id` int(11) NOT NULL, 21 | `name` varchar(200) NOT NULL, 22 | `enname` varchar(200) NOT NULL, 23 | `desc` text NOT NULL, 24 | `url` varchar(200) NOT NULL, 25 | `format` varchar(200) NOT NULL, 26 | `method` varchar(200) NOT NULL, 27 | `example_url` varchar(200) NOT NULL, 28 | `request_parameter` text NOT NULL, 29 | `return_parameter` text NOT NULL, 30 | `error_code` varchar(255) NOT NULL, 31 | `PHP_example` text NOT NULL, 32 | `return` text NOT NULL, 33 | `time` int(20) NOT NULL, 34 | `access` int(20) NOT NULL DEFAULT '0', 35 | `status` int(10) NOT NULL DEFAULT '1' 36 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 37 | 38 | INSERT INTO `mxgapi_api` (`id`, `name`, `enname`, `desc`, `url`, `format`, `method`, `example_url`, `request_parameter`, `return_parameter`, `error_code`, `PHP_example`, `return`, `time`, `access`, `status`) VALUES 39 | (1, '随机一言', 'yiyan', '随机一言', 'yiyan.php', 'JSON/TEXT', 'GET', 'yiyan.php', '{\"data\":[{\"name\":\"无\",\"type\":\"string\",\"required\":\"否\",\"info\":\"无需请求参数\"}]}', '{\"data\":[{\"name\":\"code\",\"type\":\"int\",\"msg\":\"状态码\"},{\"name\":\"text\",\"type\":\"string\",\"msg\":\"内容\"}]}', '{\"data\":[{\"code\":\"1\",\"msg\":\"成功\"},{\"code\":\"0\",\"msg\":\"失败\"}]}', '', '{ \"code\": 1, \"text\": \"就算是自私⋯⋯我也希望那些人能够永远都有笑容⋯⋯\" }', 2147483647, 254, 1); 40 | 41 | CREATE TABLE `mxgapi_config` ( 42 | `title` varchar(255) NOT NULL COMMENT '标题', 43 | `subtitle` varchar(255) NOT NULL COMMENT '副标题', 44 | `description` varchar(255) NOT NULL COMMENT '站点简介', 45 | `keywords` varchar(255) NOT NULL COMMENT '站点关键词', 46 | `favicon` varchar(255) NOT NULL COMMENT '站点头像', 47 | `username` varchar(255) NOT NULL DEFAULT 'admin' COMMENT '后台用户名', 48 | `password` varchar(255) NOT NULL DEFAULT '123456' COMMENT '后台密码', 49 | `email` varchar(20) NOT NULL DEFAULT '2441260435@qq.com' COMMENT '邮箱', 50 | `qq` varchar(12) NOT NULL DEFAULT '2441260435' COMMENT 'QQ', 51 | `url` varchar(255) NOT NULL COMMENT '站点地址', 52 | `icp` varchar(255) NOT NULL COMMENT '备案信息', 53 | `copyright` varchar(255) NOT NULL COMMENT '版权信息', 54 | `theme` varchar(255) NOT NULL COMMENT '主题色', 55 | `accent` varchar(255) NOT NULL COMMENT '强调色', 56 | `qqqrcode` varchar(100) NOT NULL DEFAULT 'https://i.loli.net/2021/01/22/s5NLe3gzRUBwK9a.png' COMMENT 'QQ支付二维码', 57 | `vxqrcode` varchar(100) NOT NULL DEFAULT 'https://i.loli.net/2021/01/22/o7miaMcP45QqdCk.png' COMMENT '微信支付二维码', 58 | `aliqrcode` varchar(100) NOT NULL DEFAULT 'https://i.loli.net/2021/01/22/GeaxMpmAtRfYUz2.jpg' COMMENT '支付宝二维码', 59 | `smtp_host` varchar(50) NOT NULL, 60 | `smtp_username` varchar(50) NOT NULL, 61 | `smtp_password` varchar(50) NOT NULL, 62 | `smtp_port` int(10) NOT NULL, 63 | `smtp_secure` varchar(50) NOT NULL, 64 | `smtp_reply_to` varchar(50) NOT NULL, 65 | `post_id` int(100) NOT NULL, 66 | `set_time` int(20) NOT NULL, 67 | `close_site` varchar(1) NOT NULL DEFAULT '0' 68 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 69 | 70 | INSERT INTO `mxgapi_config` (`title`, `subtitle`, `description`, `keywords`, `favicon`, `username`, `password`, `email`, `qq`, `url`, `icp`, `copyright`, `theme`, `accent`, `qqqrcode`, `vxqrcode`, `aliqrcode`, `smtp_host`, `smtp_username`, `smtp_password`, `smtp_port`, `smtp_secure`, `smtp_reply_to`, `post_id`, `set_time`, `close_site`) VALUES 71 | ('沐朽阁API', 'API接口列表', '沐朽阁API,免费接口调用平台', '嘤,嘤,嘤', 'favicon.ico', '沐风', 'a1242196674', '2441260435@qq.com', '2441260435', 'http://127.0.0.1:8000/', '京ICP 备你妈的案', '©沐朽阁API', 'blue', 'blue', 'https://i.loli.net/2021/01/22/s5NLe3gzRUBwK9a.png', 'https://i.loli.net/2021/01/22/o7miaMcP45QqdCk.png', 'https://i.loli.net/2021/01/22/GeaxMpmAtRfYUz2.jpg', 'smtp.qq.com', '2441260435@qq.com', 'pzucvrydsbuaebga', 587, 'tls', '', 1, 0, '0'); 72 | 73 | CREATE TABLE `mxgapi_feedback` ( 74 | `id` int(11) NOT NULL, 75 | `api_id` int(100) NOT NULL, 76 | `api_name` varchar(100) NOT NULL, 77 | `title` varchar(50) NOT NULL, 78 | `content` text NOT NULL, 79 | `email` varchar(50) NOT NULL, 80 | `ip` varchar(20) NOT NULL, 81 | `time` int(20) NOT NULL 82 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 83 | 84 | INSERT INTO `mxgapi_feedback` (`id`, `api_id`, `api_name`, `title`, `content`, `email`, `ip`, `time`) VALUES 85 | (8, 15, '测试', '测试', '测试', '2441260435@qq.com', '127.0.0.1', 1611755510); 86 | 87 | CREATE TABLE `mxgapi_friendlinks` ( 88 | `id` int(11) NOT NULL, 89 | `name` varchar(255) NOT NULL, 90 | `desc` varchar(255) NOT NULL, 91 | `url` varchar(255) NOT NULL, 92 | `picurl` varchar(255) NOT NULL, 93 | `time` text NOT NULL 94 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 95 | 96 | INSERT INTO `mxgapi_friendlinks` (`id`, `name`, `desc`, `url`, `picurl`, `time`) VALUES 97 | (1, '沐朽阁', '沐朽阁官方博客~', 'https://muxiuge.cn', 'https://q.qlogo.cn/headimg_dl?dst_uin=2441260435&spec=640', '16434343434'); 98 | 99 | CREATE TABLE `mxgapi_login_log` ( 100 | `id` int(11) NOT NULL, 101 | `ip` varchar(20) NOT NULL, 102 | `address` varchar(50) NOT NULL, 103 | `time` int(20) NOT NULL 104 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 105 | 106 | INSERT INTO `mxgapi_login_log` (`id`, `ip`, `address`, `time`) VALUES 107 | (1, '127.0.0.1', '中国河北省张家口市', 1704646464); 108 | 109 | CREATE TABLE `mxgapi_post` ( 110 | `id` int(11) NOT NULL, 111 | `title` varchar(30) NOT NULL, 112 | `content` text NOT NULL, 113 | `icon` varchar(20) NOT NULL, 114 | `time` int(20) NOT NULL 115 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 116 | 117 | INSERT INTO `mxgapi_post` (`id`, `title`, `content`, `icon`, `time`) VALUES 118 | (1, '关于接口反馈', '接口反馈功能已正式上线!\n\n希望大家遇到问题是能够及时反馈,本站会以邮件的方式告知你,谢谢大家', 'success', 1704646464); 119 | 120 | 121 | ALTER TABLE `mxgapi_access` 122 | ADD PRIMARY KEY (`id`) USING BTREE; 123 | 124 | ALTER TABLE `mxgapi_api` 125 | ADD PRIMARY KEY (`id`); 126 | 127 | ALTER TABLE `mxgapi_feedback` 128 | ADD PRIMARY KEY (`id`); 129 | 130 | ALTER TABLE `mxgapi_friendlinks` 131 | ADD PRIMARY KEY (`id`); 132 | 133 | ALTER TABLE `mxgapi_login_log` 134 | ADD PRIMARY KEY (`id`); 135 | 136 | ALTER TABLE `mxgapi_post` 137 | ADD PRIMARY KEY (`id`); 138 | 139 | 140 | ALTER TABLE `mxgapi_access` 141 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1112; 142 | 143 | ALTER TABLE `mxgapi_api` 144 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; 145 | 146 | ALTER TABLE `mxgapi_feedback` 147 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; 148 | 149 | ALTER TABLE `mxgapi_friendlinks` 150 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 151 | 152 | ALTER TABLE `mxgapi_login_log` 153 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; 154 | 155 | ALTER TABLE `mxgapi_post` 156 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; 157 | SET FOREIGN_KEY_CHECKS=1; 158 | COMMIT; -------------------------------------------------------------------------------- /Template/Admin/control_feedback.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理反馈 - 6 | <?php echo $config['title'];?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
    23 |
  • 24 | feedback 25 |
    26 |
    27 | {{ feedback.title }} 28 |
    ID:{{ feedback.id }}
    IP:{{ feedback.ip }}
    29 |
    30 |
    {{getLocalTime(feedback.time)}}
    31 |
    32 |
  • 33 |
34 |
35 |
36 | 尚未任何反馈 37 |
38 |
39 | 静静的等待吧⌛️ 40 |
41 |
42 | 43 |
44 |
45 | 查看反馈信息 46 |
47 |
48 |
49 | 50 | 51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 | 67 |
68 |
69 | 回复反馈 70 |
71 |
72 |
73 | 74 | 75 |
76 |
77 | 78 |
79 |
80 | 81 |
82 | 83 | 84 | 85 | 86 | 87 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /Template/Admin/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 编辑接口 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | arrow_back 返回 20 |
21 | 22 |
23 |
24 | 25 | 26 |
27 |
28 | 29 | 30 |
31 |
32 | 33 | 34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 |
44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 72 |
[名称--类型--必填--备注]
73 | 74 |
75 |
76 | 77 | 78 |
[名称--类型--说明]
79 |
80 |
81 | 82 | 83 |
[状态码--状态信息]
84 |
85 |
86 | 87 | 88 |
89 |
90 | 91 | 92 |
93 |
94 | 95 | 99 |
100 | 101 |
102 | 103 | 104 | 105 | 106 | 171 | 172 | -------------------------------------------------------------------------------- /Template/Admin/control.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理接口 - 6 | <?php echo $config['title'];?> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 42 | 43 | 44 |
#名称英文名添加时间操作
{{ api.id }}{{ api.name }}{{ api.enname }}{{ api.time }} 39 | edit 40 | 41 |
45 |
46 |
47 |
48 | 尚未任何接口 49 |
50 |
51 | 添加接口后,这里就可以进行管理了 52 |
53 |
54 |
55 | 56 | 57 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /Template/Admin/control_post.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 管理公告 - <?php echo $config['title'];?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |
20 |
21 | 22 | 23 |
设置为-1则关闭公告
24 |
ID不能为空
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 |
    33 |
  • 34 |
    35 |
    ID:{{ post.id }} {{ post.title }}
    {{ getLocalTime(post.time) }}
    36 |
    {{ post.content }}
    37 |
    38 |
  • 39 |
40 |
41 |
42 | 43 | 44 | 45 |
46 |
47 | 修改公告 48 |
49 |
50 |
51 | 52 | 53 |
公告标题不能为空
54 |
55 |
56 | 57 | 58 |
59 |
60 | 61 | 67 |
68 |
69 | 70 | 71 |
72 |
73 | 74 |
75 |
76 | 添加公告 77 |
78 |
79 |
80 | 81 | 82 |
公告标题不能为空
83 |
84 |
85 | 86 | 87 |
88 |
89 | 90 | 96 |
97 |
98 | 99 |
100 |
101 | 102 |
103 | 104 | 105 | 106 | 107 | 108 | 217 | 218 | -------------------------------------------------------------------------------- /assets/js/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.6 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return o={},r.m=n=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o $code, 16 | 'msg' => $msg 17 | ), 320 | JSON_PRETTY_PRINT)); 18 | } 19 | 20 | /* 21 | * 数组转JSON 22 | * @param int $code 状态码 23 | * @param string $msg 状态信息 24 | * @param string/array $data 数据 25 | */ 26 | function json($code, $msg, $data) 27 | { 28 | die(json_encode(array( 29 | 'code' => $code, 30 | 'msg' => $msg, 31 | 'data' => $data 32 | ), 320 | JSON_PRETTY_PRINT)); 33 | } 34 | 35 | /* 36 | * 判断用户是否登录到后台 37 | * @return bool 是否登录 38 | */ 39 | function isAdmin() 40 | { 41 | session_start(); 42 | $apikey = @include __DIR__ . '/../Core/Config/apikey.php'; 43 | if ($_SESSION['login'] == 'admin') { 44 | return true; 45 | } else if($_GET['apikey'] != '' && $_GET['apikey'] == $apikey) { 46 | return true; 47 | } else { 48 | return false; 49 | } 50 | } 51 | 52 | /* 53 | * 清除登录session(退出登录) 54 | * @return bool 清除是否成功 55 | */ 56 | function clearAdmin() 57 | { 58 | session_start(); 59 | if ($_SESSION['login'] == 'admin') { 60 | unset($_SESSION['login']); 61 | return true; 62 | } else { 63 | return false; 64 | } 65 | } 66 | 67 | /* 68 | * 跳转并带有提示信息 69 | * @param string $msg 提示信息 70 | * @param string $url 跳转链接 71 | */ 72 | function alert($msg, $url) 73 | { 74 | $alert = ''; 78 | die($alert); 79 | } 80 | 81 | /* 82 | * 跳转到某一链接 83 | * @param string $url 链接 84 | */ 85 | function jump($url) 86 | { 87 | header('Location: ' . $url); 88 | } 89 | 90 | /* 91 | * 添加访问记录 92 | * @return bool 添加是否成功 93 | */ 94 | function addAccess() 95 | { 96 | require __CORE_DIR__ . '/Database/connect.php'; 97 | 98 | $host = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"] . '?' . $_SERVER['QUERY_STRING']; 99 | $user_agent = $_SERVER["HTTP_USER_AGENT"]; 100 | $protocol = $_SERVER["SERVER_PROTOCOL"]; 101 | $method = $_SERVER["REQUEST_METHOD"]; 102 | $ip = $_SERVER["REMOTE_ADDR"]; 103 | $time = $_SERVER["REQUEST_TIME"]; 104 | $result = $db->query("INSERT INTO `mxgapi_access`(`id`, `host`, `user_agent`, `protocol`, `method`, `ip`, `time`) VALUES (NULL,'{$host}','{$user_agent}','{$protocol}','{$method}','{$ip}','{$time}');"); 105 | if ($result) { 106 | return true; 107 | } else { 108 | return false; 109 | } 110 | } 111 | 112 | /* 113 | * 检查字符串是否为邮箱 114 | * @param string $email 115 | * @return bool 116 | */ 117 | function checkEmail($email) 118 | { 119 | $result = trim($email); 120 | if (filter_var($result, FILTER_VALIDATE_EMAIL)) { 121 | return true; 122 | } else { 123 | return false; 124 | } 125 | } 126 | 127 | /* 128 | * 发送邮件方法 129 | * @param $to:接收者 $title:标题 $content:邮件内容 130 | * @return bool true:发送成功 false:发送失败 131 | */ 132 | 133 | use PHPMailer\PHPMailer\PHPMailer; 134 | use PHPMailer\PHPMailer\SMTP; 135 | use PHPMailer\PHPMailer\Exception; 136 | 137 | function sendMail($to, $title, $content) 138 | { 139 | require '../Core/Database/connect.php'; 140 | require '../Include/PHPMailer/Exception.php'; 141 | require '../Include/PHPMailer/PHPMailer.php'; 142 | require '../Include/PHPMailer/SMTP.php'; 143 | $sql = "SELECT title,smtp_host,smtp_username,smtp_password,smtp_port,smtp_secure FROM `mxgapi_config`;"; 144 | $result = $db->query($sql); 145 | if ($result = $result->fetch_assoc()) { 146 | $mail = new PHPMailer(); 147 | $mail->isSMTP(); 148 | $mail->SMTPAuth = true; 149 | $mail->Host = $result['smtp_host']; 150 | $mail->Username = $result['smtp_username']; 151 | $mail->Password = $result['smtp_password']; 152 | $mail->SMTPSecure = $result['smtp_secure']; 153 | $mail->Port = $result['smtp_port']; 154 | $mail->setFrom($result['smtp_username'], $result['title']); 155 | $mail->addAddress($to); 156 | $mail->WordWrap = 50; 157 | $mail->IsHTML(true); 158 | $mail->CharSet = "utf-8"; 159 | $mail->Subject = $title; 160 | $mail->Body = ' 161 |
162 |

' . addslashes($result['title']) . '

163 |
164 |
165 |

' . $content . '

166 |

' . date('Y-m-d') . ' ' . date('h:i:s') . '

167 |
168 | '; 169 | if (!$mail->send()) { 170 | $code = -1; 171 | $msg = '发送失败: ' . $mail->ErrorInfo; 172 | } else { 173 | $code = 0; 174 | $msg = '发送成功'; 175 | } 176 | } else { 177 | $code = -1; 178 | $msg = '获取邮件配置信息时发生错误'; 179 | } 180 | $output = json_encode(array( 181 | 'code' => $code, 182 | 'msg' => $msg 183 | ), 320); 184 | return $output; 185 | } 186 | 187 | /* 188 | * 检测域名是否授权 189 | * @param $domain string 域名 190 | * @return bool true授权,false未授权 191 | */ 192 | function domainAuth($domain) 193 | { 194 | return true; 195 | } 196 | 197 | /* 198 | * 添加接口统计函数 199 | * @param int $id 接口id 200 | * @return bool 添加成功为true,失败则为false 201 | */ 202 | function addApiAccess($id) 203 | { 204 | require __CORE_DIR__ . '/Database/connect.php'; 205 | if (intval($id)) { 206 | $get_access = $db->query("SELECT access FROM `mxgapi_api` WHERE `id` = '{$id}';"); 207 | if ($get_access) { 208 | $get_access = $get_access->fetch_assoc(); 209 | $update_access = $get_access['access'] + 1; 210 | $update_result = $db->query("UPDATE `mxgapi_api` SET `access` = '{$update_access}' WHERE `id` = '{$id}';"); 211 | if ($update_result) { 212 | return true; 213 | } else { 214 | return false; 215 | } 216 | } else { 217 | return false; 218 | } 219 | } else { 220 | return false; 221 | } 222 | } 223 | 224 | /* 225 | * 获取用户的真实ip 226 | * @return string 用户IP 227 | */ 228 | function getUserIp() 229 | { 230 | $ip = false; 231 | if (!empty($_SERVER["HTTP_CLIENT_IP"])) { 232 | $ip = $_SERVER["HTTP_CLIENT_IP"]; 233 | } 234 | if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 235 | $ips = explode(", ", $_SERVER['HTTP_X_FORWARDED_FOR']); 236 | if ($ip) { 237 | array_unshift($ips, $ip); 238 | $ip = FALSE; 239 | } 240 | for ($i = 0; $i < count($ips); $i++) { 241 | if (!mb_eregi("^(10│172.16│192.168).", $ips[$i])) { 242 | $ip = $ips[$i]; 243 | break; 244 | } 245 | } 246 | } 247 | return ($ip ? $ip : $_SERVER['REMOTE_ADDR']); 248 | } 249 | 250 | /* 251 | * 通过ua判断是否为搜索引擎蜘蛛 252 | * @name is_spider() 253 | * @return bool 254 | */ 255 | function is_spider() 256 | { 257 | require __CORE_DIR__ . '/Database/connect.php'; 258 | $agent = strtolower($_SERVER['HTTP_USER_AGENT']); 259 | if (!empty($agent)) { 260 | $spiderSite = array( 261 | "TencentTraveler", 262 | "Baiduspider+", 263 | "BaiduGame", 264 | "Googlebot", 265 | "msnbot", 266 | "Sosospider+", 267 | "Sogou web spider", 268 | "ia_archiver", 269 | "Yahoo! Slurp", 270 | "YoudaoBot", 271 | "Yahoo Slurp", 272 | "MSNBot", 273 | "Java (Often spam bot)", 274 | "BaiDuSpider", 275 | "Voila", 276 | "Yandex bot", 277 | "BSpider", 278 | "twiceler", 279 | "Sogou Spider", 280 | "Speedy Spider", 281 | "Google AdSense", 282 | "Heritrix", 283 | "Python-urllib", 284 | "Alexa (IA Archiver)", 285 | "Ask", 286 | "Exabot", 287 | "Custo", 288 | "OutfoxBot/YodaoBot", 289 | "yacy", 290 | "SurveyBot", 291 | "legs", 292 | "lwp-trivial", 293 | "Nutch", 294 | "StackRambler", 295 | "The web archive (IA Archiver)", 296 | "Perl tool", 297 | "MJ12bot", 298 | "Netcraft", 299 | "MSIECrawler", 300 | "WGet tools", 301 | "larbin", 302 | "Fish search", 303 | ); 304 | foreach ($spiderSite as $val) { 305 | $str = strtolower($val); 306 | if (strpos($agent, $str) !== false) { 307 | $sql = "INSERT INTO `mxgapi_spider` (`id`, `agent`, `ip`, `time`) VALUES (NULL, '{$str}', '" . getUserIp() . "', '" . time() . "');"; 308 | $result = $db->query($sql); 309 | if ($result) { 310 | return true; 311 | } 312 | return false; 313 | } 314 | } 315 | return false; 316 | } else { 317 | return false; 318 | } 319 | } 320 | 321 | /* 322 | * 封装Curl请求 323 | * @param string $url 地址 324 | * @param string $method 方法 325 | * @param array $headers 头 326 | * @param array $params 参数 327 | */ 328 | function curl($url, $method, $headers, $params) 329 | { 330 | if (is_array($params)) { 331 | $requestString = http_build_query($params); 332 | } else { 333 | $requestString = $params ?: ''; 334 | } 335 | if (empty($headers)) { 336 | $headers = array('Content-type: text/json'); 337 | } elseif (!is_array($headers)) { 338 | parse_str($headers, $headers); 339 | } 340 | // setting the curl parameters. 341 | $ch = curl_init(); 342 | curl_setopt($ch, CURLOPT_URL, $url); 343 | curl_setopt($ch, CURLOPT_VERBOSE, 1); 344 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 345 | // turning off the server and peer verification(TrustManager Concept). 346 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 347 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 348 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 349 | curl_setopt($ch, CURLOPT_POST, 1); 350 | // setting the POST FIELD to curl 351 | switch ($method) { 352 | case "GET": 353 | curl_setopt($ch, CURLOPT_HTTPGET, 1); 354 | break; 355 | case "POST": 356 | curl_setopt($ch, CURLOPT_POST, 1); 357 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString); 358 | break; 359 | case "PUT": 360 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); 361 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString); 362 | break; 363 | case "DELETE": 364 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); 365 | curl_setopt($ch, CURLOPT_POSTFIELDS, $requestString); 366 | break; 367 | } 368 | // getting response from server 369 | $response = curl_exec($ch); 370 | 371 | //close the connection 372 | curl_close($ch); 373 | 374 | //return the response 375 | if (stristr($response, 'HTTP 404') || $response == '') { 376 | return array('Error' => '请求错误'); 377 | } 378 | return $response; 379 | } 380 | -------------------------------------------------------------------------------- /Core/install.php: -------------------------------------------------------------------------------- 1 | connect_error){ 28 | alert("数据库连接失败:".$db->connect_error, '../?action=install&step=1'); 29 | jsonError(-1,"数据库连接失败:".$db->connect_error); 30 | }else{ 31 | $data='connect_error) { 41 | die("连接失败: ".$db->connect_error); 42 | }else{ 43 | $db->query("set names utf8"); 44 | } 45 | ?>'; 46 | unlink('./Database/connect.php'); 47 | file_put_contents('./Database/connect.php',$data); 48 | $init_sql = array( 49 | 'SET FOREIGN_KEY_CHECKS=0;', 50 | 'SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";', 51 | 'SET AUTOCOMMIT = 0;', 52 | 'START TRANSACTION;', 53 | 'SET time_zone = "+00:00";' 54 | ); 55 | $create_sql = array( 56 | "CREATE TABLE `mxgapi_access` ( `id` int(11) NOT NULL,`host` varchar(255) NOT NULL,`user_agent` varchar(255) NOT NULL,`protocol` varchar(255) NOT NULL,`method` varchar(255) NOT NULL,`ip` varchar(25) NOT NULL,`time` int(20) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 57 | "CREATE TABLE `mxgapi_api` (`id` int(11) NOT NULL,`name` varchar(200) NOT NULL,`enname` varchar(200) NOT NULL,`desc` text NOT NULL,`url` varchar(200) NOT NULL,`format` varchar(200) NOT NULL,`method` varchar(200) NOT NULL,`example_url` varchar(200) NOT NULL,`request_parameter` text NOT NULL,`return_parameter` text NOT NULL,`error_code` text NOT NULL,`PHP_example` text NOT NULL,`return` text NOT NULL,`time` int(20) NOT NULL,`access` int(20) NOT NULL DEFAULT '0',`status` int(10) NOT NULL DEFAULT '1') ENGINE=MyISAM DEFAULT CHARSET=utf8;", 58 | "CREATE TABLE `mxgapi_config` (`title` varchar(255) NOT NULL,`subtitle` varchar(255) NOT NULL,`description` varchar(255) NOT NULL,`keywords` varchar(255) NOT NULL,`favicon` varchar(255) NOT NULL,`username` varchar(255) NOT NULL DEFAULT 'admin',`password` varchar(255) NOT NULL DEFAULT '123456',`email` varchar(20) NOT NULL,`qq` varchar(12) NOT NULL,`url` varchar(255) NOT NULL,`icp` varchar(255) NOT NULL,`copyright` varchar(255) NOT NULL,`theme` varchar(255) NOT NULL DEFAULT 'blue',`accent` varchar(255) NOT NULL DEFAULT 'blue',`qqqrcode` varchar(100) NOT NULL,`vxqrcode` varchar(100) NOT NULL,`aliqrcode` varchar(100) NOT NULL,`smtp_host` varchar(50) NOT NULL,`smtp_username` varchar(50) NOT NULL,`smtp_password` varchar(50) NOT NULL,`smtp_port` int(10) NOT NULL,`smtp_secure` varchar(50) NOT NULL,`smtp_reply_to` varchar(50) NOT NULL,`post_id` int(100) NOT NULL,`set_time` int(20) NOT NULL,`close_site` varchar(1) NOT NULL DEFAULT '0',`cc_protect` varchar(1) NOT NULL DEFAULT '0',`fire_wall` varchar(1) NOT NULL DEFAULT '0',`end_script` varchar(255) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 59 | "CREATE TABLE `mxgapi_feedback` (`id` int(11) NOT NULL,`api_id` int(100) NOT NULL,`api_name` varchar(100) NOT NULL,`title` varchar(50) NOT NULL,`content` text NOT NULL,`email` varchar(50) NOT NULL,`ip` varchar(20) NOT NULL,`time` int(20) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 60 | "CREATE TABLE `mxgapi_friendlinks` (`id` int(11) NOT NULL,`name` varchar(255) NOT NULL,`desc` varchar(255) NOT NULL,`url` varchar(255) NOT NULL,`picurl` varchar(255) NOT NULL,`time` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 61 | "CREATE TABLE `mxgapi_login_log` (`id` int(11) NOT NULL,`ip` varchar(20) NOT NULL,`address` varchar(50) NOT NULL,`time` int(20) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 62 | "CREATE TABLE `mxgapi_post` (`id` int(11) NOT NULL,`title` varchar(30) NOT NULL,`content` text NOT NULL,`icon` varchar(20) NOT NULL,`time` int(20) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;", 63 | "CREATE TABLE `mxgapi_spider` (`id` int(11) NOT NULL,`agent` varchar(100) NOT NULL,`ip` varchar(20) NOT NULL,`time` int(20) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;" 64 | ); 65 | $insert_sql = array( 66 | "INSERT INTO `mxgapi_config` (`title`, `subtitle`, `description`, `keywords`, `favicon`, `username`, `password`, `email`, `qq`, `url`, `icp`, `copyright`, `theme`, `accent`, `qqqrcode`, `vxqrcode`, `aliqrcode`, `smtp_host`, `smtp_username`, `smtp_password`, `smtp_port`, `smtp_secure`, `smtp_reply_to`, `post_id`, `set_time`, `close_site`, `cc_protect`, `fire_wall`, `end_script`) VALUES('默认标题', 'API接口列表', '默认简介', 'API,接口,免费调用', 'favicon.ico', 'admin', '123456', 'example@example.com', '10001', 'http://".$_SERVER['HTTP_HOST']."/', '', '©Copyright 沐朽阁API', 'blue', 'blue', 'https://i.loli.net/2021/01/22/s5NLe3gzRUBwK9a.png', 'https://i.loli.net/2021/01/22/o7miaMcP45QqdCk.png', 'https://i.loli.net/2021/01/22/GeaxMpmAtRfYUz2.jpg', 'smtp.exmaple.com', 'exmaple@exmaple.com', '', '', '', '', '-1', '".time()."', '0', '0', '0', '');" 67 | ); 68 | $alter_sql = array( 69 | "ALTER TABLE `mxgapi_access` ADD PRIMARY KEY (`id`) USING BTREE;", 70 | "ALTER TABLE `mxgapi_api` ADD PRIMARY KEY (`id`);", 71 | "ALTER TABLE `mxgapi_feedback` ADD PRIMARY KEY (`id`);", 72 | "ALTER TABLE `mxgapi_friendlinks` ADD PRIMARY KEY (`id`);", 73 | "ALTER TABLE `mxgapi_login_log` ADD PRIMARY KEY (`id`);", 74 | "ALTER TABLE `mxgapi_post` ADD PRIMARY KEY (`id`);", 75 | "ALTER TABLE `mxgapi_spider` ADD PRIMARY KEY (`id`);" 76 | ); 77 | $alter2_sql = array( 78 | 'ALTER TABLE `mxgapi_access` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 79 | 'ALTER TABLE `mxgapi_api` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 80 | 'ALTER TABLE `mxgapi_feedback` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 81 | 'ALTER TABLE `mxgapi_friendlinks` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 82 | 'ALTER TABLE `mxgapi_login_log` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 83 | 'ALTER TABLE `mxgapi_post` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;', 84 | 'ALTER TABLE `mxgapi_spider` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;' 85 | ); 86 | $init_result = loop_query($db, $init_sql); 87 | $create_result = loop_query($db, $create_sql); 88 | $insert_result = loop_query($db, $insert_sql); 89 | $alter_result = loop_query($db, $alter_sql); 90 | $alter2_result = loop_query($db, $alter2_sql); 91 | if($init_result && $create_result && $insert_result && $alter_result && $alter2_result){ 92 | $db->query('SET FOREIGN_KEY_CHECKS=1;'); 93 | $db->query('COMMIT;'); 94 | $_SESSION['install_step'] = 2; 95 | jump('../?action=install&step=2'); 96 | jsonError(0,'数据表创建成功'); 97 | }else{ 98 | unlink('./Database/connect.php'); 99 | $db->query('DROP TABLE `mxgapi_access`, `mxgapi_api`, `mxgapi_config`, `mxgapi_feedback`, `mxgapi_friendlinks`, `mxgapi_login_log`, `mxgapi_post`, `mxgapi_spider`;'); 100 | alert('数据库创建失败', '../?action=install&step=1'); 101 | jsonError(-1,"数据库创建失败"); 102 | } 103 | } 104 | }else{ 105 | alert('请输入完整', '../?action=install&step=1'); 106 | jsonError(-1,'请输入完整'); 107 | } 108 | break; 109 | case '2': 110 | $title = $_POST['title']; 111 | $username = $_POST['username']; 112 | $password = $_POST['password']; 113 | $email = $_POST['email']; 114 | $domain = $_POST['domain']; 115 | if($title && $username && $password && $email && $domain){ 116 | $update_sql = "UPDATE `mxgapi_config` SET `title`='{$title}',`username`='{$username}',`password`='{$password}',`email`='{$email}',`url`='http://{$domain}/';"; 117 | $update_result = $db->query($update_sql); 118 | if($update_result){ 119 | $_SESSION['install_step'] = 3; 120 | jump('../?action=install&step=3'); 121 | jsonError(0,'保存成功'); 122 | }else{ 123 | alert('保存失败', '../?action=install&step=2'); 124 | jsonError(-1,"保存失败"); 125 | } 126 | }else{ 127 | alert('请输入完整', '../?action=install&step=2'); 128 | jsonError(-1,'请输入完整'); 129 | } 130 | break; 131 | case '3': 132 | $host = $_POST['host']; 133 | $username = $_POST['username']; 134 | $password = $_POST['password']; 135 | $port = $_POST['port']; 136 | $secure = $_POST['secure']; 137 | if($host && $username && $password && $port){ 138 | $update_sql = "UPDATE `mxgapi_config` SET `smtp_host`='{$host}',`smtp_username`='{$username}',`smtp_password`='{$password}',`smtp_port`='{$port}',`smtp_secure`='{$secure}';"; 139 | $update_result = $db->query($update_sql); 140 | if($update_result){ 141 | $_SESSION['login'] = 'admin'; 142 | $_SESSION['install_step'] = 4; 143 | jump('../?action=install&step=4'); 144 | jsonError(0,'保存成功'); 145 | }else{ 146 | alert('保存失败', '../?action=install&step=3'); 147 | jsonError(-1,"保存失败"); 148 | } 149 | }else{ 150 | alert('请输入完整', '../?action=install&step=3'); 151 | jsonError(-1,'请输入完整'); 152 | } 153 | break; 154 | } 155 | 156 | function loop_query($db, $array){ 157 | foreach($array as $val){ 158 | $result = $db->query($val); 159 | } 160 | if($result){ 161 | return true; 162 | }else{ 163 | return false; 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /Data/api.php: -------------------------------------------------------------------------------- 1 | query($sql); 11 | if($result){ 12 | $result = $result->fetch_all(MYSQLI_ASSOC); 13 | if(!$result){ 14 | jsonError(-1, '暂无接口'); 15 | } 16 | foreach($result as $v){ 17 | $arr[] = array( 18 | 'id' => $v['id'], 19 | 'name' => $v['name'], 20 | 'enname' => $v['enname'], 21 | 'desc' => $v['desc'], 22 | 'time' => date('Y-m-d h:i:s', $v['time']), 23 | 'access' => $v['access'], 24 | 'status' => $v['status'] 25 | ); 26 | } 27 | json(0, '获取成功', $arr); 28 | }else{ 29 | jsonError(-1, '获取数据失败'); 30 | } 31 | break; 32 | 33 | /* 获取单一API数据 */ 34 | case 'getOneApi' : 35 | $id = intval($_REQUEST['id']); 36 | if(!$id){ 37 | jsonError(-1, '缺少参数'); 38 | } 39 | $sql = 'SELECT * FROM `mxgapi_api` WHERE `id`='.$id; 40 | $result = $db->query($sql); 41 | if($result){ 42 | $data = $result->fetch_assoc(); 43 | if(!$data){ 44 | jsonError(-1, '暂无接口'); 45 | } 46 | json(0, '获取成功', $data); 47 | }else{ 48 | jsonError(-1, '获取数据失败'); 49 | } 50 | break; 51 | 52 | /* 搜索API,返回数据 */ 53 | case 'searchApi' : 54 | $s = addslashes(sprintf("%s", $_REQUEST['s'])); 55 | if(!$s){ 56 | jsonError(-1, '输入搜索内容'); 57 | } 58 | $sql = "SELECT * FROM `mxgapi_api` WHERE `status`='1' && `name` LIKE '%" . $s . "%' order by 1 desc"; 59 | $result = $db->query($sql); 60 | if($result){ 61 | $result = $result->fetch_all(MYSQLI_ASSOC); 62 | if(!$result){ 63 | jsonError(-1, '没有搜到你想要的接口'); 64 | } 65 | foreach($result as $v){ 66 | $arr[] = array( 67 | 'id' => $v['id'], 68 | 'name' => $v['name'], 69 | 'enname' => $v['enname'], 70 | 'desc' => $v['desc'], 71 | 'access' => $v['access'], 72 | 'status' => $v['status'] 73 | ); 74 | } 75 | json(0, '获取成功', $arr); 76 | }else{ 77 | jsonError(-1, '获取数据失败'); 78 | } 79 | break; 80 | 81 | /* 获取全部友情链接数据 */ 82 | case 'getAllLink' : 83 | $mod = $_GET['mod']; 84 | $sql = 'SELECT * FROM `mxgapi_friendlinks`'; 85 | $result = $db->query($sql); 86 | if($result){ 87 | $arr = $result->fetch_all(MYSQLI_ASSOC); 88 | if(!$arr){ 89 | jsonError(-1, '暂无友情链接'); 90 | } 91 | if($mod == 'rand'){ 92 | shuffle($arr); 93 | } 94 | json(0, '获取成功', $arr); 95 | }else{ 96 | jsonError(-1, '获取失败'); 97 | } 98 | break; 99 | 100 | /* 获取单一友链数据 */ 101 | case 'getOneLink' : 102 | $id = intval($_REQUEST['id']); 103 | if(!$id){ 104 | jsonError(-1, '缺少参数'); 105 | } 106 | $sql = 'SELECT * FROM `mxgapi_friendlinks` WHERE `id`='.$id; 107 | $result = $db->query($sql); 108 | if($result){ 109 | $data = $result->fetch_assoc(); 110 | if(!$data){ 111 | jsonError(-1, '暂无友链'); 112 | } 113 | json(0, '获取成功', $data); 114 | }else{ 115 | jsonError(-1, '获取失败'); 116 | } 117 | break; 118 | 119 | /* 获取全部公告数据 */ 120 | case 'getAllPost' : 121 | if(!isAdmin()){ 122 | jsonError(-1, '未登录到后台'); 123 | } 124 | $sql = 'SELECT * FROM `mxgapi_post` order by 1 desc'; 125 | $result = $db->query($sql); 126 | if($result){ 127 | $arr = $result->fetch_all(MYSQLI_ASSOC); 128 | if(!$arr){ 129 | jsonError(-1, '暂无公告'); 130 | } 131 | json(0, '获取成功', $arr); 132 | }else{ 133 | jsonError(-1, '获取失败'); 134 | } 135 | break; 136 | 137 | /* 获取单一公告数据 */ 138 | case 'getOnePost' : 139 | $id = intval($_REQUEST['id']); 140 | if(!$id){ 141 | jsonError(-1, '缺少参数'); 142 | } 143 | $sql = 'SELECT * FROM `mxgapi_post` WHERE `id`='.$id; 144 | $result = $db->query($sql); 145 | if($result){ 146 | $data = $result->fetch_assoc(); 147 | if(!$data){ 148 | jsonError(-1, '暂无公告'); 149 | } 150 | json(0, '获取成功', $data); 151 | }else{ 152 | jsonError(-1, '获取失败'); 153 | } 154 | break; 155 | 156 | /* 获取全部接口反馈数据 */ 157 | case 'getAllFeedback' : 158 | if(!isAdmin()){ 159 | jsonError(-1, '未登录到后台'); 160 | } 161 | $sql = 'SELECT * FROM `mxgapi_feedback` order by 1 desc'; 162 | $result = $db->query($sql); 163 | if($result){ 164 | $arr = $result->fetch_all(MYSQLI_ASSOC); 165 | if(!$arr){ 166 | jsonError(-1, '暂无反馈信息'); 167 | } 168 | json(0, '获取成功', $arr); 169 | }else{ 170 | jsonError(-1, '获取失败'); 171 | } 172 | break; 173 | 174 | /* 获取单一反馈数据 */ 175 | case 'getOneFeedback' : 176 | if(!isAdmin()){ 177 | jsonError(-1, '未登录到后台'); 178 | } 179 | $id = intval($_REQUEST['id']); 180 | if(!$id){ 181 | jsonError(-1, '缺少参数'); 182 | } 183 | $sql = 'SELECT * FROM `mxgapi_feedback` WHERE `id`='.$id; 184 | $result = $db->query($sql); 185 | if($result){ 186 | $data = $result->fetch_assoc(); 187 | if(!$data){ 188 | jsonError(-1, '暂无该反馈信息'); 189 | } 190 | json(0, '获取成功', $data); 191 | }else{ 192 | jsonError(-1, '获取数据失败'); 193 | } 194 | break; 195 | 196 | /* 获取后台首页信息(需要登录) */ 197 | case 'getAdminInfo' : 198 | if(!isAdmin()){ 199 | jsonError(-1, '未登录到后台'); 200 | } 201 | 202 | $sql = array( 203 | 'api' => 'SELECT count(1) FROM `mxgapi_api`', 204 | 'access' => 'SELECT count(1) FROM `mxgapi_access`', 205 | 'spider' => 'SELECT count(1) FROM `mxgapi_spider`', 206 | 'link' => 'SELECT count(1) FROM `mxgapi_friendlinks`', 207 | 'post' => 'SELECT count(1) FROM `mxgapi_post`', 208 | 'feedback' => 'SELECT count(1) FROM `mxgapi_feedback`', 209 | ); 210 | 211 | $timestamp = array( 212 | strtotime('today')-4*86400, 213 | strtotime('today')-3*86400, 214 | strtotime('today')-2*86400, 215 | strtotime('today')-86400, 216 | strtotime('today'), 217 | strtotime('today')+86400 218 | ); 219 | // 统计访问 220 | for ($i=0;$i<5;$i++) { 221 | $access_sql = "SELECT count(1) FROM `mxgapi_access` WHERE `time` between '{$timestamp[$i]}' and '{$timestamp[($i+1)]}';"; 222 | $access_result = $db->query($access_sql); 223 | $access_data[] = ($access_result->fetch_array())[0]; 224 | } 225 | for ($i=0;$i<5; $i++) { 226 | $access_time[] = date('d', $timestamp[$i]); 227 | } 228 | $access = array( 229 | 'access_data' => $access_data, 230 | 'access_time' => $access_time 231 | ); 232 | 233 | // 统计蜘蛛 234 | for ($i=0;$i<5;$i++) { 235 | $spider_sql = "SELECT count(1) FROM `mxgapi_spider` WHERE `time` between '{$timestamp[$i]}' and '{$timestamp[($i+1)]}';"; 236 | $spider_result = $db->query($spider_sql); 237 | $spider_data[] = ($spider_result->fetch_array())[0]; 238 | } 239 | for ($i=0;$i<5; $i++) { 240 | $spider_time[] = date('d', $timestamp[$i]); 241 | } 242 | $spider = array( 243 | 'spider_data' => $spider_data, 244 | 'spider_time' => $spider_time 245 | ); 246 | 247 | foreach($sql as $key => $val){ 248 | $result = $db->query($val); 249 | // 遍历创建data数组(仅包含api,access,spider,link,post,feedback数量) 250 | $data[$key] = ($result->fetch_array())[0]; 251 | } 252 | json(0, '获取成功!', array_merge($data, $access, $spider)); 253 | break; 254 | 255 | /* 获取网站配置信息 */ 256 | case 'getWebSetting' : 257 | $sql = 'SELECT title,subtitle,description,keywords,favicon,url,icp,copyright,theme,accent,post_id,set_time,close_site,cc_protect,fire_wall,end_script FROM `mxgapi_config`'; 258 | $result = $db->query($sql); 259 | if($result){ 260 | $data = $result->fetch_assoc(); 261 | $post_id = $data['post_id']; 262 | $post['post'] = $db->query("SELECT * FROM `mxgapi_post` WHERE `id`='{$post_id}';")->fetch_assoc(); 263 | json(0, '获取成功!', array_merge($data,$post)); 264 | }else{ 265 | jsonError(-1, '获取数据失败!'); 266 | } 267 | break; 268 | 269 | /* 获取邮件配置信息 */ 270 | case 'getSmtpConfig' : 271 | if(!isAdmin()){ 272 | jsonError(-1, '未登录到后台'); 273 | } 274 | $sql = 'SELECT smtp_host,smtp_username,smtp_password,smtp_port,smtp_secure FROM `mxgapi_config`'; 275 | $result = $db->query($sql); 276 | if($result){ 277 | $data = $result->fetch_assoc(); 278 | json(0, '获取成功!', $data); 279 | }else{ 280 | jsonError(-1, '获取数据失败!'); 281 | } 282 | break; 283 | 284 | /* 获取后台用户信息 */ 285 | case 'getUserInfo' : 286 | $sql = 'SELECT username,email,qq,qqqrcode,vxqrcode,aliqrcode FROM `mxgapi_config`'; 287 | $result = $db->query($sql); 288 | if($result){ 289 | $data = $result->fetch_assoc(); 290 | $qqhead = [ 291 | 'qqhead' => 'https://q2.qlogo.cn/headimg_dl?dst_uin=' . $data['qq'] . '&spec=640', 292 | 'href' => 'mqqapi://card/show_pslcard?src_type=internal&source=sharecard&version=1&uin=' . $data['qq'] 293 | ]; 294 | json(0, '获取成功!', array_merge($data,$qqhead)); 295 | }else{ 296 | jsonError(-1, '获取数据失败!'); 297 | } 298 | break; 299 | 300 | /* 获取访问信息 */ 301 | case 'getAccessInfo': 302 | if(!isAdmin()){ 303 | jsonError(-1, '未登录到后台'); 304 | } 305 | $num = intval($_REQUEST['num'] ?? '25'); 306 | $result = $db->query("SELECT * FROM `mxgapi_access` order by 1 desc limit ".$num)->fetch_all(MYSQLI_ASSOC); 307 | if(!$result){ 308 | jsonError(-1, '数据获取失败!'); 309 | } 310 | foreach($result as $val){ 311 | $data[] = [ 312 | 'id' => $val['id'], 313 | 'ip' => $val['ip'], 314 | 'host' => $val['host'], 315 | 'protocol' => $val['protocol'], 316 | 'method' => $val['method'], 317 | 'user_agent' => $val['user_agent'], 318 | 'time' => date('Y-m-d h:i:s', $val['time']) 319 | ]; 320 | } 321 | json(0, '获取成功', $data); 322 | break; 323 | 324 | /* 获取IP地址具体位置 */ 325 | case 'getIpAddress': 326 | if(!isAdmin()){ 327 | jsonError(-1, '未登录到后台'); 328 | } 329 | $ip = $_REQUEST['ip']; 330 | if(!$ip){ 331 | jsonError(-1, '参数错误'); 332 | }else{ 333 | $data = curl('https://api.oioweb.cn/api/ipaddress.php?host='.$ip, 'GET', 0, 0); 334 | $data = json_decode($data, true); 335 | if($data['disp'] != ''){ 336 | json(0, '获取成功', $data['disp']); 337 | }else{ 338 | jsonError(-1, '获取失败'); 339 | } 340 | } 341 | break; 342 | 343 | /* 退出登录 */ 344 | case 'exitLogin': 345 | session_start(); 346 | if($_SESSION['login'] == 'admin'){ 347 | unset($_SESSION['login']); 348 | jsonError(0, '退出登录成功'); 349 | }else{ 350 | jsonError(-1, '用户未登录'); 351 | } 352 | break; 353 | 354 | /* 发送测试邮件 */ 355 | case 'sendTestEmail': 356 | if($_REQUEST['to']){ 357 | die(sendMail($_REQUEST['to'], '一封测试邮件', '你收到了这封邮件,表示你的邮件服务器已设置成功。')); 358 | }else{ 359 | jsonError(-1, '缺少参数!'); 360 | } 361 | break; 362 | 363 | /* 接口调用排行榜 */ 364 | case 'getApiAccessList': 365 | if(!isAdmin()){ 366 | jsonError(-1, '未登录到后台'); 367 | } 368 | $sql = 'SELECT name,access FROM `mxgapi_api` order by access desc limit 5'; 369 | $result = $db->query($sql); 370 | if($result){ 371 | $data = $result->fetch_all(MYSQLI_ASSOC); 372 | json(0, '获取成功!', $data); 373 | }else{ 374 | jsonError(-1, '获取数据失败!'); 375 | } 376 | break; 377 | 378 | /* 获取全部登录日志数据 */ 379 | case 'getAllLoginLog' : 380 | if(!isAdmin()){ 381 | jsonError(-1, '未登录到后台'); 382 | } 383 | $sql = 'SELECT * FROM `mxgapi_login_log` order by 1 desc'; 384 | $result = $db->query($sql); 385 | if($result){ 386 | $arr = $result->fetch_all(MYSQLI_ASSOC); 387 | if(!$result){ 388 | jsonError(-1, '暂无登录信息'); 389 | } 390 | foreach($arr as $val){ 391 | $data[] = [ 392 | 'id' => $val['id'], 393 | 'ip' => $val['ip'], 394 | 'address' => $val['address'], 395 | 'time' => date('Y-m-d h:i:s', $val['time']) 396 | ]; 397 | } 398 | json(0, '获取成功', $data); 399 | }else{ 400 | jsonError(-1, '获取失败'); 401 | } 402 | break; 403 | } 404 | -------------------------------------------------------------------------------- /assets/css/style.css: -------------------------------------------------------------------------------- 1 | .texto { 2 | width: 50%; 3 | overflow: hidden; 4 | text-overflow: ellipsis; 5 | white-space: nowrap; 6 | } 7 | 8 | #menu .mdui-list-item, 9 | .mdui-collapse-item-header { 10 | border-radius: 0px 50px 50px 0px; 11 | } 12 | 13 | #categorys .mdui-list-item, 14 | .mdui-collapse-item-header { 15 | border-radius: 0px 50px 50px 0px; 16 | } 17 | 18 | .mdui-dialog { 19 | border-radius: 7px; 20 | } 21 | 22 | .mdui-appbar { 23 | box-shadow: 0 1px 6px 0 rgba(32, 33, 36, .28); 24 | } 25 | 26 | #menu .mdui-list-item-content { 27 | font-size: unset 28 | } 29 | 30 | #categorys .mdui-list-item-content { 31 | font-size: unset 32 | } 33 | 34 | .mdui-main-text { 35 | color: rgb(27, 116, 232); 36 | } 37 | 38 | .mdui-card { 39 | border-radius: 15px 15px 15px 15px; 40 | } 41 | 42 | .mdui-typo pre { 43 | border-radius: 10px; 44 | } 45 | 46 | .mdui-table-fluid { 47 | border-radius: 10px; 48 | } 49 | 50 | .mdui-badge { 51 | display: inline; 52 | position: relative; 53 | border-radius: 4px; 54 | text-shadow: none; 55 | text-align: center; 56 | font-size: 8px; 57 | color: #FFFFFF; 58 | vertical-align: center; 59 | height: 100%; 60 | top: -3px; 61 | padding-top: 4px; 62 | padding-bottom: 3px; 63 | padding-left: 5px; 64 | padding-right: 5px; 65 | } 66 | 67 | .doc-toc { 68 | margin: 0px 0 0 0; 69 | font-size: 16px; 70 | position: relative; 71 | border-left: 3px solid; 72 | } 73 | 74 | .mc-drawer .copyright { 75 | box-sizing: border-box; 76 | width: 100%; 77 | padding: 20px 16px 78 | } 79 | 80 | .mc-drawer .copyright p { 81 | margin: 0; 82 | overflow: hidden; 83 | color: rgba(0, 0, 0, .38); 84 | font-size: 13px; 85 | line-height: 20px; 86 | white-space: nowrap; 87 | text-overflow: ellipsis 88 | } 89 | 90 | .mdui-theme-layout-dark .mc-drawer .copyright p { 91 | color: hsla(0, 0%, 100%, .38) 92 | } 93 | 94 | .mc-drawer .copyright a { 95 | color: rgba(0, 0, 0, .52); 96 | text-decoration: none 97 | } 98 | 99 | .mdui-theme-layout-dark .mc-drawer .copyright a { 100 | color: hsla(0, 0%, 100%, .52) 101 | } 102 | 103 | .mc-drawer .copyright a:hover { 104 | text-decoration: underline 105 | } 106 | 107 | @media (prefers-color-scheme: dark) {} 108 | 109 | .doc-toc a { 110 | text-decoration: none; 111 | color: inherit; 112 | } 113 | 114 | .doc-toc:before { 115 | content: 'Content'; 116 | font-size: 15px; 117 | line-height: 16px; 118 | font-weight: 400; 119 | } 120 | 121 | .doc-toc ul, 122 | .doc-toc:before { 123 | padding-left: 16px; 124 | } 125 | 126 | .doc-toc ul { 127 | list-style: none; 128 | margin: 0; 129 | } 130 | 131 | .doc-toc ul li { 132 | margin: 1em 0; 133 | } 134 | 135 | .doc-toc ul li:first-child { 136 | margin-top: 0; 137 | } 138 | 139 | .doc-toc ul li:last-child { 140 | margin-bottom: 0; 141 | } 142 | 143 | .doc-toc ul li ul { 144 | margin: 1em 0; 145 | font-size: 0.83em; 146 | } 147 | 148 | .doc-toc>ul { 149 | margin-top: 1em; 150 | } 151 | 152 | @media (min-width: 480px) { 153 | .doc-toc { 154 | margin-top: 0px; 155 | font-size: 17px; 156 | border-left-width: 4px; 157 | } 158 | .doc-toc ul, 159 | .doc-toc:before { 160 | padding-left: 18px; 161 | } 162 | } 163 | 164 | @media (min-width: 840px) { 165 | .doc-toc { 166 | margin-top: 0px; 167 | font-size: 18px; 168 | border-left-width: 5px; 169 | } 170 | .doc-toc ul, 171 | .doc-toc:before { 172 | padding-left: 20px; 173 | } 174 | } 175 | 176 | .mdui-card-header-avatar { 177 | border-radius: 5px; 178 | } 179 | 180 | .doc-color-circle { 181 | display: inline-block; 182 | width: 12px; 183 | height: 12px; 184 | border-radius: 50%; 185 | } 186 | 187 | #about { 188 | max-width: 846px; 189 | padding-top: 0 190 | } 191 | 192 | .user { 193 | border-top-left-radius: 0; 194 | border-top-right-radius: 0; 195 | } 196 | 197 | .user .cover { 198 | position: relative; 199 | box-sizing: border-box; 200 | height: 0; 201 | padding-bottom: 56%; 202 | overflow: visible; 203 | background-repeat: no-repeat; 204 | background-position: 50%; 205 | background-size: cover 206 | } 207 | 208 | .user .cover .mc-cover-upload { 209 | position: absolute; 210 | top: 16px; 211 | right: 16px; 212 | display: none 213 | } 214 | 215 | .user .cover:hover .mc-cover-upload { 216 | display: block 217 | } 218 | 219 | .user .info { 220 | position: relative; 221 | display: flex; 222 | padding: 20px 24px 20px 20px 223 | } 224 | 225 | .user .info .avatar-box { 226 | position: relative; 227 | z-index: 1; 228 | display: flex; 229 | align-items: center; 230 | justify-content: center; 231 | width: 110px; 232 | min-width: 110px; 233 | height: 110px; 234 | background-color: rgba(0, 0, 0, .06); 235 | border-radius: 50% 236 | } 237 | 238 | .mdui-theme-layout-dark .user .info .avatar-box { 239 | background-color: hsla(0, 0%, 100%, .06) 240 | } 241 | 242 | .user .info .avatar-box .avatar { 243 | width: 102px; 244 | height: 102px; 245 | border-radius: 50%; 246 | -ms-user-select: none; 247 | user-select: none 248 | } 249 | 250 | .user .info .avatar-box .mc-avatar-upload { 251 | display: none 252 | } 253 | 254 | .user .info .avatar-box:hover .mc-avatar-upload { 255 | display: block 256 | } 257 | 258 | .user .info .profile { 259 | padding-left: 32px 260 | } 261 | 262 | .user .info .profile .meta { 263 | display: block; 264 | align-items: center; 265 | padding-left: 30px; 266 | line-height: 22px 267 | } 268 | 269 | .user .info .profile .meta+.meta { 270 | margin-top: 8px 271 | } 272 | 273 | .user .info .profile .meta i { 274 | float: left; 275 | margin-left: -30px; 276 | padding-top: 2px; 277 | font-size: 18px 278 | } 279 | 280 | .user .info .profile .username { 281 | padding-top: 8px; 282 | padding-bottom: 4px; 283 | padding-left: 0; 284 | font-size: 32px; 285 | line-height: 32px 286 | } 287 | 288 | .user .info .profile.fold .meta { 289 | display: none 290 | } 291 | 292 | .user .info .profile.fold .meta:first-child, 293 | .user .info .profile.fold .meta:nth-child(2) { 294 | display: block 295 | } 296 | 297 | .user .info .profile .fold-button { 298 | margin-top: 8px; 299 | margin-left: -16px 300 | } 301 | 302 | .user .actions { 303 | display: flex; 304 | align-items: center; 305 | justify-content: space-between; 306 | padding: 0 24px 16px 57px 307 | } 308 | 309 | .user .actions .edit, 310 | .user .actions .mc-follow { 311 | margin-right: 58px 312 | } 313 | 314 | .user .actions .edit i { 315 | font-size: 21px 316 | } 317 | 318 | .user .actions .follow { 319 | display: flex; 320 | flex: 1; 321 | align-items: center 322 | } 323 | 324 | .user .actions .divider { 325 | width: 1px; 326 | height: 16px; 327 | margin: 0 8px; 328 | background-color: rgba(0, 0, 0, .12) 329 | } 330 | 331 | .mdui-theme-layout-dark .user .actions .divider { 332 | background-color: hsla(0, 0%, 100%, .12) 333 | } 334 | 335 | @media (max-width:599px) { 336 | .user, 337 | .user .cover { 338 | border-radius: 0 339 | } 340 | .user .info { 341 | flex-direction: column; 342 | align-items: center; 343 | padding: 0 16px 16px 344 | } 345 | .user .info .avatar-box { 346 | width: 106px; 347 | min-width: 106px; 348 | height: 106px; 349 | margin-top: -53px 350 | } 351 | .user .info .profile { 352 | width: 100%; 353 | padding-left: 0 354 | } 355 | .user .info .profile.fold { 356 | width: auto 357 | } 358 | .user .info .profile .username { 359 | padding-top: 10px; 360 | font-size: 24px; 361 | text-align: center 362 | } 363 | .user .actions { 364 | position: relative; 365 | margin-top: 54px; 366 | padding: 0 16px 16px 367 | } 368 | .user .actions .edit, 369 | .user .actions .mc-follow { 370 | margin-right: 0 371 | } 372 | .user .actions .follow { 373 | position: absolute; 374 | top: -54px; 375 | right: 16px; 376 | left: 16px; 377 | border-top: 1px solid rgba(0, 0, 0, .06); 378 | border-bottom: 1px solid rgba(0, 0, 0, .06) 379 | } 380 | .mdui-theme-layout-dark .user .actions .follow { 381 | border-color: hsla(0, 0%, 100%, .06) 382 | } 383 | .user .actions .followees, 384 | .user .actions .followers { 385 | width: 50%; 386 | border-radius: 0 387 | } 388 | .user .actions .divider { 389 | margin: 0 390 | } 391 | } 392 | 393 | .mc-account { 394 | max-width: 448px; 395 | overflow-y: auto 396 | } 397 | 398 | .mc-account .arrow_back, 399 | .mc-account .close { 400 | position: absolute; 401 | top: 4px; 402 | left: 4px; 403 | display: block; 404 | color: #fff 405 | } 406 | 407 | .mc-account .avatar { 408 | position: absolute; 409 | top: 40px; 410 | left: 36px; 411 | display: block; 412 | color: hsla(0, 0%, 100%, .56); 413 | font-size: 76px 414 | } 415 | 416 | .mc-account .mdui-dialog-title { 417 | margin-bottom: 24px; 418 | padding: 146px 40px 28px; 419 | color: #fff 420 | } 421 | 422 | .mdui-theme-layout-dark .mc-account .mdui-dialog-title { 423 | background-color: #303030 424 | } 425 | 426 | .mc-account form { 427 | padding: 0 40px 62px 428 | } 429 | 430 | .mc-account .more-option { 431 | margin-left: -16px 432 | } 433 | 434 | .mc-account .captcha-field { 435 | margin-right: 116px; 436 | overflow: visible 437 | } 438 | 439 | .mc-account .captcha-image { 440 | position: absolute; 441 | right: -116px; 442 | bottom: 29px; 443 | cursor: pointer 444 | } 445 | 446 | .mc-account .send-email-field { 447 | margin-right: 116px; 448 | overflow: visible 449 | } 450 | 451 | .mc-account .send-email { 452 | position: absolute; 453 | right: -116px; 454 | bottom: 29px 455 | } 456 | 457 | .mc-account .actions { 458 | margin-top: 24px 459 | } 460 | 461 | .mc-account .action-btn { 462 | float: right 463 | } 464 | 465 | .mdui-theme-layout-dark .mc-account .action-btn { 466 | background-color: #525252!important 467 | } 468 | 469 | @media (max-width:599px) { 470 | .mc-account { 471 | position: fixed!important; 472 | top: 0!important; 473 | right: 0!important; 474 | bottom: 0!important; 475 | left: 0!important; 476 | width: 100%!important; 477 | max-width: none!important; 478 | height: 100%!important; 479 | max-height: none!important; 480 | margin: 0!important; 481 | border-radius: 0!important 482 | } 483 | .mc-account .back, 484 | .mc-account .close { 485 | top: 10px; 486 | left: 8px 487 | } 488 | .mc-account .avatar { 489 | display: none 490 | } 491 | .mc-account .mdui-dialog-title { 492 | padding: 10px 16px 10px 52px; 493 | line-height: 36px 494 | } 495 | .mc-account form { 496 | padding: 0 24px 24px 497 | } 498 | .mc-account form .mdui-textfield { 499 | padding-top: 4px 500 | } 501 | .mc-account .actions { 502 | margin-top: 14px 503 | } 504 | } 505 | 506 | .mc-login .mdui-dialog-title { 507 | background-color: #3f51b5 508 | } --------------------------------------------------------------------------------