��ҹ��Ǣ�͡�͹˹�� :: ��ҹ��Ǣ�ͶѴ� |
����� |
��ͤ��� |
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Mon Apr 04, 2011 12:01 am ����ͧ: pm code |
|
|
Code: |
<?php $query_msg = "SELECT * FROM `pms` WHERE `reciever_id`='$id' AND `read_flag` = 'N'"; $result_msg = mysql_query($query_msg) or die (mysql_error()); $num_rows = mysql_num_rows ($result_msg); if ($num_rows == 1){ echo "you have 1 new message."; } elseif ($num_rows > 1) { echo "you have " . $num_rows . " new messages."; }?> |
�աẺ
Code: |
// check if the user has messages in there inbox...///////////////////////////////// $query_msg = "SELECT * FROM `pms` WHERE `reciever_id`='$id'"; $result_msg = mysql_query($query_msg) or die (mysql_error()); if (mysql_num_rows($result_msg) > 0) { echo '<br /> <table border="1" bordercolor="#000000" cellspacing="0" cellpadding="10" bgcolor="red"> <tr> <td style="padding: 10px; background: red"> <strong><a class="msg_inbox" href="inbox.php">You Have Messages In Your Inbox</a> </td> </tr> </table>'; } while($rows = mysql_fetch_array($result_msg)) { $read = $rows['read_flag']; // unread messages? ...///////////////////////////////////////////////////////////// if ($read == 'N') { echo '<br /> <table border="1" bordercolor="#000000" cellspacing="0" cellpadding="10" bgcolor="red"> <tr> <td style="padding: 10px; background: blue"> <strong><a href="inbox.php"><font color="#ffffff" />Some Of These Messages Are Unread</font></a> </td> </tr> </table>'; } } |
�ҡ http://php.bigresource.com/Track/php-iYtx0JS1/ |
|
���仢�ҧ�� |
|
|
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Mon Apr 04, 2011 12:18 am ����ͧ: |
|
|
��ҧ�ԧ�ҡ: |
�����ҧ��
id_pm
id_mem ��駡Ѻ���ҧ��ҪԤ
topic_pm
detail_pm
date_pm |
|
|
���仢�ҧ�� |
|
|
|