# Get URL parameters $board = $_GET['board']; $_SESSION['board'] = $board; # Language include ("$_SERVER[DOCUMENT_ROOT]/includes/config.inc.php"); $_SESSION['language'] = LANGUAGE; ?>
$base = $_SERVER[DOCUMENT_ROOT]; $code = "$base/../code"; include("$base/includes/header.html"); include_once "$code/translate.inc.php"; include_once "$code/graphics.inc.php"; include_once "$code/config.inc.php"; # Extract default board specifications from the database $link = mysql_connect($dbhost, $dbuser, $dbpasswd); mysql_select_db("strangersurfboards",$link); $query1 = "SELECT name, length, tail_shape.description AS tail_shape, nose_shape.description AS nose_shape, width_midpoint, width_nose, width_tail, thickness_midpoint, bottom_contours_v_jp, bottom_contours_concave_jp, bottom_contours_flat, wings FROM surfboard, tail_shape, nose_shape, height WHERE tail_shape_id = tail_id AND nose_shape_id = nose_id AND name = \"$board\""; $query2 = "SELECT b.name , c1.description as rail_volume_nose, c2.description as rail_volume_mid, c3.description as rail_volume_tail, d1.description AS rail_profile_nose, d2.description AS rail_profile_mid, d3.description AS rail_profile_tail FROM surfboard b, height c1, height c2, height c3, density d1, density d2, density d3 WHERE c1.height_id = b.rail_volume_nose AND c2.height_id = b.rail_volume_mid AND c3.height_id = b.rail_volume_tail AND d1.density_id = b.rail_profile_nose AND d2.density_id = b.rail_profile_mid AND d3.density_id = b.rail_profile_tail AND name = \"$board\""; $query3 = "SELECT name, rocker_weight.description AS bottom_rocker, cloth_weight.description AS cloth_weight, rocker_weight.description AS bottom_rocker, finish.description AS finish, resin.description AS glassing_resin, c1.description AS fibreglass_extent, c2.description AS carbonfibre_extent FROM surfboard, rocker_weight, cloth_weight, finish, resin, extent c1, extent c2 WHERE surfboard.glassing_resin = resin_id AND surfboard.finish = finish_id AND surfboard.bottom_rocker = rocker_weight_id AND surfboard.cloth_weight = cloth_weight_id AND surfboard.fibreglass_extent = c1.extent_id AND surfboard.carbonfibre_extent = c2.extent_id AND name = \"$board\""; $query4 = "SELECT name, veneer.description AS veneer_type, extent.description AS veneer_extent, fin_config.description AS fin_config FROM surfboard, veneer, extent, fin_config WHERE veneer_type = veneer_id AND veneer_extent = extent_id AND fin_config = fin_config_id AND name = \"$board\""; $query5 = "SELECT name, afc.description AS centrefin_afc_type, centrefin_redx_type.description AS centrefin_redx_type, redx_material.description AS centrefin_redx_material, centrefin_fcs_composite.description AS centrefin_fcs_composite, centrefin_fcs_carbon.description AS centrefin_fcs_carbon, centrefin_custom_type.description AS centrefin_custom_type, centrefin_custom_material.description AS centrefin_custom_material, centrefin_custom_option.description AS centrefin_custom_option FROM surfboard, afc, centrefin_redx_type, redx_material, centrefin_custom_material, centrefin_custom_option, centrefin_fcs_composite, centrefin_fcs_carbon, centrefin_custom_type WHERE centrefin_afc_type = afc_id AND centrefin_redx_type = centrefin_redx_type_id AND centrefin_redx_material = redx_material_id AND centrefin_fcs_composite = centrefin_fcs_composite_id AND centrefin_fcs_carbon = centrefin_fcs_carbon_id AND centrefin_custom_type = centrefin_custom_type_id AND centrefin_custom_material = centrefin_custom_material_id AND centrefin_custom_option = centrefin_custom_option_id AND name = \"$board\""; $query6 = "SELECT name, sidefin_redx_type.description AS sidefin_redx_type, redx_material.description AS sidefin_redx_material, sidefin_fcs_composite.description AS sidefin_fcs_composite, sidefin_fcs_carbon.description AS sidefin_fcs_carbon FROM surfboard, sidefin_redx_type, redx_material, sidefin_fcs_composite, sidefin_fcs_carbon WHERE sidefin_redx_type = sidefin_redx_type_id AND sidefin_redx_material = redx_material_id AND sidefin_fcs_composite = sidefin_fcs_composite_id AND sidefin_fcs_carbon = sidefin_fcs_carbon_id AND name = \"$board\""; if ( LANGUAGE == "Japanese" ) { $query7 = "SELECT description as country from freight_country WHERE description = \"Japan\""; } else { $query7 = "SELECT * from freight_country WHERE description = \"Australia\""; } // Fetch the results into an array $result1 = mysql_query($query1, $link); $result2 = mysql_query($query2, $link); $result3 = mysql_query($query3, $link); $result4 = mysql_query($query4, $link); $result5 = mysql_query($query5, $link); $result6 = mysql_query($query6, $link); $result7 = mysql_query($query7, $link); $row = mysql_fetch_array($result1); $row2 = mysql_fetch_array($result2); $row3 = mysql_fetch_array($result3); $row4 = mysql_fetch_array($result4); $row5 = mysql_fetch_array($result5); $row6 = mysql_fetch_array($result6); $row7 = mysql_fetch_array($result7); ?>