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 .= '
' . "\r\n\t\t\t\t\r\n\t\t\t\t" . '
' . $v . '
' . "\r\n\t\t\t\t" . '
' . "\r\n\t\t\t\t"; foreach ($element[$w] as $k => $u) { $mymps_count_str .= '
'; $mymps_count_str .= $u[where] ? '' . $k . '
' . mymps_count($u[table], $u[where]) . '
' : '' . $k . '
' . mymps_count($u[table]) . '
'; $mymps_count_str .= '
'; } $mymps_count_str .= '
' . "\r\n\t\t\t\t" . '
'; } $gd_info = @gd_info(); $gd_version = is_array($gd_info) ? $gd_info['GD Version'] : '不支持GD库'; $cfg_if_tpledit = $mymps_mymps[cfg_if_tpledit] == 0 ? '关闭' : '开启'; $if_del_install = !is_file(MYMPS_ROOT . '/install/index.php') ? '已删除' : '未删除'; $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')) ? '' . $cur_dir . ' 【不安全】' : '' . $cur_dir . ''; $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 = '您尚未备份过MayiCMS系统全部数据'; } else { if (13 < $parttime) { $message = '您已经超过两周没有备份MayiCMS系统全部数据了'; } else { if ($parttime == 0) { $message = '您今天已经备份过MayiCMS全部数据'; } else { $message = '您在 ' . $parttime . ' 天前备份过MayiCMS系统数据,上次备份:' . GetTime($latestbackup) . ''; } } } $message .= ',点此备份系统数据'; $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" . '' . "\r\n\t\t\t\t\t\t", '审核' => "\r\n\t\t\t\t\t" . '
' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t" . '' . "\r\n\t\t\t\t\t", '数据统计' => $mymps_count_str, '相关说明' => '商业用户授权' . "\r\n\t\t" . '欢迎使用蚂蚁分类5.9解密版
' . "\r\n\t\t" . '技术支持服务联系客服QQ' . "\r\n\t\t" . '
' . "\r\n\t\t" . '在线客服 Q Q:784939922(点击交谈)' . "\r\n\t\t\t\t\t", '安全建议' => "\r\n\t\t\t\t\t" . '在线编辑模板功能 当前:' . $cfg_if_tpledit . '。建议您只有在十分必要的时候才开启它。请修改 /data/config.inc.php 关闭此功能
' . "\r\n\t\t\t" . '系统 install目录 当前:' . $if_del_install . '。为防止站外人员利用,建议您安装完成后,删除该目录
' . "\r\n\t\t\t" . '后台目录 当前:' . $cur_dir . '。建议您安装完成后,及时修改(如何修改后台目录?)。
' . "\r\n\t\t\t" . '数据安全' . $message, '服务器相关' => "\r\n\t\t\t\t" . '
服务器环境:' . $_SERVER['SERVER_SOFTWARE'] . '
' . "\r\n\t\t\t\t" . '
服务器系统:' . PHP_OS . '
' . "\r\n\t\t\t\t" . '
当前时间:' . GetTime($timestamp) . ' ' . date('星期N', $timestamp) . '
' . "\r\n\t\t\t\t" . '
PHP程式版本:' . PHP_VERSION . '
' . "\r\n\t\t\t\t" . '
Register_Globals:' . $Register_Globals . '   [荐off]
' . "\r\n\t\t\t\t" . '
Magic_Quotes_Gpc:' . $Magic_Quotes_Gpc . '   [荐on]
' . "\r\n\t\t\t\t" . '
expose_php:' . $expose_php . '   [荐off]
' . "\r\n\t\t\t\t" . '
eAccelerator:' . $eAccelerator . '   
' . "\r\n\t\t\t\t" . '
MYSQL版本:' . $db->version() . '
' . "\r\n\t\t\t\t" . '
mymps目录: ' . MYMPS_ROOT . '
' . "\r\n\t\t\t\t" . '
使用域名: ' . $_SERVER['SERVER_NAME'] . '
' . "\r\n\t\t\t\t" . '
脚本超时时间:' . ini_get('max_execution_time') . '
' . "\r\n\t\t\t\t" . '
附件上传上限' . ini_get('upload_max_filesize') . '
' . "\r\n\t\t\t\t" . '
GD库版本' . $gd_version . '
' . "\r\n\t\t\t\t" . '
检测文件读写权限点此检测' . "\t\t\r\n\t\t\t\t", '研发团队' => "\r\n\t\t\t\t" . '
系统官网: 暂无
' . "\r\n\t\t\t\t" . '
使用教程: 暂无
' . "\r\n\t\t\t\t" . '
交流论坛: 暂无
' . "\r\n\t\t\t\t" . '
MayiCMS版本: ' . MPS_VERSION . '
' . "\r\n\t\t\t\t\t"); foreach ($welcome as $k => $value) { $mymps_welcome_str .= '' . $k . '' . $value . ''; } $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;