Location: PHPKode > projects > CoreAsset > coreasset/templates/welcome.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"><font color="#FFFFFF">Welcome to &nbsp;Core Asset</font></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="0" cellpadding="0">
<tr>
<td valign="top">

<!-- #######################   Paste the Table to Table from here ############## -->
<form name="f1" method="post" action="">
 <table cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
 
          
          <tr>
            
	   <td>
            <table cellSpacing="0" cellPadding="0" width="100%" border="0">
			   
               <tr>
                  <td class="text" align="center" colSpan="4" height="2" valign="MIDDLE">&nbsp;                  
		  </td>
               </tr>

               {if $status=="1" || $status == "2"}
			  <tr>
                  <td colSpan="4" height="10"></td>
              </tr>
			 
			  <tr>
			  <td  colspan="4">
			  <table width="100%" cellpadding="0" cellspacing="0" border="0" >
			   <tr>
			  <td class="title_heading" width="30%">&nbsp;Alert Range</td>
			  <td class="title_heading" width="33%"><input type="text"  name="equip_range" id="eq_rang" value="{$eq_range}"  size="4" class="text" onkeypress="if((event.keyCode!=43) &&(event.keyCode!=47) &&(event.keyCode!=45) 
			&&(event.keyCode!=93) &&(event.keyCode!=91) 
			&& ((event.keyCode<48) ||(event.keyCode>57)))  event.returnValue = false;"/>&nbsp;Days
			  <td class="title_heading" width="33%"><img src="images/go_btn.gif" onclick="return eq_validate();" border="0" style="cursor:pointer" />
			  </tr>
			  </table>
			   <fieldset  class="altfieldset_bgcolor"><legend align="center">Equipment Status</legend>
			   <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  
			   {if $count_all >0}
			 <tr>
			 <td width="24%" class="title_heading">&nbsp;Equipment Name</td>
			 <td width="25%" class="title_heading">&nbsp;Serial Number</td>
			 <td width="48%" class="title_heading">&nbsp;Warranty Date</td>
			 <td class="title_heading">
			 <img src="images/go_down1.gif"  align="right" onclick="show_expired_already();"style="display:none; cursor:pointer;" id="expired_down"/>
			 <img src="images/go_up1.gif "   align="right" onclick="hide_expired_already();" style="display:inline; cursor:pointer;" id="expired_up"/>
			 </td> 
			 </tr>{/if}
			 </table>
			  
			 <div id="expired_already" style="display:inline;">  
			      <table width="100%" cellpadding="0" cellspacing="1" border="0">
				  {if $count_all > 0 }
			   		  
			  {section name=index loop=$equipment_id}
			  <tr>
			  		  
			  <td class="list_item" width="24%">&nbsp;{$equipment_name[index]}</td>
			  <td class="list_item" width="25%">&nbsp;{$serial_no[index]}</td>
			  <td class="list_item" width="50%" colspan="2">&nbsp; {if $sign[index] > 0}{$expiry_date[index]}{else}<font color="#FF0000"> Warranty Over !!</font>{/if}</td>
			  </tr>
			  {/section}
			  </table>
			  </div>
			  </fieldset>
			  {else}
			  
			 <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  <tr><td colspan="4" class="text" height="10"></td></tr>				
			  <tr><td width="100%" class="txt" align="center">All Equipments are under Warranty Period</td></tr>
			   <tr><td colspan="4" class="text" height="10"></td></tr>
			  </table>
			  </fieldset>
			  {/if}
			  <tr><td colspan="4" class="text" height="10"></td></tr>
			  </td>
			 </tr>
			
			  <tr><td colspan="4" class="text" height="10"></td></tr>
			  <tr><td>
			   <table width="100%" cellpadding="0" cellspacing="0" border="0" >
			   <tr>
			  <td class="title_heading" width="30%">&nbsp;Alert Range</td>
			  <td class="title_heading" width="33%"><input type="text"  name="range" id="rang" value="{$day_range}"  size="4" class="text" onkeypress="if((event.keyCode!=43) &&(event.keyCode!=47) &&(event.keyCode!=45) 
			&&(event.keyCode!=93) &&(event.keyCode!=91) 
			&& ((event.keyCode<48) ||(event.keyCode>57)))  event.returnValue = false;"/>&nbsp;Days
			  <td class="title_heading" width="33%"><img src="images/go_btn.gif" onclick="return book_validate();" border="0" style="cursor:pointer" />
			  </tr>
			  </table>
			 {if $count_sp_book > 0 }
			  <fieldset  class="altfieldset_bgcolor"><legend align="center">Book Information</legend>
			 <table width="100%" cellpadding="0" cellspacing="1" border="0" >
			 <tr><td colspan="4" class="text" height="10"></td></tr>
			
			 <tr>
			 <td width="20%" class="title_heading">&nbsp;Book Name</td>
			 <td width="20%" class="title_heading">&nbsp;ISBN no</td>
			 <td width="12%" class="title_heading">&nbsp;Issued On</td>
			 <td width="12%" class="title_heading">&nbsp;Return On</td>
			 <td width="20%" class="title_heading">&nbsp;User Name</td>
			 <td width="20%" class="title_heading">&nbsp;Issued Status</td>
			 <td  class="title_heading">
			 <img src="images/go_down1.gif" align="right" onclick="show_book();" style="display:none; cursor:pointer;" id="book_down"/>
			 <img src="images/go_up1.gif" align="right" onclick="hide_book();" style="display:inline; cursor:pointer;" id="book_up"/>
			 </td>
			  </tr>
			  </table>
			  <div id="book_list" style="display:inline;">
			  <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  
			  {section name=indx loop=$count_sp_book}
			  <tr>
			  <td class="list_item" width="19%">&nbsp;{$book_name[indx]}</td>
			  <td class="list_item" width="19%">&nbsp;{$isbn_no[indx]}</td>
			  <td class="list_item" width="12%">&nbsp;{$issued_dt[indx]}</td>
			  <td class="list_item" width="12%">&nbsp;{$return_dt[indx]}</td>
			  <td class="list_item" width="19%">&nbsp;{$full_name[indx]}</td>
			  <td class="list_item">{if $submit_date[indx] > 0}&nbsp;{$submit_date[indx]} Days Remaining{else} <font color="#FF0000" > &nbsp;Date Over !!</font>{/if}</td>
			  </tr>
			  {/section}
			   <tr><td colspan="7" class="text" height="10"></td></tr>
			  </table>
			  </div>
			  </fieldset> 
			 {else}
			 <fieldset  class="altfieldset_bgcolor"><legend align="center">Book Information</legend>
			 <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  <tr><td colspan="4" class="text" height="10"></td></tr>				
			  <tr><td width="100%" class="txt" align="center">There is no Book Alert !</td></tr>
			   <tr><td colspan="4" class="text" height="10"></td></tr>
			  </table>
			  </fieldset>
			  
			   </td>
			   </tr>
			  {/if}
			   
			   </td>
			   </tr>
			   <tr><td colspan="4" class="text" height="10"></td></tr>
			   
			   {else}

			  <tr><td width="100%">
			   <fieldset   class="altfieldset_bgcolor"><legend align="center">Book Information</legend>
			    <table width="100%" cellpadding="0" cellspacing="1" border="0">
			   <tr><td colspan="4" class="text" height="10"></td></tr>
			 {if $count_sp_book > 0 }
			 <table width="100%" cellpadding="0" cellspacing="1" border="0">
			 <tr>
			 <td width="20%" class="title_heading">&nbsp;Book Name</td>
			 <td width="20%" class="title_heading">&nbsp;ISBN no</td>
			 <td width="20%" class="title_heading">&nbsp;Issued date</td>
			 <td width="20%" class="title_heading">&nbsp;Return Date</td>
 			 <td width="20%"  colspan="2"class="title_heading">&nbsp;Status</td>
             </tr>
			 </table>
			
			 <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  {section name=ind loop=$count_sp_book}
			  <tr>
			  <td class="list_item" width="20%"><strong>&nbsp;</strong>{$book_name[ind]}</td>
			  <td class="list_item" width="20%">&nbsp;{$isbn_no[ind]}</td>
			  <td class="list_item" width="20%">&nbsp;{$issued_dt[ind]}</td>
			  <td class="list_item" width="20%">&nbsp;{$return_dt[ind]}</td>
			  <td class="list_item" width="20%">{if $submit_date[ind] > 0}&nbsp;{$submit_date[ind]} Days Remaining{else}<font color="#FF0000">Date Over !!{/if}</font></td>
			   
			  </tr>
			  {/section}
			  <tr><td colspan="5" class="text" height="10"></td></tr>
			  </table>
			  {else}
			   <table width="100%" cellpadding="0" cellspacing="1" border="0">
			  <tr><td width="100%" colspan="4" class="txt" align="center">No Book is Issued  to You
			  </td></tr>
			   <tr><td colspan="4" class="text" height="10"></td></tr>
			 </table>
			 {/if}
			   </fieldset>
	  
               {/if}
            
			</table>
			
            </td>
          </tr>
          
          </table>
        </td>
      </tr>
	  
   </table>

</form>

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

{include file="foot.tpl"}
{literal}
<script language="javascript">
function eq_validate()
{
  if(document.f1.equip_range.value=="" || document.f1.equip_range.value=="0")
		 {
		  alert("Please Enter Range for Equipment !");
		  document.f1.equip_range.focus();
		  return false;
		 }
   else
   		{
		  document.f1.action="?act=equip";
		  document.f1.submit();
		}
}
function book_validate()
{
  if(document.f1.range.value=="" || document.f1.range.value=="0")
		 {
		  alert("Please Enter Range for Book !");
		  document.f1.range.focus();
		  return false;
		 }
	else
   		{
		  document.f1.action="?act=book";
		  document.f1.submit();
		}	 
}

</script>
<script language="javascript">
function show_expired_already()
{
document.getElementById("expired_already").style.display="inline";
document.getElementById("expired_up").style.display="inline";
document.getElementById("expired_down").style.display="none";
}
function hide_expired_already()
{
document.getElementById("expired_already").style.display="none";
document.getElementById("expired_up").style.display="none";
document.getElementById("expired_down").style.display="inline";
}

function show_book()
{
document.getElementById("book_list").style.display="inline";
document.getElementById("book_up").style.display="inline";
document.getElementById("book_down").style.display="none";
}
function hide_book()
{
document.getElementById("book_list").style.display="none";
document.getElementById("book_up").style.display="none";
document.getElementById("book_down").style.display="inline";
}

</script>

{/literal}
Return current item: CoreAsset