get_row ( $wpdb->prepare(‘select * from wp_mysl_event_sub where hash = %s’,$hash));
$email = $therow->emailAddress;
$website = $wpdb->get_var($wpdb->prepare(‘SELECT website FROM `wp_mysl_event_sub_tryouts` WHERE eventSubID = %d order by id desc limit 1’,$therow->id));
$clubName = $wpdb->get_var($wpdb->prepare(‘SELECT clubName FROM `wp_mysl_event_sub_tryouts` WHERE eventSubID = %d order by id desc limit 1’,$therow->id));
}
else if ($_GET[hash])
{
$hash = $_GET[hash];
$therow = $wpdb->get_row ( $wpdb->prepare(‘select * from wp_mysl_event_sub where hash = %s’,$hash));
$email = $therow->emailAddress;
$website = $wpdb->get_var($wpdb->prepare(‘SELECT website FROM `wp_mysl_event_sub_tryouts` WHERE eventSubID = %d order by id desc limit 1’,$therow->id));
$clubName = $wpdb->get_var($wpdb->prepare(‘SELECT clubName FROM `wp_mysl_event_sub_tryouts` WHERE eventSubID = %d order by id desc limit 1’,$therow->id));
}
if($_POST[‘SUBMIT’] && $_POST[eventInfoContactEmail] && $_POST[clubLeagueName] && $_POST[eventInfoContactName] )
{
$ageGroups = implode(‘, ‘, $_POST[‘AgeGroups’]);
if(!$hash) //We need to make the initial insert.
{
$hash = sha1($_POST[eventInfoContactEmail].date(“D M d, Y G:i:s”));
$wpdb->insert(
‘wp_mysl_event_sub’,
array(
‘hash’ => $hash,
’emailAddress’ => $_POST[eventInfoContactEmail],
‘submittedDate’ => date(“Y-m-d G:i:s”)
)
);
$mainSub = $wpdb->insert_id;
}
else
{
$mainSub = $wpdb->get_var(“select id from wp_mysl_event_sub where hash = ‘”.$hash.”‘”);
}
$query = $wpdb->prepare(“insert into wp_mysl_event_submissions (eventSubID,clubLeagueName, AgeGroups, Genders, eventDetails, eventLocation,
eventInfoContactEmail, eventInfoContactPhone, eventInfoContactName, eventInfoContactWebsite, eventDatesAndTimes,
dateSubmitted)
values (%d,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)”,
$mainSub,
$_POST[clubLeagueName],
$ageGroups,
$_POST[Gender],
$_POST[eventDetails],
$_POST[eventLocation],
$_POST[eventInfoContactEmail],
$_POST[eventInfoContactPhone],
$_POST[eventInfoContactName],
str_replace(“http://”,””,$_POST[eventInfoContactWebsite]),
$_POST[openHouseDate].’ ‘.$_POST[openHouseTime],
date(‘Y-m-d H:i:s’)
);
$successfullInsert = $wpdb->query($query);
}
if($hash)
{
$qry = $wpdb->prepare(“SELECT t.* from wp_mysl_event_sub wms join wp_mysl_event_submissions t on wms.id = t.eventSubID where wms.hash = ‘%s'”,
$hash);
$currentTryoutSubs = $wpdb->get_results($qry);
$hasOpenHouse = $wpdb->get_var($wpdb->prepare(“SELECT count(*) from wp_mysl_event_sub wms join wp_mysl_event_submissions t on wms.id = t.eventSubID where wms.hash = ‘%s'”,
$hash));
$hasTryouts = $wpdb->get_var($wpdb->prepare(“SELECT count(*) from wp_mysl_event_sub wms join wp_mysl_event_sub_tryouts t on wms.id = t.eventSubID where wms.hash = ‘%s'”,
$hash));
if($currentTryoutSubs)
{
echo(“Your Current Open House Submissions:”);
echo(“
Club | Dates/Times | Age | Gender | Event Details | Event Location |
---|---|---|---|---|---|
“.$curr->clubLeagueName.” | “.$curr->eventDatesAndTimes.” | “.$curr->AgeGroups.” | “.$curr->Genders.” | “.$curr->eventDetails.” | “.$curr->eventLocation.” |
“);
if($hasTryouts != ‘0’ && $hasOpenHouse != ‘0’)
{
$totalFee = “$150”;
}
else if ($hasTryouts != ‘0’ || $hasOpenHouse != ‘0’)
{
$totalFee = “$100”;
}
else
{
$totalFee = “$0”;
}
echo(“
The current fee for your submission is: “.$totalFee.”
“);
echo(“
Done with Open House, take me to the tryouts Form | Done with all submissions, click here to FINALIZE |
“);
}
}
$qry = $wpdb->prepare(“select distinct clubID, clubName from wp_mysl_clubs order by clubName”);
$clubs = $wpdb->get_results($qry);
?>
Please refer to the official MYSL Open House Rules HERE
The below form will allow you to submit a single or multiple open house events. After submitting this form, you will be able to submit additional open house events, tryout events, or finalize your submission. Information submitted will be lost unless finalize screen is not completed.
It is important that you supply a VALID email address with your submission(s). A PayPal invoice will be sent to this email address, requesting the fees associated with you submission. Failure to promptly pay the invoice within THREE days will result in the removal of your submission from the system.
The fees are as follows: $100 flat fee for any number of tryout dates. $100 flat fee for any number of open house dates. A $50 discount will be given for submitting both a tryout and an open house, making the total charge for both $150.
Items in bold are required fields.