{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">
Edit Book/s
</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 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>
<form name="f1" method="post" action="?act=edit" onsubmit="return validate();">
<table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
{if $status == 1}
<tr>
<td class="txt" width="20%" colspan="2" align="center">
<font color="#FF0000">{$msg}</font> </td>
</tr>
<tr>
<td class="alttxtbox_bgcolor" width="20%">
Book Name </td>
<td class="alttxtbox_bgcolor" width="33%">
<input name="book_name" id="book" type="text" size="20" class="text" value="{$book_name}" /></td>
</tr>
<tr>
<td width="20%" class="txtbox_bgcolor"> Author</td>
<td width="33%" class="txtbox_bgcolor"><input type="text" name="author" id="author" size="20" class="text" value="{$author}"/>
</tr>
<!--<tr>
<td class="alttxtbox_bgcolor">Select Pieces</td>
<td class="alttxtbox_bgcolor"><select name="pieces" onChange="return go(this.value);">
<option value="1" > 1 </option>
<option value="2"> 2</option>
<option value="3"> 3</option>
<option value="4"> 4</option>
<option value="5"> 5</option>
<option value="6"> 6</option>
<option value="7"> 7</option>
</select>
</td>
</tr>-->
<tr>
<td width="20%" class="alttxtbox_bgcolor"> ISBN No</td>
<td width="33%" class="alttxtbox_bgcolor">
<input type="text" class="text" name="isbn_no" id="isbn_no" value="{$isbn_no}" >
</tr>
<tr>
<td colspan="2">
<div id="contact"></div>
</td>
</tr>
<input type="hidden" name="book_id" value="{$book_id}" />
<tr>
<td width="20%" class="txtbox_bgcolor"> Publisher</td>
<td width="33%" class="txtbox_bgcolor"><input type="text" name="publisher" id="publisher" size="20" class="text" value="{$publisher}"/>
</tr>
<tr>
<td class="alttxtbox_bgcolor" width="20%">
Receiving Date</td>
<td class="alttxtbox_bgcolor" width="33%">
<input name="rec_date" id="rec_date" type="text" size="20" class="text" value="{$receive_date}" readonly/>
<a href="javascript:cal4.popup();">
<img src="images/calender.gif" border="0" alt="Click to pickup date-time...">
</a>
</td>
</tr>
<tr>
<td class="txtbox_bgcolor" width="20%">
Price</td>
<td width="33%" class="txtbox_bgcolor"><input type="text" name="price" value="{$price}" id="price" size="20" 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;"/>
</tr>
<tr>
<td class="btn_bg" colSpan="1">
<td class="btn_bg" colSpan="1">
<input type="image" src="images/edit_book.gif" name="edit"></td>
</tr>
<table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
<tr>
<td class="txt" align="center" width="20%" class="alttxtbox_bgcolor" height="23">
<font color="RED"></font>
</td>
</tr>
</table>
</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>-->
{else}
<tr>
<td class="txt" colspan="9" align="center" width="25%" height="23"><font color="RED">Sorry ! You have no such Privillage</font></td>
</tr>
{/if}
</table>
</td>
</tr>
</form>
</table>
<!-- ######################## End Here ##########################-->
{include file="foot.tpl"}
{literal}
<script language="JavaScript" src="js/calendar.js"></script>
<script language="JavaScript">
var cal4 = new calendar1(document.f1.elements['rec_date']);
cal4.year_scroll = true;
</script>
<script language="javascript">
function validate()
{
if(document.f1.book_name.value=="")
{
alert("Please Enter Bookname");
document.f1.book_name.focus();
return false;
}
if(document.f1.author.value=="")
{
alert("Please Enter Authorname");
document.f1.author.focus();
return false;
}
if(document.f1.isbn_no.value=="")
{
alert("Please Enter ISBN no");
document.f1.isbn_no.focus();
return false;
}
if(document.f1.publisher.value=="")
{
alert("Please Enter Publisher name");
document.f1.publisher.focus();
return false;
}
/* if(document.f1.rec_date.value=="")
{
alert("Please Enter Receive Date");
document.f1.rec_date.focus();
return false;
}*/
if(document.f1.price.value=="")
{
alert("Please Enter Price");
document.f1.price.focus();
return false;
}
return confirm("Are you sure? The Book Will be Edited!");
}
</script>
{/literal}