# HG changeset patch # User paulo@twcdns.fastsearch.net # Date 1282629223 25200 # Node ID f6be2a5839f08117bda40eb1f575f14cb10ceb5d # Parent ff6cf071c65cb2c6b96b84e8587b949e6cc2a503 thule_fit_kits/index.php: check if pdf exists to see whether to make hyperlink or not diff -r ff6cf071c65c -r f6be2a5839f0 thule_fit_kits/index.php --- a/thule_fit_kits/index.php Mon Aug 23 22:51:42 2010 -0700 +++ b/thule_fit_kits/index.php Mon Aug 23 22:53:43 2010 -0700 @@ -43,9 +43,13 @@ $results = mysql_query($query); while ($row = mysql_fetch_assoc($results)) { - echo ''; - echo '' . $row['kit_id'] . ''; - echo ''; + echo ''; + $pdf_filename = 'pdf/thule-fit-kit-' . $row['kit_id']. '-instructions.pdf'; + if (file_exists($pdf_filename)) + echo '' . $row['kit_id'] . ''; + else + echo $row['kit_id']; + echo ''; $cars = explode(';', $row['car']); foreach ($cars as $car) echo $car . '
';