} ?> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <? $sql = "select ddl.rec_id , ddl.DispatchMasterId , ddl.DocId , ddl.DocStatus , ddl.DocDate , dm.rec_id , dm.PiId , dm.DispatchNumberId from mo_adm_despatch_doclist as ddl , mo_adm_dispatch_master as dm where ddl.DocStatus = '0' and ddl.DispatchMasterId = dm.rec_id and dm.DispatchNumberId = '".$row_dn["rec_id"]."'"; $result = mysql_query($sql)or die("Error in Query: ".$sql."<br/>".mysql_error()."<br/>".mysql_errno()); if(mysql_num_rows($result)>0) { while($row = mysql_fetch_array($result)) //$row = mysql_fetch_array($result); { ?> <td class="tableText"><?=getDocumentDetail('DocumentName','rec_id',$row['DocId'])?></td> <? } } ?> </tr> </table> </td> </tr> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <? $sql_1 = "select bm.rec_id , bm.BuyerName , docm.rec_id , docm.DocumentName , docm.DocumentFor , dn.rec_id , dn.DispatchNumber from mo_adm_buyer_master as bm , mo_adm_dispatch_number as dn , mo_adm_document_master as docm where bm.BuyerType = docm.DocumentFor and dn.BuyerId = bm.rec_id and dn.rec_id = '".$row_dn["rec_id"]."' order by dn.rec_id ";
document.getElementById(id).innerHTML=value; } function close_div(a) { var id= a; document.getElementById(id).style.display='none'; } </script> <?php $id = ''; $docfor = ''; if (isset($_GET['id'])) { $id = $_GET['id']; $docfor = getDocumentDetail('DocumentFor', 'rec_id', $id); } $msg = ''; if (!session_is_registered("no_refresh")) { $_SESSION['no_refresh'] = ""; } if (isset($_POST['hidden_docfor'])) { if ($_POST['no_refresh'] == $_SESSION['no_refresh']) { //echo "WARNING: Do not try to refresh the page."; } else { $document = $_POST['txt_document']; $hidden_docfor = $_POST['hidden_docfor']; $ip = $_SERVER['REMOTE_ADDR']; $other_detail = isset($_POST['txt_detail']) ? $_POST['txt_detail'] : ""; $sql_ins = "insert into " . $mysql_adm_table_prefix . "document_master set\n\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDocumentFor = '{$hidden_docfor}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDocumentName = '{$document}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOtherDetail = '{$other_detail}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInsertBy = '{$SessionUserType}',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tInsertDate = now(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIpAddress = '{$ip}' "; $result_ins = mysql_query($sql_ins) or die("Error in query:" . $sql_ins . "<br>" . mysql_error() . ":" . mysql_errno());
</tr> <?php } ?> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <?php $sql = "select ddl.rec_id , ddl.DispatchMasterId , ddl.DocId , ddl.DocStatus , ddl.DocDate , dm.rec_id , dm.PiId , dm.DispatchNumberId from mo_adm_despatch_doclist as ddl , mo_adm_dispatch_master as dm where ddl.DocStatus = '0' and ddl.DispatchMasterId = dm.rec_id and dm.DispatchNumberId = '" . $row_dn["rec_id"] . "'"; $result = mysql_query($sql) or die("Error in Query: " . $sql . "<br/>" . mysql_error() . "<br/>" . mysql_errno()); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { ?> <td class="tableText"><?php echo getDocumentDetail('DocumentName', 'rec_id', $row['DocId']); ?> </td> <?php } } ?> </tr> </table> </td> </tr> <tr> <td align="center" colspan="4"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr>