how to put dialogue in inbox action="readpm" ??
Dialogue Inbox
Collapse
X
-
PHP Code:else if($action=="dialog")
{
addonline(getuid_sid($sid),"Vizualizare Dialog PM-uri","");
echo "<card id=\"main\" title=\"Dialog PM-uri\">";
$uid = getuid_sid($sid);
if($page=="" || $page<=0)$page=1;
$myid = getuid_sid($sid);
$pms = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lib3rtymrc_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= 10;
$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)
{
echo "<p>";
$pms = mysql_query("SELECT byuid, text, timesent, id FROM lib3rtymrc_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 = "<a href=\"profil.php?who=$pm[0]&sid=$sid\">$iml".getsimbol($pm[0])."".getnick_uid($pm[0])."</a>";
echo "<small>$bylnk</small>";
$tmopm = date("d m y - H:i:s",$pm[2]);
echo "<small>$tmopm<br/>";
echo parsepm($pm[1], $sid);
echo "</small>";
echo "<br/>";
echo "<small><a href=\"posta.php?action=citeste&pmid=$pm[3]&sid=$sid\">Selecteaza PM</a></small>";
echo "<br/><small>------</small><br/>";
}
echo "</p><p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<small>«<a href=\"posta.php?action=dialog&page=$ppage&sid=$sid&who=$who\">pagina urmatoare</a></small><br/>";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<small>»<a href=\"posta.php?action=dialog&page=$npage&sid=$sid&who=$who\">pagina urmatoare</a></small>";
}
echo "<br/><small>Pagina <b>$page</b> din <b>$num_pages</b></small><br/>";
if($num_pages>2)
{
$rets = "<small>Dute la pagina:</small><br/><input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<small><anchor>[Dute]";
$rets .= "<go href=\"posta.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "</go></anchor></small>";
echo $rets;
}
}else{
echo "<p align=\"center\">";
echo "Nu exista PM-uri";
}
echo "<br/><br/><small><a href=\"rwdpm.php?action=dlg&sid=$sid&who=$who\">Descarca Dialog</a><br/>Doar primele 50 de mesaje</small><br/>";
echo "<small><a href=\"posta.php?action=main&sid=$sid\">Inapoi la posta</a></small><br/>";
echo Prim($sid);
echo "</p></card>";
}
Comment