include('./include/functions.php');
include('./include/func_user.php');
include('./include/zonelist.php');
include('./include/credit.php');
$tbreply = "reply_video";
$field="`replyid`, `postid`, `Username`,`userid`, `message`, `replydate`, `active`";
if($_GET[pid] <>"" && is_numeric($_GET[pid]))
{
if($_GET[rid] <>"" && is_numeric($_GET[rid])){
$sql = "Select {$field} FROM {$tbreply} where active = '1' and `postid` = ".$_GET[pid]." and `replyid` = ".$_GET[rid] ." LIMIT 1";
}
if($_GET[nextid] <>"" && is_numeric($_GET[nextid]))
{
$erm="no next reply!!";
$sql="Select {$field} from `{$tbreply}` where `active` = 1 and `postid` = ".$_GET[pid]." and `replyid` > ".$_GET[nextid]." ORDER by `postid` ASC LIMIT 1";
}
if($_GET[Previd] <>"" && is_numeric($_GET[Previd]))
{
$erm="no Previous reply!!";
$sql="Select {$field} from `{$tbreply}` where `active` = 1 and `postid` = ".$_GET[pid]." and `replyid` < ".$_GET[Previd]." ORDER by `postid` ASC LIMIT 1";
}
}
$showadsense=0;
if($sql<>"")
{
$rs = mysql_query($sql);
if($row = @mysql_fetch_assoc($rs))
{
if($_SESSION["page"] <> $row["replyid"])
{
$_SESSION["page"]=$row["replyid"];
mysql_unbuffered_query("update `{$tbreply}` set `Views` = `Views` + 1 where `replyid` = ".$row["replyid"]." LIMIT 1 ");
}
if(!isset($_SESSION["_referal_id_"]))
{
$_SESSION["_referal_id_"]=$row["userid"];
}
$referalid=getreferalid($row["userid"]);//this post referalid
if($adsenserow=getuser_adsenseid($row["userid"]))
{
$uadsense=$adsenserow['adsenseid'];
$uchannelcode=$adsenserow['channelcode'];
}
credit_system($row["userid"],$referalid,$uadsense,$uchannelcode);
$showadsense=1;
}
else
{
errmsg($erm,"JavaScript:history.back(0)");
}
}
else
{
errmsg("no this reply!!","JavaScript:history.back(0)");
}
//$row[message];
if($adsenseid=="")
{
$showadsense=0;
}
?>
-
Attention! Internet Explorer browser and Flash player for videos are retiring soon! Please download & install the new Microsoft Edge browser for HTML5 video supports now.
×