Mercurial > hg > index.fcgi > www > www-1
comparison thule_fit_kits/index.php @ 2:ff6cf071c65c
update pics/browse.php and pics/index.php to reflect what's online
author | paulo@twcdns.fastsearch.net |
---|---|
date | Mon, 23 Aug 2010 22:51:42 -0700 |
parents | |
children | f6be2a5839f0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c603bfc63585 |
---|---|
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> | |
9 | |
10 <DIV CLASS="header" ID="header"> | |
11 <H1>Thule Fit Kit Database</H1> | |
12 </DIV> | |
13 | |
14 <DIV CLASS="body" ID="body"> | |
15 | |
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> | |
19 | |
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> | |
28 | |
29 <?php | |
30 | |
31 include('../../login.php'); | |
32 $database = 'pauloang_fitkits'; | |
33 | |
34 $link = mysql_connect('localhost', $username, $password); | |
35 if (!$link) | |
36 die('Could not connect to MySQL server: ' . mysql_error()); | |
37 | |
38 $db_selected = mysql_select_db($database, $link); | |
39 if (!$db_selected) | |
40 die('Could not select database: ' . mysql_error()); | |
41 | |
42 $query = 'SELECT * FROM Thule ORDER BY kit_id'; | |
43 $results = mysql_query($query); | |
44 | |
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 } | |
70 | |
71 mysql_free_result($results); | |
72 mysql_close($link); | |
73 | |
74 ?> | |
75 | |
76 </TABLE> | |
77 </DIV> | |
78 | |
79 <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) --> | |
80 <!-- cmdline: txt2tags index.t2t --> | |
81 </BODY></HTML> |