get_var("SELECT COUNT(id) FROM ".WYSJ_POP_TABLE); //每页显示多少条 $comments_per_page = 20; $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1; //计算偏移 $offset = ((int)$page-1)*$comments_per_page; ?>

咨询列表

批量操作:
个项目

get_results("SELECT * FROM ".WYSJ_POP_TABLE." ORDER BY time DESC LIMIT ".$offset.",".$comments_per_page); foreach ($list as $item){ ?>
ID 留言内容 提交于 状态 操作
id; ?> userinfo); foreach($userinfo as $key => $value){ if ($value == "") { $value = "-"; } ?> 查看 处理 删除
add_query_arg( 'cpage', '%#%' ), 'format' => '', 'prev_text' => __('上一页'), 'next_text' => __('下一页'), 'total' => ceil($total / $comments_per_page), 'current' => $page )); ?>

留言详情

提交时间:

array( '表格1' => '值1', '表格2' => '值2', '表格3' => '值3', '表格4' => '值4', '表格5' => '值5', ) ); $string=""; $head = ""; foreach ($data as $key => $value) { if($head == ""){ foreach ($value as $k => $val){ $k = iconv('utf-8','gb2312', $k); $head .= $k.","; } $head .= "\n"; } foreach ($value as $k => $val) { $value[$k]=iconv('utf-8','gb2312',$value[$k]); } $string .= implode(",",$value)."\n"; //用英文逗号分开 } $filename = date('Ymd').'.csv'; //设置文件名 header("Content-type:text/csv"); header("Content-Disposition:attachment;filename=".$filename); header('Cache-Control:must-revalidate,post-check=0,pre-check=0'); header('Expires:0'); header('Pragma:public'); echo $head.$string; exit; } ?>