friends, what to add where to allow smileys n bbcodes on this page..
PHP Code:
//////////////////////////////////shouts
else if($action=="shouts")
{
addonline(getuid_sid($sid),"Roar","");
$pstyle = gettheme($sid);
echo "<div class=\"HTAB\" style=\"background:#F1FFFE\">";
echo "<div>";
echo xhtmlhead("Roar",$pstyle);
$who = $_GET["who"];
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
if($who=="")
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM hfjgn_shouts"));
}else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM hfjgn_shouts WHERE shouter='".$who."'"));
}
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
if($who =="")
{
$sql = "SELECT id, shout, shouter, shtime FROM hfjgn_shouts ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, shout, shouter, shtime FROM hfjgn_shouts WHERE shouter='".$who."'ORDER BY shtime DESC LIMIT $limit_start, $items_per_page";
}
echo "<p><small>";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$shnick = getnick_uid($item[2]);
$sht = htmlspecialchars($item[1]);
// $shdt = date("d m y-H:i", $item[3]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$shnick</a>: $sht<br/>";
if(ismod(getuid_sid($sid)))
{
$dlsh = "<a href=\"121mprocpl121.php?action=delsh&sid=$sid&shid=$item[0]\">[x]</a>";
}else{
$dlsh = "";
}
echo "$lnk $dlsh<br/>";
}
}
echo "</small></p>";
echo "<p align=\"center\">";
echo "<form method=\"post\" action=\"121genproc121.php?action=shout&sid=$sid\">";
echo "Text:<input name=\"shtxt\" maxlength=\"100\"/><br/>";
echo "<input type=\"submit\" name=\"Submit\" value=\"Roar\"/><br/>";
echo "</form>";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"121lists121.php?action=shouts&page=$ppage&sid=$sid&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"121lists121.php?action=shouts&page=$npage&sid=$sid&who=$who\">Next»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"121lists121.php\" method=\"get\">";
$rets .= "Jump to page<input name=\"page\" format=\"*N\" size=\"3\"/><br/>";
$rets .= "<input type=\"submit\" value=\"GO\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"who\" value=\"$who\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM hfjgn_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM hfjgn_iconset WHERE id='".$thid[0]."'"));
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
}
Comment