. */ include("./include/include.php"); include("./include/g_onmemlist.php"); include("./include/AjaxResponse.php"); include("./include/Popup.php"); include("./include/Persons.php"); include("./include/PersonsFields/105MemberlistConfirmed.php"); define("POPUP_HEIGHT", 260); define("POPUP_WIDTH", 330); if( !in_array("application_editonmemlist", $_SESSION['sess_functions']) ) { $popup = new Popup("Edit accepted", "You are not authorized to see this page."); $popup->setHeight(POPUP_HEIGHT)->setWidth(POPUP_WIDTH); echo $popup->createPopup(); }else { admin_header(true, true); if( !isset($_POST['MemberlistConfirmed']) ) { // Show form with data $query = "SELECT `FirstName`, `LastName`, `BodyName`, `ParticipantType`, `ParticipantOrder`, `Accepted`, `MemberlistConfirmed` "; $query .= "FROM `persons` LEFT JOIN `ab_bodies` USING (`BodyCode`) "; $query .= "WHERE `persons`.`PersonID`=".addslashes(get_int("id")); if( @mysql_num_rows( $res=doquery($query) )==1 ) { $row = mysql_fetch_array($res); $content = "
"; $content .= ""; $content .= ""; $content .= ""; $content .= ""; $content .= ""; if( $setup['SetupBoardApproval']=="yes" ) { if( $row["ParticipantType"]=="-" ) { $content .= ""; }else { $content .= ""; } $content .= ""; }else { $content .= ""; } $content .= ""; $content .= ""; $content .= ""; $content .= "
First name:".$row['FirstName']."
Family name:".$row['LastName']."
Body:".$row['BodyName']."
Participant type:-
Participant type:".$row["ParticipantType"]." (".$row["ParticipantOrder"].")
On members list:"; $acc=array_keys($OnMemList_img); for($i=0; $i
"; } $content .= "
"; $content .= "
"; $content .= "

"; $content .= ""; $content .= "\"\"/ Save"; $content .= ""; $content .= "

"; $popup = new Popup("Edit on memberlist", $content); $popup->setHeight(POPUP_HEIGHT)->setWidth(POPUP_WIDTH); echo $popup->createPopup(); }else { $content = "Error: unable to load the data. The person was not found."; $popup = new Popup("Edit accepted", $content); $popup->setHeight(POPUP_HEIGHT)->setWidth(POPUP_WIDTH); echo $popup->createPopup(); } }else { // Process data if( array_key_exists($_POST['MemberlistConfirmed'], $OnMemList_text) ) { // valid on member list status entered $query = "UPDATE `persons` SET `MemberlistConfirmed`='".addslashes($_POST['MemberlistConfirmed'])."', `Log`=CONCAT(`Log`,'\n".date("Y-m-d H:i:s").": set on member list status to ".addslashes($_POST['MemberlistConfirmed'])." by ".addslashes($_SESSION['sess_name'])."') WHERE `PersonID`=".addslashes(get_int('id')); if( doquery($query) ) { // query successfull $memberlistConfirmedField = new PersonsMemberlistConfirmed(); $img = $memberlistConfirmedField->display($_POST['MemberlistConfirmed'], get_int('id')); $response = new AjaxResponse(true); $response->addRefresh("MemberlistConfirmed_".get_int('id'), $img); header("Content-type: text/xml; charset=utf-8"); echo $response->createResponse(); }else { // query failed $response = new AjaxResponse(false); $response->addRefresh("popup_content", "Error: update failed"); header("Content-type: text/xml; charset=utf-8"); echo $response->createResponse(); } }else { // Invalid approved status entered $response = new AjaxResponse(false); $response->addRefresh("popup_content", "Error: unknown on member list status entered"); header("Content-type: text/xml; charset=utf-8"); echo $response->createResponse(); } } admin_footer(true, true); } ?>