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) { if ($is_category) {
$cate = explode('|', $board['bo_category_list']); $cate = explode('|', $board['bo_category_list']);
} }
for ($h = 0; $h <= count($cate); $h++) { for ($h = 0; $h <= count($cate); $h++) {
if (count($cate) > 0 && $h == count($cate)) if (count($cate) > 0 && $h == count($cate))
continue; 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++) { for ($k = 0; $row = sql_fetch_array($list_item); $k++) {
$lists[$k] = get_list($row, $board, $board_skin_url); $lists[$k] = get_list($row, $board, $board_skin_url);
} }
@ -33,11 +34,18 @@ $lists = array();
<h2><?= $cate[$h] ?></h2> <h2><?= $cate[$h] ?></h2>
<?php } ?> <?php } ?>
<ul class="list_box"> <ul class="list_box">
<?php if (count($lists) > 0) { ?>
<?php <?php
if (count($lists) > 0) {
for ($i = 0; $i < count($lists); $i++) { 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) { 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; $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; $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);"; $_link = $lists[$i]['wr_link2'] ? $lists[$i]['wr_link2'] : "javascript:void(0);";
$_secret = strstr($lists[$i]['wr_option'], 'secret') ? " secret" : ""; $_secret = strstr($lists[$i]['wr_option'], 'secret') ? " secret" : "";
$_extraattr = "style=\"cursor:default;\" onclick=\"return false;\" "; $_extraattr = "style=\"cursor:default;\" onclick=\"return false;\" ";
@ -82,8 +86,9 @@ $lists = array();
</span> </span>
<?php } ?> <?php } ?>
</p> </p>
</li><?php } </li>
} ?> <?php } ?>
<?php } ?>
</ul> </ul>
</div> </div>
<?php } ?> <?php } ?>
@ -113,5 +118,4 @@ $lists = array();
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
<!-- } 게시판 목록 --> <!-- } 게시판 목록 -->

View file

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

View file

@ -1,10 +1,11 @@
<?php <?php
include_once "./_common.php"; include_once "./_common.php";
include_once G5_PATH . "/head.sub.php"; include_once G5_PATH . "/head.sub.php";
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0); 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"> <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="bo_table" value="<?= $bo_table ?>">
<input type="hidden" name="write_table" value="<?= $write_table ?>"> <input type="hidden" name="write_table" value="<?= $write_table ?>">
<div style="max-width:1000px;margin:10px auto;"> <div style="max-width:1000px;margin:10px auto;">
@ -29,7 +30,7 @@ if ($board['bo_write_level'] <= $member['mb_level']) {
<th>순서</th> <th>순서</th>
</tr> </tr>
<?php <?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++) { ?> for ($i = 0; $row = sql_fetch_array($order); $i++) { ?>
<tr> <tr>
<?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?> <?php if ($board['bo_use_category'] && $board['bo_category_list']) { ?>
@ -69,5 +70,5 @@ if ($board['bo_write_level'] <= $member['mb_level']) {
<a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a> <a href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $bo_table ?>" class="ui-btn">목록으로</a>
</div> </div>
</div> </div>
</form> </form>
<?php } ?> <?php } ?>

View file

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