Location: PHPKode > projects > CoreAsset > coreasset/templates/add_purchase_book.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">

  Book/s PO
</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>
			
			{if $status < 4 }
			<form name="f1" method="post" action="?act=add" onSubmit="return validate();">
			<table width="100%">
				<!--<tr>
				<td class="alttxtbox_bgcolor" width="20%">&nbsp; Category Name </td>
				</tr>-->
				{if $found == 0}
				<tr>
			      
                  <td class="txt" colspan="2" align="center"><font color="#FF0000"> Sorry !! No Book Found For Purchase Order </font></td>
				</tr>
				  {else}
				  <tr>
				  <td class="txtbox_bgcolor">&nbsp;Select Books</td> 
				   <td class="txtbox_bgcolor">
				  <select name="book_ids[]" id="book_name" multiple>
				  <option value="0"> -- Select Books -- </option>
				  {section name=index loop=$book_name}
                   <option value="{$book_ids[index]}">{$book_name[index]} [ {$cnt[index]} Pcs] </option>
                   {/section}
				  </select>
				  {* section name=ind loop=$book_ids}
                   <input type="hidden" value="{$book_ids[ind]}" name="book_ids[]"  />
                   {/section *}
				  </td>
				 
                </tr>
			<tr>
                  <td class="alttxtbox_bgcolor" width="20%">
                  &nbsp;Date</td>
                  <td class="alttxtbox_bgcolor" width="33%">
				  <input name="po_date"  id="po_date" type="text" size="20" class="text" 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="btn_bg" colSpan="1">
                  <td class="btn_bg" colSpan="1">
                  <input type="image" src="images/add_po.gif" name="add" title="add purchase order"></td>
                </tr>
				{/if}
			</table>
			</form>
			{else}
			 <table borderColor="#ffffff" cellSpacing="1" cellPadding="0" width="100%" border="0">
                <tr>
                  <td class="txt" align="center" width="20%" height="23">
                  <font color="RED">Sorry ! You have no such Privillage ... </font>
                  </td>
                </tr>
             </table>
			{/if}
			</td>
			</tr>
	</table>
    </td>
  </tr>
</table>



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

{include file="foot.tpl"}
{if $found !=0 && $status < 4}
{literal}

	<script language="JavaScript" src="js/calendar.js"></script>
	<script language="JavaScript">
	var cal4 = new calendar1(document.f1.elements['po_date']);
		cal4.year_scroll = true;
	
function validate()
{
 if(document.f1.book_name.value == "" || document.f1.book_name.value == '0')
 {
  alert("No Book is Selected for Purchase Order");
  document.f1.book_name.focus();
  return false;

 }
 if(document.f1.po_date.value=="")
 {
  alert("Please Enter purchase order date!");
  document.f1.po_date.focus();
  return false;
 }
 
 return confirm("Are you sure? The Purchase order will be added!");
}
</script>
{/literal}	
{/if}	
Return current item: CoreAsset