| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <?php
- //decode by http://dezend.qiling.org QQ 2859470
- error_reporting(32767 ^ 8);
- $do = isset($_GET['do']) ? htmlspecialchars(trim($_GET['do'])) : 'login';
- $go = isset($_GET['go']) ? htmlspecialchars(trim($_GET['go'])) : 'mymps_right';
- $part = isset($_GET['part']) ? htmlspecialchars(trim($_GET['part'])) : 'default';
- switch ($do) {
- case 'login':
- define(CURSCRIPT, 'admin_login');
- define('IN_MYMPS', true);
- include './../include/global.php';
- include './../data/config.php';
- require_once MYMPS_DATA . '/config.db.php';
- require_once MYMPS_INC . '/db.class.php';
- require_once MYMPS_INC . '/admin.class.php';
- @(include MYMPS_DATA . '/caches/authcodesettings.php');
- $authcodesettings = $data;
- $data = NULL;
- $url = trim($url);
- if ($part == 'chk') {
- $db->query('DELETE FROM `' . $db_mymps . 'member` WHERE openid != \'\' AND userid != \'\' AND userpwd = \'\'');
- $url = $url ? $url : 'index.php?do=manage&go=' . $go;
- if ($authcodesettings['adminlogin'] == 1 && !($randcode = mymps_chk_randcode($checkcode))) {
- write_msg('验证码输入错误,请返回重新输入');
- }
- $username = trim($username);
- $password = trim($password);
- $pubdate = $timestamp ? $timestamp : time();
- $ip = GetIP();
- $row = $db->getRow('SELECT id,userid,pwd,uname FROM ' . $db_mymps . 'admin WHERE userid=\'' . $username . '\' AND pwd=\'' . md5($password) . '\'');
- if ($row) {
- $admin_id = $row['userid'];
- $admin_name = $row['uname'];
- $mymps_admin->mymps_admin_login($admin_id, $admin_name);
- $db->query('UPDATE ' . $db_mymps . 'admin SET loginip=\'' . $ip . '\',logintime=\'' . $pubdate . '\' WHERE userid=\'' . $row['userid'] . '\'');
- $db->query('INSERT INTO `' . $db_mymps . 'admin_record_login` (id,adminid,adminpwd,pubdate,ip,result) VALUES (\'\',\'' . $username . '\',\'' . md5($password) . '\',\'' . $pubdate . '\',\'' . $ip . '\',\'1\')');
- write_msg($admin_name . '您已成功登陆系统管理中心', $url);
- } else {
- $db->query('INSERT INTO `' . $db_mymps . 'admin_record_login` (id,adminid,adminpwd,pubdate,ip,result) VALUES (\'\',\'' . $username . '\',\'' . $password . '\',\'' . $pubdate . '\',\'' . $ip . '\',\'0\')');
- write_msg('您输入的用户名或密码错误,请返回重新输入');
- }
- } else {
- if ($part == 'out') {
- define('IN_MYMPS', true);
- $mymps_admin->mymps_admin_logout();
- write_msg('您已经安全退出系统管理中心', 'index.php');
- } else {
- if ($part == 'default') {
- define('IN_MYMPS', true);
- $url = trim($_GET['url']);
- if ($mymps_admin->mymps_admin_chk_getinfo()) {
- write_msg('', 'index.php?do=manage');
- } else {
- include mymps_tpl('login');
- }
- } else {
- define('IN_MYMPS', true);
- write_msg('', 'index.php?do=manage');
- }
- }
- }
- break;
- case 'manage':
- require_once dirname(__FILE__) . '/global.php';
- if ($part == 'left') {
- require_once dirname(__FILE__) . '/include/mymps.menu.inc.php';
- $part = trim($_GET['part']);
- $part = $part ? $part : 'info';
- $mymps_admin_menu = mymps_admin_menu('left');
- include mymps_tpl('admin_left');
- } else {
- if ($part == 'default') {
- include mymps_tpl('admin_default');
- } else {
- if ($part == 'top') {
- require_once dirname(__FILE__) . '/include/mymps.menu.inc.php';
- $mymps_admin_menu = mymps_admin_menu('top');
- $admindir = getcwdOL();
- $level = get_admin_type();
- include mymps_tpl('admin_top');
- } else {
- if ($part == 'right') {
- $go = trim($_GET['go']);
- require_once MYMPS_INC . '/db.class.php';
- require_once MYMPS_DATA . '/config.inc.php';
- require_once dirname(__FILE__) . '/include/mymps.count.inc.php';
- foreach ($ele as $w => $v) {
- $mymps_count_str .= $w == 'siteabout' ? '' : '';
- $mymps_count_str .= '<div class="countsquare">' . "\r\n\t\t\t\t\r\n\t\t\t\t" . '<div class="a">' . $v . '</div>' . "\r\n\t\t\t\t" . '<div class="ab">' . "\r\n\t\t\t\t";
- foreach ($element[$w] as $k => $u) {
- $mymps_count_str .= '<div class="b">';
- $mymps_count_str .= $u[where] ? '<a class="t" href="#" onclick="parent.framRight.location=\'' . $u['url'] . '\';">' . $k . '<br><div class="c">' . mymps_count($u[table], $u[where]) . '</div></a>' : '<a class="t" href="#" onclick="parent.framRight.location=\'' . $u['url'] . '\';">' . $k . '<br><div class="c">' . mymps_count($u[table]) . '</div></a>';
- $mymps_count_str .= '</div>';
- }
- $mymps_count_str .= '</div>' . "\r\n\t\t\t\t" . '</div>';
- }
- $gd_info = @gd_info();
- $gd_version = is_array($gd_info) ? $gd_info['GD Version'] : '<font color=red>不支持GD库</font>';
- $cfg_if_tpledit = $mymps_mymps[cfg_if_tpledit] == 0 ? '<font color=green>关闭</font>' : '<font color=red>开启</font>';
- $if_del_install = !is_file(MYMPS_ROOT . '/install/index.php') ? '<font color=green>已删除</font>' : '<font color=red>未删除</font>';
- $Register_Globals = ini_get('Register_Globals') ? 'on' : 'off';
- $Magic_Quotes_Gpc = MAGIC_QUOTES_GPC ? 'on' : 'off';
- $expose_php = ini_get('expose_php') ? 'on' : 'off';
- $eAccelerator = function_exists('eAccelerator_info') ? '支持 ' : '不支持';
- $eAcceleratorr = function_exists('eAccelerator_info') ? eAccelerator_info() : array();
- $eAccelerator .= $eAcceleratorr['version'];
- $cur_dir = getcwdOL();
- $cur_dir = in_array($cur_dir, array('/admin', '/mayicms')) ? '<font color=red>' . $cur_dir . ' 【不安全】</font>' : '<font color=green>' . $cur_dir . '</font>';
- $latestbackup = $db->getOne('SELECT value FROM `' . $db_mymps . 'config` WHERE description = \'latestbackup\' AND type = \'database\'');
- $parttime = round((0 < $latestbackup ? $timestamp - $latestbackup : 0) / (3600 * 24));
- if (!$latestbackup) {
- $message = '<font color=red>您尚未备份过MayiCMS系统全部数据</font>';
- } else {
- if (13 < $parttime) {
- $message = '<font color=red>您已经超过两周没有备份MayiCMS系统全部数据了</font>';
- } else {
- if ($parttime == 0) {
- $message = '<font color=green>您今天已经备份过MayiCMS全部数据</font>';
- } else {
- $message = '您在 <font color=green>' . $parttime . '</font> 天前备份过MayiCMS系统数据,上次备份:<font color=green>' . GetTime($latestbackup) . '</font>';
- }
- }
- }
- $message .= ',<a href="database.php?part=backup" style="text-decoration:underline">点此备份系统数据</a>';
- $dsxx = mymps_count('information', 'WHERE info_level = \'0\'');
- $dshy = mymps_count('member', 'WHERE status = \'0\'');
- $dsyl = mymps_count('flink', 'WHERE ischeck = \'1\'');
- $dsxw = mymps_count('news', 'WHERE iscommend = \'0\'');
- $dsjgwz = mymps_count('member_docu', 'WHERE if_check= \'0\'');
- $dshydp = mymps_count('member_comment', 'WHERE commentlevel= \'0\'');
- $welcome = array('常用' => "\r\n\t\t\t\t\t" . '<div class="mainnav">' . "\r\n\t\t\t\t\t" . '<ul>' . "\r\n\t\t\t\t\t" . '<li><a href="' . $mymps_global[SiteUrl] . '" target="_blank"><img border="0" src="template/images/default/home.gif" style="margin-bottom:3px"/>网站首页</a></li>' . "\r\n\t\t\t\t\t" . '<li><a href="#" onclick="parent.framRight.location=\'member.php?part=add\'"><img border="0" src="template/images/default/user.png" />添加会员</a></li>' . "\r\n\t\t\t\t\t" . '<li><a href="#" onclick="window.open(\'../' . $mymps_global[cfg_postfile] . '\');"><img border="0" src="template/images/default/report.png"/>发布信息</a></li>' . "\r\n\t\t\t\t\t" . '<li><a href="#" onclick="parent.framRight.location=\'config.php?part=cache_sys&return_url=' . urlencode('index.php?do=manage&part=right') . '\'"><img border="0" src="template/images/default/post.png"/>清除缓存</a></li>' . "\r\n\t\t\t\t\t" . '<li><a href="#" onclick="parent.framRight.location=\'optimise.php\'"><img border="0" src="template/images/default/share.png" />系统优化</a></li>' . "\r\n\t\t\t\t\t" . '<li><a href="#" onclick="parent.framRight.location=\'pm.php\'"><img border="0" src="template/images/default/mail.png" />发站内信</a></li>' . "\r\n\t\t\t\t\t" . '</ul>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t\t", '审核' => "\r\n\t\t\t\t\t" . '<div>' . "\r\n\t\t\t\t\t" . '<span><input value="审核信息(' . $dsxx . ')" onclick="location.href=\'information.php?info_level=0\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t" . '<span><input value="审核会员(' . $dshy . ')" onclick="location.href=\'member.php?part=verify&do_action=default\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t" . '<span><input value="审核新闻(' . $dsxw . ')" onclick="location.href=\'news.php?iscommend=l0\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t" . '<span><input value="审核点评(' . $dshydp . ')" onclick="location.href=\'member_comment.php?commentlevel=l0\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t" . '<span><input value="审核文章(' . $dsjgwz . ')" onclick="location.href=\'document.php?do=document&if_check=1\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t" . '<span><input value="审核友链(' . $dsyl . ')" onclick="location.href=\'friendlink.php?ischeck=1\'" type="button" class="gray large"></span>' . "\r\n\t\t\t\t\t", '数据统计' => $mymps_count_str, '相关说明' => '<span>商业用户授权</span>' . "\r\n\t\t" . '欢迎使用蚂蚁分类5.9解密版<br />' . "\r\n\t\t" . '<span>技术支持服务</span><a href="#">联系客服QQ</a>' . "\r\n\t\t" . '<br>' . "\r\n\t\t" . '<span>在线客服</span> Q Q:<a href="tencent://message/?uin=784939922&Site=qq&Menu=yes" target="_blank"><b style="color:#f30">784939922(点击交谈)</b></a>' . "\r\n\t\t\t\t\t", '安全建议' => "\r\n\t\t\t\t\t" . '<span>在线编辑模板功能</span> 当前:' . $cfg_if_tpledit . '。建议您只有在十分必要的时候才开启它。请修改 /data/config.inc.php 关闭此功能<br />' . "\r\n\t\t\t" . '<span>系统 install目录</span> 当前:' . $if_del_install . '。为防止站外人员利用,建议您安装完成后,删除该目录<br />' . "\r\n\t\t\t" . '<span>后台目录</span> 当前:' . $cur_dir . '。建议您安装完成后,及时修改(<a href="https://www.mayicms.com/jiaocheng/article-20.htm" target="_blank">如何修改后台目录?</a>)。<br />' . "\r\n\t\t\t" . '<span>数据安全</span>' . $message, '服务器相关' => "\r\n\t\t\t\t" . '<div><span>服务器环境:</span>' . $_SERVER['SERVER_SOFTWARE'] . '</div>' . "\r\n\t\t\t\t" . '<div><span>服务器系统:</span>' . PHP_OS . '</div>' . "\r\n\t\t\t\t" . '<div><span>当前时间:</span>' . GetTime($timestamp) . ' ' . date('星期N', $timestamp) . '</div>' . "\r\n\t\t\t\t" . '<div><span>PHP程式版本:</span>' . PHP_VERSION . '</div>' . "\r\n\t\t\t\t" . '<div><span>Register_Globals:</span>' . $Register_Globals . ' <font color=red>[荐off]</font></div>' . "\r\n\t\t\t\t" . '<div><span>Magic_Quotes_Gpc:</span>' . $Magic_Quotes_Gpc . ' <font color=red>[荐on]</font></div>' . "\r\n\t\t\t\t" . '<div><span>expose_php:</span>' . $expose_php . ' <font color=red>[荐off]</font></div>' . "\r\n\t\t\t\t" . '<div><span>eAccelerator:</span>' . $eAccelerator . ' </div>' . "\r\n\t\t\t\t" . '<div><span>MYSQL版本:</span>' . $db->version() . '</div>' . "\r\n\t\t\t\t" . '<div><span>mymps目录: </span>' . MYMPS_ROOT . '</div>' . "\r\n\t\t\t\t" . '<div><span>使用域名: </span>' . $_SERVER['SERVER_NAME'] . '</div>' . "\r\n\t\t\t\t" . '<div><span>脚本超时时间:</span>' . ini_get('max_execution_time') . '</div>' . "\r\n\t\t\t\t" . '<div><span>附件上传上限</span>' . ini_get('upload_max_filesize') . '</div>' . "\r\n\t\t\t\t" . '<div><span>GD库版本</span>' . $gd_version . '</div>' . "\r\n\t\t\t\t" . '<div><span>检测文件读写权限</span><a href=\'javascript:setbg("检测文件读写权限",305,380,"../box.php?part=sp_testdirs")\' class="icon_open" id="spanmymsg" >点此检测</a>' . "\t\t\r\n\t\t\t\t", '研发团队' => "\r\n\t\t\t\t" . '<div><span>系统官网:</span> <a href="#" target="_blank">暂无</a><br />' . "\r\n\t\t\t\t" . '<div><span>使用教程:</span> <a href="#" target="_blank">暂无</a><br />' . "\r\n\t\t\t\t" . '<div><span>交流论坛:</span> <a href="#" target="_blank">暂无</a><br />' . "\r\n\t\t\t\t" . '<div><span>MayiCMS版本:</span> ' . MPS_VERSION . ' <br />' . "\r\n\t\t\t\t\t");
- foreach ($welcome as $k => $value) {
- $mymps_welcome_str .= '<tr bgcolor="#f5fbff"><td width="15" bgcolor="#F6FBFF" style="">' . $k . '</td><td bgcolor="white" style="padding:15px;" class="other">' . $value . '</td></tr>';
- }
- $here = '系统管理首页';
- echo mymps_admin_tpl_global_head($go);
- include mymps_tpl('admin_index');
- unset($ele);
- unset($element);
- echo mymps_admin_tpl_global_foot();
- }
- }
- }
- }
- break;
- case 'power':
- require_once dirname(__FILE__) . '/global.php';
- require_once MYMPS_INC . '/member.class.php';
- $s_uid = trim($_GET['userid']);
- $s_pwd = trim($_GET['password']);
- $member_log->in($s_uid, $s_pwd, 'off', $url);
- break;
- default:
- define('IN_MYMPS', true);
- write_msg('未知错误,请重新登录后台操作', 'index.php?do=login&part=out');
- break;
- }
- is_object($db) && $db->Close();
- $db = $mymps_global = $part = $action = $here = NULL;
|