Location: PHPKode > projects > CoreAsset > coreasset/templates/search_asset.tpl
{include file="head.tpl"}
{include file="left.tpl"}

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="21"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/corner9.gif" width="5" height="21"></td>
<td width="99%" class="header"><span class="whitetext">

Search Asset Section
</span></td>
<td><img src="images/corner10.gif" width="5" height="21"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="border3side" valign="top" height="100%"><table width="100%" height="100%" border="0" cellspacing="8" cellpadding="0">
<tr>
<td valign="top">

<!-- #######################   Paste the Table to Table from here ############## -->
<table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
          
          <!--<tr>
            <td><img title alt src="images/blank.gif" width="1" height="1"></td>
          </tr>
          <tr>
            <td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">
            <img title height="3" alt src="images/blank.gif" width="1" valign="top"></td>
          </tr>-->
          <tr>
            <!--<td width="559" style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb; padding-left: 18px; padding-right: 23px; padding-top: 11px" vAlign="top" bgColor="#ededed" height="180">-->
			<td>
            {if $mes!=""}
            <table cellSpacing="0" cellPadding="0" width="100%" border="0">
              <tr>
                <td class="txt" colspan="5"><font color="RED">{$mes}</font></td>
              </tr>
              <tr>
                <td class="txt" colspan="5">&nbsp;</td>
              </tr>
            </table>
            {/if}
            
  <form name="f1" method="POST" onsubmit="return validate();">
            <table cellSpacing="0" cellPadding="0" width="100%" border="0">
              <tr>
               <td class="title_heading" align="left" colspan="5" width="50%" height="23"><font color="#000000">&nbsp;&nbsp;Select Search Type</font>
		&nbsp;&nbsp;&nbsp;
                   <select name="srch_type" onChange="return go(this.value);">
                           <option value="1" {if $option==1} selected {/if}>Search by Asset Tag</option>
			   <option value="4" {if $option==4} selected {/if}>Search by Equipment</option>
                           <option value="2" {if $option==2} selected {/if}>Search by Manufacturer</option>
                           <option value="3" {if $option==3} selected {/if}>Search by Nick Name</option>
                           <option value="5" {if $option==5} selected {/if}>Search by Vendor</option>
                           <option value="6" {if $option==6} selected {/if}>Search by Serial Number</option>
                           <option value="7" {if $option==7} selected {/if}>Search by Purchase Order</option>
	          </select>
              </td>
              <!--<td class="title_heading" align="left" colspan="5" bgColor="#cccccc" width="50%" height="23">
	      Search Equipment by Assigned User&nbsp;&nbsp;&nbsp;
	      
	      <select name="userr_id" class="text">
		{section name="ind" loop="$userr_id"}
			   <option value="{$userr_id[ind]}">{$login[ind]}</option>
		{/section}
	      </select>
	      &nbsp;
	      <img src="images/go_btn.gif" border="0" onClick="Javascript:location:'';" style="cursor:hand;">
	      </td>-->
              </tr>
              <tr>
                <td class="txt"  colspan="5">&nbsp;</td>
				
              </tr>

            </table>

            {include file="inner_div.tpl"}
            {if $flag != 1}
			<div id="disp" style="display:inline">
            <table width="100%" border="0" cellPadding="0" cellSpacing="1" id="tbl_disp">
			<tr class="text">
			<td colspan="6" align="center"><font color="#FF0000">{$message}</font></td>
			</tr>
                <tr>
                  <td class="title_heading" align="left" width="10%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Tag</font></td>
                 <!-- <td class="title_heading" align="left" width="10%" bgColor="#cccccc" height="23">&nbsp;Company</td>-->
<!--                  <td class="title_heading" align="left" width="10%" bgColor="#cccccc" height="23">&nbsp;Serial</td>
-->                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Price($)</font></td>
                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Type</font></td>
                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Vendor</font></td>
                  <td class="title_heading" align="center" width="20%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;View</font></td>
				  
                </tr>

                {if $num > 0}
                {section name=index loop=$asset_tag}
                  <tr>
                    <td class="list_item" align="left" width="10%" bgColor="#B5D3DE" height="23">&nbsp;{$asset_tag[index]}</td>
                   <!-- <td class="list_item" align="left" width="10%" bgColor="#B5D3DE" height="23">&nbsp;{$asset_manufacturer[index]}</td>-->
<!--                    <td class="list_item" align="left" width="10%" bgColor="#B5D3DE" height="23">&nbsp;{$asset_serial[index]}</td>
-->                    <td class="list_item" align="left" width="15%" bgColor="#B5D3DE" height="23">&nbsp;{$asset_price[index]}</td>
                    <td class="list_item" align="left" width="15%" bgColor="#B5D3DE" height="23">&nbsp;{$equipment_name[index]}</td>
                    <td class="list_item" align="left" width="15%" bgColor="#B5D3DE" height="23">&nbsp;{$vendor_name[index]}</td>
                    
					<td align="center" class="list_item" width="20%" bgColor="#B5D3DE" height="23">&nbsp;&nbsp;&nbsp;<a href="javascript:void(0)" 
onclick="window.open('view_asset.php?hd83___2y8dh328f____8hhdiw___jd9={$asset_tag[index]}','external','resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, width=700, height=500, screenX=25,screenY=25,left=25,top=25'); return false;"><img src="images/view_detail.gif" border="0"></a></td>
					
                  </tr>
				  {/section}
                <tr>
                  <td class="btn_bg1"   width="20%"  colspan="10" height="30">
                  <a href="manage_purchase.php"><img src="images/add_asset.gif" border="0" title="Click to Add Asset"></a>
                  </td>
                </tr>
                {elseif ($num==0) and ($num!="")}
                  <tr>
                    <td class="txt" colspan="10"align="center" width="25%"  height="23"><font color="RED">Sorry ! You have no such Privillage</font></td>
                  </tr>
                  <tr>
                    <td class="txt" align="center" valign="MIDDLE" width="20%" colspan="10"height="24">&nbsp;
                    
                    </td>
                  </tr>
                 {else}
                  <tr>
                    <td class="txt" colspan="10" align="center" width="25%"  height="23"><font color="RED">Sorry ! No Asset Still Added</font></td>
                  </tr>
                <tr>
                  <td class="btn_bg1" align="center" valign="MIDDLE" width="20%" bgColor="#cccccc" colspan="10"height="30">
                  <a href="manage_purchase.php"><img src="images/add_asset.gif" border="0" title="Click to Add Asset"></a>
                  </td>
                </tr>
                {/if}
	    </table>
		</div>
              </form>

           
			{else}
			<table width="100%" border="0" cellPadding="0" cellSpacing="1" id="tbl_error">
			<tr>
                  <td class="title_heading" align="left" width="10%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Tag</font></td>
                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Price($)</font></td>
                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Type</font></td>
                  <td class="title_heading" align="left" width="15%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;Vendor</font></td>
                  <td class="title_heading" align="center" width="20%" bgColor="#cccccc" height="23"><font color="#000000">&nbsp;View</font></td>
				  
                </tr>
			<tr>
            <td class="txt" colspan="10" align="center" width="25%"  height="23"><font color="RED">Sorry ! No Record Found</font></td>
            </tr>
			<tr>
                  <td class="btn_bg1"   width="20%"  colspan="10" height="30">
                  <a href="manage_purchase.php"><img src="images/add_asset.gif" border="0" title="Click to Add Asset"></a>
                  </td>
                </tr>
			</table>
			{/if}
			</td>
          </tr>
          <!--<tr>
            <td style="border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb" bgColor="#bbbbbb">
            <img title height="4" alt src="images/blank.gif" width="1"></td>
          </tr>-->
          </table>
        </td>
      </tr>
    </table>



<!-- ########################      End Here ##########################-->

{include file="foot.tpl"}

{literal}
<script language="Javascript">
function conf()
{
	input_box=confirm("Are you sure? The the Asset will be Deleted !");

	if (input_box==true)
	{
		return true;
	}

	else
	{
		return false;
	}
}
function all_hide()
{
	document.all.i1.style.display="none";
	document.all.i2.style.display="none";
	document.all.i3.style.display="none";
	document.all.i4.style.display="none";
	document.all.i5.style.display="none";
	document.all.i6.style.display="none";
	document.all.i7.style.display="none";
	document.all.i8.style.display="none";
	
}

function allblank()
{
	//var arr = document.f1.criteria.value;
	
}

function go(p)
{
//alert(p);
if(p!="")
{

/*
if(p!=8)
 {
  var ind=document.f1.srch_type.value-1;
  if(document.f1.criteria[ind].value =="")
     document.getElementById("disp").style.display="none";
  else
     document.getElementById("disp").style.display="inline"; 
 }
 */


allblank();


 if(p==1)
 {
   all_hide();
   document.all.i1.style.display="";
 }
 else if(p==2)
 {
   all_hide();
   document.all.i2.style.display="";
 }
 else if(p==3)
 {
   all_hide();
   document.all.i3.style.display="";
 }
 else if(p==4)
 {
   all_hide();
   document.all.i4.style.display="";
 }
 else if(p==5)
 {
   all_hide();
   document.all.i5.style.display="";
 }
 else if(p==6)
 {
   all_hide();
   document.all.i6.style.display="";
 }
 else if(p==7)
 {
   all_hide();
   document.all.i7.style.display="";
 }
else if(p==8)
 {
   all_hide();
   document.all.i8.style.display="";
 }
 
}
else
{
   all_hide();
   document.getElementById("disp").style.display="inline";
}

}
</script>
<script  language="javascript">
function validate()
{
var ind=document.f1.srch_type.value-1;
if(document.f1.criteria[ind].value=="")
{
alert("Plsease Specify Proper Search Criteria");
return false;
}
}

go(document.f1.srch_type.value);
</script> 
{/literal}
Return current item: CoreAsset