本文整理汇总了PHP中misc::next_prev方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::next_prev方法的具体用法?PHP misc::next_prev怎么用?PHP misc::next_prev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc
的用法示例。
在下文中一共展示了misc::next_prev方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
function view()
{
global $conn, $config, $lang;
require_once $config['basepath'] . '/include/misc.inc.php';
$misc = new misc();
$display = '';
// find the number of log items
$sql = "SELECT * FROM " . $config['table_prefix'] . "activitylog ORDER BY activitylog_id DESC";
$recordSet = $conn->Execute($sql);
if ($recordSet === false) {
$misc->log_error($sql);
}
$num_rows = $recordSet->RecordCount();
if (!isset($_GET['cur_page'])) {
$_GET['cur_page'] = 0;
}
$display .= $misc->next_prev($num_rows, intval($_GET['cur_page']), "", '', TRUE);
// put in the next/previous stuff
// build the string to select a certain number of users per page
$limit_str = intval($_GET['cur_page']) * 25;
$recordSet = $conn->SelectLimit($sql, 25, $limit_str);
if ($recordSet === false) {
$misc->log_error($sql);
}
$display .= '<table class="log_viewer" cellpadding="0" cellspacing="0" summary="' . $lang['log_viewer'] . '">';
$display .= '<caption>' . $lang['log_viewer'] . '</caption>';
$display .= '<tr>';
$display .= '<th>' . $lang['id'] . '</th>';
$display .= '<th>' . $lang['date'] . '</th>';
$display .= '<th>' . $lang['user_ip'] . '</th>';
$display .= '<th>' . $lang['user_manager_user_name'] . '</th>';
$display .= '<th>' . $lang['action'] . '</th>';
$display .= '</tr>';
$count = 0;
while (!$recordSet->EOF) {
// alternate the colors
if ($count == 0) {
$count = 1;
} else {
$count = 0;
}
$log_id = $misc->make_db_unsafe($recordSet->fields['activitylog_id']);
$log_date = $recordSet->UserTimeStamp($recordSet->fields['activitylog_log_date'], 'D M j G:i:s T Y');
$log_action = $misc->make_db_unsafe($recordSet->fields['activitylog_action']);
$log_ip = $misc->make_db_unsafe($recordSet->fields['activitylog_ip_address']);
$sqlUser = 'SELECT userdb_user_first_name, userdb_user_last_name FROM ' . $config['table_prefix'] . 'userdb WHERE userdb_id =' . $recordSet->fields['userdb_id'];
$recordSet2 = $conn->execute($sqlUser);
if ($recordSet2 === false) {
$misc->log_error($sqlUser);
}
$first_name = $misc->make_db_unsafe($recordSet2->fields['userdb_user_first_name']);
$last_name = $misc->make_db_unsafe($recordSet2->fields['userdb_user_last_name']);
$display .= '<tr>';
$display .= '<td class="shade_' . $count . '">' . $log_id . '</td>';
$display .= '<td class="shade_' . $count . '">' . $log_date . '</td>';
$display .= '<td class="shade_' . $count . '">' . $log_ip . '</td>';
$display .= '<td class="shade_' . $count . '">' . $last_name . ', ' . $first_name . '</td>';
$display .= '<td class="shade_' . $count . '">' . $log_action . '</td>';
$display .= '</tr>';
$recordSet->MoveNext();
}
// end while
$display .= '</table>';
return $display;
}
示例2: misc
function show_users($filter = '', $lookup_field = '', $lookup_value = '')
{
global $conn, $config, $lang;
require_once $config['basepath'] . '/include/misc.inc.php';
$misc = new misc();
// Verify User is an Admin
$security = login::loginCheck('edit_all_users', true);
$display = '';
$filter_sql = '';
if ($filter == 'agents') {
$filter_sql = " WHERE userdb_is_agent = 'yes'";
} elseif ($filter == 'members') {
$filter_sql = " WHERE userdb_is_agent = 'no' AND userdb_is_admin = 'no'";
} elseif ($filter == 'admins') {
$filter_sql = " WHERE userdb_is_admin = 'yes'";
}
if ($security === true) {
$security2 = login::loginCheck('Admin', true);
if ($security2 === true) {
} else {
if ($filter === 'Show All' || $filter === '') {
$filter_sql = " WHERE userdb_is_admin = 'no'";
}
}
$sql = "SELECT * FROM " . $config['table_prefix'] . "userdb {$filter_sql} ORDER BY userdb_id ";
$recordSet = $conn->Execute($sql);
if ($recordSet === false) {
$misc->log_error($sql);
}
$num_rows = $recordSet->RecordCount();
if (!isset($_GET['cur_page'])) {
$_GET['cur_page'] = 0;
}
$display .= '<center>' . $misc->next_prev($num_rows, intval($_GET['cur_page']), '', '', TRUE) . '</center>';
// put in the next/previous stuff
// build the string to select a certain number of users per page
$limit_str = intval($_GET['cur_page']) * $config['listings_per_page'];
$recordSet = $conn->SelectLimit($sql, $config['listings_per_page'], $limit_str);
if ($recordSet === false) {
$misc->log_error($sql);
}
$count = 0;
// $display .= "<br /><br />";
while (!$recordSet->EOF) {
// alternate the colors
if ($count == 0) {
$count = $count + 1;
} else {
$count = 0;
}
// strip slashes so input appears correctly
$edit_ID = $recordSet->fields['userdb_id'];
$edit_user_name = $misc->make_db_unsafe($recordSet->fields['userdb_user_name']);
$edit_user_first_name = $misc->make_db_unsafe($recordSet->fields['userdb_user_first_name']);
$edit_user_last_name = $misc->make_db_unsafe($recordSet->fields['userdb_user_last_name']);
$edit_emailAddress = $misc->make_db_unsafe($recordSet->fields['userdb_emailaddress']);
$edit_active = $recordSet->fields['userdb_active'];
$edit_isAgent = $recordSet->fields['userdb_is_agent'];
$edit_isAdmin = $recordSet->fields['userdb_is_admin'];
$edit_canEditSiteConfig = $recordSet->fields['userdb_can_edit_site_config'];
$edit_canEditMemberTemplate = $recordSet->fields['userdb_can_edit_member_template'];
$edit_canEditAgentTemplate = $recordSet->fields['userdb_can_edit_agent_template'];
$edit_canEditListingTemplate = $recordSet->fields['userdb_can_edit_listing_template'];
$edit_canFeatureListings = $recordSet->fields['userdb_can_feature_listings'];
$edit_canViewLogs = $recordSet->fields['userdb_can_view_logs'];
$edit_canModerate = $recordSet->fields['userdb_can_moderate'];
$edit_can_have_vtours = $recordSet->fields['userdb_can_have_vtours'];
$edit_can_edit_expiration = $recordSet->fields['userdb_can_edit_expiration'];
$edit_can_export_listings = $recordSet->fields['userdb_can_export_listings'];
$edit_canEditAllListings = $recordSet->fields['userdb_can_edit_all_listings'];
$edit_canEditAllUsers = $recordSet->fields['userdb_can_edit_all_users'];
$edit_canEditPropertyClasses = $recordSet->fields['userdb_can_edit_property_classes'];
// Determine user type
if ($edit_isAgent == 'yes') {
$user_type = $lang['user_manager_agent'];
} elseif ($edit_isAdmin == 'yes') {
$user_type = $lang['user_manager_admin'];
} else {
$user_type = $lang['user_manager_member'];
}
// Layout Start
$display .= '<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">';
// $display .= '<tbody style="border-width:thin;border-style:solid;border-color:#FFFFFF;">';
$display .= '<tr bgcolor="#330099">';
$display .= '<td width="510" colspan="2" style="padding-left:2px">';
$display .= '<span style="color:#FFFFFF;font-weight:bold;">' . $edit_user_first_name . ' ' . $edit_user_last_name . ' (' . $edit_ID . '): ' . $edit_emailAddress . '</span>';
$display .= '</td>';
$display .= '<td width="90" align="right">';
$display .= '<a href="index.php?action=user_manager&edit=' . $edit_ID . '"><img src="images/' . $config['lang'] . '/user_manager_edit.jpg" alt="' . $lang['user_manager_edit_user'] . '" width="16" height="16"></a>';
$display .= '<img src="images/blank.gif" alt=" " width="16" height="16">';
$display .= '<a href="index.php?action=user_manager&delete=' . $edit_ID . '" onclick="return confirmDelete(\'' . $lang['delete_user'] . '\')"><img src="images/' . $config['lang'] . '/user_manager_delete.jpg" alt="' . $lang['user_manager_delete_user'] . '" width="16" height="16"></a>';
$display .= '</td>';
$display .= '</tr>';
$display .= '<tr>';
$display .= '<td colspan="2"><strong>' . $lang['user_manager_user_name'] . ': ' . $edit_user_name . '</strong></td>';
$display .= '<td></td>';
$display .= '</tr>';
$display .= '<tr>';
$display .= '<td colspan="2"><strong>' . $lang['user_manager_account_type'] . ': ' . $user_type . '</strong></td>';
$display .= '<td></td>';
//.........这里部分代码省略.........
示例3: misc
//.........这里部分代码省略.........
$feature_insert_length = strlen($field_value);
$feature_insert_length = $feature_insert_length - 2;
$field_value = substr($field_value, 2, $feature_insert_length);
} else {
$field_value = $misc->make_db_unsafe($recordSet->fields['listingsdbelements_field_value']);
}
} else {
$field_value = $misc->make_db_unsafe($recordSet->fields['listingsdbelements_field_value']);
}
$field_type = $misc->make_db_unsafe($recordSet->fields['listingsformelements_field_type']);
$field_caption = $misc->make_db_unsafe($recordSet->fields['listingsformelements_field_caption']);
$default_text = $misc->make_db_unsafe($recordSet->fields['listingsformelements_default_text']);
$field_elements = $misc->make_db_unsafe($recordSet->fields['listingsformelements_field_elements']);
$required = $misc->make_db_unsafe($recordSet->fields['listingsformelements_required']);
$field_length = $misc->make_db_unsafe($recordSet->fields['listingsformelements_field_length']);
$tool_tip = $misc->make_db_unsafe($recordSet->fields['listingsformelements_tool_tip']);
// pass the data to the function
$display .= $forms->renderExistingFormElement($field_type, $field_name, $field_value, $field_caption, $default_text, $required, $field_elements, $field_length, $tool_tip);
$recordSet->MoveNext();
}
//$editid = substr($edit, 1, -1) * 1;
if ($only_my_listings == true) {
$edit_link = $config['baseurl'] . '/admin/index.php?action=edit_my_listings&edit=' . $edit;
$delete_link = $config['baseurl'] . '/admin/index.php?action=edit_my_listings&delete=' . $edit;
} else {
$edit_link = $config['baseurl'] . '/admin/index.php?action=edit_listings&edit=' . $edit;
$delete_link = $config['baseurl'] . '/admin/index.php?action=edit_listings&delete=' . $edit;
}
$display .= '<tr><td colspan="2" align="center">' . $lang[required_form_text] . '</td></tr>';
$display .= '<tr><td colspan="2" align="center"><input type="submit" value="' . $lang[update_button] . '"> <a href="' . $delete_link . '" onclick="return confirmDelete()">' . $lang[admin_listings_editor_delete_listing] . '</a></td></tr></table></form>';
$display .= '</td></tr></table>';
} else {
$display .= '<center><span class="redtext">' . $lang['admin_listings_editor_invalid_listing'] . '</span></center>';
$next_prev = '<center>' . $misc->next_prev($num_rows, $_GET['cur_page'], "", '', TRUE) . '</center>';
// put in the next/previous stuff
$display .= listing_editor::show_quick_edit_bar($next_prev, $only_my_listings);
}
} else {
// show all the listings
$sql_filter = '';
if (isset($_POST['filter'])) {
if ($_POST['filter'] == 'active') {
$sql_filter = " AND listingsdb_active = 'yes' ";
}
if ($_POST['filter'] == 'inactive') {
$sql_filter = " AND listingsdb_active = 'no' ";
}
if ($_POST['filter'] == 'expired') {
$sql_filter = " AND listingsdb_expiration < " . $conn->DBDate(time());
}
if ($_POST['filter'] == 'featured') {
$sql_filter = " AND listingsdb_featured = 'yes' ";
}
if ($_POST['filter'] == 'created_1week') {
$sql_filter = " AND listingsdb_creation_date >= " . $conn->DBDate(date('Y-m-d', strtotime('-1 week')));
}
if ($_POST['filter'] == 'created_1month') {
$sql_filter = " AND listingsdb_creation_date >= " . $conn->DBDate(date('Y-m-d', strtotime('-1 month')));
}
if ($_POST['filter'] == 'created_3month') {
$sql_filter = " AND listingsdb_creation_date >= " . $conn->DBDate(date('Y-m-d', strtotime('-3 month')));
}
}
$lookup_sql = '';
if (isset($_POST['lookup_field']) && isset($_POST['lookup_value']) && $_POST['lookup_field'] != 'listingsdb_id' && $_POST['lookup_field'] != 'listingsdb_title' && $_POST['lookup_value'] != '') {
$lookup_field = $misc->make_db_safe($_POST['lookup_field']);
示例4: misc
/**
* user::view_user()
*
* @param $type
* @return
*/
function view_users()
{
global $conn, $config, $lang, $agent_id;
require_once $config['basepath'] . '/include/misc.inc.php';
require_once $config['basepath'] . '/include/images.inc.php';
require_once $config['basepath'] . '/include/class/template/core.inc.php';
$misc = new misc();
$display = '';
$user_section = '';
$page = new page_user();
$page->load_page($config['template_path'] . '/view_users_default.html');
//Get User Count
$sql = "SELECT count(userdb_id) as user_count FROM " . $config['table_prefix'] . "userdb where userdb_is_agent = 'yes' and userdb_active = 'yes' order by userdb_rank,userdb_user_name";
$recordSet = $conn->Execute($sql);
if ($recordSet === false) {
$misc->log_error($sql);
}
$num_rows = $recordSet->fields['user_count'];
if ($config["show_admin_on_agent_list"] == 0) {
$options = "userdb_is_agent = 'yes'";
} else {
$options = "(userdb_is_agent = 'yes' or userdb_is_admin = 'yes')";
}
$sql = "SELECT userdb_user_name, userdb_user_first_name, userdb_user_last_name, userdb_id FROM " . $config['table_prefix'] . "userdb where " . $options . " and userdb_active = 'yes' order by userdb_rank,userdb_user_name";
//Handle Pagnation
if (!isset($_GET['cur_page'])) {
$_GET['cur_page'] = 0;
}
$limit_str = intval($_GET['cur_page']) * $config['users_per_page'];
$some_num = intval($_GET['cur_page']) + 1;
$next_prev = $misc->next_prev($num_rows, intval($_GET['cur_page']), $guidestring);
// put in the next/previous stuff
$recordSet = $conn->SelectLimit($sql, $config['users_per_page'], $limit_str);
//$recordSet = $conn->Execute($sql);
if ($recordSet === false) {
$misc->log_error($sql);
}
while (!$recordSet->EOF) {
$first_name = $misc->make_db_unsafe($recordSet->fields['userdb_user_first_name']);
$last_name = $misc->make_db_unsafe($recordSet->fields['userdb_user_last_name']);
$agent_id = $misc->make_db_unsafe($recordSet->fields['userdb_id']);
$agent_link = user::get_agent_link($recordSet->fields['userdb_id']);
$agent_contact_link = user::contact_agent_link($agent_id);
$agent_fields = user::renderUserInfo($agent_id);
$user_section .= $page->get_template_section('user_block');
$user_section = $page->parse_template_section($user_section, 'agent_first_name', $first_name);
$user_section = $page->parse_template_section($user_section, 'agent_last_name', $last_name);
$user_section = $page->parse_template_section($user_section, 'agent_id', $agent_id);
$user_section = $page->parse_template_section($user_section, 'agent_contact_link', $agent_contact_link);
$user_section = $page->parse_template_section($user_section, 'agent_fields', $agent_fields);
$user_section = $page->parse_template_section($user_section, 'agent_link', $agent_link);
// Insert Agent Image
$sql2 = "SELECT userimages_thumb_file_name FROM " . $config['table_prefix'] . "userimages WHERE userdb_id = {$agent_id} ORDER BY userimages_rank";
$recordSet2 = $conn->Execute($sql2);
if ($recordSet2 === false) {
$misc->log_error($sql2);
}
$num_images = $recordSet2->RecordCount();
if ($num_images == 0) {
if ($config['show_no_photo'] == 1) {
$agent_image = '<img src="images/nophoto.gif" alt="' . $lang['no_photo'] . '" />';
$raw_agent_image = 'images/nophoto.gif';
$user_section = $page->cleanup_template_block('agent_image_thumb_1', $user_section);
} else {
$agent_image = '';
$raw_agent_image = '';
}
$user_section = $page->parse_template_section($user_section, 'agent_image_thumb_1', $agent_image);
$user_section = $page->parse_template_section($user_section, 'raw_agent_image_thumb_1', $raw_agent_image);
$user_section = $page->remove_template_block('agent_image_thumb_[1-9]', $user_section);
}
$x = 1;
while (!$recordSet2->EOF) {
$thumb_file_name = $misc->make_db_unsafe($recordSet2->fields['userimages_thumb_file_name']);
if ($thumb_file_name != "") {
// gotta grab the image size
$imagedata = GetImageSize("{$config['user_upload_path']}/{$thumb_file_name}");
$imagewidth = $imagedata[0];
$imageheight = $imagedata[1];
$shrinkage = $config['thumbnail_width'] / $imagewidth;
$displaywidth = $imagewidth * $shrinkage;
$displayheight = $imageheight * $shrinkage;
$agent_image = '<img src="' . $config['user_view_images_path'] . '/' . $thumb_file_name . '" height="' . $displayheight . '" width="' . $displaywidth . '" alt="' . $thumb_file_name . '" />';
$raw_agent_image = $config['user_view_images_path'] . '/' . $thumb_file_name;
}
// end if ($thumb_file_name != "")
// We have the image so insert it into the section.
$user_section = $page->parse_template_section($user_section, 'agent_image_thumb_' . $x, $agent_image);
$user_section = $page->parse_template_section($user_section, 'raw_agent_image_thumb_' . $x, $raw_agent_image);
$user_section = $page->cleanup_template_block('agent_image_thumb_' . $x, $user_section);
$x++;
$recordSet2->MoveNext();
}
// end while
//.........这里部分代码省略.........
示例5: misc
//.........这里部分代码省略.........
echo '<strong>Search SQL:</strong> ' . $sql . '<br />';
}
while (!$resultRecordSet->EOF) {
$id[] = $resultRecordSet->fields['listingsdb_id'];
$resultRecordSet->MoveNext();
}
// while
return $id;
} else {
if ($num_rows > 0) {
if (!isset($_GET['cur_page'])) {
$_GET['cur_page'] = 0;
}
// build the string to select a certain number of listings per page
$limit_str = intval($_GET['cur_page']) * $config['listings_per_page'];
$num_records = $config['listings_per_page'];
$some_num = intval($_GET['cur_page']) + 1;
$this_page_max = $some_num * $config['listings_per_page'];
// Check if we're setting a maximum number of search results
if ($config["max_search_results"] > 0) {
// Check if we've reached the max number of listings setting.
if ($this_page_max > $config["max_search_results"]) {
$num_records = $this_page_max - $config["max_search_results"];
}
// Failsafe check in case the max search results was set lower than the listings per page setting.
if ($config["max_search_results"] < $config['listings_per_page']) {
$num_records = $config["max_search_results"];
}
// Adjust the $num_rows for the next_prev function to show at the max the max results setting
if ($num_rows > $config["max_search_results"]) {
$num_rows = $config["max_search_results"];
}
}
if ($config['show_next_prev_listing_page'] == 1) {
// ************added for next prev navigation***********
$newurl = '';
foreach ($_GET as $k => $v) {
if ($v && $k != 'cur_page' && $k != 'PHPSESSID' && $k != 'action') {
if (is_array($v)) {
foreach ($v as $vitem) {
$newurl .= '&' . urlencode("{$k}") . '[]=' . urlencode("{$vitem}");
}
} else {
$newurl .= '&' . urlencode("{$k}") . '=' . urlencode("{$v}");
}
}
}
$rtest = $conn->Execute($sql);
if (!$rtest) {
$misc->log_error($sql);
}
$_SESSION['results'] = array();
$_SESSION['titles'] = array();
while (!$rtest->EOF) {
$ID = $rtest->fields['listingsdb_id'];
$url_title = $rtest->fields['listingsdb_title'];
$url_title = str_replace("/", "", $url_title);
$url_title = strtolower(str_replace(" ", $config['seo_url_seperator'], $url_title));
$url_title = str_replace(" ", "+", $url_title);
$_SESSION['results'][] = $ID;
$_SESSION['titles'][] = $url_title;
$rtest->MoveNext();
}
$_SESSION['cur_page'] = intval($_GET['cur_page']);
$_SESSION['searchstring'] = $newurl;
$_SESSION['count'] = $num_rows;
示例6: intval
//.........这里部分代码省略.........
$recordSet = $conn->Execute($sql);
if (!$recordSet) {
$misc->log_error($sql);
}
}
}
if (isset($_GET['caction']) && $_GET['caction'] == 'approve') {
if (isset($_GET['cid'])) {
$cid = intval($_GET['cid']);
//Do permission checks.
if ($blog_user_type < 4) {
//Throw Error
$display .= '<div class="error_message">' . $lang['blog_permission_denied'] . '</div><br />';
unset($_GET['caction']);
$display .= $this->edit_post_comments();
return $display;
}
//Delete
$sql = 'UPDATE ' . $config['table_prefix'] . 'blogcomments SET blogcomments_moderated = 1 WHERE blogcomments_id = ' . $cid . ' AND blogmain_id = ' . $post_id;
//Load Record Set
$recordSet = $conn->Execute($sql);
if (!$recordSet) {
$misc->log_error($sql);
}
}
}
//Ok Load the comments.
$sql = 'SELECT * FROM ' . $config['table_prefix'] . 'blogcomments WHERE blogmain_id = ' . $post_id . ' ORDER BY blogcomments_timestamp ASC';
//Load Record Set
$recordSet = $conn->Execute($sql);
if (!$recordSet) {
$misc->log_error($sql);
}
//Handle Next prev
$num_rows = $recordSet->RecordCount();
if (!isset($_GET['cur_page'])) {
$_GET['cur_page'] = 0;
}
$limit_str = $_GET['cur_page'] * $config['listings_per_page'];
$recordSet = $conn->SelectLimit($sql, $config['listings_per_page'], $limit_str);
if ($recordSet === false) {
$misc->log_error($sql);
}
$blog_comment_template = '';
while (!$recordSet->EOF) {
//Load DB Values
$comment_author_id = $misc->make_db_unsafe($recordSet->fields['userdb_id']);
$blogcomments_id = $misc->make_db_unsafe($recordSet->fields['blogcomments_id']);
$blogcomments_moderated = $misc->make_db_unsafe($recordSet->fields['blogcomments_moderated']);
$blogcomments_timestamp = $misc->make_db_unsafe($recordSet->fields['blogcomments_timestamp']);
$blogcomments_text = html_entity_decode($misc->make_db_unsafe($recordSet->fields['blogcomments_text']), ENT_NOQUOTES, $config['charset']);
//Load Template Block
$blog_comment_template .= $page->get_template_section('blog_article_comment_item_block');
//Lookup Blog Author..
$author_type = $userclass->get_user_type($comment_author_id);
if ($author_type == 'member') {
$author_display = $userclass->get_user_name($comment_author_id);
} else {
$author_display = $userclass->get_user_last_name($comment_author_id) . ', ' . $userclass->get_user_first_name($comment_author_id);
}
$blog_comment_template = $page->parse_template_section($blog_comment_template, 'blog_comment_author', $author_display);
if ($config['date_format'] == 1) {
$format = "m/d/Y";
} elseif ($config['date_format'] == 2) {
$format = "Y/d/m";
} elseif ($config['date_format'] == 3) {
$format = "d/m/Y";
}
$blog_comment_date_posted = date($format, "{$blogcomments_timestamp}");
$blog_comment_template = $page->parse_template_section($blog_comment_template, 'blog_comment_date_posted', $blog_comment_date_posted);
$blog_comment_template = $page->parse_template_section($blog_comment_template, 'blog_comment_text', $blogcomments_text);
//Add Delete COmment Link
//{blog_comment_delete_url}
$blog_comment_delete_url = 'index.php?action=edit_blog_post_comments&id=' . $post_id . '&caction=delete&cid=' . $blogcomments_id;
$blog_comment_template = $page->parse_template_section($blog_comment_template, 'blog_comment_delete_url', $blog_comment_delete_url);
$blog_comment_approve_url = 'index.php?action=edit_blog_post_comments&id=' . $post_id . '&caction=approve&cid=' . $blogcomments_id;
$blog_comment_template = $page->parse_template_section($blog_comment_template, 'blog_comment_approve_url', $blog_comment_approve_url);
//Do Security Checks
if ($blog_user_type < 4) {
$blog_comment_template = $page->remove_template_block('blog_article_comment_approve', $blog_comment_template);
$blog_comment_template = $page->remove_template_block('blog_article_comment_delete', $blog_comment_template);
}
//Handle Moderation
if ($blogcomments_moderated == 1) {
$blog_comment_template = $page->remove_template_block('blog_article_comment_approve', $blog_comment_template);
} else {
$blog_comment_template = $page->cleanup_template_block('blog_article_comment_approve', $blog_comment_template);
}
$recordSet->MoveNext();
}
$page->replace_template_section('blog_article_comment_item_block', $blog_comment_template);
$next_prev = $misc->next_prev($num_rows, $_GET['cur_page'], "", 'blog', TRUE);
$page->replace_tag('next_prev', $next_prev);
$page->replace_permission_tags();
$page->auto_replace_tags('', true);
$display .= $page->return_page();
}
}
return $display;
}