<?php session_start();  //Developed by ITechScripts?>
>
<style type="text/css">
<!--
.style1 {
	color: #666666;
	font-weight: bold;
}
.style3 {color: #666666; font-size: 11px; font-family:Arial, Helvetica, sans-serif}
-->
</style>
 <?
 require 'include/configurations.php'; // ITECHBIDS Configuration File 
 require 'include/header.php'; 
$mem_plan=$_POST[mem_plan];
  if($_POST[fee_modify])
  {
$memb_plan=$_POST[memb_plan];
    $gret=$_POST[galleryfee];
    $hret=$_POST[homefee];
	$bret=$_POST[boldfee];
	$highret=$_POST[highlightfee];
	$privateret=$_POST[privatefee];
    $insert=$_POST[insertfee];
    $classified=$_POST[classifiedfee];
  $privatefee=$_POST[privatefee];
$registration_fee=$_POST[registration_fee];
$want_it_fee=$_POST[want_it_fee];
$scheme=$_POST[scheme];
$admin_fee=$_POST[admin_fee];
$a_fee_type=$_POST[a_fee_type];
$duration=$_POST[duration];
$shop_free=$_POST[shop_free];
$aboutme=$_POST[aboutme];
$status=$_POST[status];

$registration_fee=$_POST[registration_fee];
$want_it_fee=$_POST[want_it_fee];
$up_sql="update site_fees set gallery_price='$gret',homepage_price='$hret',bold_price='$bret',highlight_price='$highret',Insertion_fee='$insert',Classified_fee='$classified', private_fee='$privatefee', registration_fee='$registration_fee', want_it_fee='$want_it_fee', scheme='$scheme', admin_fee='$admin_fee', a_fee_type='$a_fee_type', duration='$duration', shop_free='$shop_free', aboutme='$aboutme', status='$status' where admin_id=$memb_plan";
$res=mysql_query($up_sql);

 }
 ?>
<table border="0" align="center" cellpadding="5" cellspacing="2" width="100%" >
<tr><td>
<table align="center" width="100%" height="35" class="ft" heught=25">
<tr><td align="center"><a href="settings.php?page=gen" id="link3">General Settings</a></td>
<td align="center"><a href="settings.php?page=pay" id="link3"> Payment Settings</a></td> 
<td align="center"><a href="settings.php?page=auction" id="link3">Auction Settings</a></td>
<td align="center"><a href="settings.php?page=bid" id="link3">Bid Settings</a></td>
<td align="center"><a href="settings.php?page=ask" id="link3">Contact Seller Settings</a></td>
</tr>


</table><br><br>
<form action="site_fees.php" method="post" name="frm12">
<?
if($mem_plan!=""){
$auction_query="select * from site_fees where admin_id=$mem_plan";
$table=mysql_query($auction_query);
$ret=mysql_fetch_array($table);
$gret=$ret['gallery_price'];
$hret=$ret['homepage_price'];
$bret=$ret['bold_price'];
$highret=$ret['highlight_price'];
$privateret=$ret['private_fee'];
$classified=$ret['Classified_fee'];	
$insert=$ret['Insertion_fee'];
$private_f=$ret['private_fee'];
$registration_fee=$ret[registration_fee];
$want_it_fee=$ret[want_it_fee];
$scheme=$ret[scheme];
$admin_fee=$ret[admin_fee];
$a_fee_type=$ret[a_fee_type];
$duration=$ret[duration];
$shop_free=$ret[shop_free];
$aboutme=$ret[aboutme];
$status=$ret[status];
?>
<table border="0" align="center" cellpadding="5" cellspacing="2" width="70%" class="ft">
<tr class="ct" height="25">
<td colspan="2"><b>Fee Settings for <?= $scheme ?></b></td>
</tr>
<tr >
      <td>Plan Name</td> 
                      <td> <input type="text" class="bluetext"name="scheme" value="<?= $scheme ?>"> </td>
</tr>
<tr >
      <td>Registration Fee</td> 
                      <td> <input type="text" class="bluetext"name="registration_fee" value="<?= $registration_fee ?>"></td>
</tr>
<tr >
      <td>Membership Duration</td> 
                      <td> <input type="text" class="bluetext"name="duration" value="<?= $duration ?>"></td>
</tr>
<tr >
      <td>Insertion Fee</td> 
                      <td> <input type="text" class="bluetext"name="insertfee" value="<?= $insert ?>"> </td>
</tr>
<tr >
      <td>Gallery Listing Fee</td> 
                      <td> <input type="text" class="bluetext"name="galleryfee" value="<?= $gret ?>"></td>
</tr>
<tr >
      <td>HomePage Listing Fee</td> 
                      <td> <input type="text" class="bluetext"name="homefee" value="<?= $hret ?>"> </td>
</tr>
<tr >
      <td>Bold Listing Fee </td> 
                      <td> <input type="text" class="bluetext"name="boldfee" value="<?= $bret ?>"> </td>
</tr>
<tr >
      <td>Highlight Listing Fee </td> 
                      <td> <input type="text" class="bluetext"name="highlightfee" value="<?= $highret ?>"></td>
</tr>
<tr >
      <td>Classified Ad Fee</td> 
                      <td> <input type="text" class="bluetext"name="classifiedfee" value="<?= $classified ?>"></td>
</tr>
<tr >
      <td>Private Auction</td> 
                      <td> <input type="text" class="bluetext"name="privatefee" value="<?= $private_f ?>"></td>
</tr>

<tr >
      <td>Wanted Ad Posting Fee</td> 
                      <td> <input type="text" class="bluetext"name="want_it_fee" value="<?= $want_it_fee ?>"></td>
</tr>

<tr >
      <td>Admin Fee Discount</td> 
                      <td> <input type="text" class="bluetext"name="want_it_fee" value="<?= $admin_fee ?>"></td>
</tr>
<tr >
 <td>Admin Fee Discount Type</td>      <td>
<select name="a_fee_type">
<option value="">Select</option>
<option value="flat" <?  if($a_fee_type=='flat') echo 'Selected'; ?>>Flat</option>
<option value="percent" <?  if($a_fee_type=='percent') echo 'Selected'; ?>>Percent</option></select></td>
</tr>

<tr >
 <td>Free Store Subscription</td>      <td>
<select name="shop_free">
<option value="">Select</option>
<option value="yes" <?  if($shop_free=='yes') echo 'Selected'; ?>>Yes</option>
<option value="no" <?  if($shop_free=='no') echo 'Selected'; ?>>No</option></select></td>
</tr>

<tr >
 <td>Enable custom About Me page</td>      <td>
<select name="aboutme">
<option value="">Select</option>
<option value="yes" <?  if($aboutme=='yes') echo 'Selected'; ?>>Yes</option>
<option value="no" <?  if($aboutme=='no') echo 'Selected'; ?>>No</option></select></td>
</tr>
<tr >
 <td>Plan Status</td>      <td>
<select name="status">
<option value="">Select</option>
<option value="Active" <?  if($status=='Active') echo 'Selected'; ?>>Active</option>
<option value="Inactive" <?  if($status=='Inactive') echo 'Selected'; ?>>Inactive</option></select></td>
</tr>
<tr><td align="center" colspan="2">
<input type="hidden" name="memb_plan" value="<?= $mem_plan ?>">
<input type="submit" class="button"   value=" Modify " name="fee_modify" ></td>
</tr>


</form>
<?
}
?>
<?
if($mem_plan==""){
?>
<form action="site_fees.php" method="post" name="frm12">
<tr class="ct" height="25">
<td colspan="2"><b>Select Plan</b></td>
</tr>
<tr height="25">
<td colspan="2">
<?
$fee_query="select * from site_fees";
$fee_table=mysql_query($fee_query);
?>
<select name=mem_plan>
 <? 
for($i=1; $fee_row=mysql_fetch_array($fee_table); $i++)
 {
$admin_id = $fee_row[admin_id];
$duration = $fee_row[duration];
$registration_fee = $fee_row[registration_fee];
$scheme= $fee_row[scheme];
if($duration==0)
{
$duration = "Unlimited";
}
?>
   <option value=<?= $admin_id ?>> <?= $scheme ?>, <?=$registration_fee?> <?= $default_cur_code ?>/<?=$duration?> Days </option>
<?
}
?>
</select>
<tr  ><td align="center" colspan="2">
<input type="submit" class="button"   value=" Select " name="select_plan" ></td>
</td>
</tr>
<?
}
?>
</table>
</form>
<br>
<?
 require 'include/footer.php'; 
?>