Scott,
Here's a little something I whipped up.
http://digicave.org/speermints/parse/index.php
Copy this code and save it as data.php
<?php
// This file contains all patch and full version info.
// Edit only the attributes in "quotes"
// Do not use leading or trailing slashes for patch
// or full keys.
//
// This file is called by parser.php
$versionPatches = array ( // Let's begin our multidimensional array here
array ( // Item 0 in our array
'company' => "MedAmerica",
'subtext' => "Simplicity <sup>ii</sup>",
'version' => "1.18.0",
'patch' => "MASii/SiiPatch1-18-0.exe",
'full' => "MASii/SiiSetup.exe",
'logo' => "logo.dl.ma.jpg"
),
array ( // Item 1 in our array
'company' => "Penn Treaty",
'subtext' => "",
'version' => "2.65.0",
'patch' => "PTNA/PTNAUpdate2-65-0.exe",
'full' => "PTNA/PTNASetup.exe",
'logo' => "logo.dl.pt.jpg"
),
array ( // Item 2 in our array
'company' => "Prudential",
'subtext' => "LTC3",
'version' => "1.28.4",
'patch' => "PruLTC3/LTC3Patch1-28-4.exe",
'full' => "PruLTC3/LTC3Setup.exe",
'logo' => "logo.dl.pru.jpg"
)
); // Let's close our multidimensional array here
// Soy isn't that bad.
?>
Copy this code and save it as parser.php
<?php
include("data.php");
function showVersion( $numero = 0 ) {
global $versionPatches;
// ---------------------------------------------- BEGIN THE OUTPUT BELOW. CHEESE DANISH
echo "<center><table border=\"0\" cellspacing=\"0\" cellpadding=\"3\"><tr><td> </td><td width=\"10\" rowspan=\"3\"> </td><td>Current version: ".$versionPatches[$numero]['version']."</td><td> </td></tr><tr><td align=\"right\" rowspan=\"2\" valign=\"top\"><font size=\"5\"><b>".$versionPatches[$numero]['company'].":</b></font><br>".$versionPatches[$numero]['subtext']."</td><td><input type=\"button\" name=\"cmdSubmit\" onclick=\"location.href='/csaPatches/".$versionPatches[$numero]['patch']."'\" value=\"".$versionPatches[$numero]['company']." Patch File\" style=\"width:210;\"></td><td rowspan=\"2\" valign=\"middle\" ><img src=\"http://www.csaltc.com/image/".$versionPatches[$numero]['logo']."\"></td></tr><tr> <td><input type=\"button\" name=\"cmdSubmit\" onclick=\"location.href='/csaPatches/".$versionPatches[$numero]['full']."'\" value=\"".$versionPatches[$numero]['company']." Full Install\" style=\"width:210;\"></td></tr></table></center>";
// ---------------------------------------------- END THE OUTPUT. HAVE COFFEE
unset($numero); // If you choose to call this file again on the same page,
// simply include it again and change the $numero variable
// Kirk out!
}
?>
Now, on your download pages where the existing table is you can use this instead.
<?php
include("parser.php");
showVersion(0); // MedAmerica
//showVersion(1); // Penn Treaty
//showVersion(2); // Prudential
?>
You download page must be able to parse PHP in the page. So, it's extension must either be .php OR you can config your .htaccess file to parse PHP in html pages. Ugh. I just noticed your download pages are .cfm. Umf.
Let's not get all hurt.