//include('connstring.php');
include('pg_utf_connect.php');
include "incgetstrelements.php";
$rdate='';
$D='';
$ID='';
$PG='';
$HC='';
$cutoff=5; //Number times new commenters will see the captcha routine
$dtg= date("Y-m-d H:i");
$ip = getenv('REMOTE_ADDR');
$todays_rdate=date("m/d/Y");
$todays_rdate .= " 23:59";
$postingokay=false;
$rbname='';
$s=date("m/d/Y H:i:s");
$cl=0;
$arrCraplist[$cl++]='JUSTICE';
$poster='';
$rText='';
$vcomments='';
$ADD='';
$sName='';
foreach ($_REQUEST as $key => $value){
$$key = $value;
// print "$key $value ";
}
$REDIRTO="poparticle.php?D=$D&ID=$ID&HC=$HC";
// echo $REDIRTO;
//if($ip=="103.244.3.61"||$ip="211.22.123.1")
// $poster="Herb McCoy";
if(strtotime($dtg) > strtotime($todays_rdate)){
Header("Location:$REDIRTO");
}
for($i=0;$i < count($arrCraplist);$i++){
if($poster==$arrCraplist[$i]){
Header("Location:$REDIRTO");
}
}
$referer_filter='';
if(isset($_SERVER['HTTP_REFERER'])){
$referer_filter=$_SERVER['HTTP_REFERER'];
//echo $referer;
}
include "incspamScum.php";
if(substr_count($rText,"http://") < 3){
$postingokay=true;
}
if (isset($_COOKIE["rbname"])){
$rbname=$_COOKIE["rbname"];
}
include('iseditor.php');
$ed=CheckEditor($rbname);
if($ed != ''){
$postingokay=true;
}
$ssql="select cnt from vue_comments_count where poster='" . $rbname . "'";
//echo $ssql;
$vresult = pg_query($ssql) or die ("Error in query: $ssql. " . pg_last_error());
$vrow = pg_fetch_object($vresult);
if($vrow){
$cmts=$vrow->cnt;
$postingokay=true;
}else{
$cmts=0;
}
if($ADD != ''){
$value = $sName;
// if($ip=="103.244.3.61")
// $sName="Herb McCoy";
setcookie("rbname", $value, time()+((3600*24)*365)); /* expire in 1 year */
if($postingokay && $rText != ''){
if(!spamScum($rText)){
$rText=str_replace("'","''",$rText);
$ssql="insert into tblcomments (id,rdate,poster,comments,email,webpage,dtg,psource)
values ($ID,'$D','$sName','$rText','$sMail','$sWeb','$dtg','$ip')";
$sresult = pg_query($ssql) or die (pg_last_error());
}
}
//pg_close($pg_connection);
Header("Location:$REDIRTO");
}
//echo $REDIRTO;
// echo date("m/d/Y H:i:s") . " ";
$cposter=getstrelements() . rn();
$cmail="";
$cwebsite="";
$NAKED=false;
if($rText==''){
//--------Get any cookies. Look at the RANTBURG cookie for backward compatibility----------------
//if(!isset($sName)){
if (isset($_COOKIE["rbname"])){
$cposter=$_COOKIE["rbname"];
//echo $cposter;
if (isset($_COOKIE["rbmail"]))
$cmail=$_COOKIE["rbmail"];
if (isset($_COOKIE["rbweb"]))
$cwebsite=$_COOKIE["rbweb"];
}
else if (isset($_COOKIE["RANTBURG"])){
$B=$HTTP_COOKIE_VARS["RANTBURG"];
//echo $B;
$C=explode("&",$B);
$B=explode("=",$C[1]);
$cposter=$B[1];
}
$sName=$cposter;
$sMail=$cmail;
$sWeb=$cwebsite;
}
//echo date("m/d/Y H:i:s") . " ";
if ($D==''){
$D=date("Y-m-d");
} else {
$D=date("Y-m-d",strtotime($D));
}
?>
Comments
include('incubbc.txt');
?>
//echo date("m/d/Y H:i:s") . " "; ?>
//----------------------------Pull the article----------------------------------------------------
$ssql="select * from tbltwar where id='$ID'";
$result = pg_query($ssql) or die ("Error in query: $ssql. " . pg_last_error());
$rs = pg_fetch_object($result);
if ($rs){
?>
Submit your comments on this article
echo $rs->rheadline ?>
echo $rs->rbanner ?>
echo $rs->rdate ?>
echo nl2br($rs->rquote) ?>
Posted by: echo $rs->poster ?>
//echo date("m/d/Y H:i:s") . " "; ?>
$ssql="select * from tblcomments where id='$ID' order by cid desc";
$result = pg_query($ssql) or die ("Error in query: $ssql. " . pg_last_error());
$ctr=pg_num_rows($result);
while($crow = pg_fetch_object($result))
{
?>