<?php session_start();  //Developed by ITechScripts
require 'include/configurations.php'; // ITECHBIDS Configuration File
//if($_GET[productid])
if(isset($_REQUEST[flag]))
{

$user_id=$_POST['user_id'];
 $productid=$_POST['productid'];
$producttitle=$_POST[txttitle];
$itemdes=stripslashes( $_POST[htmlcontent] );
$item_counter_style=$_POST['item_counter_style'];
$start_delay=$_POST['cbo_start_delay'];
$currency=$_POST['cbocurrency'];
$Gallery=$_POST['chkGallery'];
$Border=$_POST['chkBorder'];
$Highlight=$_POST['chkHighlight'];
$Privateauc=$_POST['chkPrivateauc'];
$postformat=$_SESSION[postformat];
$Bold=$_POST['chkBold'];
$Subtitle=$_POST['chkSubtitle'];
$Subtitle_name=$_POST['txtSubtitle'];
$Home=$_POST['chkHome'];
$size_of_qty=$_POST['size_of_qty'];
$qty=$_POST['txt_qty'];
$quick=$_POST[txt_quick]; 
$min_amt=$_POST[txt_min_amt];
$rev_price=$_POST[txt_rev_price];
$bid_inc=$_POST[txt_bid_inc];
$repost=$_POST[repost];
$duration=$_POST[cbodur];
$ship_cost=$_POST[txtship_amt];
$tax=$_POST[tax];

 $ship=$_POST['asia'];
 $ship=$_POST['aus'];
 $ship=$_POST['africa'];
 $ship=$_POST['america'];
 $ship=$_POST['europe'];

 $world=$_POST[world];
if($world=="all");
$ship=$_POST['asia'] . " " .$_POST['aus'] . " " .$_POST['africa'] . " " .$_POST['america'] . " " .$_POST['europe'] . " ";

$query="update auction_details set user_id='$user_id',producttitle='$producttitle', detailed_descrip='$itemdes' ,";
$query.="item_counter_style='$item_counter_style' , currency='$currency' , size_of_quantity = '$size_of_qty' , ";
$query.="Quantity='$qty' , duration='$duration' , no_of_repost='$repost' , min_bid_amount='min_amt' ,  bidincrement='bid_inc' , ";
 $query.="reserve_price='rev_price' , quick_buy_price='$quick' , shipping_cost='$ship_cost' , tax='$tax' , shipping_route='$ship'  where productid='$productid' ";
if(mysql_query($query))
$update="Item Updated Successfully.";

 	
} //$flag==1

 ?>
 <? require 'include/header.php'; ?>
<html>
<head>
<title>Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$query="select * from auction_details where productid='$_REQUEST[item_no]'";
$table=mysql_query($query);
$item_row=mysql_fetch_array($table);
?>
  <table width="758" border="0" cellpadding="0" cellspacing="0" align="center" class="table_border">
    <tr>
    <td colspan=2 align="center" class="ft" heught=25" class="ct" height="25">
	<font size=+1>
	<? 
     echo "Edit Item";
    ?> 
Title & Description </font></td>
  </tr>
<tr><td><br><center><b><font color="#ff0000"><? if(strlen($update)!=0) echo $update; ?></td></tr>
<tr><td>
<? if($err_flag==1)
{ 
?>
<table width="100%" align="center"><tr><td>
<img src="../images/xclabid.gif"></td>
<td><font size=2 color="red">The following must be corrected before continuing:</font></td>
<? if(!empty($err_title))
 {
 ?>
<tr><td>&nbsp;</td>
<td><a href="postdetails.php#txttitle">Item Title</a> - <?= $err_title; ?></td></tr>
<? 
}
?>
<? if(!empty($err_des))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#areades">Item Description</a> - <?= $err_des; ?></td></tr>
<? 
}
?>
<? if(!empty($err_min_amt))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#txt_min_amt">Minimum Bid Amount</a> - <?= $err_min_amt; ?></td></tr>
<? 
}
?>
<? if(!empty($err_fix_price))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#txt_quick">Quick Buy Price</a> - <?= $err_fix_price; ?></td></tr>
<? 
}
?>
<? if(!empty($err_rev_price))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#txt_rev_price">Reserve Price</a> - <?= $err_rev_price; ?></td></tr>
<? 
}
?>
<? if(!empty($err_qty))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#txt_qty">Quantity</a> - <?= $err_qty; ?></td></tr>
<? 
}
?>
<? if(!empty($err_dur))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#cbodur">Duration</a> - <?= $err_dur; ?></td></tr>
<? 
}
?>

<? if(!empty($err_size_qty))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#size_of_qty">Size of Quantity</a> - <?= $err_size_qty; ?></td></tr>
<? 
}
?>

<? if(!empty($err_bid_inc))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#txt_bid_inc">Bid Increment</a> - <?= $err_bid_inc; ?></td></tr>
<? 
}
?>
<? if(!empty($err_cur))
 {
 ?>
<tr><td>&nbsp;</td>
<td><a href="postdetails.php#cbocurrency">Currency</a> - <?= $err_cur; ?></td></tr>
<? 
}
?>
<? if(!empty($err_img1))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#img1">Image1</a> - <?= $err_img1; ?></td></tr>
<? 
}
?>
<? if(!empty($err_img2))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#img2">Image2</a> - <?= $err_img2; ?></td></tr>
<? 
}
?>
<? if(!empty($err_img3))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#img3">Image3</a> - <?= $err_img3; ?></td></tr>
<? 
}
?>
<? if(!empty($err_img4))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#img4">Image4</a> - <?= $err_img4; ?></td></tr>
<? 
}
?>
<? if(!empty($err_img5))
 {
 ?>
<tr><td>&nbsp;</td><td><a href="postdetails.php#img5">Image5</a> - <?= $err_img5; ?></td></tr>
<? 
}
?>
<? 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);
	$dummy=$tab_col->name;
//   echo "sesssion"."<br>". ;
if(empty($_SESSION[$tab_col->name]))
        {
     ?>
	 
	  <tr><td>&nbsp;</td><td><a href="postdetails.php#<?= $tab_col->name ?>"><?= $tab_col->name ?></a>-Please Enter this Information </td></tr>
	 
	 <?
	    }
		else
		{
		 $var_type=$tab_col->type;
		if($var_type=="int" or $var_type=="tinyint")
		{
		if(!is_numeric($_SESSION[$tab_col->name]))
	    {
	    ?>
		 <tr><td>&nbsp;</td><td><a href="postdetails.php#<?= $tab_col->name ?>"><?= $tab_col->name ?></a>-Please Enter this Information </td></tr>
		<?
		}
		}
		}
 /*   if(empty($_SESSION[$tab_col->name]))
   {
   ?>
   <tr><td>&nbsp;</td><td><a href="postdetails.php#<?= $dummy ?>"><?= $dummy ?></a>-Please Enter this Information </td></tr>
   <?
   } */
	$i++;
}
}  ?>




</table></td></tr>
<tr><td>
<hr size="1" noshade class="hr_color"></td></tr>
<?
}
 ?>
<tr>
<td>
<form name="form1" action="modifyitem_itechd.php" method=post enctype="multipart/form-data">
<table width="100%" cellpadding="5" cellspacing="2" >
<tr><td><b>User Id</td></tr>
<tr><td><input name='user_id' value='<? echo $item_row[user_id] ?>'></td></tr>
 <?
  if($cat_id)
 {
  $sub_sql="select * from site_categories where category_head_id=$cat_id";
  $sub_res=mysql_query($sub_sql);
  $sub_tot=mysql_num_rows($sub_res);
 }
if($sub_tot!=0)
{ 
?>
<tr><td><font size=2><b>Sub Category</b></font></td></tr>
<tr><td><select name=cbosubcat><option value="0">Select</option>
<? while($sub_row=mysql_fetch_array($sub_res))
 {
  if(trim($sub_row['category_id'])==trim($sub_cat))
  {
   ?>
  <option value="<?= $sub_row['category_id'] ?>" selected><?= $sub_row['category_name']?></option>
  <? 
  }
  else
    {
	?>
  <option value="<?= $sub_row['category_id'] ?>"><?= $sub_row['category_name']?></option>
  <?
  }
  }
  ?>
  </select>
 </td></tr>
 <? 
 }
 else
 { ?>
  
  <?
  if($file_path)
 require "../$file_path";
   ?>
 
<? 
 }
 ?>
<tr><td>
<? if(!empty($err_title))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_title ?></font>
 <br>
 <b><font size=2 color=red>Item title</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Item title</font></b>
   <? }
   ?>
 </td></tr>
 <?
 if($producttitle=="")
 {
 $producttitle=$item_row['producttitle'];
 }
 ?>
 <tr><td width=250><input type="text" class="bluetext"name="txttitle" class="txtbig" value=<?= $producttitle; ?>>
 </td></tr>
 <tr><td>
<? if(!empty($err_des))
 {
 ?>
 <img src="images/xclabids.gif">&nbsp;
 <font size=2 color=red><?= $err_des; ?></font>
 <br>
 <b><font size=2 color=red>Item Description</font></b>
 <?
  }
  else
  {
   ?>
   <b><font size=2 >Item Description</font></b>
   <? }
   ?>
 </td></tr>
 <tr><td width="100%">
<!--  <textarea rows="5" cols="35" name="areades">
 <?= $itemdes; ?>
 </textarea> -->
 <?
  if($itemdes=="")
 {
 $itemdes=$item_row['detailed_descrip'];
 }
 ?>
 <?php
include_once("../HTMLEditor/fckeditor.php") ;
?>
<?php
$oFCKeditor = new FCKeditor('htmlcontent') ;
$oFCKeditor->BasePath = '/HTMLEditor/' ;
$oFCKeditor->Value = $itemdes;
$oFCKeditor->Create() ;
?>
 <br>
<font size=2 class="hint_font">Describe your items features, benefits, 
and condition. Be sure to include in your description: Condition (new, used, etc.)</font></td>
</tr>
<tr>
                <td><font size=2 ><b>Item Hit Counter </b></font></td>
              </tr>
<tr><td>
 <?
  if($item_counter_style=="")
 {
 $item_counter_style=$item_row['item_counter_style'];
 }
 ?>
 
<? 
if($item_counter_style==2)
{
 ?>
<input type="radio" name="item_counter_style" value=1 > 
 <b><font size=+1 color="#009900">
		    12345
			</font>
			</b> 
<input type="radio" name="item_counter_style" value=2 checked> 
<I><font size=+1 color="#003399">
		    12345
			</font>
			</I>  
<?
}
else
{
?>		 
<input type="radio" name="item_counter_style" value=1 checked> 
 <b><font size=+1 color="#009900">
		    12345
			</font>
			</b> 
<input type="radio" name="item_counter_style" value=2 > 
<I><font size=+1 color="#003399">
		    12345
			</font>
			</I>  
<?
}
?></td></tr>
<? if(!empty($err_cur))
 {
 ?>
<tr><td>
<img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_cur; ?></font>
 <br><font size=2 color=red><b>Currency</b></font></td></tr>
<?
}
else
{
?>
<tr><td><font size=2 ><b>Currency</b></font></td></tr>
<?
}
?>

 <?
  if($currency=="")
 {
 $currency=$item_row['currency'];
 }
 ?>

 <tr><td><select name=cbocurrency>
 <option value=0>Select</option>
<? 
$cur_sql="select * from site_currencies";
$cur_res=mysql_query($cur_sql);
  while($currency_row=mysql_fetch_array($cur_res))
 {
  if(trim($currency_row['currency'])==trim($currency))
  {
   ?>
  <option value="<?= $currency_row['currency'] ?>" selected><?= $currency_row['currency']?></option>
  <? 
  }
  else
    {
	?>
  <option value="<?= $currency_row['currency'] ?>"><?= $currency_row['currency']?></option>
  <?
  }
  }
  ?>
  </select>
 </td></tr> 
 <?
  if($start_delay=="")
 {
 $start_delay=$item_row['start_delay'];
 }
 ?>
 <?
  if($admin_start_row['set_value']=='yes')
 {
 ?>

 <? if($mode!="edit")
 {
 ?>
  <tr><td width=250><b><font size=2>Start Delay</font></b></td></tr>
 <tr><td width=250>
 <select name="cbo_start_delay" >
 <? if($start_delay==1)
 {
 ?>
 <option value=1 name=cbo_start_delay selected>1 Days</option>
 <?
 }
 else
 {
 ?>
 <option value=1 name=cbo_start_delay>1 Days</option>
 <? 
 } 
 ?>
 <? if($start_delay==2)
 {
 ?>
 <option value=2 name=cbo_start_delay selected>2 Days</option>
 <?
 }
 else
 {
 ?>
 <option value=2 name=cbo_start_delay>2 Days</option>
 <? 
 } 
 ?>
<? if($start_delay==3)
{
?>
<option value=3 name=cbo_start_delay selected>3 Days</option>
<?
}
else
{
?>
<option value=3 name=cbo_start_delay>3 Days</option>
<? 
} 
?>
<? if($start_delay==4)
{
?>
<option value=4 name=cbo_start_delay selected>4 Days</option>
<?
}
else
{
?>
<option value=4 name=cbo_start_delay>4 Days</option>
<? 
} 
?>
<? if($start_delay==5)
{
?>
<option value=5 name=cbo_start_delay selected>5 Days</option>
<?
}
else
{
?>
<option value=5 name=cbo_start_delay>5 Days</option>
<? 
} 
?>
<? if($start_delay==6)
{
?>
<option value=6 name=cbo_start_delay selected>6 Days</option>
<?
}
else
{
?>
<option value=6 name=cbo_start_delay>6 Days</option>
<? 
} 
?>
<? if($start_delay==7)
{
?>
<option value=7 name=cbo_start_delay selected>7 Days</option>
<?
}
else
{
?>
<option value=7 name=cbo_start_delay>7 Days</option>
<? 
} 
?>
</select></td></tr>
<?
}// if($mode=="edit")
 } // if($admin_start_row=='yes')
?>

<tr><td>

<? if(!empty($err_size_qty))
 {
?>
 <img src="images/xclabids.gif">
 &nbsp;<font size=2 color=red><?= $err_size_qty?></font>
 <br>
 <b><font size=2 color=red>Size of Quantity</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Size of Quantity</font></b>
   <?
    }
   ?>


</td></tr>


<tr><td>
<?

 if(trim($size_of_quantity)=="")
 {
   $size_of_quantity=$item_row['size_of_quantity'];

 }

 ?>
<select name="size_of_qty">
<option value="None">None</option>
<option value="Pieces" <? if($size_of_quantity=="Pieces") echo "selected"; ?> >Pieces</option>
<option value="Dozens" <? if($size_of_quantity=="Dozens") echo "selected"; ?>>Dozens</option>
</select></td></tr>

<?
if(trim($duration)=="")
{
 $duration=$item_row['duration'];
}
?>
<tr><td><b>Duration</td></tr>
<tr><td width=250>
 <select name="cbodur">
<option value="0">Select</option>
<option value=30 <? if($duration==30) echo "selected"; ?> >30 Days</option>
<option value=60 <? if($duration==60) echo "selected"; ?>>60 Days</option>
<option value=90 <? if($duration==90) echo "selected"; ?>>90 Days</option>
<option value=120 <? if($duration==120) echo "selected"; ?>>120 Days</option>
</select>
</td></tr>



























<?
if($postformat==1)
{
?>
  <tr><td>
 <? if(!empty($err_qty))
 {
 ?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_qty?></font>
 <br>
 <b><font size=2 color=red>Quantity</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2>Quantity</font></b>
   <? 
    }
    } //if($postformat==2) online  667
   ?>
 </td>
 <? if($admin_end_row['set_value']=='yes')
 {
 ?>
 <td>
<? if(!empty($err_dur))
 { 
 if($mode!="edit")
 { 
 ?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_dur; ?></font>
 <br>
 <b><font size=2 color=red>Duration</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Duration</font></b>
   <? 
   }
   } //  if($mode=='edit')
   } //  if($admin_end_row=='yes')
   ?>
   
 </td>
</tr>




<?
  if($qty=="")
 {
 $qty=$item_row['Quantity'];
 }
 ?>
<tr>
<? if($postformat==1)
 {
 ?>
 <td width=250>
 <input type="text" class="bluetext"name="txt_qty" class="txtsmall" value=<?= $qty; ?>>
 </td>
 <?
 }
 ?>
<td width=250>
<?
 if($dur=="")
 {
  $dur=$item_row['duration'];
 }
 ?>
<?  if($admin_end_row['set_value']=='yes')
{
if($mode!="edit")
{
?>
<select name="cbodur">
<option value="0">Select</option>
<? if($dur==30)
{
?>
<option value=30 selected>30 Days</option>
<?
}
else
{
 ?>
 <option value=30>30 Days</option>
 <?
 }
  ?>
  <? if($dur==60)
{
?>
<option value=60 selected>60 Days</option>
<?
}
else
{
 ?>
 <option value=60>60 Days</option>
 <?
 }
  ?>
  <? if($dur==90)
{
?>
<option value=90 selected>90 Days</option>
<?
}
else
{
 ?>
 <option value=90>90 Days</option>
 <?
 }
  ?>
  <? if($dur==120)
{
?>
<option value=120 selected>120 Days</option>
<?
}
else
{
 ?>
 <option value=120>120 Days</option>
 <?
 }
  ?>
</select>
</td>
 <?
 } //if($mode=="edit")
 
 }  // if($admin_end_row=='yes')
 ?></tr>


<tr><td><font size=2 ><b>Number of Repost</b></font></td></tr>
<?
//}
?>
 </td></tr>
 <?
// $repost=4;
 $qry="select * from genaralsettings where set_id=37";
 $repost_table=mysql_query($qry);
 $repost_row=mysql_fetch_array($repost_table);
 $repost=$repost_row['set_value'];
  
 
 ?>
 <tr>
 <td>
 <?
 if($repost=="")
 {
  $repost=$item_row['no_of_repost'];
 }
 ?>
 
 <select name="repost">
 <option>Select Repost</option>
 <?
 for($i=1;$i<=$repost;$i++)
 {
  if($repost ==$i)
    echo "<option selected>$i </option>";
 else
   echo "<option>$i </option>";
 }
 ?>
 </select>
 </td>
 </tr>



<tr class="tr_border" width=758><td colspan="2"><font size="2"><b>Auction</b></font></td></tr>
<tr>
            <td><b>Note:</b>Enter Your Bidding details and ITech Bids will Bid 
              as needed for You .</td>
</tr>
<tr><td width="250">



 <? if(!empty($err_min_amt))
 {
 ?>
 <img src="images/xclabids.gif">
 &nbsp;<font size=2 color=red><?= $err_min_amt?></font>
 <br>
 <b><font size=2 color=red>Minimum Bid Amount</font></b>
 <?
 }
 else
 {
 ?>
 <b><font size=2 >Minimum Bid Amount</font></b>
 <?
  }
 ?>
 </td>
 <td>
<? if(!empty($err_rev_price))
 {
 ?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_rev_price?></font>
 <br>
 <b><font size=2 color=red>Reserve Price</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Reserve Price</font></b>
   <? 
   }
   ?>
   
 </td></tr>
 <?
  if($min_amt=="")
 {
  $min_amt=$item_row['min_bid_amount'];
 }
 ?>
 <?
  if($rev_price=="")
 {
  $rev_price=$item_row['reserve_price'];
 }
 ?>
<tr><td width=250><input type="text" class="bluetext"name="txt_min_amt" class="txtsmall" value=<?= $min_amt; ?>></td>
<td width=250><input type="text" class="bluetext"name="txt_rev_price" class="txtsmall" value=<?= $rev_price; ?>></td></tr>
<tr><td>
<? if(!empty($err_bid_inc))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_bid_inc?></font>
 <br>
 <b><font size=2 color=red>Bid Increment</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2>Bid Increment</font></b>
   <? }
   ?>
   <?
  if($bid_inc=="")
 {
  $bid_inc=$item_row['bidincrement'];
 }
 ?>
 </td></tr>
<tr><td width=250><input type="text" class="bluetext"name="txt_bid_inc" class="txtsmall" value=<?= $bid_inc; ?>></td></tr>
<tr class="tr_border" width=758><td colspan="2"><font size="2"><b>Fixed Price Sale</b></font></td></tr>
<tr>
                
            <td><b>Note:</b>Buy Now is only available until<br>
              the reserve price is met</td>
              </tr>
<tr><td>
<? if(!empty($err_fix_price) )
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_fix_price; ?></font>
 <br>
 <b><font size=2 color=red>Quick Buy Price</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2>Quick Buy Price</font></b>
   <? 
   }
   ?>
 </td></tr>
 <?
  if($quick=="")
 {
  $quick=$item_row['quick_buy_price'];
 }
 ?>
 <tr>
<td width=250>
<input type="text" class="bluetext"name="txt_quick" class="txtsmall" value=<?= $quick; ?>></td></tr>
 
<!--
 
<tr class="tr_border" width=758><td colspan="2"><font size="2"><b>Add Images</b></font></td></tr>
<tr><td colspan="2">
<? if(!empty($err_img1))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_img1; ?></font>
 <br>
 <b><font size=2 color=red>Image1</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Image1</font></b>
   <? 
   }
   ?>
    <input type="file" name="img1" value="<?= $img1; ?>">
	<? if(!empty($_SESSION[img1]))
	{
	?>
	<img src="images/gallery.png" width=10 height=10>
	<?
	}
	?></td></tr>
	<? 
	if($postformat !="4")
	{
	if($member_account !="1")
	{
		?>
	<tr><td colspan="2">
  <? if(!empty($err_img2))
  {
  ?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_img2; ?></font>
 <br>
 <b><font size=2 color=red>Image2</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Image2</font></b>
   <? }
   ?>
    <input type="file" name="img2" value=<?= $img2; ?>>
	<? if(!empty($_SESSION[img2]))
	{
	?>
	<img src="images/gallery.png" width=10 height=10>
	<?
	}
	?></td></tr>
<tr><td colspan="2">
<? if(!empty($err_img3))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_img3; ?></font>
 <br>
 <b><font size=2 color=red>Image3</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Image3</font></b>
   <? }
   ?>
    <input type="file" name="img3" value=<?= $img3; ?>>
	<? if(!empty($_SESSION[img3]))
	{
	?>
	<img src="images/gallery.png" width=10 height=10>
	<?
	}
	?></td></tr>

<!-- <tr><td colspan="2">
<? if(!empty($err_img4))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_img4; ?></font>
 <br>
 <b><font size=2 color=red>Image4</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Image4</font></b>
   <? }
   ?>
    <input type="file" name="img4" value=<?= $img4; ?>>
	<? if(!empty($_SESSION[img4]))
	{
	?>
	<img src="images/gallery.png" width=10 height=10>
	<?
	}
	?></td></tr> 
<tr><td colspan="2">
<? if(!empty($err_img5))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_img5; ?></font>
 <br>
 <b><font size=2 color=red>Image5</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2 >Image5</font></b>
   <? 
   }
   ?>
    <input type="file" name="img5" value=<?= $img5; ?>>
	<? if(!empty($_SESSION[img5]))
	{
	?>
	<img src="images/gallery.png" width=10 height=10>
	<?
	}
	?></td></tr> -->
	<?
	} // if($member_account !=1 )
	} // if($postformat=!=4) on line 810
	?>
	<?  /*$mem_sql="select * from member_details where user_id=$_SESSION[userid]";
        $mem_res=mysql_query($mem_sql);  
	    $mem_row=mysql_fetch_array($mem_res);
	    $member_account=$mem_row[member_account]; */
	$sql="select * from site_fees";
	$exe=mysql_query($sql);
	$ret=mysql_fetch_array($exe);
	$gret=$ret['gallery_price'];
    $hret=$ret['homepage_price'];
	$sret=$ret['subtitle_price'];
	$bret=$ret['bold_price'];
	$highret=$ret['highlight_price'];
	$privateret=$ret['private_fee'];

	?>
			<?
		 $user_query="select * from member_details where	user_id='$_SESSION[userid]'";
		$table=mysql_query($user_query);
		if($row=mysql_fetch_array($table))
		{
		 $member_type=$row['member_account'];
		}
		
		?>
		
		
	<tr><td>
	<?
      if($bid_inc=="")
       {
          $bid_inc=$item_row['bidincrement'];
       }
     ?>
	
	<? if(!empty($Gallery))
	{
	?>
	<input type="checkbox" name=chkGallery value="yes" checked>
	<?
	}
	else
	{
	?>
	<input type="checkbox" name=chkGallery value="yes">
	<?
	}
	
	?>



    <font size=2 >
	Gallery <? if($member_type==1) echo "$ (" .  $gret .")"; ?>
	 [Requires a picture,<a href="modifyitem_itechd.php#img1"> add a picture now </a>] <br>
    Add a small version of your first picture to Search and Listings. 
    </font>
	<input type=hidden name="gallery" value="<? if($member_type==1) echo $gret; ?>">
 	</td></tr>
	   
   <tr><td>
	<? if(!empty($Home))
	{
	?>
	<input type="checkbox" name=chkHome value="yes" checked>
	<?
	}
	else
	{
	?>
	<input type="checkbox" name=chkHome value="yes">
	<?
	}
	?>
    <font size=2>
	Home Page Featured  
	<? if(($member_type==1)||($member_type==2)) echo "$ (" . $hret. ")"; ?>)
	<input type=hidden name="home_page" value="<? if(($member_type==1)||($member_type==2)) echo $hret; ?>">
    </font>
 	</td></tr>
<!--
    <tr><td>
	<? 
	if(!empty($Subtitle))
	{
	?>
		<input type="checkbox" name=chkSubtitle value="yes" checked>
	<?
	}
	else
	{
	?>
    	<input type="checkbox" name=chkSubtitle value="yes">	
	<?
	}
	?>
    <font size=2 >SubTitle <br>
	Add a Subtitle to give buyers more information.  
    </font>
 	</td></tr>
	<tr><td width=250 >
	<input type="text" class="bluetext"name="txtSubtitle" class="txtbig" value=<?= $Subtitle_name; ?>></td></tr> -->
	<tr><td>
	<? if(!empty($Bold))
	{
	?>
	<input type="checkbox" name=chkBold value="yes" checked>
	<?
	}
	else
	{
	?>
	<input type="checkbox" name=chkBold value="yes">
	<?
	}
	?>
     <font size=2 >Bold <br> <? if($member_type==1) echo "$ (" . $bret .")"; ?>
    Attract buyers' attention and set your listing apart - use <b>Bold</b>. 
    </font>
	<input type=hidden name="bold" value="<? if($member_type==1) echo $bret; ?>">
 	</td></tr>
  <tr><td>
	<? if(!empty($Privateauc))
	{
	?>
	<input type="checkbox" name=chkPrivateauc value="yes" checked>
	<?
	}
	else
	{
	?>
	<input type="checkbox" name=chkPrivateauc value="yes">
	<?
	}
	?>
     <font size=2 >Private Auction <br> <? if($member_type==1) echo "$ (" . $privateret .")"; ?>
Hide bids from other members.
    </font>
	<input type=hidden name="privateauc" value="<? if($member_type==1) echo $privateret; ?>">
 	</td></tr>

	<tr><td>
	<? if(!empty($Highlight))
	{
	?>
	<input type="checkbox" name=chkHighlight value="yes" checked>
	<?
	}
	else
	{
	?>
	<input type="checkbox" name=chkHighlight value="yes">
	<?
	}
	?>
    <font size=2>Highlight  <br> 
	<? if(($member_type==1)||($member_type==2)) echo "$ (" . $highret .")"; ?>
    Make your listing stand out with a colored band in Search results.  
    </font> 
 	</td></tr>
	
	
	
	
	
<input type=hidden name="highlight" value="<? if(($member_type==1)||($member_type==2)) echo $highret; ?>">
	








<tr class="tr_border"><td>
 <? if(!empty($err_ship_loc))
 {?>
 <img src="images/xclabids.gif">&nbsp;<font size=2 color=red><?= $err_ship_loc ?></font>
 <br>
 <b><font size=2 color=red>Shipping Location</font></b>
 <?
  }
  else
  {
 ?>
   <b><font size=2>Shipping Location</font></b>
   <?
   }
   ?>
  </td>
</tr>

<?
if($shipping_route=="")
{
 $shipping_route=$item_row['shipping_route'];
}
$ship=explode(' ',$shipping_route);
if($ship[1]!="")
$shipping_route="world";
?>	



<tr><td>
<table align="left" width="250" cellpadding="5" cellspacing="2">
<tr><td><input type="checkbox" name=world value="all" onClick="selectall()" <? if($shipping_route=="world") echo"checked"; ?>>Worldwide</td>
<td><input type="checkbox" name=asia value="Asia" <? if($shipping_route=="Asia") echo"checked"; ?>>Asia</td>
<td><input type="checkbox" name=aus value="Australia" <? if($shipping_route=="Australia") echo"checked"; ?> >Australia</td></tr>

<tr><td><input type="checkbox" name=america value="America/Canada" <? if($shipping_route=="America/Canada") echo"checked"; ?>>America/Canada</td>

<td><input type="checkbox" name=africa value="Africa" <? if($shipping_route=="world") echo"Africa"; ?>>Africa</td>
<td><input type="checkbox" name=europe value="Europe" <? if($shipping_route=="world") echo"Europe"; ?>>Europe</td></tr>
</table>
</td></tr>
















	
<?
if($shipping_amt=="")
{
 $shipping_amt=$item_row['shipping_cost'];
}
 ?>	
<tr class="tr_border"><td><font size="2"><b>Shipping Cost</b></font></td></tr>
<tr><td ><input type="text" class="bluetext"name=txtship_amt class="txtsmall" value=<?= $shipping_amt;?>></td></tr>
<?
if($tax=="")
{
 $tax=$item_row['tax'];
}
 ?>	

<tr class="tr_border"><td><font size="2"><b>Sales Tax </b></font></td></tr>
<tr><td><input type="text" class="bluetext"name=tax class="txtsmall" value=<?= $tax; ?>> </td></tr>

	
    <input type="hidden" name=flag value="1">
	<input type="hidden" name="cat_id" value=<?= $cat_id; ?>>
	<input type="hidden" name=mode value="<?= $mode; ?>">
		<input type="hidden" name=postformat value="<?= $postformat; ?>">
	<input type="hidden" name=productid value="<? echo $_REQUEST['item_no']; ?>">

    <tr><td colspan="2" align="center">
	
	
	<input type="submit" class="button"   name=detsub value=Continue>
	
	</td></tr>
   </table>
   </form>

<? require 'include/footer.php'?>
</table>

<script language="javascript">
function sel_method()
{
document.form1.radselling.value="auction";
document.form1.flag.value=2;
document.form1.submit();
}

function selectall()
{

if(document.form1.world.checked==false)
{
document.form1.aus.checked=false;
document.form1.america.checked=false;
document.form1.europe.checked=false;
document.form1.africa.checked=false;
document.form1.asia.checked=false;
}
else
{
document.form1.aus.checked=true;
document.form1.america.checked=true;
document.form1.europe.checked=true;
document.form1.africa.checked=true;
document.form1.asia.checked=true;
}
}

</script>
  </body>
</html>
