. */ 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`, `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_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("

"); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln("
Body name:"); $query="SELECT `BodyCode`, `BodyName`, `BodyCategory` FROM `ab_bodies` WHERE `BodyCategoryOrder`>=0 ORDER BY `BodyCategoryOrder`, `BodyName`"; if( @mysql_num_rows( $res=doquery($query) )>0 ) { echoln(" "); }else { echoln(" Failed loading the bodies, please contact ".SendMailPage::getLink("webmaster", "the webmaster")."."); } echoln("
Password:
"); echoln("

 

"); echoln("
"); }else { // Both aegee.org and separate password allowed echoln("There is now two ways to perform your board tasks:"); echoln(""); } }elseif( isset($_SESSION['sess_groups']) && count($_SESSION['sess_groups'])>0 ) { if( isset($_POST['group']) ) { if( in_array($_POST['group'], $_SESSION['sess_groups']) ) { // Change group $_SESSION['board_group']=$_POST['group']; }else { // No access echoln("Sorry, you don't have access to '".$_POST['group']."'."); echoln("
Please select a group from the list.

"); } } if( count($_SESSION['sess_groups'])==1 ) { // Person is in only one group, no reason to put a select box $_SESSION['board_group']=$_SESSION['sess_groups'][0]; }else { // Person is in more than one group, show select box echoln("

"); echoln("   "); echoln(" "); echoln("
"); echoln("
"); } if( isset($_SESSION['board_group']) ) { $query="SELECT `BodyName`, `BodyStatus`, `BodyCategory`, `BodyCategoryOrder`, `MemberClaimed`, `MemberClaimedBy`, `NoDelegates`, `NoEnvoys`, `NoVisitors`, `NoObservers` FROM `ab_bodies` WHERE `BodyCategoryOrder`>=0 AND `BodyCode`='".$_SESSION['board_group']."'"; if( @mysql_num_rows($res=doquery($query))==1 ) { // Valid account entered $row=mysql_fetch_array($res); $_SESSION['body_BodyCode']=$_SESSION['board_group']; $_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_NoDelegates']=$row["NoDelegates"]; $_SESSION['body_NoEnvoys']=$row["NoEnvoys"]; $_SESSION['body_NoVisitors']=$row["NoVisitors"]; $_SESSION['body_NoObservers']=$row["NoObservers"]; include("./include/numparticipants.php"); if( isset($_REQUEST['nummem']) ) { include("./include/bodynummem.php"); }elseif( isset($_REQUEST['memlist']) ) { echoln("Back

"); include("./include/bodymemlist.php"); }elseif( isset($_REQUEST['viewmemlist']) ) { include("./include/bodymemlistview.php"); }else { include("./include/bodyedit.php"); } } }else { echoln("You are board member of more than one body. Please choose one of them from the list above and press 'Select'. Don't forget to press the 'Save' button before changing "); echoln("to another body, or another page."); } }else { echoln("Sorry, you are not in a board. You don't have access to this page."); echoln("
Please note that the access for this page is based upon the getAccountEditUrl()."\" target=\"_blank\">".$ldap->getSystemName().". Persons mentioned "); echoln("there as board member have access to this page as well. "); } page_footer(); ?>