<?php

						/*************************************\
						
						    Handshakes Professional (3.0)
						            by DZOIC LTD
						       Copyright(c) 2005-2006
						        http://www.dzoic.com
						
						\*************************************/

						///////////////////////////////////////
							
						$action = $GLOBALS["Get"]->val("action");
								
							switch($action){								
										
								case '':									
									admin_login_form();
									break;
									
								case 'do_login':
									do_login_admin();
									break;
									
								case 'do_logout':
									do_logout_admin();
									break;
									
							}//switch
							
						///////////////////////////////////////
						
function admin_login_form(){
	
	$data["title_id"] = "21";	
	$layout[0] = "login_form";	
	admin_output($layout,$data);
	
}//admin_login_form

function do_login_admin(){
	
	$admin_login = $GLOBALS["Get"]->val("admin_login");
	$admin_password = $GLOBALS["Get"]->val("admin_password");
	
	$logged_in = admin_login($admin_login,$admin_password);
	
	if($logged_in)
		load_page("index.php?section=home");
	else
		load_page("index.php?err_id=1");
	
}//do_login_admin

function do_logout_admin(){
	
	admin_logout();	
	admin_load_page("index.php");
	
}//do_logout_admin

?>