Mercurial > hg > index.fcgi > www > www-1
view thule_fit_kits/index.php @ 0:561c0b0f3234
initial add
author | paulo@twcdns.fastsearch.net |
---|---|
date | Wed, 21 Jul 2010 00:11:54 -0700 |
parents | |
children | f6be2a5839f0 |
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 <TABLE>
21 <TR>
22 <TH>Kit Number</TH>
23 <TH>Cars</TH>
24 <TH>Rubber Pad Number</TH>
25 <TH>Bracket Number</TH>
26 <TH>Miscellaneous Parts</TH>
27 </TR>
29 <?php
31 include('../../login.php');
32 $database = 'pauloang_fitkits';
34 $link = mysql_connect('localhost', $username, $password);
35 if (!$link)
36 die('Could not connect to MySQL server: ' . mysql_error());
38 $db_selected = mysql_select_db($database, $link);
39 if (!$db_selected)
40 die('Could not select database: ' . mysql_error());
42 $query = 'SELECT * FROM Thule ORDER BY kit_id';
43 $results = mysql_query($query);
45 while ($row = mysql_fetch_assoc($results)) {
46 echo '<TR>';
47 echo '<TD><A HREF="pdf/thule-fit-kit-' . $row['kit_id'] . '-instructions.pdf">' . $row['kit_id'] . '</A></TD>';
48 echo '<TD>';
49 $cars = explode(';', $row['car']);
50 foreach ($cars as $car)
51 echo $car . '<br>';
52 echo '</TD>';
53 echo '<TD>' . $row['rubber_pad'] . '</TD>';
54 echo '<TD>' . $row['bracket'] . '</TD>';
55 echo '<TD>';
56 $misc = explode(',', $row['misc']);
57 foreach ($misc as $misc_item) {
58 if ($misc_item) {
59 $misc_item = trim($misc_item);
60 $misc_filename = 'misc_' . $misc_item . '.png';
61 if (file_exists($misc_filename))
62 echo '<IMG SRC="' . $misc_filename . '" ALT="' . $misc_item . '"> ';
63 else
64 echo $misc_item . ',';
65 }
66 }
67 echo '</TD>';
68 echo '</TR>' . "\n";
69 }
71 mysql_free_result($results);
72 mysql_close($link);
74 ?>
76 </TABLE>
77 </DIV>
79 <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
80 <!-- cmdline: txt2tags index.t2t -->
81 </BODY></HTML>