"Jumping Jerry Productions", 'BANNER2' => "Music, Karaoke, Couples Dancing Events", 'TITLE' => "DJ Jumping Jerry: Music, Karaoke, Couples Dancing", 'MODULENAME' => "index.phpx", 'NAV1' => "INFO" // Level 1 menu navigation group ); //------------------------------------------------------------------------ // Local configuration parameters //------------------------------------------------------------------------ $INDEXCFG = array ( 'ADMINLEVEL' => '6', 'EDITLEVEL' => '5', ); global $INDEXCFG; //------------------------------------------------------------------------ // BEGIN Program //------------------------------------------------------------------------ spew_header($FMT); if (!in_array('Action', $_REQUEST)) { $_REQUEST['Action'] = 'Default'; } if (array_key_exists('Action', $_REQUEST)) { //---------------------------------------------------------------------- // Default //---------------------------------------------------------------------- if ($_REQUEST['Action'] == "Default" ) { $dbh = jjn_pdo_connect(); echo "
\n"; echo "\n"; echo "\n"; echo "
\n"; echo "

Thursdays Happy Hour Couples Dancing at Swiss Park Is On Summer Vacation

\n"; echo "Due to other life committments and the fact that the ballroom hall\n"; echo "does not have air conditioning, my Thursday evenings dances at Swiss Park are on summer vacation.\n"; echo "That, of course, does not need to prevent you from stopping in to\n"; //echo "Come join us at \n"; echo " \n"; echo "Swiss Park, located just north of Fremont \n"; echo "\n"; echo "right off I-880 at the Mowry Exit\n"; echo "\n"; //echo "on Thursday Evenings. We will be there from 5PM - 9PM. Come and have a nice dinner and join us for ballroom dancing.\n"; echo "to have a nice dinner and check the place out.\n"; //echo "

\n"; //echo "Sad news, the April 27 dance will be the last scheduled Jumping Jerry Happy Hour dance\n"; //echo "as I am\n"; //echo "discontinuing playing music on Thursday nights at Swiss Park. I have enjoyed all the support\n"; //echo "and meeting new dance friends and feeling even more at home at Swiss Park.\n"; //echo "

\n"; echo "

\n"; echo "Among my summer projects is to finish up my idea of a dancer's favorite tool,\n"; echo "an online master dance calendar for ballroom and couple dancing.\n"; echo "I will be putting the finishing touches on Dance Calendar US \n"; echo "with a targeted launch\n"; echo "of June 1. If you want to be an early user (and especially contributer to adding events\n"; echo "so we can get away from a dozen email lists each) click on the \n"; echo "feedback link and I will give you an account.\n"; echo "Otherwise, see what is happening "; echo "this month\n"; echo "or this week\n"; echo "on Dance Calendar US master calendar.\n"; echo "

\n"; //echo "

\n"; //echo "Note: As always, the schedule may change, please check here for the latest information.\n"; //echo "

\n"; //echo "

\n"; //echo "

Polka

\n"; //echo "Several people have noted they love to have a lesson with the dance and\n"; //echo "really enjoy Gary's lessons on the Cowboy Cha-Cha. Well, for the last April\n"; //echo "dance, we will have Gary teaching the Cowboy Cha-Cha again and a special treat\n"; //echo "inspired by Jumping Jerry's formative years in Erie, PA and his family's\n"; //echo "move to Wisconsin, we will be also having a lesson on the Polka\n"; //echo "

\n"; //echo "Here are a few resources to get your started. The Polka class will start at 7PM\n"; //echo "

\n"; //echo "

\n"; // echo "

\n"; echo "If you want to be on our email list, click on the Subscribe link above.\n"; echo "

\n"; echo "\n"; echo "
\n"; echo "
\n"; spew_footer($FMT); exit; } //---------------------------------------------------------------------- //spew_query_form(); echo "
\n";		// DEVONLY
		print_r($_REQUEST);	// DEVONLY
		echo "
\n"; // DEVONLY //---------------------------------------------------------------------- // New Entry Form //---------------------------------------------------------------------- if ($_REQUEST['Action'] == "New" || $_REQUEST['Action'] == "Register" || $_REQUEST['Action'] == "Add Venue Contact" ) { $menulist = array(); $ALLFIELD = array(); $ALLFIELD = $NEWFIELD; $dbh = jjn_pdo_connect(); $Default = array ( 'xxx_state' => 'New', 'xxx_status' => 'Active', 'xxx_type' => 'Dancer', 'home_state' => 'CA', 'member_type' => 'Guest', ); if ($_REQUEST['Action'] == "Add Venue Contact" ) { $Default['xxx_type'] = 'Vendor'; $Default['member_type'] = 'Non-Member'; } // Blurb echo "

\n"; echo "Enter entries. Details on meanings and choice details available via help links in left column.\n"; echo "Asterisk (*) indicates field is required.\n"; echo "

\n"; echo "
\n"; echo "
\n"; echo "\n"; $fieldlabel = get_field_labels('xxx','xxx',$JJNCFG['DBNAME']); $fieldlabel['dob'] = 'Birth Date (YYYY-MM-DD)'; $fieldlabel['xxx_height'] = 'Height in inches
(5 feet is 60 inches)'; foreach ($ALLFIELD as $fieldname ) { if ( $fieldname == 'xxx_id'){ continue; } $val = $fieldlabel[$fieldname]; echo "\n"; echo "\n"; echo "\n"; } echo "
"; echo ""; echo "$val"; if ( isset($RequiredField[$fieldname]) ){ echo ' * '; } echo ""; $what = ''; $choose = 'Choose'; if (!in_array($_REQUEST[$fieldname], $InValidChoice)) { $what = $_REQUEST[$fieldname]; $choose = $what; }else{ if (isset($Default[$fieldname])){ $what = $Default[$fieldname]; $choose = $what; } } if (array_key_exists($fieldname, $FieldType)) { if ( $FieldType[$fieldname] == "Menu" ) { $menusql = $Menu[$fieldname]; $menulist = get_menu($menusql); sort($menulist); spew_select_menu($fieldname, $what,$choose,$menulist); if (in_array($fieldname, $EXTEND)) { echo "-OR- "; } } if ($FieldType[$fieldname] == "MenuArray" ) { $menusql = $Menu[$fieldname]; $menulist = get_menu_array($menusql); $menulist['Choose'] = 'Choose'; spew_select_hash_menu($fieldname, $what,$choose,$menulist); } if ($FieldType[$fieldname] == "Template" ) { $menusql = "SELECT xxx_id, full_name from xxx where xxx_id > 100 order by full_name"; $menulist = get_menu_array($menusql); $menulist[0] = 'None'; spew_select_hash_menu($fieldname, $what,$choose,$menulist); } if ($FieldType[$fieldname] == "TextArea" ) { echo "\n"; } if ($FieldType[$fieldname] == "LongText" ) { echo ""; } }else{ echo ""; } echo "
\n"; echo "

I prefer to work with humans, please enter the numbers shown in the below 'captcha' image into the box below:

\n"; echo "

\"Captcha

\n"; echo "

\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; }//End if ($_REQUEST['Action'] == "New" ) //---------------------------------------------------------------------- // Show: My Info //---------------------------------------------------------------------- if ($_REQUEST['Action'] == "Show") { echo "

Entering Show Function with ID of $_REQUEST[xxx_id]

\n"; // DEVONLY if ( array_key_exists('xxx_id', $_SESSION)) { if ( isset ( $_SESSION['xxx_id'] ) ) { $xxx_id = $_SESSION['xxx_id']; }else{ die ("No Template ID in Show function") ; } if ( ! is_numeric($xxx_id) ) { die ("Template ID ($xxx_id) is not an integer.") ; } }else{ die ("No Template Id Set") ; } // // Get Template roster for partner id // $Who = array(); $sql = "SELECT xxx_id, full_name from xxx"; $Who = get_menu_array($sql); $menulist = array(); $row = array(); $dbh = jjn_pdo_connect(); $sql = 'SELECT * FROM xxx WHERE xxx_id = '; $sql .= $dbh->quote($xxx_id); echo "

$sql

\n"; // DEVONLY $result->query($sql); $row = $result->fetch(PDO::FETCH_ASSOC); $fieldlabel = get_field_labels('xxx','xxx',$JJNCFG['DBNAME']); // Blurb echo "

\n"; echo "Field explanation available via link in left column field labels.\n"; echo "Change them by clicking Edit button at bottom of page.\n"; echo "

\n"; echo "
\n"; echo "

$row[full_name]

\n"; echo "\n"; foreach ($ALLFLD as $fieldname ) { $label = $fieldlabel[$fieldname]; echo "\n"; echo "\n"; echo "\n"; echo "$display
"; echo "\n"; }//Endforeach fieldname echo "
"; echo ""; echo "$label"; $display = stripslashes($row[$fieldname]); // // View Entry Lookup Map Translations (id -> othertable.name for foreign keys) // if ( $fieldname == "partner_id" ) { $paid = $row[$fieldname]; $display = $Who[$paid]; } echo "$display
"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo "
\n"; echo "
\n"; }//if ($_REQUEST['Action'] == "Show") //---------------------------------------------------------------------- // Edit //---------------------------------------------------------------------- if ($_REQUEST['Action'] == "Edit") { $SHOWEDIT = array(); if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { $SHOWEDIT = $ALLFIELD; }else{ $SHOWEDIT = array( 'full_name', 'gender', 'dance_role', 'first_name', 'last_name', 'nickname', 'birth_day', 'birth_year', 'birth_month', 'xxx_occupation', 'xxx_height', 'home_street', 'home_city', 'home_state', 'home_zip', 'home_country', 'email_1', 'email_2', 'primary_phone', 'mobile_phone', 'partner_id', 'member_type', 'intro_bio', ); } echo "

Entering Edit Function

\n"; // DEVONLY if ( array_key_exists('xxx_id', $_REQUEST)) { if ( isset($_REQUEST['xxx_id'] ) ) { $xxx_id = stripslashes( $_REQUEST['xxx_id']); }else{ die ("NO Template ID in edit function.") ; } if ( ! is_numeric($xxx_id) ) { die ("Template ID ($xxx_id) is not an integer.") ; } if ( $xxx_id <= 100 ) { die ("Template ID ($xxx_id) belongs to a special admin group and can not be edited via website.") ; } }else{ die ("No Template Id Set") ; } $dbh = jjn_pdo_connect(); // // Hardwire to update my stuff unless I have admin privileges // if ( $_SESSION['access_level'] < $INDEXCFG['EDITLEVEL'] ) { echo "

You only have permission to edit your own information\n"; $_REQUEST['xxx_id'] = $_SESSION['xxx_id']; $NoEdit[] = 'xxx_status'; $NoEdit[] = 'couple_id'; //$NoEdit[] = 'partner_id'; $NoEdit[] = 'headshot_url'; $NoEdit[] = 'xxx_source'; $NoEdit[] = 'member_type'; $NoEdit[] = 'member_status'; $NoEdit[] = 'xxx_type'; $NoEdit[] = 'vaccination_record'; $NoEdit[] = 'latitude'; $NoEdit[] = 'longitude'; $NoEdit[] = 'headshot_url'; $NoShow = array( 'headshot_url', 'is_vaccinted', 'couple_id', 'vaccination_record', 'privacy_ack', 'headshot_url', 'xxx_id', 'xxx_source', 'latitude', 'longitude', 'alternate_email', 'home_country', ); } $menulist = array(); $Me = array(); $sql = "SELECT * FROM xxx WHERE xxx_id = '$xxx_id'"; echo "

$sql

\n"; // DEVONLY $result = $dbh->query($sql); $Me = $row = $result->fetch(PDO::FETCH_ASSOC); $Who = array(); $sql = "SELECT xxx_id, full_name from xxx where xxx_id > 100"; echo "

$sql

\n"; // DEVONLY $Who = get_menu_array($sql); $fieldlabel = get_field_labels('xxx','xxx',$JJNCFG['DBNAME']); // Blurb echo "

\n"; echo "Change desired entries and click Update at bottom of form.\n"; echo "

\n"; echo "
\n"; // Outer table echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Change Personal InformationChange Related Information
\n"; // Submit action buttons at top of form echo "
\n"; echo "\n"; if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] || $_SESSION['xxx_id'] == $xxx_id) { echo "\n"; } echo "\n"; echo "\n"; foreach ($ALLFIELD as $fieldname ) { if ( ! in_array($fieldname, $SHOWEDIT ) ){ continue; } $label = $fieldlabel[$fieldname]; echo "\n"; echo "\n"; }//Endforeach fieldname echo "
"; echo ""; echo "$label"; echo ""; echo ""; if ( in_array($fieldname, $NoEdit) ) { if ( $fieldname == 'partner_id' ){ $ppid = $row[$fieldname]; echo "$Who[$ppid]\n"; }else{ echo "$row[$fieldname]
"; } }else{ if (array_key_exists($fieldname, $FieldType)) { if ( $FieldType[$fieldname] == "Menu" ) { $menusql = $Menu[$fieldname]; $menulist = get_menu($menusql); spew_select_menu($fieldname, $row[$fieldname],'',$menulist); if (in_array($fieldname, $EXTEND)) { echo "-OR- "; } } if ($FieldType[$fieldname] == "MenuArray" ) { $menusql = $Menu[$fieldname]; $menulist = get_menu_array($menusql); spew_select_hash_menu($fieldname, $row[$fieldname],'',$menulist); } if ( $FieldType[$fieldname] == "TextArea" ) { echo "\n"; } if ( $FieldType[$fieldname] == "LongText" ) { echo "\n"; } // Partner if ( $FieldType[$fieldname] == "Partner" ) { $ppid = $row[$fieldname]; $menulist = array(); $menusql = "SELECT xxx_id, full_name from xxx where xxx_id > 100 "; if ($row['dance_role'] == 'Lead' ){ $menusql .= " AND ( dance_role = 'Follow' OR dance_role = 'Both')"; } if ($row['dance_role'] == 'Follow' ){ $menusql .= " AND ( dance_role = 'Lead' OR dance_role = 'Both')"; } $menusql .= " order by full_name"; $menulist = get_menu_array($menusql); $menulist[0] = 'None'; spew_select_hash_menu($fieldname, $ppid, $ppid, $menulist); } }else{ // No fieldtype echo "
"; } }//Endif NoEdit echo "
\n"; // SECURITY if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] || $_SESSION['xxx_id'] == $xxx_id) { echo "\n"; //if ( $_SESSION['xxx_id'] == $xxx_id) { //echo "\n"; //} } echo "\n"; if ( isset ( $_REQUEST['NextAction'] ) ) { echo "\n"; } echo "
\n"; echo "
\n"; // Second Column of outer table echo "

"; echo "For more information, see "; echo "\n"; echo "Overview

\n"; manage_contacts('xxx',$xxx_id,'Yes'); manage_organizations('xxx',$xxx_id,'Yes'); manage_venues('xxx',$xxx_id,'Yes'); echo "
\n"; // // Add Journal History // echo "

\n"; echo "

\n"; echo "\n"; echo "\n"; echo "\n"; if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { echo "\n"; } echo "
\n"; echo "

\n"; if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { show_journal_history($xxx_id, 'xxx'); } echo "
\n"; }//if ($_REQUEST['Action'] == "Edit") //---------------------------------------------------------------------- // View Verify //---------------------------------------------------------------------- if ($_REQUEST['Action'] == "View" || $_REQUEST['Action'] == "Verify") { $SHOWVIEW = array(); if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { $SHOWVIEW = $ALLFIELD; }else{ $SHOWVIEW = $SHOW; $SHOWVIEW[] = 'dance_role'; $SHOWVIEW[] = 'partner_id'; } // // I am looking at my stuff: Hardwire to me // if ( $_REQUEST['Action'] == "Verify" || $Me['xxx_id'] == $_SESSION['xxx_id']){ $xxx_id = $_REQUEST['xxx_id'] = $_SESSION['xxx_id']; $SHOWVIEW[] = 'home_street'; $SHOWVIEW[] = 'home_state'; $SHOWVIEW[] = 'home_zip'; $SHOWVIEW[] = 'primary_phone'; $SHOWVIEW[] = 'mobile_phone'; $SHOWVIEW[] = 'email_1'; } $SHOWVIEW = array_unique( $SHOWVIEW ) ; if ( array_key_exists('xxx_id', $_REQUEST)) { if ( isset ( $_REQUEST['xxx_id'] ) ) { $xxx_id = $_REQUEST['xxx_id']; }else{ die ("No Template ID in view function") ; } if ( ! is_numeric($xxx_id) ) { die ("Template ID ($xxx_id) is not an integer.") ; } }else{ die ("No Template Id Set in View Function") ; } $menulist = array(); $row = array(); $dbh = jjn_pdo_connect(); // // Get Template roster for partners // $Who = array(); $sql = "SELECT xxx_id, full_name from xxx WHERE xxx_id > 100"; echo "

$sql

\n"; // DEVONLY $Who = get_menu_array($sql); $menulist = array(); $row = array(); $dbh = jjn_pdo_connect(); // // Get info about this person // $Me = array(); $sql = "SELECT p.* FROM xxx p"; $sql .= " WHERE "; $sql .= " p.xxx_id = "; $sql .= $dbh->quote($xxx_id); echo "

$sql

\n"; // DEVONLY $meresult = $dbh->query($sql); $Me = $meresult->fetch(PDO::FETCH_ASSOC); $partner_id = $Me['partner_id']; $fieldlabel = get_field_labels('xxx','xxx',$JJNCFG['DBNAME']); // // Figure out photos directory // $Photo = array(); $Photo = scandir($JJNCFG['HEADSHOTDIR']); echo "
";		// DEVONLY
			echo "Headshotdir: /var/www/jjn-html/photos/headshots\n";	// DEVONLY
			echo "
Headshotdir: $JJNCFG[HEADSHOTDIR]\n"; // DEVONLY print_r($Photo); // DEVONLY echo "
"; // DEVONLY echo "
\n"; echo "

$Me[full_name]

\n"; $row = array(); $sql = "SELECT * from xxx WHERE xxx_id = $_REQUEST[xxx_id] "; $result = $dbh->query($sql); $row = $result->fetch(PDO::FETCH_ASSOC); $fieldlabel = get_field_labels('xxx','xxx',$JJNCFG['DBNAME']); // Outer table //echo "\n"; echo "
\n"; //echo "
\n"; echo "\n"; echo "\n"; echo "\n"; //-------------------------------------------------------------- // Left Margin Column: Photos and Role Info //-------------------------------------------------------------- echo "\n"; //------------------------------------------------------------ // Middle Column //------------------------------------------------------------ echo "\n"; echo "\n"; echo "
View Photos, Etc.View Personal InformationView Related Information
"; //--------------- // Me //--------------- echo "

" . $Me['full_name'] . "

\n"; if ( isset( $Me['headshot_url']) ){ // // Is my photo in the library? // echo "

My Photo: $Me[headshot_url]

\n"; // DEVONLY $dirs = explode('/', $Me['headshot_url']); $headshot = end($dirs); echo "

Url has $headshot

\n"; // DEVONLY //if ( in_array($headshot, $Photo) && in_array('headshot', $ALLFLD) ){ if ( in_array($headshot, $Photo) ){ echo ""; }else{ if ( $Me['gender'] == 'M' ){ echo ""; }else{ echo ""; } } }else{ $headshot = strtolower($Me['full_name']) . '.jpg'; $headshot = preg_replace('/\s+/', '_' , $photo); if ( in_array($headshot, $Photo) && in_array('headshot', $ALLFLD) ){ //if ( in_array($headshot, $Photo) ){ echo ""; }else{ if ( $Me['gender'] == 'M' ){ echo ""; }else{ echo ""; } } } //--------------- // Partner //--------------- echo "

" . $Me['couple_type'] . "

\n"; if ( $partner_id > 100 ){ // // Is my partners' database entry of their photo url present in file system? // if ( isset($Partner['headshot_url'] ) ){ // // Check Photo Visibility Preference of Partner // $psql = "SELECT preference_value from mypreference where xxx_id = $partner_id "; if ($_SESSION['access_level'] < 3 ){ $psql .= " AND preference_id = 202 "; }else{ $psql .= " AND preference_id = 302 "; } $photo_yn = get_value($psql); echo "

[$psql] [$photo_yn]

\n"; // DEVONLY $dirs = explode('/', $Partner['headshot_url']); $headshot = end($dirs); echo "

Partner Url has $headshot

\n"; // DEVONLY if ( in_array($headshot, $Photo) && $photo_yn == 'Yes' ){ echo ""; }else{ if ( $Partner['gender'] == 'M' ){ echo ""; }else{ echo ""; } } }else{ if ( $Me['gender'] == 'M' ){ echo ""; }else{ echo ""; } } echo "

" . $Partner['full_name'] . "

\n"; } //-------------------- // Leadership Roles //-------------------- $pid = $Me['xxx_id']; $today = date('Y-m-d'); $CurrentRole = array(); $rsql = "SELECT t.xxx_id, t.role_id, r.role_name, t.start_date, t.end_date "; $rsql .= " FROM roleterm t, role r "; $rsql .= " WHERE xxx_id = "; $rsql .= $dbh->quote($xxx_id); $rsql .= " AND r.role_id = t.role_id "; $rsql .= " ORDER BY end_date desc"; echo "

$rsql

\n"; // DEVONLY $rresult = $dbh->query($rsql); $rowcount = $rresult->rowCount(); echo "

Current Role Count: $rowcount

\n"; // DEVONLY $job = array(); if ( $rowcount > 0){ echo "
\n"; echo "Club Offices"; echo "\n"; echo ""; echo "
"; echo "
    "; while ($job = $rresult->fetch(PDO::FETCH_ASSOC)){ $rid = $job['role_id']; echo "
  • \n"; echo "$job[role_name]"; echo "
    • $job[start_date] to $job[end_date]
    "; echo "
  • \n"; } echo "
"; echo "
\n"; } // //------------------------- // Get Attendance record //------------------------- // $esql = "SELECT e.event_id, e.event_date, e.event_name, a.attendee_status "; $esql .= " FROM attend a, event e "; $esql .= " WHERE a.event_id = e.event_id "; $esql .= " AND a.xxx_id = "; $esql .= $dbh->quote($xxx_id); $esql .= " ORDER BY e.event_date DESC"; echo "

$esql

\n"; // DEVONLY $eresult = $dbh->query($esql); $erowcount = $eresult->rowCount(); $ev = array(); if ( $erowcount > 0 ){ echo "
\n"; echo "Events Attended\n"; echo "

\n"; while ($ev = $eresult->fetch(PDO::FETCH_ASSOC)){ $date = $ev['event_date']; $eid = $ev['event_id']; $name = $ev['event_name']; $status = $ev['attendee_status']; echo "\n"; } echo "
$date"; echo "\n"; echo "$name"; if (preg_match('/^Guest/', $status)){ echo " (G)"; } echo "

\n"; }else{ echo "

No Attended Events

\n"; // DEVONLY } echo "
\n"; // Blurb echo "

\n"; echo "Field explanation available via link in left column field labels.\n"; echo "

\n"; // Inner left column table echo "
\n"; echo "\n"; foreach ($ALLFIELD as $fieldname ) { if (in_array($fieldname, $SHOWVIEW)) { $label = $fieldlabel[$fieldname]; echo "\n"; echo "\n"; echo "\n"; }//Endforeach in_array }//Endforeach fieldname echo "
"; echo ""; echo "$label"; $display = stripslashes($row[$fieldname]); if ( $fieldname == "partner_id" ) { $paid = $Me[$fieldname]; $display = "$Who[$paid]"; } if ( $fieldname == "email_1" || $fieldname == "email_2" ) { $display = "$display"; } echo "$display
"; echo "
\n"; echo "\n"; echo "\n"; if ( $_REQUEST['Action'] == "Verify" || $Me['xxx_id'] == $_SESSION['xxx_id']){ echo "\n"; } if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] || $_SESSION['xxx_id'] == $xxx_id) { echo "\n"; } echo "
\n"; echo "
\n"; // // Third Column of outer table, Related Entities // echo "

"; echo "For more information, see "; echo "\n"; echo "Overview

\n"; manage_contacts('xxx',$xxx_id,'No'); manage_organizations('xxx',$xxx_id,'No'); manage_venues('xxx',$xxx_id,'No'); echo "
\n"; echo "\n"; echo "\n"; echo "\n"; // // Show Journal History // if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { show_journal_history($xxx_id, 'xxx'); } echo "
\n"; }//if ($_REQUEST['Action'] == "View" || $_REQUEST['Action'] == "Verify" ) //---------------------------------------------------------------------- // END 'Action' Processing Options //---------------------------------------------------------------------- }else{ // No Action Field spew_query_form(); } spew_footer($FMT); //---------------------------------------------------------------- // Function spew_query_form //---------------------------------------------------------------- function spew_query_form() { echo "

Entering spew_query_form

\n"; // DEVONLY global $JJNCFG; global $INDEXCFG; $list = array(); $dbh = jjn_pdo_connect(); echo "

"; echo "Help and explanations available at "; echo "Overview."; echo "

\n"; echo "
\n"; echo "
\n"; // First Table echo "\n"; echo "\n"; echo "\n"; if ($_SESSION['access_level'] >= $INDEXCFG['ADMINLEVEL'] ) { echo "\n"; echo "\n"; } echo "\n"; // Second Row echo "\n"; // First Name echo "\n"; // Last Name echo "\n"; // Member Status if ($_SESSION['access_level'] >= $INDEXCFG['ADMINLEVEL'] ) { echo "\n"; } // Event Attendance if ($_SESSION['access_level'] >= $INDEXCFG['ADMINLEVEL'] ) { echo "\n"; } // Sort By echo "\n"; echo "\n"; echo "
First NameLast NameMember StatusAttendedSort By
\n"; $sql = "SELECT DISTINCT first_name from xxx order by first_name"; $list = get_menu($sql); spew_select_menu('first_name','','All',$list); echo "\n"; $sql = "SELECT DISTINCT last_name from xxx order by last_name"; $list = get_menu($sql); spew_select_menu('last_name','','All',$list); echo "\n"; $sql = "SELECT distinct member_status from xxx order by xxx_type" ; $list = get_menu($sql); spew_select_menu('member_status','All','All',$list); echo "\n"; $sql = "SELECT distinct event_id, event_name from event"; $list = get_menu_array($sql); $list['All'] = 'All'; spew_select_hash_menu('event_id','All','All',$list); echo "\n"; $sortby = array ( 'First Name', 'Last Name', 'Couple', 'Member Type', 'City', 'Zip', 'Member Status', ); if ($_SESSION['access_level'] >= $INDEXCFG['ADMINLEVEL'] ) { $sortby[] = 'Couple Type'; // DEVONLY $sortby[] = 'Template Type'; // DEVONLY $sortby[] = 'Venue'; // DEVONLY $sortby[] = 'Organization'; // DEVONLY } sort($sortby); spew_select_menu('Sortmeby','','First Name',$sortby); echo "
\n"; // // Advance Search Capability // if ($_SESSION['access_level'] >= $INDEXCFG['ADMINLEVEL'] ) { echo "

Advanced Search Options

\n"; // DEVONLY echo "\n"; // DEVONLY echo "\n"; // DEVONLY echo "\n"; // DEVONLY // Fourth Row echo "\n"; // DEVONLY // Venue echo "\n"; // DEVONLY // Organization DEVONLY echo "\n"; // DEVONLY // Couple Type //echo "\n"; // DEVONLY echo "\n"; // DEVONLY } // End Table echo "\n"; echo "
VenueOrganization
\n"; // DEVONLY $sql = "SELECT distinct venue_id, venue_name from venue"; // DEVONLY $list = get_menu_array($sql); // DEVONLY $list['0'] = 'All'; // DEVONLY spew_select_hash_menu('venue_id','All','All',$list); // DEVONLY echo "\n"; // DEVONLY $sql = "SELECT distinct organization_id, organization_name from organization"; // DEVONLY $list = get_menu_array($sql); // DEVONLY $list['0'] = 'All'; // DEVONLY spew_select_hash_menu('organization_id','All','All',$list); // DEVONLY echo "\n"; // DEVONLY //$sql = "SELECT distinct couple_type from xxx order by couple_type" ; // DEVONLY //$list = get_menu($sql); // DEVONLY //spew_select_menu('couple_type','All','All',$list); // DEVONLY //echo "
\n"; // End Form echo "\n"; echo "\n"; echo "\n"; // SECURITY if ($_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { //echo "\n"; echo "\n"; echo "\n"; } echo "
\n"; echo "
\n"; }//End spew_query_form //---------------------------------------------------------------- // Generate Year List //---------------------------------------------------------------- function generate_year_array (){ echo "

Entering generate_year_array

\n"; // DEVONLY global $JJNCFG; global $INDEXCFG; $thisyear = date('Y'); $year = 1920; $yrs = array(); while ($year < $thisyear) { $yrs[] = $year; $year++; } return($yrs); }//End generate_year_array //---------------------------------------------------------------- // END FUNCTIONS //---------------------------------------------------------------- ?>