Shipping costs are included only for UK mainland delivery. For international orders, please contact us for shipping costs. Thank you. | ||
// LinkManager
// view_links.htm
// (c) 2005 Phil Parker, Lycosa Web Services Ltd.
// written 21/06/2005
// last updated 21/06/2005
// connect to database
$db_host = "localhost";
$db_client = "linkman";
$db_pass = "pu2z1eHq";
$db_name = "linkman_links";
if (!mysql_connect($db_host, $db_client, $db_pass)) die("Could not connect to database - please check ini.htm");
if (!mysql_select_db($db_name)) die("Could not select database $db_name - please check ini.htm");
// loop through categories
$category_query = " SELECT category_id,
title
FROM categories
ORDER BY title ASC";
$category_result = mysql_query($category_query);
if (!$category_result || mysql_num_rows($category_result) < 1)
{
echo "No categories found in the database.";
}
else
{
while (list($catid, $cattitle) = mysql_fetch_array($category_result))
{
// check for links in this category for this customer
$link_query = " SELECT out_html
FROM links
WHERE category_id = $catid
AND customer_id = $cid
AND out_status = 'active'
ORDER BY out_html";
$link_result = mysql_query($link_query);
if (!$link_result || mysql_num_rows($link_result) < 1) {} // no links in this category for this customer
else
{
// display category title and loop through links
echo "$cattitle";
while (list($out_html) = mysql_fetch_array($link_result))
{
echo "$out_html | ||
|
|
||