require("common.inc.php"); if($_POST['action']=="login" ) { if($_POST['pass'] && $_POST['email']) { $q=mysql_query("SELECT * FROM committees_members WHERE email='".$_POST['email']."' AND password='".$_POST['pass']."' AND deleted='N'"); if(mysql_num_rows($q)==1) { $r=mysql_fetch_object($q); $_SESSION['email']=$r->email; $_SESSION['committee_member_id']=$r->id; send_header("Committee Login", array()); echo happy(i18n("Successfully logged in")); echo i18n("Use the menu on the left to access the committee pages"); } else { send_header("Committee Login", array()); echo error(i18n("Invalid Email/Password")); } } else { send_header("Committee Login", array()); echo error(i18n("Email/Password missing")); } } else if($_GET['action']=="logout") { unset($_SESSION['email']); unset($_SESSION['committee_member_id']); send_header("Committee Login", array()); echo notice(i18n("You have been successfully logged out")); } else { send_header("Committee Login", array()); ?>
} send_footer(); ?>