<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('view/image/affiliate.png');"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <table class="form" align=left>
        <tr>
          <td><span class="required">*</span> <?php echo $entry_name; ?></td>
          <td colspan=4> <input type="text" name="name" value="<?php echo $name; ?>" />
            <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span>
            <?php  } ?></td> 		
        </tr>
        <tr>
          <td width=10px> <?php echo $entry_flatratesale; ?></td>
          <td width=200px ><input type="text" name="flatratesale" value="<?php echo $flatratesale; ?>" />
            </td>
			<td width=400px><?php echo $entry_descrip; ?><br>
			<input type="text" name="flatratesaledesc" value="<?php echo $flatratesaledesc; ?>" size=50/></td>
            <td ><input type="checkbox" name="flatfatesale_enable"  value=1 <?php if($flatfatesale_enable){ ?>  checked="checked" <?php } ?> size="3" /><?php echo $entry_flatfatesale_enable; ?></td>
        </tr>
        <tr>
          <td> <?php echo $entry_paypersale; ?></td>
          <td><input type="text" name="paypersale" value="<?php echo $paypersale; ?>" />
            </td>
			<td><?php echo $entry_descrip; ?><br><input type="text"  size=50 name="paypersaledesc" value="<?php echo $paypersaledesc; ?>" /></td>
          <td><input type="checkbox" name="paypersale_enable"  value=1 <?php if($paypersale_enable){ ?>  checked="checked" <?php } ?> size="3" /><?php echo $entry_paypersale_enable; ?></td>
        </tr>
        <tr>
          <td> <?php echo $entry_paypercust; ?></td>
          <td><input type="text" name="paypercust" value="<?php echo $paypercust; ?>" />
            </td>
		  <td><?php echo $entry_descrip; ?><br><input type="text" name="paypercustdesc" size=50 value="<?php echo $paypercustdesc; ?>" /></td>
          <td><input type="checkbox" name="paypercust_enable" value=1  <?php if($paypercust_enable){ ?>  checked="checked" <?php } ?> size="3" /><?php echo $entry_paypercust_enable; ?></td>
        </tr>
        <tr>
		<td><?php echo $entry_guestreferral; ?></td>
		<td><input type="text" name="guestcredit" value="<?php echo $guestcredit; ?>" />
            </td>
		<td><?php echo $entry_descrip; ?><br><input type="text" name="creditguestref" size=50 value="<?php echo $creditguestref; ?>" /></td>
		<td><input type="checkbox" name="guestreferral_enable"  value=1 <?php if($guestreferral_enable){ ?>  checked="checked" <?php } ?> size="3" /><?php echo $entry_payclickcount_enable; ?></td>
		</tr>
	<input type="hidden" name="paypersalecount" size=50 value="0" /><input type="hidden" name="paypersalecountdesc" size=50 value=" " />
		<tr>
          <td> <?php echo $entry_clickcount; ?><br><input type="text" name="clickcount" value="<?php echo $clickcount; ?>" />
            </td>
          <td> <?php echo $entry_payclickcount; ?><br><input type="text" name="payclickcount" value="<?php echo $payclickcount; ?>" />
		  <td><?php echo $entry_descrip; ?><br><input type="text" name="payclickdescr" size=50 value="<?php echo $payclickdescr; ?>" /></td>
          <td><input type="checkbox" name="payclickcount_enable"  value=1 <?php if($payclickcount_enable){ ?>  checked="checked" <?php } ?> size="3" /><?php echo $entry_payclickcount_enable; ?></td>          
        </tr>
      </table>
    </form>
  </div>
</div>
<?php echo $footer; ?>