Universe-ի խոսքերից
մի հատ ընդանուր ՆԵՐԿԱ պահին ինչ կա դիր էլի...
տակն էլ կգրես թե ինչես ուզում որ լինի
PHP կոդ:
<div class="tab_container">
<div class="generic_layout_container layout_user_list_popular">
<ul>
<?
$query_mess_dialogue = "SELECT *
FROM `messages`
WHERE sender_uid='$ses_uid'
OR
recipient_uid='$ses_uid'
GROUP BY
CASE WHEN `sender_uid`='$ses_uid' THEN recipient_uid
WHEN `recipient_uid`='$ses_uid' THEN sender_uid END";
$resultmessages_dialogue = mysql_query($query_mess_dialogue);
while($rowpmessages_dialogue = mysql_fetch_array($resultmessages_dialogue))
{
$r_mess = $rowpmessages_dialogue;
$r_sender = $r_mess['sender_uid'];
$r_recipient = $r_mess['recipient_uid'];
$query_mess_user_sender = mysql_query("SELECT * FROM users WHERE uid='$r_sender'");
$resultmessages_user_sender = mysql_fetch_array($query_mess_user_sender);
$query_mess_user_recipient = mysql_query("SELECT * FROM users WHERE uid='$r_recipient'");
$resultmessages_user_recipient = mysql_fetch_array($query_mess_user_recipient);
$r_sender_profile_photo = $resultmessages_user_sender['profile_photo'];
$query_sender_profile_photo = mysql_query("SELECT * FROM photos WHERE id='$r_sender_profile_photo'");
$result_sender_profile_photo = mysql_fetch_array($query_sender_profile_photo);
$r_recipient_profile_photo = $resultmessages_user_recipient['profile_photo'];
$query_recipient_profile_photo = mysql_query("SELECT * FROM photos WHERE id='$r_recipient_profile_photo'");
$result_recipient_profile_photo = mysql_fetch_array($query_recipient_profile_photo);
echo '
<div id="m_file_b" style="margin-bottom:10px;" onclick="document.location.href="фы"">
<a href="?id='.$resultmessages_user_sender['id'].'"><img src="uploads/photos/'.$result_sender_profile_photo['photo'].'.jpg" align="left" width="40" height="35" title="'.$resultmessages_user_sender['name'].' '.$resultmessages_user_sender['lastname'].'" style="border-radius:3px;margin-right:3px;" alt=""/></a>
<a href="?id='.$resultmessages_user_recipient['id'].'"><img src="uploads/photos/'.$result_recipient_profile_photo['photo'].'.jpg" align="right" width="40" height="35" title="'.$resultmessages_user_recipient['name'].' '.$resultmessages_user_recipient['lastname'].'" style="border-radius:3px;" alt=""/></a>
<a href="?id='.$resultmessages_user_sender['id'].'">'.$resultmessages_user_sender['name'].'</a> <a href="/mess/'.$resultmessages_user_recipient['uid'].'" title="Վերջին գրառող՝ '.$resultmessages_user_sender['name'].' '.$resultmessages_user_sender['lastname'].'">»»»</a> <a href="?id='.$resultmessages_user_recipient['id'].'">'.$resultmessages_user_recipient['name'].'</a>
<p>'.$rowpmessages_dialogue['message'].'</p>
</div>
<style>
#right{
float:right;
margin-right:5px;
}
#center{
margin-left:125px;
}
div#m_file_b
{
display:block;
width:97.2%;
height:35px;
background:#FFFFFF;
border:2px solid #cccccc;
margin-right:30px;
padding:5px;
}
div#m_file_b:hover
{
background:#E6EEF4;
width:97.2%;
}
</style>
';
}
?>
</ul>
</div>
«««Հեսա եսի ընթանուր կոդնա.
8ba435d9309b.png
«««Եսել ետ կոդի արդյունքը...
Հիմա ես նկարի մեջ որ ցուցադրվում են նամակները դրանք ետ երկու օգտագործողների ամենավերջի գրված նամակները չեն, հիմա ես ուզում եմ որ ետ նամակների տեղը լինի ամենավերջի խոսացած նամակները տվյալ օգտագործողների...
Էջանիշներ