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=strip_tags($thepost,","); $thepost=filter_words($thepost); $displayname=$_POST["displayname"]; date_default_timezone_set('America/Phoenix'); $thedate=time(); $thedate = date('YmdHis',$thedate); $number = (((int)($uid/1000))*1000)+1000; $ifp=$_SERVER["DOCUMENT_ROOT"]."/uploads_user/".$number."/".$uid."/"; if (!file_exists($ifp)) { $thephoto=""; } $actions->actions_add($user, "commwallcomment", Array($user->user_info['user_username'], $user->user_displayname, $thepost), Array(), 0, FALSE, "user", $user->user_info['user_id'], 0); $sql=sprintf("INSERT INTO `community_wall` (`community_wall`.`msg`,`community_wall`.`userid`,`community_wall`.`datecreated`,`community_wall`.`displayname`,`community_wall`.`photo`) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($thepost, "text"), GetSQLValueString($uid, "int"), GetSQLValueString($thedate, "date"), 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; //$uimage="/uploads_user/".$number."/".$row['userid']."/".$row['user_photo']; if($thephoto=="") { $uimage="/images/nophoto.png"; } else { $uimage="/uploads_user/".$number."/".$uid."/".$thephoto; } $thephoto=$uimage; $firstrow='
Posted by '.stripslashes($displayname).' Most Recent Post < 1H
 
'.stripslashes($thepost).'
 
'; if(isset($_SESSION["cp_userid"])){ if($_SESSION["cp_userid"]==21092 || $_SESSION["cp_userid"]==7653 || $_SESSION["cp_userid"]==6286 || $_SESSION["cp_userid"]==8){ $firstrow=$firstrow."
"; $firstrow=$firstrow.""; $firstrow=$firstrow.""; $firstrow=$firstrow.""; $firstrow=$firstrow."
"; }} $firstrow=$firstrow."
"; $arr = array ('error' => $em, 'firstrow' => $firstrow, 'wid' => $wid); echo json_encode($arr); ?>