discuz教程:用户搜索加入身高区间
发布时间:12/03 来源: 浏览:
关键词:
修改/source/language/home/lang_template.php
找到1403行
- 'age_segment' => '年龄段',
- 'height_segment' => '身高区间',
第65行
- $havefield = 0;
- $startheight = $endheight = 0;
- if($_GET['endheight']) {
- $endheight = intval($_GET['endheight']);
- }
- if($_GET['startheight']) {
- $startheight = intval($_GET['startheight']);
- }
- if($startheight && $endheight && $endheight > $startheight) {
- $wherearr[] = 'sf.'.DB::field('height', $startheight, '>=').' AND sf.'.DB::field('height', $endheight, '<=');
- } else if($startheight && empty($endheight)) {
- $wherearr[] = 'sf.'.DB::field('height', $startheight, '>=');
- } else if(empty($startheight) && $endheight) {
- $wherearr[] = 'sf.'.DB::field('height', $endheight, '<=');
- }
- if($havefield || $startage || $endage) {
- if($havefield || $startage || $endage|| $startheight || $endheight) {
第272行左右搜索
- <tr>
- <th>{lang upload_avatar}</th>
- <tr>
- <th>{lang height_segment}</th>
- <td><input type="text" name="startheight" value="" size="10" class="px" style="width: 114px;" /> ~ <input type="text" name="en
- dheight" value="" size="10" class="px" style="width: 114px;" /></td>
- </tr>