| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- CURSCRIPT != 'wap' && exit('FORBIDDEN');
- $catid = isset($catid) ? intval($catid) : '';
- $areaid = isset($areaid) ? intval($areaid) : '';
- $page = isset($page) ? $page : 1;
- $seo = get_seoset();
- $rewrite = $seo['seo_force_yp'];
- if ($Catid && $rewrite == 'rewrite') {
- $detail = explode('-', $Catid);
- if ($detail[0] && in_array($detail[0], array('catid', 'areaid', 'page'))) {
- $detail[1] = intval($detail[1]);
- for ($i = 0; $i < count($detail); $i++) {
- $_GET[$detail[$i]] = ${$detail[$i]} = str_replace(array('#@#', '#!#'), array('-', '/'), $detail[++$i]);
- }
- extract($_GET);
- }
- $Catid = $detail = NULL;
- }
- if ($catid) {
- if (!($corp = $db->getRow('SELECT * FROM `' . $db_mymps . 'corp` WHERE corpid = \'' . $catid . '\''))) {
- errormsg('该商家分类不存在!');
- }
- }
- $ypcategory = get_corp_tree(0, 'corp');
- $area_list = cat_list('area', 0, 0, false, 1);
- $where = ' WHERE a.status = \'1\' AND a.if_corp = \'1\' ';
- $where .= $catid ? ' AND b.catid IN(' . get_corp_children($catid) . ') ' : ' ';
- $where .= !$areaid ? '' : ' AND a.areaid = \'' . $areaid . '\' ';
- $perpage = $mayimobile['mobiletopicperpage'] ? $mayimobile['mobiletopicperpage'] : 10;
- $param = setparams(array('mod', 'catid', 'areaid'));
- $sql = 'SELECT a.* FROM `' . $db_mymps . 'member` AS a LEFT JOIN `' . $db_mymps . 'member_category` AS b ON a.userid = b.userid ' . $where . ' ORDER BY a.levelid DESC';
- $count_sql = 'SELECT COUNT(b.id) FROM `' . $db_mymps . 'member` AS a LEFT JOIN ' . $db_mymps . 'member_category AS b ON a.userid = b.userid ' . $where;
- $rows_num = $db->getOne($count_sql);
- $totalpage = ceil($rows_num / $perpage);
- $num = intval($page - 1) * $perpage;
- $page1 = page1($sql, $perpage);
- foreach ($page1 as $k => $val) {
- $arr['id'] = $val['id'];
- $arr['userid'] = $val['userid'];
- $arr['credits'] = $val['credits'];
- $arr['credit'] = $val['credit'];
- $arr['hit'] = $val['hit'];
- $arr['if_list'] = $val['if_list'];
- $arr['hourstime'] = str_replace(':0', ':00', $val['hourstime']);
- $arr['uri_m'] = mRewrite('store', array('uid' => $val['id']));
- $arr['prelogo'] = !strstr($val['prelogo'], 'http') ? $mymps_global['SiteUrl'] . $val['prelogo'] : $val['prelogo'];
- $arr['tname'] = $val['tname'] ? $val['tname'] : $val['userid'];
- $arr['tnamej'] = $charset == 'gbk' ? iconv('gb2312', 'utf-8', $arr['tname']) : $arr['tname'];
- $arr['address'] = $val['address'] ? $val['address'] : ($val['busway'] ? $val['busway'] : '暂无地址');
- $arr['addressj'] = $charset == 'gbk' ? iconv('gb2312', 'utf-8', $arr['address']) : $arr['address'];
- $arr['levelid'] = $val['levelid'];
- $arr['tel'] = $val['tel'] ? $val['tel'] : '暂无电话';
- $member[] = $arr;
- }
- if ($mayi) {
- $member = 5.4000000000000004 <= PHP_VERSION ? json_encode($member, JSON_UNESCAPED_SLASHES) : str_replace('\\/', '/', json_encode($member));
- echo $member;
- exit();
- }
- $loc = get_location_m('corp', $catid);
- $page_title = $loc['page_title'];
- include mymps_tpl('corp_list');
- ?>
|