플러그인 배포
29
Plugin/랜덤다이스/AvocadoEdition.RandomDice/README.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
** Avocado Edition Random Dice 설치 방법 안내 **
|
||||
|
||||
1. 압축을 푼 해당 폴더들을 아보카도 에디션이 설치 된 계정으로 업로드 합니다.
|
||||
|
||||
※ 주의사항
|
||||
* 기존에 커스텀이 진행 된 경우 파일이 겹치지 않도록 반드시 확인해 주시길바랍니다.
|
||||
: 기존에 admin.menu600.php 파일을 수정한 경우, 내부의 숫자들을 변경하거나 해당 링크를 기존에 작업한 파일에 추가해 주시길 바랍니다.
|
||||
: skin/mmb 경로의 자비란 파일에 대해 커스텀을 진행한 경우, 업로드 된 파일들을 열어 추가된 random dice 부분을 따로 기존 파일에 옮겨 주시길 바랍니다.
|
||||
: 해당 플러그인은 변경된 파일들만이 올라가 있습니다.
|
||||
: 자비란 폴더명을 다른것을 사용할 경우 해당 폴더명으로 mmb 폴더를 변경한 이후에 업로드해 주시길 바랍니다.
|
||||
|
||||
|
||||
2. 관리자에 접속 후 플러그인관리 > 랜덤주사위관리 메뉴를 확인합니다.
|
||||
|
||||
3. 사용할 랜덤 다이스 정보를 입력합니다.
|
||||
: 랜덤 다이스 입력 시, 이미지와 텍스트 부분은 개별적으로 랜덤이 돌게 되어 있습니다.
|
||||
: ex) 이미지1, 이미지2, 이미지3, 이미지 4 / 텍스트 1, 텍스트2, 텍스트 3... 일 경우 출력되는건 이미지 3, 텍스트 1 등의 랜덤으로 출력
|
||||
: 이미지의 경우 업로드 방식이 아닌 URL 만을 사용합니다.
|
||||
|
||||
4. 사용 체크 후, 자비란에 해당 랜덤 다이스를 선택하는 선택박스가 있는지 확인합니다.
|
||||
|
||||
5. 랜덤 다이스 체크 후 화면을 확인합니다.
|
||||
|
||||
|
||||
|
||||
copyright by.AvocadoEdition
|
||||
http://bytheallspark.cafe24.com
|
||||
@avocado_web
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu600'] = array (
|
||||
array('600000', '플러그인관리', ''.G5_ADMIN_URL.'', ''),
|
||||
array('600200', '랜덤주사위관리', ''.G5_ADMIN_URL.'/random_list.php', '')
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
231
Plugin/랜덤다이스/AvocadoEdition.RandomDice/adm/random_list.php
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
<?php
|
||||
$sub_menu = "600200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['random_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "ra_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '랜덤주사위 관리';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
|
||||
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">랜덤주사위 목록</a></li>
|
||||
<li><a href="#anc_002">랜덤주사위 등록</a></li>
|
||||
</ul>';
|
||||
|
||||
?>
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">랜덤주사위 목록</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
전체 <?php echo number_format($total_count) ?> 건
|
||||
</div>
|
||||
|
||||
<form name="fclasslist" id="fclasslist" method="post" action="./random_list_delete.php" onsubmit="return fclasslist_submit(this);" enctype="multipart/form-data">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 120px;"/>
|
||||
<col style="width: 500px;"/>
|
||||
<col />
|
||||
<col style="width: 50px;" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">랜덤주사위 내역 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">IDX</th>
|
||||
<th scope="col">랜덤주사위명</th>
|
||||
<th scope="col">이미지</th>
|
||||
<th scope="col">랜덤텍스트</th>
|
||||
<th scope="col">사용여부</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td style="text-align: center" rowspan="2">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<input type="text" name="ra_id[<?php echo $i ?>]" value="<?php echo $row['ra_id'] ?>" id="ra_id_<?php echo $i ?>" readonly style="width: 30px;">
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<input type="text" name="ra_title[<?php echo $i ?>]" value="<?php echo $row['ra_title'] ?>" class="frm_input" style="width: 98%;">
|
||||
</td>
|
||||
|
||||
<td style="text-align: center">
|
||||
<?
|
||||
$images = nl2br($row['ra_img']);
|
||||
$link_list = explode('<br />', $images);
|
||||
$link_list = array_values(array_filter(array_map('trim',$link_list)));
|
||||
for($j=0; $j < count($link_list); $j++) {
|
||||
$r_row = $link_list[$j];
|
||||
if(!$r_row) continue;
|
||||
?>
|
||||
<img src="<?=$r_row?>" style="max-width: 30px; max-height: 30px;"/>
|
||||
<? } ?>
|
||||
</td>
|
||||
|
||||
<td rowspan="2">
|
||||
<textarea name="ra_text[<?=$i?>]"><?php echo $row['ra_text'] ?></textarea>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<input type="checkbox" name="ra_use[<?=$i?>]" value="1" <?=($row['ra_use'] ? "checked" : "")?>>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<textarea name="ra_img[<?=$i?>]" style="height: 80px;"><?php echo $row['ra_img'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
</section>
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">랜덤주사위정보 등록</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<form name="fclassform" method="post" id="fclassform" action="./random_update.php" autocomplete="off" enctype="multipart/form-data">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 120px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="ra_use">사용여부</label></th>
|
||||
<td><input type="checkbox" name="ra_use" id="ra_use" value="1" checked></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ra_title">랜덤주사위명<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="ra_title" id="ra_title" class="required frm_input" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ra_img">주사위 이미지<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("랜덤으로 출력될 주사위 이미지의 경로들을 입력해 주시길 바랍니다.\n여러개 입력 시, 엔터로 구분해 주시길 바랍니다.") ?>
|
||||
<textarea name="ra_img"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ra_text">랜덤텍스트</label></th>
|
||||
<td>
|
||||
<?php echo help("랜덤으로 출력될 텍스트를 입력해 주시길 바랍니다.\n여러개 입력 시, 엔터로 구분해 주시길 바랍니다.") ?>
|
||||
<textarea name="ra_text"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function fclasslist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
$sub_menu = '600200';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
$sql_common = "";
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$si = sql_fetch("select * from {$g5['random_table']} where ra_id = '{$_POST['ra_id'][$k]}'");
|
||||
|
||||
if (!$si['ra_id']) {
|
||||
$msg .= $si['ra_id'].' : 기존 자료가 존재하지 않습니다.\\n';
|
||||
} else {
|
||||
$sql = " update {$g5['random_table']}
|
||||
set ra_title = '{$_POST['ra_title'][$k]}',
|
||||
ra_img = '{$_POST['ra_img'][$k]}',
|
||||
ra_text = '{$_POST['ra_text'][$k]}',
|
||||
ra_use = '{$_POST['ra_use'][$k]}'";
|
||||
|
||||
$sql .= " where ra_id = '{$_POST['ra_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// 랜덤다이스 내역삭제
|
||||
$sql = " delete from {$g5['random_table']} where ra_id = '{$_POST['ra_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
alert($msg);
|
||||
goto_url('./random_list.php?'.$qstr);
|
||||
?>
|
||||
18
Plugin/랜덤다이스/AvocadoEdition.RandomDice/adm/random_update.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
$sub_menu = "600200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
check_token();
|
||||
|
||||
$sql = " insert into {$g5['random_table']}
|
||||
set ra_title = '{$_POST['ra_title']}',
|
||||
ra_img = '{$_POST['ra_img']}',
|
||||
ra_text = '{$_POST['ra_text']}',
|
||||
ra_use = '{$_POST['ra_use']}'";
|
||||
|
||||
sql_query($sql);
|
||||
|
||||
|
||||
goto_url('./random_list.php?'.$qstr);
|
||||
?>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 랜덤 테이블값 추가
|
||||
$g5['random_dice_table'] = G5_TABLE_PREFIX.'random_dice';
|
||||
|
||||
// 랜덤 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['random_dice_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['random_dice_table']}` (
|
||||
`ra_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`bo_table` varchar(255) NOT NULL default '',
|
||||
`ra_title` varchar(255) NOT NULL default '',
|
||||
`ra_text` text NOT NULL,
|
||||
`ra_img` text NOT NULL,
|
||||
`ra_use` int(11) NOT NULL default '0',
|
||||
`ra_progress` int(11) NOT NULL default '0',
|
||||
`ra_progress_title` NOT NULL default '',
|
||||
`ra_progress_max` int(11) NOT NULL default '0',
|
||||
`ra_progress_p` int(11) NOT NULL default '0',
|
||||
`ra_progress_m` int(11) NOT NULL default '0',
|
||||
`ra_limit` int(11) NOT NULL default '0',
|
||||
`ra_limit_day` int(11) NOT NULL default '0',
|
||||
`ra_skin` varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (`ra_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 랜덤 테이블값 추가
|
||||
$g5['random_dice_table'] = G5_TABLE_PREFIX.'random_dice';
|
||||
$g5['random_dice_log_table'] = G5_TABLE_PREFIX.'random_dice_log';
|
||||
|
||||
// 랜덤 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['random_dice_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['random_dice_table']}` (
|
||||
`ra_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`bo_table` varchar(255) NOT NULL default '',
|
||||
`ra_title` varchar(255) NOT NULL default '',
|
||||
`ra_text` text NOT NULL,
|
||||
`ra_img` text NOT NULL,
|
||||
`ra_use` int(11) NOT NULL default '0',
|
||||
`ra_progress` int(11) NOT NULL default '0',
|
||||
`ra_progress_title` varchar(255) NOT NULL default '',
|
||||
`ra_progress_max` int(11) NOT NULL default '0',
|
||||
`ra_progress_p` int(11) NOT NULL default '0',
|
||||
`ra_progress_m` int(11) NOT NULL default '0',
|
||||
`ra_limit` int(11) NOT NULL default '0',
|
||||
`ra_limit_day` int(11) NOT NULL default '0',
|
||||
`ra_skin` varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (`ra_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 랜덤 로그 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['random_dice_log_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['random_dice_log_table']}` (
|
||||
`rl_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ra_id` int(11) NOT NULL DEFAULT '0',
|
||||
`bo_table` varchar(11) NOT NULL DEFAULT '',
|
||||
`wr_id` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(11) NOT NULL DEFAULT '',
|
||||
`ch_id` int(11) NOT NULL DEFAULT '0',
|
||||
`rl_text` TEXT NOT NULL DEFAULT,
|
||||
`rl_img` varchar(11) NOT NULL DEFAULT '',
|
||||
`rl_date` varchar(11) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`rl_id`)
|
||||
) ", false);
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
LOG HashGuide
|
||||
|
||||
- 로그타입
|
||||
1. S : 탐색 (성공여부, 획득아이템 ID, 획득아이템이름, 인벤 ID)
|
||||
2. A : 공격 (상대 ID, 상대 두상, 데미지)
|
||||
3. D : 방어 (상대 ID, 상대 두상, 방어율)
|
||||
4. U : 강화 (성공여부, 원래강화레벨, 현재강화레벨)
|
||||
5. H : 조합 (성공여부, 결과 아이템 ID, 인벤 ID, 조합 아이템 ID)
|
||||
*/
|
||||
|
||||
$data_log = explode("||", $data_log);
|
||||
$log_type = $data_log[0];
|
||||
|
||||
$item_log = explode("||", $item_log);
|
||||
|
||||
if($log_type == 'S') {
|
||||
/** 탐색 로그 출력 **/
|
||||
include($board_skin_path."/action/log.seeker.skin.php");
|
||||
}
|
||||
if($log_type == 'H') {
|
||||
/** 조합 로그 출력 **/
|
||||
include($board_skin_path."/action/log.handmade.skin.php");
|
||||
}
|
||||
|
||||
if($item_log[0]) {
|
||||
/** 아이템 사용시 **/
|
||||
include($board_skin_path."/action/log.item.skin.php");
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_log) {
|
||||
/** 랜덤로그 사용 시 **/
|
||||
include($board_skin_path."/action/log.random.skin.php");
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$random_data = explode("||", $random_log);
|
||||
?>
|
||||
|
||||
<div class="log-item-box data-item">
|
||||
<? if($random_data[0]) { ?>
|
||||
<em>
|
||||
<img src="<?=$random_data[0]?>" />
|
||||
</em>
|
||||
<? } ?>
|
||||
<p>
|
||||
<?=$random_data[1]?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,386 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
||||
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";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$owner_front = get_style('mmb_owner_name', 'cs_etc_2'); // 자기 로그 접두문자
|
||||
$owner_front = $owner_front['cs_etc_2'];
|
||||
$owner_behind = get_style('mmb_owner_name', 'cs_etc_3'); // 자기 로그 접미문자
|
||||
$owner_behind = $owner_behind['cs_etc_3'];
|
||||
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random_message = sql_fetch("select count(*) as cnt from avo_random where ra_use = '1'");
|
||||
if($random_message['cnt'] > 0) {
|
||||
unset($random_message);
|
||||
$random_message = array();
|
||||
$random_result = sql_query("select ra_id, ra_title from avo_random where ra_use = '1'");
|
||||
for($i=0; $ra = sql_fetch_array($random_result); $i++) {
|
||||
$random_message[$i]['title'] = $ra['ra_title'];
|
||||
$random_message[$i]['id'] = $ra['ra_id'];
|
||||
}
|
||||
} else {
|
||||
unset($random_message);
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
|
||||
|
||||
<!-- 자비란 상단 공지 부분 -->
|
||||
<? if($board['bo_content_head']) { ?>
|
||||
<div class="board-notice">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/*-------------------------------------------
|
||||
동접자 카운터 설정
|
||||
---------------------------------------------*/
|
||||
$wiget = get_style('mmb_counter');
|
||||
if($wiget['cs_value']) { echo '<div class="connect-wiget">'.$wiget['cs_value'].'</div>'; }
|
||||
?>
|
||||
|
||||
<!-- 공지사항 한줄 롤링 -->
|
||||
<div class="marquee mmb-notice">
|
||||
<span><i><?=$config['cf_10']?></i></span>
|
||||
</div>
|
||||
<!-- // 공지사항 한줄 롤링 -->
|
||||
|
||||
<!-- 게시판 카테고리 시작 { -->
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="navi_category">
|
||||
<ul>
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 카테고리 끝 -->
|
||||
|
||||
<div class="ui-mmb-button">
|
||||
<?php if ($write_href) {
|
||||
// 췩 사용 여부를 체크 한다.
|
||||
if($board['bo_use_chick']) { // 췩 사용 가능할 경우, 파일 업로드 폼을 생성한다.
|
||||
$write['wr_subject'] = '--|UPLOADING|--';
|
||||
|
||||
$upload_action_url = G5_BBS_URL."/write_update.php";
|
||||
?>
|
||||
<div class="ui-mmb-list-write">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $upload_action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="redirect" value="1">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_content" value="" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
|
||||
<? if(!$is_member) { ?>
|
||||
<fieldset class="guest-box">
|
||||
<div class="name">
|
||||
<label>이름</label>
|
||||
<input type="text" name="wr_name" value="방문자" />
|
||||
</div>
|
||||
<div class="pw">
|
||||
<label>비밀번호</label>
|
||||
<input type="password" name="wr_password" value="" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
|
||||
<div class="upload-box">
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
|
||||
<fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">업로드</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</span>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기</label>
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script>
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
}
|
||||
function fwrite_submit(f) {
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<a href="<?php echo $write_href ?>" class="ui-btn point small">등록하기</a>
|
||||
<? } } ?>
|
||||
<a href="<?php echo $list_href ?>" class="ui-btn small">새로고침</a>
|
||||
<a href="<?php echo $board_skin_url ?>/emoticon_list.php" class="ui-btn small new_win">이모티콘</a>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($write_pages) { ?><div class="ui-paging"><?php echo $write_pages; ?></div><? } ?>
|
||||
|
||||
|
||||
<!-- 리스트 시작 -->
|
||||
<div id="log_list" class="none-trans">
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$list_item = $list[$i];
|
||||
include($board_skin_path."/list.log.skin.php");
|
||||
}
|
||||
if (count($list) == 0) { echo "<div class=\"empty_list\">등록된 로그가 없습니다.</div>"; }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<? if($write_pages) { ?>
|
||||
<div class="ui-paging">
|
||||
<?php echo $write_pages; ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="searc-sub-box">
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<input type="hidden" name="hash" value="<?=$hash?>">
|
||||
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category select-box">
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject,1"<?php echo get_selected($sfl, 'wr_subject,1', true); ?>>캐릭터</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>코멘트</option>
|
||||
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>오너</option>
|
||||
<option value="wr_name"<?php echo get_selected($sfl, 'wr_name'); ?>>오너(코)</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" id="stx" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category">
|
||||
<span>해시태그</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="hash" value="<?=$hash?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="ui-search-box last">
|
||||
<fieldset class="sch_category">
|
||||
<span>로그번호</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="log" value="<?=$log?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var avo_mb_id = "<?=$member['mb_id']?>";
|
||||
var avo_board_skin_path = "<?=$board_skin_path?>";
|
||||
var avo_board_skin_url = "<?=$board_skin_url?>";
|
||||
|
||||
var save_before = '';
|
||||
var save_html = '';
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
set_comment_token(f);
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.wr_content.value) {
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
function comment_box(co_id, wr_id) {
|
||||
$('.modify_area').hide();
|
||||
$('.original_comment_area').show();
|
||||
|
||||
$('#c_'+co_id).find('.modify_area').show();
|
||||
$('#c_'+co_id).find('.original_comment_area').hide();
|
||||
|
||||
$('#save_co_comment_'+co_id).focus();
|
||||
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
modify_form.wr_id.value = wr_id;
|
||||
modify_form.comment_id.value = co_id;
|
||||
}
|
||||
|
||||
function modify_commnet(co_id) {
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
var wr_content = $('#save_co_comment_'+co_id).val();
|
||||
|
||||
modify_form.wr_content.value = wr_content;
|
||||
$('#frm_modify_comment').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form name="modify_comment" id="frm_modify_comment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="cu">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="comment_id" value="">
|
||||
<input type="hidden" name="wr_id" value="">
|
||||
<textarea name="wr_content" style="display: none;"></textarea>
|
||||
<button type="submit" style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
<script src="<?php echo $board_skin_url ?>/js/load.board.js"></script>
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
for ($index=0; $index<count($comment); $index++) {
|
||||
|
||||
$log_comment = $comment[$index];
|
||||
$comment_id = $log_comment['wr_id'];
|
||||
|
||||
$content = $log_comment['content'];
|
||||
$content = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $content);
|
||||
|
||||
if($log_comment['wr_log'] && !$is_admin) {
|
||||
// 로그 (탐색 / 조합 등의 액션 수행)의 흔적이 있을 경우
|
||||
// 관리자가 아니면 삭제 불가
|
||||
$is_delete = false;
|
||||
}
|
||||
|
||||
if($log_comment['wr_id'] != $log_comment['wr_id'] && ($log_comment['is_reply'] || $log_comment['is_edit'] || $log_comment['is_del'])) {
|
||||
// 답변, 수정, 삭제가 가능할 경우
|
||||
// 또한, 본문의 id와 코멘트의 id가 다를 경우 (같을 경우엔 로그의 상단에 있는 컨트롤을 통해 액션 수행이 가능하다)
|
||||
$query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']);
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content from $write_table where wr_id = '$indexd' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w_'.$list_item['wr_id'];
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w_'.$list_item['wr_id'];
|
||||
}
|
||||
|
||||
// 캐릭터 정보 출력
|
||||
$is_comment_owner = false;
|
||||
$comment_owner_front = ""; // 자기 로그 접두문자
|
||||
$comment_owner_behind = ""; // 자기 로그 접미문자
|
||||
|
||||
if(!$log_comment['wr_noname']) {
|
||||
if(is_file(G5_DATA_PATH."/site/ico_admin") && $config['cf_admin'] == $log_comment['mb_id']) {
|
||||
// 관리자 아이콘이 존재하고, 관리자와 작성자가 동일 할 경우
|
||||
// 관리자 아이콘을 출력한다.
|
||||
$log_comment['ch_name'] = "<img src='".G5_DATA_URL."/site/ico_admin' alt='관리자' />";
|
||||
} else {
|
||||
// 캐릭터 정보 로드
|
||||
$ch = get_character($log_comment['ch_id']);
|
||||
if($ch['ch_id']) {
|
||||
// 캐릭터 정보가 존재할 경우, 캐릭터 정보를 추가한다.
|
||||
// 캐릭터 링크
|
||||
// + 캐릭터 소속 아이콘
|
||||
// + 캐릭터 종족 아이콘
|
||||
// + 캐릭터 이름
|
||||
/*$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side']).get_class_icon($ch['ch_class'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($log_comment['wr_subject'] ? $log_comment['wr_subject'] : "GUEST")."
|
||||
</a>";*/
|
||||
$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($ch['ch_name'] ? $ch['ch_name'] : "GUEST")."
|
||||
</a>";
|
||||
} else {
|
||||
// 캐릭터 정보가 존재하지 않을 경우, 빈값을 출력한다.
|
||||
$log_comment['ch_name'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 오너 정보 출력
|
||||
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>";
|
||||
} else {
|
||||
$log_comment['name'] = $log_comment[wr_name];
|
||||
}
|
||||
|
||||
if(!$list_item['wr_noname'] && $list_item['mb_id'] == $log_comment['mb_id']) {
|
||||
$is_comment_owner = true;
|
||||
$comment_owner_front = $owner_front;
|
||||
$comment_owner_behind = $owner_behind;
|
||||
}
|
||||
} else {
|
||||
$is_comment_owner = false;
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="item-comment" id="c_<?php echo $comment_id ?>">
|
||||
<div class="co-header">
|
||||
<? // 로그 작성자와 코멘트 작성자가 동일할 경우, class='owner' 를 추가한다. ?>
|
||||
<? if(!$log_comment['wr_noname']) { ?>
|
||||
<p <?=$is_comment_owner ? ' class="owner"' : ''?>>
|
||||
<?=$comment_owner_front?>
|
||||
<strong><?=$log_comment['ch_name']?></strong>
|
||||
<span>[<?=$log_comment['name']?>]</span>
|
||||
<?=$comment_owner_behind?>
|
||||
</p>
|
||||
<? } else { ?>
|
||||
<p>익명의 누군가</p>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="co-content">
|
||||
<div class="original_comment_area">
|
||||
<?
|
||||
// 액션 로그 정보 가져 오기
|
||||
$data_log = $log_comment['wr_log'];
|
||||
// 아이템 사용 정보 가져오기
|
||||
$item_log = $log_comment['wr_item_log'];
|
||||
|
||||
include($board_skin_path."/_action.data.php");
|
||||
|
||||
// 주사위를 굴린 정보가 있을 경우
|
||||
if($log_comment['wr_dice1']) {
|
||||
?>
|
||||
<span class="dice">
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice2']?>.png" />
|
||||
</span>
|
||||
<? }
|
||||
if($log_comment['wr_link1']) {
|
||||
// 로그 등록 시 입력한 외부 링크 정보
|
||||
?>
|
||||
<span class="link-box">
|
||||
<? if($log_comment['wr_link1']) { ?>
|
||||
<a href="<?=$log_comment['wr_link1']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
<? if($log_comment['wr_link2']) { ?>
|
||||
<a href="<?=$log_comment['wr_link2']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
</span>
|
||||
<? }
|
||||
// 코멘트 출력 부분
|
||||
$log_comment['content'] = autolink($log_comment['content'], $bo_table, $stx); // 자동 링크 및 해시태그, 로그 링크 등 컨트롤 함수
|
||||
$log_comment['content'] = emote_ev($log_comment['content']); // 이모티콘 출력 함수
|
||||
echo $log_comment['content'];
|
||||
?>
|
||||
</div>
|
||||
<? if($log_comment['is_edit']) { ?>
|
||||
<div class="modify_area" id="save_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_co_comment_<?php echo $comment_id ?>"><?php echo get_text($log_comment['content1'], 0) ?></textarea>
|
||||
<button type="button" class="mod_comment ui-btn" onclick="modify_commnet('<?php echo $comment_id ?>'); return false;">수정</button>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="co-footer">
|
||||
<span class="date">
|
||||
<?=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 } ?>
|
||||
</div>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,723 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
if($board['bo_use_chick'] && $w == '') {
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.$qstr);
|
||||
}
|
||||
|
||||
$is_error = false;
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
/*if(!$character['ch_id']) {
|
||||
?>
|
||||
<div class='error'>
|
||||
<? if(!$is_member) { ?>
|
||||
작성권한이 없습니다.<br />
|
||||
계정로그인을 해주시길 바랍니다.
|
||||
|
||||
<div class="btn-group txt-center">
|
||||
<a href="<?=G5_BBS_URL?>/login.php" class="ui-btn">로그인</a>
|
||||
<a href="./board.php?bo_table=<?=$bo_table?>" class="ui-btn">목록으로</a>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
대표캐릭터가 설정되지 않았습니다.<br />
|
||||
마이페이지에서 대표 캐릭터를 선택해 주시길 바랍니다.
|
||||
|
||||
<div class="btn-group txt-center">
|
||||
<a href="<?=G5_URL?>/mypage" class="ui-btn">마이페이지</a>
|
||||
<a href="./board.php?bo_table=<?=$bo_table?>" class="ui-btn">목록으로</a>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<?
|
||||
$is_error = true;
|
||||
}*/
|
||||
|
||||
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]}'";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
// 카테고리 재정의
|
||||
$is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$ca_name = "";
|
||||
if (isset($write['ca_name']))
|
||||
$ca_name = $write['ca_name'];
|
||||
|
||||
$categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$category_option = "";
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$checked = '';
|
||||
$class = '';
|
||||
$category = trim($categories[$i]);
|
||||
if (!$category) continue;
|
||||
|
||||
if($i==0 && $ca_name == '') {
|
||||
$ca_name = $category;
|
||||
}
|
||||
if ($category == $ca_name) {
|
||||
$class = ' class="on"';
|
||||
$checked = 'checked';
|
||||
}
|
||||
|
||||
$category_option .= "<li $class>";
|
||||
|
||||
$category_option .= "
|
||||
<input type='radio' name='ca_name' value='{$category}' id='ca_name_{$i}' {$checked} />
|
||||
<label for='ca_name_{$i}' data-index='view_{$i}'>$category</label>
|
||||
</li>\n";
|
||||
}
|
||||
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
$image_url = $board_skin_url."/img/no_image.png";
|
||||
if($w == 'u') {
|
||||
if($write['wr_type'] == 'URL') {
|
||||
$image_url = $write['wr_url'];
|
||||
$img_data = "width : ".$write['wr_width']."px / height : ".$write['wr_height']."px";
|
||||
} else if($file[0]['file']) {
|
||||
$image_url = $file[0]['path']."/".$file[0]['file'];
|
||||
$img_data = "width : ".$file[0]['wr_width']."px / height : ".$file[0]['wr_height']."px";
|
||||
}
|
||||
|
||||
if($write['wr_subject'] == "--|UPLOADING|--") {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
} else {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
$temp_sql = "select ch_thumb, mb_id, ch_id, ch_name from {$g5['character_table']} where ch_state = '승인' and ch_type != 'test' and ch_id != '{$character[ch_id]}' order by ch_type asc, ch_name asc";
|
||||
$re_ch_result = sql_query($temp_sql);
|
||||
$re_ch = array();
|
||||
for($i = 0; $row = sql_fetch_array($re_ch_result); $i++) {
|
||||
$re_ch[$i] = $row;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
<section id="bo_w" class="mmb-board">
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
<?php echo $option_hidden; ?>
|
||||
|
||||
<!-- LOG 등록 부분 -->
|
||||
<div id="view_image" class="theme-box">
|
||||
<span><?=$img_data?></span>
|
||||
<em id="view_image_loading">...LOADING...</em>
|
||||
<? if($image_url) { ?>
|
||||
<img src="<?=$image_url?>" id="prev_view_image" />
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
</dt>
|
||||
<dd>
|
||||
<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" />
|
||||
<?php if($w == 'u' && $file[0]['file']) { ?>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="theme-box">
|
||||
<?php if ($is_category) { ?>
|
||||
<ul id="board_category">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<? if(!$write['wr_log'] && $character['ch_state']=='승인') { ?>
|
||||
<div id="board_action" class="inner">
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="action"><i class="icon act"></i>Action</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="action" id="action">
|
||||
<option value="">일반행동</option>
|
||||
<? if($is_able_search) { ?>
|
||||
<option value="S">탐색</option>
|
||||
<? } ?>
|
||||
<? if($config['cf_5']) { ?>
|
||||
<option value="H">조합</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="comment-data" id="action_Z">
|
||||
<?
|
||||
// 다이스 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt style="font-size: 12px;">다이스 개수</dt>
|
||||
<dd>
|
||||
<input type="text" name="dice_count" id="dice_count" value="" style="width: 50px;"/> 개 굴립니다.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-data" id="action_H">
|
||||
<?
|
||||
// 조합 커멘드 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt>ITEM 1</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row[in_id]?>">
|
||||
<?=$re_row[it_name]?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 2</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row[in_id]?>">
|
||||
<?=$re_row[it_name]?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 3</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row[in_id]?>">
|
||||
<?=$re_row[it_name]?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="inner">
|
||||
|
||||
<? if(!$write['wr_item_log'] && $character['ch_state']=='승인' && count($mmb_item) > 0) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="use_item"><i class="icon item"></i>Item</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="use_item">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<?
|
||||
for($i=0; $i < count($mmb_item); $i++) { ?>
|
||||
<option value="<?=$mmb_item[$i]['in_id']?>"><?=$mmb_item[$i]['it_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<? } ?>
|
||||
<!-- 일반 커맨드 -->
|
||||
<?
|
||||
/******************************************************
|
||||
* :: 주사위의 경우, 한번 굴린 데이터가 남아 있을 시 수정 불가
|
||||
* :: 이때, 다른 카테고리의 선택을 할 수 없다.
|
||||
*******************************************************/
|
||||
?>
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 다이스 값이 입력된 적이 없을 경우
|
||||
if(!$write['wr_random_dice']) {
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random = sql_fetch("select count(*) as cnt from {$g5['random_table']} where ra_use = '1'");
|
||||
if($random['cnt'] > 0) {
|
||||
// 랜덤지령 리스트 뽑아오기
|
||||
$random_result = sql_query("select ra_id, ra_title from {$g5['random_table']} where ra_use = '1'");
|
||||
?>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Random
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="random_game">
|
||||
<option value="">랜덤주사위 선택</option>
|
||||
<? for($i=0; $ra = sql_fetch_array($random_result); $i++) { ?>
|
||||
<option value="<?=$ra['ra_id']?>">
|
||||
<?=$ra['ra_title']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<? }
|
||||
} else { ?>
|
||||
<input type="hidden" name="wr_random_dice" value="<?=$write['wr_random_dice']?>" />
|
||||
<? }
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Option
|
||||
</dt>
|
||||
<dd>
|
||||
<fieldset>
|
||||
<? if(!$write['wr_dice1']) { ?>
|
||||
<input type="checkbox" id="game" name="game" value="dice" /> <label for="game">일반주사위</label>
|
||||
<? } else {
|
||||
?>
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice2']?>.png" />
|
||||
<? } ?>
|
||||
</fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기 (<?=$board['bo_gallery_height']?>px 이상은 자동으로 접힙니다.)</label>
|
||||
</fieldset>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<?php if ($is_name) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_name">이름</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_password">비밀번호</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="password" name="wr_password" id="wr_password" value="<?=$_COOKIE['MMB_PW']?>" class="frm_input" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_link<?php echo $i ?>"><i class="icon link"></i>Link #<?php echo $i ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="padding small" />
|
||||
|
||||
<div class="comments">
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||
<?php } ?>
|
||||
<p class="ui-btn help">해시태그 : #해시태그내용 / 로그링크 : @로그번호 / 멤버알람 : [[닉네임]]</p>
|
||||
</div>
|
||||
|
||||
<hr class="padding" />
|
||||
|
||||
<div class="txt-center">
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">COMMENT</button>
|
||||
<button type="button" onclick="location.href='./board.php?bo_table=<?=$bo_table?>';" class="ui-btn">LIST</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 끝 -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||
check_byte("wr_content", "char_count");
|
||||
|
||||
$(function() {
|
||||
$("#wr_content").on("keyup", function() {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "html2";
|
||||
else
|
||||
obj.value = "html1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<? if($w == '') { ?>
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
<? } ?>
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$('.view_image_area').on('change', function() {
|
||||
var image = $(this).val();
|
||||
var type = $(this).attr('type');
|
||||
|
||||
if(type == 'file') {
|
||||
$('#wr_homepage').val('');
|
||||
previewImage(this,'view_image');
|
||||
} else {
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
checkImage(image, complete, '', 'view_image');
|
||||
}
|
||||
});
|
||||
|
||||
function reset_image(previewId) {
|
||||
var preview = document.getElementById(previewId);
|
||||
var prevImg = document.getElementById("prev_" + previewId); //이전에 미리보기가 있다면 삭제
|
||||
if (prevImg) {
|
||||
preview.removeChild(prevImg);
|
||||
}
|
||||
|
||||
$('#wr_width').val('');
|
||||
$('#wr_height').val('');
|
||||
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
|
||||
function previewImage(targetObj, previewId) {
|
||||
var preview = document.getElementById(previewId); //div id
|
||||
var ua = window.navigator.userAgent;
|
||||
var files = targetObj.files;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
for ( var i = 0; i < files.length; i++) {
|
||||
|
||||
var file = files[i];
|
||||
|
||||
var imageType = /image.*/; //이미지 파일일경우만.. 뿌려준다.
|
||||
if (!file.type.match(imageType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var img = document.createElement("img");
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
img.file = file;
|
||||
|
||||
if (window.FileReader) { // FireFox, Chrome, Opera 확인.
|
||||
var reader = new FileReader();
|
||||
reader.onloadend = (function(aImg) {
|
||||
return function(e) {
|
||||
aImg.src = e.target.result;
|
||||
complete('S', aImg.width, aImg.height);
|
||||
$('#view_image_loading').hide();
|
||||
preview.appendChild(img);
|
||||
};
|
||||
})(img);
|
||||
reader.readAsDataURL(file);
|
||||
} else { // safari is not supported FileReader
|
||||
//alert('not supported FileReader');
|
||||
if (!document.getElementById("sfr_preview_error_"
|
||||
+ previewId)) {
|
||||
var info = document.createElement("p");
|
||||
info.id = "sfr_preview_error_" + previewId;
|
||||
info.innerHTML = "not supported FileReader";
|
||||
preview.insertBefore(info, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(i > 0) {
|
||||
|
||||
//preview.style.background="none";
|
||||
} else {
|
||||
complete('F');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkImage(url, callback, timeout, previewId) {
|
||||
timeout = timeout || 5000;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
var timedOut = false, timer;
|
||||
var img = new Image();
|
||||
var preview = document.getElementById(previewId);
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
img.onerror = img.onabort = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
callback("F");
|
||||
}
|
||||
};
|
||||
img.onload = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
callback("S", img.width, img.height);
|
||||
preview.appendChild(img);
|
||||
$('#view_image_loading').hide();
|
||||
}
|
||||
};
|
||||
img.src = url;
|
||||
|
||||
timer = setTimeout(function() {
|
||||
timedOut = true;
|
||||
callback("F");
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function complete(message, w, h) {
|
||||
if(message == 'S') {
|
||||
$('#wr_width').val(w);
|
||||
$('#wr_height').val(h);
|
||||
$('#view_image > span').text("width : " + w + "px / height : " + h + "px");
|
||||
} else {
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
}
|
||||
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
reset_image('view_image');
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#action').on('change', function() {
|
||||
var view_idx = $(this).val();
|
||||
$('.comment-data').removeClass('on');
|
||||
$('#action_' + view_idx).addClass('on');
|
||||
});
|
||||
|
||||
$('.change-thumb').on('change', function() {
|
||||
var select_item = $(this).find('option:selected');
|
||||
|
||||
var thumb = select_item.data('thumb');
|
||||
|
||||
if(typeof(thumb) != "undefined") {
|
||||
// 썸네일이 있는 경우
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty().append("<img src='"+thumb+"' alt='' />");
|
||||
} else {
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#fwrite select').change(function() {
|
||||
$('#fwrite select').find("option").attr('disabled', false);
|
||||
$('#fwrite select').each(function() {
|
||||
if($(this).val()) {
|
||||
$('#fwrite select').not(this).find("option[value="+ $(this).val() + "]").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($is_comment_write) {
|
||||
if($w == '') $w = 'c';
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside class="bo_vc_w" id="bo_vc_w_<?=$list_item['wr_id']?>">
|
||||
<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="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="ch_id" value="<?=$character['ch_id']?>" />
|
||||
<input type="hidden" name="ti_id" value="<?=$character['ch_title']?>" />
|
||||
<input type="hidden" name="ma_id" value="<?=$character['ma_id']?>" />
|
||||
<input type="hidden" name="wr_subject" value="<?=$character['ch_name'] ? $character['ch_name'] : "GUEST"?>" />
|
||||
|
||||
<div class="input-comment">
|
||||
<? if(count($mmb_item) > 0) { ?>
|
||||
<select name="use_item" class="full">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<? for($h=0; $h < count($mmb_item); $h++) { ?>
|
||||
<option value="<?=$mmb_item[$h]['in_id']?>">
|
||||
<?=$mmb_item[$h]['it_name']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<? } ?>
|
||||
|
||||
<textarea name="wr_content" required class="required" title="내용"></textarea>
|
||||
|
||||
<div class="action-check form-input">
|
||||
<? if($character['ch_state']=='승인') { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_" value="" checked/>
|
||||
<label for="action_<?=$list_item['wr_id']?>_">일반행동 </label>
|
||||
<? if($is_able_search) { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_S" value="S" />
|
||||
<label for="action_<?=$list_item['wr_id']?>_S">탐색 </label>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_message && count($random_message) > 0) { ?>
|
||||
<input type="radio" name="random_game" id="random_game_<?=$list_item['wr_id']?>_" value="" checked />
|
||||
<label for="random_game_<?=$list_item['wr_id']?>_">랜덤지령 미선택 </label>
|
||||
<?
|
||||
for($rand_index=0; $rand_index < count($random_message); $rand_index++) {
|
||||
$ra = $random_message[$rand_index];
|
||||
?>
|
||||
<input type="radio" name="random_game" id="random_game_<?=$list_item['wr_id']?>_<?=$ra['id']?>" value="<?=$ra['id']?>" />
|
||||
<label for="random_game_<?=$list_item['wr_id']?>_<?=$ra['id']?>"><?=$ra['title']?> </label>
|
||||
<? }
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<input type="checkbox" name="game" id="game_<?=$list_item['wr_id']?>" value="dice" />
|
||||
<label for="game_<?=$list_item[wr_id]?>">주사위</label>
|
||||
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
|
||||
<input type="checkbox" name="wr_noname" id="wr_noname_<?=$list_item['wr_id']?>" value="1" />
|
||||
<label for="wr_noname_<?=$list_item[wr_id]?>">익명</label>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="btn_confirm">
|
||||
<button type="submit" class="ui-comment-submit ui-btn">입력</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</aside>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$memo_custom_sql = '';
|
||||
|
||||
// ******************** 호출 관련, 호출 시 알람테이블에 기재한다. 확인은 Y / N
|
||||
// 멤버 닉네임 서칭
|
||||
// -- 치환 문자로 사용될 문자가 본문에 사용 시 지워준다. (오류 방지)
|
||||
$str = str_replace("||", "", $wr_content);
|
||||
$str = str_replace("&&", "", $str);
|
||||
|
||||
// -- 괄호를 치환한다.
|
||||
$str = str_replace("[[", "||&&", $str);
|
||||
$str = str_replace("]]", "&&", $str);
|
||||
|
||||
// explode 로 해당 문자만 추출 할 수 있도록 작업한다.
|
||||
$str = explode("||", $str);
|
||||
// -- 추출한 배열을 토대로 정규식으로 닉네임을 추출한다.
|
||||
|
||||
$call_pattern = "/&&(.*)&&/";
|
||||
$mb_nick_array = array();
|
||||
|
||||
for($i=0; $i < count($str); $i++) {
|
||||
preg_match_all($call_pattern, $str[$i], $matches);
|
||||
if($matches[1]) {
|
||||
$mb_nick_array[] = $matches[1][0];
|
||||
}
|
||||
}
|
||||
|
||||
// 배열 중복값 처리
|
||||
$mb_nick_array = array_unique($mb_nick_array);
|
||||
|
||||
|
||||
if(count($mb_nick_array) > 0) {
|
||||
// -- 괄호를 치환한다.
|
||||
$memo = str_replace("[[", "", $wr_content);
|
||||
$memo = str_replace("]]", "", $memo);
|
||||
|
||||
for($i=0; $i < count($mb_nick_array); $i++) {
|
||||
// 회원 정보 있는지 여부 확인
|
||||
$memo_search = sql_fetch("select mb_id, mb_name from {$g5['member_table']} where mb_nick = '{$mb_nick_array[$i]}' or mb_name = '{$mb_nick_array[$i]}'");
|
||||
if($memo_search['mb_id']) {
|
||||
// 회원정보가 있을 시, 알람테이블에 저장한다.
|
||||
// 저장하기 전에 동일한 정보가 있는지 확인한다.
|
||||
// 저장정보 : wr_id / wr_num / bo_table/ mb_id / mb_name / re_mb_id / re_mb_name / ch_side / memo / bc_datetime
|
||||
|
||||
$bc_sql_common = "
|
||||
wr_id = '{$temp_wr_id}',
|
||||
wr_num = '{$wr_num}',
|
||||
bo_table = '{$bo_table}',
|
||||
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]}',
|
||||
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]}' ");
|
||||
|
||||
if($bc['bc_id']) {
|
||||
// 정보가 있을 경우
|
||||
$sql = " update {$g5['call_table']} set {$bc_sql_common} where bc_id = '{$bc[bc_id]}' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
// 정보가 없을 경우
|
||||
$sql = " insert into {$g5['call_table']} set {$bc_sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
// 회원 테이블에서 알람 업데이트를 해준다.
|
||||
// 실시간 호출 알림 기능
|
||||
$log_link = G5_BBS_URL."/board.php?bo_table=".$bo_table."&log=".($wr_num * -1);
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_board_call = '".$member['mb_nick']."',
|
||||
mb_board_link = '{$log_link}'
|
||||
where mb_id = '".$memo_search['mb_id']."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else {
|
||||
// 회원정보가 없을 시, content 에 해당 닉네임을 블러 처리 하고
|
||||
// content 를 업데이트 한다.
|
||||
$wr_content = str_replace("[[".$mb_nick_array[$i]."]]", "[[???]]", $wr_content);
|
||||
$memo_custom_sql .= " , wr_content = '{$wr_content}' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
// ******************** 호출 관련, 호출 시 해당 멤버에게 쪽지 보내기 기능 종료
|
||||
|
||||
if($w != 'cu') {
|
||||
$customer_sql = "
|
||||
{$memo_custom_sql}
|
||||
";
|
||||
|
||||
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");
|
||||
|
||||
// 아이템 제거
|
||||
if(!$it['it_use_ever']) {
|
||||
// 영구성 아이템이 아닐 시, 사용했을 때 인벤에서 제거한다.
|
||||
delete_inventory($use_item);
|
||||
}
|
||||
|
||||
// 아이템이 뽑기 아이템의 경우
|
||||
if($it['it_type'] == '뽑기') {
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 템 검색 시작
|
||||
$item_result = sql_fetch("
|
||||
select re_it_id as it_id
|
||||
from {$g5[explorer_table]}
|
||||
where it_id = '".$it['it_id']."'
|
||||
and (ie_per_s <= '{$seed}' and ie_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
limit 0, 1
|
||||
");
|
||||
|
||||
if($item_result['it_id']) {
|
||||
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
|
||||
// 아이템 획득에 성공 시
|
||||
$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();
|
||||
|
||||
$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'];
|
||||
}
|
||||
} else {
|
||||
// 일반 아이템의 경우, 기본 사용 로그를 반환한다.
|
||||
$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}'";
|
||||
|
||||
}
|
||||
|
||||
if($game == "dice") {
|
||||
// 주사위 굴리기
|
||||
$dice1 = rand(1, 6);
|
||||
$dice2 = rand(1, 6);
|
||||
$customer_sql .= " , wr_dice1 = '{$dice1}', wr_dice2 = '{$dice2}'";
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_game) {
|
||||
// 랜덤 게임 선택 시
|
||||
// 랜덤 지령 가져오기
|
||||
$random = sql_fetch("select * from {$g5['random_table']} where ra_id = '{$random_game}'");
|
||||
$rand_img = nl2br($random['ra_img']);
|
||||
$rand_img = explode('<br />', $rand_img);
|
||||
$rand_img = array_values(array_filter(array_map('trim',$rand_img)));
|
||||
|
||||
$rand_text = nl2br($random['ra_text']);
|
||||
$rand_text = explode('<br />', $rand_text);
|
||||
$rand_text = array_values(array_filter(array_map('trim',$rand_text)));
|
||||
|
||||
$rand_img_seed = rand(0, count($rand_img)-1);
|
||||
$rand_text_seed = rand(0, count($rand_text)-1);
|
||||
|
||||
$customer_sql .= " , wr_random_dice = '".$rand_img[$rand_img_seed]."||".$rand_text[$rand_text_seed]."' ";
|
||||
|
||||
// 랜덤 다이스 필드가 존재하지 않을 경우
|
||||
$temp = sql_fetch("select * from {$write_table}");
|
||||
if(!isset($temp['wr_random_dice'])) {
|
||||
sql_query(" ALTER TABLE `{$write_table}` ADD `wr_random_dice` varchar(255) NOT NULL DEFAULT '' AFTER `wr_10` ");
|
||||
}
|
||||
unset($temp);
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
|
||||
|
||||
$log = "";
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 탐색 : 아이템 사용 없이 행위만으로 아이템 획득 가능
|
||||
// - 아이템 획득 제한 체크 필요
|
||||
//----------------------------------------------------------
|
||||
if($action == 'S') {
|
||||
|
||||
if($character['ch_search'] < $config['cf_search_count']) {
|
||||
// 탐색 횟수가 하루탐색 횟수를 초과하지 않은 경우
|
||||
// 주사위 굴리기
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 나온 숫자의 구간에 해당하는 아이템 중, 하나를 선택한다.
|
||||
$item_result = sql_fetch("
|
||||
select it_id, it_name
|
||||
from {$g5['item_table']}
|
||||
where
|
||||
it_use = 'Y'
|
||||
and it_seeker = '1'
|
||||
and (it_seeker_per_s <= '{$seed}' and it_seeker_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
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();
|
||||
|
||||
$log = $action."||S||".$item_result['it_id']."||".$item_result['it_name']."||".$in_id;
|
||||
} else {
|
||||
$log = $action."||F";
|
||||
}
|
||||
|
||||
// 탐색 횟수 업데이트
|
||||
sql_query("
|
||||
update {$g5['character_table']}
|
||||
set ch_search = ch_search + 1,
|
||||
ch_search_date = '".G5_TIME_YMD."'
|
||||
where ch_id = '{$character['ch_id']}'
|
||||
");
|
||||
|
||||
$character['ch_search'] = $character['ch_search'] + 1;
|
||||
$customer_sql .= " , wr_log = '{$log}' ";
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 조합
|
||||
//----------------------------------------------------------
|
||||
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}'");
|
||||
|
||||
$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]) {
|
||||
// 레시피 조합 실패
|
||||
$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;
|
||||
}
|
||||
|
||||
$customer_sql .= " , wr_log = '{$log}' ";
|
||||
|
||||
if(!$make_1['it_use_ever']) { delete_inventory($make_1['in_id']); }
|
||||
if(!$make_2['it_use_ever']) { delete_inventory($make_2['in_id']); }
|
||||
if(!$make_3['it_use_ever']) { delete_inventory($make_3['in_id']); }
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
22
Plugin/랜덤다이스/AvocadoEdition.RandomExtraDice/README.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
** Avocado Edition Random Extra Dice 설치 방법 안내 **
|
||||
|
||||
1. 압축을 푼 해당 폴더들 중 [패치파일]mmb 폴더를 제외한 나머지 폴더들을 아보카도 에디션이 설치 된 계정으로 업로드 합니다.
|
||||
|
||||
※ 주의사항
|
||||
* 기존에 커스텀이 진행 된 경우 파일이 겹치지 않도록 반드시 확인해 주시길바랍니다.
|
||||
: 기존에 admin.menu600.php 파일을 수정한 경우, 내부의 숫자들을 변경하거나 해당 링크를 기존에 작업한 파일에 추가해 주시길 바랍니다.
|
||||
: skin/[패치파일] mmb 폴더의 경우, mmb 스킨폴더에서 변경된 파일들만 포함되어 있습니다. 기존에 사용중인 MMB 게시판이 있을 경우, 패치파일 폴더를 참고하여 변경된 소스코드만을 옮겨 주시길 바랍니다.
|
||||
: skin/mmb_random 폴더는 랜덤 다이스가 적용되어 있는 스킨폴더입니다.
|
||||
|
||||
|
||||
2. 관리자에 접속 후 플러그인관리 > 랜덤주사위관리 메뉴를 확인합니다.
|
||||
|
||||
4. 사용 체크 후, 자비란에 해당 랜덤 다이스를 선택하는 선택박스가 있는지 확인합니다.
|
||||
|
||||
5. 랜덤 다이스 체크 후 화면을 확인합니다.
|
||||
|
||||
|
||||
|
||||
copyright by.AvocadoEdition
|
||||
https://avocado-edition-rout.postype.com/
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$data_log = explode("||", $data_log);
|
||||
$log_type = $data_log[0];
|
||||
$item_log = explode("||", $item_log);
|
||||
|
||||
if($log_type) {
|
||||
include($board_skin_path."/action/log.{$log_type}.skin.php");
|
||||
}
|
||||
|
||||
|
||||
if($item_log[0]) {
|
||||
/** 아이템 사용시 **/
|
||||
include($board_skin_path."/action/log.item.skin.php");
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
$random_log = $log_comment['wr_random_dice'];
|
||||
if($random_log) {
|
||||
/** 랜덤로그 사용 시 **/
|
||||
include($board_skin_path."/action/log.random.skin.php");
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random_message = sql_fetch("select count(*) as cnt from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
if($random_message['cnt'] > 0) {
|
||||
unset($random_message);
|
||||
$random_message = array();
|
||||
$random_result = sql_query("select * from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
|
||||
$rand_index = 0;
|
||||
for($i=0; $ra = sql_fetch_array($random_result); $i++) {
|
||||
if($ra['ra_progress']) {
|
||||
|
||||
if($ra['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
if($ra['ra_limit_day']) {
|
||||
$random_dice_log_table = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_dice_log_table = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}'");
|
||||
}
|
||||
$random_dice_log_table = $random_dice_log_table['cnt'];
|
||||
}
|
||||
|
||||
$random_skin_path = get_skin_path('random', $ra['ra_skin']);
|
||||
$random_skin_url = get_skin_url('random', $ra['ra_skin']);
|
||||
|
||||
@include_once($random_skin_path.'/random.skin.php');
|
||||
} else {
|
||||
if($ra['ra_limit'] > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$random_message[$rand_index]['title'] = $ra['ra_title'];
|
||||
$random_message[$rand_index]['id'] = $ra['ra_id'];
|
||||
$rand_index++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unset($random_message);
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$random_data = explode("||", $random_log);
|
||||
|
||||
?>
|
||||
|
||||
<? if(!$random_data[1]) { ?>
|
||||
<div class="theme-box txt-center" style="margin-bottom:15px;">
|
||||
<div>
|
||||
<img src="<?=$random_data[0]?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? } else {
|
||||
// 색상 변경하는 코드
|
||||
$random_data[1] = str_replace("<i>", "<i style='color:{$i_color}';>", $random_data[1]);
|
||||
$random_data[1] = str_replace("<em>", "<em style='color:{$em_color}';>", $random_data[1]);
|
||||
$random_data[1] = str_replace("<strong>", "<strong style='color:{$strong_color}';>", $random_data[1]);
|
||||
|
||||
?>
|
||||
<div class="theme-box txt-center" style="margin-bottom:15px;">
|
||||
<? if($random_data[0]) { ?>
|
||||
<div class="thumb">
|
||||
<img src="<?=$random_data[0]?>" />
|
||||
</div>
|
||||
<? } ?>
|
||||
<? if($random_data[1]) { ?>
|
||||
<div>
|
||||
<?=$random_data[1]?>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
||||
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";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$owner_front = get_style('mmb_owner_name', 'cs_etc_2'); // 자기 로그 접두문자
|
||||
$owner_front = $owner_front['cs_etc_2'];
|
||||
$owner_behind = get_style('mmb_owner_name', 'cs_etc_3'); // 자기 로그 접미문자
|
||||
$owner_behind = $owner_behind['cs_etc_3'];
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
|
||||
|
||||
<!-- 자비란 상단 공지 부분 -->
|
||||
<? if($board['bo_content_head']) { ?>
|
||||
<div class="board-notice">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
include($board_skin_path.'/_random.progress.php');
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
/*-------------------------------------------
|
||||
동접자 카운터 설정
|
||||
---------------------------------------------*/
|
||||
$wiget = get_style('mmb_counter');
|
||||
if($wiget['cs_value']) { echo '<div class="connect-wiget">'.$wiget['cs_value'].'</div>'; }
|
||||
?>
|
||||
|
||||
<!-- 공지사항 한줄 롤링 -->
|
||||
<div class="marquee mmb-notice">
|
||||
<span><i><?=$config['cf_10']?></i></span>
|
||||
</div>
|
||||
<!-- // 공지사항 한줄 롤링 -->
|
||||
|
||||
<!-- 게시판 카테고리 시작 { -->
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="navi_category">
|
||||
<ul>
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 카테고리 끝 -->
|
||||
|
||||
<div class="ui-mmb-button">
|
||||
<?php if ($write_href) {
|
||||
// 췩 사용 여부를 체크 한다.
|
||||
if($board['bo_use_chick']) { // 췩 사용 가능할 경우, 파일 업로드 폼을 생성한다.
|
||||
$write['wr_subject'] = '--|UPLOADING|--';
|
||||
|
||||
$upload_action_url = G5_BBS_URL."/write_update.php";
|
||||
?>
|
||||
<div class="ui-mmb-list-write">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $upload_action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="redirect" value="1">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_content" value="" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
|
||||
<? if(!$is_member) { ?>
|
||||
<fieldset class="guest-box">
|
||||
<div class="name">
|
||||
<label>이름</label>
|
||||
<input type="text" name="wr_name" value="방문자" />
|
||||
</div>
|
||||
<div class="pw">
|
||||
<label>비밀번호</label>
|
||||
<input type="password" name="wr_password" value="" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
|
||||
<div class="upload-box">
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
|
||||
<fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">업로드</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</span>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기</label>
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script>
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
}
|
||||
function fwrite_submit(f) {
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<a href="<?php echo $write_href ?>" class="ui-btn point small">등록하기</a>
|
||||
<? } } ?>
|
||||
<a href="<?php echo $list_href ?>" class="ui-btn small">새로고침</a>
|
||||
<a href="<?php echo $board_skin_url ?>/emoticon_list.php" class="ui-btn small new_win">이모티콘</a>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($write_pages) { ?><div class="ui-paging"><?php echo $write_pages; ?></div><? } ?>
|
||||
|
||||
|
||||
<!-- 리스트 시작 -->
|
||||
<div id="log_list" class="none-trans">
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$list_item = $list[$i];
|
||||
include($board_skin_path."/list.log.skin.php");
|
||||
}
|
||||
if (count($list) == 0) { echo "<div class=\"empty_list\">등록된 로그가 없습니다.</div>"; }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<? if($write_pages) { ?>
|
||||
<div class="ui-paging">
|
||||
<?php echo $write_pages; ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="searc-sub-box">
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<input type="hidden" name="hash" value="<?=$hash?>">
|
||||
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category select-box">
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject,1"<?php echo get_selected($sfl, 'wr_subject,1', true); ?>>캐릭터</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>코멘트</option>
|
||||
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>오너</option>
|
||||
<option value="wr_name"<?php echo get_selected($sfl, 'wr_name'); ?>>오너(코)</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" id="stx" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category">
|
||||
<span>해시태그</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="hash" value="<?=$hash?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="ui-search-box last">
|
||||
<fieldset class="sch_category">
|
||||
<span>로그번호</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="log" value="<?=$log?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var avo_mb_id = "<?=$member['mb_id']?>";
|
||||
var avo_board_skin_path = "<?=$board_skin_path?>";
|
||||
var avo_board_skin_url = "<?=$board_skin_url?>";
|
||||
|
||||
var save_before = '';
|
||||
var save_html = '';
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
set_comment_token(f);
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.wr_content.value) {
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
function comment_box(co_id, wr_id) {
|
||||
$('.modify_area').hide();
|
||||
$('.original_comment_area').show();
|
||||
|
||||
$('#c_'+co_id).find('.modify_area').show();
|
||||
$('#c_'+co_id).find('.original_comment_area').hide();
|
||||
|
||||
$('#save_co_comment_'+co_id).focus();
|
||||
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
modify_form.wr_id.value = wr_id;
|
||||
modify_form.comment_id.value = co_id;
|
||||
}
|
||||
|
||||
function modify_commnet(co_id) {
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
var wr_content = $('#save_co_comment_'+co_id).val();
|
||||
|
||||
modify_form.wr_content.value = wr_content;
|
||||
$('#frm_modify_comment').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form name="modify_comment" id="frm_modify_comment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="cu">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="comment_id" value="">
|
||||
<input type="hidden" name="wr_id" value="">
|
||||
<textarea name="wr_content" style="display: none;"></textarea>
|
||||
<button type="submit" style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
<script src="<?php echo $board_skin_url ?>/js/load.board.js"></script>
|
||||
|
|
@ -0,0 +1,715 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
if($board['bo_use_chick'] && $w == '') {
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.$qstr);
|
||||
}
|
||||
|
||||
$is_error = false;
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
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']}'";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
// 카테고리 재정의
|
||||
$is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$ca_name = "";
|
||||
if (isset($write['ca_name']))
|
||||
$ca_name = $write['ca_name'];
|
||||
|
||||
$categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$category_option = "";
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$checked = '';
|
||||
$class = '';
|
||||
$category = trim($categories[$i]);
|
||||
if (!$category) continue;
|
||||
|
||||
if($i==0 && $ca_name == '') {
|
||||
$ca_name = $category;
|
||||
}
|
||||
if ($category == $ca_name) {
|
||||
$class = ' class="on"';
|
||||
$checked = 'checked';
|
||||
}
|
||||
|
||||
$category_option .= "<li $class>";
|
||||
|
||||
$category_option .= "
|
||||
<input type='radio' name='ca_name' value='{$category}' id='ca_name_{$i}' {$checked} />
|
||||
<label for='ca_name_{$i}' data-index='view_{$i}'>$category</label>
|
||||
</li>\n";
|
||||
}
|
||||
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
$image_url = $board_skin_url."/img/no_image.png";
|
||||
if($w == 'u') {
|
||||
if($write['wr_type'] == 'URL') {
|
||||
$image_url = $write['wr_url'];
|
||||
$img_data = "width : ".$write['wr_width']."px / height : ".$write['wr_height']."px";
|
||||
} else if($file[0]['file']) {
|
||||
$image_url = $file[0]['path']."/".$file[0]['file'];
|
||||
$img_data = "width : ".$file[0]['wr_width']."px / height : ".$file[0]['wr_height']."px";
|
||||
}
|
||||
|
||||
if($write['wr_subject'] == "--|UPLOADING|--") {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
} else {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
$temp_sql = "select ch_thumb, mb_id, ch_id, ch_name from {$g5['character_table']} where ch_state = '승인' and ch_type != 'test' and ch_id != '{$character['ch_id']}' order by ch_type asc, ch_name asc";
|
||||
$re_ch_result = sql_query($temp_sql);
|
||||
$re_ch = array();
|
||||
for($i = 0; $row = sql_fetch_array($re_ch_result); $i++) {
|
||||
$re_ch[$i] = $row;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
<section id="bo_w" class="mmb-board">
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
<?php echo $option_hidden; ?>
|
||||
|
||||
<!-- LOG 등록 부분 -->
|
||||
<div id="view_image" class="theme-box">
|
||||
<span><?=$img_data?></span>
|
||||
<em id="view_image_loading">...LOADING...</em>
|
||||
<? if($image_url) { ?>
|
||||
<img src="<?=$image_url?>" id="prev_view_image" />
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
</dt>
|
||||
<dd>
|
||||
<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" />
|
||||
<?php if($w == 'u' && $file[0]['file']) { ?>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="theme-box">
|
||||
<?php if ($is_category) { ?>
|
||||
<ul id="board_category">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<? if(!$write['wr_log'] && $character['ch_state']=='승인') { ?>
|
||||
<div id="board_action" class="inner">
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="action"><i class="icon act"></i>Action</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="action" id="action">
|
||||
<option value="">일반행동</option>
|
||||
<? if($is_able_search) { ?>
|
||||
<option value="S">탐색</option>
|
||||
<? } ?>
|
||||
<? if($config['cf_5']) { ?>
|
||||
<option value="H">조합</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="comment-data" id="action_Z">
|
||||
<?
|
||||
// 다이스 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt style="font-size: 12px;">다이스 개수</dt>
|
||||
<dd>
|
||||
<input type="text" name="dice_count" id="dice_count" value="" style="width: 50px;"/> 개 굴립니다.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-data" id="action_H">
|
||||
<?
|
||||
// 조합 커멘드 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt>ITEM 1</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 2</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 3</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="inner">
|
||||
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 다이스 값이 입력된 적이 없을 경우
|
||||
if(!$write['wr_random_dice']) {
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random = sql_fetch("select count(*) as cnt from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
if($random['cnt'] > 0) {
|
||||
// 랜덤지령 리스트 뽑아오기
|
||||
$random_result = sql_query("select * from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
?>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Random
|
||||
</dt>
|
||||
<dd>
|
||||
<fieldset><input type="radio" name="random_game" id="random_game_0" value="" checked/> <label for="random_game_0">선택안함</label></fieldset>
|
||||
<? for($i=0; $ra = sql_fetch_array($random_result); $i++) {
|
||||
if($ra['ra_progress'] == '1') {
|
||||
if($ra['ra_progress_p'] + $ra['ra_progress_m'] >= $ra['ra_progress_max']) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($ra['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
if($ra['ra_limit_day']) {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}'");
|
||||
}
|
||||
$random_log = $random_log['cnt'];
|
||||
if($random_log >= $ra['ra_limit']) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<fieldset><input type="radio" name="random_game" id="random_game_<?=($i+1)?>" value="<?=$ra['ra_id']?>" /> <label for="random_game_<?=($i+1)?>"><?=$ra['ra_title']?></label></fieldset>
|
||||
<? } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<? }
|
||||
} else { ?>
|
||||
<input type="hidden" name="wr_random_dice" value="<?=$write['wr_random_dice']?>" />
|
||||
<? }
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<? if(!$write['wr_item_log'] && $character['ch_state']=='승인' && count($mmb_item) > 0) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="use_item"><i class="icon item"></i>Item</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="use_item">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<?
|
||||
for($i=0; $i < count($mmb_item); $i++) { ?>
|
||||
<option value="<?=$mmb_item[$i]['in_id']?>"><?=$mmb_item[$i]['it_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<? } ?>
|
||||
<!-- 일반 커맨드 -->
|
||||
<?
|
||||
/******************************************************
|
||||
* :: 주사위의 경우, 한번 굴린 데이터가 남아 있을 시 수정 불가
|
||||
* :: 이때, 다른 카테고리의 선택을 할 수 없다.
|
||||
*******************************************************/
|
||||
?>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Option
|
||||
</dt>
|
||||
<dd>
|
||||
<fieldset>
|
||||
<? if(!$write['wr_dice1']) { ?>
|
||||
<input type="checkbox" id="game" name="game" value="dice" /> <label for="game">일반주사위</label>
|
||||
<? } else {
|
||||
?>
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice2']?>.png" />
|
||||
<? } ?>
|
||||
</fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기 (<?=$board['bo_gallery_height']?>px 이상은 자동으로 접힙니다.)</label>
|
||||
</fieldset>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<?php if ($is_name) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_name">이름</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_password">비밀번호</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="password" name="wr_password" id="wr_password" value="<?=$_COOKIE['MMB_PW']?>" class="frm_input" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_link<?php echo $i ?>"><i class="icon link"></i>Link #<?php echo $i ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="padding small" />
|
||||
|
||||
<div class="comments">
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||
<?php } ?>
|
||||
<p class="ui-btn help">해시태그 : #해시태그내용 / 로그링크 : @로그번호 / 멤버알람 : [[닉네임]]</p>
|
||||
</div>
|
||||
|
||||
<hr class="padding" />
|
||||
|
||||
<div class="txt-center">
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">COMMENT</button>
|
||||
<button type="button" onclick="location.href='./board.php?bo_table=<?=$bo_table?>';" class="ui-btn">LIST</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 끝 -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||
check_byte("wr_content", "char_count");
|
||||
|
||||
$(function() {
|
||||
$("#wr_content").on("keyup", function() {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "html2";
|
||||
else
|
||||
obj.value = "html1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<? if($w == '') { ?>
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
<? } ?>
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$('.view_image_area').on('change', function() {
|
||||
var image = $(this).val();
|
||||
var type = $(this).attr('type');
|
||||
|
||||
if(type == 'file') {
|
||||
$('#wr_homepage').val('');
|
||||
previewImage(this,'view_image');
|
||||
} else {
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
checkImage(image, complete, '', 'view_image');
|
||||
}
|
||||
});
|
||||
|
||||
function reset_image(previewId) {
|
||||
var preview = document.getElementById(previewId);
|
||||
var prevImg = document.getElementById("prev_" + previewId); //이전에 미리보기가 있다면 삭제
|
||||
if (prevImg) {
|
||||
preview.removeChild(prevImg);
|
||||
}
|
||||
|
||||
$('#wr_width').val('');
|
||||
$('#wr_height').val('');
|
||||
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
|
||||
function previewImage(targetObj, previewId) {
|
||||
var preview = document.getElementById(previewId); //div id
|
||||
var ua = window.navigator.userAgent;
|
||||
var files = targetObj.files;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
for ( var i = 0; i < files.length; i++) {
|
||||
|
||||
var file = files[i];
|
||||
|
||||
var imageType = /image.*/; //이미지 파일일경우만.. 뿌려준다.
|
||||
if (!file.type.match(imageType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var img = document.createElement("img");
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
img.file = file;
|
||||
|
||||
if (window.FileReader) { // FireFox, Chrome, Opera 확인.
|
||||
var reader = new FileReader();
|
||||
reader.onloadend = (function(aImg) {
|
||||
return function(e) {
|
||||
aImg.src = e.target.result;
|
||||
complete('S', aImg.width, aImg.height);
|
||||
$('#view_image_loading').hide();
|
||||
preview.appendChild(img);
|
||||
};
|
||||
})(img);
|
||||
reader.readAsDataURL(file);
|
||||
} else { // safari is not supported FileReader
|
||||
//alert('not supported FileReader');
|
||||
if (!document.getElementById("sfr_preview_error_"
|
||||
+ previewId)) {
|
||||
var info = document.createElement("p");
|
||||
info.id = "sfr_preview_error_" + previewId;
|
||||
info.innerHTML = "not supported FileReader";
|
||||
preview.insertBefore(info, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(i > 0) {
|
||||
|
||||
//preview.style.background="none";
|
||||
} else {
|
||||
complete('F');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkImage(url, callback, timeout, previewId) {
|
||||
timeout = timeout || 5000;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
var timedOut = false, timer;
|
||||
var img = new Image();
|
||||
var preview = document.getElementById(previewId);
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
img.onerror = img.onabort = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
callback("F");
|
||||
}
|
||||
};
|
||||
img.onload = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
callback("S", img.width, img.height);
|
||||
preview.appendChild(img);
|
||||
$('#view_image_loading').hide();
|
||||
}
|
||||
};
|
||||
img.src = url;
|
||||
|
||||
timer = setTimeout(function() {
|
||||
timedOut = true;
|
||||
callback("F");
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function complete(message, w, h) {
|
||||
if(message == 'S') {
|
||||
$('#wr_width').val(w);
|
||||
$('#wr_height').val(h);
|
||||
$('#view_image > span').text("width : " + w + "px / height : " + h + "px");
|
||||
} else {
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
}
|
||||
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
reset_image('view_image');
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#action').on('change', function() {
|
||||
var view_idx = $(this).val();
|
||||
$('.comment-data').removeClass('on');
|
||||
$('#action_' + view_idx).addClass('on');
|
||||
});
|
||||
|
||||
$('.change-thumb').on('change', function() {
|
||||
var select_item = $(this).find('option:selected');
|
||||
|
||||
var thumb = select_item.data('thumb');
|
||||
|
||||
if(typeof(thumb) != "undefined") {
|
||||
// 썸네일이 있는 경우
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty().append("<img src='"+thumb+"' alt='' />");
|
||||
} else {
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#fwrite select').change(function() {
|
||||
$('#fwrite select').find("option").attr('disabled', false);
|
||||
$('#fwrite select').each(function() {
|
||||
if($(this).val()) {
|
||||
$('#fwrite select').not(this).find("option[value="+ $(this).val() + "]").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($is_comment_write) {
|
||||
if($w == '') $w = 'c';
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside class="bo_vc_w" id="bo_vc_w_<?=$list_item['wr_id']?>">
|
||||
<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="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="ch_id" value="<?=$character['ch_id']?>" />
|
||||
<input type="hidden" name="ti_id" value="<?=$character['ch_title']?>" />
|
||||
<input type="hidden" name="ma_id" value="<?=$character['ma_id']?>" />
|
||||
<input type="hidden" name="wr_subject" value="<?=$character['ch_name'] ? $character['ch_name'] : "GUEST"?>" />
|
||||
|
||||
<div class="input-comment">
|
||||
<? if(count($mmb_item) > 0) { ?>
|
||||
<select name="use_item" class="full">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<? for($h=0; $h < count($mmb_item); $h++) { ?>
|
||||
<option value="<?=$mmb_item[$h]['in_id']?>">
|
||||
<?=$mmb_item[$h]['it_name']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<? } ?>
|
||||
|
||||
<textarea name="wr_content" required class="required" title="내용"></textarea>
|
||||
|
||||
<div class="action-check form-input">
|
||||
<? if($character['ch_state']=='승인') { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_" value="" checked/>
|
||||
<label for="action_<?=$list_item['wr_id']?>_">일반행동 </label>
|
||||
<? if($is_able_search) { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_S" value="S" />
|
||||
<label for="action_<?=$list_item['wr_id']?>_S">탐색 </label>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_message && count($random_message) > 0) { ?>
|
||||
<select name="random_game" style="height:2em; box-sizing:border-box;">
|
||||
<option value="">RANDOM</option>
|
||||
<?
|
||||
for($rand_index=0; $rand_index < count($random_message); $rand_index++) {
|
||||
$ra = $random_message[$rand_index];
|
||||
?>
|
||||
<option value="<?=$ra['id']?>"><?=$ra['title']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<?
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
<input type="checkbox" name="game" id="game_<?=$list_item['wr_id']?>" value="dice" />
|
||||
<label for="game_<?=$list_item['wr_id']?>">주사위</label>
|
||||
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
|
||||
<input type="checkbox" name="wr_noname" id="wr_noname_<?=$list_item['wr_id']?>" value="1" />
|
||||
<label for="wr_noname_<?=$list_item['wr_id']?>">익명</label>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="btn_confirm">
|
||||
<button type="submit" class="ui-comment-submit ui-btn">입력</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</aside>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$memo_custom_sql = '';
|
||||
|
||||
// ******************** 호출 관련, 호출 시 알람테이블에 기재한다. 확인은 Y / N
|
||||
// 멤버 닉네임 서칭
|
||||
// -- 치환 문자로 사용될 문자가 본문에 사용 시 지워준다. (오류 방지)
|
||||
$str = str_replace("||", "", $wr_content);
|
||||
$str = str_replace("&&", "", $str);
|
||||
|
||||
// -- 괄호를 치환한다.
|
||||
$str = str_replace("[[", "||&&", $str);
|
||||
$str = str_replace("]]", "&&", $str);
|
||||
|
||||
// explode 로 해당 문자만 추출 할 수 있도록 작업한다.
|
||||
$str = explode("||", $str);
|
||||
// -- 추출한 배열을 토대로 정규식으로 닉네임을 추출한다.
|
||||
|
||||
$call_pattern = "/&&(.*)&&/";
|
||||
$mb_nick_array = array();
|
||||
|
||||
for($i=0; $i < count($str); $i++) {
|
||||
preg_match_all($call_pattern, $str[$i], $matches);
|
||||
if($matches[1]) {
|
||||
$mb_nick_array[] = $matches[1][0];
|
||||
}
|
||||
}
|
||||
|
||||
// 배열 중복값 처리
|
||||
$mb_nick_array = array_unique($mb_nick_array);
|
||||
|
||||
|
||||
if(count($mb_nick_array) > 0) {
|
||||
// -- 괄호를 치환한다.
|
||||
$memo = str_replace("[[", "", $wr_content);
|
||||
$memo = str_replace("]]", "", $memo);
|
||||
|
||||
for($i=0; $i < count($mb_nick_array); $i++) {
|
||||
// 회원 정보 있는지 여부 확인
|
||||
$memo_search = sql_fetch("select mb_id, mb_name from {$g5['member_table']} where mb_nick = '{$mb_nick_array[$i]}' or mb_name = '{$mb_nick_array[$i]}'");
|
||||
if($memo_search['mb_id']) {
|
||||
// 회원정보가 있을 시, 알람테이블에 저장한다.
|
||||
// 저장하기 전에 동일한 정보가 있는지 확인한다.
|
||||
// 저장정보 : wr_id / wr_num / bo_table/ mb_id / mb_name / re_mb_id / re_mb_name / ch_side / memo / bc_datetime
|
||||
|
||||
$bc_sql_common = "
|
||||
wr_id = '{$temp_wr_id}',
|
||||
wr_num = '{$wr_num}',
|
||||
bo_table = '{$bo_table}',
|
||||
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']}',
|
||||
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']}' ");
|
||||
|
||||
if($bc['bc_id']) {
|
||||
// 정보가 있을 경우
|
||||
$sql = " update {$g5['call_table']} set {$bc_sql_common} where bc_id = '{$bc['bc_id']}' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
// 정보가 없을 경우
|
||||
$sql = " insert into {$g5['call_table']} set {$bc_sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
// 회원 테이블에서 알람 업데이트를 해준다.
|
||||
// 실시간 호출 알림 기능
|
||||
$log_link = G5_BBS_URL."/board.php?bo_table=".$bo_table."&log=".($wr_num * -1);
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_board_call = '".$member['mb_nick']."',
|
||||
mb_board_link = '{$log_link}'
|
||||
where mb_id = '".$memo_search['mb_id']."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else {
|
||||
// 회원정보가 없을 시, content 에 해당 닉네임을 블러 처리 하고
|
||||
// content 를 업데이트 한다.
|
||||
$wr_content = str_replace("[[".$mb_nick_array[$i]."]]", "[[???]]", $wr_content);
|
||||
$memo_custom_sql .= " , wr_content = '{$wr_content}' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
// ******************** 호출 관련, 호출 시 해당 멤버에게 쪽지 보내기 기능 종료
|
||||
|
||||
if($w != 'cu') {
|
||||
$customer_sql = "
|
||||
{$memo_custom_sql}
|
||||
";
|
||||
|
||||
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");
|
||||
|
||||
// 아이템 제거
|
||||
if(!$it['it_use_ever']) {
|
||||
// 영구성 아이템이 아닐 시, 사용했을 때 인벤에서 제거한다.
|
||||
delete_inventory($use_item);
|
||||
}
|
||||
|
||||
// 아이템이 뽑기 아이템의 경우
|
||||
if($it['it_type'] == '뽑기') {
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 템 검색 시작
|
||||
$item_result = sql_fetch("
|
||||
select re_it_id as it_id
|
||||
from {$g5['explorer_table']}
|
||||
where it_id = '".$it['it_id']."'
|
||||
and (ie_per_s <= '{$seed}' and ie_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
limit 0, 1
|
||||
");
|
||||
|
||||
if($item_result['it_id']) {
|
||||
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
|
||||
// 아이템 획득에 성공 시
|
||||
$item_result['it_name'] = get_item_name($item_result['it_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'];
|
||||
}
|
||||
} else {
|
||||
// 일반 아이템의 경우, 기본 사용 로그를 반환한다.
|
||||
$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}'";
|
||||
|
||||
}
|
||||
|
||||
if($game == "dice") {
|
||||
// 주사위 굴리기
|
||||
$dice1 = rand(1, 6);
|
||||
$dice2 = rand(1, 6);
|
||||
$customer_sql .= " , wr_dice1 = '{$dice1}', wr_dice2 = '{$dice2}'";
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_game) {
|
||||
// 랜덤 게임 선택 시
|
||||
// 랜덤 지령 가져오기
|
||||
$random = sql_fetch("select * from {$g5['random_dice_table']} where ra_id = '{$random_game}'");
|
||||
$is_random_able = true;
|
||||
|
||||
if($random['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
|
||||
if($random['ra_limit_day']) {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$random['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$random['ra_id']}'");
|
||||
}
|
||||
|
||||
$random_log = $random_log['cnt'];
|
||||
|
||||
if($random_log >= $random['ra_limit']) {
|
||||
$is_random_able = false;
|
||||
}
|
||||
}
|
||||
|
||||
if($is_random_able) {
|
||||
$rand_img = nl2br($random['ra_img']);
|
||||
$rand_img = explode('<br />', $rand_img);
|
||||
|
||||
$rand_text = nl2br($random['ra_text']);
|
||||
$rand_text = explode('<br />', $rand_text);
|
||||
|
||||
if(count($rand_text) > count($rand_img)) {
|
||||
$rand_text_seed = rand(0, count($rand_text)-1);
|
||||
} else {
|
||||
$rand_text_seed = rand(0, count($rand_img)-1);
|
||||
}
|
||||
|
||||
|
||||
if($random['ra_progress']) {
|
||||
if(strstr($rand_text[$rand_text_seed], "[")) {
|
||||
// 수치 체크하는 부분이 있을 경우
|
||||
$check_str = explode("[", $rand_text[$rand_text_seed]);
|
||||
$check_str = explode("]", $check_str[1]);
|
||||
$check_value = (int)$check_str[0];
|
||||
|
||||
if($check_value > 0) {
|
||||
$random['ra_progress_p'] = $random['ra_progress_p'] + $check_value;
|
||||
sql_query("
|
||||
update {$g5['random_dice_table']}
|
||||
set ra_progress_p = '{$random['ra_progress_p']}'
|
||||
where ra_id = '{$random_game}'
|
||||
");
|
||||
} else {
|
||||
$random['ra_progress_m'] = $random['ra_progress_m'] + $check_value;
|
||||
sql_query("
|
||||
update {$g5['random_dice_table']}
|
||||
set ra_progress_m = '{$random['ra_progress_m']}'
|
||||
where ra_id = '{$random_game}'
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(strstr($rand_text[$rand_text_seed], "{")) {
|
||||
// 아이템 획득 부분이 있을 경우
|
||||
$check_str = explode("{", $rand_text[$rand_text_seed]);
|
||||
$check_str = explode("}", $check_str[1]);
|
||||
$check_value = sql_fetch("select * from {$g5['item_table']} where it_name = '{$check_str[0]}' order by rand() limit 0, 1");
|
||||
|
||||
if($check_value['it_id']) {
|
||||
insert_inventory($character['ch_id'], $check_value['it_id'], $check_value);
|
||||
}
|
||||
}
|
||||
|
||||
$rand_img_origi = "";
|
||||
$rand_text_origi = "";
|
||||
|
||||
if(count($rand_img)-1 >= $rand_text_seed) {
|
||||
$rand_img_origi = $rand_img[$rand_text_seed];
|
||||
}
|
||||
if(count($rand_text)-1 >= $rand_text_seed) {
|
||||
$rand_text_origi = $rand_text[$rand_text_seed];
|
||||
}
|
||||
|
||||
if ($rand_text_origi) {
|
||||
$rand_text_origi = substr(trim($rand_text_origi),0,65536);
|
||||
$rand_text_origi = preg_replace("#[\\\]+$#", "", $rand_text_origi);
|
||||
}
|
||||
|
||||
$customer_sql .= " , wr_random_dice = '".$rand_img_origi."||".$rand_text_origi."' ";
|
||||
|
||||
$log_sql = " insert into {$g5['random_dice_log_table']}
|
||||
set ra_id = '{$random['ra_id']}',
|
||||
ch_id = '{$character['ch_id']}',
|
||||
bo_table = '{$bo_table}',
|
||||
wr_id = '{$wr_id}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
rl_text = '{$rand_text_origi}',
|
||||
rl_img = '{$rand_img_origi}',
|
||||
rl_date = '".date('Y-m-d')."'";
|
||||
sql_query($log_sql);
|
||||
|
||||
} else {
|
||||
$customer_sql .= " , wr_random_dice = '||※ 가능 횟수가 초과되었습니다.' ";
|
||||
}
|
||||
|
||||
// 랜덤 다이스 필드가 존재하지 않을 경우
|
||||
if(!sql_query(" SELECT wr_random_dice from {$write_table} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE {$write_table} ADD `wr_random_dice` TEXT NOT NULL AFTER `wr_10` ");
|
||||
}
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
$log = "";
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 탐색 : 아이템 사용 없이 행위만으로 아이템 획득 가능
|
||||
// - 아이템 획득 제한 체크 필요
|
||||
//----------------------------------------------------------
|
||||
if($action == 'S') {
|
||||
|
||||
if($character['ch_search'] < $config['cf_search_count']) {
|
||||
// 탐색 횟수가 하루탐색 횟수를 초과하지 않은 경우
|
||||
// 주사위 굴리기
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 나온 숫자의 구간에 해당하는 아이템 중, 하나를 선택한다.
|
||||
$item_result = sql_fetch("
|
||||
select it_id, it_name
|
||||
from {$g5['item_table']}
|
||||
where
|
||||
it_use = 'Y'
|
||||
and it_seeker = '1'
|
||||
and (it_seeker_per_s <= '{$seed}' and it_seeker_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
limit 0, 1
|
||||
");
|
||||
|
||||
if($item_result['it_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";
|
||||
}
|
||||
|
||||
// 탐색 횟수 업데이트
|
||||
sql_query("
|
||||
update {$g5['character_table']}
|
||||
set ch_search = ch_search + 1,
|
||||
ch_search_date = '".G5_TIME_YMD."'
|
||||
where ch_id = '{$character['ch_id']}'
|
||||
");
|
||||
|
||||
$character['ch_search'] = $character['ch_search'] + 1;
|
||||
$customer_sql .= " , wr_log = '{$log}' ";
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 조합
|
||||
//----------------------------------------------------------
|
||||
if($action == 'H') {
|
||||
// 재료 정보 : make_1, make_2, 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'];
|
||||
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']) {
|
||||
// 레시피 조합 실패
|
||||
$log = $action."||F||NON||NON||".$re_item_order;
|
||||
} else {
|
||||
// 레시피 조합 성공
|
||||
$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}' ";
|
||||
|
||||
if(!$make_1['it_use_ever']) { delete_inventory($make_1['in_id']); }
|
||||
if(!$make_2['it_use_ever']) { delete_inventory($make_2['in_id']); }
|
||||
if(!$make_3['it_use_ever']) { delete_inventory($make_3['in_id']); }
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu600'] = array (
|
||||
array('600000', '플러그인관리', ''.G5_ADMIN_URL.'', ''),
|
||||
array('600200', '랜덤주사위관리', ''.G5_ADMIN_URL.'/random_list.php', '')
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
181
Plugin/랜덤다이스/AvocadoEdition.RandomExtraDice/adm/random_form.php
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
$sub_menu = '600200';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$html_title = "랜덤주사위";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$sql = " select * from {$g5['random_dice_table']} where ra_id = '$ra_id' ";
|
||||
$ra = sql_fetch($sql);
|
||||
if (!$ra['ra_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
|
||||
$html_title .= "(".$ra['ra_title'].") 수정";
|
||||
$readonly = " readonly";
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
}
|
||||
$g5['title'] = $html_title;
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">기본정보 설정</a></li>
|
||||
</ul>
|
||||
';
|
||||
|
||||
|
||||
$now_board = "";
|
||||
$search_board_sql = " select bo_table, bo_subject from {$g5['board_table']} where bo_type = 'mmb' order by bo_subject asc ";
|
||||
$search_board = sql_query($search_board_sql);
|
||||
$board_select_option = array();
|
||||
for($i=0; $row=sql_fetch_array($search_board); $i++) {
|
||||
$board_select_option[] = $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./random_list.php?{$qstr}">목록</a>
|
||||
</div>';
|
||||
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmraid_form" action="./random_form_update.php" onsubmit="return frmraid_form_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="ra_id" value="<?php echo $ra_id; ?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">랜덤주사위 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 120px;">
|
||||
<col style="width: 80px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">사용</th>
|
||||
<td colspan="2">
|
||||
<input type="checkbox" name="ra_use" value="1" <?=$ra['ra_use'] ? "checked" : ""?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">출력 게시판</th>
|
||||
<td colspan="2">
|
||||
<select name="bo_table">
|
||||
<? for($j=0; $j < count($board_select_option); $j++) { ?>
|
||||
<option value="<?=$board_select_option[$j]['bo_table']?>" <?=$ra['bo_table'] == $board_select_option[$j]['bo_table'] ? "selected" : ""?>>
|
||||
<?=$board_select_option[$j]['bo_subject']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">랜덤주사위명<strong class="sound_only">필수</strong></th>
|
||||
<td colspan="2"><input type="text" name="ra_title" id="ra_title" class="required frm_input" required value="<?=$ra['ra_title']?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">굴림횟수제한</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("0 : 무제한") ?>
|
||||
<input type="text" name="ra_limit" id="ra_limit" class="frm_input" value="<?=$ra['ra_limit'] ? $ra['ra_limit'] : "0"?>" style="width:50px;"> 회
|
||||
|
||||
<input type="checkbox" name="ra_limit_day" id="ra_limit_day" value="1" <?=$ra['ra_limit_day'] ? "checked" : ""?> /> <label for="ra_limit_day">1일초기화</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">랜덤 이미지</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("랜덤으로 출력될 주사위 이미지의 경로를 입력해주세요. (여러개 입력 시, 엔터로 구분)") ?>
|
||||
<textarea name="ra_img" style="line-height:30px; padding:0 5px; background:url('./img/bak_textarea.jpg') repeat 0 0; background-attachment:local;"><?=$ra['ra_img']?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ra_text">랜덤 텍스트</label></th>
|
||||
<td colspan="2">
|
||||
<?php echo help("랜덤으로 출력될 텍스트를 입력해주세요. (여러개 입력 시, 엔터로 구분)") ?>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
<i></i> : <span style="display:inline-block; width:12px; height:12px; background:<?=$i_color?>; border:1px solid #000;"></span>
|
||||
<em></em> : <span style="display:inline-block; width:12px; height:12px; background:<?=$em_color?>; border:1px solid #000;"></span>
|
||||
<strong></strong> : <span style="display:inline-block; width:12px; height:12px; background:<?=$strong_color?>; border:1px solid #000;"></span>
|
||||
{아이템이름} : 아이템 획득
|
||||
[숫자] : 상태바 사용시 상태바 증감 설정 (-N ~ N 설정)
|
||||
</p>
|
||||
</div>
|
||||
<textarea name="ra_text" style="height:350px; line-height:30px; padding:0 5px; background:url('./img/bak_textarea.jpg') repeat 0 0; background-attachment:local;"><?=$ra['ra_text']?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" rowspan="6">상태바</th>
|
||||
<td>사용여부</td>
|
||||
<td>
|
||||
<input type="checkbox" name="ra_progress" value="1" <?=$ra['ra_progress'] ? "checked" : ""?> >
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>상태바 이름</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_title" class="frm_input" style="width:80%;" value="<?=$ra['ra_progress_title']?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>최대값</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_max" class="frm_input" style="width:50px;" value="<?=$ra['ra_progress_max']?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>추가</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_p" class="frm_input" style="width:50px;" value="<?=$ra['ra_progress_p']?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>감소</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_m" class="frm_input" style="width:50px;" value="<?=$ra['ra_progress_m']?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>스킨</td>
|
||||
<td>
|
||||
<?php echo get_skin_select('random', 'ra_skin', "ra_skin", $ra['ra_skin']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<? echo $frm_submit; ?>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmraid_form_check(f)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
$sub_menu = "600200";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$sql_common = " ra_title = '{$ra_title}',
|
||||
bo_table = '{$bo_table}',
|
||||
ra_progress_title = '{$ra_progress_title}',
|
||||
ra_text = '{$ra_text}',
|
||||
ra_img = '{$ra_img}',
|
||||
ra_use = '{$ra_use}',
|
||||
ra_progress = '{$ra_progress}',
|
||||
ra_progress_max = '{$ra_progress_max}',
|
||||
ra_progress_p = '{$ra_progress_p}',
|
||||
ra_progress_m = '{$ra_progress_m}',
|
||||
ra_limit = '{$ra_limit}',
|
||||
ra_limit_day = '{$ra_limit_day}',
|
||||
ra_skin = '{$ra_skin}'";
|
||||
|
||||
if ($w == "") {
|
||||
$sql = " insert {$g5['random_dice_table']}
|
||||
set $sql_common ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "u") {
|
||||
$ra = sql_fetch("select * from {$g5['random_dice_table']} where ra_id = '{$ra_id}'");
|
||||
if(!$ra['ra_id']) {
|
||||
alert("랜덤다이스 정보가 존재하지 않습니다.");
|
||||
}
|
||||
$sql = " update {$g5['random_dice_table']}
|
||||
set $sql_common
|
||||
where ra_id = '$ra_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if($ra_id) {
|
||||
goto_url("./random_form.php?w=u&ra_id={$ra_id}");
|
||||
} else {
|
||||
goto_url("./random_list.php");
|
||||
}
|
||||
|
||||
?>
|
||||
227
Plugin/랜덤다이스/AvocadoEdition.RandomExtraDice/adm/random_list.php
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
<?php
|
||||
$sub_menu = "600200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['random_dice_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "ra_id";
|
||||
$sod = "desc";
|
||||
}
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_search}
|
||||
{$sql_order}
|
||||
limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '랜덤주사위 관리';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$colspan = 13;
|
||||
|
||||
|
||||
$now_board = "";
|
||||
$search_board_sql = " select bo_table, bo_subject from {$g5['board_table']} where bo_type = 'mmb' order by bo_subject asc ";
|
||||
$search_board = sql_query($search_board_sql);
|
||||
$board_select_option = array();
|
||||
for($i=0; $row=sql_fetch_array($search_board); $i++) {
|
||||
$board_select_option[] = $row;
|
||||
}
|
||||
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">랜덤주사위 목록</a></li>
|
||||
<li><a href="#anc_002">랜덤주사위 등록</a></li>
|
||||
</ul>';
|
||||
|
||||
?>
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">랜덤주사위 목록</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
전체 <?php echo number_format($total_count) ?> 건
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./random_form.php" id="bo_add">랜덤주사위 추가</a>
|
||||
</div>
|
||||
|
||||
<form name="fclasslist" id="fclasslist" method="post" action="./random_list_delete.php" onsubmit="return fclasslist_submit(this);" enctype="multipart/form-data">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 120px;"/>
|
||||
<col />
|
||||
<col style="width: 120px;"/>
|
||||
<col style="width: 80px;"/>
|
||||
<col style="width: 100px;"/>
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 100px;" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">랜덤주사위 내역 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col">IDX</th>
|
||||
<th scope="col">게시판IDX</th>
|
||||
<th scope="col">랜덤주사위명</th>
|
||||
<th scope="col">등록현황</th>
|
||||
<th scope="col" colspan="2">굴림제한</th>
|
||||
<th scope="col">상태바 사용</th>
|
||||
<th scope="col">최대</th>
|
||||
<th scope="col">추가</th>
|
||||
<th scope="col">감소</th>
|
||||
<th scope="col">사용여부</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td style="text-align: center">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ra_id[<?php echo $i ?>]" value="<?php echo $row['ra_id'] ?>" id="ra_id_<?php echo $i ?>" readonly style="width: 30px;">
|
||||
</td>
|
||||
<td>
|
||||
<select name="bo_table[<?php echo $i ?>]" style="width:100%;">
|
||||
<? for($j=0; $j < count($board_select_option); $j++) { ?>
|
||||
<option value="<?=$board_select_option[$j]['bo_table']?>" <?=$row['bo_table'] == $board_select_option[$j]['bo_table'] ? "selected" : ""?>>
|
||||
<?=$board_select_option[$j]['bo_subject']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ra_title[<?php echo $i ?>]" value="<?php echo $row['ra_title'] ?>" class="frm_input" style="width: 98%;">
|
||||
</td>
|
||||
|
||||
<td style="text-align: center">
|
||||
<?
|
||||
$images = nl2br($row['ra_img']);
|
||||
$img_list = explode('<br />', $images);
|
||||
$add_str = '';
|
||||
|
||||
if(count($img_list) > 1) { echo "이미지 <span style='color:red'>".count($img_list)."</span>건 "; $add_str = " / ";}
|
||||
|
||||
$texts = nl2br($row['ra_text']);
|
||||
$text_list = explode('<br />', $texts);
|
||||
|
||||
if(count($text_list) > 1) { echo $add_str."텍스트 <span style='color:red'>".count($text_list)."</span>건 ";}
|
||||
?>
|
||||
</td>
|
||||
<td style="border-right-width:0; padding-right:0;">
|
||||
<input type="text" name="ra_limit[<?php echo $i ?>]" value="<?php echo $row['ra_limit'] ?>" class="frm_input" style="width: 40px; text-align:center;"> 회
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="ra_limit_day_<?=$i?>" name="ra_limit_day[<?=$i?>]" value="1" <?=($row['ra_limit_day'] ? "checked" : "")?>> <label for="ra_limit_day_<?=$i?>">1일초기화</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="ra_progress[<?=$i?>]" value="1" <?=($row['ra_progress'] ? "checked" : "")?>>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_max[<?php echo $i ?>]" value="<?php echo $row['ra_progress_max'] ?>" class="frm_input" style="width: 98%;">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_p[<?php echo $i ?>]" value="<?php echo $row['ra_progress_p'] ?>" class="frm_input" style="width: 98%;">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ra_progress_m[<?php echo $i ?>]" value="<?php echo $row['ra_progress_m'] ?>" class="frm_input" style="width: 98%;">
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="ra_use[<?=$i?>]" value="1" <?=($row['ra_use'] ? "checked" : "")?>>
|
||||
</td>
|
||||
<td>
|
||||
<a href="./random_form.php?ra_id=<?=$row['ra_id']?>&w=u">내용수정</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||
</section>
|
||||
|
||||
|
||||
<script>
|
||||
function fclasslist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
$sub_menu = '600200';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
$sql_common = "";
|
||||
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$si = sql_fetch("select * from {$g5['random_dice_table']} where ra_id = '{$_POST['ra_id'][$k]}'");
|
||||
|
||||
if (!$si['ra_id']) {
|
||||
$msg .= $si['ra_id'].' : 기존 자료가 존재하지 않습니다.\\n';
|
||||
} else {
|
||||
$sql = " update {$g5['random_dice_table']}
|
||||
set ra_title = '{$_POST['ra_title'][$k]}',
|
||||
bo_table = '{$_POST['bo_table'][$k]}',
|
||||
ra_progress = '{$_POST['ra_progress'][$k]}',
|
||||
ra_progress_max = '{$_POST['ra_progress_max'][$k]}',
|
||||
ra_progress_m = '{$_POST['ra_progress_m'][$k]}',
|
||||
ra_progress_p = '{$_POST['ra_progress_p'][$k]}',
|
||||
ra_limit = '{$_POST['ra_limit'][$k]}',
|
||||
ra_limit_day = '{$_POST['ra_limit_day'][$k]}',
|
||||
ra_use = '{$_POST['ra_use'][$k]}'";
|
||||
|
||||
$sql .= " where ra_id = '{$_POST['ra_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// 랜덤다이스 내역삭제
|
||||
$sql = " delete from {$g5['random_dice_table']} where ra_id = '{$_POST['ra_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
alert($msg);
|
||||
goto_url('./random_list.php?'.$qstr);
|
||||
?>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
$sub_menu = "600200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
check_token();
|
||||
|
||||
$sql = " insert into {$g5['random_table']}
|
||||
set ra_title = '{$_POST['ra_title']}',
|
||||
ra_img = '{$_POST['ra_img']}',
|
||||
ra_text = '{$_POST['ra_text']}',
|
||||
ra_use = '{$_POST['ra_use']}'";
|
||||
|
||||
sql_query($sql);
|
||||
|
||||
|
||||
goto_url('./random_list.php?'.$qstr);
|
||||
?>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 랜덤 테이블값 추가
|
||||
$g5['random_dice_table'] = G5_TABLE_PREFIX.'random_dice';
|
||||
$g5['random_dice_log_table'] = G5_TABLE_PREFIX.'random_dice_log';
|
||||
|
||||
// 랜덤 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['random_dice_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['random_dice_table']}` (
|
||||
`ra_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`bo_table` varchar(255) NOT NULL default '',
|
||||
`ra_title` varchar(255) NOT NULL default '',
|
||||
`ra_text` text NOT NULL,
|
||||
`ra_img` text NOT NULL,
|
||||
`ra_use` int(11) NOT NULL default '0',
|
||||
`ra_progress` int(11) NOT NULL default '0',
|
||||
`ra_progress_title` varchar(255) NOT NULL default '',
|
||||
`ra_progress_max` int(11) NOT NULL default '0',
|
||||
`ra_progress_p` int(11) NOT NULL default '0',
|
||||
`ra_progress_m` int(11) NOT NULL default '0',
|
||||
`ra_limit` int(11) NOT NULL default '0',
|
||||
`ra_limit_day` int(11) NOT NULL default '0',
|
||||
`ra_skin` varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (`ra_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 랜덤 로그 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['random_dice_log_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['random_dice_log_table']}` (
|
||||
`rl_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ra_id` int(11) NOT NULL DEFAULT '0',
|
||||
`bo_table` varchar(11) NOT NULL DEFAULT '',
|
||||
`wr_id` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(11) NOT NULL DEFAULT '',
|
||||
`ch_id` int(11) NOT NULL DEFAULT '0',
|
||||
`rl_text` TEXT NOT NULL DEFAULT,
|
||||
`rl_img` varchar(11) NOT NULL DEFAULT '',
|
||||
`rl_date` varchar(11) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`rl_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
/**********************
|
||||
색상 설정 값
|
||||
**********************/
|
||||
|
||||
$i_color = "#C8FE2E"; // 랜덤 다이스 메세지의 <i>태그 컬러
|
||||
$em_color = "#FFD700"; // 랜덤 다이스 메세지의 <em>태그 컬러
|
||||
$strong_color = "#00FFFF"; // 랜덤 다이스 메세지의 <strong>태그 컬러
|
||||
?>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$data_log = explode("||", $data_log);
|
||||
$log_type = $data_log[0];
|
||||
$item_log = explode("||", $item_log);
|
||||
|
||||
if($log_type) {
|
||||
include($board_skin_path."/action/log.{$log_type}.skin.php");
|
||||
}
|
||||
|
||||
|
||||
if($item_log[0]) {
|
||||
/** 아이템 사용시 **/
|
||||
include($board_skin_path."/action/log.item.skin.php");
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
$random_log = $log_comment['wr_random_dice'];
|
||||
if($random_log) {
|
||||
/** 랜덤로그 사용 시 **/
|
||||
include($board_skin_path."/action/log.random.skin.php");
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
include_once('../../../common.php');
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random_message = sql_fetch("select count(*) as cnt from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
if($random_message['cnt'] > 0) {
|
||||
unset($random_message);
|
||||
$random_message = array();
|
||||
$random_result = sql_query("select * from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
|
||||
$rand_index = 0;
|
||||
for($i=0; $ra = sql_fetch_array($random_result); $i++) {
|
||||
if($ra['ra_progress']) {
|
||||
|
||||
if($ra['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
if($ra['ra_limit_day']) {
|
||||
$random_dice_log_table = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_dice_log_table = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}'");
|
||||
}
|
||||
$random_dice_log_table = $random_dice_log_table['cnt'];
|
||||
}
|
||||
|
||||
$random_skin_path = get_skin_path('random', $ra['ra_skin']);
|
||||
$random_skin_url = get_skin_url('random', $ra['ra_skin']);
|
||||
|
||||
@include_once($random_skin_path.'/random.skin.php');
|
||||
} else {
|
||||
if($ra['ra_limit'] > 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$random_message[$rand_index]['title'] = $ra['ra_title'];
|
||||
$random_message[$rand_index]['id'] = $ra['ra_id'];
|
||||
$rand_index++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
unset($random_message);
|
||||
}
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 1. S : 탐색 (성공여부, 획득아이템 ID, 획득아이템이름, 인벤 ID)
|
||||
?>
|
||||
|
||||
<div class="log-item-box data-S">
|
||||
|
||||
<? if($data_log[1] == 'S') { ?>
|
||||
<em>
|
||||
<img src="<?=get_item_img($data_log[2])?>" />
|
||||
</em>
|
||||
<p>
|
||||
<span><strong><?=$data_log[3]?></strong><?=j($data_log[3], '을')?> 제작했습니다!</span>
|
||||
</p>
|
||||
<? } else { ?>
|
||||
<em></em>
|
||||
<p>
|
||||
제작에 실패하였습니다.
|
||||
</p>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 1. S : 탐색 (성공여부, 획득아이템 ID, 획득아이템이름, 인벤 ID)
|
||||
?>
|
||||
|
||||
<div class="log-item-box data-S">
|
||||
|
||||
<? if($data_log[1] == 'S') { ?>
|
||||
<em>
|
||||
<img src="<?=get_item_img($data_log[2])?>" />
|
||||
</em>
|
||||
<p>
|
||||
<span>탐색하여 <strong><?=$data_log[3]?></strong><?=j($data_log[3], '을')?> 획득했습니다!</span>
|
||||
</p>
|
||||
<? } else { ?>
|
||||
<em></em>
|
||||
<p>
|
||||
탐색했지만 아무것도 얻지 못했습니다.
|
||||
</p>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 아이템 ID / 이름 / 기능 / 값 / 내용 / 효능
|
||||
?>
|
||||
|
||||
<? if($item_log[0] == 'D') {
|
||||
// 일반 템 사용
|
||||
IF($item_log[1]) {
|
||||
?>
|
||||
<div class="log-item-box data-item">
|
||||
<em>
|
||||
<img src="<?=get_item_img($item_log[1])?>" />
|
||||
</em>
|
||||
<p>
|
||||
<span><strong><?=$item_log[2]?></strong><?=j($item_log[2], '을')?> 사용했습니다! (<?=$item_log[6]?>)</span>
|
||||
</p>
|
||||
</div>
|
||||
<? } } else if($item_log[0] == 'S') {
|
||||
// 뽑기 획득에 성공
|
||||
?>
|
||||
<div class="log-item-box data-item">
|
||||
<em>
|
||||
<img src="<?=get_item_img($item_log[3])?>" />
|
||||
</em>
|
||||
<p>
|
||||
<span><strong><?=$item_log[2]?></strong><?=j($item_log[2], '을')?> 사용해서 <strong><?=$item_log[4]?></strong><?=j($item_log[4], '을')?> 획득하였습니다!</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<? } else {
|
||||
// 뽑기 획득에 실패
|
||||
?>
|
||||
<div class="log-item-box data-item">
|
||||
<em></em>
|
||||
<p>
|
||||
<span><strong><?=$item_log[2]?></strong><?=j($item_log[2], '을')?> 사용했지만 <strong>아무것도 획득하지 못했습니다</strong>...</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$random_data = explode("||", $random_log);
|
||||
|
||||
?>
|
||||
|
||||
<? if(!$random_data[1]) { ?>
|
||||
<div class="theme-box txt-center" style="margin-bottom:15px;">
|
||||
<div>
|
||||
<img src="<?=$random_data[0]?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? } else {
|
||||
// 색상 변경하는 코드
|
||||
$random_data[1] = str_replace("<i>", "<i style='color:{$i_color}';>", $random_data[1]);
|
||||
$random_data[1] = str_replace("<em>", "<em style='color:{$em_color}';>", $random_data[1]);
|
||||
$random_data[1] = str_replace("<strong>", "<strong style='color:{$strong_color}';>", $random_data[1]);
|
||||
|
||||
?>
|
||||
<div class="theme-box txt-center" style="margin-bottom:15px;">
|
||||
<? if($random_data[0]) { ?>
|
||||
<div class="thumb">
|
||||
<img src="<?=$random_data[0]?>" />
|
||||
</div>
|
||||
<? } ?>
|
||||
<? if($random_data[1]) { ?>
|
||||
<div>
|
||||
<?=$random_data[1]?>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
include_once('../../../../common.php');
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
if($is_member) {
|
||||
$is_favorite = sql_fetch("select ms_id from {$g5['scrap_table']} where mb_id = '{$mb_id}' and wr_id = '{$wr_id}' and bo_table = '{$bo_table}'");
|
||||
|
||||
if($is_favorite['ms_id']) {
|
||||
// 즐겨찾기 내역이 이미 존재할 경우
|
||||
// 해당 내역을 제거한다.
|
||||
sql_query("delete from {$g5['scrap_table']} where ms_id = '{$is_favorite['ms_id']}'");
|
||||
echo "off";
|
||||
} else {
|
||||
// 즐겨찾기 내역 추가
|
||||
sql_query(" insert {$g5['scrap_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', ms_datetime = '".G5_TIME_YMDHIS."' ");
|
||||
echo "on";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&'.$qstr.'&#log_'.$write['wr_parent']);
|
||||
?>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?
|
||||
include_once('./_common.php');
|
||||
include_once('../../../head.sub.php');
|
||||
|
||||
// 이모티콘 목록 불러오기
|
||||
$sql = "select * from {$g5['emoticon_table']}";
|
||||
$result = sql_query($sql);
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_CSS_URL.'/style.emoticon.css">', 0);
|
||||
?>
|
||||
|
||||
<div id="emoticon_page">
|
||||
<div id="emoticon_head"></div>
|
||||
<div id="page_title">
|
||||
이모티콘
|
||||
<i id="emoticon_line"></i>
|
||||
</div>
|
||||
|
||||
<div id="emoticon_content">
|
||||
<ul>
|
||||
<? for($i=0; $row = sql_fetch_array($result); $i++) { ?>
|
||||
<li>
|
||||
<em>
|
||||
<img src="<?=G5_URL?><?=$row['me_img']?>" alt="" />
|
||||
</em>
|
||||
<span><?=$row['me_text']?></span>
|
||||
</li>
|
||||
<? }
|
||||
if($i == 0) {
|
||||
?>
|
||||
<li class="no-data">
|
||||
등록된 이모티콘이 없습니다.
|
||||
</li>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="emoticon_footer"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<? include_once('../../../tail.sub.php'); ?>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
|
@ -0,0 +1,103 @@
|
|||
// 레이아웃 셋팅 - 반응형
|
||||
fn_layout_setting();
|
||||
|
||||
// 화면 사이즈가 변경 될 시, 레이아웃 셋팅 실행
|
||||
window.onresize = function() { fn_layout_setting(); };
|
||||
|
||||
// 즐겨찾기 추가 - Ajax
|
||||
$('a[data-function="favorite"]').on('click', function() {
|
||||
var formData = new FormData();
|
||||
var idx = $(this).data('idx');
|
||||
var obj = $(this);
|
||||
formData.append("wr_id", idx);
|
||||
formData.append("bo_table", g5_bo_table);
|
||||
formData.append("mb_id", avo_mb_id);
|
||||
|
||||
$.ajax({
|
||||
url:avo_board_skin_url + '/ajax/add_favorite.php'
|
||||
, data: formData
|
||||
, processData: false
|
||||
, contentType: false
|
||||
, type: 'POST'
|
||||
, success: function(data){
|
||||
if(data == 'on') {
|
||||
obj.removeClass('on');
|
||||
obj.addClass(data);
|
||||
}else if(data == 'off') {
|
||||
obj.removeClass('on');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('a.ui-open-log').on('click', function() {
|
||||
|
||||
var obj = $(this).closest('.pic-data').children('div');
|
||||
var state = $(obj).hasClass('on');
|
||||
var original_height = $(obj).find('img').height();
|
||||
var setting_height = 470;
|
||||
|
||||
if(state){
|
||||
//닫기
|
||||
$(obj).stop().animate({height: setting_height + "px"}, 1000);
|
||||
$(obj).removeClass('on');
|
||||
$(this).text("OPEN");
|
||||
} else {
|
||||
// 열기
|
||||
$(obj).stop().animate({height: original_height + "px"}, 1000);
|
||||
$(obj).addClass('on');
|
||||
$(this).text("CLOSE");
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.ui-remove-blind').on('click', function() {
|
||||
$(this).closest('.pic-data').removeClass('ui-blind');
|
||||
$(this).fadeOut();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.send_memo').on('click', function() {
|
||||
var target = $(this).attr('href');
|
||||
window.open(target, 'memo', "width=500, height=300");
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn-search-guide').on('click', function() {
|
||||
$('#searc_keyword').toggleClass('on');
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).ready(function() {
|
||||
$('#load_log_board').css('opacity', '1.0');
|
||||
});
|
||||
|
||||
function fn_layout_setting() {
|
||||
$('#log_list > .item').each(function(){
|
||||
var log_data_width = $(this).find('.ui-pic').data('width');
|
||||
var log_width = $(this).find('.pic-data').find('img').width();
|
||||
|
||||
if(log_data_width < log_width && log_width > 300) {
|
||||
log_data_width = log_width;
|
||||
}
|
||||
|
||||
var comment_width = $('#log_list .item-inner').width() - log_data_width + 10;
|
||||
if(comment_width > 320) {
|
||||
$(this).removeClass('both');
|
||||
$(this).find('.ui-comment').css('width', comment_width - 20 + "px");
|
||||
} else {
|
||||
$(this).addClass('both');
|
||||
$(this).find('.ui-comment').css('width', "auto");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$('.new_win').on('click', function() {
|
||||
var target = $(this).attr('href');
|
||||
window.open(target, 'emoticon', "width=400, height=600");
|
||||
return false;
|
||||
});
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$update_href = $delete_href = '';
|
||||
|
||||
// 로그인중이고 자신의 글이라면 또는 관리자라면 비밀번호를 묻지 않고 바로 수정, 삭제 가능
|
||||
if (($member['mb_id'] && ($member['mb_id'] == $list_item['mb_id'])) || $is_admin) {
|
||||
|
||||
$update_href = './write.php?w=u&bo_table='.$bo_table.'&wr_id='.$list_item['wr_id'].'&page='.$page.$qstr;
|
||||
if(!$list_item['wr_log'] || $is_admin) {
|
||||
set_session('ss_delete_token', $token = uniqid(time()));
|
||||
$delete_href ='./delete.php?bo_table='.$bo_table.'&wr_id='.$list_item['wr_id'].'&token='.$token.'&page='.$page.urldecode($qstr);
|
||||
}
|
||||
}
|
||||
else if (!$list_item['mb_id']) { // 회원이 쓴 글이 아니라면
|
||||
$update_href = './password.php?w=u&bo_table='.$bo_table.'&wr_id='.$list_item['wr_id'].'&page='.$page.$qstr;
|
||||
$delete_href = './password.php?w=d&bo_table='.$bo_table.'&wr_id='.$list_item['wr_id'].'&page='.$page.$qstr;
|
||||
}
|
||||
|
||||
// 즐겨찾기 (스크랩) 여부 체크
|
||||
$is_favorite = sql_fetch("select count(*) as cnt from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' and wr_id = '{$list_item['wr_id']}' and bo_table = '{$bo_table}'");
|
||||
$is_favorite = $is_favorite['cnt'] > 0 ? true : false;
|
||||
|
||||
if($list_item['wr_type'] == 'UPLOAD') {
|
||||
// Upload 형태로 로그를 등록 하였을 때
|
||||
$thumb = get_mmb_image($bo_table, $list_item['wr_id']);
|
||||
$image_url = '<img src="'.$thumb['src'].'" />';
|
||||
$image_width = $thumb['width'];
|
||||
$image_height = $thumb['height'];
|
||||
} else if($list_item['wr_type'] == 'URL') {
|
||||
// URL 형태로 로그를 등록 하였을 때
|
||||
$image_url = '<img src="'.$list_item['wr_url'].'" />';
|
||||
$image_width = $list_item['wr_width'];
|
||||
$image_height = $list_item['wr_height'];
|
||||
}
|
||||
|
||||
$log_class = '';
|
||||
$blind_class ='';
|
||||
$h_class = '';
|
||||
|
||||
// 멤버공개 데이터일 시
|
||||
$is_viewer = true;
|
||||
$data_width = 300;
|
||||
$no_member_class = '';
|
||||
|
||||
if($list_item['wr_secret'] == '1' && !$is_member) {
|
||||
$is_viewer = false;
|
||||
$no_member_class = ' empty ';
|
||||
} else {
|
||||
$data_width = $image_width < 300 ? 300 : $image_width;
|
||||
}
|
||||
|
||||
if($is_viewer) {
|
||||
|
||||
// 접기 여부 설정
|
||||
if($board['bo_gallery_height'] && ($image_height >= $board['bo_gallery_height'] || $list_item['wr_plip'] == '1')) {
|
||||
if(G5_IS_MOBILE) {
|
||||
$log_class .= "ui-slide-mobile";
|
||||
if($list_item['wr_type'] == 'UPLOAD') {
|
||||
$thumb = get_list_thumbnail($bo_table, $list_item['wr_id'], $image_width, 200, true, true);
|
||||
$ori = explode("/", $thumb['ori']);
|
||||
$ori = $ori[count($ori) -1];
|
||||
$image_url = '<a href="'.G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($ori).'" target="_blank" class="view_image">';
|
||||
$image_url .= '<img src="'.$thumb['src'].'" '.$attr.'>';
|
||||
$image_url .= '</a>';
|
||||
$image_width = $thumb['width'];
|
||||
$image_height = $thumb['height'];
|
||||
} else if($list_item['wr_type'] == 'URL') {
|
||||
$image_url = '<a href="'.$list_item['wr_url'].'" target="_blank" class="view_image">';
|
||||
$image_url .= '<img src="'.$list_item['wr_url'].'" '.$attr.'>';
|
||||
$image_url .= '</a>';
|
||||
}
|
||||
} else {
|
||||
$log_class .= "ui-slide";
|
||||
}
|
||||
}
|
||||
// 블라인드 (19금 필터링) 여부 설정
|
||||
if($list_item['wr_adult'] == '1') {
|
||||
$blind_class = "ui-blind";
|
||||
}
|
||||
// 리플 아래로 내리기 여부 설정
|
||||
if($list_item['wr_wide'] == '1') {
|
||||
$h_class = "ui-wrap";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 알람 내역이 있을 경우, 확인으로체크
|
||||
sql_query("update {$g5['call_table']} set bc_check = 1 where re_mb_id = '{$member['mb_id']}' and bo_table ='{$bo_table}' and wr_id = '{$list_item['wr_id']}'");
|
||||
?>
|
||||
|
||||
<div class="item <?=$h_class?>" id="log_<?=$list_item['wr_id']?>">
|
||||
<div class="item-inner">
|
||||
<!-- 로그 이미지 출력 부분 -->
|
||||
<div class="ui-pic <?=$no_member_class?>" data-width="<?=$data_width?>">
|
||||
|
||||
<!-- 로그 상단 영역 -->
|
||||
<div class="pic-header">
|
||||
<p class="no">
|
||||
|
||||
<? // 로그 넘버링 출력 ?>
|
||||
No. <?=($list_item['wr_num'] * -1)?>
|
||||
|
||||
<? if($list_item['ca_name']){
|
||||
// 카테고리 출력
|
||||
?>
|
||||
<span data-category="<?=$list_item['ca_name']?>" class="ico-category">
|
||||
<?=$list_item['ca_name']?>
|
||||
</span>
|
||||
<? } ?>
|
||||
<? if($list_item['wr_adult']) {
|
||||
// 19금 필터링 마크
|
||||
?>
|
||||
<span style="color:#d3393d;">■</span>
|
||||
<? } ?>
|
||||
</p>
|
||||
|
||||
<? if($is_viewer) {
|
||||
// 보기 권한이 존재 할 경우 (멤버의 경우)
|
||||
// -- 버튼 영역 출력
|
||||
if ($delete_href) { ?><a href="<?php echo $delete_href ?>" class="del" onclick="del(this.href); return false;">삭제</a><? } ?>
|
||||
<a href="?bo_table=<?=$bo_table?>&log=<?=$list_item['wr_num'] * -1?>&single=Y" target="_blank" class="new">로그링크</a>
|
||||
<? if($is_member) { ?><a href="#" data-idx='<?=$list_item['wr_id']?>' data-function="favorite" class="fav <?=$is_favorite ? "on" : ""?>">관심</a><? } ?>
|
||||
<? if ($update_href) { ?><a href="<?php echo $update_href ?>" class="mod">수정</a><? } ?>
|
||||
<? } ?>
|
||||
</div>
|
||||
<!-- // 로그 상단 영역 -->
|
||||
|
||||
<!-- 로그 이미지 -->
|
||||
<div class="pic-data <?=$log_class?> <?=!$member['mb_adult'] ? $blind_class : ""?>">
|
||||
<? if(!$is_viewer) {
|
||||
// 비공개 이미지
|
||||
?>
|
||||
<div>
|
||||
<img src="<?=$board_skin_url?>/img/img_lock.png" alt="비공개" />
|
||||
</div>
|
||||
<? } else { ?>
|
||||
|
||||
<? if($image_url) { ?>
|
||||
<div data-height="<?=$image_height?>">
|
||||
<?=$image_url?>
|
||||
</div>
|
||||
<? if($log_class && !G5_IS_MOBILE) {
|
||||
// 접기 기능 (펼치기)
|
||||
?>
|
||||
<a href="#" class="ui-open-log ui-btn">OPEN</a>
|
||||
<? } ?>
|
||||
<? if($blind_class) {
|
||||
// 블라인드 (19금 필터링)
|
||||
?>
|
||||
<a href="#" class="ui-remove-blind"><span>해당 로그는 필터 된 로그 입니다.<br />확인을 원하실 경우 클릭해주세요.</span></a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
||||
<? } ?>
|
||||
</div>
|
||||
<!-- // 로그 상단 영역 -->
|
||||
|
||||
</div>
|
||||
<!-- // 로그 이미지 출력 부분 -->
|
||||
|
||||
<!-- 로그 코멘트 출력 부분 -->
|
||||
<div class="ui-comment">
|
||||
<? if($is_viewer) { ?>
|
||||
<div class="item-comment-box">
|
||||
<? include($board_skin_path."/view_comment.php");?>
|
||||
</div>
|
||||
<div class="item-comment-form-box">
|
||||
<? include($board_skin_path."/write_comment.php");?>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
멤버 공개용 로그 입니다.
|
||||
<? } ?>
|
||||
</div>
|
||||
<!-- // 로그 코멘트 출력 부분 -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,363 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
||||
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";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$owner_front = get_style('mmb_owner_name', 'cs_etc_2'); // 자기 로그 접두문자
|
||||
$owner_front = $owner_front['cs_etc_2'];
|
||||
$owner_behind = get_style('mmb_owner_name', 'cs_etc_3'); // 자기 로그 접미문자
|
||||
$owner_behind = $owner_behind['cs_etc_3'];
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
|
||||
|
||||
<!-- 자비란 상단 공지 부분 -->
|
||||
<? if($board['bo_content_head']) { ?>
|
||||
<div class="board-notice">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
include($board_skin_path.'/_random.progress.php');
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<?
|
||||
/*-------------------------------------------
|
||||
동접자 카운터 설정
|
||||
---------------------------------------------*/
|
||||
$wiget = get_style('mmb_counter');
|
||||
if($wiget['cs_value']) { echo '<div class="connect-wiget">'.$wiget['cs_value'].'</div>'; }
|
||||
?>
|
||||
|
||||
<!-- 공지사항 한줄 롤링 -->
|
||||
<div class="marquee mmb-notice">
|
||||
<span><i><?=$config['cf_10']?></i></span>
|
||||
</div>
|
||||
<!-- // 공지사항 한줄 롤링 -->
|
||||
|
||||
<!-- 게시판 카테고리 시작 { -->
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="navi_category">
|
||||
<ul>
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 카테고리 끝 -->
|
||||
|
||||
<div class="ui-mmb-button">
|
||||
<?php if ($write_href) {
|
||||
// 췩 사용 여부를 체크 한다.
|
||||
if($board['bo_use_chick']) { // 췩 사용 가능할 경우, 파일 업로드 폼을 생성한다.
|
||||
$write['wr_subject'] = '--|UPLOADING|--';
|
||||
|
||||
$upload_action_url = G5_BBS_URL."/write_update.php";
|
||||
?>
|
||||
<div class="ui-mmb-list-write">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $upload_action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="redirect" value="1">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_content" value="" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
|
||||
<? if(!$is_member) { ?>
|
||||
<fieldset class="guest-box">
|
||||
<div class="name">
|
||||
<label>이름</label>
|
||||
<input type="text" name="wr_name" value="방문자" />
|
||||
</div>
|
||||
<div class="pw">
|
||||
<label>비밀번호</label>
|
||||
<input type="password" name="wr_password" value="" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
|
||||
<div class="upload-box">
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
|
||||
<fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">업로드</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</span>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기</label>
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script>
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
}
|
||||
function fwrite_submit(f) {
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<a href="<?php echo $write_href ?>" class="ui-btn point small">등록하기</a>
|
||||
<? } } ?>
|
||||
<a href="<?php echo $list_href ?>" class="ui-btn small">새로고침</a>
|
||||
<a href="<?php echo $board_skin_url ?>/emoticon_list.php" class="ui-btn small new_win">이모티콘</a>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($write_pages) { ?><div class="ui-paging"><?php echo $write_pages; ?></div><? } ?>
|
||||
|
||||
|
||||
<!-- 리스트 시작 -->
|
||||
<div id="log_list" class="none-trans">
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$list_item = $list[$i];
|
||||
include($board_skin_path."/list.log.skin.php");
|
||||
}
|
||||
if (count($list) == 0) { echo "<div class=\"empty_list\">등록된 로그가 없습니다.</div>"; }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<? if($write_pages) { ?>
|
||||
<div class="ui-paging">
|
||||
<?php echo $write_pages; ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="searc-sub-box">
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<input type="hidden" name="hash" value="<?=$hash?>">
|
||||
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category select-box">
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject,1"<?php echo get_selected($sfl, 'wr_subject,1', true); ?>>캐릭터</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>코멘트</option>
|
||||
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>오너</option>
|
||||
<option value="wr_name"<?php echo get_selected($sfl, 'wr_name'); ?>>오너(코)</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" id="stx" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category">
|
||||
<span>해시태그</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="hash" value="<?=$hash?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="ui-search-box last">
|
||||
<fieldset class="sch_category">
|
||||
<span>로그번호</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="log" value="<?=$log?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var avo_mb_id = "<?=$member['mb_id']?>";
|
||||
var avo_board_skin_path = "<?=$board_skin_path?>";
|
||||
var avo_board_skin_url = "<?=$board_skin_url?>";
|
||||
|
||||
var save_before = '';
|
||||
var save_html = '';
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
set_comment_token(f);
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.wr_content.value) {
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
function comment_box(co_id, wr_id) {
|
||||
$('.modify_area').hide();
|
||||
$('.original_comment_area').show();
|
||||
|
||||
$('#c_'+co_id).find('.modify_area').show();
|
||||
$('#c_'+co_id).find('.original_comment_area').hide();
|
||||
|
||||
$('#save_co_comment_'+co_id).focus();
|
||||
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
modify_form.wr_id.value = wr_id;
|
||||
modify_form.comment_id.value = co_id;
|
||||
}
|
||||
|
||||
function modify_commnet(co_id) {
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
var wr_content = $('#save_co_comment_'+co_id).val();
|
||||
|
||||
modify_form.wr_content.value = wr_content;
|
||||
$('#frm_modify_comment').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form name="modify_comment" id="frm_modify_comment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="cu">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="comment_id" value="">
|
||||
<input type="hidden" name="wr_id" value="">
|
||||
<textarea name="wr_content" style="display: none;"></textarea>
|
||||
<button type="submit" style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
<script src="<?php echo $board_skin_url ?>/js/load.board.js"></script>
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
|
||||
.error { position:relative; text-align: center; line-height: 1.8em; padding-top: 70px; }
|
||||
.error:before { content:"\ea0e"; display:block; position: absolute; font-family: 'icon'; font-size: 50px; line-height: 50px; top: 0;left:0; right: 0; text-align: center; }
|
||||
.error .btn-group { padding: 20px 0 0; }
|
||||
|
||||
.ui-mmb-list-category { text-align: center; }
|
||||
.ui-mmb-list-category a { display: inline-block; position: relative; padding: 6px 10px; font-weight: bold; border-radius: 3px; }
|
||||
.ui-mmb-list-category a.on:before { content: "\ea10"; font-family: 'icon'; padding-right: 5px; }
|
||||
|
||||
.ui-mmb-button { text-align: center; padding-top: 10px; }
|
||||
|
||||
.help.ui-btn { width: 100%; padding: 8px; line-height: 1.2em; border-radius: 3px; }
|
||||
.ui-paging { margin-bottom:0; padding-bottom:0;}
|
||||
|
||||
|
||||
/***************************************
|
||||
List Page
|
||||
****************************************/
|
||||
|
||||
.connect-wiget { min-height: 40px; text-align: center; line-height: 40px; }
|
||||
|
||||
|
||||
/** Notice Box **/
|
||||
.board-notice { width: 264px; padding: 10px; margin: 0 auto; text-align: center; box-sizing: border-box; }
|
||||
|
||||
|
||||
/** Category List **/
|
||||
#navi_category { text-align: center; padding: 20px 0; }
|
||||
#navi_category li { display: inline-block; padding: 0 20px; }
|
||||
|
||||
|
||||
#log_list { position: relative; margin-top: 30px; }
|
||||
|
||||
#log_list .empty_list { text-align: center; line-height: 100px; }
|
||||
|
||||
#log_list .item { clear: both; margin: 0 0 35px 0; padding-bottom: 10px; }
|
||||
#log_list .item:after { content: ""; display: block; clear: both; }
|
||||
#log_list .item .ui-pic,
|
||||
#log_list .item .ui-comment { float: left; box-sizing: border-box; }
|
||||
#log_list .item .ui-comment { padding: 30px 0px 0px; margin-left: 10px; overflow: hidden; }
|
||||
#log_list .item-comment-box { overflow: hidden; }
|
||||
|
||||
#log_list .item.ui-wrap .ui-pic,
|
||||
#log_list .item.ui-wrap .ui-comment,
|
||||
#log_list .item.both .ui-pic,
|
||||
#log_list .item.both .ui-comment { float: none; clear: both; }
|
||||
#log_list .item.ui-wrap .ui-comment,
|
||||
#log_list .item.both .ui-comment { margin-left: 0px; padding-top: 20px; width: 100% !important; box-sizing: border-box; }
|
||||
|
||||
|
||||
/** Picture */
|
||||
#log_list .item .ui-pic { position: relative; min-width: 300px; }
|
||||
#log_list .item .ui-pic .pic-header { position: relative; line-height: 30px; padding: 0 10px; }
|
||||
|
||||
#log_list .item .ui-pic .pic-header .no { display: inline-block; vertical-align: middle; font-weight: bold; font-size: 14px; }
|
||||
#log_list .item .ui-pic .pic-header .del { display: inline-block; vertical-align: middle; position: relative; width: 14px; height: 14px; line-height: 14px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item .ui-pic .pic-header .del:before { content: 'X'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 14px; text-indent: 0; text-align: center; font-size: 11px; font-weight: bold;}
|
||||
#log_list .item .ui-pic .pic-header .mod { display: inline-block; float: right; vertical-align: middle; position: relative; width: 14px; height: 30px; line-height: 30px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item .ui-pic .pic-header .mod:before { content: 'M'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 30px; text-indent: 0; text-align: center; font-size: 11px; font-weight: bold;}
|
||||
#log_list .item .ui-pic .pic-header .fav { display: inline-block; float: right; vertical-align: middle; position: relative; width: 14px; height: 30px; line-height: 30px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item .ui-pic .pic-header .fav:before { content: '\e9d9'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 30px; text-indent: 0; text-align: center; font-size: 11px; font-family: 'icon'; font-weight: bold;}
|
||||
#log_list .item .ui-pic .pic-header .fav.on:before { color: yellow; }
|
||||
#log_list .item .ui-pic .pic-header .new { display: inline-block; float: right; vertical-align: middle; position: relative; width: 14px; height: 30px; line-height: 30px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item .ui-pic .pic-header .new:before { content: '\ea7e'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 30px; text-indent: 0; text-align: center; font-size: 11px; font-family: 'icon'; font-weight: bold;}
|
||||
|
||||
/* 카테고리 */
|
||||
#log_list .item .ui-pic .ico-category { font-size: 11px; font-family: 'Dotum'; font-weight: 400; }
|
||||
|
||||
#log_list .item .ui-pic .pic-data { text-align: center; }
|
||||
#log_list .item .ui-pic .pic-data.ui-blind { overflow: hidden; height: 250px; }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide > div { overflow: hidden; height: 470px; }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide > div { -webkit-transition: none; -moz-transition: none; -ms-transition: none; -o-transition: none; }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide > .ui-open-log { display: block; height: 25px; background: rgba(0, 0, 0, 0.7); text-align: center; line-height: 25px; }
|
||||
|
||||
#log_list .item .ui-pic .pic-data.ui-slide-mobile > div { overflow: hidden; height: auto; }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide-mobile > div > a { display: block; position: relative; overflow: hidden; }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide-mobile > div > a:before { content: ""; display: block; position: absolute; line-height: 300px; font-size: 18px; top: 0; left: 0; right: 0; bottom: 0; color: #fff; background: rgba(0, 0, 0, 0.5); }
|
||||
#log_list .item .ui-pic .pic-data.ui-slide-mobile > div > a:after { content: "클릭 시 원본 이미지를 확인할 수 있습니다."; display: block; position: absolute; top: 50%; left: 0; right: 0; color: #fff; transform: translateY(-50%); font-size: 15px; }
|
||||
|
||||
#log_list .item .ui-pic .pic-data .ui-remove-blind { display: block; position: absolute; top: 30px; left: 0; right: 0; bottom: 0; background: #000; overflow: hidden; text-align: center; }
|
||||
#log_list .item .ui-pic .pic-data .ui-remove-blind:before { content: ""; display: inline-block; width: 0px; height: 100%; vertical-align: middle; }
|
||||
#log_list .item .ui-pic .pic-data .ui-remove-blind span { display: inline-block; font-size: 14px; line-height: 1.5em; vertical-align: middle; color: #999; }
|
||||
|
||||
|
||||
/** Comment */
|
||||
#log_list .item-comment { position: relative; margin-bottom: 5px;; }
|
||||
#log_list .item-comment .co-header { position: relative; line-height: 30px; padding: 5px 15px 0; }
|
||||
#log_list .item-comment .co-header:after { content: ""; display: block; clear: both; }
|
||||
#log_list .item-comment .co-header p { float: left; }
|
||||
#log_list .item-comment .co-header .link { float: right; padding-right: 5px; }
|
||||
#log_list .item-comment .co-header i { display: inline-block; height: 25px; }
|
||||
#log_list .item-comment .co-header i img { max-height: 100%; }
|
||||
|
||||
#log_list .item-comment .co-content { padding: 10px 15px; line-height: 1.6em; font-family: 'Dotum'; }
|
||||
#log_list .item-comment .co-content .log_link_tag:before { content: "\e936"; font-family: 'icon'; padding-right: 5px; }
|
||||
#log_list .item-comment .co-content .member_call { padding: 0 5px; }
|
||||
#log_list .item-comment .co-content .member_call:before { content: "\e951"; font-family: 'icon'; padding-right: 3px; }
|
||||
#log_list .item-comment .co-content .other-site-link { font-weight: bold; }
|
||||
#log_list .item-comment .co-content .other-site-link:before { content: "\e9cb"; font-family: 'icon'; padding-right: 2px; }
|
||||
|
||||
#log_list .item-comment .dice { display: block; padding-bottom: 10px; }
|
||||
#log_list .item-comment .dice img { border-radius: 3px; overflow: hidden; }
|
||||
|
||||
#log_list .item-comment .link-box { display: block; padding-bottom: 10px; }
|
||||
|
||||
#log_list .item-comment .co-footer { line-height: 25px; padding: 0 15px; }
|
||||
#log_list .item-comment .co-footer:after { content: ""; display: block; clear: both; }
|
||||
#log_list .item-comment .co-footer .date { }
|
||||
|
||||
#log_list .item-comment .co-footer .del { display: inline-block; float: right; vertical-align: middle; position: relative; width: 14px; height: 30px; line-height: 30px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item-comment .co-footer .del:before { content: 'X'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 30px; text-indent: 0; text-align: center; font-size: 11px; font-weight: bold;}
|
||||
#log_list .item-comment .co-footer .mod { display: inline-block; float: right; vertical-align: middle; position: relative; width: 14px; height: 30px; line-height: 30px; overflow: hidden; text-indent: -999px; padding-left: 10px; }
|
||||
#log_list .item-comment .co-footer .mod:before { content: 'M'; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 30px; text-indent: 0; text-align: center; font-size: 11px; font-weight: bold; }
|
||||
|
||||
#log_list .item-comment-form-box { padding: 15px 0 0; }
|
||||
#log_list .bo_vc_w { position: relative; padding-right: 70px; }
|
||||
#log_list .bo_vc_w .input-comment { position: relative; margin-bottom: 5px; }
|
||||
#log_list .bo_vc_w .input-comment textarea { display: block; width: 100%; height: 80px; box-sizing: border-box; margin: 0;}
|
||||
|
||||
#log_list .bo_vc_w .btn_confirm { display: block; position: absolute; top: 0; right: 0; bottom: 0; width: 70px; }
|
||||
#log_list .bo_vc_w .btn_confirm .ui-comment-submit { display: block; width: 100%; height: 100%; }
|
||||
|
||||
#log_list .modify_area { display: none; position: relative; padding-right: 60px; }
|
||||
#log_list .modify_area textarea { display: block; width: 100%; min-height: 100px; padding: 10px; }
|
||||
#log_list .modify_area button { display: block; position: absolute; top: 0; right: 0; width: 60px; height: 100%; bottom: 0; }
|
||||
|
||||
|
||||
.log-item-box {
|
||||
position: relative;
|
||||
padding-left: 70px;
|
||||
min-height: 60px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.log-item-box em {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.log-item-box p { padding: 10px 0; }
|
||||
.log-item-box p span { display: block; }
|
||||
|
||||
|
||||
|
||||
/***************************************
|
||||
Write Page
|
||||
****************************************/
|
||||
|
||||
#bo_w { max-width: 640px; margin: 0 auto; padding: 20px 0; }
|
||||
|
||||
#bo_w dl,
|
||||
#bo_w dt,
|
||||
#bo_w dd { display: block; position: relative; margin: 0; padding: 0; }
|
||||
#bo_w dl { overflow: hidden; }
|
||||
|
||||
#bo_w label { cursor: pointer; }
|
||||
|
||||
#bo_w dt { position: absolute; top: 0; left: 0; line-height: 30px; width: 70px; padding: 5px 0; font-size: 12px; }
|
||||
#bo_w dt select { box-sizing: border-box; width:100%; font-size: 12px; }
|
||||
#bo_w dd { padding: 5px 0; min-height: 30px; line-height: 30px; margin-left: 70px; }
|
||||
#bo_w dd fieldset { display: inline-block; padding-right: 12px; }
|
||||
|
||||
#view_image + dl dt { width:100px; }
|
||||
#view_image + dl dd { margin-left:100px; }
|
||||
|
||||
#bo_w .frm_input { width: 100%; }
|
||||
#bo_w #wr_content { height: 170px; padding: 10px; }
|
||||
|
||||
|
||||
#view_image { position: relative; width: 100%; height: 330px; line-height: 330px; overflow: hidden; margin: 0 auto; text-align: center; }
|
||||
#view_image img { max-width: 100%; max-height: 330px; }
|
||||
#view_image em { display: none; position: absolute; top: 0; left: 0; right: 0; bottom: 0; line-height: 330px; text-align: center; }
|
||||
#view_image em img { width: 50px; height: 50px; }
|
||||
#view_image > span { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; line-height: 30px; text-align: center; }
|
||||
|
||||
|
||||
#board_category { text-align: center; }
|
||||
#board_category input { display: none; }
|
||||
#board_category li { display: inline-block; line-height: 31px; }
|
||||
#board_category li label { display: inline-block; cursor: pointer; padding: 0 15px;}
|
||||
#board_category input:checked + label { }
|
||||
#board_category input:checked + label:before { content: "《 "; }
|
||||
#board_category input:checked + label:after { content: " 》"; }
|
||||
|
||||
#board_action { padding-top: 15px; }
|
||||
|
||||
#load_log_board .inner { padding: 0 30px 0; }
|
||||
@media all and (max-width: 640px) {
|
||||
#load_log_board .inner { padding: 0 0 0; }
|
||||
}
|
||||
|
||||
.comment-data { display: none; padding: 10px 0 10px 20px; border-left: 1px solid #996c33; margin-left: 5px; }
|
||||
.comment-data.on { display: block; }
|
||||
.comment-data select,
|
||||
.comment-data input[type="text"] { width: 100%; box-sizing: border-box; }
|
||||
|
||||
|
||||
.ui-mmb-list-write {
|
||||
position: relative;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.ui-mmb-list-write span { display: inline-block; margin: 3px; }
|
||||
.upload-box + fieldset { padding: 10px 0; }
|
||||
.upload-box {
|
||||
position: relative;
|
||||
padding-left: 95px;
|
||||
padding-right: 80px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.upload-box select {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 95px;
|
||||
}
|
||||
.upload-box fieldset { display: block; position: relative; }
|
||||
.upload-box input[type="file"],
|
||||
.upload-box input[type="text"] { width: 100%; box-sizing: border-box; }
|
||||
.upload-box button { display: block; position: absolute; top: 0; right: 0; width: 80px; height: 30px; }
|
||||
|
||||
.guest-box { position: relative; padding-left: 50%; margin-bottom: 3px; }
|
||||
.guest-box input { width: 100%; }
|
||||
.guest-box .name { position: absolute; top: 0; left: 0; width: 50%; padding-left: 60px; box-sizing: border-box; }
|
||||
.guest-box .name label { display: block; position: absolute; top: 0; left: 0; width: 60px; line-height: 30px; }
|
||||
.guest-box .pw { position: relative; padding-left: 60px; box-sizing: border-box; }
|
||||
.guest-box .pw label { display: block; position: absolute; top: 0; left: 0; width: 60px; line-height: 30px; }
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
|
||||
$comment = array();
|
||||
|
||||
$is_comment_write = false;
|
||||
if ($member['mb_level'] >= $board['bo_comment_level'])
|
||||
$is_comment_write = true;
|
||||
|
||||
// 코멘트 출력
|
||||
//$sql = " select * from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 order by wr_comment desc, wr_comment_reply ";
|
||||
$sql = " select * from $write_table where wr_parent = '{$list_item['wr_id']}' and wr_content != '' order by wr_datetime asc ";
|
||||
$result = sql_query($sql);
|
||||
for ($c_i=0; $c_row=sql_fetch_array($result); $c_i++)
|
||||
{
|
||||
$comment[$c_i] = $c_row;
|
||||
|
||||
//$comment[$c_i]['name'] = get_sideview($c_row['mb_id'], cut_str($c_row['wr_name'], 20, ''), $c_row['wr_email'], $c_row['wr_homepage']);
|
||||
|
||||
$tmp_name = get_text(cut_str($c_row['wr_name'], $config['cf_cut_name'])); // 설정된 자리수 만큼만 이름 출력
|
||||
if ($board['bo_use_sideview'])
|
||||
$comment[$c_i]['name'] = get_sideview($c_row['mb_id'], $tmp_name, $c_row['wr_email'], $c_row['wr_homepage']);
|
||||
else
|
||||
$comment[$c_i]['name'] = '<span class="'.($c_row['mb_id']?'member':'guest').'">'.$tmp_name.'</span>';
|
||||
|
||||
|
||||
|
||||
// 공백없이 연속 입력한 문자 자르기 (way 보드 참고. way.co.kr)
|
||||
//$comment[$c_i]['content'] = eregi_replace("[^ \n<>]{130}", "\\0\n", $c_row['wr_content']);
|
||||
|
||||
$comment[$c_i]['content'] = $comment[$c_i]['content1']= '비밀글 입니다.';
|
||||
if (!strstr($c_row['wr_option'], 'secret') ||
|
||||
$is_admin ||
|
||||
($write['mb_id']==$member['mb_id'] && $member['mb_id']) ||
|
||||
($c_row['mb_id']==$member['mb_id'] && $member['mb_id'])) {
|
||||
$comment[$c_i]['content1'] = $c_row['wr_content'];
|
||||
$comment[$c_i]['content'] = conv_content($c_row['wr_content'], 0, 'wr_content');
|
||||
$comment[$c_i]['content'] = search_font($stx, $comment[$c_i]['content']);
|
||||
} else {
|
||||
$ss_name = 'ss_secret_comment_'.$bo_table.'_'.$comment[$c_i]['wr_id'];
|
||||
|
||||
if(!get_session($ss_name))
|
||||
$comment[$c_i]['content'] = '<a href="./password.php?w=sc&bo_table='.$bo_table.'&wr_id='.$comment[$c_i]['wr_id'].$qstr.'" class="s_cmt">댓글내용 확인</a>';
|
||||
else {
|
||||
$comment[$c_i]['content'] = conv_content($c_row['wr_content'], 0, 'wr_content');
|
||||
$comment[$c_i]['content'] = search_font($stx, $comment[$c_i]['content']);
|
||||
}
|
||||
}
|
||||
|
||||
$comment[$c_i]['datetime'] = substr($c_row['wr_datetime'],2,14);
|
||||
|
||||
// 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
|
||||
$comment[$c_i]['ip'] = $c_row['wr_ip'];
|
||||
if (!$is_admin)
|
||||
$comment[$c_i]['ip'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $c_row['wr_ip']);
|
||||
|
||||
$comment[$c_i]['is_reply'] = false;
|
||||
$comment[$c_i]['is_edit'] = false;
|
||||
$comment[$c_i]['is_del'] = false;
|
||||
if ($is_comment_write || $is_admin)
|
||||
{
|
||||
$token = '';
|
||||
|
||||
if ($member['mb_id'])
|
||||
{
|
||||
if ($c_row['mb_id'] == $member['mb_id'] || $is_admin)
|
||||
{
|
||||
set_session('ss_delete_comment_'.$c_row['wr_id'].'_token', $token = uniqid(time()));
|
||||
$comment[$c_i]['del_link'] = './delete_comment.php?bo_table='.$bo_table.'&comment_id='.$c_row['wr_id'].'&token='.$token.'&page='.$page.$qstr;
|
||||
$comment[$c_i]['is_edit'] = true;
|
||||
$comment[$c_i]['is_del'] = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$c_row['mb_id']) {
|
||||
$comment[$c_i]['del_link'] = './password.php?w=x&bo_table='.$bo_table.'&comment_id='.$c_row['wr_id'].'&page='.$page.$qstr;
|
||||
$comment[$c_i]['is_del'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($c_row['wr_comment_reply']) < 5)
|
||||
$comment[$c_i]['is_reply'] = true;
|
||||
}
|
||||
|
||||
// 05.05.22
|
||||
// 답변있는 코멘트는 수정, 삭제 불가
|
||||
if ($i > 0 && !$is_admin)
|
||||
{
|
||||
if ($c_row['wr_comment_reply'])
|
||||
{
|
||||
$tmp_comment_reply = substr($c_row['wr_comment_reply'], 0, strlen($c_row['wr_comment_reply']) - 1);
|
||||
if ($tmp_comment_reply == $comment[$c_i-1]['wr_comment_reply'])
|
||||
{
|
||||
$comment[$c_i-1]['is_edit'] = false;
|
||||
$comment[$c_i-1]['is_del'] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 코멘트수 제한 설정값
|
||||
if ($is_admin)
|
||||
{
|
||||
$comment_min = $comment_max = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$comment_min = (int)$board['bo_comment_min'];
|
||||
$comment_max = (int)$board['bo_comment_max'];
|
||||
}
|
||||
|
||||
//array_unshift($comment, $list_item);
|
||||
include($board_skin_path.'/view_comment.skin.php');
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
for ($index=0; $index<count($comment); $index++) {
|
||||
|
||||
$log_comment = $comment[$index];
|
||||
$comment_id = $log_comment['wr_id'];
|
||||
|
||||
$content = $log_comment['content'];
|
||||
$content = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $content);
|
||||
|
||||
if($log_comment['wr_log'] && !$is_admin) {
|
||||
// 로그 (탐색 / 조합 등의 액션 수행)의 흔적이 있을 경우
|
||||
// 관리자가 아니면 삭제 불가
|
||||
$is_delete = false;
|
||||
}
|
||||
|
||||
if($log_comment['wr_id'] != $log_comment['wr_id'] && ($log_comment['is_reply'] || $log_comment['is_edit'] || $log_comment['is_del'])) {
|
||||
// 답변, 수정, 삭제가 가능할 경우
|
||||
// 또한, 본문의 id와 코멘트의 id가 다를 경우 (같을 경우엔 로그의 상단에 있는 컨트롤을 통해 액션 수행이 가능하다)
|
||||
$query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']);
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content from $write_table where wr_id = '$indexd' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w_'.$list_item['wr_id'];
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w_'.$list_item['wr_id'];
|
||||
}
|
||||
|
||||
// 캐릭터 정보 출력
|
||||
$is_comment_owner = false;
|
||||
$comment_owner_front = ""; // 자기 로그 접두문자
|
||||
$comment_owner_behind = ""; // 자기 로그 접미문자
|
||||
|
||||
if(!$log_comment['wr_noname']) {
|
||||
if(is_file(G5_DATA_PATH."/site/ico_admin") && $config['cf_admin'] == $log_comment['mb_id']) {
|
||||
// 관리자 아이콘이 존재하고, 관리자와 작성자가 동일 할 경우
|
||||
// 관리자 아이콘을 출력한다.
|
||||
$log_comment['ch_name'] = "<img src='".G5_DATA_URL."/site/ico_admin' alt='관리자' />";
|
||||
} else {
|
||||
// 캐릭터 정보 로드
|
||||
$ch = get_character($log_comment['ch_id']);
|
||||
if($ch['ch_id']) {
|
||||
// 캐릭터 정보가 존재할 경우, 캐릭터 정보를 추가한다.
|
||||
// 캐릭터 링크
|
||||
// + 캐릭터 소속 아이콘
|
||||
// + 캐릭터 종족 아이콘
|
||||
// + 캐릭터 이름
|
||||
/*$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side']).get_class_icon($ch['ch_class'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($log_comment['wr_subject'] ? $log_comment['wr_subject'] : "GUEST")."
|
||||
</a>";*/
|
||||
$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($ch['ch_name'] ? $ch['ch_name'] : "GUEST")."
|
||||
</a>";
|
||||
} else {
|
||||
// 캐릭터 정보가 존재하지 않을 경우, 빈값을 출력한다.
|
||||
$log_comment['ch_name'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 오너 정보 출력
|
||||
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>";
|
||||
} else {
|
||||
$log_comment['name'] = $log_comment['wr_name'];
|
||||
}
|
||||
|
||||
if(!$list_item['wr_noname'] && $list_item['mb_id'] == $log_comment['mb_id']) {
|
||||
$is_comment_owner = true;
|
||||
$comment_owner_front = $owner_front;
|
||||
$comment_owner_behind = $owner_behind;
|
||||
}
|
||||
} else {
|
||||
$is_comment_owner = false;
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<div class="item-comment" id="c_<?php echo $comment_id ?>">
|
||||
<div class="co-header">
|
||||
<? // 로그 작성자와 코멘트 작성자가 동일할 경우, class='owner' 를 추가한다. ?>
|
||||
<? if(!$log_comment['wr_noname']) { ?>
|
||||
<p <?=$is_comment_owner ? ' class="owner"' : ''?>>
|
||||
<?=$comment_owner_front?>
|
||||
<strong><?=$log_comment['ch_name']?></strong>
|
||||
<span>[<?=$log_comment['name']?>]</span>
|
||||
<?=$comment_owner_behind?>
|
||||
</p>
|
||||
<? } else { ?>
|
||||
<p>익명의 누군가</p>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="co-content">
|
||||
<div class="original_comment_area">
|
||||
<?
|
||||
// 액션 로그 정보 가져 오기
|
||||
$data_log = $log_comment['wr_log'];
|
||||
// 아이템 사용 정보 가져오기
|
||||
$item_log = $log_comment['wr_item_log'];
|
||||
|
||||
include($board_skin_path."/_action.data.php");
|
||||
|
||||
// 주사위를 굴린 정보가 있을 경우
|
||||
if($log_comment['wr_dice1']) {
|
||||
?>
|
||||
<span class="dice">
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice2']?>.png" />
|
||||
</span>
|
||||
<? }
|
||||
if($log_comment['wr_link1']) {
|
||||
// 로그 등록 시 입력한 외부 링크 정보
|
||||
?>
|
||||
<span class="link-box">
|
||||
<? if($log_comment['wr_link1']) { ?>
|
||||
<a href="<?=$log_comment['wr_link1']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
<? if($log_comment['wr_link2']) { ?>
|
||||
<a href="<?=$log_comment['wr_link2']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
</span>
|
||||
<? }
|
||||
// 코멘트 출력 부분
|
||||
$log_comment['content'] = autolink($log_comment['content'], $bo_table, $stx); // 자동 링크 및 해시태그, 로그 링크 등 컨트롤 함수
|
||||
$log_comment['content'] = emote_ev($log_comment['content']); // 이모티콘 출력 함수
|
||||
echo $log_comment['content'];
|
||||
?>
|
||||
</div>
|
||||
<? if($log_comment['is_edit']) { ?>
|
||||
<div class="modify_area" id="save_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_co_comment_<?php echo $comment_id ?>"><?php echo get_text($log_comment['content1'], 0) ?></textarea>
|
||||
<button type="button" class="mod_comment ui-btn" onclick="modify_commnet('<?php echo $comment_id ?>'); return false;">수정</button>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="co-footer">
|
||||
<span class="date">
|
||||
<?=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 } ?>
|
||||
</div>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,715 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
if($board['bo_use_chick'] && $w == '') {
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.$qstr);
|
||||
}
|
||||
|
||||
$is_error = false;
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
if ($is_notice || $is_html || $is_secret || $is_mail) {
|
||||
$option = '';
|
||||
if ($is_notice) {
|
||||
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
|
||||
}
|
||||
|
||||
if ($is_html) {
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" value="html1" name="html">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_secret) {
|
||||
if ($is_admin || $is_secret==1) {
|
||||
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
|
||||
} else {
|
||||
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_mail) {
|
||||
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
|
||||
}
|
||||
}
|
||||
|
||||
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']}'";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
// 카테고리 재정의
|
||||
$is_category = false;
|
||||
$category_option = '';
|
||||
if ($board['bo_use_category']) {
|
||||
$ca_name = "";
|
||||
if (isset($write['ca_name']))
|
||||
$ca_name = $write['ca_name'];
|
||||
|
||||
$categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음
|
||||
$category_option = "";
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$checked = '';
|
||||
$class = '';
|
||||
$category = trim($categories[$i]);
|
||||
if (!$category) continue;
|
||||
|
||||
if($i==0 && $ca_name == '') {
|
||||
$ca_name = $category;
|
||||
}
|
||||
if ($category == $ca_name) {
|
||||
$class = ' class="on"';
|
||||
$checked = 'checked';
|
||||
}
|
||||
|
||||
$category_option .= "<li $class>";
|
||||
|
||||
$category_option .= "
|
||||
<input type='radio' name='ca_name' value='{$category}' id='ca_name_{$i}' {$checked} />
|
||||
<label for='ca_name_{$i}' data-index='view_{$i}'>$category</label>
|
||||
</li>\n";
|
||||
}
|
||||
|
||||
$is_category = true;
|
||||
}
|
||||
|
||||
$image_url = $board_skin_url."/img/no_image.png";
|
||||
if($w == 'u') {
|
||||
if($write['wr_type'] == 'URL') {
|
||||
$image_url = $write['wr_url'];
|
||||
$img_data = "width : ".$write['wr_width']."px / height : ".$write['wr_height']."px";
|
||||
} else if($file[0]['file']) {
|
||||
$image_url = $file[0]['path']."/".$file[0]['file'];
|
||||
$img_data = "width : ".$file[0]['wr_width']."px / height : ".$file[0]['wr_height']."px";
|
||||
}
|
||||
|
||||
if($write['wr_subject'] == "--|UPLOADING|--") {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
} else {
|
||||
$write['wr_subject'] = $character['ch_name'];
|
||||
if(!$write['wr_subject']) $write['wr_subject'] = 'GUEST';
|
||||
}
|
||||
|
||||
$temp_sql = "select ch_thumb, mb_id, ch_id, ch_name from {$g5['character_table']} where ch_state = '승인' and ch_type != 'test' and ch_id != '{$character['ch_id']}' order by ch_type asc, ch_name asc";
|
||||
$re_ch_result = sql_query($temp_sql);
|
||||
$re_ch = array();
|
||||
for($i = 0; $row = sql_fetch_array($re_ch_result); $i++) {
|
||||
$re_ch[$i] = $row;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
<section id="bo_w" class="mmb-board">
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
<?php echo $option_hidden; ?>
|
||||
|
||||
<!-- LOG 등록 부분 -->
|
||||
<div id="view_image" class="theme-box">
|
||||
<span><?=$img_data?></span>
|
||||
<em id="view_image_loading">...LOADING...</em>
|
||||
<? if($image_url) { ?>
|
||||
<img src="<?=$image_url?>" id="prev_view_image" />
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
</dt>
|
||||
<dd>
|
||||
<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" />
|
||||
<?php if($w == 'u' && $file[0]['file']) { ?>
|
||||
<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>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="theme-box">
|
||||
<?php if ($is_category) { ?>
|
||||
<ul id="board_category">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<? if(!$write['wr_log'] && $character['ch_state']=='승인') { ?>
|
||||
<div id="board_action" class="inner">
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="action"><i class="icon act"></i>Action</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="action" id="action">
|
||||
<option value="">일반행동</option>
|
||||
<? if($is_able_search) { ?>
|
||||
<option value="S">탐색</option>
|
||||
<? } ?>
|
||||
<? if($config['cf_5']) { ?>
|
||||
<option value="H">조합</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="comment-data" id="action_Z">
|
||||
<?
|
||||
// 다이스 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt style="font-size: 12px;">다이스 개수</dt>
|
||||
<dd>
|
||||
<input type="text" name="dice_count" id="dice_count" value="" style="width: 50px;"/> 개 굴립니다.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-data" id="action_H">
|
||||
<?
|
||||
// 조합 커멘드 관련 입력
|
||||
?>
|
||||
<dl>
|
||||
<dt>ITEM 1</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 2</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>ITEM 3</dt>
|
||||
<dd>
|
||||
<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");
|
||||
for($i=0; $re_row = sql_fetch_array($re_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$re_row['in_id']?>">
|
||||
<?=$re_row['it_name']?>
|
||||
</option>
|
||||
<?
|
||||
} ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="inner">
|
||||
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
// 랜덤 다이스 값이 입력된 적이 없을 경우
|
||||
if(!$write['wr_random_dice']) {
|
||||
// 랜덤 지령 있는지 체크
|
||||
$random = sql_fetch("select count(*) as cnt from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
if($random['cnt'] > 0) {
|
||||
// 랜덤지령 리스트 뽑아오기
|
||||
$random_result = sql_query("select * from {$g5['random_dice_table']} where bo_table = '{$bo_table}' and ra_use = '1'");
|
||||
?>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Random
|
||||
</dt>
|
||||
<dd>
|
||||
<fieldset><input type="radio" name="random_game" id="random_game_0" value="" checked/> <label for="random_game_0">선택안함</label></fieldset>
|
||||
<? for($i=0; $ra = sql_fetch_array($random_result); $i++) {
|
||||
if($ra['ra_progress'] == '1') {
|
||||
if($ra['ra_progress_p'] + $ra['ra_progress_m'] >= $ra['ra_progress_max']) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if($ra['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
if($ra['ra_limit_day']) {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$ra['ra_id']}'");
|
||||
}
|
||||
$random_log = $random_log['cnt'];
|
||||
if($random_log >= $ra['ra_limit']) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<fieldset><input type="radio" name="random_game" id="random_game_<?=($i+1)?>" value="<?=$ra['ra_id']?>" /> <label for="random_game_<?=($i+1)?>"><?=$ra['ra_title']?></label></fieldset>
|
||||
<? } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<? }
|
||||
} else { ?>
|
||||
<input type="hidden" name="wr_random_dice" value="<?=$write['wr_random_dice']?>" />
|
||||
<? }
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<? if(!$write['wr_item_log'] && $character['ch_state']=='승인' && count($mmb_item) > 0) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="use_item"><i class="icon item"></i>Item</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<select name="use_item">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<?
|
||||
for($i=0; $i < count($mmb_item); $i++) { ?>
|
||||
<option value="<?=$mmb_item[$i]['in_id']?>"><?=$mmb_item[$i]['it_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<? } ?>
|
||||
<!-- 일반 커맨드 -->
|
||||
<?
|
||||
/******************************************************
|
||||
* :: 주사위의 경우, 한번 굴린 데이터가 남아 있을 시 수정 불가
|
||||
* :: 이때, 다른 카테고리의 선택을 할 수 없다.
|
||||
*******************************************************/
|
||||
?>
|
||||
<dl>
|
||||
<dt>
|
||||
<i class="icon gear"></i>Option
|
||||
</dt>
|
||||
<dd>
|
||||
<fieldset>
|
||||
<? if(!$write['wr_dice1']) { ?>
|
||||
<input type="checkbox" id="game" name="game" value="dice" /> <label for="game">일반주사위</label>
|
||||
<? } else {
|
||||
?>
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$write['wr_dice2']?>.png" />
|
||||
<? } ?>
|
||||
</fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기 (<?=$board['bo_gallery_height']?>px 이상은 자동으로 접힙니다.)</label>
|
||||
</fieldset>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<fieldset>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<?php if ($is_name) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_name">이름</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_password) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_password">비밀번호</label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="password" name="wr_password" id="wr_password" value="<?=$_COOKIE['MMB_PW']?>" class="frm_input" maxlength="20">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<label for="wr_link<?php echo $i ?>"><i class="icon link"></i>Link #<?php echo $i ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input" size="50">
|
||||
</dd>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="padding small" />
|
||||
|
||||
<div class="comments">
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<p id="char_count_desc">이 게시판은 최소 <strong><?php echo $write_min; ?></strong>글자 이상, 최대 <strong><?php echo $write_max; ?></strong>글자 이하까지 글을 쓰실 수 있습니다.</p>
|
||||
<?php } ?>
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
<!-- 최소/최대 글자 수 사용 시 -->
|
||||
<div id="char_count_wrap"><span id="char_count"></span>글자</div>
|
||||
<?php } ?>
|
||||
<p class="ui-btn help">해시태그 : #해시태그내용 / 로그링크 : @로그번호 / 멤버알람 : [[닉네임]]</p>
|
||||
</div>
|
||||
|
||||
<hr class="padding" />
|
||||
|
||||
<div class="txt-center">
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">COMMENT</button>
|
||||
<button type="button" onclick="location.href='./board.php?bo_table=<?=$bo_table?>';" class="ui-btn">LIST</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
<hr class="padding" />
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 끝 -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<?php if($write_min || $write_max) { ?>
|
||||
// 글자수 제한
|
||||
var char_min = parseInt(<?php echo $write_min; ?>); // 최소
|
||||
var char_max = parseInt(<?php echo $write_max; ?>); // 최대
|
||||
check_byte("wr_content", "char_count");
|
||||
|
||||
$(function() {
|
||||
$("#wr_content").on("keyup", function() {
|
||||
check_byte("wr_content", "char_count");
|
||||
});
|
||||
});
|
||||
<?php } ?>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "html2";
|
||||
else
|
||||
obj.value = "html1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.wr_subject.value,
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.wr_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_wr_content) != "undefined")
|
||||
ed_wr_content.returnFalse();
|
||||
else
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<? if($w == '') { ?>
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
<? } ?>
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$('.view_image_area').on('change', function() {
|
||||
var image = $(this).val();
|
||||
var type = $(this).attr('type');
|
||||
|
||||
if(type == 'file') {
|
||||
$('#wr_homepage').val('');
|
||||
previewImage(this,'view_image');
|
||||
} else {
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
checkImage(image, complete, '', 'view_image');
|
||||
}
|
||||
});
|
||||
|
||||
function reset_image(previewId) {
|
||||
var preview = document.getElementById(previewId);
|
||||
var prevImg = document.getElementById("prev_" + previewId); //이전에 미리보기가 있다면 삭제
|
||||
if (prevImg) {
|
||||
preview.removeChild(prevImg);
|
||||
}
|
||||
|
||||
$('#wr_width').val('');
|
||||
$('#wr_height').val('');
|
||||
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
|
||||
function previewImage(targetObj, previewId) {
|
||||
var preview = document.getElementById(previewId); //div id
|
||||
var ua = window.navigator.userAgent;
|
||||
var files = targetObj.files;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
for ( var i = 0; i < files.length; i++) {
|
||||
|
||||
var file = files[i];
|
||||
|
||||
var imageType = /image.*/; //이미지 파일일경우만.. 뿌려준다.
|
||||
if (!file.type.match(imageType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var img = document.createElement("img");
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
img.file = file;
|
||||
|
||||
if (window.FileReader) { // FireFox, Chrome, Opera 확인.
|
||||
var reader = new FileReader();
|
||||
reader.onloadend = (function(aImg) {
|
||||
return function(e) {
|
||||
aImg.src = e.target.result;
|
||||
complete('S', aImg.width, aImg.height);
|
||||
$('#view_image_loading').hide();
|
||||
preview.appendChild(img);
|
||||
};
|
||||
})(img);
|
||||
reader.readAsDataURL(file);
|
||||
} else { // safari is not supported FileReader
|
||||
//alert('not supported FileReader');
|
||||
if (!document.getElementById("sfr_preview_error_"
|
||||
+ previewId)) {
|
||||
var info = document.createElement("p");
|
||||
info.id = "sfr_preview_error_" + previewId;
|
||||
info.innerHTML = "not supported FileReader";
|
||||
preview.insertBefore(info, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(i > 0) {
|
||||
|
||||
//preview.style.background="none";
|
||||
} else {
|
||||
complete('F');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkImage(url, callback, timeout, previewId) {
|
||||
timeout = timeout || 5000;
|
||||
|
||||
$('#view_image_loading').show();
|
||||
|
||||
var timedOut = false, timer;
|
||||
var img = new Image();
|
||||
var preview = document.getElementById(previewId);
|
||||
|
||||
reset_image(previewId);
|
||||
|
||||
img.onerror = img.onabort = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
callback("F");
|
||||
}
|
||||
};
|
||||
img.onload = function() {
|
||||
if (!timedOut) {
|
||||
clearTimeout(timer);
|
||||
img.id = "prev_" + previewId;
|
||||
img.classList.add("obj");
|
||||
callback("S", img.width, img.height);
|
||||
preview.appendChild(img);
|
||||
$('#view_image_loading').hide();
|
||||
}
|
||||
};
|
||||
img.src = url;
|
||||
|
||||
timer = setTimeout(function() {
|
||||
timedOut = true;
|
||||
callback("F");
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function complete(message, w, h) {
|
||||
if(message == 'S') {
|
||||
$('#wr_width').val(w);
|
||||
$('#wr_height').val(h);
|
||||
$('#view_image > span').text("width : " + w + "px / height : " + h + "px");
|
||||
} else {
|
||||
$('#view_image > span').text("");
|
||||
}
|
||||
}
|
||||
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
|
||||
reset_image('view_image');
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#action').on('change', function() {
|
||||
var view_idx = $(this).val();
|
||||
$('.comment-data').removeClass('on');
|
||||
$('#action_' + view_idx).addClass('on');
|
||||
});
|
||||
|
||||
$('.change-thumb').on('change', function() {
|
||||
var select_item = $(this).find('option:selected');
|
||||
|
||||
var thumb = select_item.data('thumb');
|
||||
|
||||
if(typeof(thumb) != "undefined") {
|
||||
// 썸네일이 있는 경우
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty().append("<img src='"+thumb+"' alt='' />");
|
||||
} else {
|
||||
$(this).closest('.has-thumb').find('.ui-thumb').empty();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#fwrite select').change(function() {
|
||||
$('#fwrite select').find("option").attr('disabled', false);
|
||||
$('#fwrite select').each(function() {
|
||||
if($(this).val()) {
|
||||
$('#fwrite select').not(this).find("option[value="+ $(this).val() + "]").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<? } ?>
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($is_comment_write) {
|
||||
if($w == '') $w = 'c';
|
||||
?>
|
||||
<!-- 댓글 쓰기 시작 { -->
|
||||
<aside class="bo_vc_w" id="bo_vc_w_<?=$list_item['wr_id']?>">
|
||||
<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="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="ch_id" value="<?=$character['ch_id']?>" />
|
||||
<input type="hidden" name="ti_id" value="<?=$character['ch_title']?>" />
|
||||
<input type="hidden" name="ma_id" value="<?=$character['ma_id']?>" />
|
||||
<input type="hidden" name="wr_subject" value="<?=$character['ch_name'] ? $character['ch_name'] : "GUEST"?>" />
|
||||
|
||||
<div class="input-comment">
|
||||
<? if(count($mmb_item) > 0) { ?>
|
||||
<select name="use_item" class="full">
|
||||
<option value="">사용할 아이템 선택</option>
|
||||
<? for($h=0; $h < count($mmb_item); $h++) { ?>
|
||||
<option value="<?=$mmb_item[$h]['in_id']?>">
|
||||
<?=$mmb_item[$h]['it_name']?>
|
||||
</option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<? } ?>
|
||||
|
||||
<textarea name="wr_content" required class="required" title="내용"></textarea>
|
||||
|
||||
<div class="action-check form-input">
|
||||
<? if($character['ch_state']=='승인') { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_" value="" checked/>
|
||||
<label for="action_<?=$list_item['wr_id']?>_">일반행동 </label>
|
||||
<? if($is_able_search) { ?>
|
||||
<input type="radio" name="action" id="action_<?=$list_item['wr_id']?>_S" value="S" />
|
||||
<label for="action_<?=$list_item['wr_id']?>_S">탐색 </label>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_message && count($random_message) > 0) { ?>
|
||||
<select name="random_game" style="height:2em; box-sizing:border-box;">
|
||||
<option value="">RANDOM</option>
|
||||
<?
|
||||
for($rand_index=0; $rand_index < count($random_message); $rand_index++) {
|
||||
$ra = $random_message[$rand_index];
|
||||
?>
|
||||
<option value="<?=$ra['id']?>"><?=$ra['title']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<?
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<? } ?>
|
||||
|
||||
<input type="checkbox" name="game" id="game_<?=$list_item['wr_id']?>" value="dice" />
|
||||
<label for="game_<?=$list_item['wr_id']?>">주사위</label>
|
||||
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
|
||||
<input type="checkbox" name="wr_noname" id="wr_noname_<?=$list_item['wr_id']?>" value="1" />
|
||||
<label for="wr_noname_<?=$list_item['wr_id']?>">익명</label>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="btn_confirm">
|
||||
<button type="submit" class="ui-comment-submit ui-btn">입력</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</aside>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$it = array();
|
||||
$customer_sql = "";
|
||||
$temp_wr_id = $comment_id;
|
||||
$wr_num = $wr['wr_num'];
|
||||
if(!$wr_num) $wr_num = $comment['wr_num'];
|
||||
|
||||
include_once($board_skin_path.'/write_update.inc.php');
|
||||
|
||||
if($w != 'cu') {
|
||||
$sql = " update {$write_table}
|
||||
set wr_subject = '{$wr_subject}'
|
||||
{$customer_sql}
|
||||
where wr_id = '{$comment_id}' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
$sql = " update {$write_table}
|
||||
set wr_id = '{$comment_id}'
|
||||
{$memo_custom_sql}
|
||||
where wr_id = '{$comment_id}' ";
|
||||
sql_query($sql);
|
||||
|
||||
}
|
||||
|
||||
$original_write = sql_fetch("select mb_id, wr_subject from $write_table where wr_id = '$wr_id' ");
|
||||
|
||||
if($original_write['mb_id'] == $member['mb_id'] && ($original_write['wr_subject'] == '--|UPLOADING|--' || $original_write['wr_subject'] == '')) {
|
||||
// 췩 상태가 해제가 안되었을 때
|
||||
$sql = " update {$write_table}
|
||||
set wr_subject = '{$character['ch_name']}', wr_ing = '0', wr_datetime = '".date('Y-m-d H:i:s')."'
|
||||
where wr_id = '{$wr_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&'.$qstr.'&#c_'.$comment_id);
|
||||
?>
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$memo_custom_sql = '';
|
||||
|
||||
// ******************** 호출 관련, 호출 시 알람테이블에 기재한다. 확인은 Y / N
|
||||
// 멤버 닉네임 서칭
|
||||
// -- 치환 문자로 사용될 문자가 본문에 사용 시 지워준다. (오류 방지)
|
||||
$str = str_replace("||", "", $wr_content);
|
||||
$str = str_replace("&&", "", $str);
|
||||
|
||||
// -- 괄호를 치환한다.
|
||||
$str = str_replace("[[", "||&&", $str);
|
||||
$str = str_replace("]]", "&&", $str);
|
||||
|
||||
// explode 로 해당 문자만 추출 할 수 있도록 작업한다.
|
||||
$str = explode("||", $str);
|
||||
// -- 추출한 배열을 토대로 정규식으로 닉네임을 추출한다.
|
||||
|
||||
$call_pattern = "/&&(.*)&&/";
|
||||
$mb_nick_array = array();
|
||||
|
||||
for($i=0; $i < count($str); $i++) {
|
||||
preg_match_all($call_pattern, $str[$i], $matches);
|
||||
if($matches[1]) {
|
||||
$mb_nick_array[] = $matches[1][0];
|
||||
}
|
||||
}
|
||||
|
||||
// 배열 중복값 처리
|
||||
$mb_nick_array = array_unique($mb_nick_array);
|
||||
|
||||
|
||||
if(count($mb_nick_array) > 0) {
|
||||
// -- 괄호를 치환한다.
|
||||
$memo = str_replace("[[", "", $wr_content);
|
||||
$memo = str_replace("]]", "", $memo);
|
||||
|
||||
for($i=0; $i < count($mb_nick_array); $i++) {
|
||||
// 회원 정보 있는지 여부 확인
|
||||
$memo_search = sql_fetch("select mb_id, mb_name from {$g5['member_table']} where mb_nick = '{$mb_nick_array[$i]}' or mb_name = '{$mb_nick_array[$i]}'");
|
||||
if($memo_search['mb_id']) {
|
||||
// 회원정보가 있을 시, 알람테이블에 저장한다.
|
||||
// 저장하기 전에 동일한 정보가 있는지 확인한다.
|
||||
// 저장정보 : wr_id / wr_num / bo_table/ mb_id / mb_name / re_mb_id / re_mb_name / ch_side / memo / bc_datetime
|
||||
|
||||
$bc_sql_common = "
|
||||
wr_id = '{$temp_wr_id}',
|
||||
wr_num = '{$wr_num}',
|
||||
bo_table = '{$bo_table}',
|
||||
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']}',
|
||||
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']}' ");
|
||||
|
||||
if($bc['bc_id']) {
|
||||
// 정보가 있을 경우
|
||||
$sql = " update {$g5['call_table']} set {$bc_sql_common} where bc_id = '{$bc['bc_id']}' ";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
// 정보가 없을 경우
|
||||
$sql = " insert into {$g5['call_table']} set {$bc_sql_common} ";
|
||||
sql_query($sql);
|
||||
|
||||
// 회원 테이블에서 알람 업데이트를 해준다.
|
||||
// 실시간 호출 알림 기능
|
||||
$log_link = G5_BBS_URL."/board.php?bo_table=".$bo_table."&log=".($wr_num * -1);
|
||||
$sql = " update {$g5['member_table']}
|
||||
set mb_board_call = '".$member['mb_nick']."',
|
||||
mb_board_link = '{$log_link}'
|
||||
where mb_id = '".$memo_search['mb_id']."' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else {
|
||||
// 회원정보가 없을 시, content 에 해당 닉네임을 블러 처리 하고
|
||||
// content 를 업데이트 한다.
|
||||
$wr_content = str_replace("[[".$mb_nick_array[$i]."]]", "[[???]]", $wr_content);
|
||||
$memo_custom_sql .= " , wr_content = '{$wr_content}' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
// ******************** 호출 관련, 호출 시 해당 멤버에게 쪽지 보내기 기능 종료
|
||||
|
||||
if($w != 'cu') {
|
||||
$customer_sql = "
|
||||
{$memo_custom_sql}
|
||||
";
|
||||
|
||||
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");
|
||||
|
||||
// 아이템 제거
|
||||
if(!$it['it_use_ever']) {
|
||||
// 영구성 아이템이 아닐 시, 사용했을 때 인벤에서 제거한다.
|
||||
delete_inventory($use_item);
|
||||
}
|
||||
|
||||
// 아이템이 뽑기 아이템의 경우
|
||||
if($it['it_type'] == '뽑기') {
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 템 검색 시작
|
||||
$item_result = sql_fetch("
|
||||
select re_it_id as it_id
|
||||
from {$g5['explorer_table']}
|
||||
where it_id = '".$it['it_id']."'
|
||||
and (ie_per_s <= '{$seed}' and ie_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
limit 0, 1
|
||||
");
|
||||
|
||||
if($item_result['it_id']) {
|
||||
// 아이템 획득에 성공한 경우, 해당 아이템을 인벤토리에 삽입
|
||||
// 아이템 획득에 성공 시
|
||||
$item_result['it_name'] = get_item_name($item_result['it_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'];
|
||||
}
|
||||
} else {
|
||||
// 일반 아이템의 경우, 기본 사용 로그를 반환한다.
|
||||
$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}'";
|
||||
|
||||
}
|
||||
|
||||
if($game == "dice") {
|
||||
// 주사위 굴리기
|
||||
$dice1 = rand(1, 6);
|
||||
$dice2 = rand(1, 6);
|
||||
$customer_sql .= " , wr_dice1 = '{$dice1}', wr_dice2 = '{$dice2}'";
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분
|
||||
******************************************************************************************/
|
||||
if($random_game) {
|
||||
// 랜덤 게임 선택 시
|
||||
// 랜덤 지령 가져오기
|
||||
$random = sql_fetch("select * from {$g5['random_dice_table']} where ra_id = '{$random_game}'");
|
||||
$is_random_able = true;
|
||||
|
||||
if($random['ra_limit'] > 0) {
|
||||
// 다이스 굴림 횟수 확인
|
||||
|
||||
if($random['ra_limit_day']) {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$random['ra_id']}' and rl_date = '".date('Y-m-d')."'");
|
||||
} else {
|
||||
$random_log = sql_fetch("select count(rl_id) as cnt from {$g5['random_dice_log_table']} where ch_id = '{$character['ch_id']}' and ra_id = '{$random['ra_id']}'");
|
||||
}
|
||||
|
||||
$random_log = $random_log['cnt'];
|
||||
|
||||
if($random_log >= $random['ra_limit']) {
|
||||
$is_random_able = false;
|
||||
}
|
||||
}
|
||||
|
||||
if($is_random_able) {
|
||||
$rand_img = nl2br($random['ra_img']);
|
||||
$rand_img = explode('<br />', $rand_img);
|
||||
|
||||
$rand_text = nl2br($random['ra_text']);
|
||||
$rand_text = explode('<br />', $rand_text);
|
||||
|
||||
if(count($rand_text) > count($rand_img)) {
|
||||
$rand_text_seed = rand(0, count($rand_text)-1);
|
||||
} else {
|
||||
$rand_text_seed = rand(0, count($rand_img)-1);
|
||||
}
|
||||
|
||||
|
||||
if($random['ra_progress']) {
|
||||
if(strstr($rand_text[$rand_text_seed], "[")) {
|
||||
// 수치 체크하는 부분이 있을 경우
|
||||
$check_str = explode("[", $rand_text[$rand_text_seed]);
|
||||
$check_str = explode("]", $check_str[1]);
|
||||
$check_value = (int)$check_str[0];
|
||||
|
||||
if($check_value > 0) {
|
||||
$random['ra_progress_p'] = $random['ra_progress_p'] + $check_value;
|
||||
sql_query("
|
||||
update {$g5['random_dice_table']}
|
||||
set ra_progress_p = '{$random['ra_progress_p']}'
|
||||
where ra_id = '{$random_game}'
|
||||
");
|
||||
} else {
|
||||
$random['ra_progress_m'] = $random['ra_progress_m'] + $check_value;
|
||||
sql_query("
|
||||
update {$g5['random_dice_table']}
|
||||
set ra_progress_m = '{$random['ra_progress_m']}'
|
||||
where ra_id = '{$random_game}'
|
||||
");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(strstr($rand_text[$rand_text_seed], "{")) {
|
||||
// 아이템 획득 부분이 있을 경우
|
||||
$check_str = explode("{", $rand_text[$rand_text_seed]);
|
||||
$check_str = explode("}", $check_str[1]);
|
||||
$check_value = sql_fetch("select * from {$g5['item_table']} where it_name = '{$check_str[0]}' order by rand() limit 0, 1");
|
||||
|
||||
if($check_value['it_id']) {
|
||||
insert_inventory($character['ch_id'], $check_value['it_id'], $check_value);
|
||||
}
|
||||
}
|
||||
|
||||
$rand_img_origi = "";
|
||||
$rand_text_origi = "";
|
||||
|
||||
if(count($rand_img)-1 >= $rand_text_seed) {
|
||||
$rand_img_origi = $rand_img[$rand_text_seed];
|
||||
}
|
||||
if(count($rand_text)-1 >= $rand_text_seed) {
|
||||
$rand_text_origi = $rand_text[$rand_text_seed];
|
||||
}
|
||||
|
||||
if ($rand_text_origi) {
|
||||
$rand_text_origi = substr(trim($rand_text_origi),0,65536);
|
||||
$rand_text_origi = preg_replace("#[\\\]+$#", "", $rand_text_origi);
|
||||
}
|
||||
|
||||
$customer_sql .= " , wr_random_dice = '".$rand_img_origi."||".$rand_text_origi."' ";
|
||||
|
||||
$log_sql = " insert into {$g5['random_dice_log_table']}
|
||||
set ra_id = '{$random['ra_id']}',
|
||||
ch_id = '{$character['ch_id']}',
|
||||
bo_table = '{$bo_table}',
|
||||
wr_id = '{$wr_id}',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
rl_text = '{$rand_text_origi}',
|
||||
rl_img = '{$rand_img_origi}',
|
||||
rl_date = '".date('Y-m-d')."'";
|
||||
sql_query($log_sql);
|
||||
|
||||
} else {
|
||||
$customer_sql .= " , wr_random_dice = '||※ 가능 횟수가 초과되었습니다.' ";
|
||||
}
|
||||
|
||||
// 랜덤 다이스 필드가 존재하지 않을 경우
|
||||
if(!sql_query(" SELECT wr_random_dice from {$write_table} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE {$write_table} ADD `wr_random_dice` TEXT NOT NULL AFTER `wr_10` ");
|
||||
}
|
||||
}
|
||||
/******************************************************************************************
|
||||
RANDOM DICE 추가부분 종료
|
||||
******************************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
$log = "";
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 탐색 : 아이템 사용 없이 행위만으로 아이템 획득 가능
|
||||
// - 아이템 획득 제한 체크 필요
|
||||
//----------------------------------------------------------
|
||||
if($action == 'S') {
|
||||
|
||||
if($character['ch_search'] < $config['cf_search_count']) {
|
||||
// 탐색 횟수가 하루탐색 횟수를 초과하지 않은 경우
|
||||
// 주사위 굴리기
|
||||
$seed = rand(0, 100);
|
||||
|
||||
// 나온 숫자의 구간에 해당하는 아이템 중, 하나를 선택한다.
|
||||
$item_result = sql_fetch("
|
||||
select it_id, it_name
|
||||
from {$g5['item_table']}
|
||||
where
|
||||
it_use = 'Y'
|
||||
and it_seeker = '1'
|
||||
and (it_seeker_per_s <= '{$seed}' and it_seeker_per_e >= '{$seed}')
|
||||
order by RAND()
|
||||
limit 0, 1
|
||||
");
|
||||
|
||||
if($item_result['it_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";
|
||||
}
|
||||
|
||||
// 탐색 횟수 업데이트
|
||||
sql_query("
|
||||
update {$g5['character_table']}
|
||||
set ch_search = ch_search + 1,
|
||||
ch_search_date = '".G5_TIME_YMD."'
|
||||
where ch_id = '{$character['ch_id']}'
|
||||
");
|
||||
|
||||
$character['ch_search'] = $character['ch_search'] + 1;
|
||||
$customer_sql .= " , wr_log = '{$log}' ";
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
// 조합
|
||||
//----------------------------------------------------------
|
||||
if($action == 'H') {
|
||||
// 재료 정보 : make_1, make_2, 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'];
|
||||
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']) {
|
||||
// 레시피 조합 실패
|
||||
$log = $action."||F||NON||NON||".$re_item_order;
|
||||
} else {
|
||||
// 레시피 조합 성공
|
||||
$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}' ";
|
||||
|
||||
if(!$make_1['it_use_ever']) { delete_inventory($make_1['in_id']); }
|
||||
if(!$make_2['it_use_ever']) { delete_inventory($make_2['in_id']); }
|
||||
if(!$make_3['it_use_ever']) { delete_inventory($make_3['in_id']); }
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
$it = array();
|
||||
$customer_sql = "";
|
||||
$temp_wr_id = $wr_id;
|
||||
if(!$wr_num) $wr_num = $write['wr_num'];
|
||||
|
||||
if($w == '') {
|
||||
if($board['bo_use_chick']) {
|
||||
// 신규 글 작성이고, 췩이 가능한 게시판일 경우
|
||||
// -- wr_ing 값에 1을 입력한다.
|
||||
// -- 글 등록이 완료 된 이후에는 wr_ing 값을 2로 돌린다.
|
||||
|
||||
// -- wr_ing : 0 - 췩 불가
|
||||
// -- wr_ing : 1 - 췩 가능, 글 작성 중
|
||||
|
||||
$write['wr_ing'] = 1;
|
||||
|
||||
$sql = " update {$write_table}
|
||||
set wr_id = '{$wr_id}',
|
||||
wr_ing = '1'
|
||||
where wr_id = '{$wr_id}' ";
|
||||
sql_query($sql);
|
||||
setcookie('MMB_PW', $_POST['wr_password']);
|
||||
?>
|
||||
<!-- 바로 글 수정페이지로 이동 -->
|
||||
<html>
|
||||
<body>
|
||||
<form name="fboardpassword" id="fboardpassword" action="./write.php" method="post">
|
||||
<input type="hidden" name="w" value="u">
|
||||
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
|
||||
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
|
||||
<input type="hidden" name="wr_password" value="<?=$_POST['wr_password']?>">
|
||||
<button type="submit"></button>
|
||||
</form>
|
||||
<script>document.getElementById('fboardpassword').submit();</script>
|
||||
</body>
|
||||
</html>
|
||||
<?
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($write['wr_ing'] != '1' || $w == 'u') {
|
||||
|
||||
// 췩이 아니거나 글이 수정하고 난 뒤일때
|
||||
setcookie('MMB_PW', '');
|
||||
include_once($board_skin_path.'/write_update.inc.php');
|
||||
|
||||
if($write['wr_ing'] == '1') {
|
||||
// 췩 당하는 중인 글일 경우
|
||||
$customer_sql .= " , wr_ing = 0, wr_datetime = '".date('Y-m-d H:i:s')."' ";
|
||||
$write['wr_ing'] = 0;
|
||||
}
|
||||
|
||||
//$customer_sql .= " , wr_ing = 0 ";
|
||||
$sql = " update {$write_table}
|
||||
set wr_id = '{$wr_id}'
|
||||
{$customer_sql}
|
||||
where wr_id = '{$wr_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if($write['wr_ing'] == '1') {
|
||||
$sql = " update {$write_table}
|
||||
set wr_ing = '0'
|
||||
where wr_id = '{$wr_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($file_upload_msg) {
|
||||
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table);
|
||||
} else {
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.$qstr."#log_".$wr_id);
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$random_skin_url.'/style.css">', 0);
|
||||
|
||||
$max = $ra['ra_progress_max'];
|
||||
$now = $ra['ra_progress_p'] + $ra['ra_progress_m'];
|
||||
$result_count = $max_value - $now;
|
||||
$per = $now > 0 ? ($now/$max*100) : 0;
|
||||
|
||||
?>
|
||||
|
||||
<div class="basic-progress-box">
|
||||
<div class="basic-title">
|
||||
<?=$ra['ra_progress_title']?>
|
||||
</div>
|
||||
|
||||
<? if($ra['ra_limit']) { ?>
|
||||
<div class="able-counter">
|
||||
<?=($ra['ra_limit'] - $random_log)?> / <?=$ra['ra_limit']?>
|
||||
</div>
|
||||
<? } ?>
|
||||
<div class="progress-bar" title="<?=$now?>/<?=$max?>">
|
||||
<span style="width:<?=$per?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.basic-progress-box {display:block; position:relative; margin:10px auto; text-align:center;}
|
||||
.basic-progress-box .basic-title {font-size:25px; line-height:1.4;}
|
||||
.basic-progress-box .basic-title span {display:block; font-size:14px;}
|
||||
.basic-progress-box .able-counter {margin:10px 0;}
|
||||
|
||||
.basic-progress-box .progress-bar {display:block; position:relative; margin:15px 0; height:6px; background:rgba(0,0,0,.1); border:1px solid #000;}
|
||||
.basic-progress-box .progress-bar > span {display:block; position:absolute; top:0; left:0; bottom:0; background:#00aa7b;}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$random_skin_url.'/style.css">', 0);
|
||||
|
||||
$max = $ra['ra_progress_max'];
|
||||
$now = $ra['ra_progress_p'] + $ra['ra_progress_m'];
|
||||
$result_count = $max_value - $now;
|
||||
$per = $now > 0 ? ($now/$max*100) : 0;
|
||||
$per = 100 - $per;
|
||||
|
||||
?>
|
||||
|
||||
<div class="raid-progress-box">
|
||||
<div class="raid-title">
|
||||
<?=$ra['ra_progress_title']?>
|
||||
</div>
|
||||
|
||||
<? if($ra['ra_limit']) { ?>
|
||||
<div class="able-counter">
|
||||
<?=($ra['ra_limit'] - $random_log)?> / <?=$ra['ra_limit']?>
|
||||
</div>
|
||||
<? } ?>
|
||||
<div class="progress-bar" title="<?=$now?>/<?=$max?>">
|
||||
<span style="width:<?=$per?>%"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.raid-progress-box {display:block; position:relative; margin:10px auto; text-align:center;}
|
||||
.raid-progress-box .raid-title {font-size:25px; line-height:1.4;}
|
||||
.raid-progress-box .raid-title span {display:block; font-size:14px;}
|
||||
.raid-progress-box .able-counter {margin:10px 0;}
|
||||
|
||||
.raid-progress-box .progress-bar {display:block; position:relative; margin:15px 0; height:6px; background:rgba(0,0,0,.1); border:1px solid #000;}
|
||||
.raid-progress-box .progress-bar > span {display:block; position:absolute; top:0; left:0; bottom:0; background:#ff2c2c;}
|
||||
37
Plugin/미궁/AvocadoEdition.maze/README.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
|
||||
/*
|
||||
캐릭터 프로필 페이지 (view.ing.pgp) 에 적용 시
|
||||
$mb['mb_maze'] 를 사용하면 되고
|
||||
|
||||
현재 로그인 중인 계정에 대해 미궁 진행도를 표기하고 싶을 땐
|
||||
$mb['mb_maze']를 -> $member['mb_maze']로 변경하여 를 사용하면 된다.
|
||||
|
||||
* 캐릭터가 생성된 계정에 대해서만 랭킹 기록이 보관된다.
|
||||
|
||||
*/
|
||||
|
||||
$maze_count = sql_fetch("select count(*) as cnt from {$g5['maze_table']}");
|
||||
$maze_count = $maze_count['cnt'];
|
||||
$ma = sql_fetch("select ma_subject, ma_order from {$g5['maze_table']} where ma_id = '{$mb['mb_maze']}'");
|
||||
$ma_count = sql_fetch("select count(*) as cnt from {$g5['maze_table']} where ma_order <= '{$ma['ma_order']}' and ma_id != '{$mb['mb_maze']}'");
|
||||
$ma_count = $ma_count['cnt'];
|
||||
$ma_per = $ma_count == 0 ? 0 : $ma_count / $maze_count * 100;
|
||||
|
||||
/* 진행률 그래프 출력 예시
|
||||
<dl>
|
||||
<dt>Maze</dt>
|
||||
<dd>
|
||||
<p>
|
||||
<i><?=$ma['ma_subject'] ? $ma['ma_subject']." 진행중" : "..."?></i>
|
||||
<span style="width: <?=$ma_per?>%;"></span>
|
||||
<sup style="width: <?=$ma_per?>%;"></sup>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
*/
|
||||
?>
|
||||
|
||||
<p>미궁 - <?=$ma['ma_subject']?> 진행중</p>
|
||||
8
Plugin/미궁/AvocadoEdition.maze/adm/admin.menu600.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu600'] = array (
|
||||
array('600000', '미궁관리', ''.G5_ADMIN_URL.'/maze_list.php', ''),
|
||||
array('600100', '미궁관리', ''.G5_ADMIN_URL.'/maze_list.php', '')
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
48
Plugin/미궁/AvocadoEdition.maze/adm/maze.db.sql
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
-- phpMyAdmin SQL Dump
|
||||
-- version 3.5.8.1
|
||||
-- http://www.phpmyadmin.net
|
||||
--
|
||||
-- 호스트: localhost:3307
|
||||
-- 처리한 시간: 17-12-15 14:29
|
||||
-- 서버 버전: 5.1.73-log
|
||||
-- PHP 버전: 5.2.17
|
||||
|
||||
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
--
|
||||
-- 데이터베이스: `aphopis`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 테이블 구조 `avo_maze`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `avo_maze` (
|
||||
`ma_id` int(11) NOT NULL auto_increment,
|
||||
`ma_subject` varchar(255) NOT NULL,
|
||||
`ma_content` text NOT NULL,
|
||||
`ma_answer` varchar(255) NOT NULL default '',
|
||||
`ma_btn_prev` varchar(255) NOT NULL default '',
|
||||
`ma_btn_next` varchar(255) NOT NULL default '',
|
||||
`ma_background` varchar(255) NOT NULL default '',
|
||||
`ma_order` int(11) NOT NULL default '0',
|
||||
`ma_rank_1` int(11) NOT NULL default '0',
|
||||
`ma_rank_2` int(11) NOT NULL default '0' default '0',
|
||||
`ma_rank_3` int(11) NOT NULL default '0',
|
||||
`ma_rank_4` int(11) NOT NULL default '0',
|
||||
`ma_rank_5` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`ma_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- 테이블의 덤프 데이터 `avo_maze`
|
||||
--
|
||||
121
Plugin/미궁/AvocadoEdition.maze/adm/maze_form.php
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
$sub_menu = '600600';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$html_title = "미궁";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
$readonly = " readonly";
|
||||
|
||||
$sql = " select * from {$g5['maze_table']} where ma_id = '$ma_id' ";
|
||||
$ma = sql_fetch($sql);
|
||||
if (!$ma['ma_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$ma['ma_order'] = 0;
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmcontentform" action="./maze_formupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="ma_id" value="<?=$ma['ma_id']?>">
|
||||
<input type="hidden" name="token" value="">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 50px;">
|
||||
<col style="width: 100px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_subject">제목</label></th>
|
||||
<td colspan="2"><input type="text" name="ma_subject" value="<?php echo htmlspecialchars2($ma['ma_subject']); ?>" id="ma_subject" required class="frm_input required" size="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td colspan="2"><?php echo editor_html('ma_content', get_text($ma['ma_content'], 0)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_answer">정답</label></th>
|
||||
<td colspan="2" colspan="2"><input type="text" name="ma_answer" value="<?php echo htmlspecialchars2($ma['ma_answer']); ?>" id="ma_answer" class="frm_input" size="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">이전버튼</th>
|
||||
<td>
|
||||
직접등록 <input type="file" name="ma_btn_prev_file" value="" size="50">
|
||||
</td></tr><tr>
|
||||
<td>
|
||||
외부경로 <input type="text" name="ma_btn_prev" value="<?=$ma['ma_btn_prev']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">다음버튼</th>
|
||||
<td>
|
||||
직접등록 <input type="file" name="ma_btn_next_file" value="" size="50">
|
||||
</td></tr><tr>
|
||||
<td>
|
||||
외부경로 <input type="text" name="ma_btn_next" value="<?=$ma['ma_btn_next']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">배경이미지</th>
|
||||
<td>
|
||||
직접등록 <input type="file" name="ma_background_file" value="" size="50">
|
||||
</td></tr><tr>
|
||||
<td>
|
||||
외부경로 <input type="text" name="ma_background" value="<?=$ma['ma_background']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_order">순서</label></th>
|
||||
<td colspan="2"><input type="text" name="ma_order" value="<?php echo $ma['ma_order']; ?>" id="ma_order" required class="frm_input required" size="10"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./maze_list.php">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmcontentform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
<?php echo get_editor_js('ma_content'); ?>
|
||||
<?php echo chk_editor_js('ma_content'); ?>
|
||||
|
||||
check_field(f.ma_subject, "제목을 입력하세요.");
|
||||
check_field(f.ma_content, "내용을 입력하세요.");
|
||||
|
||||
if (errmsg != "") {
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
108
Plugin/미궁/AvocadoEdition.maze/adm/maze_formupdate.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
$sub_menu = '600600';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$site_style_path = G5_DATA_PATH."/site";
|
||||
$site_style_url = G5_DATA_URL."/site";
|
||||
|
||||
@mkdir($site_style_path, G5_DIR_PERMISSION);
|
||||
@chmod($site_style_path, G5_DIR_PERMISSION);
|
||||
|
||||
if ($_FILES['ma_btn_prev_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['ma_btn_prev_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "maze_".time()."_prev.".$exp;
|
||||
upload_file($_FILES['ma_btn_prev_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$ma_btn_prev = $site_style_url."/".$image_name;
|
||||
}
|
||||
|
||||
if ($_FILES['ma_btn_next_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['ma_btn_next_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "maze_".time()."_next.".$exp;
|
||||
upload_file($_FILES['ma_btn_next_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$ma_btn_next = $site_style_url."/".$image_name;
|
||||
}
|
||||
|
||||
if ($_FILES['ma_background_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['ma_background_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "maze_".time()."_background.".$exp;
|
||||
upload_file($_FILES['ma_background_file']['tmp_name'], $image_name, $site_style_path);
|
||||
$ma_background = $site_style_url."/".$image_name;
|
||||
}
|
||||
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
$sql_common = " ma_subject = '$ma_subject',
|
||||
ma_content = '$ma_content',
|
||||
ma_order = '$ma_order',
|
||||
ma_answer = '$ma_answer',
|
||||
ma_background = '$ma_background',
|
||||
ma_btn_prev = '$ma_btn_prev',
|
||||
ma_btn_next = '$ma_btn_next' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
$sql = " select ma_id from {$g5['maze_table']} where ma_id = '$ma_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sql = " insert {$g5['maze_table']}
|
||||
set $sql_common ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
// 기존 데이터 호출
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} where ma_id = '{$ma_id}'");
|
||||
if($ma['ma_btn_prev'] != $ma_btn_prev && strstr($ma['ma_btn_prev'], "maze_")) {
|
||||
// 해당 서버에 업로드 한 파일일 경우
|
||||
$prev_file_path = str_replace(G5_URL, G5_PATH, $ma['ma_btn_prev']);
|
||||
@unlink($prev_file_path);
|
||||
}
|
||||
if($ma['ma_btn_next'] != $ma_btn_next && strstr($ma['ma_btn_next'], "maze_")) {
|
||||
// 해당 서버에 업로드 한 파일일 경우
|
||||
$prev_file_path = str_replace(G5_URL, G5_PATH, $ma['ma_btn_next']);
|
||||
@unlink($prev_file_path);
|
||||
}
|
||||
if($ma['ma_background'] != $ma_background && strstr($ma['ma_background'], "maze_")) {
|
||||
// 해당 서버에 업로드 한 파일일 경우
|
||||
$prev_file_path = str_replace(G5_URL, G5_PATH, $ma['ma_background']);
|
||||
@unlink($prev_file_path);
|
||||
}
|
||||
|
||||
$sql = " update {$g5['maze_table']}
|
||||
set $sql_common
|
||||
where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
$sql = " delete from {$g5['maze_table']} where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if( $error_msg ){
|
||||
alert($error_msg, "./maze_list.php");
|
||||
} else {
|
||||
goto_url("./maze_list.php");
|
||||
}
|
||||
|
||||
?>
|
||||
173
Plugin/미궁/AvocadoEdition.maze/adm/maze_list.php
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
<?php
|
||||
$sub_menu = '600600';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = '미궁관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql_common = " from {$g5['maze_table']} where ma_subject != '' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$config['cf_page_rows'] = 20;
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = "select * $sql_common order by ma_order limit $from_record, {$config['cf_page_rows']} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
|
||||
|
||||
$rank_sql_common = " from {$g5['character_table']} ch, {$g5['member_table']} mb ";
|
||||
$rank_sql_search = " where ch.ch_state = '승인' and ch.mb_id = mb.mb_id and mb.mb_maze_datetime != '000-00-00 00:00:00' ";
|
||||
$rank_sst = "mb.mb_maze_datetime asc";
|
||||
$rank_sql_order = " order by {$rank_sst} {$rank_sod} ";
|
||||
|
||||
$rank_sql = " select count(*) as cnt {$rank_sql_common} {$rank_sql_search} {$rank_sql_order} ";
|
||||
$rank_row = sql_fetch($rank_sql);
|
||||
$rank_total_count = $rank_row['cnt'];
|
||||
|
||||
$rank_rows = 10;
|
||||
$rank_total_page = ceil($rank_total_count / $rank_rows); // 전체 페이지 계산
|
||||
if ($rank_page < 1) $rank_page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$rank_from_record = ($rank_page - 1) * $rank_rows; // 시작 열을 구함
|
||||
$rank_sql = " select * {$rank_sql_common} {$rank_sql_search} {$rank_sql_order} limit {$rank_from_record}, {$rank_rows} ";
|
||||
$rank_result = sql_query($rank_sql);
|
||||
|
||||
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">미궁클리어랭킹</a></li>
|
||||
<li><a href="#anc_002">미궁내용목록</a></li>
|
||||
</ul>';
|
||||
?>
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">미궁클리어랭킹</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./maze_member_list.php">미궁 진행현황 관리</a>
|
||||
<a href="<?=G5_URL?>/maze/index.php">미궁 바로가기</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 80px;" />
|
||||
<col />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 160px;" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>랭킹</th>
|
||||
<th>이름</th>
|
||||
<th>현재위치</th>
|
||||
<th>클리어타임</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($rank_result); $i++) {
|
||||
$ch_id = $row['ch_id'];
|
||||
$ch_ma = sql_fetch("select * from {$g5['maze_table']} where ma_id = '{$row['mb_maze']}'");
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td>
|
||||
<?=($rank_rows * ($rank_page - 1)) + $i + 1?>
|
||||
</td>
|
||||
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
|
||||
<td>
|
||||
<?=$ch_ma['ma_subject']?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$row['mb_maze_datetime']?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"4\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $rank_page, $rank_total_page, '?'.$qstr.'&rank_page='); ?>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">미궁내용목록</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>">처음으로</a><?php } ?>
|
||||
<span>전체 내용 <?php echo $total_count; ?>건</span>
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./maze_form.php">미궁 추가</a>
|
||||
<a href="<?=G5_URL?>/maze/index.php">미궁 바로가기</a>
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 300px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순서</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">관리</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_id"><?php echo $row['ma_order']; ?></td>
|
||||
<td><?php echo htmlspecialchars2($row['ma_subject']); ?></td>
|
||||
<td class="td_mng">
|
||||
<a href="./maze_form.php?w=u&ma_id=<?php echo $row['ma_id']; ?>"><span class="sound_only"><?php echo htmlspecialchars2($row['ma_subject']); ?> </span>수정</a>
|
||||
<a href="./maze_formupdate.php?w=d&ma_id=<?php echo $row['ma_id']; ?>" onclick="return delete_confirm(this);"><span class="sound_only"><?php echo htmlspecialchars2($row['ma_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="4" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['SCRIPT_NAME']}?$qstr&page="); ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
181
Plugin/미궁/AvocadoEdition.maze/adm/maze_member_list.php
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
$sub_menu = "600600";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['character_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "ch_type asc";
|
||||
$sod = "";
|
||||
}
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 50;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '미궁 진행 관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 4;
|
||||
|
||||
|
||||
/** 미궁 정보 **/
|
||||
$ma_list = array();
|
||||
$ma_result = sql_query("select ma_subject, ma_id from {$g5['maze_table']} order by ma_order asc, ma_id asc");
|
||||
for($i=0; $row = sql_fetch_array($ma_result); $i++) {
|
||||
$ma_list[$i]['name'] = $row['ma_subject'];
|
||||
$ma_list[$i]['id'] = $row['ma_id'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
총캐릭터수 <?php echo number_format($total_count) ?>명
|
||||
</div>
|
||||
|
||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="ch_name"<?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>오너 아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" class="frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</form>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./maze_list.php">미궁 관리</a>
|
||||
<a href="<?=G5_URL?>/maze/index.php">미궁 바로가기</a>
|
||||
</div>
|
||||
|
||||
|
||||
<form name="fmemberlist" id="fmemberlist" action="./maze_member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 200px;" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="chkall" class="sound_only">캐릭터 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th>유형</th>
|
||||
<th>이름</th>
|
||||
|
||||
<th>미궁</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$ch_id = $row['ch_id'];
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
$mb = get_member($row['mb_id']);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td>
|
||||
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>" id="ch_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['ch_name']); ?>님</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$row['ch_type']?>
|
||||
</td>
|
||||
|
||||
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
|
||||
|
||||
<td>
|
||||
<select name="mb_maze[<?=$i?>]" style="width: 100%;">
|
||||
<option value="">미궁진행</option>
|
||||
<? for($k=0; $k < count($ma_list); $k++) { ?>
|
||||
<option value="<?=$ma_list[$k]['id']?>" <?php echo get_selected($mb['mb_maze'], $ma_list[$k]['id']); ?>><?=$ma_list[$k]['name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fmemberlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
$sub_menu = "600600";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if (!count($_POST['chk']) && $_POST['act_button'] != '일괄지급') {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
$ch = get_character($_POST['ch_id'][$k]);
|
||||
|
||||
// 미궁진행도 체크
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$_POST['mb_maze'][$k]}'
|
||||
where mb_id = '{$ch['mb_id']}'
|
||||
");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
alert($msg);
|
||||
|
||||
goto_url('./maze_member_list.php');
|
||||
?>
|
||||
13
Plugin/미궁/AvocadoEdition.maze/css/style.maze.css
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
@charset "utf-8";
|
||||
|
||||
html {background:#333 !important;}
|
||||
html:before {display:none !important;}
|
||||
|
||||
.maze-content {padding:150px 0 50px;}
|
||||
.maze-answer {text-align:center; padding-bottom:150px;}
|
||||
|
||||
.maze-answer .input {width:300px; margin:0 auto; text-align:center;}
|
||||
.maze-answer .input input {height:30px; border:none; background:#fff !important; color:#000 !important; width:150px;}
|
||||
.maze-answer .input button {display:inline-block; width:101px; height:31px; background:#000; color:#fff; border:none;}
|
||||
|
||||
.maze-answer .error {padding-top:20px; font-size:13px; color:#e15e5e;}
|
||||
36
Plugin/미궁/AvocadoEdition.maze/extend/maze.config.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 미궁 테이블값 추가
|
||||
$g5['maze_table'] = G5_TABLE_PREFIX.'maze';
|
||||
|
||||
|
||||
// 미궁 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['maze_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['maze_table']}` (
|
||||
`ma_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ma_subject` varchar(255) NOT NULL,
|
||||
`ma_content` text NOT NULL,
|
||||
`ma_answer` varchar(255) NOT NULL default '',
|
||||
`ma_btn_prev` varchar(255) NOT NULL default '',
|
||||
`ma_btn_next` varchar(255) NOT NULL default '',
|
||||
`ma_background` varchar(255) NOT NULL default '',
|
||||
`ma_order` int(11) NOT NULL default '0',
|
||||
`ma_rank_1` int(11) NOT NULL default '0',
|
||||
`ma_rank_2` int(11) NOT NULL default '0' default '0',
|
||||
`ma_rank_3` int(11) NOT NULL default '0',
|
||||
`ma_rank_4` int(11) NOT NULL default '0',
|
||||
`ma_rank_5` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`ma_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 미궁진행값이 존재하지 않을 경우
|
||||
if($is_member && !isset($member['mb_maze'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_maze` INT(11) NOT NULL DEFAULT '0' AFTER `mb_10` ");
|
||||
}
|
||||
if($is_member && !isset($member['mb_maze_datetime'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_maze_datetime` datetime NOT NULL default '0000-00-00 00:00:00' AFTER `mb_maze` ");
|
||||
}
|
||||
|
||||
?>
|
||||
3
Plugin/미궁/AvocadoEdition.maze/maze/_common.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
include_once('../common.php');
|
||||
?>
|
||||
4
Plugin/미궁/AvocadoEdition.maze/maze/_head.sub.php
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
4
Plugin/미궁/AvocadoEdition.maze/maze/_tail.sub.php
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
42
Plugin/미궁/AvocadoEdition.maze/maze/check_answer.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!$answer) {
|
||||
echo "답을 입력해 주시길 바랍니다.";
|
||||
exit;
|
||||
}
|
||||
|
||||
// 현재 미궁 정보 가져오기
|
||||
if($member['mb_maze']) {
|
||||
// 이전에 미궁을 진입한 기록이 있다면
|
||||
// 이전 미궁 정보를 가져 온다.
|
||||
$ma_id = $member['mb_maze'];
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} where ma_id = '{$ma_id}'");
|
||||
} else {
|
||||
// 첫번재 미궁 IDX 정보를 가져온다
|
||||
// 멤버 정보 업데이트
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} order by ma_order asc limit 0, 1");
|
||||
$ma_id = $ma['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$ma_id}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
}
|
||||
|
||||
if($ma['ma_answer'] == $answer) {
|
||||
// 정답일 경우
|
||||
$result = sql_fetch("select ma_id from {$g5['maze_table']} where ma_order >= '{$ma['ma_order']}' and ma_id != '{$ma_id}' order by ma_order asc, ma_id asc limit 0, 1");
|
||||
$result = $result['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$result}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
echo "Y";
|
||||
} else {
|
||||
// 오답일 경우
|
||||
echo "답이 아닙니다.";
|
||||
}
|
||||
|
||||
?>
|
||||
51
Plugin/미궁/AvocadoEdition.maze/maze/check_move.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if(!$dir) {
|
||||
echo "잘못된 데이터입니다.";
|
||||
exit;
|
||||
}
|
||||
|
||||
// 현재 미궁 정보 가져오기
|
||||
if($member['mb_maze']) {
|
||||
// 이전에 미궁을 진입한 기록이 있다면
|
||||
// 이전 미궁 정보를 가져 온다.
|
||||
$ma_id = $member['mb_maze'];
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} where ma_id = '{$ma_id}'");
|
||||
} else {
|
||||
// 첫번재 미궁 IDX 정보를 가져온다
|
||||
// 멤버 정보 업데이트
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} order by ma_order asc limit 0, 1");
|
||||
$ma_id = $ma['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$ma_id}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
}
|
||||
|
||||
if($dir == 'prev' && $ma['ma_btn_prev']) {
|
||||
// 이전 페이지일 경우
|
||||
// 그냥 바로 이전 페이지로 이동
|
||||
$result = sql_fetch("select ma_id from {$g5['maze_table']} where ma_order <= '{$ma['ma_order']}' and ma_id != '{$ma_id}' order by ma_order desc, ma_id desc limit 0, 1");
|
||||
$result = $result['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$result}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
echo "Y";
|
||||
} else if($dir == 'next' && $ma['ma_btn_next']) {
|
||||
$result = sql_fetch("select ma_id from {$g5['maze_table']} where ma_order >= '{$ma['ma_order']}' and ma_id != '{$ma_id}' order by ma_order asc, ma_id asc limit 0, 1");
|
||||
$result = $result['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$result}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
echo "Y";
|
||||
} else {
|
||||
echo "잘못된 데이터입니다.";
|
||||
}
|
||||
|
||||
?>
|
||||
139
Plugin/미궁/AvocadoEdition.maze/maze/index.php
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if($member['mb_maze']) {
|
||||
// 이전에 미궁을 진입한 기록이 있다면
|
||||
// 이전 미궁 정보를 가져 온다.
|
||||
$ma_id = $member['mb_maze'];
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} where ma_id = '{$ma_id}'");
|
||||
} else {
|
||||
// 첫번재 미궁 IDX 정보를 가져온다
|
||||
// 멤버 정보 업데이트
|
||||
$ma = sql_fetch("select * from {$g5['maze_table']} order by ma_order asc limit 0, 1");
|
||||
$ma_id = $ma['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze = '{$ma_id}'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
}
|
||||
|
||||
|
||||
// 다음 페이지가 있는지 체크
|
||||
// 다음 페이지가 없다면, 랭킹 순위 입력
|
||||
$naxe_ma = sql_fetch("select ma_id from {$g5['maze_table']} where ma_order >= '{$ma['ma_order']}' and ma_id != '{$ma_id}' order by ma_order asc, ma_id asc limit 0, 1");
|
||||
$naxe_ma = $naxe_ma['ma_id'];
|
||||
if(!$naxe_ma) {
|
||||
// 클리어 타임 기록
|
||||
sql_query("
|
||||
update {$g5['member_table']}
|
||||
set mb_maze_datetime = '".date('Y-m-d H:i:s')."'
|
||||
where mb_id = '{$member['mb_id']}'
|
||||
");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$g5['title'] = "미궁 ".$ma['ma_subject'];
|
||||
include_once('./_head.sub.php');
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_CSS_URL.'/style.maze.css">', 0);
|
||||
|
||||
if($ma['ma_background']) {
|
||||
add_stylesheet("<style>html { background: url('{$ma['ma_background']}') no-repeat 50% 50% #000 !important; background-size: contain; }</style>", 10);
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="maze_page">
|
||||
<div class="maze-content">
|
||||
<?=conv_content($ma['ma_content'], 1, 0);?>
|
||||
<script>
|
||||
$('.maze-content img').attr('title', '');
|
||||
$('html, body').animate({scrollTop: 0 }, '100');
|
||||
</script>
|
||||
</div>
|
||||
<div class="maze-answer">
|
||||
|
||||
<? if($ma['ma_answer']) { ?>
|
||||
<fieldset class="input">
|
||||
<input type="text" name="answer" id="answer" value="" />
|
||||
<button type="button" onclick="fn_maze_check();">정답제출</button>
|
||||
</fieldset>
|
||||
<p class="error"></p>
|
||||
<script>
|
||||
$('#answer').on('keypress', function(event) {
|
||||
if(event.keyCode==13) {
|
||||
fn_maze_check();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function fn_maze_check() {
|
||||
var formData = new FormData();
|
||||
var answer = $('#answer').val();
|
||||
formData.append("answer", answer);
|
||||
|
||||
$.ajax({
|
||||
url:g5_url+'/maze/check_answer.php'
|
||||
, data: formData
|
||||
, processData: false
|
||||
, contentType: false
|
||||
, type: 'POST'
|
||||
, success: function(data){
|
||||
|
||||
if(data == 'Y') {
|
||||
location.reload(true);
|
||||
} else {
|
||||
$('.maze-answer > .error').text(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<? } ?>
|
||||
|
||||
<? if($ma['ma_btn_prev']) { ?>
|
||||
<a href="javascript:fn_move_maze('prev');">
|
||||
<img src="<?=$ma['ma_btn_prev']?>" alt="이전페이지" />
|
||||
</a>
|
||||
<? } ?>
|
||||
<? if($ma['ma_btn_next']) { ?>
|
||||
<a href="javascript:fn_move_maze('next');">
|
||||
<img src="<?=$ma['ma_btn_next']?>" alt="이전페이지" />
|
||||
</a>
|
||||
<? } ?>
|
||||
<? if($ma['ma_btn_prev'] || $ma['ma_btn_next']) { ?>
|
||||
<script>
|
||||
function fn_move_maze(dir) {
|
||||
var formData = new FormData();
|
||||
var dir = dir;
|
||||
formData.append("dir", dir);
|
||||
|
||||
$.ajax({
|
||||
url:g5_url+'/maze/check_move.php'
|
||||
, data: formData
|
||||
, processData: false
|
||||
, contentType: false
|
||||
, type: 'POST'
|
||||
, success: function(data){
|
||||
if(data == 'Y') {
|
||||
location.reload(true);
|
||||
} else {
|
||||
$('.maze-answer > .error').text(data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
</script>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include_once('./_tail.sub.php');
|
||||
?>
|
||||
|
||||
33
Plugin/지역관리/AvocadoEdition.MapManager/README.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
** Avocado Edition Map Manager 설치 방법 안내 **
|
||||
|
||||
1. 압축을 푼 해당 폴더들을 아보카도 에디션이 설치 된 계정으로 업로드 합니다.
|
||||
|
||||
※ 주의사항
|
||||
* 기존에 커스텀이 진행 된 경우 파일이 겹치지 않도록 반드시 확인해 주시길바랍니다.
|
||||
: 기존에 admin.menu600.php 파일을 수정한 경우, 내부의 숫자들을 변경하거나 해당 링크를 기존에 작업한 파일에 추가해 주시길 바랍니다.
|
||||
: skin/mmb 경로의 자비란 파일에 대해 커스텀을 진행한 경우, 업로드 된 파일들을 열어 추가된 위치이동 커맨드 부분을 따로 기존 파일에 옮겨 주시길 바랍니다.
|
||||
: 해당 플러그인은 변경된 파일들만이 올라가 있습니다.
|
||||
: 자비란 폴더명을 다른것을 사용할 경우 해당 폴더명으로 mmb 폴더를 변경한 이후에 업로드해 주시길 바랍니다.
|
||||
|
||||
|
||||
2. 관리자에 접속 후 플러그인관리 > 지역 관리 메뉴를 확인합니다.
|
||||
|
||||
3. 지역 정보를 입력합니다.
|
||||
: 지역 정보 입력 후, LIST 에서 지도 위에 해당 구역 위치정보를 입력하게 됩니다.
|
||||
: 지도에 출력하지 않을 시, 해당 부분은 입력하지 않아도 무방합니다. ( X : X좌표, Y : Y좌표, W : 영역의 가로 사이즈, Y : 영역의 세로사이즈)
|
||||
: 통행 설정 시, 해당 위치에서 이동을 제한할 수 있습니다. 아무것도 설정하지 않을 시 이동이 불가능합니다.
|
||||
: 이벤트 설정 시, 해당 지역에 위치 했을 때 발생할 이벤트를 설정할 수 있습니다. 각각 기본이벤트 / 다른 지역 이동 이벤트 / 화폐 획득 이벤트 / 몬스터 공격 이벤트가 있습니다.
|
||||
|
||||
4. 사용 설정 완료 후, 캐릭터 위치관리 (지역관리 > 지역목록 보기 상단에 버튼이 있습니다) 에서 캐릭터의 최초 위치를 지정 합니다.
|
||||
|
||||
5. 자비란(mmb 스킨을 사용하는 게시판) 에서 위치 이동이 뜨는지 확인합니다.
|
||||
|
||||
|
||||
※ 주의 : 해당 플러그인과 관련된 스타일은 제공하고 있지 않습니다. (단순 텍스트 출력만 되어 있는 상태)
|
||||
※ 꾸미는 것을 원하실 시, skin/board/mmb/style.css 및 skin/board/mmb/action/log.map.... 파일의 html/CSS 수정 및 을 통해 가능합니다.
|
||||
|
||||
|
||||
copyright by.AvocadoEdition
|
||||
http://bytheallspark.cafe24.com
|
||||
@avocado_web
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
$menu['menu600'] = array (
|
||||
array('600000', '플러그인관리', ''.G5_ADMIN_URL.'', ''),
|
||||
array('600300', '지역 관리', ''.G5_ADMIN_URL.'/map_list.php', '')
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
232
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_event_form.php
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$html_title = '지역 이벤트 설정';
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
if ($w == '') {
|
||||
|
||||
$html_title .= ' 등록';
|
||||
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||
$me['me_use'] = '1';
|
||||
|
||||
} else if ($w == 'u') {
|
||||
|
||||
$html_title .= ' 수정';
|
||||
$me = sql_fetch("select * from {$g5['map_event_table']} where me_id = '{$me_id}'");
|
||||
if (!$me['me_id'])
|
||||
alert('존재하지 않는 정보 입니다.');
|
||||
$ma_id = $me['ma_id'];
|
||||
$readonly = 'readonly';
|
||||
}
|
||||
|
||||
$ma = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$ma_id}'");
|
||||
if(!$ma['ma_id']) { alert("지역정보를 확인할 수 없습니다."); }
|
||||
|
||||
|
||||
$g5['title'] = "[ ".$ma['ma_name']." ] ".$html_title;
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_001">기본 설정</a></li>
|
||||
<li><a href="#anc_002">이벤트 효과 설정</a></li>
|
||||
</ul>';
|
||||
|
||||
|
||||
$frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./map_event_list.php?ma_id='.$ma_id.'&'.$qstr.'">목록</a>'.PHP_EOL;
|
||||
$frm_submit .= '</div>';
|
||||
|
||||
$ma_sql = "select ma_id, ma_name from {$g5['map_table']} order by ma_id asc";
|
||||
$ma_result = sql_query($ma_sql);
|
||||
for($i=0; $maps = sql_fetch_array($ma_result); $i++) {
|
||||
$map[$i]['name'] = $maps['ma_name'];
|
||||
$map[$i]['id'] = $maps['ma_id'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||
?>
|
||||
|
||||
<form name="fshopform" id="fshopform" action="./map_event_form_update.php" onsubmit="return fshopform_submit(this)" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="me_id" value="<?php echo $me_id ?>">
|
||||
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<section id="anc_001">
|
||||
<h2 class="h2_frm">기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>아이템 기본 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 130px;">
|
||||
<col style="width: 80px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">이벤트명</th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="me_title" value="<?=$me['me_title']?>" />
|
||||
<input type="checkbox" name="me_use" id="me_use" value="1" <?=$me['me_use'] == '1'? "checked" : ""?>/>
|
||||
<label for="me_use">사용하기</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">이벤트타입</th>
|
||||
<td colspan="2">
|
||||
<select name="me_type">
|
||||
<option value="" <?=$me['me_type'] == '' ? 'selected' : ''?>>일반</option>
|
||||
<option value="아이템" <?=$me['me_type'] == '아이템' ? 'selected' : ''?>>아이템획득</option>
|
||||
<option value="화폐" <?=$me['me_type'] == '화폐' ? 'selected' : ''?>>화폐변동</option>
|
||||
<option value="이동" <?=$me['me_type'] == '이동' ? 'selected' : ''?>>지역이동</option>
|
||||
<option value="몬스터" <?=$me['me_type'] == '몬스터' ? 'selected' : ''?>>몬스터공격</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2">이벤트 이미지</th>
|
||||
<td rowspan="2" class="bo-right">
|
||||
<? if($me['me_img']) { ?>
|
||||
<img src="<?=$me['me_img']?>" style="max-width: 50px;">
|
||||
<? } else { ?>
|
||||
이미지 없음
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
직접등록 <input type="file" name="me_img_file" value="" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
외부경로 <input type="text" name="me_img" value="<?=$me['me_img']?>" size="50"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">이벤트텍스트</th>
|
||||
<td colspan="2">
|
||||
<textarea name="me_content"><?=$me['me_content']?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
회득 구간 설정
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("※ 100면체 주사위를 굴렸을 때 나오는 숫자 중 획득 가능 범위를 지정해 주시길 바랍니다. (0 ~ 100)<br />※ 다수의 구간이 겹칠 시,랜덤으로 획득 됩니다.") ?>
|
||||
<input type="text" name="me_per_s" value="<?php echo $me['me_per_s']; ?>" id="me_per_s" size="5" maxlength="11">
|
||||
~
|
||||
<input type="text" name="me_per_e" value="<?php echo $me['me_per_e']; ?>" id="me_per_e" size="5" maxlength="11"> 구간 획득
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">획득가능갯수설정</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("※ 총 획득 갯수를 제한합니다. 0 입력 시 제한하지 않습니다.") ?>
|
||||
<input type="text" name="me_replay_cnt" value="<?=$me['me_replay_cnt']?>" size="10"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">획득갯수설정</th>
|
||||
<td colspan="2">
|
||||
<?php echo help("※ 현재까지 멤버들이 획득한 갯수를 수정합니다.") ?>
|
||||
<input type="text" name="me_now_cnt" value="<?=$me['me_now_cnt']?>" size="10"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
<section id="anc_002">
|
||||
<h2 class="h2_frm">이벤트 효과 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>아이템 기본 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 130px;">
|
||||
<col style="width: 80px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">획득 아이템</th>
|
||||
<td colspan="2">
|
||||
<input type="hidden" name="me_get_item" id="me_get_item" value="<?=$me['me_get_item']?>" />
|
||||
<input type="text" name="it_name" value="<?=get_item_name($me['me_get_item'])?>" id="it_name" onkeyup="get_ajax_item(this, 'item_list', 'me_get_item');" />
|
||||
<div id="item_list" class="ajax-list-box"><div class="list"></div></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">화폐 변동</th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="me_get_money" value="<?=$me['me_get_money']?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">위치이동</th>
|
||||
<td colspan="2">
|
||||
<select name="me_move_map">
|
||||
<option value="">-</option>
|
||||
<? for($k=0; $k < count($map); $k++) { ?>
|
||||
<option value="<?=$map[$k]['id']?>" <?php echo get_selected($map[$k]['id'], $me['me_move_map']); ?>><?=$map[$k]['name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2">몬스터설정</th>
|
||||
<td class="bo-right">
|
||||
HP
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_mon_hp" value="<?=$me['me_mon_hp']?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bo-right">
|
||||
공격력
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_mon_attack" value="<?=$me['me_mon_attack']?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fshopform_submit(f)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == 'u') check_demo();
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
check_token();
|
||||
|
||||
|
||||
$map_data_path = G5_DATA_PATH."/map";
|
||||
$map_data_url = G5_DATA_URL."/map";
|
||||
|
||||
@mkdir($item_data_path, G5_DIR_PERMISSION);
|
||||
@chmod($item_data_path, G5_DIR_PERMISSION);
|
||||
|
||||
|
||||
|
||||
|
||||
// 보상 아이템 유효성 여부 체크
|
||||
if(!$me_get_item && $it_name) {
|
||||
$it = sql_fetch("select it_id from {$g5['item_table']} where it_name = '{$it_name}'");
|
||||
$me_get_item = $it['it_id'];
|
||||
if(!$it['it_id']) {
|
||||
alert("진열 아이템으로 등록되는 아이템의 정보가 없습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($img = $_FILES['me_img_file']['name']) {
|
||||
// 확장자 따기
|
||||
$exp = explode(".", $_FILES['me_img_file']['name']);
|
||||
$exp = $exp[count($exp)-1];
|
||||
|
||||
$image_name = "ma_event_".time()."_img.".$exp;
|
||||
upload_file($_FILES['me_img_file']['tmp_name'], $image_name, $map_data_path);
|
||||
$me_img = $map_data_url."/".$image_name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql_common = "
|
||||
ma_id = '{$ma_id}',
|
||||
me_type = '{$me_type}',
|
||||
me_title = '{$me_title}',
|
||||
me_img = '{$me_img}',
|
||||
me_content = '{$me_content}',
|
||||
me_get_item = '{$me_get_item}',
|
||||
me_get_money = '{$me_get_money}',
|
||||
me_move_map = '{$me_move_map}',
|
||||
me_get_hp = '{$me_get_hp}',
|
||||
me_mon_hp = '{$me_mon_hp}',
|
||||
me_mon_attack = '{$me_mon_attack}',
|
||||
me_per_s = '{$me_per_s}',
|
||||
me_per_e = '{$me_per_e}',
|
||||
me_replay_cnt = '{$me_replay_cnt}',
|
||||
me_now_cnt = '{$me_now_cnt}',
|
||||
me_use = '{$me_use}'
|
||||
";
|
||||
|
||||
|
||||
|
||||
|
||||
if($w == '') {
|
||||
$sql = " insert into {$g5['map_event_table']}
|
||||
set {$sql_common}";
|
||||
sql_query($sql);
|
||||
} else {
|
||||
$me = sql_fetch("select me_id from {$g5['map_event_table']} where me_id = '{$me_id}'");
|
||||
|
||||
if(!$me['me_id']) {
|
||||
alert("이벤트 정보가 존재하지 않습니다.");
|
||||
}
|
||||
|
||||
$sql = " update {$g5['map_event_table']}
|
||||
set {$sql_common}
|
||||
where me_id = '{$me_id}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./map_event_list.php?ma_id='.$ma_id.'&'.$qstr, false);
|
||||
?>
|
||||
226
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_event_list.php
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
|
||||
$ma = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$ma_id}'");
|
||||
|
||||
if(!$ma['ma_id']) {
|
||||
alert("지역정보를 확인할 수 없습니다.");
|
||||
}
|
||||
|
||||
|
||||
$sql_common = " from {$g5['map_event_table']} where ma_id = '{$ma_id}' ";
|
||||
$sql_order = " order by me_id asc";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_order}";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
|
||||
$ma_sql = "select ma_id, ma_name from {$g5['map_table']} order by ma_id asc";
|
||||
$ma_result = sql_query($ma_sql);
|
||||
for($i=0; $maps = sql_fetch_array($ma_result); $i++) {
|
||||
$map_list[$i]['name'] = $maps['ma_name'];
|
||||
$map_list[$i]['id'] = $maps['ma_id'];
|
||||
}
|
||||
|
||||
|
||||
$g5['title'] = "[ ".$ma['ma_name']." ] 지역 이벤트 관리";
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$colspan = 11;
|
||||
?>
|
||||
|
||||
<section id="anc_001">
|
||||
|
||||
<div class="local_ov01 local_ov" style="margin-top: 0;">
|
||||
<?php echo $listall ?>
|
||||
전체 <?php echo number_format($total_count) ?> 건
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./map_list.php" id="bo_add">지역관리</a>
|
||||
<a href="./map_event_form.php?ma_id=<?=$ma_id?>" id="bo_add">이벤트 추가</a>
|
||||
</div>
|
||||
|
||||
<form name="fpointlist" id="fpointlist" method="post" action="./map_event_list_update.php" onsubmit="return fpointlist_submit(this);">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 45px" />
|
||||
<col />
|
||||
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 80px;"/>
|
||||
|
||||
<col style="width: 100px;"/>
|
||||
<col style="width: 100px;"/>
|
||||
|
||||
<col style="width: 80px;"/>
|
||||
<col style="width: 80px;"/>
|
||||
|
||||
<col style="width: 80px;"/>
|
||||
<col style="width: 80px;"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2">
|
||||
<label for="chkall" class="sound_only">이벤트 정보 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th scope="col" class="bo-left bo-no-bottom">종류</th>
|
||||
|
||||
<th scope="col" rowspan="2" scope="col" class="bo-left">아이템<br />획득</th>
|
||||
<th scope="col" rowspan="2" class="bo-left">화폐변동</th>
|
||||
<th scope="col" rowspan="2" class="bo-left">이동지역</th>
|
||||
|
||||
<th scope="col" colspan="2" class="bo-left">몬스터</th>
|
||||
|
||||
|
||||
<th scope="col" colspan="2" class="bo-left">이벤트획득구간</th>
|
||||
|
||||
<th scope="col" rowspan="2" class="bo-left">사용여부</th>
|
||||
<th scope="col" rowspan="2" class="bo-left">관리</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col">이벤트명</th>
|
||||
|
||||
<th scope="col" class="bo-left">몬스터HP</th>
|
||||
<th scope="col" class="bo-left">몬스터공격력</th>
|
||||
|
||||
<th scope="col" class="bo-left">획득개수</th>
|
||||
<th scope="col" class="bo-left">현재획득</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $me=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="me_id[<?php echo $i ?>]" value="<?php echo $me['me_id'] ?>" id="me_id_<?php echo $i ?>">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td>
|
||||
<select name="me_type[<?php echo $i ?>]" class="full_input">
|
||||
<option value="" <?=$me['me_type'] == '' ? 'selected' : ''?>>일반</option>
|
||||
<option value="아이템" <?=$me['me_type'] == '아이템' ? 'selected' : ''?>>아이템획득</option>
|
||||
<option value="화폐" <?=$me['me_type'] == '화폐' ? 'selected' : ''?>>화폐변동</option>
|
||||
<option value="이동" <?=$me['me_type'] == '이동' ? 'selected' : ''?>>지역이동</option>
|
||||
<option value="몬스터" <?=$me['me_type'] == '몬스터' ? 'selected' : ''?>>몬스터공격</option>
|
||||
</select>
|
||||
<input type="text" name="me_title[<?php echo $i ?>]" value="<?php echo get_text($me['me_title']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
|
||||
<td style="Text-align: center;">
|
||||
<? if($me['me_get_item']) { ?>
|
||||
<img src="<?=get_item_img($me['me_get_item'])?>" style="max-width: 50px;" />
|
||||
<? } else { ?>
|
||||
-
|
||||
<? } ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="text" name="me_get_money[<?php echo $i ?>]" value="<?php echo get_text($me['me_get_money']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<select name="me_move_map[<?php echo $i ?>]" class="frm_input full_input">
|
||||
<option value="">-</option>
|
||||
<? for($k=0; $k < count($map_list); $k++) { ?>
|
||||
<option value="<?=$map_list[$k]['id']?>" <?php echo get_selected($map_list[$k]['id'], $me['me_move_map']); ?>><?=$map_list[$k]['name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_mon_hp[<?php echo $i ?>]" value="<?php echo get_text($me['me_mon_hp']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_mon_attack[<?php echo $i ?>]" value="<?php echo get_text($me['me_mon_attack']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="text" name="me_replay_cnt[<?php echo $i ?>]" value="<?php echo get_text($me['me_replay_cnt']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="me_now_cnt[<?php echo $i ?>]" value="<?php echo get_text($me['me_now_cnt']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="checkbox" name="me_use[<?php echo $i ?>]" value="1" <?=$me['me_use'] == '1'? "checked" : ""?>/>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="./map_event_form.php?w=u&me_id=<?=$me['me_id']?>">수정</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<script>
|
||||
function fpointlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
$sub_menu = '600300';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$sql = " update {$g5['map_event_table']}
|
||||
set me_type = '{$_POST['me_type'][$k]}',
|
||||
me_title = '{$_POST['me_title'][$k]}',
|
||||
me_get_hp = '{$_POST['me_get_hp'][$k]}',
|
||||
me_get_money = '{$_POST['me_get_money'][$k]}',
|
||||
me_move_map = '{$_POST['me_move_map'][$k]}',
|
||||
me_mon_hp = '{$_POST['me_mon_hp'][$k]}',
|
||||
me_mon_attack = '{$_POST['me_mon_attack'][$k]}',
|
||||
me_replay_cnt = '{$_POST['me_replay_cnt'][$k]}',
|
||||
me_now_cnt = '{$_POST['me_now_cnt'][$k]}',
|
||||
me_use = '{$_POST['me_use'][$k]}'
|
||||
where me_id = '{$_POST['me_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$sql = " delete from {$g5['map_event_table']} where me_id = '{$_POST['me_id'][$k]}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
goto_url('./map_event_list.php?ma_id='.$ma_id.'&'.$qstr);
|
||||
|
||||
?>
|
||||
299
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_list.php
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$sql_common = " from {$g5['map_table']} ";
|
||||
$sql_order = " order by ma_parent asc, ma_id asc ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
{$sql_common}
|
||||
{$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
|
||||
$sql = " select *
|
||||
{$sql_common}
|
||||
{$sql_order}";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
|
||||
$g5['title'] = '지역 관리';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
$pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_003">지역사용설정</a></li>
|
||||
<li><a href="#anc_001">지역리스트</a></li>
|
||||
<li><a href="#anc_002">지역정보 입력</a></li>
|
||||
</ul>';
|
||||
|
||||
$colspan = 13;
|
||||
?>
|
||||
|
||||
<style>
|
||||
.full_input {width:100% !important;}
|
||||
</style>
|
||||
|
||||
<section id="anc_003" >
|
||||
<h2 class="h2_frm">지역 사용 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<form name="fmapconfiglist" method="post" id="fmapconfiglist" action="./map_update.php" autocomplete="off">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<input type="hidden" name="type" value="CONFIG">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col style="width: 100px;">
|
||||
<col style="width: 100px;">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_map">지역 기능</label></th>
|
||||
<td>
|
||||
<input type="checkbox" name="cf_use_map" value="1" id="cf_use_map" <? if($config['cf_use_map']) { ?>checked<? } ?>>
|
||||
<label for="cf_use_map">사용</label>
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<fieldset class="btn_add" style="float: none; text-align: left; margin: 0;">
|
||||
<input type="submit" value="설정" class="btn_submit" style="height: 25px; padding: 0 20px;">
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section id="anc_001">
|
||||
|
||||
<h2 class="h2_frm">지역 목록 보기</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="local_ov01 local_ov" style="margin-top: 0;">
|
||||
<?php echo $listall ?>
|
||||
전체 <?php echo number_format($total_count) ?> 건
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./map_member_list.php">캐릭터 위치 관리</a>
|
||||
</div>
|
||||
|
||||
<form name="fpointlist" id="fpointlist" method="post" action="./map_list_update.php" onsubmit="return fpointlist_submit(this);">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 45px" />
|
||||
<col style="width: 55px" />
|
||||
<col style="width: 45px" />
|
||||
<col style="width: 170px;" />
|
||||
<col style="width: 45px;" />
|
||||
<col style="width: 45px;" />
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 80px;" />
|
||||
<col style="width: 80px;"/>
|
||||
|
||||
<col style="width: 100px;"/>
|
||||
<col style="width: 100px;"/>
|
||||
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">지역정보 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th>IDX</th>
|
||||
<th scope="col" colspan="2">지역명</th>
|
||||
<th scope="col">사용</th>
|
||||
<th scope="col">시작</th>
|
||||
<th>X</th>
|
||||
<th>Y</th>
|
||||
<th>W</th>
|
||||
<th>H</th>
|
||||
<th scope="col">통행관리</th>
|
||||
<th scope="col">이벤트관리</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
$is_parent = true;
|
||||
if($row['ma_parent'] != $row['ma_id']) $is_parent = false;
|
||||
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
<td class="td_chk">
|
||||
<input type="text" name="ma_id[<?php echo $i ?>]" value="<?php echo $row['ma_id'] ?>" id="ma_id_<?php echo $i ?>" readonly class="full_input">
|
||||
</td>
|
||||
<? if(!$is_parent) { ?>
|
||||
<td>
|
||||
┗…
|
||||
</td>
|
||||
<td>
|
||||
<? } else { ?>
|
||||
<td colspan="2">
|
||||
<? } ?>
|
||||
<input type="text" name="ma_name[<?php echo $i ?>]" value="<?php echo get_text($row['ma_name']) ?>" id="ma_name_<?php echo $i ?>" required class="required frm_input full_input" size="20">
|
||||
</td>
|
||||
|
||||
<td style="Text-align: center;">
|
||||
<input type="checkbox" name="ma_use[<?php echo $i ?>]" value="1" id="ma_use_<?php echo $i ?>" <?php echo $row['ma_use']?"checked":"" ?>>
|
||||
</td>
|
||||
<td style="Text-align: center;">
|
||||
<input type="checkbox" name="ma_start[<?php echo $i ?>]" value="1" id="ma_start_<?php echo $i ?>" <?php echo $row['ma_start']?"checked":"" ?>>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<input type="text" name="ma_left[<?php echo $i ?>]" value="<?php echo get_text($row['ma_left']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ma_top[<?php echo $i ?>]" value="<?php echo get_text($row['ma_top']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ma_width[<?php echo $i ?>]" value="<?php echo get_text($row['ma_width']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="ma_height[<?php echo $i ?>]" value="<?php echo get_text($row['ma_height']) ?>" class="frm_input full_input">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<? if($row['ma_id'] == $row['ma_parent']) { ?>
|
||||
<a href="./map_move_list.php?ma_id=<?=$row['ma_id']?>">통행설정</a>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
<?
|
||||
// 이벤트 카운터 검색
|
||||
$me_cnt = sql_fetch("select count(me_id) as cnt from {$g5['map_event_table']} where ma_id = '{$row['ma_id']}'");
|
||||
$me_cnt = $me_cnt['cnt'];
|
||||
?>
|
||||
<a href="./map_event_list.php?ma_id=<?=$row['ma_id']?>">이벤트설정 (<?=$me_cnt?>)</a>
|
||||
</td>
|
||||
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
<section id="anc_002" >
|
||||
<h2 class="h2_frm">지역 정보 입력</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<form name="fpointlist2" method="post" id="fpointlist2" action="./map_update.php" autocomplete="off">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_parent">지역 정보</label></th>
|
||||
<td>
|
||||
<select id="ma_parent" name="ma_parent">
|
||||
<option value="">상위지역</option>
|
||||
<?
|
||||
$pa_sql = "select ma_id, ma_name from {$g5['map_table']} where ma_parent = ma_id order by ma_id asc";
|
||||
$pa_result = sql_query($pa_sql);
|
||||
|
||||
for($i=0; $row = sql_fetch_array($pa_result); $i++) {
|
||||
?>
|
||||
<option value="<?=$row['ma_id']?>" <?=get_cookie("co_ma_parent") == $row['ma_id'] ? "selected" : ""?>><?=$row['ma_name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
<input type="text" name="ma_name" value="" id="ma_name" class="required frm_input" required placeholder=" 지역명 입력">
|
||||
|
||||
<input type="checkbox" name="ma_use" value="1" id="ma_use" checked>
|
||||
<label for="ma_use">사용여부</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function fpointlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
$sub_menu = '600300';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
if (!count($_POST['chk'])) {
|
||||
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||
}
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$sql = " update {$g5['map_table']}
|
||||
set ma_name = '{$_POST['ma_name'][$k]}',
|
||||
ma_use = '{$_POST['ma_use'][$k]}',
|
||||
ma_start = '{$_POST['ma_start'][$k]}',
|
||||
ma_top = '{$_POST['ma_top'][$k]}',
|
||||
ma_left = '{$_POST['ma_left'][$k]}',
|
||||
ma_width = '{$_POST['ma_width'][$k]}',
|
||||
ma_height = '{$_POST['ma_height'][$k]}'
|
||||
where ma_id = '{$_POST['ma_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
} else if ($_POST['act_button'] == "선택삭제") {
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$sql = " delete from {$g5['map_table']} where ma_id = '{$_POST['ma_id'][$k]}' ";
|
||||
sql_query($sql);
|
||||
$sql = " delete from {$g5['map_move_table']} where mf_start = '{$_POST['ma_id'][$k]}' or mf_end = '{$_POST['ma_id'][$k]}'";
|
||||
sql_query($sql);
|
||||
$sql = " delete from {$g5['map_event_table']} where ma_id = '{$_POST['ma_id'][$k]}'";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
goto_url('./map_list.php?'.$qstr);
|
||||
|
||||
?>
|
||||
176
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_member_list.php
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$sql_common = " from {$g5['character_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
if ($stx) {
|
||||
$sql_search .= " and ( ";
|
||||
switch ($sfl) {
|
||||
default :
|
||||
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||
break;
|
||||
}
|
||||
$sql_search .= " ) ";
|
||||
}
|
||||
|
||||
|
||||
if (!$sst) {
|
||||
$sst = "ch_type asc";
|
||||
$sod = "";
|
||||
}
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = 50;
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
|
||||
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '캐릭터별 위치 관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||
$result = sql_query($sql);
|
||||
$colspan = 4;
|
||||
|
||||
/** 지역 정보 **/
|
||||
$ma_sql = "select ma_id, ma_name from {$g5['map_table']} order by ma_id asc";
|
||||
$ma_result = sql_query($ma_sql);
|
||||
for($i=0; $map = sql_fetch_array($ma_result); $i++) {
|
||||
$ma[$i]['name'] = $map['ma_name'];
|
||||
$ma[$i]['id'] = $map['ma_id'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
총캐릭터수 <?php echo number_format($total_count) ?>명
|
||||
</div>
|
||||
|
||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="ch_name"<?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
|
||||
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>오너 아이디</option>
|
||||
</select>
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" class="frm_input">
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</form>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./map_list.php">지역 관리</a>
|
||||
</div>
|
||||
|
||||
|
||||
<form name="fmemberlist" id="fmemberlist" action="./map_member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col style="width: 50px;" />
|
||||
<col style="width: 100px;" />
|
||||
<col style="width: 200px;" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="chkall" class="sound_only">캐릭터 전체</label>
|
||||
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||
</th>
|
||||
<th>유형</th>
|
||||
<th>이름</th>
|
||||
|
||||
<th>위치</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$ch_id = $row['ch_id'];
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td>
|
||||
<input type="hidden" name="ch_id[<?php echo $i ?>]" value="<?php echo $row['ch_id'] ?>" id="ch_id_<?php echo $i ?>">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['ch_name']); ?>님</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$row['ch_type']?>
|
||||
</td>
|
||||
|
||||
<td class="txt-left"><?php echo get_text($row['ch_name']); ?></td>
|
||||
|
||||
<td>
|
||||
<select name="ma_id[<?=$i?>]" style="width: 100%;">
|
||||
<option value="">위치 미지정</option>
|
||||
<? for($k=0; $k < count($ma); $k++) { ?>
|
||||
<option value="<?=$ma[$k]['id']?>" <?php echo get_selected($row['ma_id'], $ma[$k]['id']); ?>><?=$ma[$k]['name']?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||
|
||||
<script>
|
||||
function fmemberlist_submit(f)
|
||||
{
|
||||
if (!is_checked("chk[]")) {
|
||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
|
||||
// 캐릭터 위치 이동
|
||||
sql_query("
|
||||
update {$g5['character_table']}
|
||||
set ma_id = '{$_POST['ma_id'][$k]}'
|
||||
where ch_id = '{$_POST['ch_id'][$k]}'
|
||||
");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($msg)
|
||||
alert($msg);
|
||||
|
||||
goto_url('./map_member_list.php');
|
||||
?>
|
||||
90
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_move_list.php
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$start_area = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$ma_id}'");
|
||||
|
||||
if(!$start_area['ma_id']) {
|
||||
alert("지역정보를 확인할 수 없습니다.");
|
||||
}
|
||||
|
||||
$end_result = sql_query("select * from {$g5['map_table']} where ma_id != '{$ma_id}' and ma_id = ma_parent");
|
||||
$frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./map_list.php">메인으로</a>
|
||||
</div>';
|
||||
|
||||
$g5['title'] = "[ ".$start_area['ma_name']." ] 지역 통행 관리";
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
?>
|
||||
|
||||
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
<input type="hidden" name="mf_start" value="<?=$start_area['ma_id']?>" />
|
||||
|
||||
<section id="anc_cf_basic">
|
||||
<h2 class="h2_frm">각 지역간 이동 설정</h2>
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>지역간 이동 설정</caption>
|
||||
<colgroup>
|
||||
<col style="width: 150px;" />
|
||||
<col style="width: 150px;" />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<?
|
||||
for($i=0; $end = sql_fetch_array($end_result); $i++) {
|
||||
unset($mf);
|
||||
$mf = sql_fetch("select * from {$g5['map_move_table']} where mf_start = '{$ma_id}' and mf_end = '{$end['ma_id']}'");
|
||||
$checked = "";
|
||||
$use_save = "";
|
||||
if(!$mf['mf_id']) {
|
||||
$mf = sql_fetch("select mf_use from {$g5['map_move_table']} where mf_start = '{$end['ma_id']}' and mf_end = '{$ma_id}'");
|
||||
$checked = $mf['mf_use'] ? "checked" : "";
|
||||
$use_save = "<span style='color: red;'> (저장필요)</span>";
|
||||
} else {
|
||||
$checked = $mf['mf_use'] ? "checked" : "";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<?=$start_area['ma_name']?> ↔ <?=$end['ma_name']?>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" name="mf_use[<?=$i?>]" value="1" <?=$checked?> id="mf_use_<?=$i?>">
|
||||
<label for="mf_use_<?=$i?>">이동가능</label>
|
||||
<?=$use_save?>
|
||||
|
||||
<input type="hidden" name="index[]" value="<?=$i?>" />
|
||||
<input type="hidden" name="mf_end[<?=$i?>]" value="<?=$end['ma_id']?>" />
|
||||
<input type="hidden" name="mf_id[<?=$i?>]" value="<?=$mf['mf_id']?>" />
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php echo $frm_submit; ?>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fconfigform_submit(f)
|
||||
{
|
||||
f.action = "./map_move_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
for($i=0; $i < count($index); $i++) {
|
||||
|
||||
$k = $index[$i];
|
||||
|
||||
$start_code = $mf_start;
|
||||
$end_code = $mf_end[$k];
|
||||
$money = $mf_money[$k];
|
||||
$use = $mf_use[$k];
|
||||
|
||||
$temp = sql_fetch("select * from {$g5['map_move_table']} where mf_start = '{$start_code}' and mf_end = '{$end_code}'");
|
||||
|
||||
if($temp['mf_id']) {
|
||||
// 수정모드
|
||||
$sql = " update {$g5['map_move_table']}
|
||||
set mf_use = '{$use}'
|
||||
where mf_id = '{$temp['mf_id']}'";
|
||||
|
||||
sql_query($sql);
|
||||
$mf_id = $temp['mf_id'];
|
||||
|
||||
} else {
|
||||
// 입력모드
|
||||
$sql = " insert {$g5['map_move_table']}
|
||||
set mf_start = '{$start_code}',
|
||||
mf_end = '{$end_code}',
|
||||
mf_use = '{$use}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./map_move_list.php?ma_id='.$mf_start, false);
|
||||
?>
|
||||
30
Plugin/지역관리/AvocadoEdition.MapManager/adm/map_update.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
$sub_menu = "600300";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
if($type != 'CONFIG') {
|
||||
sql_query ("insert {$g5['map_table']}
|
||||
set ma_parent ='{$_POST['ma_parent']}',
|
||||
ma_name ='{$_POST['ma_name']}',
|
||||
ma_use = '{$_POST['ma_use']}'
|
||||
");
|
||||
$ma_id = sql_fetch("select ma_id from {$g5['map_table']} order by ma_id desc limit 0, 1");
|
||||
$ma_id = $ma_id['ma_id'];
|
||||
|
||||
if(!$_POST['ma_parent']) {
|
||||
sql_query ("update {$g5['map_table']} set ma_parent = '$ma_id' where ma_id = '$ma_id'");
|
||||
}
|
||||
|
||||
set_cookie("co_ma_parent", $_POST['ma_parent'], 30);
|
||||
|
||||
} else {
|
||||
sql_query ("update {$g5['config_table']} set cf_use_map ='{$_POST['cf_use_map']}' ");
|
||||
}
|
||||
|
||||
goto_url('./map_list.php?'.$qstr);
|
||||
|
||||
?>
|
||||
104
Plugin/지역관리/AvocadoEdition.MapManager/extend/map.config.php
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 맵 관련 테이블값 추가
|
||||
$g5['map_table'] = G5_TABLE_PREFIX.'map'; // 지역 테이블
|
||||
$g5['map_event_table'] = G5_TABLE_PREFIX.'map_event'; // 지역이벤트 테이블
|
||||
$g5['map_move_table'] = G5_TABLE_PREFIX.'map_flow'; // 지역설정 테이블
|
||||
|
||||
|
||||
// 맵 테이블이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['map_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['map_table']}` (
|
||||
`ma_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ma_name` varchar(255) NOT NULL default '',
|
||||
`ma_parent` int(11) NOT NULL default '0',
|
||||
`ma_top` int(111) NOT NULL default '0',
|
||||
`ma_left` int(11) NOT NULL default '0',
|
||||
`ma_width` int(11) NOT NULL default '0',
|
||||
`ma_height` int(11) NOT NULL default '0',
|
||||
`ma_start` int(11) NOT NULL default '0',
|
||||
`ma_use` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`ma_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 맵 이동 설정값이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['map_move_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['map_move_table']}` (
|
||||
`mf_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mf_start` int(11) NOT NULL default '0',
|
||||
`mf_end` int(11) NOT NULL default '0',
|
||||
`mf_use` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`mf_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 맵 이벤트 설정값이 없을 경우 생성
|
||||
if(!sql_query(" DESC {$g5['map_event_table']} ")) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['map_event_table']}` (
|
||||
`me_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ma_id` int(11) NOT NULL default '0',
|
||||
`me_type` varchar(255) NOT NULL default '',
|
||||
`me_title` varchar(255) NOT NULL default '',
|
||||
`me_img` varchar(255) NOT NULL default '',
|
||||
`me_content` text NOT NULL,
|
||||
`me_get_item` int(11) NOT NULL default '0',
|
||||
`me_get_money` int(11) NOT NULL default '0',
|
||||
`me_move_map` int(11) NOT NULL default '0',
|
||||
`me_get_hp` int(11) NOT NULL default '0',
|
||||
`me_mon_hp` int(11) NOT NULL default '0',
|
||||
`me_mon_attack` int(11) NOT NULL default '0',
|
||||
`me_per_s` int(11) NOT NULL default '0',
|
||||
`me_per_e` int(11) NOT NULL default '0',
|
||||
`me_replay_cnt` int(11) NOT NULL default '0',
|
||||
`me_now_cnt` int(11) NOT NULL default '0',
|
||||
`me_use` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`me_id`)
|
||||
) ", false);
|
||||
}
|
||||
|
||||
// 캐릭터에 맵 이동 값이 존재하지 않을 경우
|
||||
if($is_member && $character['ch_id'] && !isset($character['ma_id'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['character_table']}` ADD `ma_id` INT(11) NOT NULL DEFAULT '0' AFTER `ch_side` ");
|
||||
}
|
||||
|
||||
// 관리자에 맵 기능 사용 여부 설정값 추가
|
||||
if(!isset($config['cf_use_map'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}` ADD `cf_use_map` INT(11) NOT NULL DEFAULT '0' AFTER `cf_open` ");
|
||||
}
|
||||
|
||||
if(isset($character['ch_id']) && !$character['ma_id']) {
|
||||
$ma_id = sql_fetch("select ma_id from {$g5['map_table']} where ma_start = '1' limit 0, 1");
|
||||
$ma_id = $ma_id['ma_id'];
|
||||
sql_query("
|
||||
update {$g5['character_table']}
|
||||
set ma_id = '{$ma_id}'
|
||||
where ch_id = '{$character['ch_id']}'
|
||||
");
|
||||
$character['ma_id'] = $ma_id;
|
||||
}
|
||||
|
||||
|
||||
function get_map($ma_id) {
|
||||
global $g5;
|
||||
$ma = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$ma_id}'");
|
||||
return $ma;
|
||||
}
|
||||
|
||||
function get_map_name($ma_id) {
|
||||
global $g5;
|
||||
$ma = sql_fetch("select ma_name from {$g5['map_table']} where ma_id = '{$ma_id}'");
|
||||
$result = $ma['ma_name'] ? $ma['ma_name'] : "-";
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
function get_map_parnet_name($ma_id) {
|
||||
global $g5;
|
||||
$ma = sql_fetch("select b.ma_name from (select ma_parent from {$g5['map_table']} where ma_id = '{$ma_id}') a, {$g5['map_table']} b where a.ma_parent = b.ma_id");
|
||||
|
||||
return $ma['ma_name'];
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
LOG HashGuide
|
||||
|
||||
- 로그타입
|
||||
1. S : 탐색 (성공여부, 획득아이템 ID, 획득아이템이름, 인벤 ID)
|
||||
2. A : 공격 (상대 ID, 상대 두상, 데미지)
|
||||
3. D : 방어 (상대 ID, 상대 두상, 방어율)
|
||||
4. U : 강화 (성공여부, 원래강화레벨, 현재강화레벨)
|
||||
5. H : 조합 (성공여부, 결과 아이템 ID, 인벤 ID, 조합 아이템 ID)
|
||||
*/
|
||||
|
||||
$data_log = explode("||", $data_log);
|
||||
$log_type = $data_log[0];
|
||||
|
||||
$item_log = explode("||", $item_log);
|
||||
|
||||
if($log_type == 'S') {
|
||||
/** 탐색 로그 출력 **/
|
||||
include($board_skin_path."/action/log.seeker.skin.php");
|
||||
}
|
||||
if($log_type == 'H') {
|
||||
/** 조합 로그 출력 **/
|
||||
include($board_skin_path."/action/log.handmade.skin.php");
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가
|
||||
******************************************************/
|
||||
if($log_type == 'MAP') {
|
||||
/** 맵 로그 출력 **/
|
||||
include($board_skin_path."/action/log.map.skin.php");
|
||||
}
|
||||
if($log_type == 'MAP_MON') {
|
||||
/** 맵 몬스터 이벤트 출력 **/
|
||||
include($board_skin_path."/action/log.map_mon.skin.php");
|
||||
}
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가 종료
|
||||
******************************************************/
|
||||
|
||||
|
||||
if($item_log[0]) {
|
||||
/** 아이템 사용시 **/
|
||||
include($board_skin_path."/action/log.item.skin.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 1. S : 탐색 (성공여부, 획득아이템 ID, 획득아이템이름, 인벤 ID)
|
||||
|
||||
$me_data = sql_fetch("select * from {$g5['map_event_table']} where me_id = '{$data_log[3]}'");
|
||||
$ma_data = sql_fetch("select * from {$g5['map_table']} where ma_id = '{$data_log[1]}'");
|
||||
?>
|
||||
|
||||
<div class="log-data-box">
|
||||
|
||||
<? if($data_log[2] == 'F') { ?>
|
||||
<p>
|
||||
<?=$ma_data['ma_name']?> 구역으로 이동했다.
|
||||
</p>
|
||||
|
||||
<? } else { ?>
|
||||
|
||||
<? if($me_data['me_img']) { ?>
|
||||
<div style="text-align: center;">
|
||||
<img src="<?=$me_data['me_img']?>" />
|
||||
</div>
|
||||
<? } ?>
|
||||
<p>
|
||||
<em class="title"><?=$me_data['me_title']?></em><br />
|
||||
<?=nl2br($me_data['me_content'])?>
|
||||
</p>
|
||||
|
||||
<? if($data_log[2] == 'I') { ?>
|
||||
<div class="thumb">
|
||||
<img src="<?=get_item_img($me_data['me_get_item'])?>" />
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<? if($data_log[2] == 'M') { ?>
|
||||
<div class="hp-bar">
|
||||
<em>
|
||||
<i><?=$log_comment['wr_mon_now_hp']?>/<?=$log_comment['wr_mon_hp']?></i>
|
||||
<span style="width:<?=$log_comment['wr_mon_now_hp'] ? $log_comment['wr_mon_now_hp']/$log_comment['wr_mon_hp'] * 100 : 0?>%;"></span>
|
||||
</em>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<? if($data_log[4]) { ?>
|
||||
<p><?=$data_log[4]?></p>
|
||||
<? } ?>
|
||||
|
||||
<? } ?>
|
||||
</div>
|
||||
<style>
|
||||
.log-data-box .hp-bar { position: relative; line-height: 20px; height: 20px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, .7); }
|
||||
.log-data-box .hp-bar i { display: block; position: absolute; top: 0; left: 5px; bottom: 0; z-index: 1; }
|
||||
.log-data-box .hp-bar span { display: block; position: absolute; top: 0; left: 0;bottom: 0; width: 0; background: #581212; z-index: 0; }
|
||||
</style>
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
// 1 : 몬스터 상태, 2: 몬스터 공격력. 3: 유저공격력, 4:캐릭터 HP, 5: 다이스1/다이스2/아이템
|
||||
$data_detail = explode("+", $data_log[5]);
|
||||
|
||||
$monster_comment = "";
|
||||
$monster_comment_detail = "";
|
||||
|
||||
if($data_log[1] != "E") {
|
||||
// 이벤트가 진행 중인 경우
|
||||
|
||||
$monster_comment = "대상을 공격합니다!";
|
||||
|
||||
if($data_log[2] < $data_log[3]) {
|
||||
$monster_comment_detail = "공격 성공! ".($data_log[3] - $data_log[2])."의 피해를 입혔습니다.";
|
||||
} else if($data_log[2] > $data_log[3]) {
|
||||
// 몬스터의 데미지가 더 높은 경우, 유저의 hp를 제거한다. 단, 플러그인에선 hp에 대한 코드는 제외되어있다.
|
||||
// 유저의 HP 를 사용할 경우 아래의 코드를 사용한다.
|
||||
// $monster_comment_detail = "공격 실패! ".($data_log[2] - $data_log[3])."의 피해를 입었습니다.";
|
||||
$monster_comment_detail = "공격 실패!";
|
||||
} else {
|
||||
// 비겼을 경우
|
||||
$monster_comment_detail = "공격 실패!";
|
||||
}
|
||||
|
||||
} else {
|
||||
$monster_comment = "대상을 처치하는데 성공하였습니다!";
|
||||
$monster_comment_detail = "공격 성공! ".($data_log[3] - $data_log[2])."의 피해를 입혔습니다.";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="log-data-box">
|
||||
<p><?=$monster_comment?></p>
|
||||
<?
|
||||
if($data_log[5]) {
|
||||
// 다이스 정보 추출
|
||||
// 해당 부분은 커뮤니티 내의 공격력 산출 공식에 따라 커스텀 한다.
|
||||
$dice_result = explode("+", $data_log[5]);
|
||||
?>
|
||||
<p>
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$dice_result[0]?>.png" alt="DICE1" />
|
||||
<?=number_format($dice_result[0])?>
|
||||
+
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$dice_result[1]?>.png" alt="DICE2" />
|
||||
<?=number_format($dice_result[1])?>
|
||||
<? if($dice_result[2]) {
|
||||
// 아이템을 사용했을 경우
|
||||
?>
|
||||
+ <?=number_format($dice_result[2])?>
|
||||
<? } ?>
|
||||
</p>
|
||||
<? } ?>
|
||||
<p><?=$monster_comment_detail?></p>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,375 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0);
|
||||
|
||||
set_session('ss_bo_table', $_REQUEST['bo_table']);
|
||||
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";
|
||||
$mmb_item_result = sql_query($temp_sql);
|
||||
$mmb_item = array();
|
||||
for($i = 0; $row = sql_fetch_array($mmb_item_result); $i++) {
|
||||
$mmb_item[$i] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$owner_front = get_style('mmb_owner_name', 'cs_etc_2'); // 자기 로그 접두문자
|
||||
$owner_front = $owner_front['cs_etc_2'];
|
||||
$owner_behind = get_style('mmb_owner_name', 'cs_etc_3'); // 자기 로그 접미문자
|
||||
$owner_behind = $owner_behind['cs_etc_3'];
|
||||
|
||||
?>
|
||||
|
||||
<div id="load_log_board">
|
||||
|
||||
<?
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가 : 지도 표시 부분. 불필요할 시 제거
|
||||
******************************************************/
|
||||
if($config['cf_use_map']) {
|
||||
include_once($board_skin_path.'/list.top.map.skin.php');
|
||||
}
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가 종료
|
||||
******************************************************/
|
||||
?>
|
||||
|
||||
<!-- 자비란 상단 공지 부분 -->
|
||||
<? if($board['bo_content_head']) { ?>
|
||||
<div class="board-notice">
|
||||
<?=stripslashes($board['bo_content_head']);?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/*-------------------------------------------
|
||||
동접자 카운터 설정
|
||||
---------------------------------------------*/
|
||||
$wiget = get_style('mmb_counter');
|
||||
if($wiget['cs_value']) { echo '<div class="connect-wiget">'.$wiget['cs_value'].'</div>'; }
|
||||
?>
|
||||
|
||||
<!-- 공지사항 한줄 롤링 -->
|
||||
<div class="marquee mmb-notice">
|
||||
<span><i><?=$config['cf_10']?></i></span>
|
||||
</div>
|
||||
<!-- // 공지사항 한줄 롤링 -->
|
||||
|
||||
<!-- 게시판 카테고리 시작 { -->
|
||||
<?php if ($is_category) { ?>
|
||||
<nav id="navi_category">
|
||||
<ul>
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 카테고리 끝 -->
|
||||
|
||||
<div class="ui-mmb-button">
|
||||
<?php if ($write_href) {
|
||||
// 췩 사용 여부를 체크 한다.
|
||||
if($board['bo_use_chick']) { // 췩 사용 가능할 경우, 파일 업로드 폼을 생성한다.
|
||||
$write['wr_subject'] = '--|UPLOADING|--';
|
||||
|
||||
$upload_action_url = G5_BBS_URL."/write_update.php";
|
||||
?>
|
||||
<div class="ui-mmb-list-write">
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $upload_action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
|
||||
<input type="hidden" name="redirect" value="1">
|
||||
<input type="hidden" name="wr_subject" value="<?=$write['wr_subject']?>" />
|
||||
<input type="hidden" name="wr_content" value="" />
|
||||
<input type="hidden" name="wr_width" id="wr_width" value="<?php echo $write['wr_width']; ?>">
|
||||
<input type="hidden" name="wr_height" id="wr_height" value="<?php echo $write['wr_height']; ?>">
|
||||
|
||||
<? if(!$is_member) { ?>
|
||||
<fieldset class="guest-box">
|
||||
<div class="name">
|
||||
<label>이름</label>
|
||||
<input type="text" name="wr_name" value="방문자" />
|
||||
</div>
|
||||
<div class="pw">
|
||||
<label>비밀번호</label>
|
||||
<input type="password" name="wr_password" value="" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<? } ?>
|
||||
|
||||
<div class="upload-box">
|
||||
<select name="wr_type" onchange="fn_log_type(this.value);">
|
||||
<option value="UPLOAD" <?=$write['wr_type'] == "UPLOAD" ? "selected" : ""?>>UPLOAD</option>
|
||||
<option value="URL" <?=$write['wr_type'] == "URL" ? "selected" : ""?>>URL</option>
|
||||
</select>
|
||||
|
||||
<fieldset>
|
||||
<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>
|
||||
</fieldset>
|
||||
<button type="submit" id="btn_submit" accesskey="s" class="ui-btn">업로드</button>
|
||||
</div>
|
||||
<fieldset>
|
||||
<? if($is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="1" <?=$write['wr_secret'] ? "checked" : ""?>/>
|
||||
<label for="wr_secret">멤버공개</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_adult" name="wr_adult" value="1" <?=$write['wr_adult'] ? "checked" : ""?>/>
|
||||
<label for="wr_adult">19금</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_wide" name="wr_wide" value="1" <?=$write['wr_wide'] ? "checked" : ""?>/>
|
||||
<label for="wr_wide">리플창 아래로</label>
|
||||
</span>
|
||||
<? if($board['bo_use_noname'] && $is_member) { ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_noname" name="wr_noname" value="1" <?=$write['wr_noname'] ? "checked" : ""?>/>
|
||||
<label for="wr_noname">익명</label>
|
||||
</span>
|
||||
<? } ?>
|
||||
<span>
|
||||
<input type="checkbox" id="wr_plip" name="wr_plip" value="1" <?=$write['wr_plip'] ? "checked" : ""?>/>
|
||||
<label for="wr_plip">로그접기</label>
|
||||
</span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<script>
|
||||
function fn_log_type(type) {
|
||||
$('#add_'+type).siblings().hide();
|
||||
$('#add_'+type).show();
|
||||
|
||||
$('#wr_url').val('');
|
||||
$('#wr_file').replaceWith( $('#wr_file').clone(true) );
|
||||
}
|
||||
function fwrite_submit(f) {
|
||||
if (document.getElementById("char_count")) {
|
||||
if (char_min > 0 || char_max > 0) {
|
||||
var cnt = parseInt(check_byte("wr_content", "char_count"));
|
||||
if (char_min > 0 && char_min > cnt) {
|
||||
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
else if (char_max > 0 && char_max < cnt) {
|
||||
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(f.wr_type.value == 'UPLOAD') {
|
||||
if(document.getElementById('wr_file').value == '') {
|
||||
alert("업로드할 로그를 등록해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
} else if(f.wr_type.value == 'URL') {
|
||||
if(document.getElementById('wr_url').value == '') {
|
||||
alert("등록할 로그 URL을 입력해 주시길 바랍니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<a href="<?php echo $write_href ?>" class="ui-btn point small">등록하기</a>
|
||||
<? } } ?>
|
||||
<a href="<?php echo $list_href ?>" class="ui-btn small">새로고침</a>
|
||||
<a href="<?php echo $board_skin_url ?>/emoticon_list.php" class="ui-btn small new_win">이모티콘</a>
|
||||
</div>
|
||||
|
||||
|
||||
<? if($write_pages) { ?><div class="ui-paging"><?php echo $write_pages; ?></div><? } ?>
|
||||
|
||||
|
||||
<!-- 리스트 시작 -->
|
||||
<div id="log_list" class="none-trans">
|
||||
<?
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
$list_item = $list[$i];
|
||||
include($board_skin_path."/list.log.skin.php");
|
||||
}
|
||||
if (count($list) == 0) { echo "<div class=\"empty_list\">등록된 로그가 없습니다.</div>"; }
|
||||
?>
|
||||
</div>
|
||||
|
||||
<? if($write_pages) { ?>
|
||||
<div class="ui-paging">
|
||||
<?php echo $write_pages; ?>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<div class="searc-sub-box">
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="sop" value="and">
|
||||
<input type="hidden" name="hash" value="<?=$hash?>">
|
||||
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category select-box">
|
||||
<select name="sfl" id="sfl">
|
||||
<option value="wr_subject,1"<?php echo get_selected($sfl, 'wr_subject,1', true); ?>>캐릭터</option>
|
||||
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>코멘트</option>
|
||||
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>오너</option>
|
||||
<option value="wr_name"<?php echo get_selected($sfl, 'wr_name'); ?>>오너(코)</option>
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" id="stx" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="ui-search-box">
|
||||
<fieldset class="sch_category">
|
||||
<span>해시태그</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="hash" value="<?=$hash?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="ui-search-box last">
|
||||
<fieldset class="sch_category">
|
||||
<span>로그번호</span>
|
||||
</fieldset>
|
||||
<fieldset class="sch_text">
|
||||
<input type="text" name="log" value="<?=$log?>" class="frm_input" maxlength="20">
|
||||
</fieldset>
|
||||
<fieldset class="sch_button">
|
||||
<button type="submit" class="ui-btn point">검색</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var avo_mb_id = "<?=$member['mb_id']?>";
|
||||
var avo_board_skin_path = "<?=$board_skin_path?>";
|
||||
var avo_board_skin_url = "<?=$board_skin_url?>";
|
||||
|
||||
var save_before = '';
|
||||
var save_html = '';
|
||||
|
||||
function fviewcomment_submit(f)
|
||||
{
|
||||
set_comment_token(f);
|
||||
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
|
||||
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"content": f.wr_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
f.wr_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!f.wr_content.value) {
|
||||
alert("댓글을 입력하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(f.wr_name) != 'undefined')
|
||||
{
|
||||
f.wr_name.value = f.wr_name.value.replace(pattern, "");
|
||||
if (f.wr_name.value == '')
|
||||
{
|
||||
alert('이름이 입력되지 않았습니다.');
|
||||
f.wr_name.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(f.wr_password) != 'undefined')
|
||||
{
|
||||
f.wr_password.value = f.wr_password.value.replace(pattern, "");
|
||||
if (f.wr_password.value == '')
|
||||
{
|
||||
alert('비밀번호가 입력되지 않았습니다.');
|
||||
f.wr_password.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function comment_delete()
|
||||
{
|
||||
return confirm("이 댓글을 삭제하시겠습니까?");
|
||||
}
|
||||
|
||||
function comment_box(co_id, wr_id) {
|
||||
$('.modify_area').hide();
|
||||
$('.original_comment_area').show();
|
||||
|
||||
$('#c_'+co_id).find('.modify_area').show();
|
||||
$('#c_'+co_id).find('.original_comment_area').hide();
|
||||
|
||||
$('#save_co_comment_'+co_id).focus();
|
||||
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
modify_form.wr_id.value = wr_id;
|
||||
modify_form.comment_id.value = co_id;
|
||||
}
|
||||
|
||||
function modify_commnet(co_id) {
|
||||
var modify_form = document.getElementById('frm_modify_comment');
|
||||
var wr_content = $('#save_co_comment_'+co_id).val();
|
||||
|
||||
modify_form.wr_content.value = wr_content;
|
||||
$('#frm_modify_comment').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form name="modify_comment" id="frm_modify_comment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="w" value="cu">
|
||||
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
|
||||
<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 ?>">
|
||||
<input type="hidden" name="spt" value="<?php echo $spt ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
|
||||
<input type="hidden" name="comment_id" value="">
|
||||
<input type="hidden" name="wr_id" value="">
|
||||
<textarea name="wr_content" style="display: none;"></textarea>
|
||||
<button type="submit" style="display: none;"></button>
|
||||
</form>
|
||||
|
||||
<script src="<?php echo $board_skin_url ?>/js/load.board.js"></script>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 지도 이미지는 따로 FTP를 통해 올려 준다.
|
||||
// : 지도 이미지 경로 - 아보카도 에디션 설치 경로/img/img_map_pannel.png
|
||||
// : 경로를 변경해주어도 무방하다. 54번 라인의 img 지도 이미지의 경로를 변경
|
||||
|
||||
// 맵 정보를 불러온다
|
||||
$map_sql = "select * from {$g5['map_table']} order by ma_parent asc, ma_name asc ";
|
||||
$map_result = sql_query($map_sql);
|
||||
|
||||
$map_w = 200; // 지도 원본 가로 사이즈
|
||||
$map_h = 200; // 지도 원본 세로 사이즈 크기
|
||||
?>
|
||||
|
||||
|
||||
<div id="mmb_map_pannel">
|
||||
<div class="map-inner" style="max-width: <?=$map_w?>px;">
|
||||
<div class="pad">
|
||||
<? for($i=0; $map = sql_fetch_array($map_result); $i++) {
|
||||
|
||||
// 반응형 대응을 위한 각 위치의 좌표와 영역 크기는 % 로 처리 된다.
|
||||
$pos_w = $map['ma_width'] / $map_w * 100;
|
||||
$pos_h = $map['ma_height'] / $map_h * 100;
|
||||
|
||||
$pos_t = $map['ma_top'] / $map_w * 100;
|
||||
$pos_l = $map['ma_left'] / $map_w * 100;
|
||||
|
||||
$map_class = "";
|
||||
|
||||
if($map['ma_id'] == $character['ma_id']) {
|
||||
// 현재 캐릭터 위치와 동일한 좌표 영역일 경우
|
||||
// my 클리스를 추가한다.
|
||||
$map_class .=" my";
|
||||
}
|
||||
|
||||
// 현재 위치에 있는 캐릭터
|
||||
// main 타입의 캐릭터들만 불러온다.
|
||||
$cnt = sql_fetch("select count(*) as cnt from {$g5['character_table']} where ch_type='main' and ma_id = '{$map['ma_id']}'");
|
||||
$cnt = $cnt['cnt'];
|
||||
|
||||
if($cnt > 0) {
|
||||
// 다른 위치에 존재하는 캐릭터가 있을 경구, other 클래스를 추가한다.
|
||||
$map_class .=" other";
|
||||
} else {
|
||||
$cnt = '';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="pin <?=$map_class?>" style="top:<?=$pos_t?>%; left:<?=$pos_l?>%; width:<?=$pos_w?>%; height:<?=$pos_h?>%;"><span><?=$cnt?></span></div>
|
||||
|
||||
<? } ?>
|
||||
</div>
|
||||
<img src="<?=G5_IMG_URL?>/img_map_pannel.png" alt="지도 이미지" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
#mmb_map_pannel { position: relative; overflow: hidden; }
|
||||
#mmb_map_pannel .map-inner { display: block; position: relative; margin: 20px auto; }
|
||||
#mmb_map_pannel .map-inner .pad { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; }
|
||||
#mmb_map_pannel .map-inner > img { display: block; position: relative; z-index: 0; }
|
||||
#mmb_map_pannel .map-inner .pin { display: block; position: absolute; }
|
||||
#mmb_map_pannel .map-inner .pin.my { background: rgba(172, 34, 188, .8) !important; }
|
||||
#mmb_map_pannel .map-inner .pin.other { background: rgba(18, 108, 138, .8); }
|
||||
#mmb_map_pannel .map-inner .pin span { display: block; position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%); font-size: 11px; text-align: center; }
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
for ($index=0; $index<count($comment); $index++) {
|
||||
|
||||
$log_comment = $comment[$index];
|
||||
$comment_id = $log_comment['wr_id'];
|
||||
|
||||
$content = $log_comment['content'];
|
||||
$content = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $content);
|
||||
|
||||
if($log_comment['wr_log'] && !$is_admin) {
|
||||
// 로그 (탐색 / 조합 등의 액션 수행)의 흔적이 있을 경우
|
||||
// 관리자가 아니면 삭제 불가
|
||||
$is_delete = false;
|
||||
}
|
||||
|
||||
if($log_comment['wr_id'] != $log_comment['wr_id'] && ($log_comment['is_reply'] || $log_comment['is_edit'] || $log_comment['is_del'])) {
|
||||
// 답변, 수정, 삭제가 가능할 경우
|
||||
// 또한, 본문의 id와 코멘트의 id가 다를 경우 (같을 경우엔 로그의 상단에 있는 컨트롤을 통해 액션 수행이 가능하다)
|
||||
$query_string = str_replace("&", "&", $_SERVER['QUERY_STRING']);
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content from $write_table where wr_id = '$indexd' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
$c_wr_content = $cmt['wr_content'];
|
||||
}
|
||||
|
||||
$c_reply_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=c#bo_vc_w_'.$list_item['wr_id'];
|
||||
$c_edit_href = './board.php?'.$query_string.'&c_id='.$comment_id.'&w=cu#bo_vc_w_'.$list_item['wr_id'];
|
||||
}
|
||||
|
||||
// 캐릭터 정보 출력
|
||||
$is_comment_owner = false;
|
||||
$comment_owner_front = ""; // 자기 로그 접두문자
|
||||
$comment_owner_behind = ""; // 자기 로그 접미문자
|
||||
|
||||
if(!$log_comment['wr_noname']) {
|
||||
if(is_file(G5_DATA_PATH."/site/ico_admin") && $config['cf_admin'] == $log_comment['mb_id']) {
|
||||
// 관리자 아이콘이 존재하고, 관리자와 작성자가 동일 할 경우
|
||||
// 관리자 아이콘을 출력한다.
|
||||
$log_comment['ch_name'] = "<img src='".G5_DATA_URL."/site/ico_admin' alt='관리자' />";
|
||||
} else {
|
||||
// 캐릭터 정보 로드
|
||||
$ch = get_character($log_comment['ch_id']);
|
||||
if($ch['ch_id']) {
|
||||
// 캐릭터 정보가 존재할 경우, 캐릭터 정보를 추가한다.
|
||||
// 캐릭터 링크
|
||||
// + 캐릭터 소속 아이콘
|
||||
// + 캐릭터 종족 아이콘
|
||||
// + 캐릭터 이름
|
||||
/*$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side']).get_class_icon($ch['ch_class'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($log_comment['wr_subject'] ? $log_comment['wr_subject'] : "GUEST")."
|
||||
</a>";*/
|
||||
$log_comment['ch_name'] = "
|
||||
<a href='".G5_URL."/member/viewer.php?ch_id={$ch['ch_id']}' target='_blank'>
|
||||
<i>".get_side_icon($ch['ch_side'])."</i>
|
||||
".get_title_image($log_comment['ti_id'])."
|
||||
".($ch['ch_name'] ? $ch['ch_name'] : "GUEST")."
|
||||
</a>";
|
||||
} else {
|
||||
// 캐릭터 정보가 존재하지 않을 경우, 빈값을 출력한다.
|
||||
$log_comment['ch_name'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 오너 정보 출력
|
||||
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>";
|
||||
} else {
|
||||
$log_comment['name'] = $log_comment[wr_name];
|
||||
}
|
||||
|
||||
if(!$list_item['wr_noname'] && $list_item['mb_id'] == $log_comment['mb_id']) {
|
||||
$is_comment_owner = true;
|
||||
$comment_owner_front = $owner_front;
|
||||
$comment_owner_behind = $owner_behind;
|
||||
}
|
||||
} else {
|
||||
$is_comment_owner = false;
|
||||
}
|
||||
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가
|
||||
******************************************************/
|
||||
$map_info = '';
|
||||
if($log_comment['ma_id']) {
|
||||
$ma_name = sql_fetch("select ma_name from {$g5['map_table']} where ma_id = '{$log_comment['ma_id']}'");
|
||||
$map_info .= " <span class='ico-map'>위치 : {$ma_name['ma_name']}</span>";
|
||||
}
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가 종료
|
||||
******************************************************/
|
||||
?>
|
||||
|
||||
|
||||
<div class="item-comment" id="c_<?php echo $comment_id ?>">
|
||||
<div class="co-header">
|
||||
<? // 로그 작성자와 코멘트 작성자가 동일할 경우, class='owner' 를 추가한다. ?>
|
||||
<? if(!$log_comment['wr_noname']) { ?>
|
||||
<p <?=$is_comment_owner ? ' class="owner"' : ''?>>
|
||||
<?=$comment_owner_front?>
|
||||
<strong><?=$log_comment['ch_name']?></strong>
|
||||
<span>[<?=$log_comment['name']?>]</span>
|
||||
<?=$comment_owner_behind?>
|
||||
</p>
|
||||
<? } else { ?>
|
||||
<p>익명의 누군가</p>
|
||||
<? } ?>
|
||||
|
||||
<?
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가
|
||||
******************************************************/
|
||||
echo $map_info;
|
||||
/******************************************************
|
||||
위치이동 커맨드 추가 종료
|
||||
******************************************************/
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="co-content">
|
||||
<div class="original_comment_area">
|
||||
<?
|
||||
// 액션 로그 정보 가져 오기
|
||||
$data_log = $log_comment['wr_log'];
|
||||
// 아이템 사용 정보 가져오기
|
||||
$item_log = $log_comment['wr_item_log'];
|
||||
|
||||
include($board_skin_path."/_action.data.php");
|
||||
|
||||
// 주사위를 굴린 정보가 있을 경우
|
||||
if($log_comment['wr_dice1']) {
|
||||
?>
|
||||
<span class="dice">
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice1']?>.png" />
|
||||
<img src="<?=$board_skin_url?>/img/d<?=$log_comment['wr_dice2']?>.png" />
|
||||
</span>
|
||||
<? }
|
||||
if($log_comment['wr_link1']) {
|
||||
// 로그 등록 시 입력한 외부 링크 정보
|
||||
?>
|
||||
<span class="link-box">
|
||||
<? if($log_comment['wr_link1']) { ?>
|
||||
<a href="<?=$log_comment['wr_link1']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
<? if($log_comment['wr_link2']) { ?>
|
||||
<a href="<?=$log_comment['wr_link2']?>" target="_blank" class="link">LINK</a>
|
||||
<? } ?>
|
||||
</span>
|
||||
<? }
|
||||
// 코멘트 출력 부분
|
||||
$log_comment['content'] = autolink($log_comment['content'], $bo_table, $stx); // 자동 링크 및 해시태그, 로그 링크 등 컨트롤 함수
|
||||
$log_comment['content'] = emote_ev($log_comment['content']); // 이모티콘 출력 함수
|
||||
echo $log_comment['content'];
|
||||
?>
|
||||
</div>
|
||||
<? if($log_comment['is_edit']) { ?>
|
||||
<div class="modify_area" id="save_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_co_comment_<?php echo $comment_id ?>"><?php echo get_text($log_comment['content1'], 0) ?></textarea>
|
||||
<button type="button" class="mod_comment ui-btn" onclick="modify_commnet('<?php echo $comment_id ?>'); return false;">수정</button>
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
<div class="co-footer">
|
||||
<span class="date">
|
||||
<?=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 } ?>
|
||||
</div>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
|
||||