$reply_date = array(); $reply_block = ""; while ($result_replies = @mysql_fetch_array($replies)) { $reply_text = $result_replies['comment_reply']; $reply_text = htmlspecialchars_decode($reply_text); //$reply_text = to_bbc_code($reply_text); $reply_wrap = wordwrap($reply_text, $wrap_limit, " ", true); $by_username = $result_replies['by_username']; $db_date = $result_replies['todays_date']; $reply_date = date($config["date_format"], strtotime($db_date)); $reply_id = $result_replies['indexer']; //______________________________________________________________________________________________ //______PERMISSIONS CHECK COMMENTS______________________________________________________________ $usercheck = new LoadPermissions('', $reply_id, 'videocomments_replys'); $usercheck->CheckPermissions(); $reply_edit_on = $usercheck->ReturnVars('edit_on'); $reply_delete_on = $usercheck->ReturnVars('delete_on'); if ($reply_delete_on == 1) { $delete_reply_on = "<div style=\"margin-right:12px; float:right;\">\r\n\t\t\t <a href=\"edit/delete.php?type=14&id={$reply_id}\" title=\"{$lang_delete_general}\" rel=\"gb_page_center[800, 400]\">\r\n <img src=\"{$base_url}/themes/{$user_theme}/images/icons/delete_small.png\" alt=\"{$lang_delete_general}\" width=\"14\" height=\"14\" border=\"0\" />\r\n\t\t\t {$lang_delete_general}</a>\r\n\t\t\t</div>\n"; } else { $delete_reply_on = "<div style=\"margin-right:12px; float:right;\"> </div>\n"; } if ($reply_edit_on == 1) { $edit_reply_on = "<div style=\"margin-right:12px; float:right;\">\r\n\t\t\t <a href=\"edit/editcomments.php?type=2&id={$reply_id}\" title=\"{$lang_edit}\" rel=\"gb_page_center[800, 400]\">\r\n <img src=\"{$base_url}/themes/{$user_theme}/images/icons/edit_small.png\" alt=\"{$lang_delete_general}\" width=\"14\" height=\"14\" border=\"0\" />\r\n\t\t\t {$lang_edit}</a>\r\n\t\t\t</div>\n"; } else { $edit_reply_on = "<div style=\"margin-right:12px; float:right;\"> </div>\n"; } //_______________________________________________________________________________________________________________ $reply_block .= "<hr>\r\n\t\t<div style=\"width: 100%; background-color: {$small_block_background};\" id=\"reply_block\">\r\n\t\t <div>\r\n\t\t <div style=\"margin-left:12px; float:left;\">{$lang_reply_by}: <b>{$by_username}</b></div>\r\n\t\t <div style=\"margin-left:42px; float:left;\"><b>{$lang_date}: </b>{$reply_date}</div>\n"; $reply_block .= $delete_reply_on . $edit_reply_on; $reply_block .= "</div></div>\n";
} else { $edit_reply_on = "<div style=\"margin-right:12px; float:right;\"> </div>\n"; } //_______________________________________________________________________________________________________________ $reply_block .= "<hr style=\"border-top: 1px dashed #C0C0C0; border-bottom: 0px\" />\n\r\n\t\t\t\t\t<div style=\"width: 100%; background-color: {$small_block_background};\" id=\"reply_block\">\n\r\n\t\t\t\t\t <div>\n\r\n\t\t\t\t\t <div style=\"margin-left:12px; float:left;\">{$lang_reply_by}: <b>{$by_username}</b></div>\n\r\n\t\t\t\t\t <div style=\"margin-right:22px; float:right;\"><b>{$lang_date}: </b>{$reply_date}</div>\n\r\n\t\t\t\t\t </div>\n\r\n\t\t\t\t\t<div>\n"; $reply_block .= $delete_reply_on . $edit_reply_on; $reply_block .= "</div>\n\r\n\t\t\t\t <br />\n\r\n\t\t\t\t <br />\n\r\n\t\t\t\t <div style=\"margin-left:32px; float:left;\">{$reply_wrap}</div>\n\r\n\t\t\t\t <br />\n\r\n\t\t\t\t <br />\n\r\n\t\t\t\t </div>\n"; } $each_comment = array('indexer' => $result['indexer'], 'by_username' => $result['blog_owner'], 'by_id' => $result['user_id'], 'viewtime' => $result['viewtime'], 'title' => $result['title'], 'description' => $result['description'], 'tags' => $result['tags'], 'category' => $result['category'], 'comments' => $wrap, 'todays_date' => $result['date_created'], 'poster_picture' => $poster_picture, 'thumb_new_width' => $new_smallwidth, 'thumb_new_height' => $new_smallheight, 'rating' => $result['updated_rating'], 'drop_block' => $drop_block, 'reply_block' => $reply_block); $result_search3[] = $each_comment; } $page_title = ucfirst($title) . ' Blog'; // START SECURITY BLOCK $usercheck = new LoadPermissions('', $blog_id, 'blogs'); $usercheck->CheckPermissions(); $edit_on = $usercheck->ReturnVars('edit_on'); $delete_on = $usercheck->ReturnVars('delete_on'); // END SECURITY BLOCK //print_r($usercheck); //update counter $views_counter = $number_of_views + 1; $sql = "UPDATE blogs SET number_of_views = {$views_counter} WHERE indexer = {$blog_id}"; $query = @mysql_query($sql); //record view time in views_tracker table @media_views_tracker($blog_id, 'blogs'); // update last read time $sql = "UPDATE blogs SET viewtime = NOW() WHERE indexer = {$blog_id}"; $query = @mysql_query($sql); // ajax pagination reuseable $page = $_GET['page']; $page = mysql_real_escape_string($page);
$image_thumb = $config['site_base_url'] . "/themes/{$user_theme}/images/placeholder.gif"; //url $image_file = $base_path . "/themes/{$user_theme}/images/placeholder.gif"; //full path $result5 = array('friends_picture' => $image_thumb); } //rescale thumbs $page_display_width = $config['members_prof_friends_thumb_width']; $display_thumbs = show_thumb($image_file, $page_display_width); $image_width = $display_thumbs[0]; $image_height = $display_thumbs[1]; $posters_thumb = array('image_width' => $image_width, 'image_height' => $image_width, 'image_thumb' => $image_thumb); // PERMISSIONS CHECK VIDEOS COMMENTS $usercheck = new LoadPermissions('', $indexer_id, 'profile_comments'); $usercheck->CheckPermissions(); $profile_comment_edit_on = $usercheck->ReturnVars('edit_on'); $profile_comment_delete_on = $usercheck->ReturnVars('delete_on'); //Edit link if ($profile_comment_edit_on == 1) { $profile_comment_edit_on = '<a href="edit/editcomments.php?type=8&id=' . $indexer_id . '" title="Edit" rel="gb_page_center[800, 400]"> <img src="' . $base_url . '/themes/' . $user_theme . '/images/icons/edit_small.png" alt="' . $lang_edit . '" width="14" height="14" border="0" />' . $lang_edit . '</a>'; } else { $profile_comment_edit_on = ''; } //Delete link if ($profile_comment_delete_on == 1) { $profile_comment_delete_on = '<a href="edit/delete.php?type=6&id=' . $indexer_id . '" title="Delete" rel="gb_page_center[800, 300]"> <img src="' . $base_url . '/themes/' . $user_theme . '/images/icons/delete_small.png" alt="' . $lang_delete_general . '" width="14" height="14" border="0" />' . $lang_delete_general . '</a>'; } else { $profile_comment_delete_on = ''; }