"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 "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 "If you want to be on our email list, click on the Subscribe link above.\n"; echo " \n"; echo "\n"; 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 "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 "| "; echo ""; echo "$label | \n"; echo "";
$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 "$display
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 "| Change Personal Information | \n"; echo "Change Related Information | \n"; echo "
|---|---|
| \n"; // Submit action buttons at top of form 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";
echo "
\n"; echo "
\n"; echo "\n"; if ( $_SESSION['access_level'] >= $INDEXCFG['EDITLEVEL'] ) { show_journal_history($xxx_id, 'xxx'); } 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 ""; // DEVONLY echo "
Headshotdir: $JJNCFG[HEADSHOTDIR]\n"; // DEVONLY print_r($Photo); // DEVONLY echo "
| View Photos, Etc. | \n"; echo "View Personal Information | \n"; echo "View Related Information | \n"; //-------------------------------------------------------------- // Left Margin Column: Photos and Role Info //-------------------------------------------------------------- echo "|||
|---|---|---|---|---|---|
| ";
//---------------
// 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 "" . $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 "" . $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 "
$esql \n"; // DEVONLY $eresult = $dbh->query($esql); $erowcount = $eresult->rowCount(); $ev = array(); if ( $erowcount > 0 ){ echo "\n"; echo "Events Attended\n"; echo "
No Attended Events \n"; // DEVONLY } echo " | \n";
//------------------------------------------------------------
// Middle Column
//------------------------------------------------------------
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";
//
// 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 "
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 "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 //---------------------------------------------------------------- ?>