/*This code is triggered if the user selects BOTH TO and FROM INCLUDE VALUES */ function includeBothRtn(){ Switch ($_GET[dropValue]){ case 1: $valueSelected = "ngc_designation"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "RNGC Number Ascending."; $_SESSION[IncludeLabelText] = "Currently Including RNGC Number from:  " . $_GET[fromIn] . "  to:  " . $_GET[toIn]; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 2: $valueSelected = "ra_hour"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Right Ascension Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Right Ascension from:  " . $_GET[fromIn] . "  to:  " . $_GET[toIn]; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[B1] = "#FFFF99"; $_SESSION[B2] = "#FFFF99"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 3: $valueSelected = "x_pos"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "X Position Ascending."; $_SESSION[IncludeLabelText] = "Currently Showing X Position from:  " . $_GET[fromIn] . "  to:  " . $_GET[toIn]; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#FFFF99"; $_SESSION[D2] = "#FFFF99"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 4: $valueSelected = "mag"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Magnitude Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Magnitude from:  " . $_GET[fromIn] . "  to:  " . $_GET[toIn]; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#FFFF99"; $_SESSION[E2] = "#FFFF99"; break; } $valueFrom = $_GET[fromIn]; $valueTo = $_GET[toIn]; if (((is_numeric($valueFrom)) and (is_numeric($valueTo))) and (($valueFrom >= 1) and ($valueTo <= 7840)) and ($valueFrom <= $valueTo)) { $_SESSION[valueTo] = $valueTo; $_SESSION[valueFrom]=$valueFrom; $_SESSION[valueSelected] = $valueCriteriaOne . $valueSelected; $_SESSION[sortSelected] = $sortSelected; } else { $_SESSION[inputErrorFlag] = 1; $_SESSION[valueFrom] = 1; $_SESSION[valueTo] = 7840; $_SESSION[valueSelected] = "rngc_objects." . "ngc_designation"; $_SESSION[sortSelected] = "ngc_designation"; $_SESSION[IncludeLabelText] = "Data Input Error -- Database Reset"; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Catalog Number Ascending."; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; } $numSort ="both"; $row_start = 0; queryRngcDb($row_start, $_SESSION[sortSelected], $_SESSION[detFlag], $_SESSION[valueSelected], $_SESSION[valueFrom], $_SESSION[valueTo]); } /*This code is triggered if the user selects TO INCLUDE VALUES */ functionincludeToRtn(){ Switch ($_GET[dropValue]){ case 1: $valueSelected = "ngc_designation"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "RNGC Number Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Catalog Number to:   $_GET[toIn]"; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 2: $valueSelected = "ra_hour"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Right Ascension Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Right Ascension to:   $_GET[toIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[B1] = "#FFFF99"; $_SESSION[B2] = "#FFFF99"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 3: $valueSelected = "x_pos"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "X Position Ascending."; $_SESSION[IncludeLabelText] = "Currently Including X Position to:   $_GET[toIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#FFFF99"; $_SESSION[D2] = "#FFFF99"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 4: $valueSelected = "mag"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Magnitude Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Magnitude to:   $_GET[toIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#FFFF99"; $_SESSION[E2] = "#FFFF99"; break; default: echo "DEFUALT"; } $valueTo = $_GET[toIn]; if ((is_numeric($valueTo)) and ($valueTo >= 1) and ($valueTo <= 7840)) { $_SESSION[valueTo] = $valueTo; $_SESSION[valueSelected] = $valueCriteriaOne . $valueSelected; $_SESSION[sortSelected] = $sortSelected; } else { $_SESSION[inputErrorFlag] = 1; $_SESSION[valueFrom] = 1; $_SESSION[valueTo] = 7840; $_SESSION[valueSelected] = "rngc_objects." . "ngc_designation"; $_SESSION[sortSelected] = "ngc_designation"; $_SESSION[IncludeLabelText] = "Data Input Error -- Database Reset"; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "1Catalog Number Ascending."; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; } $numSort ="To Only"; $_SESSION[valueFrom] = $valueFrom; $row_start = 0; ************* queryRngcDb($row_start, $_SESSION[sortSelected], $_SESSION[detFlag], $_SESSION[valueSelected], $_SESSION[valueFrom], $_SESSION[valueTo]); } function includeFromRtn(){ /*This code is triggered if the user selects FROM INCLUDE VALUES */ Switch ($_GET[dropValue]){ case 1: $valueSelected = "ngc_designation"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "RNGC Number Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Catalog Number from:   $_GET[fromIn]"; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 2: $valueSelected = "ra_hour"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Right Ascension Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Right Ascension from:   $_GET[fromIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[B1] = "#FFFF99"; $_SESSION[B2] = "#FFFF99"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; break; case 3: $valueSelected = "x_pos"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "X Position Ascending."; $_SESSION[IncludeLabelText] = "Currently Including X Position from:   $_GET[fromIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#FFFF99"; $_SESSION[D2] = "#FFFF99"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; break; case 4: $valueSelected = "mag"; $valueCriteriaOne = "rngc_objects."; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Magnitude Ascending."; $_SESSION[IncludeLabelText] = "Currently Including Magnitude from:   $_GET[fromIn]"; $_SESSION[A1] = "#67aea6"; $_SESSION[A2] = "#88ffb0"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#FFFF99"; $_SESSION[E2] = "#FFFF99"; break; } $valueFrom = $_GET[fromIn]; $valueTo = $_GET[toIn]; if ((is_numeric($valueFrom)) and ($valueFrom >= 1) and ($valueFrom <= 7840) ){ $_SESSION[valueFrom] = $valueFrom; $_SESSION[valueSelected] = $valueCriteriaOne . $valueSelected; $_SESSION[sortSelected] = $sortSelected; } else { $_SESSION[inputErrorFlag] = 1; $_SESSION[valueFrom] = 1; $_SESSION[valueTo] = 7840; $_SESSION[valueSelected] = "rngc_objects." . "ngc_designation"; $_SESSION[sortSelected] = "ngc_designation"; $_SESSION[IncludeLabelText] = "Data Input Error -- Database Reset"; $_SESSION[sortLabelText] = "Currently Sorting on:" . "
" . "Catalog Number Ascending."; $_SESSION[A1] = "#FFFF99"; $_SESSION[A2] = "#FFFF99"; $_SESSION[B1] = "#67aea6"; $_SESSION[B2] = "#88ffb0"; $_SESSION[C1] = "#67aea6"; $_SESSION[C2] = "#88ffb0"; $_SESSION[D1] = "#67aea6"; $_SESSION[D2] = "#88ffb0"; $_SESSION[E1] = "#67aea6"; $_SESSION[E2] = "#88ffb0"; } $numSort = "from Only"; $sortSelected = ""; $_SESSION[sortSelected] = $sortSelected; $valueTo = ""; $row_start = 0; }