- $perpage = 10;
- $start = empty( $_GET['start'] ) ? 0 : intval( $_GET['start'] );
- ckstart( $start, $perpage );
- $uid = (int)$_GET['uid'];
- if (empty($uid)) {
- $uid = $_SGLOBAL['supe_uid']; //如果地址栏没有uid参数,默认就是自己
- }
- $type = empty( $_GET['type'] ) ? 0 : intval( $_GET['type'] );
- $status = empty($_GET['status']) ? 0 : intval($_GET['status']) ;
- $where = " WHERE 1 ";
- if (!empty($type)) {
- $where .= " AND typeid = {$type} ";
- }
- if (!empty($status)) {
- $where .= " AND status = {$status} ";
- }
- $actives = array( $type => " class="active"" );
- $theurl = "ask.php?do=ask&ac={$ac}&typeid={$typeid}&status={$status}";
- $sql = "SELECT * FROM ".tname("app_ask")." $where ORDER BY id DESC limit $start,$perpage";
- $query = $_SGLOBAL['db']->query( $sql );
- $list = array( );
- $count = 0;
- while ( $value = $_SGLOBAL['db']->fetch_array( $query ) )
- {
- $value['typename'] = $gEumsType[$value['typeid']];
- $value['content'] = getstr(strip_tags($value['content']), 150);
- $list[] = $value ;
- $count ++ ;
- }
- $multi = smulti( $start, $perpage, $count, $theurl );
复制代码 按照这个代码的分页比较丑陋,和UCH 日志的分页相比太丑陋了,怎么才能修改和UCH日志分页那样的样式。 |