dantana1776
asked on
Pulling an image from the database
I am trying to write a script whereby if an image is not uploaded to the site then it will display an icon image that corresponds to the category id that the user has selected by default. I wrote a query and tested it on SQLyog and the query works. I just cannot get it to funtion on the template page and actually pull the information out of the database and display it on the page.
<TABLE cellSpacing=0 cellPadding=0 width=206 class=table_border
border=0 height="250">
<tr><td align="center">
<?
if(!empty($row['picture1'] ))
{
$img=$row['picture1'];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>160)
{
$nw=160;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img name="runimg" src="images/<? echo $row['picture1']; ?>" border=1 width=<?= $w; ?> height=<?=$h?> >
<?
}
else
{
$result = mysql_query "SELECT
placing_item_bid.category_ id
, category_master.icon_1
FROM
school_auction.category_ma ster
, school_auction.placing_ite m_bid
WHERE
placing_item_bid.category_ id=categor y_master.c ategory_id and category_master.icon_1=cat egory_mast er.icon_1; "
$row = mysql_fetch_array( $result );
$img=$row['icon_1'];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
?>
<img name="runimg" src="images/<? echo $row['icon_1']; ?>" border=1 width=<?= $w; ?> height=<?=$h?> >
<?
}
?>
</td></tr>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=206 class=table_border
border=0 height="250">
<tr><td align="center">
<?
if(!empty($row['picture1']
{
$img=$row['picture1'];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>160)
{
$nw=160;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img name="runimg" src="images/<? echo $row['picture1']; ?>" border=1 width=<?= $w; ?> height=<?=$h?> >
<?
}
else
{
$result = mysql_query "SELECT
placing_item_bid.category_
, category_master.icon_1
FROM
school_auction.category_ma
, school_auction.placing_ite
WHERE
placing_item_bid.category_
$row = mysql_fetch_array( $result );
$img=$row['icon_1'];
list($width, $height, $type, $attr) = getimagesize("images/$img"
?>
<img name="runimg" src="images/<? echo $row['icon_1']; ?>" border=1 width=<?= $w; ?> height=<?=$h?> >
<?
}
?>
</td></tr>
</TABLE>
ASKER
When I load the page with the script it just displays a blank white screen
You are probably getting an error message then, but on that server error messages are not being displayed.
Try adding this to the top of your file:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
That should enable displaying error messages on that page.
Try adding this to the top of your file:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
?>
That should enable displaying error messages on that page.
ASKER
Tried adding that but still getting a blank screen. Here is the full source. It's actually a .tpl file I don't if that would make a difference for that script.
<?php
/************************* ********** ********** ********** ********** **********
*File Name :detail.tpl
*File Created :Wednesday, June 21, 2006
* File Last Modified :Wednesday, June 21, 2006
* Copyright :(C) 2001 AJ Square Inc
* Email :licence@ajsquare.net
* Software Language :PHP
* Version Created :V 4.3.2
* Programmers worked :S.Priya, B.ReenaKumari, K.Shanmuga priya
* $Id : memberlist.php,v 1.36.2.12 2006/02/07 20:42:51 grahamje Exp $
*
************************** ********** ********** ********** ********** *********/
/************************* ********** ********** ********** ********** ********** *
* Licence Agreement:
* This program is a Commercial licensed software;
* you are not authorized to redistribute it and/or modify/and or sell it under any publication
* or license /or term it under the GNU General Public License as published by the Free Software Foundation;
* either user and developer versions of the License, or (at your option)
* any later version is applicable for the same.
************************** ********** ********** ********** ********** ********** */
?>
<? require 'include/connect.php'; ?>
<table width="980" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top">
<?
$title="Details of item";
require 'include/detail_top.php';
?>
</td>
</tr>
<tr><td> List ed in Category :
<?
if($cat_sql_row[category_h ead_id])
{
cat_display($cat_sql_row[c ategory_he ad_id],$ca t_string);
}
?>
<a href="category.php?cate_id =<?= $cat_sql_row[category_id] ?>"><?= $cat_sql_row[category_name ] ?></a>
</td></tr>
<tr><td valign="top">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border=0>
<tr><td colspan="3" class="tr_border" height=30>
<table width="100%"><tr><td align="left"><font size="3">
<b><div align="left">
<? echo ucwords($row['item_title'] ); ?>
</div> </b></font>
</td>
<td align="right" style="padding-right:5px"> <b>Item #(</b> <?= $row['item_id']; ?>) </td></tr>
<?
if($row[sub_title])
{
?>
<tr><td colspan="2" style="padding-left:20px"> <?= $row[sub_title] ?> </td></tr>
<?
}
?>
</table>
</td></tr>
<tr align="center" height=35>
<td width=2> </td>
<?
if(!empty($warning))
{
?>
<td class="table_bgcolor_withb order" align="center">
<font size="2" color="red">
<b> <?= $warning?></b></font>
<?
}
if($email_to_status)
{
?>
<td class="table_bgcolor_withb order" align="center">
<font size="2" color="red">
<b> <?= $email_to_status?></b></fo nt>
<?
}
else if($success_mes)
{
?>
<td class="table_bgcolor_withb order" align="center">
<font size="2" color="red">
<b> Item Purchased Successfully! </b></font>
<?
}
else if($watch_flag==1)
{
$watch_tot_sql="select count(*) from watch_list where user_id=$user_id";
$watch_ins_sql=mysql_query ($watch_to t_sql);
$watch_res_sql=mysql_fetch _array($wa tch_ins_sq l);
$watch_tot=$watch_res_sql[ 0];
?>
<td class="table_bgcolor_withb order" align="center">
<font size="2" color="red">
<b> This item is being watched in My Auction (<a href="watchlist.php" style="text-decoration:non e"> <?= $watch_tot?> items </a>)
<!-- This item has been added to Watchlist. --> </b></font>
<?
}
else if(empty($_SESSION[userid] ))
{
?>
<td class="table_bgcolor_withb order" align="left">
Bidder or seller of this item?</B> <A href="signin.php">Sign in</A> for your status
<?
}
else
{
?>
<td class="table_bgcolor_withb order" align="left">
Welcome
<?
}
?>
<span align="right"> &nbs p; &n bsp; &nbs p; &n bsp; &nbs p; &n bsp;
<?
if($watch_flag!=1)
{
?>
<a href="detail.php?item_id=< ?= $row['item_id'] ?>&mode=watch" >Watch this Item</a>
<?
$mode="";
}
?>
|
<a href="forward_to_friend.ph p?item_id= <?= $row['item_id']; ?>" >Forward to a Friend</a>
</span>
</td>
<td width=2> </td>
</tr>
</table></td></tr>
<tr><td width= align="center">
<table width=100% align="center" cellpadding="5" cellspacing="2">
<tr>
<td valign="top">
<TABLE cellSpacing=0 cellPadding=0 width=206
border=0>
<tr><td valign="top">
<TABLE cellSpacing=0 cellPadding=0 width=206 class=table_border
border=0 height="250">
<tr><td align="center">
<?
if(!empty($row['picture1'] ))
{
$img=$row['picture1'];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>160)
{
$nw=160;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img name="runimg" src="images/<? echo $row['picture1']; ?>" >
<?
}
else
{
$result = "SELECT
placing_item_bid.category_ id
, category_master.icon_1
FROM
school_auction.category_ma ster
, school_auction.placing_ite m_bid
WHERE
placing_item_bid.category_ id=categor y_master.c ategory_id and category_master.icon_1=cat egory_mast er.icon_1; "
$query=mysql_query($result );
$row = mysql_fetch_array($query);
$img=$row['icon_1'];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
?>
<img src="images/<? echo $row['icon_1']; ?>" border=1 name="runimg" >
<?
}
?>
</td></tr>
</TABLE>
</td></tr>
<tr><td class="mylist" align="center" height="30">
<font size="-1">
<a href="#" id="dislink" onClick="window.open('view _full_size .php?item_ id=<?= $row[item_id];?>&i=1','pop _up','tool bar=no, top=0,location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=400')">View Album </a></font>
</td></tr>
</TABLE>
</td>
<td width=1> </td>
<td valign="top">
<? if($row['selling_method']= ="auction" or $row['selling_method']=="d utch_aucti on")
{
?>
<table cellpadding="5" cellspacing="0" width=300 >
<tr>
<td width="100">Current Bid : </td>
<td ><? echo $row['currency']." ".$current_price; ?>
<?
if($row['reserve_price']!= "0.00")
{
if($row['reserve_price'] <= $current_price )
{
?>
( <font size="1" color="red">Reserve Price has been met</font> )
<?
}
else
{
?>
( <font size="1" color="red">Reserve Price has not been met</font> )
<?
}
}
?>
</td>
</tr>
<tr>
<td width="100">Starting Bid : </td>
<td><? echo $row['currency']." ".$row['min_bid_amount'];? > </td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr><td>Quantity :</td> <td><? echo $row['Quantity'];?></td> </tr>
<?
if(($row[privatelistings]= ="No") or empty($row[privatelistings ]))
{
?>
<tr> <td>Bid History: </td>
<?
if($tot[0]!=0)
{
?>
<td><a href="bidhistory.php?item_ id=<?= $row['item_id']?> "><? echo $tot[0];?></a></td>
<?
}
else
{
?>
<td width="130"><? echo "-"; ?></td>
<?
}
?>
</tr>
<?
}
?>
<tr><td>Highest Bidder : </td>
<?
if($highest_bidder)
{
?>
<td><a href="feedback.php?user_id =<?=$max[' user_id']; ?>" id="dislink">
<? echo $highest_bidder;?></a>&nbs p; &n bsp; ( <a href="feedback.php?user_id =<?=$max[' user_id']; ?>" id="dislink"><? echo $high_feed_tot[feedbacktot al]; ?></a><img src="images/<?= $feedback_highimg ?>" /> )</td>
<?
}
else
{
?>
<td width="130"><? echo "-"; ?></td>
<?
}
?>
</tr>
<tr>
<td>Ending Time : </td>
<?
$expire_date=$row['expire_ date'];
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c ost']))
{
?>
<td><? echo $row['currency'] ?> <?= number_format(($row['shipp ing_cost'] ),2,'.','' ); ?>
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<!-- <tr>
<td>Size Of Quantity: </td>
<? if(!empty($row['size_of_qu antity']))
{
?>
<td><? echo $row['size_of_quantity'];? ></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Shipping From: </td>
<?
if(!empty($country['countr y']))
{
?>
<td><? echo $country['country'];?></td >
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Shipping To: </td>
<? if(!empty($row['shipping_r oute']))
{
?>
<td>
<?
$shipping_array=$row['ship ping_route '];
$shipping=explode(",",$shi pping_arra y);
$ship_sql="select * from shipping_location";
$ship_res=mysql_query($shi p_sql);
$total=mysql_num_rows($shi p_res);
$j=1;
while($ship_row=mysql_fetc h_array($s hip_res))
{
for($i=0;$i<=$total;$i++)
{
if($ship_row['ship_id']==$ shipping[$ i])
{
?>
<?=$ship_row[location];?>& nbsp;
<?
}
}
}
?>
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<?
$cat_sql="select * from cat_slave where category_id=".$row['catego ry_id'];
if($custom_res=mysql_query ($cat_sql) )
{
$customrow=mysql_fetch_arr ay($custom _res);
$tablename=$customrow[tabl ename];
if($tablename)
{
$tab_sql="select * from $tablename";
$tab_res=mysql_query($tab_ sql);
$i = 2;
while ($i < mysql_num_fields($tab_res) )
{
$tab_col = mysql_fetch_field($tab_res , $i);
$table_sql="select * from $tablename where item_id=$item_id";
$table_res=mysql_query($ta ble_sql);
$tablerow=mysql_fetch_arra y($table_r es);
?>
<tr><td><?= $tab_col->name; ?> </td><td> <?= $tablerow[$tab_col->name] ?> </td></tr>
<?
$i++;
} // while
}
}
?>
</table>
<?
}
else if($row['selling_method']= ="fix")
{
?>
<table cellpadding="5" cellspacing="0" width=300 >
<tr>
<td width="100">Fixed Price : </td>
<td ><? echo $row['currency']." ".$row[quick_buy_price];
$current_price=$row[quick_ buy_price] ; ?></td>
</tr>
<tr>
<td>Ending : </td>
<?
$expire_date=$row['expire_ date'];
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr>
<td>Started: </td>
<td>
<?
$bid_startdate= explode(" ",$row['bid_starting_date' ]);
echo $bid_startdate[0];
?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<!-- <tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c ost']))
{
?>
<td><? echo $row['currency']." ".$row['shipping_cost'];?> </td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Ending Time : </td>
<?
$expire_date=$row['expire_ date'];
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c ost']))
{
?>
<td><? echo $row['currency']." ".$row['shipping_cost'];?> </td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<!-- <tr>
<td>Size Of Quantity: </td>
<? if(!empty($row['size_of_qu antity']))
{
?>
<td><? echo $row['size_of_quantity'];? ></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Shipping From: </td>
<?
if(!empty($country['countr y']))
{
?>
<td><? echo $country['country'];?></td >
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Shipping To: </td>
<? if(!empty($row['shipping_r oute']))
{
?>
<td>
<?
$shipping_array=$row['ship ping_route '];
$shipping=explode(",",$shi pping_arra y);
$ship_sql="select * from shipping_location";
$ship_res=mysql_query($shi p_sql);
$total=mysql_num_rows($shi p_res);
$j=1;
while($ship_row=mysql_fetc h_array($s hip_res))
{
for($i=0;$i<=$total;$i++)
{
if($ship_row['ship_id']==$ shipping[$ i])
{
?>
<?=$ship_row[location];?>& nbsp;
<?
}
}
}
?>
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<tr>
<?
$cat_sql="select * from cat_slave where category_id=".$row['catego ry_id'];
if($custom_res=mysql_query ($cat_sql) )
{
$customrow=mysql_fetch_arr ay($custom _res);
$tablename=$customrow[tabl ename];
if($tablename)
{
$tab_sql="select * from $tablename";
$tab_res=mysql_query($tab_ sql);
$i = 2;
while ($i < mysql_num_fields($tab_res) )
{
$tab_col = mysql_fetch_field($tab_res , $i);
$table_sql="select * from $tablename where item_id=$item_id";
$table_res=mysql_query($ta ble_sql);
$tablerow=mysql_fetch_arra y($table_r es);
?>
<tr><td><?= $tab_col->name; ?> </td><td> <?= $tablerow[$tab_col->name] ?> </td></tr>
<?
$i++;
} // while
}
}
?>
</table>
<?
}
?>
</td>
<td width=1> </td>
<td valign="top">
<table cellpadding="0" cellspacing="0" class=table_border width=100%>
<tr><td class="tr_border"><font size="+1"> &nbs p;Seller Information</font></td></t r>
<tr><td>
<table cellpadding="5" cellspacing="2">
<tr>
<td valign="middle"><a href="feedback.php?user_id =<?=$row[' user_id']; ?>" id="dislink"><? echo $user['user_name'];?></a>& nbsp;  ; &nb sp;( <a href="feedback.php?user_id =<?=$row[' user_id']; ?>" id="dislink"><? echo $feed_tot[feedbacktotal]; ?></a><img src="images/<?= $feedback_img ?>" /> ) </td>
</tr>
<tr>
<td><b> & nbsp;  ; &nb sp; F eedBack Score: <? echo $feed_tot[feedbacktotal]; ?></b> </td>
</tr>
<tr>
<td><b> & nbsp;  ; &nb sp; P ositive FeedBack:<?= $positive_percentage ?> %</b></td>
</tr>
<tr>
<td> &nbs p; &n bsp; Memb er Since
<?
$custom_date=explode(" ",$user['date_of_registrat ion']);
$custom_date1=$custom_date [0];
$custom_time=$custom_date[ 1];
$custom_date3=substr($cust om_date1," -2");
$custom_date2=explode("-", $custom_da te1);
$custom_date1=$custom_date 2[0];
$custom_date2=$custom_date 2[1];
$custom_date4=$custom_date 3."-"."$cu stom_date2 "."-"."$cu stom_date1 "." "."$custom_time";
echo $custom_date4; ?> in <?= $country['country']; ?></td>
</tr>
<?
$user=$row[user_id];
$sql=mysql_query("select * from user_registration where user_id=".$user);
$res=mysql_fetch_array($sq l);
$org=$res[organisation];
?>
<tr><td style="padding-left:30px;" ><strong>O rganizatio n : </strong><?=$org?></td></t r>
<?
$admin_cat_sort="select * from admin_settings where set_id=45";
$admin_cat_res=mysql_query ($admin_ca t_sort);
$admin_catrow=mysql_fetch_ array($adm in_cat_res );
if($admin_catrow[2]==1)
{
if($row[user_id]!=$_SESSIO N[userid])
{
?>
<tr>
<td><a href="ask_seller_qus.php?i tem_id=<?= $row[item_id]; ?>" >Ask the Seller a Question</a></td>
</tr>
<?
}
}
else if($admin_catrow[2]==2 and $_SESSION[username]!="")
{
if($row[user_id]!=$_SESSIO N[userid])
{
?>
<tr>
<td><a href="ask_seller_qus.php?i tem_id=<?= $row[item_id]; ?>" >Ask the Seller a Question</a></td>
</tr>
<?
}
}
?> <tr>
<td>
<a href="sellers_othersitem.p hp?seller_ id=<?=$row ['user_id' ]; ?>" >View seller's other items</a>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><a href="feedback.php?user_id =<?=$row[' user_id']; ?>" >Read Feedback</a></td>
</tr>
<tr>
<td><a href="detail.php?item_id=< ?= $item_id ?>#view" >View Questions and Comments.</a></td>
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</td></tr>
<tr><td align=center>
<table cellpadding="0" cellspacing="0" class="table_border" width=100%>
<tr><td class="mylist">
<font size="+1"> &nbs p;
Item Description:</font> </td></tr>
<tr align="center">
<td> </td>
</tr>
<!--- themes ----- -->
<tr><td colspan="2" align="left">
<?
if($row[themes_id])
{
$img=$theme_top;
list($width, $height, $type, $attr) = getimagesize("images/$img" );
?>
<table width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td background="images/<?= $theme_top ?>" style="background-repeat:n o-repeat" height=<?= $height ?> align="left" ></td></tr>
<tr><td background="images/<?= $theme_content ?>" style="background-repeat:r epeat-y" align="left" >
<?
if($row[layout]=="layout_t op.gif")
{
?>
<table width=100% cellpadding="5">
<tr><td align="center">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td style="padding:50px" > <?= $row[detailed_descrip]; ?> </td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table>
<?
} // end of top layout
?>
<?
if($row[layout]=="layout_b ottom.gif" )
{
?>
<table width=100% cellpadding="5" >
<tr><td style="padding:50px" > <?= $row[detailed_descrip]; ?> </td></tr>
<tr><td align="center">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table>
<?
} // end of bottom layout
?>
<?
if($row[layout]=="layout_l eft.gif")
{
?>
<table width=100% cellpadding="5" >
<tr><td align="left" > <table>
<tr><td align="center" style="padding-left:20px">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type,$attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table></td><td style="padding:50px" valign="top"> <?= $row[detailed_descrip]; ?> </td></tr>
</table>
<?
} // end of left layout
?>
<?
if($row[layout]=="layout_r ight.gif")
{
?>
<table width=100% cellpadding="5" >
<tr>
<td style="padding:50px" valign="top"> <?= $row[detailed_descrip]; ?> </td>
<td>
<table>
<tr><td align="left">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type,$attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img" );
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table></td></tr>
</table>
<?
} // end of right layout
?>
</td></tr>
<?
$img=$theme_bottom;
list($width, $height, $type, $attr) = getimagesize("images/$img" );
?>
<tr><td background="images/<?= $theme_bottom ?>" style="background-repeat:n o-repeat" width=100% height=<?= $height ?> align="left" >
</td></tr>
</table>
<?
} // end of if($themes_id)
else
{
?>
<tr align="center">
<td><? echo $row['detailed_descrip']; ?></td>
</tr>
<?
}
?>
</td></tr>
<!---- end of themes --->
<!-- <tr><td> <table width=770 cellpadding="5" cellspacing="2">
<tr>
<?
if(!empty($row['picture1'] ))
{
?>
<td align="center"><img src="images/<? echo $row['picture1']; ?>" border=0> </td>
<?
}
?>
<?
if(!empty($row['picture2'] ))
{
?>
<td align="center"><img src="images/<? echo $row['picture2']; ?>" border=0> </td>
<?
}
?>
<?
if(!empty($row['picture3'] ))
{
?>
<td align="center"><img src="images/<? echo $row['picture3']; ?>" border=0 > </td>
<?
}
?>
</tr></table></td></tr> -->
<tr><td align="center">
<br />
<?
if($row[clicks] > 0)
{
?>
<font size=2> This item has been viewed </font>
<? if($row[item_counter_style ]==1)
{
?>
<b><font size=+1 color="#009900">
<?= $row[clicks]; ?>
</font>
</b>
<?
}
else
{ ?>
<b><I><font size=+1 color="#003399">
<?= $row[clicks]; ?>
</font>
</I></b>
<?
}
?>
times. </font>
<?
}
?>
</td></tr>
</table></td></tr>
<tr><td>
<br />
<table width=100% align="center">
<tr><td class=tr_border><font size="+1"> &nbs p;
Cross Promoted Items</font>
</td></tr>
<tr><td align="center"><? if(empty($row[crosspromote ]))
{
echo "<font size=2>No Items are Cross Promoted</font>";
}
else
{
$sqlpromoteitem="select * from placing_item_bid where item_id=$row[crosspromote] ";
$sqlqrypromoteitem=mysql_q uery($sqlp romoteitem );
$sqlfetchpromoteitem=mysql _fetch_arr ay($sqlqry promoteite m);
?>
<table align="center" width="20%" border=1>
<tr height="30"><td class=tr_border align="center"><strong>Mor e Great Items From This Seller</strong></td></tr>
<?
if(!empty($sqlfetchpromote item[pictu re1]))
{
?>
<tr><td align="center"><img src=images/<?=$sqlfetchpro moteitem[p icture1]?> height=200 width=350></td></tr>
<?
}
?>
<tr><td class=tr_border align="center">
<a href=detail.php?item_id=<? =$sqlfetch promoteite m[item_id] ?>><?=$sql fetchpromo teitem[ite m_title]?> </a></td>< /tr>
</table>
<?
}
?>
</td></tr>
</table></td></tr>
<?
if($row[payment_instructio ns] or $row[returnpolicy_instruct ions])
{
?>
<tr><td>
<br />
<table width=100% align="center">
<tr><td class=tr_border><font size="+1"> &nbs p;
Payment and Return Policy Details</font>
</td></tr>
<?
}
?>
<?
if($row[payment_instructio ns])
{
?>
<tr><td>
<?= $row[payment_instructions] ?>
</td></tr>
<?
}
?>
<?
if($row[returnpolicy_instr uctions])
{
?>
<tr><td>
<?= $row[returnpolicy_instruct ions] ?>
</td></tr>
<?
}
?>
</table>
</td></tr>
<tr><td>
<br /><a href="#" id=view></a>
<table width=100% align="center">
<tr><td class=tr_border>
<!-- <a href="ask_seller_qus.php?i tem_id=<?= $row[item_id]; ?>" name=view>
<font size=2><b>Ask the Seller a Question</b></font></a> -->
<font size=3><b> Ques tions and Answers</b></font>
</td></tr>
<? $ask_sql="select * from ask_question where item_id=".$row[item_id];
$ask_res=mysql_query($ask_ sql);
if(mysql_numrows($ask_res) >0)
{
while($askrow=mysql_fetch_ array($ask _res))
{
if($askrow[answer])
{
?>
<tr bgcolor=white><td><img src="images/question.gif"> &nbs p;
<?= $askrow[question];?>
</td></tr>
<tr><td style="border-bottom:1px solid gray";>
<img src="images/answer.gif">&n bsp;
<?= $askrow[answer];?>
</td></tr>
<?
}
}
}
else
{
?>
<tr><td align="center"><font size="2" color="red">No Queries!</font></td></tr>
<?
}
?>
</table>
</td></tr>
<tr><td>
<br />
<table width="100%" border="0" align="center" cellspacing=0 cellpadding="0">
<tr><td class="tr_border" height="30" colspan="3"><font size="+1"> &nbs p;
<?
if($row[quick_buy_price] and ($row[selling_method]=="au ction" or $row[selling_method]=="dut ch_auction "))
echo "Ready to bid or buy?";
else if($row[selling_method]==" fix")
echo "Ready to buy?";
else if($row[selling_method]==" auction" or $row[selling_method]=="dut ch_auction ")
echo "";
?>
</font></td>
</tr>
<tr>
<td width=50% valign="top" align="center">
<?
if($row[selling_method]==" auction" or $row['selling_method']=="d utch_aucti on")
{
?>
<table width="100%" border="0" align="center" >
<tr><td>
<table width="100%" border="0" align="center" >
<th height=15 >
<font size="2"><b><div align="left">
Place a Bid </div> </b></font> </th>
<tr><td colspan=2>
<table width="100%" cellpadding="5" cellspacing="2">
<form name=bid_form action=bidding.php method=post onSubmit="return validate()">
<?
/* if($row['reserve_price'])
{
if($row['reserve_price'] <= $current_price )
{
?>
<tr><td colspan="2" align="center"> <font size="2" color="red">Reserve Price has been met</font> </td></tr>
<?
}
else
{
?>
<tr><td colspan="2" align="center"> <font size="2" color="red">Reserve Price has not been met</font> </td></tr>
<?
}
} */
?>
<tr >
<td >Current Bid:</td>
<td align="left"><? echo $row['currency']." ".$current_price;?></td>
</tr>
<tr >
<td >Increment:</td>
<td><? echo $row['currency']." ".$row['bid_increment']; ?></td>
</tr>
<tr >
<td>Your Maximum Bid</td>
<td><input type="text" name="max_bid" <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>></td></tr>
<tr ><td> </td>
<td>( Minimum Bid:<? echo $row[currency]." ".($current_price+$row['bi d_incremen t']) ?> )</td>
</tr>
<tr >
<?
if($row['selling_method']= ="dutch_au ction")
{
if($row[Quantity] > 0 )
{
?>
<td height="27" >Quantity:</td>
<td align="left">
<select name=qty <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>>
<option value="Quantity">Quantity< /option>
<? for($i=1;$i<=$row[Quantity ];$i++)
{
?>
<option value="<?= $i;?>"><?= $i;?></option>
<?
}
?>
</select>
</td>
<?
}
?></tr>
<?
}
else
{
?>
<input type="hidden" name=qty value=1>
<?
}
?>
<tr ><td align="left" colspan="2">
<input name="chk" type="checkbox" value="chk" <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>>
Email Reminder for Highest Bidder</td> </tr>
<tr>
<td colspan="2" align=center>
<input type="submit" value="Place bid" class=buttonbig <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>>
<? /* if(!empty($row[reserver_pr ice]))
{
?> Buy Now is only available until
the reserve price is met
<input name="button" type="button" class=buttonbig onClick=quick("<?= $item_id;?>") value="Quick Buy" >
<?
} */
?>
<input type="hidden" name=flag value=1>
<input type="hidden" name=err_flag value=<?= $err_flag; ?>>
<input type="hidden" name=item_id value=<?= $item_id; ?> >
</td></tr>
</form>
</table></td>
</tr>
</table></td>
<?
if($row[quick_buy_price]!= 0)
{
if($row['reserve_price'] >= $current_price or $row['reserve_price']==0.0 0)
{
?>
<td bgcolor="#CCCCCC" width=1> </td>
<td width=50% valign="top">
<table width="100%" align="center" cellpadding="5" cellspacing="2" id=buyitnow>
<th height=15>
<font size="2"><b><div align="left">
Buy it now</div> </b></font> </th>
<tr><td align="center"><br>
<font size="2">Buy Now Price:</font>
&n bsp; <?= $row['currency']; ?> <?= $row['quick_buy_price']; ?>
<br></td></tr>
<form name=fix_form action="detail.php" method=post >
<input type="hidden" name=qty value=1>
<input type="hidden" value=1 name=flag>
<input type="hidden" value="<?= $err_flag; ?>" name="err_flag" >
<input type="hidden" value="fix" name="sell_method">
<input type="hidden" value="<?= $item_id;?>" name=item_id>
<input type="hidden" value="<?= $row[quick_buy_price];?>" name=fixed_price>
<tr><td align="center">
<input type="button" value=Buyitnow onClick="confirm_buynow()" ; <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>>
</td></tr>
</form>
<tr><td align="center">
<br>
<?= $_SESSION[site_name] ?> Pro will inform the seller of your intent to purchase this item.<br><br>
Your purchase is a contract between you and the item seller. <br>
If you submit this purchase you will enter into a legally binding contract. </td></tr>
</table>
<?
}
}
?>
</td>
</tr></table>
<?
} //if(selling_method=="auct ion")
?>
<!--
</td>
<td bgcolor="#F5F5F5" width=2> </td>
<td width="47%" valign="top"> -->
<?
if(empty($displaydetails))
{
$bid_sql_max="select MAX(bidding_amount) as amt from placing_bid_item where item_id=".$item_id;
$bid_res_max=mysql_query($ bid_sql_ma x);
$bidrow_max=mysql_fetch_ar ray($bid_r es_max);
if($row[selling_method]==" fix")
{
?>
<table width="100%" align="center" cellpadding="5" cellspacing="2" id=buyitnow>
<th height=15>
<font size="2"><b><div align="left">
Buy it now</div> </b></font> </th>
<tr><td align="center"><br>
<font size="2">Buy Now Price:</font>
&n bsp; <?= $row['currency']; ?> <?= $row['quick_buy_price']; ?>
<br></td></tr>
<form name=fix_form action="detail.php" method=post >
<input type="hidden" name=qty value=1>
<input type="hidden" value=1 name=flag>
<input type="hidden" value=<?= $err_flag; ?> name="err_flag">
<input type="hidden" value="fix" name="sell_method">
<input type="hidden" value="<?= $item_id;?>" name=item_id>
<input type="hidden" value="<?= $row[quick_buy_price];?>" name=fixed_price>
<tr><td align="center"><input type="button" value=Buyitnow onClick="confirm_buynow()" ; <?if($row[Quantity]==0 or $row[status]=='Closed'){ec ho "disabled";}?>></td></tr>
</form>
<tr><td align="center">
<br>
<?= $_SESSION[site_name] ?> Pro will inform the seller of your intent to purchase this item.<br><br>
Your purchase is a contract between you and the item seller. <br>
If you submit this purchase you will enter into a legally binding contract. </td></tr>
</table>
</td>
</tr>
</table>
<?
} //if($row[selling_method]= ="fix")
}
?>
</td></tr>
<script language="javascript">
function validate()
{
if(document.bid_form.max_b id.value== "")
{
alert("Please enter the Max bid amount");
document.bid_form.max_bid. focus();
return false;
}
if(document.bid_form.qty.v alue=="Qua ntity")
{
alert("Please select the Quantity");
document.bid_form.qty.focu s();
return false;
}
document.bid_form.flag.val ue=1;
return true;
}
function confirm_buynow()
{
var where_to= confirm("Please Click Here To Confirm Your Bid");
if (where_to==true)
{
document.fix_form.submit() ;
}
}
</script>
<?php
/*************************
*File Name :detail.tpl
*File Created :Wednesday, June 21, 2006
* File Last Modified :Wednesday, June 21, 2006
* Copyright :(C) 2001 AJ Square Inc
* Email :licence@ajsquare.net
* Software Language :PHP
* Version Created :V 4.3.2
* Programmers worked :S.Priya, B.ReenaKumari, K.Shanmuga priya
* $Id : memberlist.php,v 1.36.2.12 2006/02/07 20:42:51 grahamje Exp $
*
**************************
/*************************
* Licence Agreement:
* This program is a Commercial licensed software;
* you are not authorized to redistribute it and/or modify/and or sell it under any publication
* or license /or term it under the GNU General Public License as published by the Free Software Foundation;
* either user and developer versions of the License, or (at your option)
* any later version is applicable for the same.
**************************
?>
<? require 'include/connect.php'; ?>
<table width="980" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top">
<?
$title="Details of item";
require 'include/detail_top.php';
?>
</td>
</tr>
<tr><td>
<?
if($cat_sql_row[category_h
{
cat_display($cat_sql_row[c
}
?>
<a href="category.php?cate_id
</td></tr>
<tr><td valign="top">
<table width="100%" align="center" cellpadding="0" cellspacing="0" border=0>
<tr><td colspan="3" class="tr_border" height=30>
<table width="100%"><tr><td align="left"><font size="3">
<b><div align="left">
<? echo ucwords($row['item_title']
</div> </b></font>
</td>
<td align="right" style="padding-right:5px">
<?
if($row[sub_title])
{
?>
<tr><td colspan="2" style="padding-left:20px">
<?
}
?>
</table>
</td></tr>
<tr align="center" height=35>
<td width=2> </td>
<?
if(!empty($warning))
{
?>
<td class="table_bgcolor_withb
<font size="2" color="red">
<b> <?= $warning?></b></font>
<?
}
if($email_to_status)
{
?>
<td class="table_bgcolor_withb
<font size="2" color="red">
<b> <?= $email_to_status?></b></fo
<?
}
else if($success_mes)
{
?>
<td class="table_bgcolor_withb
<font size="2" color="red">
<b> Item Purchased Successfully! </b></font>
<?
}
else if($watch_flag==1)
{
$watch_tot_sql="select count(*) from watch_list where user_id=$user_id";
$watch_ins_sql=mysql_query
$watch_res_sql=mysql_fetch
$watch_tot=$watch_res_sql[
?>
<td class="table_bgcolor_withb
<font size="2" color="red">
<b> This item is being watched in My Auction (<a href="watchlist.php" style="text-decoration:non
<!-- This item has been added to Watchlist. --> </b></font>
<?
}
else if(empty($_SESSION[userid]
{
?>
<td class="table_bgcolor_withb
Bidder or seller of this item?</B> <A href="signin.php">Sign in</A> for your status
<?
}
else
{
?>
<td class="table_bgcolor_withb
Welcome
<?
}
?>
<span align="right">
<?
if($watch_flag!=1)
{
?>
<a href="detail.php?item_id=<
<?
$mode="";
}
?>
|
<a href="forward_to_friend.ph
</span>
</td>
<td width=2> </td>
</tr>
</table></td></tr>
<tr><td width= align="center">
<table width=100% align="center" cellpadding="5" cellspacing="2">
<tr>
<td valign="top">
<TABLE cellSpacing=0 cellPadding=0 width=206
border=0>
<tr><td valign="top">
<TABLE cellSpacing=0 cellPadding=0 width=206 class=table_border
border=0 height="250">
<tr><td align="center">
<?
if(!empty($row['picture1']
{
$img=$row['picture1'];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>160)
{
$nw=160;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img name="runimg" src="images/<? echo $row['picture1']; ?>" >
<?
}
else
{
$result = "SELECT
placing_item_bid.category_
, category_master.icon_1
FROM
school_auction.category_ma
, school_auction.placing_ite
WHERE
placing_item_bid.category_
$query=mysql_query($result
$row = mysql_fetch_array($query);
$img=$row['icon_1'];
list($width, $height, $type, $attr) = getimagesize("images/$img"
?>
<img src="images/<? echo $row['icon_1']; ?>" border=1 name="runimg" >
<?
}
?>
</td></tr>
</TABLE>
</td></tr>
<tr><td class="mylist" align="center" height="30">
<font size="-1">
<a href="#" id="dislink" onClick="window.open('view
</td></tr>
</TABLE>
</td>
<td width=1> </td>
<td valign="top">
<? if($row['selling_method']=
{
?>
<table cellpadding="5" cellspacing="0" width=300 >
<tr>
<td width="100">Current Bid : </td>
<td ><? echo $row['currency']." ".$current_price; ?>
<?
if($row['reserve_price']!=
{
if($row['reserve_price'] <= $current_price )
{
?>
( <font size="1" color="red">Reserve Price has been met</font> )
<?
}
else
{
?>
( <font size="1" color="red">Reserve Price has not been met</font> )
<?
}
}
?>
</td>
</tr>
<tr>
<td width="100">Starting Bid : </td>
<td><? echo $row['currency']." ".$row['min_bid_amount'];?
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr><td>Quantity :</td> <td><? echo $row['Quantity'];?></td> </tr>
<?
if(($row[privatelistings]=
{
?>
<tr> <td>Bid History: </td>
<?
if($tot[0]!=0)
{
?>
<td><a href="bidhistory.php?item_
<?
}
else
{
?>
<td width="130"><? echo "-"; ?></td>
<?
}
?>
</tr>
<?
}
?>
<tr><td>Highest Bidder : </td>
<?
if($highest_bidder)
{
?>
<td><a href="feedback.php?user_id
<? echo $highest_bidder;?></a>&nbs
<?
}
else
{
?>
<td width="130"><? echo "-"; ?></td>
<?
}
?>
</tr>
<tr>
<td>Ending Time : </td>
<?
$expire_date=$row['expire_
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c
{
?>
<td><? echo $row['currency'] ?> <?= number_format(($row['shipp
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<!-- <tr>
<td>Size Of Quantity: </td>
<? if(!empty($row['size_of_qu
{
?>
<td><? echo $row['size_of_quantity'];?
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Shipping From: </td>
<?
if(!empty($country['countr
{
?>
<td><? echo $country['country'];?></td
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Shipping To: </td>
<? if(!empty($row['shipping_r
{
?>
<td>
<?
$shipping_array=$row['ship
$shipping=explode(",",$shi
$ship_sql="select * from shipping_location";
$ship_res=mysql_query($shi
$total=mysql_num_rows($shi
$j=1;
while($ship_row=mysql_fetc
{
for($i=0;$i<=$total;$i++)
{
if($ship_row['ship_id']==$
{
?>
<?=$ship_row[location];?>&
<?
}
}
}
?>
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<?
$cat_sql="select * from cat_slave where category_id=".$row['catego
if($custom_res=mysql_query
{
$customrow=mysql_fetch_arr
$tablename=$customrow[tabl
if($tablename)
{
$tab_sql="select * from $tablename";
$tab_res=mysql_query($tab_
$i = 2;
while ($i < mysql_num_fields($tab_res)
{
$tab_col = mysql_fetch_field($tab_res
$table_sql="select * from $tablename where item_id=$item_id";
$table_res=mysql_query($ta
$tablerow=mysql_fetch_arra
?>
<tr><td><?= $tab_col->name; ?> </td><td> <?= $tablerow[$tab_col->name] ?> </td></tr>
<?
$i++;
} // while
}
}
?>
</table>
<?
}
else if($row['selling_method']=
{
?>
<table cellpadding="5" cellspacing="0" width=300 >
<tr>
<td width="100">Fixed Price : </td>
<td ><? echo $row['currency']." ".$row[quick_buy_price];
$current_price=$row[quick_
</tr>
<tr>
<td>Ending : </td>
<?
$expire_date=$row['expire_
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr>
<td>Started: </td>
<td>
<?
$bid_startdate= explode(" ",$row['bid_starting_date'
echo $bid_startdate[0];
?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<!-- <tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c
{
?>
<td><? echo $row['currency']." ".$row['shipping_cost'];?>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Ending Time : </td>
<?
$expire_date=$row['expire_
require 'ends.php';
?>
<td><? echo "$string_difference" ;?></td>
</tr>
<tr><td colspan="2"><hr /></td></tr>
<tr>
<td>Shipping Cost: </td>
<? if(!empty($row['shipping_c
{
?>
<td><? echo $row['currency']." ".$row['shipping_cost'];?>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Tax Amount: </td>
<? if(!empty($row['tax']))
{
?>
<td><? echo $row['currency']." ".$row['tax'];?></td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<!-- <tr>
<td>Size Of Quantity: </td>
<? if(!empty($row['size_of_qu
{
?>
<td><? echo $row['size_of_quantity'];?
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr> -->
<tr>
<td>Shipping From: </td>
<?
if(!empty($country['countr
{
?>
<td><? echo $country['country'];?></td
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<? }
?>
</tr>
<tr>
<td>Shipping To: </td>
<? if(!empty($row['shipping_r
{
?>
<td>
<?
$shipping_array=$row['ship
$shipping=explode(",",$shi
$ship_sql="select * from shipping_location";
$ship_res=mysql_query($shi
$total=mysql_num_rows($shi
$j=1;
while($ship_row=mysql_fetc
{
for($i=0;$i<=$total;$i++)
{
if($ship_row['ship_id']==$
{
?>
<?=$ship_row[location];?>&
<?
}
}
}
?>
</td>
<?
}
else
{
?>
<td><? echo "-" ;?></td>
<?
}
?>
</tr>
<tr>
<?
$cat_sql="select * from cat_slave where category_id=".$row['catego
if($custom_res=mysql_query
{
$customrow=mysql_fetch_arr
$tablename=$customrow[tabl
if($tablename)
{
$tab_sql="select * from $tablename";
$tab_res=mysql_query($tab_
$i = 2;
while ($i < mysql_num_fields($tab_res)
{
$tab_col = mysql_fetch_field($tab_res
$table_sql="select * from $tablename where item_id=$item_id";
$table_res=mysql_query($ta
$tablerow=mysql_fetch_arra
?>
<tr><td><?= $tab_col->name; ?> </td><td> <?= $tablerow[$tab_col->name] ?> </td></tr>
<?
$i++;
} // while
}
}
?>
</table>
<?
}
?>
</td>
<td width=1> </td>
<td valign="top">
<table cellpadding="0" cellspacing="0" class=table_border width=100%>
<tr><td class="tr_border"><font size="+1"> &nbs
<tr><td>
<table cellpadding="5" cellspacing="2">
<tr>
<td valign="middle"><a href="feedback.php?user_id
</tr>
<tr>
<td><b> &
</tr>
<tr>
<td><b> &
</tr>
<tr>
<td> &nbs
<?
$custom_date=explode(" ",$user['date_of_registrat
$custom_date1=$custom_date
$custom_time=$custom_date[
$custom_date3=substr($cust
$custom_date2=explode("-",
$custom_date1=$custom_date
$custom_date2=$custom_date
$custom_date4=$custom_date
echo $custom_date4; ?> in <?= $country['country']; ?></td>
</tr>
<?
$user=$row[user_id];
$sql=mysql_query("select * from user_registration where user_id=".$user);
$res=mysql_fetch_array($sq
$org=$res[organisation];
?>
<tr><td style="padding-left:30px;"
<?
$admin_cat_sort="select * from admin_settings where set_id=45";
$admin_cat_res=mysql_query
$admin_catrow=mysql_fetch_
if($admin_catrow[2]==1)
{
if($row[user_id]!=$_SESSIO
{
?>
<tr>
<td><a href="ask_seller_qus.php?i
</tr>
<?
}
}
else if($admin_catrow[2]==2 and $_SESSION[username]!="")
{
if($row[user_id]!=$_SESSIO
{
?>
<tr>
<td><a href="ask_seller_qus.php?i
</tr>
<?
}
}
?> <tr>
<td>
<a href="sellers_othersitem.p
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><a href="feedback.php?user_id
</tr>
<tr>
<td><a href="detail.php?item_id=<
</tr>
</table>
</td></tr>
</table>
</td>
</tr>
</table>
</td></tr>
<tr><td align=center>
<table cellpadding="0" cellspacing="0" class="table_border" width=100%>
<tr><td class="mylist">
<font size="+1"> &nbs
Item Description:</font> </td></tr>
<tr align="center">
<td> </td>
</tr>
<!--- themes ----- -->
<tr><td colspan="2" align="left">
<?
if($row[themes_id])
{
$img=$theme_top;
list($width, $height, $type, $attr) = getimagesize("images/$img"
?>
<table width="100%" cellpadding="5" cellspacing="0" align="left">
<tr><td background="images/<?= $theme_top ?>" style="background-repeat:n
<tr><td background="images/<?= $theme_content ?>" style="background-repeat:r
<?
if($row[layout]=="layout_t
{
?>
<table width=100% cellpadding="5">
<tr><td align="center">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td style="padding:50px" > <?= $row[detailed_descrip]; ?> </td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table>
<?
} // end of top layout
?>
<?
if($row[layout]=="layout_b
{
?>
<table width=100% cellpadding="5" >
<tr><td style="padding:50px" > <?= $row[detailed_descrip]; ?> </td></tr>
<tr><td align="center">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table>
<?
} // end of bottom layout
?>
<?
if($row[layout]=="layout_l
{
?>
<table width=100% cellpadding="5" >
<tr><td align="left" > <table>
<tr><td align="center" style="padding-left:20px">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type,$attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="center">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table></td><td style="padding:50px" valign="top"> <?= $row[detailed_descrip]; ?> </td></tr>
</table>
<?
} // end of left layout
?>
<?
if($row[layout]=="layout_r
{
?>
<table width=100% cellpadding="5" >
<tr>
<td style="padding:50px" valign="top"> <?= $row[detailed_descrip]; ?> </td>
<td>
<table>
<tr><td align="left">
<? if($row[picture1])
{
$img=$row[picture1];
list($width, $height, $type,$attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>400)
{
$nh=400;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>400)
{
$nw=400;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture1] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture2])
{
$img=$row[picture2];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture2] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture3])
{
$img=$row[picture3];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture3] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture4])
{
$img=$row[picture4];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture4] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture5])
{
$img=$row[picture5];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture5] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture6])
{
$img=$row[picture6];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture6] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
<tr><td align="left">
<? if($row[picture7])
{
$img=$row[picture7];
list($width, $height, $type, $attr) = getimagesize("images/$img"
$h=$height;
$w=$width;
if($h>200)
{
$nh=200;
$nw=($w/$h)*$nh;
$h=$nh;
$w=$nw;
}
if($w>200)
{
$nw=200;
$nh=($h/$w)*$nw;
$h=$nh;
$w=$nw;
}
?>
<img src="images/<?= $row[picture7] ?>" width=<?= $w ?> height=<?= $h ?> > <? } ?>
</td></tr>
</table></td></tr>
</table>
<?
} // end of right layout
?>
</td></tr>
<?
$img=$theme_bottom;
list($width, $height, $type, $attr) = getimagesize("images/$img"
?>
<tr><td background="images/<?= $theme_bottom ?>" style="background-repeat:n
</td></tr>
</table>
<?
} // end of if($themes_id)
else
{
?>
<tr align="center">
<td><? echo $row['detailed_descrip']; ?></td>
</tr>
<?
}
?>
</td></tr>
<!---- end of themes --->
<!-- <tr><td> <table width=770 cellpadding="5" cellspacing="2">
<tr>
<?
if(!empty($row['picture1']
{
?>
<td align="center"><img src="images/<? echo $row['picture1']; ?>" border=0> </td>
<?
}
?>
<?
if(!empty($row['picture2']
{
?>
<td align="center"><img src="images/<? echo $row['picture2']; ?>" border=0> </td>
<?
}
?>
<?
if(!empty($row['picture3']
{
?>
<td align="center"><img src="images/<? echo $row['picture3']; ?>" border=0 > </td>
<?
}
?>
</tr></table></td></tr> -->
<tr><td align="center">
<br />
<?
if($row[clicks] > 0)
{
?>
<font size=2> This item has been viewed </font>
<? if($row[item_counter_style
{
?>
<b><font size=+1 color="#009900">
<?= $row[clicks]; ?>
</font>
</b>
<?
}
else
{ ?>
<b><I><font size=+1 color="#003399">
<?= $row[clicks]; ?>
</font>
</I></b>
<?
}
?>
times. </font>
<?
}
?>
</td></tr>
</table></td></tr>
<tr><td>
<br />
<table width=100% align="center">
<tr><td class=tr_border><font size="+1"> &nbs
Cross Promoted Items</font>
</td></tr>
<tr><td align="center"><? if(empty($row[crosspromote
{
echo "<font size=2>No Items are Cross Promoted</font>";
}
else
{
$sqlpromoteitem="select * from placing_item_bid where item_id=$row[crosspromote]
$sqlqrypromoteitem=mysql_q
$sqlfetchpromoteitem=mysql
?>
<table align="center" width="20%" border=1>
<tr height="30"><td class=tr_border align="center"><strong>Mor
<?
if(!empty($sqlfetchpromote
{
?>
<tr><td align="center"><img src=images/<?=$sqlfetchpro
<?
}
?>
<tr><td class=tr_border align="center">
<a href=detail.php?item_id=<?
</table>
<?
}
?>
</td></tr>
</table></td></tr>
<?
if($row[payment_instructio
{
?>
<tr><td>
<br />
<table width=100% align="center">
<tr><td class=tr_border><font size="+1"> &nbs
Payment and Return Policy Details</font>
</td></tr>
<?
}
?>
<?
if($row[payment_instructio
{
?>
<tr><td>
<?= $row[payment_instructions]
</td></tr>
<?
}
?>
<?
if($row[returnpolicy_instr
{
?>
<tr><td>
<?= $row[returnpolicy_instruct
</td></tr>
<?
}
?>
</table>
</td></tr>
<tr><td>
<br /><a href="#" id=view></a>
<table width=100% align="center">
<tr><td class=tr_border>
<!-- <a href="ask_seller_qus.php?i
<font size=2><b>Ask the Seller a Question</b></font></a> -->
<font size=3><b> Ques
</td></tr>
<? $ask_sql="select * from ask_question where item_id=".$row[item_id];
$ask_res=mysql_query($ask_
if(mysql_numrows($ask_res)
{
while($askrow=mysql_fetch_
{
if($askrow[answer])
{
?>
<tr bgcolor=white><td><img src="images/question.gif">
<?= $askrow[question];?>
</td></tr>
<tr><td style="border-bottom:1px solid gray";>
<img src="images/answer.gif">&n
<?= $askrow[answer];?>
</td></tr>
<?
}
}
}
else
{
?>
<tr><td align="center"><font size="2" color="red">No Queries!</font></td></tr>
<?
}
?>
</table>
</td></tr>
<tr><td>
<br />
<table width="100%" border="0" align="center" cellspacing=0 cellpadding="0">
<tr><td class="tr_border" height="30" colspan="3"><font size="+1"> &nbs
<?
if($row[quick_buy_price] and ($row[selling_method]=="au
echo "Ready to bid or buy?";
else if($row[selling_method]=="
echo "Ready to buy?";
else if($row[selling_method]=="
echo "";
?>
</font></td>
</tr>
<tr>
<td width=50% valign="top" align="center">
<?
if($row[selling_method]=="
{
?>
<table width="100%" border="0" align="center" >
<tr><td>
<table width="100%" border="0" align="center" >
<th height=15 >
<font size="2"><b><div align="left">
Place a Bid </div> </b></font> </th>
<tr><td colspan=2>
<table width="100%" cellpadding="5" cellspacing="2">
<form name=bid_form action=bidding.php method=post onSubmit="return validate()">
<?
/* if($row['reserve_price'])
{
if($row['reserve_price'] <= $current_price )
{
?>
<tr><td colspan="2" align="center"> <font size="2" color="red">Reserve Price has been met</font> </td></tr>
<?
}
else
{
?>
<tr><td colspan="2" align="center"> <font size="2" color="red">Reserve Price has not been met</font> </td></tr>
<?
}
} */
?>
<tr >
<td >Current Bid:</td>
<td align="left"><? echo $row['currency']." ".$current_price;?></td>
</tr>
<tr >
<td >Increment:</td>
<td><? echo $row['currency']." ".$row['bid_increment']; ?></td>
</tr>
<tr >
<td>Your Maximum Bid</td>
<td><input type="text" name="max_bid" <?if($row[Quantity]==0 or $row[status]=='Closed'){ec
<tr ><td> </td>
<td>( Minimum Bid:<? echo $row[currency]." ".($current_price+$row['bi
</tr>
<tr >
<?
if($row['selling_method']=
{
if($row[Quantity] > 0 )
{
?>
<td height="27" >Quantity:</td>
<td align="left">
<select name=qty <?if($row[Quantity]==0 or $row[status]=='Closed'){ec
<option value="Quantity">Quantity<
<? for($i=1;$i<=$row[Quantity
{
?>
<option value="<?= $i;?>"><?= $i;?></option>
<?
}
?>
</select>
</td>
<?
}
?></tr>
<?
}
else
{
?>
<input type="hidden" name=qty value=1>
<?
}
?>
<tr ><td align="left" colspan="2">
<input name="chk" type="checkbox" value="chk" <?if($row[Quantity]==0 or $row[status]=='Closed'){ec
Email Reminder for Highest Bidder</td> </tr>
<tr>
<td colspan="2" align=center>
<input type="submit" value="Place bid" class=buttonbig <?if($row[Quantity]==0 or $row[status]=='Closed'){ec
<? /* if(!empty($row[reserver_pr
{
?> Buy Now is only available until
the reserve price is met
<input name="button" type="button" class=buttonbig onClick=quick("<?= $item_id;?>") value="Quick Buy" >
<?
} */
?>
<input type="hidden" name=flag value=1>
<input type="hidden" name=err_flag value=<?= $err_flag; ?>>
<input type="hidden" name=item_id value=<?= $item_id; ?> >
</td></tr>
</form>
</table></td>
</tr>
</table></td>
<?
if($row[quick_buy_price]!=
{
if($row['reserve_price'] >= $current_price or $row['reserve_price']==0.0
{
?>
<td bgcolor="#CCCCCC" width=1> </td>
<td width=50% valign="top">
<table width="100%" align="center" cellpadding="5" cellspacing="2" id=buyitnow>
<th height=15>
<font size="2"><b><div align="left">
Buy it now</div> </b></font> </th>
<tr><td align="center"><br>
<font size="2">Buy Now Price:</font>
&n
<br></td></tr>
<form name=fix_form action="detail.php" method=post >
<input type="hidden" name=qty value=1>
<input type="hidden" value=1 name=flag>
<input type="hidden" value="<?= $err_flag; ?>" name="err_flag" >
<input type="hidden" value="fix" name="sell_method">
<input type="hidden" value="<?= $item_id;?>" name=item_id>
<input type="hidden" value="<?= $row[quick_buy_price];?>" name=fixed_price>
<tr><td align="center">
<input type="button" value=Buyitnow onClick="confirm_buynow()"
</td></tr>
</form>
<tr><td align="center">
<br>
<?= $_SESSION[site_name] ?> Pro will inform the seller of your intent to purchase this item.<br><br>
Your purchase is a contract between you and the item seller. <br>
If you submit this purchase you will enter into a legally binding contract. </td></tr>
</table>
<?
}
}
?>
</td>
</tr></table>
<?
} //if(selling_method=="auct
?>
<!--
</td>
<td bgcolor="#F5F5F5" width=2> </td>
<td width="47%" valign="top"> -->
<?
if(empty($displaydetails))
{
$bid_sql_max="select MAX(bidding_amount) as amt from placing_bid_item where item_id=".$item_id;
$bid_res_max=mysql_query($
$bidrow_max=mysql_fetch_ar
if($row[selling_method]=="
{
?>
<table width="100%" align="center" cellpadding="5" cellspacing="2" id=buyitnow>
<th height=15>
<font size="2"><b><div align="left">
Buy it now</div> </b></font> </th>
<tr><td align="center"><br>
<font size="2">Buy Now Price:</font>
&n
<br></td></tr>
<form name=fix_form action="detail.php" method=post >
<input type="hidden" name=qty value=1>
<input type="hidden" value=1 name=flag>
<input type="hidden" value=<?= $err_flag; ?> name="err_flag">
<input type="hidden" value="fix" name="sell_method">
<input type="hidden" value="<?= $item_id;?>" name=item_id>
<input type="hidden" value="<?= $row[quick_buy_price];?>" name=fixed_price>
<tr><td align="center"><input type="button" value=Buyitnow onClick="confirm_buynow()"
</form>
<tr><td align="center">
<br>
<?= $_SESSION[site_name] ?> Pro will inform the seller of your intent to purchase this item.<br><br>
Your purchase is a contract between you and the item seller. <br>
If you submit this purchase you will enter into a legally binding contract. </td></tr>
</table>
</td>
</tr>
</table>
<?
} //if($row[selling_method]=
}
?>
</td></tr>
<script language="javascript">
function validate()
{
if(document.bid_form.max_b
{
alert("Please enter the Max bid amount");
document.bid_form.max_bid.
return false;
}
if(document.bid_form.qty.v
{
alert("Please select the Quantity");
document.bid_form.qty.focu
return false;
}
document.bid_form.flag.val
return true;
}
function confirm_buynow()
{
var where_to= confirm("Please Click Here To Confirm Your Bid");
if (where_to==true)
{
document.fix_form.submit()
}
}
</script>
ASKER
I figured it out misp;aces the ";"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If there is an error message, please enter it here.
If it just displays a red cross, look at the outputted HTML source and see what image URL is actually used, that usually gives you a clue of where to look.