. */ require_once("./include/g_onmemlist.php"); if( !isset($_SESSION['sess_uid']) AND !isset($_SESSION['body_BodyCode']) ) { include("../include/header.php"); echo " You cannot call this file directly."; include("../include/footer.php"); exit; } if( !isset($setup['SetupEventType']) ) { exit(); } $canEdit = is_before("EventDatePartTypeFix") || $_SESSION['sess_uid']>0; if( $_SESSION['sess_uid']<=0 ) { echoln(" Make sure you save the changes."); if( isset($_SESSION['access_exppwd']) && $_SESSION['access_exppwd'] ) echoln("   Logout"); if( strlen($_SESSION['body_MemberClaimedBy'])==0 AND $_SESSION['body_BodyCategory']=="Locals" AND $setup['SetupEventType']=="AGORA" ) { if( $setup['UploadMembersList'] ) { echoln("

You did not upload the list of members of your local.

"); }else { echoln("

You did not fill in the number of members your local has.

"); } } echoln("

"); } // Give the body data and maximums echoln("

"); echoln(" "); echoln(" "); echoln(" "); echoln(" "); if( $_SESSION['body_BodyCategory']=="Locals" AND $setup['SetupEventType']=="AGORA" ) { echoln(" "); if( strlen($_SESSION['body_MemberClaimedBy'])>0 ) echoln(" "); else echoln(" "); if( strlen($_SESSION['body_MemberLastUpdate'])>0 ) echoln(" "); else echoln(" "); } echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln("
Body code:".$_SESSION['body_BodyCode']."
Body name:".$_SESSION['body_BodyName']."
Body Category:".$_SESSION['body_BodyCategory']."
Body Status:".$_SESSION['body_BodyStatus']."
Number of members:".$_SESSION['body_MemberClaimed']); if( $canEdit && ((isset($_SESSION['access_user']) && $_SESSION['access_user']) || $setup['AuthSystem']=="None" || $_SESSION['body_MemberClaimedBy']=="Memberlist upload") ) { if( $setup['UploadMembersList'] ) { echoln("   Edit"); }else { echoln("   Edit"); } } echoln("
Entered by:".$_SESSION['body_MemberClaimedBy']."
Entered by:Not filled in yet
Last update:".$_SESSION['body_MemberLastUpdate']."
Last update:-
Maximum no of delegates:".$_SESSION['body_NoDelegates']."
Maximum no of envoys:".$_SESSION['body_NoEnvoys']."
Maximum no of observers:".$_SESSION['body_NoObservers']."
Maximum no of visitors:".$_SESSION['body_NoVisitors']."
"); if( $setup['UploadMembersList'] && strlen($_SESSION['body_MemberClaimedBy'])>0 && $_SESSION['body_BodyCategory']=="Locals" && $setup['SetupEventType']=="AGORA" ) { echoln("

View the uploaded list of members.

"); } // Save data if( $canEdit && get_var('action')=="save" ) { for($t=4; $t>=1; $t--) { switch($t) { case 1: $type="delegate"; $total=$_SESSION['body_NoDelegates']; break; case 2: $type="envoy"; $total=$_SESSION['body_NoEnvoys']; break; case 3: $type="observer"; $total=$_SESSION['body_NoObservers']; break; case 4: $type="visitor"; $total=$_SESSION['body_NoVisitors']; break; } for($i=$total; $i>=1; $i--) { $temp=(isset($_POST[$type.$i])?get_int($type.$i):0); if( $temp>0 ) { $query1="UPDATE `persons` SET `ParticipantType`='-', `ParticipantOrder`=0, `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": removed participant type by ".addslashes(isset($_SESSION['sess_name'])?$_SESSION['sess_name']:"")."') WHERE `ParticipantType`='".addslashes($type)."' AND `ParticipantOrder`=".addslashes($i)." AND `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."'"; $query2="UPDATE `persons` SET `ParticipantType`='".addslashes($type)."', `ParticipantOrder`=".addslashes($i).", `BoardConfirmed`='yes', `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": set participant type to ".addslashes($type." (".$i.")")." by ".addslashes(isset($_SESSION['sess_name'])?$_SESSION['sess_name']:"")."') WHERE `PersonID`=".addslashes($temp)." AND `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."'"; if( doquery($query1) ) { if( !doquery($query2) ) { echoln("Failed saving data. Please try again."); } }else { echoln("Failed saving data. Please try again."); } }elseif( $temp==-1 ) { // Remove person from position $query1="UPDATE `persons` SET `ParticipantType`='-', `ParticipantOrder`=0, `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": removed participant type by ".addslashes(isset($_SESSION['sess_name'])?$_SESSION['sess_name']:"")."') WHERE `ParticipantType`='".addslashes($type)."' AND `ParticipantOrder`=".addslashes($i)." AND `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."'"; if( !doquery($query1) ) { echoln("Failed saving data. Please try again."); } } } } if( $setup['ApplShowCommentBoard'] ) { $query = "SELECT `PersonID`, `FirstName`, `LastName`, `CommentBoard` FROM `persons` "; $query .= "WHERE `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."'"; if( mysql_num_rows($res=doquery($query))>0 ) { while( $row=mysql_fetch_assoc($res) ) { if( isset($_POST['comment'][$row['PersonID']]) && $_POST['comment'][$row['PersonID']]!=$row['CommentBoard'] ) { $query = "UPDATE `persons` SET `CommentBoard`='".addslashes($_POST['comment'][$row['PersonID']])."', `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": board comment modified by ".addslashes(isset($_SESSION['sess_name'])?$_SESSION['sess_name']:"")."') "; $query .= "WHERE `PersonID`=".addslashes($row['PersonID']); if( !doquery($query) ) { echoln("Failed saving board comment for ".$row['FirstName']." ".$row['LastName'].".
"); } } } } } } if( $canEdit && get_var('action')=="reject" ) { $PersonID=$_GET['id']; if( $PersonID>0 ) { $query="UPDATE `persons` SET `BoardConfirmed`='no', `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": application rejected (by local) by ".addslashes(isset($_SESSION['sess_name'])?$_SESSION['sess_name']:"")."') WHERE `PersonID`=".addslashes($PersonID)." AND `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."'"; if( !doquery($query) ) { echoln("Failed saving data. Please try again."); } } } // Read person data $query="SELECT `PersonID`, `FirstName`, `LastName`, `ParticipantType`, `ParticipantOrder`, `BoardConfirmed`, `MemberlistConfirmed` FROM `persons` WHERE `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."' ORDER BY `FirstName`, `LastName`, `PersonID`"; $i=0; $j=0; $res=doquery($query); $allPerson = array(); $sortPerson = array(); while( $row=mysql_fetch_array($res) ) { // Fill the list with all persons $allPerson[$i]['ID']=$row['PersonID']; $allPerson[$i]['name']=$row['FirstName']." ".$row['LastName']; $i++; if( ($row['ParticipantType']=="delegate" AND $row['ParticipantOrder']<=$_SESSION['body_NoDelegates']) OR ($row['ParticipantType']=="envoy" AND $row['ParticipantOrder']<=$_SESSION['body_NoEnvoys']) OR ($row['ParticipantType']=="observer" AND $row['ParticipantOrder']<=$_SESSION['body_NoObservers']) OR ($row['ParticipantType']=="visitor" AND $row['ParticipantOrder']<=$_SESSION['body_NoVisitors']) ) { $sortPerson[ $row['ParticipantType'] ][ $row['ParticipantOrder'] ]['ID'] = $row['PersonID']; $sortPerson[ $row['ParticipantType'] ][ $row['ParticipantOrder'] ]['name'] = $row['FirstName']." ".$row['LastName']; $sortPerson[ $row['ParticipantType'] ][ $row['ParticipantOrder'] ]['confirm'] = $row['BoardConfirmed']; $sortPerson[ $row['ParticipantType'] ][ $row['ParticipantOrder'] ]['MemberlistConfirmed'] = $row['MemberlistConfirmed']; }else { $sortPerson['-'][$j]['ID'] = $row['PersonID']; $sortPerson['-'][$j]['name'] = $row['FirstName']." ".$row['LastName']; $sortPerson['-'][$j]['confirm'] = $row['BoardConfirmed']; $sortPerson['-'][$j]['MemberlistConfirmed'] = $row['MemberlistConfirmed']; $j++; } } $ShowMaxVisitors=min($i, $_SESSION['body_NoVisitors']); // Output the list of valid applications echoln("
"); echoln(" "); echoln(" "); echoln("
"); if( $canEdit ) { echoln(" Put the people in the order you want them to be accepted. People will be accepted in the "); echoln(" order you put them."); }else { echoln(" It is after the deadline to set the participant type. Because of this, you cannot edit "); echoln(" the data on this page. In case something needs to be changed, contact chair."); } echoln("
Please keep in mind that this is a preselection. People will only be able to participate "); echoln(" after they have been accepted by the chairperson of the ".$setup['SetupEventType']." (see the "); echoln(" participants list for this). The "); echoln(" number of people that can participate from your local will depend on the number of available places "); echoln(" and the total number of applications. It is likely that not all the people you select below will "); echoln(" be able to participate, as it is also used as a waiting list."); echoln("
Don't forget to save before leaving this page!"); echoln("
"); echoln("

Selected people (validated application)

"); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); if( $canEdit ) { echoln(" "); } echoln(" "); $c=0; for($t=1; $t<=4; $t++) { switch($t) { case 1: $type="delegate"; $total=$_SESSION['body_NoDelegates']; break; case 2: $type="envoy"; $total=$_SESSION['body_NoEnvoys']; break; case 3: $type="observer"; $total=$_SESSION['body_NoObservers']; break; case 4: $type="visitor"; $total=$ShowMaxVisitors; break; } for($i=1; $i<=$total; $i++) { $c++; if( ($c%2)==1 ) echoln(" "); else echoln(" "); echoln(" "); echoln(" "); if( isset($sortPerson[$type]) && isset($sortPerson[$type][$i]) && $sortPerson[$type][$i]['ID']>0 ) { echoln(" "); echoln(" "); echoln(" "); }else { echoln(" "); echoln(" "); echoln(" "); } if( $canEdit ) { echoln(" "); } echoln(" "); } } echoln("
Participant type#NameMemberlist1Change
$type$i".$sortPerson[$type][$i]['ID']."".$sortPerson[$type][$i]['name']."\"".$OnMemList_text[ No selection 
"); if( $canEdit ) { if( $setup['ApplShowCommentBoard'] ) { $query = "SELECT `PersonID`, `FirstName`, `LastName`, `CommentBoard` FROM `persons` "; $query .= "WHERE `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."' AND `ParticipantType`!='-' "; $query .= "ORDER BY `FirstName`, `LastName`"; if( mysql_num_rows($res=doquery($query))>0 ) { echoln("

Board comment

"); echoln("

Please write a short motivation for the people you have accepted. What you write here will be used for selecting participants for this event.

"); echoln(""); echoln(" "); echoln(" "); echoln(" "); echoln(" "); $r = 0; while( $row=mysql_fetch_assoc($res) ) { echoln(" "); echoln(" "); echoln(" "); } echoln("
NameComment
".$row['FirstName']." ".$row['LastName'].""); echoln("
"); } } echoln("

 

"); } echoln("
"); // Now output the invalid/waiting list of persons echoln("

Waiting list (invalid applications)

"); echoln(""); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); $query="SELECT `PersonID`, `FirstName`, `LastName` FROM `persons` WHERE `BodyCode`='".addslashes($_SESSION['body_BodyCode'])."' AND `ParticipantType`='-'"; if( mysql_num_rows($res=doquery($query)) ) { $i=0; #while( $row=mysql_fetch_array($res) ) { for( $j=0; $j"); else echoln(" "); echoln(" "); echoln(" "); if( $sortPerson['-'][$j]['confirm']=="no" ) echoln(" "); else echoln(" "); echoln(" "); } echoln(" "); }else { echoln(" "); } echoln("
#Name 
".$sortPerson['-'][$j]['ID']."".$sortPerson['-'][$j]['name']."\"Rejected\"Reject
You can accept rejected people by giving them a participant type.
No waiting persons
"); echoln(""); echoln(" "); echoln(" "); echoln(" "); echoln("
"); echoln(" As long as you have people in the waiting list, you'll receive regular messages that you still have"); echoln(" to assign this person a status. When you reject the person, you'll not receive this message."); echoln("
"); echoln("

"); echoln(""); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln(" "); echoln("
1 Memberlist explained
\"".$OnMemList_text['-']."\"No automatic check has been done yet. This can be because the participant doesn't have a participant type yet, or because there is no memberlist available.
\"".$OnMemList_text['yes']."\"The person is on the memberlist. For a delegate, this means the person is also on the memberlist of half a year ago. This person can be accepted for Agora.
\"".$OnMemList_text['pending']."\"An automatic check has been made, but the person is not found on the memberlist (in case of a delegate, he/she must also be on the memberlist of half a year ago). Either the person is really not there, or names do not match exactly. A manual check will be made now.
\"".$OnMemList_text['no']."\"The person is not on the member list. A delegate must also be on the memberlist of half a year ago. This status has been manually confirmed. Please note that this person will not be accepted for Agora.
Note: exceptions can be made to the above rules.
"); ?>