prepare("SELECT * FROM tblposts WHERE md5(posID) = ? AND comID IN ".$inarray." "); $postfetch->execute(array($dofrey)); if ($posROW = $postfetch->fetch(PDO::FETCH_ASSOC)) { socialmeta($posROW["posID"]); } ?> prepare("SELECT * FROM tblposts INNER JOIN tblmembers ON tblposts.memID = tblmembers.memID INNER JOIN tblcommunities ON tblposts.comID = tblcommunities.comID WHERE md5(posID) = ? AND tblposts.comID IN ".$inarray." "); $postfetch->execute(array($dofrey)); if ($posROW = $postfetch->fetch(PDO::FETCH_ASSOC)) { $filename = '/uploads/'.$posROW["posImage"]; if ((file_exists($_SERVER['DOCUMENT_ROOT'] . $filename)) && (strlen($posROW["posImage"]) > 4)) { $filebg = '/uploads/'.$posROW["posImage"]; } else { $filebg = '/img/banner-reverogt.jpg'; } ?>
prepare("SELECT * FROM tblpostwatch WHERE posID = ? AND memID = ? "); $watchpost->execute(array($posROW["posID"], $_SESSION["karmaid"])); if ($watROW = $watchpost->fetch(PDO::FETCH_ASSOC)) { $deletewatch = $dbh->prepare("DELETE FROM tblpostwatch WHERE memID = ? AND posID = ? LIMIT 1"); $doit = $deletewatch -> execute(array($_SESSION["karmaid"], $posROW["posID"])); } else { $addwatch = $dbh->prepare("INSERT INTO tblpostwatch (posID, memID) VALUES (?,?)"); $addwatch->execute(array($posROW["posID"], $_SESSION["karmaid"])); } header("location:/post/owners-garage/".createUrl($posROW["posTitle"])."/".md5($posROW["posID"]).'/'.$stat); ob_end_flush(); } ?> WOI - '.$reptext.'

'; $status = "OK"; if ($subreply != 1) { $postreply = 0; } if (strlen(strip_tags($reptext)) <2 ) { // checking name $msg .="Your reply must be longer than 2 characters.
"; $status= "NOTOK"; } /* if (strlen($youtubeurl) > 5 ) { // checking name $youtubecode = getYoutube($youtubeurl); if (strlen($youtubecode) != 11) { $msg .="Your youtube url doesn't appear to be valid
"; $status= "NOTOK"; } }*/ $clean = swearWords($reptext); $ban = banWords($clean); if ($ban == 1) { $stat = 2; } else { $stat = 1; // check to see if user is banned if (userban($_SESSION["karmaid"]) == 1) { $stat = 2; } } // TAGGED USERS $tagarray = array(); $dom = new DOMDocument; $dom->loadHTML($clean); $node = $dom->getElementsByTagName('span'); foreach ($node as $node) { if (strlen($node->getAttribute( 'data-id' )) > 0) { array_push($tagarray, $node->getAttribute( 'data-id' )); } } if (count($tagarray) > 2 ) { // checking name $msg .="You can only tag a maximum of 2 users in each post.
"; $status= "NOTOK"; } $clean = str_replace('data-value="<', 'data-value="<', $clean); $clean = str_replace('_blank>', '_blank>', $clean); $dbreptext = strip_tags($clean, '