FILTER_VALIDATE_INT, 'thepost' => FILTER_SANITIZE_STRING, 'displayname' => FILTER_SANITIZE_STRING, 'userphoto' => FILTER_SANITIZE_STRING ); $sanitizeinputs = filter_input_array(INPUT_POST, $args); $em=""; $uid=$_POST["uid"]; $thepost=$_POST["thepost"]; $thephoto=$_POST["userphoto"]; $thepost=filter_words($thepost); $displayname=$_POST["displayname"]; date_default_timezone_set('UTC'); $number = (((int)($uid/1000))*1000)+1000; $ifp=$_SERVER["DOCUMENT_ROOT"]."/uploads_user/".$number."/".$uid."/"; if (!file_exists($ifp)) { $thephoto="";} //$pathtopurifier=$_SERVER["DOCUMENT_ROOT"].'/include/analytics/purifier/library/'; $pathtopurifier=$_SERVER["DOCUMENT_ROOT"].'/include/htmlpurifier/library/'; require_once $pathtopurifier.'HTMLPurifier.includes.php'; $config = HTMLPurifier_Config::createDefault(); $config->set('HTML.Allowed', 'b,i,br,img'); $config->set('HTML.AllowedAttributes', 'src,alt'); $purifier = new HTMLPurifier($config); $thepost = $purifier->purify($thepost); $sql=sprintf("INSERT INTO `community_wall` (`community_wall`.`msg`,`community_wall`.`userid`,`community_wall`.`datecreated`,`community_wall`.`displayname`,`community_wall`.`photo`) VALUES (%s, %s,UTC_TIMESTAMP(), %s, %s)", GetSQLValueString($thepost, "text"), GetSQLValueString($uid, "int"), GetSQLValueString($displayname, "text"), GetSQLValueString($thephoto, "text")); $query=$database->database_query($sql) or $em=$em.$database->database_error(); $wid=$database->database_insert_id(); $number = (((int)($uid/1000))*1000)+1000; if($thephoto=="") { $uimage="/images/nophoto.png"; } else { $uimage="/uploads_user/".$number."/".$uid."/".$thephoto; } $ug="< 1HR"; $thephoto=$uimage; $userpost=""; $userpost=$userpost."