<?
include "../setdatabase.php";
include "mydb.php";
?>

  <h3 align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
  
	<?
switch ($page) {
	default :
?>

  </font></h3>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">  </font>
  <form name="form3" method="post" action="?m=plana&page=ordform">
    <p align="center"><font color="#000066" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong> Input Komisi GOLD</strong></font></p>
    <table width="400"  border="0" align="center" cellpadding="4" cellspacing="0" class="bordertable">
      <tr class="formjoin">
        <td height="33">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr class="formjoin">
        <td width="46%"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;Besar Bonus </font></div></td>
        <td width="54%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">:
              <input name="jml" type="text" id="jml" value="0" size="10" maxlength="10">
        <strong> </strong></font></td>
      </tr>
      <tr class="formjoin">
        <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;Tanggal Input </font></div></td>
        <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">:
              <input name="tgl" type="text" id="tgl" value="<?= $clientdate; ?>" size="20" maxlength="20">
              <strong> </strong></font></td>
      </tr>
      <tr> 
        <td height="53" colspan="2"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp; 
            <input name="submit" type="submit" class="tombol" value="INPUT KOMISI">
        </font></div></td>
      </tr>
      <tr> 
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
    <p>&nbsp;</p>
  </form>
  <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
  <?
	break;
	case ordform :
	$sql= "SELECT * FROM member WHERE produk='GOLD' and status=1";
	$dt=mysql_query($sql);
	$tdata=mysql_num_rows($dt);
	for($v==0;$v<=$tdata-1;$v++) {
	$dtlogin=mysql_fetch_array($dt);
	myquery("insert into komisi values('','$dtlogin[username]', '$jml', '$tgl', 0, '1', 'profit', 'admin')");
	}
?>
  </font>
    <div align="center">
      <p><font color="#000066" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>Komisi Berhasil Di Input</strong></font></p>
      <p>&nbsp;</p></div>
    <p align="center">&nbsp;</p>
    <?
	echo "<meta http-equiv='refresh' content='0;URL=?m=member'>";
	break;
}
?>
<p>&nbsp;</p>
  