<?php   
session_start();
ob_start();	
	
	include 'include/db.php';
	include 'include/connect.php';
	$db->findByAttributes('tbadmin',array(
		'admin_user =' => $_POST[admin_user],
		'admin_pass =' => $_POST[admin_pass]
		));
	$rs = $db->executeRow();
	if($rs){
                $_SESSION['admin_id'] = $rs['admin_id'];
				$_SESSION['admin_user'] = $rs['admin_name'];
				$_SESSION['admin_un'] = $rs['admin_user'];
                $_SESSION['admin_status'] = $rs['admin_status'];
                $_SESSION['admin_nickname'] = $rs['admin_nickname'];
                $_SESSION['admin_name'] = $rs['admin_name'];
                $_SESSION['admin_lastname'] = $rs['admin_lastname'];
                $_SESSION['preload'] = '0';
                echo "0";
	} else {
		echo "1";
        }

?>