Merge pull request #4 from MilletianOfLight/master

지역관리 플러그인 오류 수정
This commit is contained in:
TATECK 2023-04-18 10:17:10 +09:00 committed by GitHub
commit 9438ab086c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 75 additions and 101 deletions

View file

@ -170,7 +170,7 @@
.memo-inner {padding:30px 10px; max-width:640px; margin:0 auto; min-height:300px; overflow:hidden;}
.ui-list-control {text-align:right; padding-bottom:20px;}
.message-item {display:block; position:relative; max-width:90%; width:570px; box-sizing:border-box; clear:both; margin-top:10px;}
.message-item {display:block; position:relative; max-width:90%; width:570px; box-sizing:border-box; clear:both; margin-top:10px; z-index: 1;}
.message-item.index {max-width:100%; width:100%;}
.message-item .thumb {display:block; position:absolute; top:0; width:80px; text-align:center;}
.message-item .thumb em {display:block; position:relative; padding-top:100%; background:no-repeat 50% 50%; background-size:cover; border:2px solid #656567;}

View file

@ -19,11 +19,11 @@ $item_log = explode("||", $item_log);
if($log_type == 'S') {
/** 탐색 로그 출력 **/
include($board_skin_path."/action/log.seeker.skin.php");
include($board_skin_path."/action/log.S.skin.php");
}
if($log_type == 'H') {
/** 조합 로그 출력 **/
include($board_skin_path."/action/log.handmade.skin.php");
include($board_skin_path."/action/log.H.skin.php");
}
/******************************************************

View file

@ -8,7 +8,7 @@ set_session('ss_wr_id', $_REQUEST['wr_id']);
if($character['ch_id']) {
// 사용가능 아이템 검색
$temp_sql = "select it.it_id, it.it_name, inven.in_id from {$g5['inventory_table']} inven, {$g5['item_table']} it where it.it_id = inven.it_id and it.it_use_mmb_able = '1' and inven.ch_id = '{$character[ch_id]}' order by it_id asc";
$temp_sql = "select it.it_id, it.it_name, inven.in_id from {$g5['inventory_table']} inven, {$g5['item_table']} it where it.it_id = inven.it_id and it.it_use_mmb_able = '1' and inven.ch_id = '{$character['ch_id']}' order by it_id asc";
$mmb_item_result = sql_query($temp_sql);
$mmb_item = array();
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
@ -112,8 +112,8 @@ if($config['cf_use_map']) {
<div id="add_UPLOAD" <?=$write['wr_type'] == "URL" ? "style='display: none;'" : ""?>>
<input type="file" id="wr_file" name="bf_file[]" title="로그등록 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input view_image_area" />
</div>
<div id="add_URL" <?=$write[wr_type] != "URL" ? "style='display: none;'" : ""?>>
<input type="text" name="wr_url" value="<?=$write[wr_url]?>" title="이미지 링크를 가져와 주시길 바랍니다." id="wr_url" class="frm_input view_image_area" placeholder="이미지 링크 입력"/>
<div id="add_URL" <?=$write['wr_type'] != "URL" ? "style='display: none;'" : ""?>>
<input type="text" name="wr_url" value="<?=$write['wr_url']?>" title="이미지 링크를 가져와 주시길 바랍니다." id="wr_url" class="frm_input view_image_area" placeholder="이미지 링크 입력"/>
</div>
</fieldset>
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">업로드</button>

View file

@ -68,9 +68,9 @@ for ($index=0; $index<count($comment); $index++) {
// 오너 정보 출력
if($log_comment['mb_id']) {
$log_comment['name'] = "<a href='".G5_BBS_URL."/memo_form.php?me_recv_mb_id={$log_comment['mb_id']}' class='send_memo'>{$log_comment[wr_name]}</a>";
$log_comment['name'] = "<a href='".G5_BBS_URL."/memo_form.php?me_recv_mb_id={$log_comment['mb_id']}' class='send_memo'>{$log_comment['wr_name']}</a>";
} else {
$log_comment['name'] = $log_comment[wr_name];
$log_comment['name'] = $log_comment['wr_name'];
}
if(!$list_item['wr_noname'] && $list_item['mb_id'] == $log_comment['mb_id']) {
@ -171,7 +171,7 @@ for ($index=0; $index<count($comment); $index++) {
<?=date('Y-m-d H:i:s', strtotime($log_comment['wr_datetime']))?>
</span>
<?php if ($log_comment['is_del']) { ?><a href="<?php echo $log_comment['del_link']; ?>" onclick="return comment_delete();" class="del">삭제</a><?php } ?>
<?php if ($log_comment['is_edit']) { ?><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', '<?=$list_item[wr_id]?>'); return false;" class="mod">수정</a><?php } ?>
<?php if ($log_comment['is_edit']) { ?><a href="<?php echo $c_edit_href; ?>" onclick="comment_box('<?php echo $comment_id ?>', '<?=$list_item['wr_id']?>'); return false;" class="mod">수정</a><?php } ?>
</div>
</div>
<? } ?>

View file

@ -65,7 +65,7 @@ if(!$is_error) {
if($character['ch_id']) {
// 사용가능 아이템 검색
$temp_sql = "select it.it_id, it.it_name, inven.in_id from {$g5['inventory_table']} inven, {$g5['item_table']} it where it.it_id = inven.it_id and it.it_use_mmb_able = '1' and inven.ch_id = '{$character[ch_id]}'";
$temp_sql = "select it.it_id, it.it_name, inven.in_id from {$g5['inventory_table']} inven, {$g5['item_table']} it where it.it_id = inven.it_id and it.it_use_mmb_able = '1' and inven.ch_id = '{$character['ch_id']}'";
$mmb_item_result = sql_query($temp_sql);
$mmb_item = array();
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
@ -180,8 +180,8 @@ if(!$is_error) {
<input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="1"> <label for="bf_file_del0"><?php echo $file[0]['source'].'('.$file[0]['size'].')'; ?> 로그 삭제</label>
<?php } ?>
</div>
<div id="add_URL" <?=$write[wr_type] != "URL" ? "style='display: none;'" : ""?>>
<input type="text" name="wr_url" value="<?=$write[wr_url]?>" title="이미지 링크를 가져와 주시길 바랍니다." id="wr_url" class="frm_input view_image_area" placeholder="이미지 링크 입력"/>
<div id="add_URL" <?=$write['wr_type'] != "URL" ? "style='display: none;'" : ""?>>
<input type="text" name="wr_url" value="<?=$write['wr_url']?>" title="이미지 링크를 가져와 주시길 바랍니다." id="wr_url" class="frm_input view_image_area" placeholder="이미지 링크 입력"/>
</div>
</dd>
</dl>
@ -233,11 +233,11 @@ if(!$is_error) {
<select name="make_1" id="make_1" class="make-imtem">
<option value="">재료 선택</option>
<?
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character[ch_id]}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character['ch_id']}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
?>
<option value="<?=$re_row[in_id]?>">
<?=$re_row[it_name]?>
<option value="<?=$re_row['in_id']?>">
<?=$re_row['it_name']?>
</option>
<?
} ?>
@ -250,11 +250,11 @@ if(!$is_error) {
<select name="make_2" id="make_2" class="make-imtem">
<option value="">재료 선택</option>
<?
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character[ch_id]}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character['ch_id']}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
?>
<option value="<?=$re_row[in_id]?>">
<?=$re_row[it_name]?>
<option value="<?=$re_row['in_id']?>">
<?=$re_row['it_name']?>
</option>
<?
} ?>
@ -267,11 +267,11 @@ if(!$is_error) {
<select name="make_3" id="make_3" class="make-imtem">
<option value="">재료 선택</option>
<?
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character[ch_id]}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
$re_result = sql_query("select * from {$g5['inventory_table']} inven, {$g5['item_table']} it where inven.ch_id = '{$character['ch_id']}' and it.it_use_recepi = 1 and inven.it_id = it.it_id");
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
?>
<option value="<?=$re_row[in_id]?>">
<?=$re_row[it_name]?>
<option value="<?=$re_row['in_id']?>">
<?=$re_row['it_name']?>
</option>
<?
} ?>
@ -290,8 +290,8 @@ if(!$is_error) {
<?
// 위치 이동 커멘드 관련
// 현재 위치에서 이동이 가능한 칸만 가져온다
$map = sql_fetch("select * from {$g5[map_table]} where ma_id = '{$character['ma_id']}'");
$able_sql = "select * from {$g5[map_move_table]} where mf_start = '{$character['ma_id']}' and mf_use = '1'";
$map = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$character['ma_id']}'");
$able_sql = "select * from {$g5['map_move_table']} where mf_start = '{$character['ma_id']}' and mf_use = '1'";
$map_able = sql_query($able_sql);
?>
<dl>
@ -300,7 +300,7 @@ if(!$is_error) {
<select name="re_ma_id" id="re_ma_id" >
<option value="<?=$character['ma_id']?>">[현재위치 유지] <?=$map['ma_name']?></option>
<? for($i=0; $mable = sql_fetch_array($map_able); $i++) {
$end_map = sql_fetch("select ma_name from {$g5[map_table]} where ma_id = '{$mable['mf_end']}'");
$end_map = sql_fetch("select ma_name from {$g5['map_table']} where ma_id = '{$mable['mf_end']}'");
?>
<option value="<?=$mable['mf_end']?>">[위치이동] <?=$map['ma_name']?> ▶ <?=$end_map['ma_name']?></option>
<? } ?>

View file

@ -9,7 +9,7 @@ if ($is_comment_write) {
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $list_item[wr_id] ?>">
<input type="hidden" name="wr_id" value="<?php echo $list_item['wr_id'] ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
@ -65,12 +65,12 @@ if ($is_comment_write) {
<? } ?>
<input type="checkbox" name="game" id="game_<?=$list_item['wr_id']?>" value="dice" />
<label for="game_<?=$list_item[wr_id]?>">주사위</label>
<label for="game_<?=$list_item['wr_id']?>">주사위</label>
<? if($board['bo_use_noname'] && $is_member) { ?>
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="wr_noname" id="wr_noname_<?=$list_item['wr_id']?>" value="1" />
<label for="wr_noname_<?=$list_item[wr_id]?>">익명</label>
<label for="wr_noname_<?=$list_item['wr_id']?>">익명</label>
<? } ?>
</div>

View file

@ -48,22 +48,22 @@ if(count($mb_nick_array) > 0) {
wr_id = '{$temp_wr_id}',
wr_num = '{$wr_num}',
bo_table = '{$bo_table}',
mb_id = '{$member[mb_id]}',
mb_name = '{$member[mb_nick]}',
mb_id = '{$member['mb_id']}',
mb_name = '{$member['mb_nick']}',
re_mb_id = '{$memo_search['mb_id']}',
re_mb_name = '{$memo_search['mb_name']}',
ch_side = '{$character[ch_side]}',
ch_side = '{$character['ch_side']}',
memo = '{$memo}',
bc_datetime = '".G5_TIME_YMDHIS."'
";
// 동일 정보 있는지 확인 - wr_id/ bo_table / re_mb_id 로 판별
$bc = sql_fetch(" select bc_id from {$g5['call_table']} where wr_id= '{$temp_wr_id}' and bo_table= '{$bo_table}' and re_mb_id = '{$memo_search[mb_id]}' and mb_id = '{$member[mb_id]}' ");
$bc = sql_fetch(" select bc_id from {$g5['call_table']} where wr_id= '{$temp_wr_id}' and bo_table= '{$bo_table}' and re_mb_id = '{$memo_search['mb_id']}' and mb_id = '{$member['mb_id']}' ");
if($bc['bc_id']) {
// 정보가 있을 경우
$sql = " update {$g5['call_table']} set {$bc_sql_common} where bc_id = '{$bc[bc_id]}' ";
$sql = " update {$g5['call_table']} set {$bc_sql_common} where bc_id = '{$bc['bc_id']}' ";
sql_query($sql);
} else {
// 정보가 없을 경우
@ -95,7 +95,7 @@ if($w != 'cu') {
";
if($use_item) {
$it = sql_fetch("select it.it_type, it.it_use_ever, it.it_name, it.it_id, it.it_value, it.it_content, it.it_content2 from {$g5[item_table]} it, {$g5[inventory_table]} inven where inven.in_id = '{$use_item}' and inven.it_id = it.it_id");
$it = sql_fetch("select it.it_type, it.it_use_ever, it.it_name, it.it_id, it.it_value, it.it_content, it.it_content2 from {$g5['item_table']} it, {$g5['inventory_table']} inven where inven.in_id = '{$use_item}' and inven.it_id = it.it_id");
// 아이템 제거
if(!$it['it_use_ever']) {
@ -110,7 +110,7 @@ if($w != 'cu') {
// 템 검색 시작
$item_result = sql_fetch("
select re_it_id as it_id
from {$g5[explorer_table]}
from {$g5['explorer_table']}
where it_id = '".$it['it_id']."'
and (ie_per_s <= '{$seed}' and ie_per_e >= '{$seed}')
order by RAND()
@ -121,14 +121,7 @@ if($w != 'cu') {
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
// 아이템 획득에 성공 시
$item_result['it_name'] = get_item_name($item_result['it_id']);
$inven_sql = " insert into {$g5[inventory_table]}
set ch_id = '{$character[ch_id]}',
it_id = '{$item_result[it_id]}',
it_name = '{$item_result[it_name]}',
ch_name = '{$character[ch_name]}'";
sql_query($inven_sql);
$in_id = mysql_insert_id();
insert_inventory($character['ch_id'], $item_result['it_id']);
$item_log = "S||".$it['it_id']."||".$it['it_name']."||".$item_result['it_id']."||".$item_result['it_name'];
} else {
$item_log = "F||".$it['it_id']."||".$it['it_name'];
@ -137,7 +130,7 @@ if($w != 'cu') {
// 일반 아이템의 경우, 기본 사용 로그를 반환한다.
$item_log = "D||".$it['it_id']."||".$it['it_name']."||".$it['it_type']."||".$it['it_value']."||".$it['it_content']."||".$it['it_content2'];
}
$customer_sql .= " , wr_item = '{$it[it_id]}', wr_item_log = '{$item_log}'";
$customer_sql .= " , wr_item = '{$it['it_id']}', wr_item_log = '{$item_log}'";
}
@ -173,17 +166,11 @@ if($w != 'cu') {
limit 0, 1
");
if($item_result['it_id']) {
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
// 아이템 획득에 성공 시
$inven_sql = " insert into {$g5['inventory_table']}
set ch_id = '{$character[ch_id]}',
it_id = '{$item_result[it_id]}',
it_name = '{$item_result[it_name]}',
ch_name = '{$character[ch_name]}'";
sql_query($inven_sql);
$in_id = mysql_insert_id();
insert_inventory($character['ch_id'], $item_result['it_id']);
$log = $action."||S||".$item_result['it_id']."||".$item_result['it_name']."||".$in_id;
} else {
$log = $action."||F";
@ -207,33 +194,25 @@ if($w != 'cu') {
//----------------------------------------------------------
if($action == 'H') {
// 재료 정보 : make_1, make_2, make_3
$make_1 = sql_fetch("select inven.in_id, it.it_id, it.it_name, it.it_use_ever from {$g5['item_table']} it, {$g5['inventory_table']} inven where it.it_id = inven.it_id and inven.in_id = '{$make_1}'");
$make_2 = sql_fetch("select inven.in_id, it.it_id, it.it_name, it.it_use_ever from {$g5['item_table']} it, {$g5['inventory_table']} inven where it.it_id = inven.it_id and inven.in_id = '{$make_2}'");
$make_3 = sql_fetch("select inven.in_id, it.it_id, it.it_name, it.it_use_ever from {$g5['item_table']} it, {$g5['inventory_table']} inven where it.it_id = inven.it_id and inven.in_id = '{$make_3}'");
$make_1 = get_inventory_item($make_1);
$make_2 = get_inventory_item($make_2);
$make_3 = get_inventory_item($make_3);
$re_item[0] = $make_1[it_id];
$re_item[1] = $make_2[it_id];
$re_item[2] = $make_3[it_id];
$re_item[0] = $make_1['it_id'];
$re_item[1] = $make_2['it_id'];
$re_item[2] = $make_3['it_id'];
sort($re_item);
$re_item_order = implode("||", $re_item);
$re = sql_fetch("select it_id from {$g5['item_table']}_recepi where re_item_order = '{$re_item_order}' and re_use = '1'");;
if(!$re[it_id]) {
if(!$re['it_id']) {
// 레시피 조합 실패
$log = $action."||F||NON||NON||".$re_item_order;
} else {
// 레시피 조합 성공
$item = get_item($re[it_id]);
$inven_sql = " insert into {$g5['inventory_table']}
set ch_id = '{$character[ch_id]}',
it_id = '{$item[it_id]}',
it_name = '{$item[it_name]}',
ch_name = '{$character[ch_name]}'";
sql_query($inven_sql);
$in_id = mysql_insert_id();
$log = $action."||S||".$re[it_id]."||".$item[it_name]."||".$in_id."||".$re_item_order;
$item = get_item($re['it_id']);
insert_inventory($character['ch_id'], $item['it_id'], $item);
$log = $action."||S||".$re['it_id']."||".$item['it_name']."||".$in_id."||".$re_item_order;
}
$customer_sql .= " , wr_log = '{$log}' ";
@ -269,7 +248,7 @@ if($w != 'cu') {
$me = sql_fetch("
select *
from {$g5[map_event_table]}
from {$g5['map_event_table']}
where ma_id = '".$ma['ma_id']."'
and (me_per_s <= '{$seed}' and me_per_e >= '{$seed}')
and me_use = '1'
@ -297,14 +276,8 @@ if($w != 'cu') {
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
// 아이템 획득에 성공 시
$item_result = get_item($me['me_get_item']);
$inven_sql = " insert into {$g5[inventory_table]}
set ch_id = '{$character[ch_id]}',
it_id = '{$item_result[it_id]}',
it_name = '{$item_result[it_name]}',
ch_name = '{$character[ch_name]}'";
sql_query($inven_sql);
$in_id = mysql_insert_id();
$event_log_conttent = $item_result[it_name].j($item_result[it_name], '을')." 획득했다!";
insert_inventory($character['ch_id'], $item_result['it_id']);
$event_log_conttent = $item_result['it_name'].j($item_result['it_name'], '을')." 획득했다!";
} else if($me['me_type'] == '화폐') {
// 소지금 변동
@ -364,7 +337,7 @@ if($w != 'cu') {
$mon_hp = $origin['wr_mon_now_hp'];
$mon_attack = $origin['wr_mon_attack'];
$mon_state = $origin['wr_mon_state'];
/*
/*********************************
공격력 산출 부분
: 커뮤니티의 공격력 산출 공식에 맞게 변경하세요
@ -384,7 +357,7 @@ if($w != 'cu') {
// 최종 몬스터에게 입힌 데미지 산출 공식
$result_attack = $mon_attack - $attack; // 몬스터 반격치에서 최종 공격력 수치를 제외한다.
if($mon_hp < 1) { break; } // 몬스터 HP가 0일 경우 탈출!
if($mon_hp > 0) {
if($result_attack > 0) {
// 몬스터의 공격력 > 유저의 공격력
@ -415,6 +388,7 @@ if($w != 'cu') {
$log = $action."||{$mon_state}||".$mon_attack."||".$attack."||유저의HP정보||".$dice_attack1."+".$dice_attack2."+".$item_attack;
$customer_sql .= " , wr_log = '{$log}' ";
}
}
/******************************************************
위치이동 커맨드 추가 종료