{include file="head.tpl"}
{include file="left.tpl"}
<form name="form1" method="post" action="">
<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="27"></td>
{if $status == 1 || $status == 2 }
{if $rows > 0}
<td width="50%" class="header"><span class="whitetext">
Asset History # Asset Nickname : {$asset_nickname}
</span></td>
<!--<td width="33%" class="header" align="left"><span class="whitetext">Enter Nickname</span>
<input type="text" name="nick_asset" value="" size="20" />
</td>-->
<td width="50%" class="header" align="right"><span class="whitetext">
Show History : </span>
<select name="asset_cond" id="asset_cond" onchange="set_condition();">
<option value="0" {if $old_cond == 0} selected {/if}>All</option>
<option value="3" {if $old_cond == 3} selected {/if}>By Nick Name</option>
</select>
</td>
{else}
<td width="50%" class="header"><span class="whitetext">
Asset History
</span></td>
<!--<td width="33%" class="header" align="left"><span class="whitetext">Enter Nickname</span>
<input type="text" name="nick_asset" value="" disabled/>
</td>-->
<td width="50%" class="header" align="right"><span class="whitetext">
Show History of : </span>
<select name="asset_cond" id="asset_cond" onchange="set_condition();">
<option value="0" {if $old_cond == 0} selected {/if}>All</option>
<option value="3" {if $old_cond == 3} selected {/if}>By Nick Name</option>
</select>
</td>
{/if}
{else}
<td width="100%" class="header"><span class="whitetext">
Asset History
</span></td>
{/if}
<td><img src="images/corner10.gif" width="5" height="27"></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">
<div id="nick_name" class="VEPart" style="border: #333333 1px solid; width: 180px; height: 90px; left:678; top:134; display:{$layer_status}">
<div class="VEMover">
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td width="80%" class="title_heading" height="10" colspan="2" nowrap>
Search By Nick Name
</td>
<td width="15%" class="title_heading" height="10" colspan="2" align="right"></td>
<td width="5%" class="btn_bg1" height="10" colspan="2" align="right">
<input type="button" name="close_nickname" title="Close" value="X" onclick="close_layer();" style="border: #333333 1px solid;font-weight:bold;" class="btn_bg1"/>
</td>
</tr>
<tr><td width="100%" class="list_item" height="10" colspan="2"></td></tr>
<tr>
<td width="7%" class="list_item" height="10"></td>
<td width="43%" class="list_item" nowrap> Enter Asset Nick Name</td>
<td width="50%" class="list_item">
<input type="text" name="nick_asset" value="{$asset_nick}" size="20" class="text"/></td>
</tr>
<tr><td width="100%" class="list_item" height="10" colspan="2"></td></tr>
<tr>
<td colspan="4" width="60%" align="center" >
<img src="images/search.gif" border="0" style="cursor:pointer" title="Click to Search" onclick="send_from_layer();"/>
</td>
</tr>
</table>
</div>
</div>
<!-- ####################### Paste the Table to Table from here ############## -->
{if $status == 1 || $status == 2 }
{if $rows > 0}
<table cellSpacing="2" cellPadding="0" width="98%" align="center" border="0">
<tr>
<td align="left" class="header">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
{if $rows == 1}
<tr>
<td align="left" width="45%">
<img src="images/previous_disabled.gif" title="No Previous Record"/>
</td>
<td align="left" width="30%">
<a href="export_history.php" ><img src="images/export_all_btn.gif" border="0" title="Export All Asset History"/></a>
</td>
<td align="right" width="30%">
<img src="images/next_disabled.gif" title="No Next Record"/>
</td>
</tr>
{else}
<tr>
<td align="left" width="45%">
{if $flag !=0}
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=first&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/start1.gif" border="0" title="Click to View First Record"/></a>
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=prev&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/previous1.gif" border="0" title="Click to View Previous Record"/></a>
{else}
<img src="images/start_disabled.gif" title="First Record"/>
<img src="images/previous_disabled.gif" title="No Previous Record"/>
{/if}
</td>
<td align="left" width="30%">
<a href="export_history.php" ><img src="images/export_all_btn.gif" border="0" title="Export All Asset History"/></a>
</td>
<td align="right" width="30%">
{if $flag !=1}
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=next&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/next1.gif" border="0" title="Click to View Next Record"/></a>
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=last&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/end1.gif" border="0" title="Click to View Last Record"/></a>
{else}
<img src="images/next_disabled.gif" title="No Next Record"/>
<img src="images/end_disabled.gif" title="Last Record"/>
{/if}
</td>
</tr>
{/if}
</table>
</td>
</tr>
<tr><td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr align="center">
<td class="txtbox_bgcolor" width="25%"> <strong>Equipment Details</strong></td>
<td class="txtbox_bgcolor" width="15%"> <strong>Old Status</strong></td>
<td class="txtbox_bgcolor" width="15%"> <strong>Changed Status</strong></td>
<td class="txtbox_bgcolor" width="15%"> <strong>Issued User</strong></td>
<td class="txtbox_bgcolor" width="15%"> <strong>Comment</strong></td>
<td class="txtbox_bgcolor" width="15%"> <strong>Date</strong></td>
</tr>
</table>
{section name=i loop=$eq_name}
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="list_item" align="left" width="23%" valign="top" style="border:#333333 1px solid;">
<table bgcolor="#ffffff" width="100%" border="0" cellspacing="0" cellpadding="2" align="left">
<tr><td class="list_item" valign="TOP">Name</td><td class="list_item">{$eq_name[i]}</td></tr>
<tr><td class="list_item" valign="TOP">Serial No</td><td class="list_item">{$eq_serial[i]}</td></tr>
<tr><td class="list_item" valign="TOP">Manufacturer</td><td class="list_item">{$eq_manufac[i]}</td></tr>
<tr><td class="list_item" valign="TOP">Warranty Date</td><td class="list_item">{$eq_warranty[i]}</td></tr>
</table>
</td>
<td class="list_item" align="left" width="70%" valign="top" style="border:#333333 1px solid;">
<div style="height:100px;overflow:auto;">
<table width="100%" border="0" cellspacing="3" cellpadding="3" align="center">
{assign var=a value="$count_inner[i]" }
{if $a > 1}
{section name=index loop=$a}
<tr>
<td class="list_item" width="17%" valign="TOP">{$old_status[i][index]}</td>
<td class="list_item" width="17%" valign="TOP"><b>{$new_status[i][index]}</b></td>
<td class="list_item" width="17%" valign="TOP">{$user_nm[i][index]}</td>
<td class="list_item" width="17%" valign="TOP">{$comment[i][index]}</td>
<td class="list_item" width="17%" valign="TOP">{$change_date[i][index]}</td>
</tr>
{/section}
{else}
<tr>
<td align="left" width="70%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" class="list_item" align="left"></td>
</tr>
<tr>
<td colspan="1" align="center" align="center"><font color="#FF0000">Running Properly Till Date</font></td>
</tr>
<tr>
<td colspan="4" class="list_item" align="left"></td>
</tr>
</table>
</td>
</tr>
{/if}
</table>
</div>
</td>
</tr>
</table>
{/section} </td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left" class="header">
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
{if $rows == 1}
<tr>
<td align="left" width="45%">
<img src="images/previous_disabled.gif" title="No Previous Record"/>
</td>
<td align="left" width="30%">
<a href="export_history.php" ><img src="images/export_all_btn.gif" border="0" title="Export All Asset History"/></a>
</td>
<td align="right" width="30%">
<img src="images/next_disabled.gif" title="No Next Record"/>
</td>
</tr>
{else}
<tr>
<td align="left" width="45%">
{if $flag !=0}
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=first&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/start1.gif" border="0" title="Click to View First Record"/></a>
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=prev&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/previous1.gif" border="0" title="Click to View Previous Record"/></a>
{else}
<img src="images/start_disabled.gif" title="First Record"/>
<img src="images/previous_disabled.gif" title="No Previous Record"/>
{/if}
</td>
<td align="left" width="30%">
<a href="export_history.php" ><img src="images/export_all_btn.gif" border="0" title="Export All Asset History"/></a>
</td>
<td align="right" width="30%">
{if $flag !=1}
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=next&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/next1.gif" border="0" title="Click to View Next Record"/></a>
<a href="asset_history.php?sdfh__gi468_k___coe856={$asset_tag}&&act=last&&sdjgf05___Xjsarey3__nujdhj_h={$old_cond}"><img src="images/end1.gif" border="0" title="Click to View Last Record"/></a>
{else}
<img src="images/next_disabled.gif" title="No Next Record"/>
<img src="images/end_disabled.gif" title="Last Record"/>
{/if}
</td>
</tr>
{/if}
</table>
</td>
</tr>
</table>
{else}
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td align="center" width="100%" class="text">
<font color="#FF0000"> Sorry No result found !!</font>
</td>
</tr>
</table>
{/if}
{else}
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td align="center" width="100%" class="text">
<font color="#FF0000">Sorry ! You have no such Privillage ... </font>
</td>
</tr>
</table>
{/if}
<!-- ######################## End Here ##########################-->
</form>
{include file="foot.tpl"}
{literal}
<script language="javascript">
function set_condition()
{
p=document.all["asset_cond"].value;
//alert(p);
//document.form1.cond.value=p;
if(p==3)
{
document.getElementById("nick_name").style.display="inline";
}
else
{
location.href="asset_history.php?sdjgf05___Xjsarey3__nujdhj_h="+p+"&&dsfhsjv_DMJ___DKIW=";
}
}
/*function set_condition()
{
p=document.all["asset_cond"].value;
//alert(p);
//document.form1.cond.value=p;
if(p==3)
{
var val = prompt("Enter Nick Name of The Asset",'');
//document.form1.nick_asset.value = val;
location.href="asset_history.php?sdjgf05___Xjsarey3__nujdhj_h="+p+"&&dsfhsjv_DMJ___DKIW="+val;
//return false;
}
else
{
location.href="asset_history.php?sdjgf05___Xjsarey3__nujdhj_h="+p+"&&dsfhsjv_DMJ___DKIW=";
}
}*/
function send_from_layer()
{
var val = document.form1.nick_asset.value;
if(val == "")
{
alert("You Must Enter A Nick Name !");
document.form1.nick_asset.select();
return false;
}
else
{
document.getElementById("nick_name").style.display="none";
location.href="asset_history.php?sdjgf05___Xjsarey3__nujdhj_h=3&&dsfhsjv_DMJ___DKIW="+val;
}
}
function close_layer()
{
document.getElementById("nick_name").style.display="none";
//document.form1.asset_cond.value=0;
//location.href="asset_history.php?sdjgf05___Xjsarey3__nujdhj_h= 0";
}
</script>
<script language="javascript" src="js/move_div.js"></script>
<script language="javascript">
var MoverBehaviour = {
mo: null, // reference to the movable obj,
x: 0, y: 0,
// ----- Events -----
onmousedown: function (evt) {
evt = evt || window.event;
var src = jcl.FindBehaviourElement(evt.srcElement, MoverBehaviour);
src.MoveStart(evt);
}, // onmousedown
// track mouse moves. This handler will be attached to the document level !
_onmousemove: function (evt) {
evt = evt || window.event;
MoverBehaviour.MoveIt(evt);
}, // onmousemove
// track mouse button up. This handler will be attached to the document level !
_onmouseup: function (evt) {
evt = evt || window.event;
MoverBehaviour.MoveEnd(evt);
}, // onmouseup
// ----- Methods -----
MoveStart: function (evt) {
// find the moving part (position:absolute or class="VEPart")
var mo = this;
while ((mo != null) && (mo.className != "VEPart"))
mo = mo.parentNode;
if (mo == null)
return; // don't move
MoverBehaviour.mo = mo;
// calculate mousepointer-object distance
mo.x = mo.y = 0;
obj = mo;
while (obj != null) {
mo.x += obj.offsetLeft;
mo.y += obj.offsetTop;
obj = obj.offsetParent;
} // while
mo.x = evt.clientX - mo.x;
mo.y = evt.clientY - mo.y;
// make the moving object globally evailable when mouse is leaving this object.
jcl.AttachEvent(document, "onmousemove", this._onmousemove);
jcl.AttachEvent(document, "onmouseup", this._onmouseup);
}, // MoveStart
MoveIt: function (evt) {
var mo = MoverBehaviour.mo;
if (mo != null) {
var p = (evt.clientX - mo.x) + "px";
if (p != mo.style.left) mo.style.left = p;
p = (evt.clientY - mo.y) + "px";
if (p != mo.style.top) mo.style.top = p;
} // if
// cancel selecting anything
evt.cancelBubble = true;
evt.returnValue = false;
}, // MoveIt
MoveEnd: function () {
var mo = MoverBehaviour.mo;
if (mo != null) {
MoverBehaviour.mo = null;
jcl.DetachEvent(document, "onmousemove", this._onmousemove);
jcl.DetachEvent(document, "onmouseup", this._onmouseup);
} // if
} // MoveEnd
} // MoverBehaviour
jcl.LoadBehaviour("nick_name",MoverBehaviour);
</script>
{/literal}