<?php                                                                                                                                                                                    

/*
  $Id: index.php,v 1.1 2003/06/11 17:37:59 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');

// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
      $category_depth = 'products'; // display products
    } else {
      $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
      $category_parent = tep_db_fetch_array($category_parent_query);
      if ($category_parent['total'] > 0) {
        $category_depth = 'nested'; // navigate through the categories
      } else {
        $category_depth = 'products'; // category has no products, but display the 'no products' message
      }
    }
  }

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
  
  
  if($_REQUEST['submit_x']!=''){
	$email=$_REQUEST['email'];
	if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ){
	header("Location:".$_SERVER['PHP_SELF']."?mailmsg=error");
	}
	else{
		$query=tep_db_query("insert into monthly_special values('','$email')");
		if(mysql_affected_rows() > 0)
			{
			echo"<script language='javascript'>";
			echo'alert("Thank You. Your Email Address Has Been Succesfully Added To Our Mailing List.")';
			echo"</script>";
		}
		
	}
}
  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {

  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ">
  <title><?php echo TITLE; </title>
<?php
}
/*** End Header Tags SEO ***/

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; " />
<meta name="description" content="Sharp Banners Offers Wide Veriety of Products and Services Online Including Banners, Posters, Canvas, Car Magnets, Display Graphics, Window Cling, Vinyl Banners, Custom Vinyl Banners, Large Format Posters, full Color Printing, Poster Prints, Canvas Prints and Much More at Affordable Price. We are Here to Assist You, Please Give a Call !" />
<meta name="keywords" content="Online printing company, vinyl banner printing, large format posters, large format printing, banner printer, poster printing, banner printing online, online banner printing, poster printing online, full color printing,poster prints, canvas prints, vinyl banners, sharp banners" />
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="main.css" rel="stylesheet" type="text/css" />
<script language="javascript">
function checkmail(){
	if(document.form1.email.value=="")
		{
		alert("Please Enter email !");
		document.form1.email.focus();
		return(false);
		}
	var email =document.form1.email.value;
	if(!email.match(/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/))
		{
		alert("Your Email is Invalid!");
		document.form1.email.focus();
		return(false);
		}
	}
</script>
</head>

<body>
<center>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); 
<!-- header_eof //-->
<!-- header //-->
<?php //if($_REQUEST['cPath']!=''){require(DIR_WS_INCLUDES . 'header.php');}else{ require(DIR_WS_INCLUDES . 'header2.php');}
<!-- header_eof //-->

<!-- body //--><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- <tr>
	<td align="right">&nbsp;</td>
</tr> -->
<!-- <tr>
	<td height="8px"></td>
</tr> -->
									
<tr>
<!-- body_text //-->
<?php
  if ($category_depth == 'nested') { 
    $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");	
	
    $category = tep_db_fetch_array($category_query);

    <td width="100%" height="126" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     
	  <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php //echo HEADING_TITLE; </td>
            <td class="pageHeading" align="right"><?php //echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); </td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="1">
              <tr>
<?php
    if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
      $category_links = array_reverse($cPath_array);
      for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
        $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
        $categories = tep_db_fetch_array($categories_query);
        if ($categories['total'] < 1) {
          // do nothing, go through the loop
        } else {
          $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
          break; // we've found the deepest category the customer is in
        }
      }
    } else {
       //$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
	 $categories_query=tep_db_query("select * from categories,categories_description,products_to_categories where categories.categories_id=categories_description.categories_id and categories.categories_id=products_to_categories.categories_id and categories.parent_id='".(int)$current_category_id."' and categories.sort_order=0 and categories_description.language_id ='1' order by categories_description.categories_name") or die(mysql_error()); 
	  
    }

    $number_of_categories = tep_db_num_rows($categories_query);

    $rows = 0;
    while ($categories = tep_db_fetch_array($categories_query)) {
	
	$replacedword   = array(" ", "-", "/");
	$til=str_replace('"','',$categories['categories_name']);
	$til=str_replace($replacedword,'_',$til);
	
	
	$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.no_of_upload,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,p.products_weight from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$categories['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
	
	$product_info = tep_db_fetch_array($product_info_query);
	
      $rows++;
      $cPath_new = tep_get_path($categories['categories_id']);
      $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
      echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link($til.'-p-'.$categories['products_id'].'-c-'.$categories['categories_id'].'.html') . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], 222, 218) . '</a><br><br><font style="font-size:12px;font-weight:bold;" >' . $categories['categories_name'] . '</font><br/><br/><div style="text-align:left; padding:30px;">'.stripslashes($product_info['products_description']).'</div></td>' . "\n";
      if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
        echo '              </tr>' . "\n";
        echo '              <tr>' . "\n";
      }
    }

// needed for the new products module shown below
    $new_products_category_id = $current_category_id;

              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); </td>
          </tr>
          <tr>
            <td><?php //include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
<?php
  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) { 
// create column list
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                         'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
						   //////////// cont. 4312 //////////
						 'PRODUCT_LIST_30SALES' => PRODUCT_LIST_30SALES,
						   //////////// END cont. 4312 //////////
                         'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                         'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                         'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                         'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                         'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                         'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

    asort($define_list);

    $column_list = array();
    reset($define_list);
    while (list($key, $value) = each($define_list)) {
      if ($value > 0) $column_list[] = $key;
    }

    $select_column_list = '';

    for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
      switch ($column_list[$i]) {
        case 'PRODUCT_LIST_MODEL':
          $select_column_list .= 'p.products_model, ';
          break;
        case 'PRODUCT_LIST_NAME':
          $select_column_list .= 'pd.products_name, ';
          break;
		  //////////// cont. 4312 //////////
	    case 'PRODUCT_LIST_30SALES':
          $select_column_list .= 'p.products_recent_sales, ';
          break;  
		  //////////// END  cont. 4312 ////////// 
        case 'PRODUCT_LIST_MANUFACTURER':
          $select_column_list .= 'm.manufacturers_name, ';
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $select_column_list .= 'p.products_quantity, ';
          break;
        case 'PRODUCT_LIST_IMAGE':
          $select_column_list .= 'p.products_image, ';
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $select_column_list .= 'p.products_weight, ';
          break;
      }
    }

// show the products of a specified manufacturer
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
      /* $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";*/
	   
	    ////// cont. 1242 ///
	    $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price,p.products_price1, p.products_price2, p.products_price3, p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks,p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
		//////END  cont. 1242 ///
	 
      } else {
// We show them all
       /* $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";*/
		
		////// cont. 1242 ///
		 $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales,p.manufacturers_id,p.products_price,p.products_price1, p.products_price2,p.products_price3,p.products_price4, p.products_price5, p.products_price6,p.products_price7,p.products_price8,p.products_price1_qty, p.products_price2_qty, p.products_price3_qty,p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status,s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status,s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " .TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";

//////END  cont. 1242 ///
      }
    } else {
// show the products in a given categorie
      if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       /* $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";*/
		
		//////  cont. 1242 ///
        $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price,p.products_price1, p.products_price2, p.products_price3, p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
		//////END  cont. 1242 ///
      } else {
// We show them all
        /*$listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";*/
		
		//////  cont. 1242 ///
        $listing_sql = "select " . $select_column_list . " p.products_id,p.products_recent_sales, p.manufacturers_id, p.products_price,p.products_price1, p.products_price2, p.products_price3, p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_qty_blocks, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
		//////END  cont. 1242 ///
      }
    }
	
	 
    if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
      for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
        /*if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= " order by pd.products_name";
          break;*/
		  
		  /////// cont. 4312 /////
	    if ($column_list[$i] == 'PRODUCT_LIST_30SALES') {
          $HTTP_GET_VARS['sort'] = $i+1 . 'a';
          $listing_sql .= "  ORDER BY p.products_recent_sales desc, pd.products_name desc";
          break; 
		   /////// END cont. 4312 /////
        }
      }
    } else {
      $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
      $sort_order = substr($HTTP_GET_VARS['sort'], 1);
      $listing_sql .= ' order by ';

      switch ($column_list[$sort_col-1]) {
        case 'PRODUCT_LIST_MODEL':
          $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_NAME':
          $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
          break;
		  ///// cont. 4312 /////
		 case 'PRODUCT_LIST_30SALES':
          $listing_sql .= " p.products_recent_sales desc, pd.products_name desc";
          break;  
		   ///// END cont. 4312 /////
        case 'PRODUCT_LIST_MANUFACTURER':
          $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_QUANTITY':
          $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_IMAGE':
          $listing_sql .= "pd.products_name";
          break;
        case 'PRODUCT_LIST_WEIGHT':
          $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
        case 'PRODUCT_LIST_PRICE':
          $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
          break;
      }
    }
	$mmm=mysql_query($listing_sql);
	  $nubnn= mysql_num_rows($mmm);
	
  
  if($nubnn==1)
  {
  $proval=mysql_fetch_array($mmm);
  $product_id=$proval[products_id];
  
  <script language="javascript">
  window.location.href="product_info.php?products_id=<?=$product_id&osCsid=<?=$_REQUEST['osCsid'];";
  </script>
  <?
  }
  else
	{

    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
       
        
             
<?php
// optional Product List Filter
    if (PRODUCT_LIST_FILTER > 0) {
      if (isset($HTTP_GET_VARS['manufacturers_id'])) {
        $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
      } else {
        $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
      }
      $filterlist_query = tep_db_query($filterlist_sql);
      if (tep_db_num_rows($filterlist_query) > 1) {
        echo '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . '&nbsp;';
        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
          $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
        } else {
          echo tep_draw_hidden_field('cPath', $cPath);
          $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
        }
        echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
        while ($filterlist = tep_db_fetch_array($filterlist_query)) {
          $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
        }
        echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
        echo '</form></td>' . "\n";
      }
	  
	  ////////// cont. 4312 ////////////
	   // Additional Products Sort
			 echo '<td align="center" class="dynamicMain">' . tep_draw_form('sort', FILENAME_DEFAULT, 'get') /* '<b>Sort by:</b>&nbsp;&nbsp;'*/;
	
	
			 if (isset($HTTP_GET_VARS['manufacturers_id'])) {
				 echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
			 } else {
				 echo tep_draw_hidden_field('cPath', $cPath);
			 }
	
			 $sort_list = array('5d' => 'Best Sellers',
						'2a' => 'Products Name A to Z',
								'2d' => 'Products Name Z to A',
								'3a' => 'Price Low to High',
								'3d' => 'Price High to Low');
			 foreach($sort_list as $id=>$text) {
			  $sort_range[] = array('id' => $id, 'text' => $text);
			 }
	
			 //echo tep_draw_pull_down_menu('sort', $sort_range, (isset($HTTP_GET_VARS['sort']) ? $HTTP_GET_VARS['sort'] : ''), 'onchange="this.form.submit()"');
			// echo tep_draw_hidden_field('filter_id', (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''));
			 echo '</form></td>' . "\n";
		 // End Additional Products Sort
	  //////////END cont. 4312 ////////////
    }

// Get the right image for the top-right
    //$image = DIR_WS_IMAGES . 'table_background_list.gif';
    if (isset($HTTP_GET_VARS['manufacturers_id'])) {
      $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
      $image = tep_db_fetch_array($image);
      $image = $image['manufacturers_image'];
    } elseif ($current_category_id) {
      $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
      $image = tep_db_fetch_array($image);
      $image = $image['categories_image'];
    }

            
       
      <tr>
         <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);  
      </tr>
    </table></td>
<?php
  }
  } else { // default page

<!--   <tr>
    <td align="center" valign="top"><img src="images/banner.jpg" width="980" height="245" /></td>
  </tr>-->
  <?
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' AND c.categories_id IN(75,76,77,79,106,78,96) order by sort_order, cd.categories_name");
	  
    $number_of_categories = tep_db_num_rows($categories_query);

    $rows = 0;

    while ($categories = tep_db_fetch_array($categories_query)) {
      $cat_array[$categories['categories_id']]['categories_image'] = $categories['categories_image'];
	  $cat_array[$categories['categories_id']]['categories_name'] = $categories['categories_name'];	  
	  $cat_array[$categories['categories_id']]['cPath_new'] = tep_get_path($categories['categories_id']);
	}
  
  <tr>
    <td height="16" colspan="2">&nbsp;</td>
  </tr>
  <tr align="left" valign="top">
    <td align="left" colspan="2"><table  width="740"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="200px" height="258" align="center" valign="top"><table width="100%" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="260" align="center" valign="top" class="box-bg"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="top"><table width="200" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="36" colspan="2" align="left" valign="top"><span class="box-heading1"><?=$cat_array['75']['categories_name']</span><br />                        </td>
                    </tr>
                    <tr><td align="left" colspan="2" valign="top">
                     <? //='<a href="' . tep_href_link(FILENAME_DEFAULT, $cat_array['75']['cPath_new']) . '">' . tep_image(DIR_WS_IMAGES . $cat_array['75']['categories_image'], $cat_array['75']['categories_name'], 242, 191) . '</a><br><a href="' . tep_href_link(FILENAME_DEFAULT, $cat_array['75']['cPath_new']) . '"></a>';

 <?='<a href="' . tep_href_link($cat_array['75']['categories_name'].'-c-75.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['75']['categories_image'], $cat_array['75']['categories_name'], 242, 191) . '</a><br><a href="' . tep_href_link($cat_array['75']['categories_name'].'-c-75.html') . '"></a>';

</td>
                    </tr>
                    <tr>
                      <td><a href="<?=tep_href_link($cat_array['75']['categories_name'].'-c-75.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info</a> </td>
                      <td width="36">&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="1" bgcolor="#CCCCCC"></td>
        <td width="220px" align="right" valign="top"><table width="242" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="260" align="center" valign="top" class="box-bg"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="36" colspan="2" align="left" valign="top"><span class="box-heading1"><?=$cat_array['77']['categories_name']</span><br />                       </td>
                </tr>
                <tr><td align="left" colspan="2" valign="top">
                 <?='<a href="' . tep_href_link($cat_array['77']['categories_name'].'-c-77.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['77']['categories_image'], $cat_array['77']['categories_name'], 228, 193) . '</a';</td>
                </tr>
                <tr>
                  <td>
				  <a href="<?=tep_href_link($cat_array['77']['categories_name'].'-c-77.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info</a> </td>
                  <td width="36" align="left">&nbsp;</td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="1" bgcolor="#CCCCCC"></td>
        <td width="220px" align="center" valign="top"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="260" align="center" valign="top" class="box-bg"><table width="230px" height="244" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="top"><table width="218" height="244" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="36" colspan="2" align="left" valign="top"><span class="box-heading1"><?=$cat_array['76']['categories_name']</span><br />
                      </td>
                    </tr>
                    <tr><td align="left" colspan="3" width="' . $width . '" valign="top">
                     <?='<a href="' . tep_href_link($cat_array['76']['categories_name'].'-c-76.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['76']['categories_image'], $cat_array['76']['categories_name'], 254, 188) . '</a>';
                    </td></tr>
                    <tr>
                      <td width="203"><a href="<?=tep_href_link($cat_array['76']['categories_name'].'-c-76.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info</a></td>
                      
                      
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="1" colspan="5" bgcolor="#CCCCCC"></td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td width="1" bgcolor="#cccccc"></td>
        <td>&nbsp;</td>
        <td bgcolor="#cccccc"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="260" align="center" valign="top"><table width="100%" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="260" align="center" valign="top" class="box-bg"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="center" valign="top"> <table width="200" height="100%" border="0" cellpadding="0" cellspacing="0">
                       <tr>
						  <td height="36" colspan="3" align="left" valign="top"><span class="box-heading1"><?=$cat_array['96']['categories_name']  </span> </td>
						</tr>
						<tr>
						 <?='<td colspan="3" align="left" width="' . $width . '" valign="top"><a href="' . tep_href_link(str_replace(' ','_',$cat_array['96']['categories_name']).'-c-96.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['96']['categories_image'], $cat_array['96']['categories_name'], 233, 192) . '</a></td>';
							 
						</tr>
                      <tr>
                        
                        <td  colspan="2" align="left"><a href="<?=tep_href_link(str_replace(' ','_',$cat_array['96']['categories_name']).'-c-96.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info </a></td>
                        <td width="50">&nbsp;</td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="1" bgcolor="#cccccc"></td>
         <td width="200" align="center" valign="top"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top" class="box-bg"><table width="200" height="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="36" colspan="3" align="left" valign="top"><span class="box-heading1"><?=$cat_array['78']['categories_name']  </span><br />
                      <?php /* <span class="box-heading2">Price Per Sq Foot</span> <span class="box-heading3">(Members Only)</span><?php */ </td>
                </tr>
                <tr>
                 <?='<td colspan="3" align="left" width="' . $width . '" valign="top"><a href="' . tep_href_link(str_replace(' ','_',$cat_array['78']['categories_name']).'-c-78.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['78']['categories_image'], $cat_array['78']['categories_name'], 230, 182) . '</a></td>';
                     
                </tr>
                <tr>
                  
                  <td colspan="2" align="left"><a href="<?=tep_href_link(str_replace(' ','_',$cat_array['78']['categories_name']).'-c-78.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info</a> </td>
                  <td width="60">&nbsp;</td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        <td bgcolor="#cccccc"></td>
        <td align="center" valign="top"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" valign="top" class="box-bg"><table width="200" height="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="36" colspan="3" align="left" valign="top"><span class="box-heading1"><?=$cat_array['106']['categories_name'] </span><br />
                    <?php /* <span class="box-heading2">Price Per Sq Foot</span> <span class="box-heading3">(Members Only)</span><?php */ </td>
              </tr>
              <tr>
               <?='<td colspan="3" align="left" width="' . $width . '" valign="top"><a href="' . tep_href_link(str_replace(' ','_',$cat_array['106']['categories_name']).'-c-106.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['106']['categories_image'], $cat_array['106']['categories_name'], 217, 173) . '</a></td>';
              </tr>
              <tr>
                
                <td   align="left" colspan="2"><a href="<?=tep_href_link(str_replace(' ','_',$cat_array['106']['categories_name']).'-c-106.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info </a></td>
                <td width="60">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="1" colspan="5" bgcolor="#CCCCCC"></td>
        </tr>
      <tr>
        <td align="center" valign="top"><table width="270" height="244" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="260" align="center" valign="top" class="box-bg"><table width="200" height="244" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="top"><table width="200" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="36" colspan="3" align="left" valign="bottom"><span class="box-heading1"><?=$cat_array['79']['categories_name'] </span><br />
                            </td>
                    </tr>
                    <tr>
                     <?='<td align="left" colspan="3"  width="' . $width . '" valign="top"><a href="' . tep_href_link(str_replace(' ','_',$cat_array['79']['categories_name']).'-c-79.html') . '">' . tep_image(DIR_WS_IMAGES . $cat_array['79']['categories_image'], $cat_array['79']['categories_name'], 224, 189) . '</a></td>';
                    </tr>
                    <tr>
                       
                      <td width="65" align="left" colspan="2"><a href="<?=tep_href_link(str_replace(' ','_',$cat_array['79']['categories_name']).'-c-79.html')"><img src="images/bullet2.gif" width="5" height="9" border="0" /> more info </a></td>
                      <td width="60">&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="1"></td>
        <td colspan="3" align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25">&nbsp;</td>
          </tr>
          <tr>
            <td align="left" class="nav-strip"><h1><u>Banner Printing</u></h1><font size="3"><b>A cost effective method to boost business sale.</b></font></td>
          </tr>
          <tr>
            <td align="left" valign="top"><p>Sharp Banners is the most complete full large format <strong>banner printing</strong> services provider is currently online. We offer our customers the widest range of services large format banner printing combined with excellent customer service and execution time of the tech industry. </p>
                              <p>Our commitment is to provide a reliable and professional service to meet and exceed the expectations of our customers. We are proud and review to ensure that all required warehouse displays are simple and affordable. We guarantee the quality and superiority to all your poster printing wholesale, banners printing and exhibition panels wide format needs.</p></td>
          </tr>          
        </table></td>
        </tr>
        <tr>
          	<td colspan="5">
			<font size="3"><b>Popular Printing Products:</b></font><br>
          			<h2>Banner printing</h2>
            <p>We specialize in quality <strong>banner printing</strong> with the latest equipment and non-toxic eco-solvent inks for excellent durability. We create digital <strong>poster printing</strong> and photos on canvas printing paper and HP Premium Photo on canvas artist. This ensures the image is printed on the extension of the elegant material that allows photos to life.</p>
            <h2>Poster Printing</h2>
            <p>We offer a full range of offset and digital posters printing with no minimum order you want. You can count on our timeliness and streamlined process to provide the marketing materials you need printed on time. Our posters on glossy paper are a great way to create an image for enlargement holiday photos and our large canvas picture is a portrait of elegant wedding fantastic. Our digital posters printing technology can give you vivid colors, amazing detail and large size format poster printing, which can be found here! Print a poster with us today!</p>
            <h2>Vinyl Banner Printing</h2>
            <p>Vinyl banner printing has benefitted greatly from the advances in digital banner printing technology. Made from vinyl, these banners can withstand the most severe weather conditions. </p>
            <p>Traditional <strong>vinyl banners</strong> have long been used to print text based banners with a few elements of dated clipart, but in today’s technology savvy world it is necessary to go above and beyond.</p>
            <p>Our advanced <strong>vinyl banner printing</strong> facility is capable of producing printed banners with text and graphics that will draw praise and attention. We use the highest quality vinyl banners material, ink, and printers to produce an amazing banner that we guarantee to last 3-4 years.</p>
            <p>We offer various options and work with you, what vinyl banners are the best quality you need and at an affordable price. Let vinyl banners and signs the experts will help you with all Display & Signage needs!</p>
            <h2>Canvas Printing</h2>
            <p>In 1991, the Giclee printing (the art printing process using inkjet technology digital) entered the world of digital printing. Since then, digital <strong>canvas printing</strong> has allowed artists and photographers to create an elegant work of its digital portfolio.  </p>
            <p>Sharp Banners considers this a new level, offering a high quality canvas printing with no minimums and affordable prices direct to the public. Convert your favorite photos into a work of art printed directly on canvas, high quality cotton fiber true artist. We print on canvas from digital images and photos to any size. We offer a wide variety of sizes of canvas printing to ensure final product quality.</p>
            <p>Sharp banners can guarantee customer satisfaction for any photo or drawing on a gallery wrapped banner printing for a fraction of the industry. </p>
			<font size="3"><b>Why Sharp Banners?</b></font>
                        <p><span class="box-heading2"><br />
              Dedication</span><br />
              Sharp Banners is dedicated to delivering a professional product and easy-to-use square foot pricing. Most companies have minimums. We don't. We are a green company. Our experienced staff operates state of the art equipment using non-toxic Eco-Solvent Inks for extreme durability and excellent banner printing quality.</p>
                <p><span class="box-heading2">Our Promise</span><br />
                  We promise to make your experience with Industry Printing enjoyable and productive. 110% care and attention is given to every customer and job. Pride in our work shows we value our customers like family. </p>
              <p><span class="box-heading2">Service</span><br />
                We offer a wide variety of products and service including <strong>Banners printing</strong>, Posters printing, <a href="http://www.sharpbanners.com/Canvas-c-76.html"><b>Canvas printing</b></a>, Car Magnets printing, Trade Show Displays & Much More!!! Have a custom job? Just give us a call. We'll be glad to give you a quote.</p>
				<font size="3"><b>Skilled and Friendly staff:</b></font><p>
                We take the spirit of a helpful local printer and bring it conveniently to your computer desktop. Our Friendly posters & <strong>banners printing</strong> experts can assist you with all <strong>large banner printing</strong> applications.</p>
            </td>
          </tr>
      <tr>
        <td valign="top">&nbsp;</td>
        <td></td>
        <td>&nbsp;</td>
        <td></td>
        <td>&nbsp;</td>
      </tr>
    </table>
 <?php
  }

<!-- body_text_eof //-->
  
</table></td>

<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); 
<!-- footer_eof //-->
</center>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); 
<?php @include("./stats.php") <script language="JavaScript"></script>   ?>


