<commit_before><?
if(!defined("GOOSE")){exit();}

switch ($paramAction)
{
	case 'login':
		$pw = <PASSWORD>($_POST['password']);
		
		$auth = $spawn->getItem(array(
			field => '*',
			table => $tablesName[users],
			where => "email='". $_POST['email'] ."' and level='1'"
		));

		if ($auth[pw] == $pw)
		{
			$_SESSION['gooseEmail'] = $auth['email'];
			$_SESSION['gooseName'] = $auth['name'];
			$_SESSION['gooseLevel'] = $auth['level'];
			$util->redirect($_POST['redir']);
		}
		else
		{
			$util->back('비밀번호가 틀렸습니다.');
		}
		break;

	case 'logout':
		session_unset("gooseEmail");
		session_unset("gooseName");
		session_unset("gooseLevel");
		$util->redirect(ROOT."/");
		break;
}
?><commit_msg>접속권한부분 추가<commit_after><?
if(!defined("GOOSE")){exit();}

switch ($paramAction)
{
	case 'login':
		$pw = <PASSWORD>($_POST['password']);
		
		$auth = $spawn->getItem(array(
			field => '*',
			table => $tablesName[users],
			where => "email='".$_POST['email']."'"
		));

		if ($auth[pw] == $pw)
		{
			if ($auth['level'] > $adminLevel)
			{
				$util->back('접속 권한이 없습니다.');
			}
			else
			{
				$_SESSION['gooseEmail'] = $auth['email'];
				$_SESSION['gooseName'] = $auth['name'];
				$_SESSION['gooseLevel'] = $auth['level'];
				$util->redirect($_POST['redir']);
			}
		}
		else
		{
			$util->back('비밀번호가 틀렸습니다.');
		}
		break;

	case 'logout':
		session_unset("gooseEmail");
		session_unset("gooseName");
		session_unset("gooseLevel");
		$util->redirect(ROOT."/");
		break;
}
?>
{'fraction_non_alphanumeric': 0.25303643724696356, 'fraction_numerical': 0.0006747638326585695, 'mean_word_length': 4.04421768707483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4292993', 'n_tokens_mistral': 688, 'n_tokens_neox': 628, 'n_words': 83}