<table cellspacing="0" cellpadding="0" border="0"><tr><td><img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16"></td><td><h2>Reports: Home</h2></td></tr></table><br />
<ul class="tablist" style="width:1130px;">
<li>
	<a class="current" href="#">Basic Search</a>
</li>		
</ul>
<script language="javascript">
function openCat(id){
	if(document.getElementById('cat'+id).style.display=='none'){
		document.getElementById('cat'+id).style.display='';
		document.getElementById('catp'+id).style.display='';
		document.getElementById('img'+id).src='themes/Sugar/images/basic_search.gif';
	}
	else {
		document.getElementById('cat'+id).style.display='none';
		document.getElementById('catp'+id).style.display='none';
		document.getElementById('img'+id).src='themes/Sugar/images/advanced_search.gif';
	}
}
function openCat1(id,account,mmm,year,active){
	if(document.getElementById('cat'+id).style.display=='none'){
		document.getElementById('cat'+id).style.display='';
		document.getElementById('catp'+id).style.display='';
		document.getElementById('img'+id).src='themes/Sugar/images/basic_search.gif';
		mintajaxget("index.php?to_pdf=1&module=EcmReports&action=openCat&id="+id+"&mmm="+mmm+"&account="+account+"&year="+year+"&active="+active,"catp"+id);
	}
	else {
		document.getElementById('cat'+id).style.display='none';
		document.getElementById('catp'+id).style.display='none';
		document.getElementById('img'+id).src='themes/Sugar/images/advanced_search.gif';
	}
}
</script>
<form action="index.php" method="get" name="search_reports">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="index2" />
<table style="border-top: 0px none; margin-bottom: 4px;width:1130px;" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tbody>
	<tr>			
		<td class="dataLabel" width="20%" nowrap="nowrap">Year</td>
		<td class="dataField" width="30%" nowrap="nowrap">
			<select name="year" id="year">
			<?
			$ey=(int)date("Y");
			$sy=2000;
			for($i=$sy;$i<=$ey;$i++){
				echo '<option value="'.$i.'"';
				if($i==$_GET['year'])echo ' selected';
				echo '>'.$i.'</option>';
			}
			?>
		    </select>	
		</td>
		<!--<td class="dataLabel" width="20%" nowrap="nowrap">Category</td>
		<td class="dataField" width="30%" nowrap="nowrap">
			<select name="category">
			<option value="">select</option>
			<?
			$w=$GLOBALS['db']->query("select id,name from ecmproductcategories where deleted='0' order by name asc");
			while($r=$GLOBALS['db']->fetchByAssoc($w)){
				echo '<option value="'.$r['id'].'"';
				if($r['id']==$_REQUEST['category'])echo ' selected';
				echo '>'.$r['name'].'</option>';
			}
			?>
			</select>
	  	</td>
	</tr>
	<tr>-->
		<td class="dataLabel" width="20%" nowrap="nowrap">Account Name</td>
		<td class="dataField" width="30%" nowrap="nowrap">
			<input name="account_name" readonly="readonly" tabindex="" id="account_name" size="" value="<?php echo $_REQUEST['account_name'];?>" title="" type="text">
			<input name="account" id="account" value="<?php echo $_REQUEST['account'];?>" type="hidden">
			<input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_reports","field_to_name_array":{"id":"account","name":"account_name"}}, "single", true);' type="button">
	  	</td>
		<td class="dataLabel" width="20%" nowrap="nowrap">Product active</td>
		<td class="dataField" width="30%" nowrap="nowrap">
			<select name="active">
			<option value="" <? if($_REQUEST['active']=="")echo "selected";?>>All</option>
			<option value="active" <? if($_REQUEST['active']=="active")echo "selected";?>>Yes</option>
			<option value="inactive" <? if($_REQUEST['active']=="inactive")echo "selected";?>>No</option>
			</select>
	  	</td>
	 </tr>
</tbody>
</table>

<input class="button" name="submit" value="Search" type="submit">
<input class="button" name="clear" value="Clear" type="button" onClick="location.href='index.php?module=EcmReports&action=index2';"><?
foreach($_GET as $k=>$v){
	if($k!="action")$str.='&'.$k.'='.$v;
}
echo '&nbsp;<input type="button" class="button" name="CreateXLS" value="Create XLS" onclick="location.href=\'index.php?module=EcmReports&action=CreateXLS2'.$str.'&only_cat=1&to_pdf=1\';">';
?>
</form><br />
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td style="width:596px;">
</td>
<td style="width:900px;">
<a onClick="document.getElementById('plist').scrollLeft-=125;"><button class="button">&lt;&lt;</button></a>
</td>
<td>
<a onClick="document.getElementById('plist').scrollLeft+=125;"><button class="button">&gt;&gt;</button></a>
</td>
</tr>
</table>
