This commit is contained in:
Amberstone 2024-10-23 00:08:19 +09:00
parent c9b65efbf3
commit 90dd3e7113
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
4 changed files with 131 additions and 123 deletions

View file

@ -19,11 +19,12 @@ $lists = array();
if ($is_category) {
$cate = explode('|', $board['bo_category_list']);
}
for ($h = 0; $h <= count($cate); $h++) {
if (count($cate) > 0 && $h == count($cate))
continue;
$list_item = sql_query("select * from {$write_table} where wr_reply='' and wr_is_comment=0 order by wr_10*1, wr_id");
$list_item = sql_query("SELECT * FROM {$write_table} WHERE wr_reply='' AND wr_is_comment=0 ORDER BY wr_10*1, wr_id");
for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
$lists[$k] = get_list($row, $board, $board_skin_url);
}
@ -33,11 +34,18 @@ $lists = array();
<h2><?= $cate[$h] ?></h2>
<?php } ?>
<ul class="list_box">
<?php if (count($lists) > 0) { ?>
<?php
if (count($lists) > 0) {
for ($i = 0; $i < count($lists); $i++) {
if ($is_category) {
if (($lists[$i]['ca_name'] != $cate[$h]) || ($sca && $lists[$i]['ca_name'] != $sca))
continue;
}
// 수정, 삭제 링크
$update_href = $delete_href = "";
$update_href = "";
$delete_href = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] == $lists[$i]['mb_id'])) || $is_admin) {
$update_href = "./write.php?w=u&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
@ -50,10 +58,6 @@ $lists = array();
$delete_href = "./password.php?w=d&bo_table=$bo_table&wr_id={$lists[$i]['wr_id']}&page=$page" . $qstr;
}
if ($is_category) {
if (($lists[$i]['ca_name'] != $cate[$h]) || ($sca && $lists[$i]['ca_name'] != $sca))
continue;
}
$_link = $lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);";
$_secret = strstr($lists[$i]['wr_option'], 'secret') ? " secret" : "";
$_extraattr = "style=\"cursor:default;\" onclick=\"return false;\" ";
@ -82,8 +86,9 @@ $lists = array();
</span>
<?php } ?>
</p>
</li><?php }
} ?>
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
<?php } ?>
@ -113,5 +118,4 @@ $lists = array();
</div>
<?php } ?>
</div>
<!-- } 게시판 목록 -->

View file

@ -7,6 +7,7 @@
### 주요 수정 사항
- short open tag 제거
- list.skin.php 수정
모든 아보카도 버전에 호환됩니다.

View file

@ -1,9 +1,10 @@
<?php
include_once "./_common.php";
include_once G5_PATH . "/head.sub.php";
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
if ($board['bo_write_level'] <= $member['mb_level']) {
?>
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 ?>">
@ -29,7 +30,7 @@ if ($board['bo_write_level'] <= $member['mb_level']) {
<th>순서</th>
</tr>
<?php
$order = sql_query("select * from {$write_table} order by wr_10*1, wr_id");
$order = sql_query("SELECT * FROM {$write_table} ORDER BY wr_10*1, wr_id");
for ($i = 0; $row = sql_fetch_array($order); $i++) { ?>
<tr>
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>

View file

@ -1,18 +1,20 @@
<?php
include_once "./_common.php";
if (is_array($idx)) {
for ($i = 0; $i < count($idx); $i++) {
$k = $idx[$i];
sql_query("update {$write_table}
set wr_10 = '{$order[$k]}',
sql_query("UPDATE {$write_table}
SET wr_10 = '{$order[$k]}',
wr_1 = '{$subject[$k]}',
wr_link1='{$banner[$k]}',
wr_link2='{$link[$k]}'
where wr_id='{$k}'
WHERE wr_id='{$k}'
");
if ($board['bo_use_category'] && $board['bo_category_list'] && $category[$k] != '') {
sql_query("update {$write_table} set ca_name='{$category[$k]}' where wr_id='{$k}'");
}
}
}
goto_url('./set_order.php?bo_table=' . $bo_table . '&write_table=' . $write_table);