header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 # # cookie handling for moreover newsfeed output # if ($tshippingFreeNewsPref == "soccer") { setcookie("tshippingFreeNews", "soccer"); $tshippingFreeNews = "soccer"; } elseif ($tshippingFreeNewsPref == "shipping") { setcookie("tshippingFreeNews", "shipping"); $tshippingFreeNews = "shipping"; } /* * This file displays the derived data. It will retrieve all the * derived data that has been calculated from the database and print * it out in a table based on the cargo type and cargo that the user * has chosen. */ include "../voyagecalc/TShipCookie.php3"; include "../ads/ad.php"; /* DB attributes */ $dbname = "tshipping"; $dbhost = "www.tshipping.com"; $dbuser = "tshipping"; $dbpassword = "hytr5u7"; /* get a persistent connection to the database */ $db = pg_pconnect("dbname=$dbname host=$dbhost user=$dbuser password=$dbpassword"); /* Create a new Tshipping Cookie object */ $tsc = new TShipCookie; /* Check to see if the user has a cookie */ $member_id = $tsc->checkCookie($t_ship_cookie, $db); # ########################################################################## # # printCargos # # ########################################################################## # function printCargos ($cargo_type) { global $db; $query = "SELECT DISTINCT cargo FROM cargos WHERE type = '$cargo_type'"; $sth = pg_exec($db, $query); $row = 0; $rows = $sth != FALSE ? PG_NUMROWS($sth) : 0; while ($row < $rows) { $data = pg_fetch_object ($sth, $row); if (($data->cargo) == "COAL (Saf)") { /* dodgy hack to output only coal instead of 'coal' and 'coal (saf)' for Bill 1/9/00 - Aydin */ } else { ?>
|
tshipping.com - dress casual, think smart.
Choose a cargo
|