else if($action=="dialog"){
$uid = getuid_sid($sid);
$uname=getnick_uid($who);
addonline(getuid_sid($sid),"Viewing dialog messages with <i>$uname</i>","");
if($page=="" || $page<=0)$page=1;
$myid = getuid_sid($sid);
$pms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE (byuid=$uid AND touid=$who) OR (byuid=$who AND touid=$uid) ORDER BY timesent"));
echo mysql_error();
$num_items = $pms[0]; //changable
$items_per_page= 7;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($num_items>0){
boxstart("Dialog");
$pms = mysql_query("SELECT byuid, text, timesent FROM ibwf_private WHERE (byuid=$uid AND touid=$who) OR (byuid=$who AND touid=$uid) ORDER BY timesent LIMIT $limit_start, $items_per_page");
while($pm=mysql_fetch_array($pms)){
if(isonline($pm[0])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$bylnk = "$iml<a href=\"index.php?action=viewuser&who=$pm[0]&sid=$sid\">".getnick_uid($pm[0])."</a>";
echo $bylnk;
$tmopm = date("d m y - h:i:s",$pm[2]);
echo " $tmopm<br/>";
echo parsepm($pm[1]);
echo "<br/><br/>";
}
echo "<p align=\"center\">";
if($page>1){
$ppage = $page-1;
echo "<a href=\"inbox.php?action=dialog&page=$ppage&sid=$sid&who=$who\">«PREV</a> ";
}
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"inbox.php?action=dialog&page=$npage&sid=$sid&who=$who\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2){
$rets = "Jump to page<form action=\"inbox.php\" method=\"get\"><input id=\"inputText\" name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input id=\"inputButton\" type=\"submit\" value=\"Go\"/></form>";
echo $rets;
}
}else{
echo "<center>";
echo "NO DATA";
echo "</center>";
}
echo "<br/><br/><a href=\"rwdpm.php?action=dlg&sid=$sid&who=$who\">Download</a><br/>only first 50 messages</p>";
here is also the inbox script incase u want the full code
LDSWAPWORLD
site closed.
im busy with other things in life like facebook , send me PM so i can add you 🙂
www.pinoySG.com
don't ask for help if you're not even helping yourself!
i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.
External image (may be gone)