. */ include("./include/include.php"); include("./include/g_body.php"); require_once("./include/SendMailPage.php"); if( !$setup['PromoteAnonymousApplication'] AND $_SESSION['sess_uid']==0 AND !(isset($_REQUEST['login']) OR isset($_REQUEST['logout'])) ) { // User needs to log in first if( strpos($_SERVER['REQUEST_URI'], "?")===false ) header("location: ".$_SERVER['REQUEST_URI']."?login"); else header("location: ".$_SERVER['REQUEST_URI']."&login"); exit(); } page_header(); ### Check password login ### if( isset($_REQUEST['bodycode']) AND isset($_REQUEST['password']) ) { $query="SELECT `BodyName`, `BodyStatus`, `BodyCategory`, `BodyCategoryOrder`, `MemberClaimed`, `MemberClaimedBy`, `MemberLastUpdate`, `NoDelegates`, `NoEnvoys`, `NoVisitors`, `NoObservers` FROM `ab_bodies` WHERE `BodyCategoryOrder`>=0 AND `BodyCode`='".addslashes($_REQUEST['bodycode'])."' AND `Password`='".addslashes(md5($_REQUEST['password']))."'"; if( @mysql_num_rows($res=doquery($query))==1 ) { // Valid password entered $row=mysql_fetch_array($res); $_SESSION['access_exppwd']=true; $_SESSION['body_BodyCode']=$_REQUEST['bodycode']; $_SESSION['body_BodyName']=$row["BodyName"]; $_SESSION['body_BodyStatus']=$row["BodyStatus"]; $_SESSION['body_BodyCategory']=$row["BodyCategory"]; $_SESSION['body_BodyCategoryOrder']=$row['BodyCategoryOrder']; $_SESSION['body_MemberClaimed']=$row['MemberClaimed']; $_SESSION['body_MemberClaimedBy']=$row['MemberClaimedBy']; $_SESSION['body_MemberLastUpdate']=$row['MemberLastUpdate']; $_SESSION['body_NoDelegates']=$row["NoDelegates"]; $_SESSION['body_NoEnvoys']=$row["NoEnvoys"]; $_SESSION['body_NoVisitors']=$row["NoVisitors"]; $_SESSION['body_NoObservers']=$row["NoObservers"]; $_SESSION['board_body']=$_REQUEST['bodycode']; $_SESSION['sess_groups']=array($_REQUEST['bodycode']); include("./include/numparticipants.php"); }else { // Failed login $error_login = "
Invalid body name/export password entered.
"; } }elseif( isset($_REQUEST['bodycode']) ) { $_POST['BodyCode'] = strtoupper($_REQUEST['bodycode']); } if( isset($_SESSION['board_body']) && $_SESSION['board_body']!="" ) echoln("Logout ".$_SESSION['body_BodyName'].""); if( $setup['PromoteAnonymousApplication'] AND $_SESSION['sess_uid']==0 AND (!isset($_SESSION['board_body']) || $_SESSION['board_body']=="") ) { if( $setup['AuthSystem']=="None" || isset($_REQUEST['internal']) || isset($_REQUEST['bodycode']) ) { // Only separate password allowed echoln("To access this page, please log in with the password mailed to you. The password is mailed within 24 hours after the first application for your body is made. This password is sent "); echoln("to the e-mail address registered for your body as mentioned in the Address Book. If you did not receive it within "); echoln("24 hours, please contact "); echoln(SendMailPage::getLink("headoffice", "the Headoffice")."."); echoln(""); }else { // Both aegee.org and separate password allowed echoln("There is now two ways to perform your board tasks:"); echoln("