本文整理汇总了PHP中get_comment_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_comment_list函数的具体用法?PHP get_comment_list怎么用?PHP get_comment_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_comment_list函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_pager
if ($order_id != '') {
$act['order_id'] = $order_id;
}
$pager = get_pager('user.php', $act, $record_count, $page, 5);
$smarty->assign('message_list', get_message_list($user_id, $_SESSION['user_name'], $pager['size'], $pager['start'], $order_id));
$smarty->assign('pager', $pager);
$smarty->assign('order_info', $order_info);
$smarty->display('user_clips.dwt');
} elseif ($action == 'comment_list') {
include_once ROOT_PATH . 'includes/lib_clips.php';
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
/* 获取用户留言的数量 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('comment') . " WHERE parent_id = 0 AND user_id = '{$user_id}'";
$record_count = $db->getOne($sql);
$pager = get_pager('user.php', array('act' => $action), $record_count, $page, 5);
$smarty->assign('comment_list', get_comment_list($user_id, $pager['size'], $pager['start']));
$smarty->assign('pager', $pager);
$smarty->display('user_clips.dwt');
} elseif ($action == 'act_add_message') {
include_once ROOT_PATH . 'includes/lib_clips.php';
$message = array('user_id' => $user_id, 'user_name' => $_SESSION['user_name'], 'user_email' => $_SESSION['email'], 'msg_type' => isset($_POST['msg_type']) ? intval($_POST['msg_type']) : 0, 'msg_title' => isset($_POST['msg_title']) ? trim($_POST['msg_title']) : '', 'msg_content' => isset($_POST['msg_content']) ? trim($_POST['msg_content']) : '', 'order_id' => empty($_POST['order_id']) ? 0 : intval($_POST['order_id']), 'upload' => isset($_FILES['message_img']['error']) && $_FILES['message_img']['error'] == 0 || !isset($_FILES['message_img']['error']) && isset($_FILES['message_img']['tmp_name']) && $_FILES['message_img']['tmp_name'] != 'none' ? $_FILES['message_img'] : array());
if (add_message($message)) {
show_message($_LANG['add_message_success'], $_LANG['message_list_lnk'], 'user.php?act=message_list&order_id=' . $message['order_id'], 'info');
} else {
$err->show($_LANG['message_list_lnk'], 'user.php?act=message_list');
}
} elseif ($action == 'tag_list') {
include_once ROOT_PATH . 'includes/lib_clips.php';
$good_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
$smarty->assign('tags', get_user_tags($user_id));
$smarty->assign('tags_from', 'user');
示例2: action_comment_list
function action_comment_list()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
include_once ROOT_PATH . 'includes/lib_clips.php';
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
/* 获取用户留言的数量 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('comment') . " WHERE parent_id = 0 AND user_id = '{$user_id}'";
$record_count = $db->getOne($sql);
$pager = get_pager('user.php', array('act' => $action), $record_count, $page, 5);
$smarty->assign('comment_list', get_comment_list($user_id, $pager['size'], $pager['start']));
$smarty->assign('pager', $pager);
$smarty->display('user_clips.dwt');
}
示例3: json_encode
echo json_encode($asyList);
} elseif ($action == 'comment_list') {
include_once ROOT_PATH . 'include/lib_clips.php';
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
/* 获取用户留言的数量 */
$sql = "SELECT COUNT(*) FROM " . $ecs->table('comment') . " WHERE parent_id = 0 AND user_id = '{$user_id}'";
$record_count = $db->getOne($sql);
$pager = get_pager('user.php', array('act' => $action), $record_count, $page, 5);
$smarty->assign('comment_list', get_comment_list($user_id, $pager['size'], $pager['start']));
$smarty->assign('pager', $pager);
$smarty->display('user_clips.dwt');
} elseif ($action == 'async_comment_list') {
include_once ROOT_PATH . 'include/lib_clips.php';
$start = $_POST['last'];
$limit = $_POST['amount'];
$comment_list = get_comment_list($user_id, $limit, $start);
if (is_array($comment_list)) {
foreach ($comment_list as $key => $vo) {
$re_message = $vo['reply_content'] ? '<tr><td>' . $_LANG['reply_comment'] . '<br>' . $vo['reply_content'] . '</td></tr>' : '';
$asyList[] = array('comment' => '<table width="100%" border="0" cellpadding="5" cellspacing="0" class="ectouch_table_no_border">
<tr>
<td><span style="float:right"><a href="user.php?act=del_cmt&id=' . $vo['comment_id'] . '" onclick="if (!confirm(\'' . $_LANG['confirm_remove_msg'] . '\')) return false;" style="color:#1CA2E1">删除</a></span>评论:' . $vo['cmt_name'] . ' - ' . $vo['formated_add_time'] . ' </td>
</tr>
<tr>
<td>' . $vo['content'] . '</td>
</tr>' . $re_message . '
</table>');
}
}
echo json_encode($asyList);
} elseif ($action == 'act_add_message') {
示例4: get_comment_list
$smarty->assign('full_page', 1);
$list = get_comment_list();
$smarty->assign('comment_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
assign_query_info();
$smarty->display('comment_list.htm');
}
/*------------------------------------------------------ */
//-- 翻页、搜索、排序
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'query') {
$list = get_comment_list();
$smarty->assign('comment_list', $list['item']);
$smarty->assign('filter', $list['filter']);
$smarty->assign('record_count', $list['record_count']);
$smarty->assign('page_count', $list['page_count']);
$sort_flag = sort_flag($list['filter']);
$smarty->assign($sort_flag['tag'], $sort_flag['img']);
make_json_result($smarty->fetch('comment_list.htm'), '', array('filter' => $list['filter'], 'page_count' => $list['page_count']));
}
/*------------------------------------------------------ */
//-- 回复用户评论(同时查看评论详情)
/*------------------------------------------------------ */
if ($_REQUEST['act'] == 'reply') {
/* 检查权限 */
admin_priv('comment_priv');
$comment_info = array();
示例5: define
* ============================================================================
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/company_common.php';
if ($act == 'comment_list') {
require_once QISHI_ROOT_PATH . 'include/page.class.php';
$id = intval($_GET['jobsid']);
$wheresql = " WHERE c.jobs_id='{$id}'";
$joinsql = " LEFT JOIN " . table('members') . " AS m ON c.uid=m.uid LEFT JOIN " . table('jobs') . " AS j ON c.jobs_id=j.id ";
$perpage = 15;
$total_sql = "SELECT COUNT(*) AS num FROM " . table('comment') . " AS c " . $wheresql;
$total_val = $db->get_total($total_sql);
$page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
$offset = ($page->nowindex - 1) * $perpage;
$smarty->assign('title', '职位评论 - 企业会员中心 - ' . $_CFG['site_name']);
$smarty->assign('list', get_comment_list($offset, $perpage, $joinsql . $wheresql));
$smarty->assign('page', $page->show(3));
$smarty->display('member_company/company_comment.htm');
} elseif ($act == 'comment_del') {
$id = !empty($_POST['id']) ? $_POST['id'] : $_GET['id'];
$jobs_id = intval($_POST['jobs_id']);
if (empty($id)) {
showmsg("你没有选择项目!", 1);
}
if ($n = del_company_comment($id, $jobs_id, $company_profile['id'])) {
showmsg("删除成功!共删除 {$n} 行", 2);
} else {
showmsg("删除失败!", 0);
}
} elseif ($act == 'comment_audit') {
if ($_CFG['open_commentaudit'] != "1" || $_CFG['com_commentaudit'] != "1") {