window.location='login.php?redirect=blogsadd';"; exit(); } if ($setts['enable_c360_tabs']==1) include_once("c360tabs.php");?>
0) { $color_frame = $_POST['color_frame']; $frame_thickness = (int)$_POST['frame_thickness']; $color_bgnd = $_POST['color_bgnd']; $color_text = $_POST['color_text']; $picture_background = $_POST['picture_background']; $getWordFilter = getSqlResults("user","SELECT * FROM nash_wordfilter"); foreach($getWordFilter as $wordFilter) { if ($_POST['name']!="") $_POST['name'] = str_replace(addSpecialChars($wordFilter['word']),"~",$_POST['name']); if ($_POST['post_body']!="") $_POST['post_body'] = str_replace(addSpecialChars($wordFilter['word']),"~",$_POST['post_body']); } $name = remSpecialChars($_POST['name']); $post_body = remSpecialChars($_POST['post_body']); $new_file = $_FILES['attachFile1']; $file_tmp = $new_file['tmp_name']; $query = getSqlResults("user","SELECT * FROM nash_feedbacks WHERE userid='".$s_memberid."' AND submitted='1'"); $rating = 0; foreach($query as $row) { if ($row['rate']>=4) $rating++; else if ($row['rate']<=2) $rating--; } $timestamp_regDate = $user['regdate']; $timestamp_todayDate = $currentTimeOffset; $resultDifference = $timestamp_todayDate-$timestamp_regDate; $timestamp_minDays = (60*60*24*$setts['g_minregdays']); if ($resultDifference>$timestamp_minDays && $setts['g_minfeedback']<=$rating) { if ($name!=""&&$post_body!=""&&is_uploaded_file($file_tmp)) { $final_filename = "c360_".$s_memberid."_".md5(uniqid(rand(2,999999)))."_blogs.jpg"; $isUpload = uploadFile($_FILES['attachFile1']['tmp_name'],$final_filename,"uplimg/",TRUE); if ($isUpload==TRUE) { $pic_size = filesize("uplimg/".$final_filename.""); $insertBlog = addSqlRow("user","INSERT INTO nash_blogs (poster_id, poster_username, title, description, headshot, date_created, ip, paused, articles_quantity, color_frame, frame_thickness, color_bgnd, color_text, picture_background) VALUES ('".$s_memberid."','".$s_memberusern."','".$name."','".$post_body."','uplimg/".$final_filename."','".$timeNowOffset."','".getenv("REMOTE_ADDR")."',0,0,'".$color_frame."','".$frame_thickness."','".$color_bgnd."','".$color_text."','".$picture_background."')"); $blogid = $insertBlog; if ($setts['is_tinyurls']==1) tinyurl_builder("b",$blogid,trim($name)); include_once("mails/notify_admin_new_blog_posted.php"); } echo "

".$lang['nash670']."
".$lang['nash424']."

"; $link = processLink('blogslist'); echo ""; } else { echo "

".$lang['nash671'].":


".$lang['nash424'].""; $link = "blogsadd.php"; echo ""; }} else { echo "

".$lang['nash675']." ".$setts['g_minfeedback']." ".$lang['nash676']." ".$setts['g_minregdays']." ".$lang['nash33'].".
".$lang['nash424']."

"; $link = processLink('community'); echo ""; } } else { ?>
.
.
:
:
:
:
: