<form name="cat_form">

	<? $title="Items For Sale By $postrecord[user_name]";
	require 'templates/'.$tfold.'/header.php';?>
	</td>
  </tr>
<tr><td>
<table cellpadding="0" cellspacing="0" width=100% border="0" class="ft2">
<th class="tr_border" colspan="6" ><font size="2"><b><div align="left">
&nbsp;&nbsp;Items for Sale By <?= $postrecord[user_name] ?></div> </b></font> </th>
<? if($total_records==0)
{
?>
<tr><td align="center">
<br>
<br>
<br>
<font size="2" color="#0000A0"> <? echo "$lang_527" ?></font>
<br>
<br>
<br></td></tr>
<tr align="center"><td><? require 'templates/'.$tfold.'/footer.php'?></td></tr>
</table>
</td></tr></table>
</form>
</body></html>
<? 
exit();
}
?>
<?
//if($view=="list")
//{
if($total_records > 0)
{
?>
<tr align="left">
<? 
$net=($currec-1*$limitsize+$end)-$total_records;
$dis=$limitsize+$start;
if($net <= 0) $net=$end;
if($dis<=$total_records)
{
?>
<td colspan=3 align="right">
<font size="2">Showing  <? echo $start+1; ?> <? echo " - ". $dis; ?> of <? echo $total_records; ?> <? echo "$lang_545" ?> </font></td>
<? 
}
 else 
{
?>
<tr align="left"><td colspan=3 align="right"><font size="2">Showing  <? echo $start+1;?><? echo " - ". $total_records; ?>  of <? echo $total_records; ?> Item </font></td>
<?
}
if($currec!=1)
{
?>
<td>
<a href="sellers_othersitem.php?currec=<?=($currec - 1);?>&view=<?=$view;?>&seller_id=<?=$seller_id;?>" >
 <font size="-3" color="#003366" face="Arial, Helvetica, sans-serif"><? echo "$lang_547" ?> </font></a></td>
<?
} 
$net=$total_records - ($currec*$limitsize+$end) + $end;
if($net >$limitsize) $net=$limitsize;
if($net <= 0) $net=$end;
if($total_records > ($start + $end)) 
{
?>  
<td><a href="sellers_othersitem.php?currec=<?=($currec + 1);?>&view=<?=$view;?>&seller_id=<?=$seller_id;?>" >
<font size=-3 color="#003366" face="Arial, Helvetica, sans-serif"> <? echo "$lang_546" ?> </font> </a></td>
<?
 }
 ?>
 </tr>
 <?
 //} 
} 
//} //if($view=="list");
?>
<tr bgcolor="#EEEEEE">
<td colspan=6>
<font size="2"><b>
<a href="sellers_othersitem.php?view=list&seller_id=<?=$seller_id;?>"><? echo "$lang_403" ?></a> 
 </b></font>| <font size="2"><b><a href="sellers_othersitem.php?view=gallery&seller_id=<?=$seller_id;?>"><? echo "$lang_114" ?></a> </b></font>
</td></tr>
<?
if($view=="list")
{
 ?>
<tr bgcolor="#DDDDDD">
<td><font class="head_font" ><b>Image</b></font></td>
<td><font class="head_font" ><b><? echo "$lang_145" ?></b></font></td><td><font class="head_font" ><b>Current Price</b></font></td>
 <td><font class="head_font" ><? echo "$lang_529" ?></font></td>  <td><font class="head_font" ><b>Ends</b></font></td></tr>
  <?
  }
 $c=1;
 if($view=="list")
 {
 $recordset=mysql_query($item_sql);
 while($record=mysql_fetch_array($recordset))
 {
$bid_sql="select * from site_bids where productid=$record[productid]";
$bid_res=mysql_query($bid_sql);
$bid=mysql_fetch_array($bid_res);
$tot_bid=mysql_num_rows($bid_res);
if($tot_bid!=0)
{
$current_price=$bid['bidding_amount'];
$no_bids=$tot_bid;
}
else
{
$current_price=$record['min_bid_amount'];
$no_bids="No Bid";
}
$expire_date =$record[expire_date]; 
  require 'ends.php';
  if($c==1)
  {
  $c=0;
  ?>
  <tr bgcolor="#EEEEEE">
 <?
 }
 else if($c==0)
 {
 $c=1;
 ?>
   <tr bgcolor="#FFFFFF">
 <?
 }
 ?>
<td>
 
 <? 
	if(!empty($record[picture1]))
	{ ?>
	 <a href="itechd.php?productid=<? echo $record['productid']; ?>"><img height="80" width="80" src="uploads/<? echo $record['picture1']; ?>" border=0></a> 
	<?
	 }
	 else
	 {
	 	?>
		 <a href="itechd.php?productid=<? echo $record['productid']; ?>"><img height="80" width="80" src="templates/<? echo "$tfold" ?>/img_files/no-image.gif" border=0></a> 
 <? 
 }
  ?>		 
 
 </td><td><a href="itechd.php?productid=<? echo $record['productid']; ?>">
 <?=$record['producttitle']; ?></a></td><td><?= $current_price; ?></td>
<td><?= $no_bids; ?></td>
<td><?= $string_difference; ?></td></tr>
<?
} //while($record=mysql_fetch_array($recordset))
} //if($view=="list")
else if($view=="gallery")
{
?>
<tr><td>
<?
$display=1;
$count=0;	
$recordset=mysql_query($item_sql);
while($record=mysql_fetch_array($recordset))
 {
 $count=$count+1;
 $bid_sql="select * from site_bids where productid=$record[productid]";
$bid_res=mysql_query($bid_sql);
$bid=mysql_fetch_array($bid_res);
$tot_bid=mysql_num_rows($bid_res);
if($tot_bid!=0)
{
$current_price=$bid['bidding_amount'];
$no_bids=$tot_bid;
}
else
{
$current_price=$record['min_bid_amount'];
$no_bids="No Bid";
}
$expire_date =$record[expire_date]; 
  require 'ends.php';
  if($display==1)
  {
  $display=2;
echo "<tr>"; 
 }
 else if($display==2)
  $display=1;
?>
<td>
<table width="299" cellpadding="0" cellspacing="0" >
<tr><td>
<? 
	if(!empty($record[picture1]))
	{ ?>
	 <a href="itechd.php?productid=<? echo $record['productid']; ?>">
	 <img height="120" width="120" src="uploads/<? echo $record['picture1']; ?>" border=0></a> 
	<?
	 }
	 else
	 {
	 	?>
		 <a href="itechd.php?productid=<? echo $record['productid']; ?>">
		 <img height="120" width="120" src="templates/<? echo "$tfold" ?>/img_files/no-image.gif" border=0></a> 
     <? 
     }
    ?>		 
</td><td width=142><a href="itechd.php?productid=<? echo $record['productid']; ?>"><?=$record['producttitle']; ?></a>
<br><?= $current_price; ?>
<br><? echo "$lang_548" ?><?= $string_difference; ?></td></tr></table>
</td>

<? 
if($display==1)
{
echo "</tr>";
if($count<$total_records)
{
?>
<tr width=768><td colspan="2"><hr noshade size="1" color="#CCCCCC"></td></tr>

<?
}
 }
?>


<?
} //while
} //else if($view=="gallery")


?>

</td></tr>

</table>
<tr align="center"><td><? require 'templates/'.$tfold.'/footer.php'?></td></tr>
</table>
</form>
</td></tr>
</table>
