'; echo 'Start browsing now'; $errorCode = 1; shopFooter(); exit; } $displayProduct = 0; $basketsize = explode("&", $_SESSION['ws_basket']); if ( sizeof($basketsize) > 2) { print '
>>>'; print ' shopping cart |'; print 'go to checkout >>>'; print '

'; } mysql_connect_select(); $table = "SELECT * FROM ws_products WHERE "; $product_id = $table." id = '$id%'"; $product_code = $table." code = '$code'"; $withForWebSale = " AND forWebSale = '1%'"; $withStockForSale = " AND stockForSale > '0%'"; if ($code != '0') { $sql_query = $product_code; } if ($id != 0) { $sql_query = $product_id; } $sql_query_orig = $sql_query; $sql_query .= $withForWebSale.$withStockForSale; $products_q = mysql_query($sql_query); $numProducts = mysql_num_rows($products_q); if ($numProducts == 0) { $sql_query_new = $sql_query_orig.$withStockForSale; $pq = mysql_query($sql_query_new); $p = mysql_num_rows($pq); if ($p == 0) { shopHeadline("We are sorry :("); print '
'; print 'We do not have any more copies of this publication in stock.

'; print 'If you urgently need a copy of this publication, please contact us at pubs@wluml.org to see when this item will next be available.'; } $sql_query_new = $sql_query_orig.$withForWebSale; $pq = mysql_query($sql_query_new); $p = mysql_num_rows($pq); if ($p == 0) { shopHeadline("Error in product selection"); print '
'; print 'No items can be found matching your description. Please try again.'; } } else { $displayProduct = 1; } if ($displayProduct == 1) { $product = mysql_fetch_array($products_q); shopHeadline($product['name']); $cat = $product['category']; $q = mysql_query("SELECT id,longName FROM ws_categories WHERE id = '$cat%' LIMIT 1"); $category = mysql_fetch_array($q); print '
'; print 'View other publications in the category '.$category['longName'].'
'; $lang = $product['language']; $q = mysql_query("SELECT id,name FROM ws_languages WHERE id = '$lang%' LIMIT 1"); $language = mysql_fetch_array($q); print 'View other publications in '.$language['name'].'
'; print '
'; print ''; print ''; print ''; print ''; print ''; print '
'; if ($product['product_graphics'] != '0') { $image_id = $product['product_graphics']; $res_image = mysql_query ("SELECT * FROM ws_images WHERE id = '$image_id%' LIMIT 1"); $image = mysql_fetch_array($res_image); print '

'; print ''; print ''; print ''; print '
'; $img_width = $image['img_width']; $img_height = $image['img_height']; print 'Photo'; print '
'; print ''; print ''; print '
'; } print '...
'; print ''.stripslashes($product['description']).'
'; print '...'; print '
'.stripslashes($product['long_description']); print '
'; print '

'; print 'Add this item to your shopping cart:
'; print '...
'; print ''; print ''; print ''; print ''; print ''; print ''; print '
Price £'.$product['priceSale'].''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
Quantity:'; print ''; print ''; print ''; print '
'; print '
'; print '
'; } print '

'; priceMsg(); postageMsg(); poweredByWorldPay(); shopFooter(); ?>