global $DB; if($_SERVER["HTTPS"] != 'on'){ header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"]); exit; } @require_once("site.header.php"); // Sanitize Inputs // action (results | viewallresults | listevents | list) $good_list = array('results', 'viewallresults', 'listevents', 'list'); $_GET['action'] = forceenum($_GET, 'action', $good_list); //print("ACTION: " . $_GET['action']); // rid (int) $_GET['rid'] = forceint($_GET, "rid"); //print("RID: " . $_GET['rid']); // group (Sporting | etc.. ) $good_list = array("Sporting", "Hound", "Working", "Terrier", "Toy", "Non-Sporting", "Herding", "Junior", "Group Results", "Obedience"); // get_dog_groups(); $_GET['group'] = forceenum($_GET, 'group', $good_list); //print("Group: " . $_GET['group']); // sid (int) $_GET['sid'] = forceint($_GET, "sid"); // eid (int) $_GET['eid'] = forceint($_GET, "eid"); ?>
if(!isset($_GET["action"])){
if(preg_match("/bayray/i",$_SERVER["HTTP_REFERER"])){
echo "
To find the placement results of interest to you, click on the listing of recently completed shows/events provided on this page. Results are usually posted within 7 days of the show/event date."; }else{ echo " |
|
$all = 1;
if(!isset($_GET["action"]))
$_GET["action"] = "list";
switch($_GET["action"]){
default:
$get_shows = baray_query("SELECT DISTINCT r.tid_dshow,s.name,s.id FROM result r,dshow s WHERE s.id=r.tid_dshow GROUP BY r.tid_dshow ORDER BY r.tid_dshow DESC");
if($shows = @mysqli_fetch_row($get_shows)){
#echo " View All Shows "; do{ $get_show_year = baray_query("SELECT date FROM event WHERE tid_dshow='" . baray_escape($shows[2]) . "' LIMIT 1"); $sh_y = date("Y",mysqli_result($get_show_year,0)); $sh_m = date("m",mysqli_result($get_show_year,0)); // $sh_res[year][month][s.name] = tid_dshow; $sh_res[$sh_y][$sh_m][$shows[2]] = $shows[1]; }while($shows = @mysqli_fetch_row($get_shows)); // Special code to add the Package Shows. $mRS = baray_query("SELECT DISTINCT id, name, (SELECT date FROM event WHERE tid_dshow = dshow.id ORDER BY id LIMIT 1) as show_date FROM dshow WHERE results_override != ''"); if($mRS != false) { if(mysqli_num_rows($mRS) > 0) { while($mR = mysqli_fetch_assoc($mRS)) { $sh_y = date("Y",$mR["show_date"]); $sh_m = date("m",$mR["show_date"]); // $sh_res[year][month][s.name] = tid_dshow; $sh_res[$sh_y][$sh_m][$mR["id"]] = $mR["name"]; } } } krsort($sh_res); reset($sh_res); $last_month = 0; //while(list($rkey,$rval) = each($sh_res)){ foreach($sh_res as $rkey => $rval) { echo "
"; } }else echo " ATTENTION: THESE RESULTS ARE FOR " . $get_year . ". FOR A FULL LIST OF CURRENT RESULTS CLICK HERE. "; else $hd_msg = ""; echo " "; if(trim($results_override) == "") { $get_events = baray_query("SELECT id,name,date FROM event WHERE tid_dshow='" . baray_escape($_GET["sid"]) . "' ORDER BY sort_order"); if($events = @mysqli_fetch_row($get_events)){ do{ $one_breed = 0; $chk_for_one_breed = baray_query("SELECT DISTINCT tid_bgroup FROM entry WHERE tid_event='" . baray_escape($events[0]) . "'"); if(mysqli_num_rows($chk_for_one_breed) == 1) $one_breed = 1; echo " "; $get_shows = baray_query("SELECT g.name,r.id FROM bgroup g,result r WHERE r.tid_event='" . baray_escape($events[0]) . "' AND r.class_type='0' AND g.id=r.tid_bgroup GROUP BY r.id ORDER BY g.sort_order ASC"); if($shows = @mysqli_fetch_row($get_shows)){ echo "
"; } echo "
"; }while($events = @mysqli_fetch_row($get_events)); }else echo " FOR A FULL LIST OF CURRENT RESULTS CLICK HERE. "; else $hd_msg = ""; $get = baray_query("SELECT e.name,s.name,e.date FROM event e,dshow s WHERE e.id='" . baray_escape($_GET["eid"]) . "' AND s.id='" . baray_escape($_GET["sid"]) . "'"); $got = @mysqli_fetch_row($get); echo " $got[0] " . date("l, M jS Y",$got[2]) . " " . $_GET["group"] . ""; $grp_lu = baray_query("SELECT id FROM image WHERE note='First In Group (" . baray_escape($_GET["group"]) . ")'"); if(@mysqli_num_rows($grp_lu) > 0){ $grp = @mysqli_result($grp_lu,0); $check_for_im = baray_query("SELECT id,note FROM image WHERE tid_event='" . baray_escape($_GET["eid"]) . "' AND location='" . baray_escape($grp) . "'"); if(@mysqli_num_rows($check_for_im) > 0){ $im = @mysqli_fetch_row($check_for_im); $size = getimagesize("images/ios/" . $im[0] . ".jpg"); echo "
"; if(file_exists($_SERVER["DOCUMENT_ROOT"] . "/results/" . $_GET["rid"] . ".html")) @include("results/" . $_GET["rid"] . ".html"); else echo " Be Sure to indicate show and group. $got[0] "; $get_res = baray_query("SELECT r.id,r.tid_bgroup,g.name,g.sort_order FROM result r,bgroup g WHERE r.tid_dshow='" . baray_escape($_GET["sid"]) . "' AND r.tid_event='" . baray_escape($_GET["eid"]) . "' AND r.class_type='0' AND g.id=r.tid_bgroup ORDER BY g.sort_order ASC"); if($res = @mysqli_fetch_row($get_res)){ do{ if(file_exists("results/" . $res[0] . ".html")){ echo " "; }else echo " Be Sure to indicate show and group. "; }else echo " Be Sure to indicate show and group. "; }else echo " Be Sure to indicate show and group. |