<style>
.box_shadow{/*-webkit-box-shadow:2px 2px 6px #b7b9b6;-moz-box-shadow:2px 2px 6px #b7b9b6;box-shadow:2px 2px 6px #b7b9b6; filter:progid:DXImageTransform.Microsoft.Shadow(color='#b7b9b6', Direction=135, Strength=3);*/background-color:#fff;}
.box_shadow:hover{background:#fefefe; border:1px solid #ccc;box-shadow:3px 3px 6px #cccccc;}

.goods_list{float:left;width:100px;padding:3px;display:inline;margin:10px 12px;overflow:hidden;position:; border:1px solid #EEEEEE;}
.B_Categories .goods_list{height:120px;}
.goods_picture div{/*position:absolute;bottom:0; right:0;*/}
.goods_list .goods_picture{height:100px;width:100%;overflow:hidden;text-align:center;position:relative;margin-bottom:7px;}
.goods_list .goods_name{display:block;font-size:9px;font-weight:normal;height:28px;overflow:hidden;line-height:14px;padding:0 0 2px;}
.goods_list .goods_name a{color:#000;filter:; font-size:9px;}
.goods_list .goods_name a:hover{color:#ff5a00;filter:;}
.goods_list .Reference_Price{display:block;padding:0 0 2px;text-align:center; font-size:11px; margin-top:3px; color:#CC0000;}
.tags_pic .goods_list .goods_name{display:block;font-size:11px;font-weight:normal;height:28px;overflow:hidden;line-height:14px;padding:0 0 2px; margin-bottom:34px;}
.goods_list .tags_price{float:right; width:80px;}
.goods_list .tags_pro{float:left;width:140px; color:#414141; height:54px;overflow:hidden; font-size:10px;}
.goods_list .list_stars{margin-top:5px;}
.tags_pic .goods_list .list_stars{margin-top:0;}
.tags_pic .goods_list{height:440px;width:226px;margin:10px 8px 30px 14px;}
.tags_pic .goods_picture{height:310px;}
.goods_list .save_per{padding:0 0 2px;filter:;}
.goods_list .list_stars .starsSmall_box{float:right;filter:;}
.goods_list .list_stars span{float:right;width:auto;display:block;}
.hover_cancel{height:9px;width:9px;background:url('./Cancel_but.gif') no-repeat 0 4px;}
.hover_cancel:hover{background:url('./Cancel_but2.gif') no-repeat 0 4px;text-decoration:none;}
.details_l{border:1px solid #FFB548; background:#F9F4E2; padding:10px 5px; }
.Reference_Price a{font-family: Georgia;font-size:12px; color:#B30000;font-weight: bold;}
#no_border{border:none; background:none;}
.current_i{ background:#666; color:#fff; border:1px solid #666666; height:14px; padding:3px 6px;} 
.s_result{border:1px solid #E9E9E9; border-bottom:none; background:#fff; height:30px;padding:0 10px;}
.s_result dt{float:left; line-height:28px; }
.s_result dd{float:right;}
.s_result dt b {color:#F38514;font-weight: 700;}

.d_result{background: #E9E9E9;border-top: 1px solid #D0D0D0;height: 29px;margin-bottom: 10px;padding: 0 10px;}
.d_result dt {float: left;padding-top: 6px;}
.d_result dd{float:right; padding-top:6px; font-size:11px;_padding-top:3px;}
.d_result dd .now {background: none repeat scroll 0 0 #4A4A4A;border: 1px solid #2D2D2D;color: #FFFFFF;display: inline-block;line-height: 12px;margin-right: 4px;padding: 2px;
vertical-align: middle; font-size:10px;}
.d_result dd a {background: none repeat scroll 0 0 #FFFFFF;border: 1px solid #999999;color: #999999;display: inline-block;font-weight: 700;line-height: 12px;margin-right: 4px;    padding: 2px;vertical-align: middle; font-size:10px;}
.d_result dd a:hover{color:#4a4a4a; border:1px solid #4a4a4a;}
.d_result dd select{color:#999; font-family:verdana; font-size:11px;}

.list, .grid, .gallery, .list_on, .grid_on, .gallery_on {background: url("https://www.beststoreitems.com/catalog/template/beststoreitems/image/thing.png") no-repeat scroll 0 0 transparent;display: inline-block;height: 16px;margin-right:7px;overflow: hidden;width: 16px;}
.list_on,.list:hover{background-position:0 -16px;}
.gallery_on,.gallery:hover{ background-position:-32px -16px;}
.gallery{ background-position:-32px 0;}
.grid{background-position:-16px 0;}
.grid_on,.grid:hover{ background-position:-16px -16px;}

#B_Categories{width:960px;}
.B_Categories .goods_list{height:126px;}
.heading{font-size:14px; font-weight:bold; color:#993300; margin-bottom:0;}
table.page{border-collapse:separate; border-spacing:5px;}
table.page tr,table.page td{font-size:11px;}
</style>
<link rel="stylesheet" type="text/css" href="catalog/template/beststoreitems/css/page.css">
<div style="width:100%;text-align:left;">
<script type="text/javascript">
 function change_amount()
 {
 	var amount=$("#change_amount").val();
 	location='https://www.beststoreitems.com/index.php?controller=showall&path=<?php echo $path?>&amount='+amount;
 }
</script>
	<!--start-->
    <div class="breadcrumb">
        <ul class="w-breadcrumb clearfix">
            <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <li class="sub">
            <a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?><i>&raquo;</i></a>
            </li>
            <?php } ?>
        </ul>
    </div>
    <!--end--> 
<table width="100%" style="margin-top:15px;">
		<tr>
	<td align="left">
        <dl class="s_result">
            <dt><b><?php echo $text_results; ?></b> items in <strong><?php echo $heading_title; ?></strong> category</dt>
            <dd>
            	<form action="<?php echo $action; ?>" method="post" name="pageform" enctype="multipart/form-data">

    <input type="hidden" name="page" value="1" />

    <script type="text/javascript">

		 function SelectPage(page)

		 {

		    document.pageform.page.value = page;

		 	document.pageform.submit();

			return false;

         };

	</script>

      <table cellspacing="5" cellpadding="0" class="page">

        <tr>

        <?php if ($page>1) { ?>

        <td id="page_box_previous"><a href="#" onclick="return SelectPage(<?php echo ($page-1); ?>);"><?php echo 'Previous'?></a></td>

        <?php };
        foreach ($pages as $pageentry) {   

                if ( $pageentry['value'] > ($page + max(9-$page,4)) ) {?>

                           <td id="page_box_next"><a href="#" onclick="return SelectPage(<?php echo ($page+1); ?>);"><?php echo 'Next'?></a></td>

                <?php 

                     break;

                 } ;

                

                if ( $pageentry['value'] < ($page - 4) ) {continue; }

                ?>

                                          

                <?php if ($pageentry['value'] == $page) { ?>

                <td width="20" height="16" align="center" valign="middle"><b class="current_i"><font size="1"><?php $x = explode(" ",$pageentry['text']);echo $x[0]; ?></font></b></td>

                <?php } else { ?>

                <td id="page_box" >

                <a href="#" onclick="return SelectPage(<?php echo $pageentry['value']; ?>);"><?php $x = explode(" ",$pageentry['text']);echo $x[0]; ?></a></td>

                <?php } ?>   

        <?php } ?>
        <td id="page_last">Go to Page
        	<select onchange="return SelectPage(this.value)" style="width:50px;">
        		<?php foreach ($pages as $pageentry){?>
        			<option value="<?php echo $pageentry['value']?>" <?php if ($pageentry['value'] == $page){echo 'selected';}?>><?php echo $pageentry['value']?></option>
        		<?php };?>
        	</select>
        </td>
      </tr></table>

    </form>
            </dd>
        </dl>
        <dl class="d_result">
        
            <dt>
                <label><a class="list" href="index.php?controller=list&path=<?php echo $path?>"></a></label>
                <label><a class="gallery" href="index.php?controller=category&path=<?php echo $path?>"></a></label>
                <label><a class="grid_on"></a></label>
            </dt>
        	<?php if (!$categories) { ?>
            
            <dd>
            	items per page:
               <?php if($amount==24){?><b class="now">24</b><?php }else {?>
                <a href="index.php?controller=<?php echo $view_controller?>&path=<?php echo $path?>&amount=24<?php if($view_controller=='sort')echo '&sort_by='.$sort_by?>">24</a>
                <?php }?>
                <?php if($amount==36){?><b class="now">36</b><?php }else {?>
                <a href="index.php?controller=<?php echo $view_controller?>&path=<?php echo $path?>&amount=36<?php if($view_controller=='sort')echo '&sort_by='.$sort_by?>">36</a>
                <?php }?>
                <?php if($amount==48){?><b class="now">48</b><?php }else {?>
                <a href="index.php?controller=<?php echo $view_controller?>&path=<?php echo $path?>&amount=48<?php if($view_controller=='sort')echo '&sort_by='.$sort_by?>">48</a>
                <?php }?>

                Showing:
                <select name="change_amount" id="change_amount" onchange="change_amount()">
                    <option value="50"<?php if($amount==50) echo 'selected'?>>50 per page</option>
                    <option value="100"<?php if($amount==100) echo 'selected'?>>100 per page</option>
                    <option value="150"<?php if($amount==150) echo 'selected'?>>150 per page</option>
                    <option value="200"<?php if($amount==200) echo 'selected'?>>200 per page</option>
                    <option value="300"<?php if($amount==300) echo 'selected'?>>300 per page</option>
                </select>
            </dd>
	<?php }?>
        </dl>
    </td>
    </tr>
    </table>
<div class="B_Categories"> 
  <ul>
      <?php foreach ($products as $product) { ?>
    <li class="goods_list box_shadow">
      <div class="goods_picture">             
         <a  href="<?php echo $product['href']; ?>"><img width="100"  alt="<?php echo $product['name']; ?>" src="<?php echo $product['thumb']; ?>"></a> </div>
	      <span class="Reference_Price current_price"><a href="<?php echo $product['href']; ?>"><?php echo $product['price']; ?></a></span>
	      <div class="list_stars"> 
	       <?php if($product['quantity']==0){?>
	  	     <span style="position:relative;top:-80px;"><img width="100" src="https://www.beststoreitems.com/catalog/template/beststoreitems/image/soldout_pending.jpg"></span>
	      <?php }?>
         </div>
    </li>
    <?php }?>
  </ul>
 
   <div class="hei20"></div>
</div>
    <table width="100%">

            <tr><td align="left">
                <dl class="s_result" id="no_border">
                	<dt><b><?php echo $text_results; ?></b> items in <strong><?php echo $heading_title; ?></strong> category</dt>
                </dl>
            </td>

            <td align="right">

          <table cellspacing="5" cellpadding="0" class="page">

            <tr>

            <?php if ($page>1) { ?>

            <td id="page_box_previous"><a href="#" onclick="return SelectPage(<?php echo ($page-1); ?>);"><?php echo 'Previous'?></a></td>
            <?php };

            foreach ($pages as $pageentry) {   

                    if ( $pageentry['value'] > ($page + max(9-$page,4)) ) {?>

                               <td id="page_box_next"><a href="#" onclick="return SelectPage(<?php echo ($page+1); ?>);"><?php echo 'Next'?></a></td>

                    <?php 

                         break;

                     } ;

                    

                    if ( $pageentry['value'] < ($page - 4) ) {continue; }

                    ?>

                                              

                    <?php if ($pageentry['value'] == $page) { ?>

                    <td width="20" height="16" align="center" valign="middle"><b class="current_i"><font size="1"><?php $x = explode(" ",$pageentry['text']);echo $x[0]; ?></font></b></td>

                    <?php } else { ?>

                    <td id="page_box" >

                    <a href="#" onclick="return SelectPage(<?php echo $pageentry['value'];?>)"><?php $x = explode(" ",$pageentry['text']);echo $x[0]; ?></a></td>

                    <?php } ?>   

            <?php } ?>
			<td>Go to Page
	        	<select onchange="return SelectPage(this.value)" style="width:50px;">
	        		<?php foreach ($pages as $pageentry){?>
	        			<option value="<?php echo $pageentry['value']?>" <?php if ($pageentry['value'] == $page){echo 'selected';}?>><?php echo $pageentry['value']?></option>
	        		<?php };?>
	        	</select>
	        </td>
          </tr></table>

    </td></tr></table>
</div>