view thule_fit_kits/index.php @ 24:8689ba61e0e0

thule_fit_kits/index.php: update note on which foot packs the fit kits will work for
author paulo@thepaulopc
date Mon, 07 Mar 2011 20:45:39 -0800
parents a7ad7a5c899e
children 3afe26a1d000
line source
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML>
3 <HEAD>
4 <META NAME="generator" CONTENT="http://txt2tags.sf.net">
5 <LINK REL="stylesheet" TYPE="text/css" HREF="index.css">
6 <TITLE>Thule Fit Kit Database</TITLE>
7 </HEAD>
8 <BODY>
10 <DIV CLASS="header" ID="header">
11 <H1>Thule Fit Kit Database</H1>
12 </DIV>
14 <DIV CLASS="body" ID="body">
16 <P>
17 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.
18 </P>
20 <P>
21 NOTE: These fit kits fit the 400 and 800 series footpacks, but not the newer 480 footpacks.
22 </P>
24 <TABLE>
25 <TR>
26 <TH>Kit Number</TH>
27 <TH>Cars</TH>
28 <TH>Rubber Pad Number</TH>
29 <TH>Bracket Number</TH>
30 <TH>Miscellaneous Parts</TH>
31 </TR>
33 <?php
35 include('../../login.php');
36 $database = 'pauloang_fitkits';
38 $link = mysql_connect('localhost', $username, $password);
39 if (!$link)
40 die('Could not connect to MySQL server: ' . mysql_error());
42 $db_selected = mysql_select_db($database, $link);
43 if (!$db_selected)
44 die('Could not select database: ' . mysql_error());
46 $query = 'SELECT * FROM Thule ORDER BY kit_id';
47 $results = mysql_query($query);
49 while ($row = mysql_fetch_assoc($results)) {
50 echo '<TR><TD><DIV class="kit_id">';
51 $pdf_filename = 'pdf/thule-fit-kit-' . $row['kit_id']. '-instructions.pdf';
52 if (file_exists($pdf_filename))
53 echo '<A HREF="'. $pdf_filename . '">' . $row['kit_id'] . '</A>';
54 else
55 echo $row['kit_id'];
56 echo '</DIV></TD><TD>';
57 $cars = explode(';', $row['car']);
58 foreach ($cars as $car)
59 echo $car . '<br>';
60 echo '</TD>';
61 echo '<TD>' . $row['rubber_pad'] . '</TD>';
62 echo '<TD>' . $row['bracket'] . '</TD>';
63 echo '<TD>';
64 $misc = explode(',', $row['misc']);
65 foreach ($misc as $misc_item) {
66 if ($misc_item) {
67 $misc_item = trim($misc_item);
68 $misc_filename = 'misc_' . $misc_item . '.png';
69 if (file_exists($misc_filename))
70 echo '<IMG SRC="' . $misc_filename . '" ALT="' . $misc_item . '"> ';
71 else
72 echo $misc_item . ',';
73 }
74 }
75 echo '</TD>';
76 echo '</TR>' . "\n";
77 }
79 mysql_free_result($results);
80 mysql_close($link);
82 ?>
84 </TABLE>
85 </DIV>
87 <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
88 <!-- cmdline: txt2tags index.t2t -->
89 </BODY></HTML>