skin.board.link/set_order.php

74 lines
3 KiB
PHP
Raw Normal View History

2024-10-22 17:40:53 +09:00
<?php
2024-10-22 17:57:41 +09:00
include_once "./_common.php";
include_once G5_PATH . "/head.sub.php";
2024-10-22 17:40:53 +09:00
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
if ($board['bo_write_level'] <= $member['mb_level']) {
?>
<form action="<?= $board_skin_url ?>/set_order_update.php" name="orders" method="post" autocomplete="off">
<input type="hidden" name="bo_table" value="<?= $bo_table ?>">
<input type="hidden" name="write_table" value="<?= $write_table ?>">
<div style="max-width:1000px;margin:10px auto;">
<table class="theme-form">
<colgroup>
2024-10-22 17:57:41 +09:00
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
<col style="width:100px;">
<?php } ?>
2024-10-22 17:40:53 +09:00
<col style="width:150px;">
<col>
<col>
<col style="width:80px;">
</colgroup>
<tbody>
<tr>
2024-10-22 17:57:41 +09:00
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
<th>카테고리</th>
<?php } ?>
2024-10-22 17:40:53 +09:00
<th>제목</th>
<th>배너</th>
<th>링크</th>
<th>순서</th>
</tr>
2024-10-22 17:57:41 +09:00
<?php
2024-10-22 17:40:53 +09:00
$order = sql_query("select * from {$write_table} order by wr_10*1, wr_id");
for ($i = 0; $row = sql_fetch_array($order); $i++) { ?>
<tr>
2024-10-22 17:57:41 +09:00
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
<td>
<select name="category[<?= $row['wr_id'] ?>]">
2024-10-22 17:40:53 +09:00
<option value="">카테고리</option>
2024-10-22 17:57:41 +09:00
<?php
$cate = explode('|', $board['bo_category_list']);
2024-10-22 17:40:53 +09:00
for ($h = 0; $h < count($cate); $h++) { ?>
2024-10-22 17:57:41 +09:00
<option value="<?= $cate[$h] ?>" <?= $row['ca_name'] == $cate[$h] ? "selected" : ""; ?>>
<?= $cate[$h] ?>
2024-10-22 17:40:53 +09:00
</option>
2024-10-22 17:57:41 +09:00
<?php } ?>
</select>
<?php } ?>
2024-10-22 17:40:53 +09:00
</td>
2024-10-22 17:57:41 +09:00
<td>
<input type="text" name="subject[<?= $row['wr_id'] ?>]" value="<?= $row['wr_1'] ?>" style="width:100%;">
2024-10-22 17:40:53 +09:00
</td>
2024-10-22 17:57:41 +09:00
<td>
<input type="text" name="banner[<?= $row['wr_id'] ?>]" value="<?= $row['wr_link1'] ?>" style="width:100%;">
2024-10-22 17:40:53 +09:00
</td>
2024-10-22 17:57:41 +09:00
<td>
<input type="text" name="link[<?= $row['wr_id'] ?>]" value="<?= $row['wr_link2'] ?>" style="width:100%;">
2024-10-22 17:40:53 +09:00
</td>
2024-10-22 17:57:41 +09:00
<td>
<input type="text" name="order[<?= $row['wr_id'] ?>]" value="<?= $row['wr_10'] ?>" size="4">
2024-10-22 17:40:53 +09:00
<input type="hidden" name="idx[]" value="<?= $row['wr_id'] ?>">
</td>
</tr>
2024-10-22 17:57:41 +09:00
<?php } ?>
2024-10-22 17:40:53 +09:00
</tbody>
</table>
<br>
<div style="float:right;">
<button type="submit" class="ui-btn point">확인</button>
<a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a>
</div>
</div>
</form>
2024-10-22 17:57:41 +09:00
<?php } ?>