paulo@0: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
paulo@0: <HTML>
paulo@0: <HEAD>
paulo@0: <META NAME="generator" CONTENT="http://txt2tags.sf.net">
paulo@0: <LINK REL="stylesheet" TYPE="text/css" HREF="index.css">
paulo@0: <TITLE>Thule Fit Kit Database</TITLE>
paulo@0: </HEAD>
paulo@0: <BODY>
paulo@0: 
paulo@0: <DIV CLASS="header" ID="header">
paulo@0: <H1>Thule Fit Kit Database</H1>
paulo@0: </DIV>
paulo@0: 
paulo@0: <DIV CLASS="body" ID="body">
paulo@0: 
paulo@0: <P>
paulo@0: Trying to figure out if you can reuse those Thule fit kit rubber pads or mounting brackets on another car?  Here's a database you can check, with PDF installation instruction manuals.
paulo@0: </P>
paulo@0: 
paulo@22: <P>
paulo@24: NOTE: These fit kits fit the 400 and 800 series footpacks, but not the newer 480 footpacks.
paulo@22: </P>
paulo@22: 
paulo@0: <TABLE>
paulo@0: <TR>
paulo@0: <TH>Kit Number</TH>
paulo@0: <TH>Cars</TH>
paulo@0: <TH>Rubber Pad Number</TH>
paulo@0: <TH>Bracket Number</TH>
paulo@0: <TH>Miscellaneous Parts</TH>
paulo@0: </TR>
paulo@0: 
paulo@0: <?php
paulo@0: 	
paulo@0: 	include('../../login.php');
paulo@0: 	$database = 'pauloang_fitkits';
paulo@0: 
paulo@105: 	$mysqli = mysqli_connect('localhost', $username, $password, $database);
paulo@105: 	if (mysqli_connect_errno())
paulo@105: 		die('Could not connect to MySQL server/database: ' . mysqli_connect_error());
paulo@0: 
paulo@0: 	$query = 'SELECT * FROM Thule ORDER BY kit_id';
paulo@105: 	$results = mysqli_query($mysqli, $query);
paulo@0: 
paulo@105: 	while ($row = mysqli_fetch_assoc($results)) {
paulo@4: 		echo '<TR><TD><DIV class="kit_id">';
paulo@3: 		$pdf_filename = 'pdf/thule-fit-kit-' . $row['kit_id']. '-instructions.pdf';
paulo@3: 		if (file_exists($pdf_filename))
paulo@3: 			echo '<A HREF="'. $pdf_filename . '">' . $row['kit_id'] . '</A>';
paulo@3: 		else
paulo@3: 			echo $row['kit_id'];
paulo@4: 		echo '</DIV></TD><TD>';
paulo@0: 		$cars = explode(';', $row['car']);
paulo@0: 		foreach ($cars as $car)
paulo@0: 			echo $car . '<br>';
paulo@0: 		echo '</TD>';
paulo@0: 		echo '<TD>' . $row['rubber_pad'] . '</TD>';
paulo@0: 		echo '<TD>' . $row['bracket'] . '</TD>';
paulo@0: 		echo '<TD>';
paulo@0: 		$misc = explode(',', $row['misc']);
paulo@0: 		foreach ($misc as $misc_item) {
paulo@0: 			if ($misc_item) {
paulo@0: 				$misc_item = trim($misc_item);
paulo@0: 				$misc_filename = 'misc_' . $misc_item . '.png';
paulo@0: 				if (file_exists($misc_filename))
paulo@0: 					echo '<IMG SRC="' . $misc_filename . '" ALT="' . $misc_item . '"> ';
paulo@0: 				else
paulo@0: 					echo $misc_item . ',';
paulo@0: 			}
paulo@0: 		}
paulo@0: 		echo '</TD>';
paulo@0: 		echo '</TR>' . "\n";
paulo@0: 	}
paulo@0: 
paulo@105: 	mysqli_free_result($results);
paulo@105: 	mysqli_close($mysqli);
paulo@0: 
paulo@0: ?>
paulo@0: 
paulo@0: </TABLE>
paulo@0: </DIV>
paulo@0: 
paulo@0: <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
paulo@0: <!-- cmdline: txt2tags index.t2t -->
paulo@0: </BODY></HTML>