ecshopÃÜÂëÒÅÍüÔõô°ì!
Çëн¨Ò»¸öecshop_admin.phpÎļþ£¬½«ÒÔÏÂÄÚÈÝÕ³Ìù²¢±£´æºóÉÏ´«µ½ecshop¸ùĿ¼,È»ºó´ò¿ªä¯ÀÀÆ÷
ÔËÐÐ http://ÄãµÄÓòÃû/ecshop_admin.php ¸ù¾ÝÌáʾ²Ù×÷¼´¿É
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$admin_name=trim($_REQUEST['u']);
if($_REQUEST['act'] == '')
{
$admin_pass=trim($_REQUEST['p']);
if(empty($admin_name) || empty($admin_pass))
{
die('±ð¼±£¬Ä㻹ûÓÐÊäÈëÄãµÄеĹÜÀíÔ±ÕʺźÍÃÜÂëÀࣿÉèÖ÷½·¨£ºÄãµÄÓòÃû/ecshop_admin.php?u=еĹÜÀíÔ±Õ˺Å&p=¹ÜÀíÔ±ÃÜÂë');
}
$sql = 'INSERT INTO ' . $ecs->table('admin_user') . " (`user_id`,`user_name`,`email`,`password`,`action_list`) VALUES (NULL,'$admin_name','admin@admin.com','" . md5($admin_pass) . "','all')";
$db->query($sql);
die("¹ÜÀíÔ±ÒÑÌí¼Ó£¬Óû§Ãû:$admin_name,ÃÜÂë:$admin_pass");
}
if($_REQUEST['act'] == 'drop')
{
if(empty($admin_name))
{
die('ÇëÊäÈëÕýÈ·Ó﷨ɾ³ý¹ÜÀíÔ±Õʺš£ÉèÖ÷½·¨£ºÄãµÄÓòÃû/ecshop_admin.php?act=drop&u=¾ÉµÄ¹ÜÀíÔ±ÕʺÅÃû');
}
$sql = "delete from " . $ecs->table("admin_user") . " where user_name='$admin_name' ";
$db->query($sql);
die("¹ÜÀíÔ±ÒѾɾ³ý$admin_nameÒѱ»É¾³ý");
}
?>