function select($check) { $str = null; for ($i = 1; $i < 15; $i++) { if ($i == $check) { $str .= '<option value="' . $i . '" selected="selected">' . ex_type($i) . ' </option>'; } else { $str .= '<option value="' . $i . '">' . ex_type($i) . ' </option>'; } } return $str; }
} else { $uri = '120.25.250.200/application/controllers/api/search.php?page=' . $pageid . '&type=' . $type . '&key=' . $k; } $re = getFn($uri); $r = json_decode($re, TRUE); $data = $r['data']; $h = null; foreach ($data as $key => $value) { if ($value['itemGender'] == 2) { $itemGender = '皆可'; } else { $itemGender = $value['itemGender'] == 0 ? '女' : '男'; } $isRecommend = $value['isRecommend'] == 0 ? '否' : '是'; $isTop = $value['isTop'] == 0 ? '否' : '是'; $type = ex_type($value['type']); $h .= '<tr> <td><input type="checkbox" /></td> <td><a href="' . $value['itemName'] . '" target="_blank">' . $value['id'] . '</a></td> <td>' . mb_substr($value['describe'], 0, 5, 'utf-8') . '</td> <td>' . $type . '</td> <td>' . $itemGender . '</td> <td>' . $isTop . '</td> <td>' . $isRecommend . '</td> <td class="am-hide-sm-only">' . $value['itemDate'] . '</td> <td> <div class="am-btn-toolbar"> <button type="button" class="am-btn am-btn-success" id="btn' . $value['id'] . '"><span class="am-icon-plus"></span> 编辑</button> <div class="am-modal am-modal-prompt am-modal-out" tabindex="-1" id="' . $value['id'] . '"> <div class="am-modal-dialog" align=left> <div class="am-modal-bd" >