페어 리스트 순서 정렬 및 정렬 순서 필드 추가

페어 리스트 순서 정렬 및 정렬 순서 필드 추가
This commit is contained in:
TATECK 2022-10-15 11:43:24 +09:00
parent 8a2129b204
commit 3096054097
2 changed files with 26 additions and 17 deletions

View file

@ -80,29 +80,32 @@ if (!$sca) {
$from_notice_idx = ($page - 1) * $page_rows; $from_notice_idx = ($page - 1) * $page_rows;
if($from_notice_idx < 0) if($from_notice_idx < 0)
$from_notice_idx = 0; $from_notice_idx = 0;
$arr_notice = array_filter($arr_notice);
$board_notice_count = count($arr_notice); $board_notice_count = count($arr_notice);
for ($k=0; $k<$board_notice_count; $k++) { if($board_notice_count > 0) {
if (trim($arr_notice[$k]) == '') continue; $pair_str = implode("' or wr_id = '", $arr_notice);
$pair_str = "wr_id = '".$pair_str."'";
$pair_sql = " select * from {$write_table} where {$pair_str} order by wr_ing desc, wr_subject asc ";
$notice_result = sql_query($pair_sql);
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$arr_notice[$k]}' "); for($k=0; $row = sql_fetch_array($notice_result); $k++) {
if (!$row['wr_id']) continue;
$notice_array[] = $row['wr_id'];
if (!$row['wr_id']) continue; if($k < $from_notice_idx) continue;
if($sst != 'wr_id') {
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
$list[$i]['is_notice'] = true;
$notice_array[] = $row['wr_id']; $i++;
$notice_count++;
if($k < $from_notice_idx) continue;
if($notice_count >= $list_page_rows)
if($sst != 'wr_id') { break;
$list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']); }
$list[$i]['is_notice'] = true;
$i++;
$notice_count++;
if($notice_count >= $list_page_rows)
break;
} }
} }
} }

View file

@ -20,6 +20,12 @@ for($i=0; $row = sql_fetch_array($character_list); $i++) {
<input type="text" name="wr_subject" value="<?php echo $subject ?>" required class="frm_input required datepicker" size="12" maxlength="255"> <input type="text" name="wr_subject" value="<?php echo $subject ?>" required class="frm_input required datepicker" size="12" maxlength="255">
</td> </td>
</tr> </tr>
<tr>
<th scope="row">정렬순서</th>
<td>
<input type="text" name="wr_ing" value="<?php echo $write['wr_ing'] ?>" class="frm_input" size="5" maxlength="255">
</td>
</tr>
</tbody> </tbody>
</table> </table>