Mercurial > hg > index.fcgi > www > www-1
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/thule_fit_kits/index.php Wed Jul 21 00:11:54 2010 -0700 1.3 @@ -0,0 +1,81 @@ 1.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 1.5 +<HTML> 1.6 +<HEAD> 1.7 +<META NAME="generator" CONTENT="http://txt2tags.sf.net"> 1.8 +<LINK REL="stylesheet" TYPE="text/css" HREF="index.css"> 1.9 +<TITLE>Thule Fit Kit Database</TITLE> 1.10 +</HEAD> 1.11 +<BODY> 1.12 + 1.13 +<DIV CLASS="header" ID="header"> 1.14 +<H1>Thule Fit Kit Database</H1> 1.15 +</DIV> 1.16 + 1.17 +<DIV CLASS="body" ID="body"> 1.18 + 1.19 +<P> 1.20 +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. 1.21 +</P> 1.22 + 1.23 +<TABLE> 1.24 +<TR> 1.25 +<TH>Kit Number</TH> 1.26 +<TH>Cars</TH> 1.27 +<TH>Rubber Pad Number</TH> 1.28 +<TH>Bracket Number</TH> 1.29 +<TH>Miscellaneous Parts</TH> 1.30 +</TR> 1.31 + 1.32 +<?php 1.33 + 1.34 + include('../../login.php'); 1.35 + $database = 'pauloang_fitkits'; 1.36 + 1.37 + $link = mysql_connect('localhost', $username, $password); 1.38 + if (!$link) 1.39 + die('Could not connect to MySQL server: ' . mysql_error()); 1.40 + 1.41 + $db_selected = mysql_select_db($database, $link); 1.42 + if (!$db_selected) 1.43 + die('Could not select database: ' . mysql_error()); 1.44 + 1.45 + $query = 'SELECT * FROM Thule ORDER BY kit_id'; 1.46 + $results = mysql_query($query); 1.47 + 1.48 + while ($row = mysql_fetch_assoc($results)) { 1.49 + echo '<TR>'; 1.50 + echo '<TD><A HREF="pdf/thule-fit-kit-' . $row['kit_id'] . '-instructions.pdf">' . $row['kit_id'] . '</A></TD>'; 1.51 + echo '<TD>'; 1.52 + $cars = explode(';', $row['car']); 1.53 + foreach ($cars as $car) 1.54 + echo $car . '<br>'; 1.55 + echo '</TD>'; 1.56 + echo '<TD>' . $row['rubber_pad'] . '</TD>'; 1.57 + echo '<TD>' . $row['bracket'] . '</TD>'; 1.58 + echo '<TD>'; 1.59 + $misc = explode(',', $row['misc']); 1.60 + foreach ($misc as $misc_item) { 1.61 + if ($misc_item) { 1.62 + $misc_item = trim($misc_item); 1.63 + $misc_filename = 'misc_' . $misc_item . '.png'; 1.64 + if (file_exists($misc_filename)) 1.65 + echo '<IMG SRC="' . $misc_filename . '" ALT="' . $misc_item . '"> '; 1.66 + else 1.67 + echo $misc_item . ','; 1.68 + } 1.69 + } 1.70 + echo '</TD>'; 1.71 + echo '</TR>' . "\n"; 1.72 + } 1.73 + 1.74 + mysql_free_result($results); 1.75 + mysql_close($link); 1.76 + 1.77 +?> 1.78 + 1.79 +</TABLE> 1.80 +</DIV> 1.81 + 1.82 +<!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) --> 1.83 +<!-- cmdline: txt2tags index.t2t --> 1.84 +</BODY></HTML>