<? 
require_once "include/application.php"; 
require_once "include/function.php";
require_once "include/newvalue_lib.php";

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="sddm.css" >
<script src="include/validation.js" type="text/javascript"></script>
<script language="javascript1.2"> 
function generate() 
{
	var count = 0 ;
 	for ( var i = 0 ; i < document.form.personclm.length ; i++ )
 	{ 
 		if ( document.form.personclm.options[i].selected ){
			var c=document.form.personclm.options[i].value;

		}
	}
} 
</script> 


<title><? echo TITLE?></title>
</head>
<body>

<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f1efd8">
  <tr>
    <td  colspan="2" align="center"><? require_once "include/header.php"; ?></td>
  </tr>
  <tr>
    <td colspan="2" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td width="185" valign="top" bgcolor="e6f3f9">
	
<? require_once "include/columnLeft.php"; ?>	</td>
    <td width="834" valign="top">
	<form name="form" method="post" action="ppl_personRptHtml.php" target="_blank" >
	  <table width="810" border="0" align="center" cellpadding="0" cellspacing="0">
      
      <tr>

        <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="100%" height="30" class="TitleH3">Membership Report </td>
          </tr>
          <tr>
            <td height="1" bgcolor="#B8ED83"></td>
          </tr>
          <tr>
            <td ><? echo "<div class='Msg'>$action_msg</div>" ?>&nbsp;
              <input name="ty" type="hidden" id="ty" value="<? echo $ty ?>" /></td>
          </tr>

        </table>
          <table border="0" cellpadding="1" width="100%" cellspacing="2" class="small">
            <tr>
              <td height="7" colspan="3" class="text12"><span class="TextH1">
                <select name="sType" id="sType">
                  <option value="Name">Name</option>
                  <option value="Card No">Card No</option>
                  <option value="CardName">Name on the Card</option>
                  <option value="NRIC">NRIC/Passport</option>
<!--
                  <option value="ProductCode">Product Code</option>				  
                  -->
                </select>
                <input name="sReferral" type="text" id="sReferral" value="<? echo $sReferral ?>" />
                Type of Products
                <select name="scheme" id="scheme" style="WIDTH: 180px">
                  <option value=""></option>
                  <?
			 
			 	$sql="select * from ivc_products order by ip_name";
				$result=mysql_query($sql) or die(mysql_error());				
				while($myrow=MySQL_fetch_array($result,MYSQL_ASSOC)){
					echo "<option value='".$myrow["ip_id"]."' ";
					if($scheme==$myrow["ip_id"])echo "selected";
					echo ">".$myrow["ip_name"]."</option>";
				}
			
?>
                </select>
                <? stayfocus("form","sType",$sType) ?>
</span></td>
            </tr>
            <tr>
              <td height="7" colspan="3" class="TextH1"> 
                                
                 Category of Membership
                   <select name="category" id="category" style="WIDTH: 180px">
                     <option value=""></option>
                     <option value="Individual">Individual</option>
                     <option value="Corporate">Corporate</option>
                   </select>
Country
<select name="country" id="country">
  <option value=""></option>
  <? require "country.php"; ?>
</select>
<? stayfocus("form","country",$country) ?>
	                Active
	                <select name="active" id="active">
                                                          <option value=""></option>
                                                          <option value="Yes">Yes</option>
                                                          <option value="No">No</option>
                    </select>
                  <? stayfocus("form","active",$active) ?></td>
            </tr>
            <tr>
              <td height="17" colspan="3" class="TextH1">Display Report Column </td>
            </tr>
          
            <tr>
              <td width="200" class="TextH2"><span class="TextH1">
                Membership Detail <br />
                <select name="personclm[]" size="18" multiple="multiple" id="personclm">
                  <option value="im_formno">Form No</option>
                  <option value="im_scheme">Type of Product</option>
                  <option value="im_category">Category of Membership </option>
                  <option value="im_name">Name of Applicant </option>
                  <option value="im_title">Title</option>
                  <option value="im_cardno">Card No</option>
                  <option value="im_cardname">Name on the Card</option>
                  <option value="im_nominee">Name of Nominee </option>
                  <option value="im_nomtitle">Nominee Title </option>
                  <option value="im_ic">NRIC/Passport</option>
                  <option value="im_dob">Date of Birth </option>
                  <option value="im_nationality">Nationality</option>
                  <option value="im_marital">Marital Status </option>
                  <option value="im_language ">Language</option>
                  <option value="im_addr1">Home Address </option>
                  <option value="im_addr2">Address Line 2</option>
                  <option value="im_addr3">Address Line 3</option>
                  <option value="im_postcode">Postcode</option>
                  <option value="im_country">Country</option>
                  <option value="im_maddr1">Mailing Address </option>
                  <option value="im_maddr2">Address Line 2</option>
                  <option value="im_maddr3">Address Line 3</option>
                  <option value="im_mpostcode">Postcode</option>
                  <option value="im_mcountry">Country</option>
                  <option value="im_phome">Contact No (Home)</option>
                  <option value="im_mobile">Contact No (Mobile)</option>
                  <option value="im_fax">Contact No (Fax)</option>
                  <option value="im_email">Email</option>
                  <option value="im_occupation">Occupation</option>
                  <option value="im_income">Annual Income </option>
                  <option value="im_freemaint">Free Maintenance Fees </option>
                  <option value="im_complementary">Complementary</option>
                  <option value="im_joindate">Apply Date</option>
                  <option value="im_active">Active</option>				  
                    </select>
                <? staymultifocus("form","personclm",$personclm) ?>
              </span></td>
              <td width="204" class="TextH1">Business Information <br />
                <select name="addrclm[]" size="18" multiple="multiple" id="addrclm">
                  <option value="im_business">Name of Business/ Employer </option>
                  <option value="im_nature">Nature of Business </option>
                  <option value="im_offaddr1">Office Address </option>
                  <option value="im_offaddr2">Address Line 2</option>
                  <option value="im_offaddr3">Address Line 3</option>
                  <option value="im_offpostcode">Postcode</option>
                  <option value="im_website">Company Website</option>
                  <option value="im_officephone">Office Tel. No.</option>
                  <option value="im_officeext">Office Ext</option>
                  <option value="im_officefax">Office Fax</option>
                  <option value="im_nominee1">Name of Nominee (1)</option>
                  <option value="im_designation1">Designation </option>
                  <option value="im_nomineehome1">Contact No. (Home)</option>
                  <option value="im_nomineemobile1">Contact No. (Mobile)</option>
                  <option value="im_nomineefax1">Contact No. (Fax)</option>
                  <option value="im_nomineeemail1">Email</option>
                  <option value="im_nominee2">Name of Nominee (2)</option>
                  <option value="im_designation2">Designation </option>
                  <option value="im_nomineehome2">Contact No. (Home)</option>
                  <option value="im_nomineemobile2">Contact No. (Mobile)</option>
                  <option value="im_nomineefax2">Contact No. (Fax)</option>
                  <option value="im_nomineeemail2">Email</option>
                    </select>
                <? staymultifocus("form","personclm",$personclm) ?></td>
              <td width="199" valign="top" class="TextH1">Family Information <br />
                <select name="postalclm[]" size="18" multiple="multiple" id="postalclm">
                  <option value="im_spouse">Name of Spouse </option>
                  <option value="im_sptitle">Title </option>
                  <option value="im_spic">NRIC/Passport </option>
                  <option value="im_spdob">Date of Birth </option>
                  <option value="im_spnationality ">Nationality </option>
                  <option value="im_spoccupation">Occupation</option>
                  <option value="im_sphome">Contact No (Home)</option>
                  <option value="im_spmobile">Contact No (Mobile)</option>
                  <option value="im_spfax">Contact No (Fax)</option>
                  <option value="im_spemail">Email</option>
			  
                                </select>
                <? staymultifocus("form","postalclm",$postalclm) ?></td>
              </tr>
            <tr>
              <td colspan="3" class="TextH2"><span class="text12"><span class="TextH1">
                <input name="btnSearch" type="submit" class="btn150" id="btnSearch" value="Generate" onclick="generate()"/>
              </span></span></td>
            </tr>
          </table></td>

      </tr>
 
    </table>
	  <br />
	</form>	</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#333333"><div align="center"><span class="Footer">
      <br />
      <? require_once "footer.php"; ?>
    </span></div></td>
  </tr>
</table>
</body>
</html>
<?
if(array_search("Report",$menulist)==false)
		print("<script type='text/javascript'>location.href='index.php'</script>");
?>