Funmobile Avatar
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
Lavalair index.php
//////////////////////////////////View Topic
else if($action=="viewtpc")
{
addonline(getuid_sid($sid),"Viewing Forum Topic","");
$tid = $_GET["tid"];
$go = $_GET["go"];
$tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
if(!canaccess(getuid_sid($sid), $tfid[0]))
{
echo "<card id=\"main\" title=\"lavalair.net\">";
echo "
";
echo "You Don't Have A Permission To View The Contents Of This Forum
";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo "
";
echo "</card>";
getAd(); echo "</wml>";
exit();
}
$tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
$tnm = htmlspecialchars($tinfo[0]);
echo "<card id=\"main\" title=\"$tnm\">";
echo "
";
$num_pages = getnumpages($tid);
if($page==""||$page<1)$page=1;
if($go!="")$page=getpage_go($go,$tid);
$posts_per_page = 5;
if($page>$num_pages)$page=$num_pages;
$limit_start = $posts_per_page *($page-1);
echo "<a href=\"index.php?action=post&sid=$sid&tid=$tid\">Post reply</a>";
$lastlink = "<a href=\"index.php?action=$action&tid=$tid&sid=$sid&go=last\">Last Page</a>";
$firstlink = "<a href=\"index.php?action=$action&tid=$tid&sid=$sid&page=1\">First Page</a> ";
$golink = "";
if($page>1)
{
$golink = $firstlink;
}
if($page<$num_pages)
{
$golink .= $lastlink;
}
if($golink !="")
{
echo "
$golink";
}
echo "
";
echo "
";
$vws = $tinfo[4]+1;
$rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));
echo "Replies: $rpls[0] - Views: $vws
";
///fm here
if($page==1)
{
$posts_per_page=4;
mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE id='".$tid."'");
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));
$unick = getnick_uid($ttext[0]);
if(isonline($ttext[0]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$usl = "
<a href="index.php?action=viewuser&sid=$sid&who=$ttext[0]">$iml$unick</a>";
$topt = "<a href=\"index.php?action=tpcopt&sid=$sid&tid=$tid\">*</a>";
if($go==$tid)
{
$fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
}else{
$fli ="";
}
$pst = parsemsg($ttext[1],$sid);
echo "$usl: [b]I NEED VIEW AVATAR HERE $fli$pst $topt
";
$dtot = date("d-m-y - H:i:s",$ttext[2]);
echo $dtot;
echo "
";
if($ttext[3]>0)
{
echo "<a href=\"index.php?action=viewtpl&sid=$sid&who=$tid\">POLL</a>
";
}
}
if($page>1)
{
$limit_start--;
}
$sql = "SELECT id, text, uid, dtpost, quote FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";
$posts = mysql_query($sql);
while($post = mysql_fetch_array($posts))
{
$unick = getnick_uid($post[2]);
if(isonline($post[2]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$usl = "
<a href="index.php?action=viewuser&sid=$sid&who=$post[2]">$iml$unick</a>";
$pst = parsemsg($post[1], $sid);
$topt = "<a href=\"index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
if($post[4]>0)
{
$qtl = "*<a href=\"index.php?action=viewtpc&sid=$sid&tid=$tid&pst=\">(quote:p=blaze,d=16-04-2006)</a>*";
}
if($go==$post[0])
{
$fli = "<img src=\"images/flag.gif\" alt=\"!\"/>";
}else{
$fli ="";
}
echo "$usl: [b]I NEED VIEW AVATAR HERE $fli$pst $topt
";
$dtot = date("d-m-y - H:i:s",$post[3]);
echo $dtot;
echo "
";
}
///to here
echo "
";
echo "
";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg>0)
{
echo "<a href="inbox.php?action=main&sid=$sid">Inbox($umsg/$tmsg)</a> ";
}
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"index.php?action=viewtpc&page=$ppage&sid=$sid&tid=$tid\">«PREV</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"index.php?action=viewtpc&page=$npage&sid=$sid&tid=$tid\">Next»</a>";
}
echo "
$page/$num_pages ";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"index.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"tid\" value=\"$tid\"/>";
$rets .= "<postfield name=\"sid\" value=\"$sid\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo " ";
echo "<a href=\"index.php?action=post&sid=$sid&tid=$tid\">Post reply</a>";
echo "
";
echo "
";
$fid = $tinfo[5];
$fname = getfname($fid);
$cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));
$cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));
$cname = $cinfo[0];
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Home</a>>";
$cid = mysql_fetch_array(mysql_query("SELECT cid FROM ibwf_forums WHERE id='".$fid."'"));
if($cid[0]>0)
{
$cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_fcats WHERE id='".$cid[0]."'"));
$cname = htmlspecialchars($cinfo[0]);
echo "<a href=\"index.php?action=viewcat&sid=$sid&cid=$cid[0]\">";
echo "$cname</a>
";
}else{
$cid = mysql_fetch_array(mysql_query("SELECT clubid FROM ibwf_forums WHERE id='".$fid."'"));
$cinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_clubs WHERE id='".$cid[0]."'"));
$cname = htmlspecialchars($cinfo[0]);
echo "<a href=\"index.php?action=gocl&sid=$sid&clid=$cid[0]\">";
echo "$cname Club</a>
";
}
$fname = htmlspecialchars($fname);
echo "><a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid\">$fname</a>>$tnm";
echo " "; getAd(); echo "</card>";
}
I need code for view user avatar in the posts. Please help. p.s. jbg valjda ce neko skontati sta je pisac htio reci...
Add this code
$av = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'"));
echo "
<img src=\"$av[0]\" alt=\"avatar\"/>
between lines
$pst = parsemsg($ttext[1],$sid);
AND
echo "$usl: $fli$pst $topt
";
in index.php,you can put it where ever you want
I tested this in last lavalair script that amylee posted on this forum druze valjda znas sta trebas....imas pozzzz
Add this code
$av = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'")); echo " <img src=\"$av[0]\" alt=\"avatar\"/>between lines
$pst = parsemsg($ttext[1],$sid);AND
echo "$usl: $fli$pst $topt ";in index.php,you can put it where ever you want
I tested this in last lavalair script that amylee posted on this forum druze valjda znas sta trebas....imas pozzzz
PozZ pa jesil ti ziv? External image (may be gone) rjesio sam problem na drugi nacin evo pogledaj http://united1x2.com/forum