File manager - Edit - /home/autoph/public_html/connect/home/prf_LoadNextMessage.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'])){ $MyPageCount = 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 //######################################PAGINATION####################################################### //######################################PAGINATION####################################################### $totalRows = mysql_result(mysql_query("SELECT COUNT(id) FROM `prf_ff_message` WHERE `deleted`=0 AND `send_to`='$uniqueRefID' || `deleted`=0 AND `sender_id`='$uniqueRefID' "),0); $noOfRecordPerPage = mysql_result(mysql_query("SELECT `page_count` FROM `asa_versioning_db` WHERE 1"),0); $myPageCount = ceil($totalRows / $noOfRecordPerPage); $offSet = ($myPageCount-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_ff_message` WHERE `deleted`=0 AND `send_to`='$uniqueRefID' || `deleted`=0 AND `sender_id`='$uniqueRefID' ORDER BY id DESC"); while($row=mysql_fetch_array($getItemHdr)){ $senderID = $row['sender_id']; $sendFName=mysql_result(mysql_query("SELECT u_fname from vts_users WHERE u_id= $senderID"),0); $sendLName=mysql_result(mysql_query("SELECT u_lname from vts_users WHERE u_id= $senderID"),0); $prfStatus = $row['read']; if($prfStatus == 1){ $isRead ='Read'; $fontColor='gray'; }else{ $isRead ='Unread'; $fontColor='red'; } $count = $count + 1; ?><tr onclick="javascript:getReadMessageID(this);" onDblclick="javascript:showReadBox(this);" ><?php $prfStatus = mysql_result(mysql_query("SELECT `current_status` FROM `prf_request_hdr` WHERE `reference_code`='".$row['ref_code']."'"),0); if($prfStatus < 8 ){ echo "<td style='width:5%;font-family:Yu Gothic;color:$fontColor'>".$row['id']."</td>"; echo "<td style='width:10%;font-family:Yu Gothic;color:$fontColor'>".strtoupper($row['ref_code'])."</td>"; echo "<td style='width:7%;font-family:Yu Gothic;color:$fontColor'>".strtoupper($row['date'])."</td>"; echo "<td style='width:7%;font-family:Yu Gothic;color:$fontColor'>".strtoupper($row['time'])."</td>"; echo "<td style='width:15%;font-family:Yu Gothic;color:$fontColor'>".strtoupper($sendLName).", ".strtoupper($sendFName)."</td>"; echo "<td style='width:36%;font-family:Yu Gothic;color:$fontColor'>".strtoupper($row['message'])."</td>"; echo "<td style='width:10%;;font-family:Yu Gothic;color:$fontColor'>"; echo $isRead; echo"</td>"; echo "<td style='width:10%;;font-family:Yu Gothic;color:$fontColor'>"; if($row['sender_id']==$uniqueRefID){ echo "Sent"; }else{ echo "Received"; } echo"</td>"; } echo "</tr>"; } ?> <tr><td colspan='9' ><hr style='padding:0px;background:transparent;border:0px;border-bottom:1px solid gray'></td> <tr> <td colspan='3' style='background:white;font-family:Yu Gothic; font-size:13px;color: #f97d43 ;height:20px;font-weight:normal'>Selected Record:</td> <td colspan='6' style='background:white;'> <input type='text' id='messageID' style='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