annotate thule_fit_kits/index.php @ 117:476cb019ad9f

add laterlinks3
author paulo
date Tue, 08 Sep 2020 23:52:57 -0700
parents 8689ba61e0e0
children
rev   line source
paulo@0 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
paulo@0 2 <HTML>
paulo@0 3 <HEAD>
paulo@0 4 <META NAME="generator" CONTENT="http://txt2tags.sf.net">
paulo@0 5 <LINK REL="stylesheet" TYPE="text/css" HREF="index.css">
paulo@0 6 <TITLE>Thule Fit Kit Database</TITLE>
paulo@0 7 </HEAD>
paulo@0 8 <BODY>
paulo@0 9
paulo@0 10 <DIV CLASS="header" ID="header">
paulo@0 11 <H1>Thule Fit Kit Database</H1>
paulo@0 12 </DIV>
paulo@0 13
paulo@0 14 <DIV CLASS="body" ID="body">
paulo@0 15
paulo@0 16 <P>
paulo@0 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.
paulo@0 18 </P>
paulo@0 19
paulo@22 20 <P>
paulo@24 21 NOTE: These fit kits fit the 400 and 800 series footpacks, but not the newer 480 footpacks.
paulo@22 22 </P>
paulo@22 23
paulo@0 24 <TABLE>
paulo@0 25 <TR>
paulo@0 26 <TH>Kit Number</TH>
paulo@0 27 <TH>Cars</TH>
paulo@0 28 <TH>Rubber Pad Number</TH>
paulo@0 29 <TH>Bracket Number</TH>
paulo@0 30 <TH>Miscellaneous Parts</TH>
paulo@0 31 </TR>
paulo@0 32
paulo@0 33 <?php
paulo@0 34
paulo@0 35 include('../../login.php');
paulo@0 36 $database = 'pauloang_fitkits';
paulo@0 37
paulo@105 38 $mysqli = mysqli_connect('localhost', $username, $password, $database);
paulo@105 39 if (mysqli_connect_errno())
paulo@105 40 die('Could not connect to MySQL server/database: ' . mysqli_connect_error());
paulo@0 41
paulo@0 42 $query = 'SELECT * FROM Thule ORDER BY kit_id';
paulo@105 43 $results = mysqli_query($mysqli, $query);
paulo@0 44
paulo@105 45 while ($row = mysqli_fetch_assoc($results)) {
paulo@4 46 echo '<TR><TD><DIV class="kit_id">';
paulo@3 47 $pdf_filename = 'pdf/thule-fit-kit-' . $row['kit_id']. '-instructions.pdf';
paulo@3 48 if (file_exists($pdf_filename))
paulo@3 49 echo '<A HREF="'. $pdf_filename . '">' . $row['kit_id'] . '</A>';
paulo@3 50 else
paulo@3 51 echo $row['kit_id'];
paulo@4 52 echo '</DIV></TD><TD>';
paulo@0 53 $cars = explode(';', $row['car']);
paulo@0 54 foreach ($cars as $car)
paulo@0 55 echo $car . '<br>';
paulo@0 56 echo '</TD>';
paulo@0 57 echo '<TD>' . $row['rubber_pad'] . '</TD>';
paulo@0 58 echo '<TD>' . $row['bracket'] . '</TD>';
paulo@0 59 echo '<TD>';
paulo@0 60 $misc = explode(',', $row['misc']);
paulo@0 61 foreach ($misc as $misc_item) {
paulo@0 62 if ($misc_item) {
paulo@0 63 $misc_item = trim($misc_item);
paulo@0 64 $misc_filename = 'misc_' . $misc_item . '.png';
paulo@0 65 if (file_exists($misc_filename))
paulo@0 66 echo '<IMG SRC="' . $misc_filename . '" ALT="' . $misc_item . '"> ';
paulo@0 67 else
paulo@0 68 echo $misc_item . ',';
paulo@0 69 }
paulo@0 70 }
paulo@0 71 echo '</TD>';
paulo@0 72 echo '</TR>' . "\n";
paulo@0 73 }
paulo@0 74
paulo@105 75 mysqli_free_result($results);
paulo@105 76 mysqli_close($mysqli);
paulo@0 77
paulo@0 78 ?>
paulo@0 79
paulo@0 80 </TABLE>
paulo@0 81 </DIV>
paulo@0 82
paulo@0 83 <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
paulo@0 84 <!-- cmdline: txt2tags index.t2t -->
paulo@0 85 </BODY></HTML>