<?php
/*
  $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

  $products_id=$HTTP_GET_VARS['products_id'];


$sp_query = tep_db_query("select * from specials_daily where products_id='".$products_id."' and status=1 and TO_DAYS(NOW())>=TO_DAYS(star_date) and TO_DAYS(NOW()) <= TO_DAYS(end_date)");
if (tep_db_num_rows($sp_query)>0)
{
    $sp_check = tep_db_fetch_array($sp_query);
	$showsp=$currencies->display_price($sp_check['old_price'],0);
}
else
{
	$showsp="";
}

  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

  if ($product_check['total'] >= 1) {
    $shipping_itemcost_query = tep_db_query("select configuration_value from configuration where configuration_key = 'MODULE_SHIPPING_ITEM_COST'");
    $shipping_itemcost_info = tep_db_fetch_array($shipping_itemcost_query);
	$shipping_itemcost = $shipping_itemcost_info['configuration_value'];
	$shipping_itemcost_str = $currencies->display_price($shipping_itemcost_info['configuration_value'],1);

    $shipping_itemhand_query = tep_db_query("select configuration_value from configuration where configuration_key = 'MODULE_SHIPPING_ITEM_HANDLING'");
    $shipping_itemhand_info = tep_db_fetch_array($shipping_itemhand_query);
	$shipping_itemhand = $shipping_itemhand_info['configuration_value'];
	$shipping_itemhand_str = $currencies->display_price($shipping_itemhand_info['configuration_value'],1);

	$shipping_itemcosthand_str = $currencies->display_price($shipping_itemcost+$shipping_itemhand,1);
	$tep_query_str="select p.products_id,p.code, pd.products_name, p.code, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'";
	//echo($tep_query_str);
    $product_info_query = tep_db_query($tep_query_str);
    $product_info = tep_db_fetch_array($product_info_query);

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice_r">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
      $products_price2 = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
	  $total_price_str=$currencies->display_price($shipping_itemcost+$shipping_itemhand+$new_price,1);
    } else {
      $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
	  $products_price2=$products_price;
  	  $total_price_str=$currencies->display_price($shipping_itemcost+$shipping_itemhand+$product_info['products_price'],1);
    }


    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
    $products_code = $product_info['code'];
}
 //echo (PRODUCTINFO_TITLE_DEAL .' ' .$products_price);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php
if (tep_not_null($product_info['optimize_title']))
	echo $product_info['optimize_title'];
else
	echo 'Cheap '.$product_info['products_name'].' By Upowerbiz.com.'; ?></title>
<?php
	if (file_exists(DIR_WS_INCLUDES . 'meta_tags.php'))
		{
		require(DIR_WS_INCLUDES . 'meta_tags.php');
	}
?>
<meta name="copyright"content="Upowerbiz Inc">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<link rel="stylesheet" type="text/css" href="style.css" />

</head>
<body>
<div id="pg">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<div id="bdmain" class="layout">
	<!-- left_navigation //-->
	<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
	<!--left table width:<?php echo BOX_WIDTH; ?>-->
	<!-- left_navigation_eof //-->
<div id="bdcenter">
<?
  if ($product_check['total'] < 1) {
	 new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?>
		<p><?php echo '<a href="' . tep_href_link(FILENAME_HOME) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></p>
<?
}else{
?>	
<h1><?php echo $products_name; ?></h1>
<table width="600" border="0" cellpadding="0" cellspacing="5" >
  <tr>
    <td width="300" align="center"><img src="images/products_images/unfurl/<?=$product_info['products_image']?>" alt="<?php echo $product_info['products_name'].' '.$real_price; ?>" title="<?php echo $product_info['products_name'].' '.$real_price; ?>" ></td>
    <td valign="top">
	   <table >
	   <tr>
	   <td style=" padding-right:5px; margin-bottom:10px; padding-left:10px; width:300px;"><a href="<?php echo tep_href_link('contact_us.php', '', 'SSL'); ?>" class="bot">
	  Ask Questiones
	</a> &nbsp; &nbsp; &nbsp;
	<a href="<?php echo tep_href_link('tell_a_friend.php','products_id='.$products_id,'SSL'); ?>" class="bot">
	  Email To Friends	</a></td><td><?php include(DIR_WS_BOXES.'currencies_output.php');?></td></tr></table>
		<div id="pricetable">
<ul>
<form name="cart_quantity" method="post"  style="margin:0px;padding:0px;" action="<?=tep_href_link(FILENAME_PRODUCT_INFO, 'cPath='.$cPath.'&products_id='.$products_id. '&action=add_product')?>">
	<li><span class="cart_text">Item Number :</span>U<?php echo $products_code; ?>BIZ</li>
	<li><span class="detail_proname"><?php  echo (PRODUCTINFO_TITLE_DEAL .' ' .$products_price);?></span></li>
	<li>
	  <table border="0" cellspacing="0" cellpadding="2" style="margin-left:9px;">
        <tr>
          <td><input type="hidden" name="products_id" value="<?=$products_id?>" /><span class="cart_text">Quantity:</span><input name="product_num" type="text" onKeyPress="javascript:checkdig();" value="1" size="4" /></td>
          <td><input name="image" type="image" src="<?=DIR_WS_LANGUAGES.$language?>/images/buttons/pr_add.gif" alt="<?=PRODUCTINFO_BUTTONS_CART?>"  border="0"   /></td>
        </tr>
      </table>
</li>
</form>
	<li><a href="javascript:Addme()" class="bot">Add to Favorite</a></li>
	<li><span class="cart_text">Availability:</span> In Stock, ships out in 1-2 Business Days.</li>
    <li><span class="cart_text">Warranty:</span> 30 Days Money Back Guarantee</li>
	<li><span class="cart_text">Wholesale In Very Low Minimum Quantity  </span>On <u><?php echo $products_name; ?></u>, Please Free Free To <b><a href="<?php echo tep_href_link('contact_us.php', '', 'SSL'); ?>" class="bot"> 
	  Contact Us</a> </b></li>
</ul>
		</div>	</td>
  </tr>
</table>
<div id="centerinfo">
<ul>

<li>Great prices & Service Since 2005 Based In Hong Kong</li>
<li style="color:#FF0000">Worry-free shopping:</li>

 </ul>
</div>
<div class="detail_prodescription"><?php echo stripslashes($product_info['products_description']); ?></div>
<div><table border="0" cellspacing="3" cellpadding="0">
<form name="cart_quantity" method="post" action="<?=tep_href_link(FILENAME_PRODUCT_INFO, 'cPath='.$cPath.'&products_id='.$products_id. '&action=add_product')?>">
  <tr>
    <td><span class="cart_text"><input type="hidden" name="products_id" value="<?=$products_id?>" /><?=PRODUCTINFO_TITLE_QTY?>&nbsp;&nbsp;<input name="product_num" type="text" onKeyPress="javascript:checkdig();" value="1" size="4" /></span></td>
    <td><input name="image" type="image" src="<?=DIR_WS_LANGUAGES.$language?>/images/buttons/pr_add.gif" alt="<?=PRODUCTINFO_BUTTONS_CART?>"  border="0"   /></td>
    </tr>
  </form>
</table>
</div>
<p style="float:left; text-align:left; size:16px">&nbsp;&nbsp;<b>We Make It Easy And Safe To Shopping <?php echo $products_name; ?> </b><br>
&nbsp;&nbsp;Flat shipping GBP$2.99 per order, no matter how many items you buy!<br>
<img src="images/logoEbay.gif" alt="upowerbiz ebay powerseller"> &nbsp; <img src="images/paypal.gif" alt="upowerbiz online shop paypal verifed "> &nbsp; <img src="images/biz.gif" alt="upowerbiz superstore"></p>
<br />
		<?php include(DIR_WS_MODULES . 'relative_products.php');?> <br>
		<p style="float:left; text-align:left; size:16px; padding-left:10px; clear:left; border:#CCCCCC 1 dashed"><b> <img src="images/arrow05.gif" title="upowerbiz online shop"> &nbsp;How green are you?</b> <br>
Haven't you heard? Green is the new black. Eco-friendly alternatives are not just a passing trend. Check out our Green Guide to learn more about <a href="http://localhost/upowerbiz/index.php?cPath=29" title="led light,flashlight,headlight,bicklight"> LED Light </a>, 
<a href="http://www.my-batteries.net/laptop-battery.htm" title="laptop battery,notebook battery"> <b> LI-ION Laptop Batteries </b> </a>, vegan living and more. Learn how you can do your part to help save our planet!<br><br>
<b><img src="images/arrow05.gif" title="upowerbiz online shop">&nbsp; What are Energy Star Ratings?</b> <br>
 The Environmental Protection Agency awards an "energy star" to appliances that are at least ten to fifteen percent more energy efficient than the minimum 
federal standard. Look for the Energy Star logo when shopping for appliances for your home.<br><br>
<b> <img src="images/arrow05.gif" title="upowerbiz online shop">&nbsp;Is it fashion or a way of life? </b> <br>
Whether you're an Earth Mother, a music-loving hipster or a Maintenance and Repair Workers,we have a Lifestyle Guide just for you. Not into labels? We still 
have an accessories ( <?php echo $products_name; ?> ) to suit you. Try mp3 mp4 player & <a href="http://www.upowerbiz.com/index.php?cPath=253" title="digital photo frame,digital picture frame" > <u>Digital Photo Frame </u> </a>, iPods, <a href="http://www.upowerbiz.com/index.php?cPath=111_131" title="dvbt, dvbt tv receive"> dvbt </a> or Back-to-School Gadgets.<br>
<br>
<b><img src="images/arrow05.gif" title="upowerbiz online shop"> &nbsp;Other Green Tips</b> <br>
Use recycled paper whenever possible. <br>
Switch to organic products. <br>
Buying a new computer? Try getting a laptop, as they use less energy than desktops. Also, look for the Energy Star rating. <br>
Re-use and Recycle( <a href="http://www.buy-laptop-batteries.com" title="buy laptop batteries at low price and fast shipping">Laptop Batteries </a>). Bring a thermos for your (organic) coffee rather than using separate paper cups throughout the day. <br>
Be patient. Going green takes time. No one expects you to be able to completely makeover your life in a week or so. That would be costly and ridiculous. Try 

going green on one thing a week. And remember: every little bit helps. <br>
Don't forget your clothes! Get green with our guide to Eco-Fashion. <br> </p>

				</td>
		</tr>
<?
}
?>
</table><!-- body_text_eof //-->
	</div>
	<!-- right_navigation //-->
	<?php require(DIR_WS_INCLUDES . 'column_right_proinfo.php'); ?>
	<!-- right_navigation_eof //-->
</div>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br />
<script language="JavaScript" type="text/javascript"> 
	function checkdig() {
		 if(event.keyCode<48 || event.keyCode>57) event.returnValue=false;  
	}  
	function Addme(){ 
	url = this.location.href;
	title = document.title;
	window.external.AddFavorite(url,title);
	}
</script>
</script>
</div>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
