File manager - Edit - /home/autoph/public_html/connect/home/PRF/prf_SearchSuppliers.php
Back
<?php include_once 'core/init.php'; $prfDate = date_create() ->format("Y-m-d"); $prfTime = date('H:i:s'); $myDate = date_create() ->format("Y-m-d"); $prfDateTime=$prfDate. " ".$prfTime; //$myUID = $user_data['u_id']; if(isset($_POST['done'])){ $searchText = mysql_escape_string($_POST['searchText']); $MyPageCountX = mysql_escape_string($_POST['MyPageCount']); $myOffSet = mysql_escape_string($_POST['myOffSet']); $MyRowCount = mysql_escape_string($_POST['MyRowCount']); $CurrentpageCount = mysql_escape_string($_POST['CurrentpageCount']); $recordPerPage = mysql_escape_string($_POST['recordPerPage']); ?> <table> <?php $totalRows = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_suppliers` WHERE `deleted`=0 AND `sup_code`='$searchText' || `deleted`=0 AND `sup_name` like '%$searchText%' "),0); $noOfRecordPerPage = mysql_result(mysql_query("SELECT `page_count` FROM `asa_versioning_db` WHERE 1"),0); $myPageCount = ceil($totalRows / $noOfRecordPerPage); $offSet = ($CurrentpageCount-1) * $noOfRecordPerPage; echo "<input type='hidden' id='MyPageCount' value='".$myPageCount."'>"; echo "<input type='hidden' id='MyRowCount' value='".$totalRows."'>"; echo "<input type='hidden' id='myOffSet' value='".$offSet."'>"; echo "<input type='hidden' id='recordPerPage' value='".$noOfRecordPerPage."'>"; $getItemHdr = mysql_query("SELECT * FROM `prf_suppliers` WHERE `deleted`=0 AND `sup_code`='$searchText' || `deleted`=0 AND `sup_name` like '%$searchText%' ORDER BY sup_name ASC LIMIT $offSet, $noOfRecordPerPage "); while($row=mysql_fetch_array($getItemHdr)){ ?><tr onclick="javascript:showPRFheaderForDeletion(this);" onDblclick="javascript:showActionViewDelete(this);" ><?php echo "<td style='width:10%'>".$row['id']."</td>"; echo "<td style='width:10%'>".strtoupper($row['sup_code'])."</td>"; echo "<td style='width:30%'>".strtoupper($row['sup_name'])."</td>"; echo "<td style='width:5%;text-align:left'>".strtoupper($row['terms'])."</td>"; echo "<td style='width:15%;text-align:center'>".strtoupper($row['contact_person'])."</td>"; echo "<td style='width:15%'>".$row['contact_person_email']."</td>"; echo "<td style='width:15%'>".$row['contact_person_mobile']."</td>"; echo "</tr>"; } ?> <tr><td colspan='9' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='2' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:normal'>Selected Record:</td> <td colspan='7' style='background:white;'> <input type='hidden' id='selectedPRFHeaderID' class='TableBottomLabel'> <input disabled type='text' id='selectedPRFHeaderIDLabel' value='<?php echo "Record/s Found: ".$totalRows;?>' style='text-align:left;background:white;border:0px;font-family:Yu Gothic;font-size:14px;color: #f97d43 ;font-weight:normal'> </td> </tr> </table> <?php } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings