<?php
/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <idreamsoft@qq.com>
 */
require_once("global.php");
switch($_GET['do']){
	case 'login':
		require_once iPATH."usercp/user.class.php";
		$member	= new User;
		if($member->checklogin($_POST['username'],md5($_POST['password']),true)){
			msgJson(1,'login:success');
		}else{
			msgJson(0,'login:failed');
		}
	break;
	case 'logout':
		set_cookie("user", '',-31536000);
		set_cookie("seccode",'',-31536000);
		set_cookie("username",'',-31536000);
	break;
}
?>