add community feature (temp)

This commit is contained in:
Amberstone 2024-10-07 13:50:46 +09:00
parent 81649ff477
commit 43090e28a2
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
101 changed files with 4760 additions and 15 deletions

View file

@ -36,7 +36,7 @@ if ($conf['cf_theme'] != $theme) {
}
$g5['title'] = get_text($info['theme_name']) . ' 테마 미리보기';
require_once(G5_PATH . '/head.sub.php');
include_once G5_PATH . '/head.sub.php';
?>
<link rel="stylesheet" href="<?php echo G5_ADMIN_URL; ?>/css/theme.css">
@ -68,4 +68,4 @@ require_once(G5_PATH . '/head.sub.php');
</section>
<?php
require_once(G5_PATH . '/tail.sub.php');
include_once G5_PATH . '/tail.sub.php';

View file

@ -4,7 +4,7 @@ include_once "./_common.php";
if (defined('G5_THEME_PATH')) {
$group_file = G5_THEME_PATH . '/group.php';
if (is_file($group_file)) {
require_once($group_file);
include_once $group_file;
return;
}
unset($group_file);

View file

@ -60,7 +60,7 @@ switch ($w) {
include_once G5_PATH . "/head.sub.php";
//if ($board['bo_include_head']) { @include ($board['bo_include_head']); }
//if ($board['bo_include_head']) { @include $board['bo_include_head']; }
//if ($board['bo_content_head']) { echo stripslashes($board['bo_content_head']); }
/* 비밀글의 제목을 가져옴 지운아빠 2013-01-29 */
@ -138,6 +138,6 @@ if (is_include_path_check("{$member_skin_path}/password.skin.php")) {
}
//if ($board['bo_content_tail']) { echo stripslashes($board['bo_content_tail']); }
//if ($board['bo_include_tail']) { @include ($board['bo_include_tail']); }
//if ($board['bo_include_tail']) { @include $board['bo_include_tail']; }
include_once G5_PATH . '/tail.sub.php';

View file

@ -0,0 +1,2 @@
<?php
include_once '../common.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_head.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/tail.sub.php';

View file

@ -0,0 +1,54 @@
<?php
include_once './_common.php';
$sql_common = " from {$g5['couple_table']} ";
$sql_search = " ";
$sql_order = " order by co_order asc ";
$sql_limit = "";
$sql = " select * {$sql_common} {$sql_search} {$sql_order} ";
$result = sql_query($sql);
$list = [];
for ($i = 0; $co = sql_fetch_array($result); $i++) {
$list[$i] = $co;
$ch_left = sql_fetch("select ch_name, ch_thumb, mb_id from {$g5['character_table']} where ch_id = '{$co['co_left']}'");
$ch_right = sql_fetch("select ch_name, ch_thumb, mb_id from {$g5['character_table']} where ch_id = '{$co['co_right']}'");
$ch_left['ch_name'] = explode(' ', $ch_left['ch_name']);
$ch_left['ch_name'] = $ch_left['ch_name'][0];
$ch_right['ch_name'] = explode(' ', $ch_right['ch_name']);
$ch_right['ch_name'] = $ch_right['ch_name'][0];
$h = date('H'); //현재시를 구함
$m = date('i'); //현재 분을 구함
$s = date('s'); //현재 초를 구함
$date = date("U", strtotime($co['co_date'])); //생일의 유닉스타임스탬프를 구함
$today = time(); //현재의 유닉스타임스탬프를 구함
$day = ($today - $date) / 60 / 60 / 24; //몇일이지났는가를 계산
$day = ceil($day);
$list[$i]['left']['idx'] = $co['co_left'];
$list[$i]['left']['name'] = $ch_left['ch_name'];
$list[$i]['left']['thumb'] = $ch_left['ch_thumb'];
$list[$i]['right']['idx'] = $co['co_right'];
$list[$i]['right']['name'] = $ch_right['ch_name'];
$list[$i]['right']['thumb'] = $ch_right['ch_thumb'];
$list[$i]['dday'] = $day;
}
$g5['title'] = "커플";
include_once './_head.php';
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/couple/list.skin.php")) {
include(G5_THEME_PATH . "/couple/list.skin.php");
} else {
include(G5_PATH . "/couple/skin/list.skin.php");
}
include_once G5_PATH . '/tail.php';

View file

@ -0,0 +1,33 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/style.couple.css">', 0);
?>
<div id="couple_page">
<div id="couple_list">
<ul>
<?php for ($i = 0; $i < count($list); $i++) { ?>
<li>
<div class="visual">
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $list[$i]['left']['idx'] ?>" class="left" target="_blank">
<img src="<?= $list[$i]['left']['thumb'] ?>" />
</a>
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $list[$i]['right']['idx'] ?>" class="right"
target="_blank">
<img src="<?= $list[$i]['right']['thumb'] ?>" />
</a>
</div>
<p>
<?= $list[$i]['left']['name'] ?> ♥ <?= $list[$i]['right']['name'] ?> 커플<br />
<?= $list[$i]['dday'] ?>일 째입니다.
</p>
</li>
<?php } ?>
</ul>
</div>
</div>

View file

@ -0,0 +1,2 @@
<?php
include_once '../common.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_head.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/tail.sub.php';

View file

@ -0,0 +1,19 @@
<?php
include_once './_common.php';
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id");
$ch = get_character($in['ch_id']);
$is_mine = $ch['mb_id'] == $character['mb_id'] ? true : false;
if (!$in['in_id']) {
echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>";
} else {
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/inventory/item.skin.php")) {
include(G5_THEME_PATH . "/inventory/item.skin.php");
} else {
include(G5_PATH . "/inventory/skin/item.skin.php");
}
}

View file

@ -0,0 +1,28 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/*************************************************************************************
SAMPLE CODE
--------------------------------------------------------------------------------------
if($inven_function == "아이템 기능 명명") {
// 기능을 정의해주세요.
// 아이템 사용 후 삭제 (영구처리 된 경우 예외)
delete_inventory($in['in_id'], $in['it_use_ever']);
// 아이템 사용 후 무조건 삭제
delete_inventory($in['in_id']);
// 페이지 새로 고침
echo location_url($return_url);
// 특정 페이지로 이동
echo location_url(페이지 주소);
}
// 그 외에 인벤토리 아이템 사용 클릭 시 별도로 처리하고 싶을 경우 if 바깥 쪽에 작성
// 단, 모든 경우에 걸리기 때문에 오류가 발생할 수 있습니다.
*************************************************************************************/

View file

@ -0,0 +1,39 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
<div class="info">
<div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" />
</div>
</div>
<div class="text">
<p class="title">
<?= $in['it_name'] ?>
<span><?= number_format($in['it_sell']) ?><?= $config['cf_money_pice'] ?></span>
</p>
<div>
<p><?= $in['it_content'] ?></p>
</div>
</div>
<form action="<?= G5_URL ?>/inventory/item_form_update.php" method="post" name="frmItemAdd" enctype="multipart/form-data">
<input type="hidden" name="type" value="add" />
<input type="hidden" name="in_id" id="a_item_add_in_id" value="<?= $in['in_id'] ?>" />
<input type="hidden" name="ch_id" id="a_item_add_ch_id" value="<?= $ch['ch_id'] ?>" />
<input type="hidden" name="url" value="<?= $url ?>" />
<div class="add-item-form">
<div class="item-info">
<input type="file" name="it_img" id="inven_it_img" class="required" required />
</div>
<div class="item-input">
<input type="text" name="it_name" class="frm_input required" placeholder="아이템 이름" required />
</div>
<div class="item-input">
<input type="text" name="it_content" class="frm_input required" placeholder="아이템 설명" required />
</div>
</div>
<div class="control-box">
<button type="submit" class="ui-btn simple">등록하기</button>
</div>
</form>

View file

@ -0,0 +1,41 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
<div class="info">
<div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" />
</div>
</div>
<div class="text">
<p class="title">
<?= $in['it_name'] ?>
<span><?= number_format($in['it_sell']) ?><?= $config['cf_money_pice'] ?></span>
</p>
</div>
<form action="<?= G5_URL ?>/inventory/inventory_update.php" method="post">
<input type="hidden" name="in_id" value="<?= $in['in_id'] ?>" />
<input type="hidden" name="ch_id" value="<?= $ch['ch_id'] ?>" />
<input type="hidden" name="url" value="<?= $url ?>" />
<div class="send-item-form">
<div class="item-input">
<input type="hidden" name="re_ch_id" id="send_re_ch_id" value="" />
<input type="text" name="re_ch_name" value="" id="send_re_ch_name"
onkeyup="get_ajax_character(this, 'send_character_list', 'send_re_ch_id', 'user');"
placeholder="받는 사람 이름 검색"></input>
<div id="send_character_list" class="ajax-list-box">
<div class="list"></div>
</div>
</div>
<div class="item-input">
<input type="text" name="in_memo" placeholder="전달 메세지" />
</div>
</div>
<div class="control-box">
<button type="submit" class="ui-btn simple">보내기</button>
</div>
</form>

View file

@ -0,0 +1,53 @@
<?php
include_once './_common.php';
if ($url) {
$return_url = urldecode($url);
} else {
$return_url = "./viewer.php?ch_id=" . $ch_id;
}
if (!$re_ch_id && $re_ch_name) {
$re_ch = get_character_by_name($re_ch_name);
} else {
$re_ch = get_character($re_ch_id);
}
if (!$re_ch['ch_id']) {
alert("받는 사람의 정보를 확인할 수 없습니다.", $return_url);
}
if ($ch_id == $character['ch_id']) {
$se_ch = $character;
} else {
$se_ch = get_character($ch_id);
}
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id and inven.ch_id = '{$ch_id}'");
if (!$in['in_id']) {
alert("아이템 보유 정보를 확인할 수 없습니다.", $return_url);
}
if ($in['in_id'] && $re_ch['ch_id']) {
$inven_sql = "update {$g5['inventory_table']}
set ch_id = '{$re_ch['ch_id']}',
ch_name = '{$re_ch['ch_name']}',
se_ch_id = '{$se_ch['ch_id']}',
se_ch_name = '{$se_ch['ch_name']}',
re_ch_id = '{$re_ch['ch_id']}',
re_ch_name = '{$re_ch['ch_name']}',
in_memo = '{$in_memo}'
{$add_sql}
where in_id = '{$in_id}'";
sql_query($inven_sql);
$recv_mb_id = $re_ch['mb_id'];
$memo_content = "[ " . $se_ch['ch_name'] . "님이 보내신 《" . $in['it_name'] . "》아이템이 도착 하였습니다. ] 캐릭터 인벤토리를 확인하세요.";
// 쪽지 보내기
send_memo($member['mb_id'], $recv_mb_id, $memo_content);
alert($re_ch['ch_name'] . '님께 선물이 배송되었습니다.', $return_url, FALSE);
}
alert('사용 및 적용이 실패하였습니다.', $return_url);

View file

@ -0,0 +1,66 @@
<?php
include_once './_common.php';
$ch = get_character($ch_id);
if ($url) {
$return_url = urldecode($url);
} else {
$return_url = "./viewer.php?ch_id=" . $ch_id;
}
if (!$ch['ch_id']) {
alert('캐릭터 정보가 존재하지 않습니다.');
}
$item_data_path = G5_DATA_PATH . "/item";
$item_data_url = G5_DATA_URL . "/item";
@mkdir($item_data_path, G5_DIR_PERMISSION);
@chmod($item_data_path, G5_DIR_PERMISSION);
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id and inven.ch_id = '{$ch_id}'");
$it_id = $in['it_id'];
if ($in['it_type'] != '아이템추가') {
alert('올바른 아이템 정보가 아닙니다.');
}
$tmp_row = sql_fetch(" select max(it_id) as max_it_id from {$g5['item_table']} ");
$it_id = $tmp_row['max_it_id'] + 1;
$sql_common = "";
if ($img = $_FILES['it_img']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("아이템 이미지가 gif, jpg, png 파일이 아닙니다.");
} else {
// 확장자 따기
$exp = explode(".", $_FILES['it_img']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "item_" . $it_id . "_img." . $exp;
upload_file($_FILES['it_img']['tmp_name'], $image_name, $item_data_path);
$it_img = $item_data_url . "/" . $image_name;
$sql_common = " , it_img = '{$it_img}' ";
}
}
$sql_common = " it_name = '{$_POST['it_name']}',
it_category = '개인',
it_content = '{$_POST['it_content']}'
{$sql_common} ";
$sql = " insert into {$g5['item_table']} set it_id = '{$it_id}', {$sql_common}";
sql_query($sql);
$sql = " insert into {$g5['inventory_table']}
set ch_id = '$ch_id',
it_id = '$it_id',
it_name = '{$_POST['it_name']}',
ch_name = '{$ch['ch_name']}'";
sql_query($sql);
// 아이템 삭제
delete_inventory($in_id);
goto_url($return_url);

View file

@ -0,0 +1,30 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
$inven_list = [];
$p_count = 0;
// 개인 아이템 - 선물
$pe_inven_sql = "select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.ch_id = '$ch_id' and item.it_id = inven.it_id and inven.se_ch_id != '' order by inven.it_id asc";
$pe_inven_result = sql_query($pe_inven_sql);
for ($i = 0; $row = sql_fetch_array($pe_inven_result); $i++) {
$inven_list[$p_count] = $row;
$p_count++;
}
// 개인 아이템 - 비선물
$pe_inven_sql = "select *, count(*) as cnt from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.ch_id = '$ch_id' and item.it_id = inven.it_id and inven.se_ch_id = '' group by inven.it_id order by inven.it_id asc";
$pe_inven_result = sql_query($pe_inven_sql);
for ($i; $row = sql_fetch_array($pe_inven_result); $i++) {
$inven_list[$p_count] = $row;
$p_count++;
}
$i = 0;
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/inventory/list.skin.php")) {
include(G5_THEME_PATH . "/inventory/list.skin.php");
} else {
include(G5_PATH . "/inventory/skin/list.skin.php");
}

View file

@ -0,0 +1,18 @@
<?php
include_once './_common.php';
if ($url) {
$return_url = urldecode($url);
} else {
$return_url = "./viewer.php?ch_id=" . $ch_id;
}
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id");
if (!$in['in_id']) {
echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>";
} else {
$money = $in['it_sell'];
insert_point($member['mb_id'], $money, '아이템 : ' . $in['it_name'] . ' 판매보상 ( ' . $money . $config['cf_money_pice'] . ' 획득 )', 'item', time(), '판매');
delete_inventory($in['in_id']);
echo "LOCATIONURL||||" . $return_url;
}

View file

@ -0,0 +1,15 @@
<?php
include_once './_common.php';
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id");
if (!$in['in_id']) {
echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>";
} else {
if ($in['ch_id'] == $character['ch_id']) {
$ch = $character;
} else {
$ch = get_character($in['ch_id']);
}
include('./inc/send_item_form.php');
}

View file

@ -0,0 +1,52 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
<div class="info">
<div class="ui-thumb">
<img src="<?= $in['it_img'] ?>" />
</div>
</div>
<div class="text">
<p class="title">
<?= $in['it_name'] ?>
<span><?= number_format($in['it_sell']) ?><?= $config['cf_money_pice'] ?></span>
</p>
<div class="item-content-box">
<div class="default">
<?= $in['it_content'] ?>
</div>
<?php if ($in['it_content2']) { ?>
<div class="effect">
<?= $in['it_content2'] ?>
</div>
<?php } ?>
<?php if ($in['se_ch_name']) { ?>
<div class="memo">
<?php if ($in['in_memo']) { ?>
<p><?= $in['in_memo'] ?></p><?php } ?>
<p style="text-align: right;">By. <?= $in['se_ch_name'] ?></p>
</div>
<?php } ?>
</div>
</div>
<div class="control-box">
<?php if ($is_mine) { ?>
<ul>
<?php if ($in['it_use_sell']) { ?>
<li><a href="javascript:fn_inven_link_event('<?= $in['in_id'] ?>', 'sell');" data-idx="<?= $in['in_id'] ?>"
data-type="sell" class="ui-style-btn">판매하기</a></li>
<?php } ?>
<?php if ($in['it_use_able']) { ?>
<li><a href="javascript:fn_inven_link_event('<?= $in['in_id'] ?>', 'use');" data-idx="<?= $in['in_id'] ?>"
data-type="use" class="ui-style-btn">사용하기</a></li>
<?php } ?>
<?php if (!$in['it_has']) { ?>
<li><a href="javascript:fn_inven_link_event('<?= $in['in_id'] ?>', 'take');" data-idx="<?= $in['in_id'] ?>"
data-type="take" class="ui-style-btn">선물하기</a></li>
<?php } ?>
</ul>
<?php } ?>
</div>

View file

@ -0,0 +1,32 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
<ul class="inventory-list">
<?php
for ($i = 0; $i < count($inven_list); $i++) { ?>
<li class="box-line bak">
<?php if ($inven_list[$i]['in_id']) { ?>
<a href="#<?= $inven_list[$i]['in_id'] ?>" class="inven-open-popup" data-idx="<?= $inven_list[$i]['in_id'] ?>"
data-type="">
<img src="<?= $inven_list[$i]['it_img'] ?>" />
<?php if ($inven_list[$i]['cnt'] > 1) { ?>
<i class="count"><?= $inven_list[$i]['cnt'] ?></i>
<?php } ?>
<?php if ($inven_list[$i]['se_ch_id'] != '') { ?>
<i class="present"></i>
<?php } ?>
</a>
<?php } ?>
</li>
<?php }
if ($i == 0) {
?>
<li class="no-data">
보유중인 아이템이 없습니다.
</li>
<?php } ?>
</ul>

View file

@ -0,0 +1,66 @@
<?php
include_once './_common.php';
function location_url($url)
{
return "LOCATIONURL||||{$url}";
}
if ($url) {
$return_url = urldecode($url);
} else {
$return_url = "./viewer.php?ch_id=" . $ch_id;
}
$in = sql_fetch("select * from {$g5['inventory_table']} inven, {$g5['item_table']} item where inven.in_id = '{$in_id}' and inven.it_id = item.it_id");
if ($in['ch_id'] == $character['ch_id']) {
$ch = $character;
} else {
$ch = get_character($in['ch_id']);
}
if (!$in['in_id']) {
echo "<p>아이템 보유 정보를 확인할 수 없습니다.</p>";
} else {
$inven_function = $in['it_type'];
if ($inven_function == "프로필수정") {
echo location_url(G5_URL . "/mypage/character/character_form.php?w=u&ch_id=" . $in['ch_id'] . "&in_id=" . $in['in_id'] . "&url=" . $url);
}
if ($inven_function == "아이템추가") {
include('./inc/add_item_form.php');
}
if ($inven_function == "스탯회복") {
set_status($ch['ch_id'], $in['st_id'], ($in['it_value'] * -1));
delete_inventory($in['in_id'], $in['it_use_ever']);
echo location_url($return_url);
}
if ($inven_function == "뽑기") {
$result = get_item_explo($in['ch_id'], $in['it_id']);
delete_inventory($in['in_id'], $in['it_use_ever']);
if ($result['it_name']) {
alert("{$result['it_name']}』 획득 성공!");
} else {
alert("아무것도 획득하지 못했습니다.", $return_url . "&amp;tabs=i");
}
}
// use_item.php 파일을 수정할 필요가 없도록 확장합니다.
$use_extend_file = [];
$use_tmp = dir(G5_PATH . "/inventory/extend");
while ($entry = $use_tmp->read()) {
// php 파일만 include 함
if (preg_match("/(\.php)$/i", $entry))
$use_extend_file[] = $entry;
}
if (!empty($use_extend_file) && is_array($use_extend_file)) {
natsort($use_extend_file);
foreach ($use_extend_file as $file) {
include_once G5_PATH . "/inventory/extend/" . $file;
}
}
unset($use_extend_file);
}

View file

@ -0,0 +1,2 @@
<?php
include_once '../common.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_head.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/tail.sub.php';

View file

@ -0,0 +1,66 @@
<?php
include_once './_common.php';
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id=" . $ch_id);
if (!$ch['ch_id']) {
alert("캐릭터 정보가 존재하지 않습니다.");
}
$g5['title'] = $ch['ch_name'] . " 옷장";
include_once './_head.sub.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/closet.css">', 0);
$cl = [];
$cl_result = sql_query("select * from {$g5['closthes_table']} where ch_id = '{$ch_id}' order by cl_type desc, cl_id asc");
$str_array_data = "";
$array_data = "";
for ($i = 0; $row = sql_fetch_array($cl_result); $i++) {
$cl[$i] = $row;
$array_data .= "{$str_array_data}'{$row['cl_subject']}'";
$str_array_data = ",";
}
?>
<div id="closet_page" class="none-trans">
<div class="closet-menu theme-box">
<div class="pager"></div>
</div>
<div class="swiper-container">
<ul class="swiper-wrapper">
<?php for ($i = 0; $i < count($cl); $i++) { ?>
<li class="swiper-slide">
<a href="<?= $cl[$i]['cl_path'] ?>"
onclick="window.open(this.href, 'big_viewer', 'width=500 height=800 menubar=no status=no toolbar=no location=no scrollbars=yes resizable=yes'); return false;"
style="background-image:url(<?= $cl[$i]['cl_path'] ?>);"></a>
</li>
<?php } ?>
</ul>
</div>
</div>
<script src="<?php echo G5_JS_URL ?>/swiper.js"></script>
<script>
var cl_name = [<?= $array_data ?>];
$(function () {
var swiper = new Swiper("#closet_page .swiper-container", {
loop: true,
pagination: {
el: "#closet_page .pager",
clickable: true,
renderBullet: function (index, className) {
return '<span class="' + className + '">' + cl_name[index] + "</span>";
}
},
autoplay: {
delay: 4500,
disableOnInteraction: false,
},
});
});
</script>
<?php
include_once './_tail.sub.php';
?>

102
AvocadoAmber/member/exp.php Normal file
View file

@ -0,0 +1,102 @@
<?php
include_once './_common.php';
$ch = get_character($ch_id);
if (!$ch['ch_id'])
alert_close("캐릭터 정보를 확인할 수 없습니다.");
$g5['title'] = $ch['ch_name'] . " " . $config['cf_exp_name'] . " 획득 내역";
include_once './_head.sub.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/exp.css">', 0);
$list = [];
$sql_common = " from {$g5['exp_table']} where ch_id = '{$ch['ch_id']}' ";
$sql_order = " order by ch_id desc ";
$sql = " select count(*) as cnt {$sql_common} ";
$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; // 시작 열을 구함
?>
<div id="member_view_point">
<div class="ui-profile">
<em>
<img src="<?= $ch['ch_thumb'] ?>" />
</em>
<p class="name txt-point"><?= $ch['ch_name'] ?></p>
<?php if ($config['cf_side_title']) { ?>
<p><?= $config['cf_side_title'] ?> : <?= get_side_name($ch['ch_side']) ?></p>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<p><?= $config['cf_class_title'] ?> : <?= get_class_name($ch['ch_class']) ?></p>
<?php } ?>
<p><?= $config['cf_exp_name'] ?> : <?= $ch['ch_exp'] ?><?= $config['cf_exp_pice'] ?></p>
</div>
</div>
<table class="theme-list">
<thead>
<tr>
<th scope="col">일자</th>
<th scope="col">내용</th>
<th scope="col"><?= $config['cf_exp_name'] ?></th>
</tr>
</thead>
<tbody>
<?php
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$point1 = $point2 = 0;
if ($row['ex_point'] > 0) {
$point1 = number_format($row['ex_point']);
$sum_point1 += $row['ex_point'];
} else {
$point2 = number_format($row['ex_point']);
$sum_point2 += $row['ex_point'];
}
$ex_content = $row['ex_content'];
?>
<tr>
<td class="txt-center">
<?php echo date('Y-m-d', strtotime($row['ex_datetime'])); ?>
</td>
<td><?php echo $ex_content; ?></td>
<td class="txt-right" style="padding-right: 15px;"><?php echo $point1; ?> <?= $config['cf_exp_pice'] ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="3" class="empty">자료가 없습니다.</td></tr>';
else {
if ($sum_point1 > 0)
$sum_point1 = "+" . number_format($sum_point1);
$sum_point2 = number_format($sum_point2);
}
?>
</tbody>
</table>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'] . '?' . $qstr . '&amp;ch_id=' . $ch_id . '&amp;page='); ?>
<hr class="padding" />
<?php
include_once './_tail.sub.php';
?>

View file

@ -0,0 +1,38 @@
<?php
include_once './_common.php';
// 진영별로 출력하기
$list = [];
$side = [];
$ch_list = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select * from {$g5['side_table']}");
for ($i = 0; $si = sql_fetch_array($side_result); $i++) {
$list[] = get_character_list($si['si_id']);
$side[] = $si;
}
}
if (!$config['cf_side_title'] || count($side) < 2) {
$list = [];
$side = [];
$list[] = get_character_list();
$side[] = '';
}
$g5['title'] = "멤버란";
include_once G5_PATH . '/head.php';
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/member/list.skin.php")) {
include(G5_THEME_PATH . "/member/list.skin.php");
} else {
include(G5_PATH . "/member/skin/list.skin.php");
}
unset($ch);
unset($list);
include_once G5_PATH . '/tail.php';

View file

@ -0,0 +1,155 @@
<?php
include_once './_common.php';
$g5['title'] = "신청자 대기 목록";
include_once './_head.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/style.member.css">', 0);
// 추가 항목 설정 데이터
// -- 권한 설정에 따라 가져오기
// -- 관리자 권한 제외 하고 가져온다.
$ch_ar = [];
$ar_result = sql_query("select * from {$g5['article_table']} where ar_secret != 'H' order by ar_order asc");
for ($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
/** 세력 정보 **/
$ch_si = [];
if ($config['cf_side_title']) {
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
$ch_cl = [];
if ($config['cf_class_title']) {
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
$search_arcode = false;
if ($stx) {
$check_sfl = explode("||", $sfl);
if ($check_sfl[0] == 'arcode') {
// 추가 필드 검색
$search_arcode = true;
$sql_common = "from {$g5['character_table']} ch join {$g5['value_table']} cv on ch.ch_id = cv.ch_id where (ch.ch_state = '대기' OR ch.ch_state = '수정중') and cv.av_value like '%{$stx}%' and cv.ar_code = '{$check_sfl[1]}' ";
if ($s_class) {
$sql_search .= "and ch.ch_class = '{$s_class}'";
}
if ($s_side) {
$sql_search .= "and ch.ch_side = '{$s_side}'";
}
$sql_order = "order by ch.ch_id desc ";
}
}
if (!$search_arcode) {
$sql_common = "from {$g5['character_table']} where ch_state != '승인' and ch_state != '삭제' ";
if ($s_class) {
$sql_search .= "and ch_class = '{$s_class}'";
}
if ($s_side) {
$sql_search .= "and ch_side = '{$s_side}'";
}
if ($stx) {
if ($sfl == 'mb_name') {
$temp_search = "";
$connect_str = "";
$temp = sql_query("select mb_id from {$g5['member_table']} where mb_name like '%" . $stx . "%'");
for ($t = 0; $row = sql_fetch_array($temp); $t++) {
$temp_search .= $connect_str . "mb_id = '" . $row['mb_id'] . "'";
$connect_str = " OR ";
}
if ($temp_search)
$sql_search .= "and ( " . $temp_search . " ) ";
else
$sql_search .= "and ( mb_id = '' ) ";
} else {
$sql_search .= " and $sfl like '%" . $stx . "%' ";
}
}
$sql_order = "order by ch_id desc";
}
$all_count = sql_fetch("select count(*) as cnt $sql_common");
$all_count = $all_count['cnt'];
$total_count = sql_fetch("select count(*) as cnt $sql_common $sql_search $sql_order");
$total_count = $total_count['cnt'];
$page_rows = 10;
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$sql = "select * $sql_common $sql_search $sql_order limit {$from_record}, $page_rows ";
$rank_result = sql_query($sql);
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './ready.php?s_class=' . $s_class . '&s_side=' . $s_side . '&sfl=' . $sfl . '&stx=' . $stx . '&page=');
$side_link = "<li class='menu-first'><a href='" . G5_URL . "/member/ready.php'><span>ALL({$all_count})</span></a></li>";
$character_list = [];
for ($i = 0; $row = sql_fetch_array($rank_result); $i++) {
$character_list[] = $row;
}
for ($i = 0; $i < count($ch_si); $i++) {
if ($s_side == $ch_si[$i]['id']) {
$class = " style='color: rgb(255, 213, 0);' ";
} else {
$class = "";
}
$count = sql_fetch("select count(*) as cnt " . $sql_common . " and ch_side = '{$ch_si[$i]['id']}'");
$side_link .= "
<li>
<a href='" . G5_URL . "/member/ready.php?s_class={$ch_cl[$j]['id']}&amp;s_side={$ch_si[$i]['id']}&amp;sfl=" . $sfl . "&amp;stx=" . $stx . "' $class>
<span style='font-size:11px;font-family:\"Dotum\";letter-spacing: -1px;'>" . $ch_si[$i]['name'] . " " . $ch_cl[$j]['name'] . "({$count['cnt']})</span>
</a>";
if (count($ch_cl) > 0) {
$side_link .= "<ul>";
for ($k = 0; $k < count($ch_cl); $k++) {
if ($s_class == $ch_cl[$k]['id'] && $s_side == $ch_si[$i]['id']) {
$class = " style='color: rgb(255, 213, 0);' ";
} else {
$class = "";
}
$c_count = sql_fetch("select count(*) as cnt " . $sql_common . " and ch_side = '{$ch_si[$i]['id']}' and ch_class = '{$ch_cl[$k]['id']}'");
$side_link .= "<li>
<a href='" . G5_URL . "/member/ready.php?s_class={$ch_cl[$k]['id']}&amp;s_side={$ch_si[$i]['id']}&amp;sfl=" . $sfl . "&amp;stx=" . $stx . "' $c_class>
<span style='font-size:11px;font-family:\"Dotum\";letter-spacing: -1px;'>{$ch_cl[$k]['name']}({$c_count['cnt']})</span>
</a>
</li>";
}
$side_link .= "</ul>";
}
$side_link .= "</li>";
}
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/member/ready_list.skin.php")) {
include(G5_THEME_PATH . "/member/ready_list.skin.php");
} else {
include(G5_PATH . "/member/skin/ready_list.skin.php");
}
unset($rank_result);
unset($ch);
include_once './_tail.php';

View file

@ -0,0 +1,53 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/member.css">', 0);
?>
<div class="memberWrap">
<?php for ($i = 0; $i < count($list); $i++) {
$ch_list = $list[$i];
?>
<div class="member-box">
<?php if (is_array($side[$i]) && $side[$i]['si_name']) {
echo "<div class='title'>{$side[$i]['si_name']}</div>";
}
?>
<ul class="member-list">
<?php for ($k = 0; $k < count($ch_list); $k++) {
$ch = $ch_list[$k];
?>
<li>
<div class="item theme-box">
<div class="ui-thumb">
<a href="./viewer.php?ch_id=<?= $ch['ch_id'] ?>">
<?php if ($ch['ch_thumb']) { ?>
<img src="<?= $ch['ch_thumb'] ?>" />
<?php } ?>
</a>
</div>
<div class="ui-profile">
<a href="<?= G5_BBS_URL ?>/memo_form.php?me_recv_mb_id=<?= $ch['mb_id'] ?>" class='send_memo'>
<strong><?= $ch['ch_name'] ?></strong>
</a>
</div>
</div>
</li>
<?php
}
if ($k == 0) {
echo "<li class='no-data'>등록된 멤버가 없습니다.</li>";
}
?>
</ul>
</div>
<?php } ?>
</div>
<script>
$('.send_memo').on('click', function () {
var target = $(this).attr('href');
window.open(target, 'memo', "width=500, height=300");
return false;
});
</script>

View file

@ -0,0 +1,98 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/member.css">', 0);
?>
<nav id="submenu" class="scroll-fix">
<ul>
<?= $side_link ?>
</ul>
</nav>
<div id="subpage">
<div class="searc-sub-box" style="padding: 10px 5px;">
<div class="ui-search-box">
<form name='frmSearch' method='get'>
<fieldset class="sch_category">
<select name="sfl">
<option value="mb_name" <?= $sfl == 'mb_name' ? "selected" : "" ?>>오너명</option>
<option value="ch_name" <?= $sfl == 'ch_name' ? "selected" : "" ?>>캐릭명</option>
<?php if (count($ch_ar) > 0) {
for ($i = 0; $i < count($ch_ar); $i++) {
?>
<option value="arcode||<?= $ch_ar[$i]['ar_code'] ?>" <?= $sfl == 'arcode||' . $ch_ar[$i]['ar_code'] ? "selected" : "" ?>><?= $ch_ar[$i]['ar_name'] ?></option>
<?php }
} ?>
</select>
</fieldset>
<fieldset class="sch_text">
<input type="text" name="stx" value="<?= $stx ?>" />
</fieldset>
<fieldset class="sch_button">
<input type="submit" value="Search" class="ui-btn" />
</fieldset>
</form>
</div>
</div>
<div class="ui-page txt-center">
<?= $write_pages ?>
</div>
<ul class="ready-member-list">
<?php
for ($i = 0; $i < count($character_list); $i++) {
$ch = $character_list[$i];
?>
<li>
<div class="item theme-box">
<div class="ui-thumb">
<a href="./viewer.php?ch_id=<?= $ch['ch_id'] ?>">
<?php if ($ch['ch_thumb']) { ?>
<img src="<?= $ch['ch_thumb'] ?>" />
<?php } ?>
</a>
</div>
<div class="ui-profile">
<p class="name">
<a href="./viewer.php?ch_id=<?= $ch['ch_id'] ?>">
<strong>[<?= $ch['ch_state'] ?>] <?= $ch['ch_name'] ?></strong>
</a>
</p>
<span>
<?php
if ($config['cf_side_title']) {
echo get_side_name($ch['ch_side']);
}
if ($config['cf_class_title']) {
if ($config['cf_side_title']) {
echo " / ";
}
echo get_class_name($ch['ch_class']);
}
?>
</span>
<span class="owner">
<?= get_member_name($ch['mb_id']) ?>
</span>
</div>
</div>
</li>
<?php
}
if ($i == 0) {
echo "<li class='empty'>대기자가 없습니다.</li>";
}
?>
</ul>
<div class="ui-page">
<?= $write_pages ?>
</div>
</div>

View file

@ -0,0 +1,276 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/member.css">', 0);
?>
<div id="character_profile">
<nav id="profile_menu">
<?php if ($article['ad_use_closet'] && $article['ad_use_body']) { ?>
<a href="<?= G5_URL ?>/member/closet.php?ch_id=<?= $ch['ch_id'] ?>"
onclick="window.open(this.href, 'big_viewer', 'width=800 height=800 menubar=no status=no toolbar=no location=no scrollbars=yes resizable=yes'); return false;"
class="ui-btn ico point camera circle big">
옷장보기
</a>
<?php } ?>
<?php if ($article['ad_use_exp']) { ?>
<a href="<?= G5_URL ?>/member/exp.php?ch_id=<?= $ch['ch_id'] ?>"
onclick="popup_window(this.href, 'exp', 'width=400, height=500'); return false;"
class="ui-btn ico point exp circle big">
경험치 내역 보기
</a>
<?php } ?>
</nav>
<!-- 캐릭터 비쥬얼 (이미지) 출력 영역 -->
<div class="visual-area">
<?php if ($article['ad_use_body'] && $ch['ch_body']) { ?>
<div id="character_body">
<img src="<?= $ch['ch_body'] ?>" alt="캐릭터 전신" />
</div>
<?php } ?>
<?php if ($article['ad_use_head'] && $ch['ch_head']) { ?>
<div id="character_head">
<img src="<?= $ch['ch_head'] ?>" alt="캐릭터 흉상" />
</div>
<?php } ?>
</div>
<!-- //캐릭터 비쥬얼 (이미지) 출력 영역 -->
<!-- 캐릭터 기본정보 출력 영역 -->
<table class="theme-form">
<colgroup>
<col style="width: 110px;">
<col>
</colgroup>
<tbody>
<?php if ($article['ad_use_name']) { ?>
<tr>
<th scope="row"><?= $article['ad_text_name'] ?></th>
<td>
<?php echo $ch['ch_name'] ?>
</td>
</tr>
<?php } ?>
<?php if ($config['cf_side_title']) {
// 소속 정보 출력
?>
<tr>
<th><?= $config['cf_side_title'] ?></th>
<td>
<?= get_side_name($ch['ch_side']) ?>
</td>
</tr>
<?php } ?>
<?php if ($config['cf_class_title']) {
// 종족 정보 출력
?>
<tr>
<th><?= $config['cf_class_title'] ?></th>
<td>
<?= get_class_name($ch['ch_class']) ?>
</td>
</tr>
<?php } ?>
<?php if ($article['ad_use_rank']) {
// 랭킹정보 출력
?>
<tr>
<th scope="row"><?= $config['cf_rank_name'] ?></th>
<td>
<?php echo get_rank_name($ch['ch_rank']); ?>
</td>
</tr>
<?php } ?>
<?php if ($article['ad_use_exp']) {
// 경험치 정보 출력
?>
<tr>
<th scope="row"><?= $config['cf_exp_name'] ?></th>
<td>
<?= $ch['ch_exp'] ?>
<?= $config['cf_exp_pice'] ?>
</td>
</tr>
<?php } ?>
<?php for ($i = 0; $i < count($ch_ar); $i++) {
// 추가 프로필 항목 출력
$ar = $ch_ar[$i];
$key = $ar['ar_code'];
?>
<tr>
<th>
<?= $ar['ar_name'] ?>
</th>
<?php
if ($ar['ar_type'] == 'file' || $ar['ar_type'] == 'url') {
?>
<td>
<img src="<?= $ch[$key] ?>" />
</td>
<?php } else { ?>
<td>
<?php
if ($ar['ar_type'] == 'textarea')
echo nl2br($ch[$key]);
else
echo $ch[$key];
if ($ar['ar_type'] != 'textarea' && $ar['ar_type'] != 'select')
echo $ar['ar_text'];
?>
</td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
<!-- // 캐릭터 기본정보 출력 영역 -->
<?php if ($article['ad_use_status']) { // 스탯 설정 ?>
<hr class="padding" />
<h3>
STATUS
<span style="float:right;">
<em class="txt-point" data-type="point_space"><?= get_space_status($ch['ch_id']) ?></em> / <?= $ch['ch_point'] ?>
</span>
</h3>
<div class="theme-box">
<div class="status-bar">
<?php for ($i = 0; $i < count($status); $i++) {
$status[$i]['has'] = $status[$i]['has'] ? $status[$i]['has'] : $status[$i]['min'];
$status_percent = $status[$i]['max'] ? $status[$i]['has'] / $status[$i]['max'] * 100 : 0;
$mine_percent = $status[$i]['max'] ? $status[$i]['now'] / $status[$i]['max'] * 100 : 0;
$resent_use_point += $status[$i]['has'];
$sub_text = "";
if ($status[$i]['drop'])
$sub_text = "(" . $status[$i]['now'] . ")";
?>
<dl>
<dt><?= $status[$i]['name'] ?></dt>
<dd>
<p>
<i><?= $status[$i]['has'] ?><?= $sub_text ?></i>
<span style="width: <?= $status_percent ?>%;"></span>
<sup style="width: <?= $mine_percent ?>%;"></sup>
</p>
</dd>
</dl>
<?php } ?>
</div>
</div>
<?php } ?>
<?php if ($article['ad_use_title']) { // 타이틀 설정 ?>
<hr class="padding" />
<h3>
TITLE
</h3>
<div class="theme-box">
<div class="title-list">
<?php for ($i = 0; $i < count($title); $i++) { ?>
<img src="<?= $title[$i]['ti_img'] ?>" />
<?php }
if ($i == 0) {
echo "<div class='no-data'>보유중인 타이틀이 없습니다.</div>";
}
?>
</div>
</div>
<?php } ?>
<?php if ($article['ad_use_inven']) { // 인벤토리 출력 ?>
<hr class="padding" />
<h3>
INVENTORY
<?php if ($article['ad_use_money']) { // 소지금 사용시 현재 보유 중인 소지금 출력 ?>
<span style="float:right;">
<em class="txt-point"><?= $mb['mb_point'] ?></em><?= $config['cf_money_pice'] ?>
</span>
<?php } ?>
</h3>
<div class="theme-box">
<?php include(G5_PATH . "/inventory/list.inc.php"); ?>
</div>
<?php } ?>
<?php if ($ch['ch_state'] == '승인') { // 관계란 출력, 승인된 캐릭터만 출력됩니다. ?>
<hr class="padding" />
<h3>STORY</h3>
<div class="relation-box">
<ul class="relation-member-list">
<?php
for ($i = 0; $i < count($relation); $i++) {
$re_ch = get_character($relation[$i]['re_ch_id']);
if ($relation[$i]['rm_memo'] == '') {
continue;
}
?>
<li>
<div class="ui-thumb">
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $re_ch['ch_id'] ?>" target="_blank">
<img src="<?= $re_ch['ch_thumb'] ?>" />
</a>
</div>
<div class="info">
<div class="rm-name">
<?= $re_ch['ch_name'] ?>
</div>
<div class="rm-like-style">
<p>
<?php for ($j = 0; $j < 5; $j++) {
$class = "";
$style = "";
if ($j < $relation[$i]['rm_like']) {
$class = "txt-point";
} else {
$style = "opacity: 0.2;";
}
echo "<i class='{$class}' style='{$style}'></i>";
} ?>
</p>
</div>
</div>
<div class="memo theme-box">
<?= nl2br($relation[$i]['rm_memo']) ?>
</div>
<ol>
<?php
$relation[$i]['rm_link'] = nl2br($relation[$i]['rm_link']);
$link_list = explode('<br />', $relation[$i]['rm_link']);
for ($j = 0; $j < count($link_list); $j++) {
$r_row = $link_list[$j];
if (!$r_row)
continue;
?>
<li>
<a href="<?= $r_row ?>" class="btn-log" target="_blank"></a>
</li>
<?php } ?>
</ol>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
<div class="ui-btn point small full">
오너 : <?= $mb['mb_name'] ?>
</div>
<hr class="padding" />
<hr class="padding" />
</div>

View file

@ -0,0 +1,90 @@
<?php
include_once './_common.php';
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id=" . $ch_id);
$mb = get_member($ch['mb_id']);
/** 추가 항목 설정값 가져오기 **/
$ch_ar = [];
$str_secret = " where (1) and ar_theme = '{$config['cf_theme']}' ";
if ($member['mb_id'] == $mb['mb_id']) {
$str_secret .= " and ar_secret != 'H' ";
} else {
$str_secret .= " and ar_secret = '' ";
}
$ar_result = sql_query("select * from {$g5['article_table']} {$str_secret} order by ar_order asc");
for ($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
/* --------------------------------------------------------------
프로필 양식에서 추가한 캐릭터의 데이터를 임의로 뿌리고 싶을
$ch['고유코드'] 해당 데이터를 가져올 있습니다.
--
스탯 설정에서 추가한 캐릭터의 데이터를 임의로 뿌리고 싶을
$변수 = get_status_by_name($ch['ch_id'], 스탯명);
* $변수['has'] : 현재 캐릭터가 가지고 있는 전체값 (ex. 캐릭터의 최대 HP )
* $변수['drop'] : 현재 캐릭터의 스탯 차감 수치 (ex. 캐릭터의 부상 수치, HP 감소)
* $변수['now'] : 현재 캐릭터에게 적용되어 있는 (ex. 캐릭터의 현재 HP (캐릭터의 원래 HP값 - 부상))
* $변수['max'] : 입력할 있는 최대값
* $변수['min'] : 필수 최소값
--
자동으로 출력 되는게 아닌 임의로 레이아웃을 수정하고 싶을
위쪽의 설정값 가져 오는 부분을 지우셔도 무방합니다.
--
------------------------------------------------------------------ */
// --- 캐릭터 별 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch['ch_id']}'");
for ($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch[$row['ar_code']] = $row['av_value'];
}
// ------- 캐릭터 스탯 정보 가져오기
$status = [];
if ($article['ad_use_status']) {
$st_result = sql_query("select * from {$g5['status_config_table']} order by st_order asc");
for ($i = 0; $row = sql_fetch_array($st_result); $i++) {
$status[$i] = get_status($ch['ch_id'], $row['st_id']);
$status[$i]['name'] = $row['st_name'];
}
}
// ------- 캐릭터 타이틀 정보 가져오기
$title = [];
if ($article['ad_use_title']) {
$ti_result = sql_query("select * from {$g5['title_has_table']} th, {$g5['title_table']} ti where th.ti_id = ti.ti_id and th.ch_id = '{$ch['ch_id']}'");
for ($i = 0; $row = sql_fetch_array($ti_result); $i++) {
$title[$i] = $row;
}
}
// ------- 캐릭터 관계 정보 가져오기
$relation = [];
if ($ch['ch_state'] == '승인') {
$relation_result = sql_query("select * from {$g5['relation_table']} where ch_id='{$ch_id}' order by rm_order asc, rm_id desc");
for ($i = 0; $row = sql_fetch_array($relation_result); $i++) {
$relation[$i] = $row;
}
}
// ------- 캐릭터 의상 정보 가져오기
if ($article['ad_use_closet'] && $article['ad_use_body']) {
$temp_cl = sql_fetch("select * from {$g5['closthes_table']} where ch_id = '{$ch_id}' and cl_use = '1'");
if ($temp_cl['cl_path']) {
$ch['ch_body'] = $temp_cl['cl_path'];
}
}
$g5['title'] = $ch['ch_name'] . " 프로필";
include_once G5_PATH . '/head.php';
if (defined('G5_THEME_PATH') && is_file(G5_THEME_PATH . "/member/viewer.skin.php")) {
include(G5_THEME_PATH . "/member/viewer.skin.php");
} else {
include(G5_PATH . "/member/skin/viewer.skin.php");
}
include_once G5_PATH . '/tail.php';

View file

@ -0,0 +1,5 @@
<?php
include_once '../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,25 @@
<?php
if (!defined('_GNUBOARD_'))
exit;define('_MYPAGE_', true);
$g5['title'] = $member['mb_name'] . " 마이페이지";
include_once G5_PATH . '/_head.php';
add_stylesheet('<link rel="stylesheet" href="' . G5_CSS_URL . '/mypage.css">', 0);
// 기본 항목 설정 데이터
$ad = $article;
?>
<div class="mypageWrap">
<div class="mypageInside">
<nav id="submenu">
<ul>
<li><a href="<?php echo G5_URL; ?>/mypage/"><span>계정정보</span></a></li>
<li><a href="<?php echo G5_URL; ?>/mypage/character"><span>캐릭터</span></a></li>
<li><a href="<?php echo G5_URL; ?>/mypage/log"><span>로그내역</span></a></li>
<?php if ($ad['ad_use_money']) { ?>
<li><a href="<?php echo G5_URL; ?>/mypage/money"><span><?= $config['cf_money'] ?>관리</span></a></li>
<?php } ?>
<li><a href="<?php echo G5_URL; ?>/mypage/memo"><span>우편함</span></a></li>
</ul>
</nav>
<div id="subpage">

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/head.sub.php';

View file

@ -0,0 +1,9 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
</div>
</div>
</div>
<?php
include_once G5_PATH . '/_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once G5_PATH . '/tail.sub.php';

View file

@ -0,0 +1,5 @@
<?php
include_once '../../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,9 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_head.php';
?>
<h2 class="page-title">
<strong>캐릭터 관리</strong>
<span>Character management</span>
</h2>

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../tail.sub.php';

View file

@ -0,0 +1,33 @@
<?php
include_once "./_common.php";
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id = '{$ch_id}'");
if (!$ch['ch_id']) {
alert("{$ch['ch_id']} : 캐릭터 자료가 존재하지 않습니다.");
}
if ($ch['mb_id'] != $member['mb_id'] && !$is_admin) {
alert("삭제권한이 없습니다.");
}
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_thumb']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_head']);
@unlink($prev_file_path);
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_body']);
@unlink($prev_file_path);
sql_query(" delete from {$g5['character_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['value_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['exp_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['title_has_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['closthes_table']} where ch_id = '{$ch['ch_id']}' ");
sql_query(" delete from {$g5['inventory_table']} where ch_id = '{$ch['ch_id']}' ");
$sql = " update {$g5['member_table']}
set ch_id = ''
where mb_id = '{$ch['mb_id']}' and ch_id = '{$ch['ch_id']}' ";
sql_query($sql);
goto_url("./index.php");

View file

@ -0,0 +1,384 @@
<?php
include_once './_common.php';
include_once './_head.php';
define('_CHARACTER_FORM_', TRUE);
$mb = $member;
if ($in_id) {
$in = get_inventory_item($in_id);
}
// 추가 항목 설정 데이터
// -- 권한 설정에 따라 가져오기
// -- 관리자 권한 제외 하고 가져온다.
$ch_ar = [];
$str_secret = ' where (1) ';
if ($member['mb_id'] == $mb['mb_id']) {
$str_secret .= " and ar_secret != 'H' ";
} else {
$str_secret .= " and ar_secret = '' ";
}
if ($config['cf_theme']) {
$str_secret .= " and ar_theme = '{$config['cf_theme']}' ";
} else {
$str_secret .= " and ar_theme = '' ";
}
$ar_result = sql_query("select * from {$g5['article_table']} {$str_secret} order by ar_order asc");
for ($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
if ($ad['ad_use_status']) {
// 스탯 정보 가져오기
$status = [];
$st_result = sql_query("select * from {$g5['status_config_table']} order by st_order asc");
for ($i = 0; $row = sql_fetch_array($st_result); $i++) {
$status[$i] = $row;
}
}
/** 세력 정보 **/
if ($config['cf_side_title']) {
$ch_si = [];
$side_result = sql_query("select si_id, si_name from {$g5['side_table']} where si_auth <= '{$member['mb_level']}' order by si_id asc");
for ($i = 0; $row = sql_fetch_array($side_result); $i++) {
$ch_si[$i]['name'] = $row['si_name'];
$ch_si[$i]['id'] = $row['si_id'];
}
}
/** 종족 정보 **/
if ($config['cf_class_title']) {
$ch_cl = [];
$class_result = sql_query("select cl_id, cl_name from {$g5['class_table']} where cl_auth <= '{$member['mb_level']}' order by cl_id asc");
for ($i = 0; $row = sql_fetch_array($class_result); $i++) {
$ch_cl[$i]['name'] = $row['cl_name'];
$ch_cl[$i]['id'] = $row['cl_id'];
}
}
if ($w == "") {
if (!$is_add_character && !$is_admin) {
alert("현재 캐릭터 생성 기간이 아닙니다.", "./index.php");
}
$ch = sql_fetch("select count(ch_id) as cnt from {$g5['character_table']} where mb_id = '{$member['mb_id']}'");
// 생성한 캐릭터 갯수 제한 체크
if ($ch['cnt'] > $config['cf_character_count']) {
alert("생성 가능한 캐릭터 갯수를 초과하였습니다.", "./index.php");
}
$ch['ch_state'] = '수정중';
$ch['ch_type'] = 'main';
$ch['mb_id'] = $member['mb_id'];
$ch['ch_point'] = $config['cf_status_point'];
} else {
$ch = sql_fetch("select * from {$g5['character_table']} where ch_id = '{$ch_id}'");
if (empty($ch)) {
alert("캐릭터 내역이 존재하지 않습니다.");
}
if (!$is_mod_character && !$is_admin) {
if ($in['ch_id'] != $ch['ch_id'] || $in['it_type'] != '프로필수정') {
alert("캐릭터 수정 기간이 아닙니다.");
}
}
// 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch['ch_id']}'");
for ($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch[$row['ar_code']] = $row['av_value'];
}
}
?>
<form name="fwrite" id="fwrite" action="./character_form_update.php" onsubmit="return fwrite_submit(this);"
method="post" enctype="multipart/form-data" autocomplete="off" class="ui-register-form">
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="mb_id" value="<?php echo $ch['mb_id']; ?>">
<input type="hidden" name="it_id" value="<?php echo $it_id; ?>">
<input type="hidden" name="in_id" value="<?php echo $in_id; ?>">
<input type="hidden" name="ch_id" value="<?php echo $ch['ch_id']; ?>">
<input type="hidden" name="ch_type" value="<?php echo $ch['ch_type']; ?>">
<input type="hidden" name="ch_point" value="<?php echo $ch['ch_point']; ?>">
<?php if ($ch['ch_state'] == "승인") { ?>
<input type="hidden" name="ch_state" value="<?= $ch['ch_state'] ?>" />
<?php } else { ?>
<h3 class="sub-title">신청서 상태</h3>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<tbody>
<tr>
<th>신청서상태</th>
<td>
<?php echo help('※ 신청서 작성 완료 후, <span class="txt-point">[수정완료]</span>로 변경해 주시길 바랍니다.') ?>
<select name="ch_state">
<option value="수정중" <?= $ch['ch_state'] == "수정중" ? "selected" : "" ?>>수정중</option>
<option value="대기" <?= $ch['ch_state'] == "대기" ? "selected" : "" ?>>수정완료</option>
</select>
</td>
</tr>
</tbody>
</table>
<hr class="padding" />
<?php } ?>
<h3 class="sub-title">캐릭터 기본정보</h3>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<tbody>
<tr>
<th scope="row"><?= $ad['ad_text_name'] ?></th>
<td>
<p class="ui-helper"><?= $ad['ad_help_name'] ?></p>
<input type="text" name="ch_name" value="<?php echo $ch['ch_name'] ?>" id="ch_name">
</td>
</tr>
<?php if ($config['cf_side_title']) { ?>
<tr>
<th><?= $config['cf_side_title'] ?></th>
<td>
<select name="ch_side" id="ch_side">
<option value=""><?= $config['cf_side_title'] ?> 선택</option>
<?php for ($i = 0; $i < count($ch_si); $i++) { ?>
<option value="<?= $ch_si[$i]['id'] ?>" <?= $ch['ch_side'] == $ch_si[$i]['id'] ? "selected" : "" ?>>
<?= $ch_si[$i]['name'] ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<tr>
<th><?= $config['cf_class_title'] ?></th>
<td>
<select name="ch_class" id="ch_class">
<option value=""><?= $config['cf_class_title'] ?> 선택</option>
<?php for ($i = 0; $i < count($ch_cl); $i++) { ?>
<option value="<?= $ch_cl[$i]['id'] ?>" <?= $ch['ch_class'] == $ch_cl[$i]['id'] ? "selected" : "" ?>>
<?= $ch_cl[$i]['name'] ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<hr class="padding" />
<h3 class="sub-title">캐릭터 이미지 정보</h3>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<tbody>
<?php if ($ad['ad_use_thumb']) { ?>
<tr>
<th><?= $ad['ad_text_thumb'] ?></th>
<td>
<?php echo help($ad['ad_help_thumb']) ?>
<?php if ($ad['ad_url_thumb']) { // 두상 - 외부링크 등록 ?>
<input type="text" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" />
<?php } else { // 두상 - 직접 업로드 ?>
<input type="file" name="ch_thumb_file" accept="image/*" />
<input type="hidden" name="ch_thumb" value="<?php echo $ch['ch_thumb'] ?>" />
<?php } ?>
<?php if ($ch['ch_thumb']) { ?>
<a href="<?= $ch['ch_thumb'] ?>" class="ui-btn" target="_blank">
<?= $ad['ad_text_thumb'] ?> 이미지 확인
</a>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($ad['ad_use_head']) { ?>
<tr>
<th><?= $ad['ad_text_head'] ?></th>
<td>
<?php echo help($ad['ad_help_head']) ?>
<?php if ($ad['ad_url_head']) { // 두상 - 외부링크 등록 ?>
<input type="text" name="ch_head" value="<?php echo $ch['ch_head'] ?>" />
<?php } else { // 두상 - 직접 업로드 ?>
<input type="file" name="ch_head_file" accept="image/*" />
<input type="hidden" name="ch_head" value="<?php echo $ch['ch_head'] ?>" />
<?php } ?>
<?php if ($ch['ch_head']) { ?>
<a href="<?= $ch['ch_head'] ?>" class="ui-btn" target="_blank">
<?= $ad['ad_text_head'] ?> 이미지 확인
</a>
<?php } ?>
</td>
</tr>
<?php } ?>
<?php if ($ad['ad_use_body']) { ?>
<tr>
<th><?= $ad['ad_text_body'] ?></th>
<td>
<?php echo help($ad['ad_help_body']) ?>
<?php if ($ad['ad_url_body']) { // 두상 - 외부링크 등록 ?>
<input type="text" name="ch_body" value="<?php echo $ch['ch_body'] ?>" />
<?php } else { // 두상 - 직접 업로드 ?>
<input type="file" name="ch_body_file" accept="image/*" />
<input type="hidden" name="ch_body" value="<?php echo $ch['ch_body'] ?>" />
<?php } ?>
<?php if ($ch['ch_body']) { ?>
<a href="<?= $ch['ch_body'] ?>" class="ui-btn" target="_blank">
<?= $ad['ad_text_body'] ?> 이미지 확인
</a>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<hr class="padding" />
<?php if ($ad['ad_use_status']) { ?>
<h3 class="sub-title">
캐릭터 스탯 정보
<span style="float: right;">
<em class="txt-point" data-type="point_space"><?= get_space_status($ch['ch_id']) ?></em>
/
<?= $config['cf_status_point'] ?>
</span>
</h3>
<div class="theme-box">
<?php include_once './status.inc.php'; ?>
</div>
<hr class="padding" />
<?php } ?>
<?php if (count($ch_ar) > 0) { ?>
<h3 class="sub-title">추가 캐릭터 프로필 정보</h3>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<tbody>
<?php for ($i = 0; $i < count($ch_ar); $i++) {
$ar = $ch_ar[$i];
$key = $ar['ar_code'];
$style = "";
if ($ar['ar_size']) {
if ($ar['ar_type'] != 'textarea')
$style = "style = 'width: {$ar['ar_size']}px;'";
else
$style = "style = 'width: 100%; height: {$ar['ar_size']}px;'";
} else {
$style = "style = 'width: 100%;'";
}
?>
<tr>
<th>
<input type="hidden" name="ar_code[<?= $i ?>]" value="<?= $ar['ar_code'] ?>" />
<input type="hidden" name="ar_theme[<?= $i ?>]" value="<?= $config['cf_theme'] ?>" />
<?= $ar['ar_name'] ?>
</th>
<?php
if ($ar['ar_type'] == 'file' || $ar['ar_type'] == 'url') {
// 이미지 타입의 파일
?>
<td>
<?php echo help($ar['ar_help']) ?>
<?php if ($ar['ar_type'] == 'url') { ?>
<input type="text" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" <?= $style ?> />
<?php } else {
// 직접 업로드
?>
<input type="file" name="av_value_file[<?= $i ?>]" />
<input type="hidden" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" />
<?php } ?>
<?php if ($ch[$key]) { ?>
<a href="<?= $ch[$key] ?>" class="ui-btn" target="_blank">
<?= $ar['ar_name'] ?> 확인
</a>
<?php } ?>
</td>
<?php } else { ?>
<td>
<?php echo help($ar['ar_help']) ?>
<?php
if ($ar['ar_type'] == 'text') {
?>
<input type="text" name="av_value[<?= $i ?>]" value="<?php echo $ch[$key] ?>" <?= $style ?> /> <?= $ar['ar_text'] ?>
<?php } else if ($ar['ar_type'] == 'textarea') { ?>
<textarea name="av_value[<?= $i ?>]" <?= $style ?>><?php echo $ch[$key] ?></textarea>
<?php } else if ($ar['ar_type'] == 'select') {
$option = explode("||", $ar['ar_text']);
?>
<select name="av_value[<?= $i ?>]" <?= $style ?>>
<?php for ($j = 0; $j < count($option); $j++) { ?>
<option value="<?= $option[$j] ?>" <?= $option[$j] == $ch[$key] ? "selected" : "" ?>><?= $option[$j] ?></option>
<?php } ?>
</select>
<?php } ?>
</td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<hr class="padding" />
<div class="txt-center">
<button type="submit" class="ui-btn point">
캐릭터 정보 <?= $w == 'u' ? "수정" : "등록" ?>
</button>
<a href="./index.php" class="ui-btn">취소</a>
</div>
</form>
<hr class="padding" />
<script type="text/javascript">
function fwrite_submit(f) {
document.getElementById("btn_submit").disabled = "disabled";
return true;
}
$('.preview-image > a').on('click', function () {
$(this).parent().children('div').stop().slideToggle();
return false;
});
</script>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,276 @@
<?php
include_once './_common.php';
if (!($w == "" || $w == "u"))
alert("w 값이 제대로 넘어오지 않았습니다.");
if ($member['mb_id'] != $_POST['mb_id'] && !$is_admin) {
alert('잘못된 접근입니다', "./index.php");
}
if ($in_id) {
$in = get_inventory_item($in_id);
}
if ($w == '' && !$is_add_character && !$is_admin) {
alert('생성 가능 기한이 지났습니다. 더 이상 캐릭터를 생성할 수 없습니다.', "./index.php");
}
if ($w == 'u' && (!$is_mod_character && !$is_admin && $in['it_type'] != '프로필수정')) {
alert('수정 가능 기한이 지났습니다. 더 이상 캐릭터를 수정할 수 없습니다.', "./index.php");
}
$character_image_path = G5_DATA_PATH . "/character/" . $mb_id;
$character_image_url = G5_DATA_URL . "/character/" . $mb_id;
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$sql_article = "";
// 기본 데이터 등록
$ad = sql_fetch("select * from {$g5['article_default_table']}");
$sql_article .= "
ch_state = '{$ch_state}',
ch_type = '{$ch_type}',
mb_id = '{$mb_id}',
ch_side = '{$ch_side}',
ch_class = '{$ch_class}',
ch_name = '{$ch_name}',
ch_point = '{$ch_point}'
";
// 이미지 등록
// -- 두상
if ($ad['ad_use_thumb']) {
if ($_FILES['ch_thumb_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_thumb_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "thumb_" . time() . "." . $exp;
upload_file($_FILES['ch_thumb_file']['tmp_name'], $image_name, $character_image_path);
$ch_thumb = $character_image_url . "/" . $image_name;
}
// 이미지 무차별 삭제 방어
if (strstr($ch_thumb, G5_URL)) {
// 본 사이트의 경로를 가지고 있을 경우
if (!strstr($ch_thumb, $character_image_url)) {
// 본인의 캐릭터 경로가 아닐 경우
alert("이미지 경로가 올바르지 않습니다.");
}
}
$sql_article .= " , ch_thumb = '{$ch_thumb}'";
}
// -- 흉상
if ($ad['ad_use_head']) {
if ($_FILES['ch_head_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_head_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "head_" . time() . "." . $exp;
upload_file($_FILES['ch_head_file']['tmp_name'], $image_name, $character_image_path);
$ch_head = $character_image_url . "/" . $image_name;
}
// 이미지 무차별 삭제 방어
if (strstr($ch_head, G5_URL)) {
// 본 사이트의 경로를 가지고 있을 경우
if (!strstr($ch_head, $character_image_url)) {
// 본인의 캐릭터 경로가 아닐 경우
alert("이미지 경로가 올바르지 않습니다.");
}
}
$sql_article .= " , ch_head = '{$ch_head}'";
}
// -- 전신
if ($ad['ad_use_body']) {
if ($_FILES['ch_body_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['ch_body_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "body_" . time() . "." . $exp;
upload_file($_FILES['ch_body_file']['tmp_name'], $image_name, $character_image_path);
$ch_body = $character_image_url . "/" . $image_name;
}
// 이미지 무차별 삭제 방어
if (strstr($ch_body, G5_URL)) {
// 본 사이트의 경로를 가지고 있을 경우
if (!strstr($ch_body, $character_image_url)) {
// 본인의 캐릭터 경로가 아닐 경우
alert("이미지 경로가 올바르지 않습니다.");
}
}
$sql_article .= " , ch_body = '{$ch_body}'";
}
if ($w == '') {
$sql = " insert into {$g5['character_table']} set {$sql_article}";
sql_query($sql);
$ch_id = sql_insert_id();
if ($mb['ch_id'] == "")
sql_query("update {$g5['member_table']} set ch_id = '{$ch_id}' where mb_id = '{$mb['mb_id']}'");
if ($ch_body) {
$sql = " insert into {$g5['closthes_table']}
set ch_id = '{$ch_id}',
cl_subject = '기본의상',
cl_path = '{$ch_body}',
cl_use = '1',
cl_type = 'default'";
sql_query($sql);
}
} else {
// 기존 캐릭터 데이터 호출
$ch = get_character($ch_id);
if (!$ch['ch_id'])
alert("캐릭터 정보가 존재하지 않습니다.");
if ($ad['ad_use_thumb'] && !$ad['ad_url_thumb'] && $ch['ch_thumb'] != $ch_thumb) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_thumb']);
@unlink($prev_file_path);
}
if ($ad['ad_use_head'] && !$ad['ad_url_head'] && $ch['ch_head'] != $ch_head) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_head']);
@unlink($prev_file_path);
}
if ($ad['ad_use_body'] && !$ad['ad_url_body'] && $ch['ch_body'] != $ch_body) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch['ch_body']);
@unlink($prev_file_path);
}
$sql = " update {$g5['character_table']}
set {$sql_article}
where ch_id = '{$ch_id}'";
sql_query($sql);
if ($mb['ch_id'] == "")
sql_query("update {$g5['member_table']} set ch_id = '{$ch_id}' where mb_id = '{$mb['mb_id']}'");
if ($ch_body) {
// 옷장정보 불러오기
$cl_sql = "select cl_id from {$g5['closthes_table']} where ch_id = '{$ch_id}' and cl_type = 'default'";
$cl = sql_fetch($cl_sql);
if ($cl['cl_id']) {
// 정보 업데이트
$sql = " update {$g5['closthes_table']}
set cl_path = '{$ch_body}'
where cl_id = '{$cl['cl_id']}'";
sql_query($sql);
} else {
// 신규등록
$sql = " insert into {$g5['closthes_table']}
set ch_id = '{$ch_id}',
cl_subject = '기본의상',
cl_path = '{$ch_body}',
cl_use = '1',
cl_type = 'default'";
sql_query($sql);
}
}
}
// --------------------- 추가 프로필 데이터
// 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch_id}' and ar_theme= '{$config['cf_theme']}'");
for ($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch['av_' . $row['ar_code']] = $row['av_value'];
}
for ($i = 0; $i < count($ar_code); $i++) {
$key = 'av_' . $ar_code[$i];
// 파일 등록일 경우, 이미지 업로드 처리
if ($_FILES['av_value_file']['name'][$i]) {
// 확장자 따기
$exp = explode(".", $_FILES['av_value_file']['name'][$i]);
$exp = $exp[count($exp) - 1];
$image_name = "img_" . $ar_code[$i] . "_" . time() . "." . $exp;
upload_file($_FILES['av_value_file']['tmp_name'][$i], $image_name, $character_image_path);
$av_value[$i] = $character_image_url . "/" . $image_name;
}
if ($ch[$key] != $av_value[$i] && strstr(G5_URL, $ch[$key])) {
// 해당 서버에 업로드 한 파일일 경우
$prev_file_path = str_replace(G5_URL, G5_PATH, $ch[$key]);
@unlink($prev_file_path);
}
$sql_article = "
ar_theme = '{$ar_theme[$i]}',
ch_id = '{$ch_id}',
ar_code = '{$ar_code[$i]}',
av_value = '{$av_value[$i]}'
";
if (isset($ch[$key])) {
// 업데이트
$sql = " update {$g5['value_table']}
set {$sql_article}
where ar_code = '{$ar_code[$i]}' and ch_id = '{$ch_id}' and ar_theme = '{$config['cf_theme']}'
";
sql_query($sql);
} else {
// 추가
$sql = " insert into {$g5['value_table']}
set {$sql_article}
";
sql_query($sql);
}
}
// --------------------- 캐릭터 스탯 등록
if (count($st_id) > 0) {
// 저장되는 스탯 정보가 존재할 시
for ($i = 0; $i < count($st_id); $i++) {
$temp_st_id = $st_id[$i];
$old_sc = sql_fetch("select * from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$temp_st_id}'");
if ($old_sc['sc_id']) {
// 업데이트
$sql = " update {$g5['status_table']}
set sc_max = '{$sc_max[$i]}'
where sc_id = '{$old_sc['sc_id']}'
";
sql_query($sql);
} else {
if (!$sc_value[$i])
$sc_value[$i] = $sc_max[$i];
// 등록
$sql = " insert into {$g5['status_table']}
set st_id = '{$st_id[$i]}',
ch_id = '{$ch_id}',
sc_max = '{$sc_max[$i]}'
";
sql_query($sql);
}
}
}
if ($in_id && !$in['it_use_ever']) {
delete_inventory($in_id);
}
goto_url('./viewer.php?ch_id=' . $ch_id, false);
?>

View file

@ -0,0 +1,108 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
$cl_count = sql_fetch("select count(*) as cnt from {$g5['closthes_table']} where ch_id = '{$ch_id}'");
$cl_count = $cl_count['cnt'];
$cl_result = sql_query("select * from {$g5['closthes_table']} where ch_id = '{$ch_id}' order by cl_id asc");
?>
<div class="closet-list">
<form action="<?= G5_URL ?>/mypage/character/closet_update.php" method="post" name="frm_closet" id="frm_closet"
enctype="multipart/form-data">
<input type="hidden" name="ch_id" value="<?= $ch_id ?>" />
<fieldset>
<input type="text" name="cl_subject" id="cl_sibject" value="" class="full" placeholder="의상 이름" />
<?php if ($article['ad_url_body']) { ?>
<input type="text" name="cl_path" id="cl_path" value="" class="full" placeholder="의상경로" />
<?php } else { ?>
<input type="file" name="cl_path_file" id="cl_path_file" value="" class="full" />
<?php } ?>
<input type="submit" value="추가" class="ui-btn point" />
</fieldset>
</form>
<form name="fcloset" action="./cloest_path_update.php" method="post" onsubmit="return confirm('의상정보를 수정하시겠습니까?');"
autocomplete="off">
<input type="hidden" name="ch_id" value="<?= $ch_id ?>" />
<?php if ($cl_count > 0) { ?>
<hr class="line" />
<ul>
<?php
$modify_index = 0;
for ($i = 0; $row = sql_fetch_array($cl_result); $i++) {
$class = "";
$class .= $row['cl_type'];
if ($row['cl_use'] == '1') {
$class .= ' selected ';
}
?>
<li class="<?= $class ?>" style="padding-right:110px;">
<a href="<?= $row['cl_path'] ?>"
style="display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;"
onclick="window.open(this.href, 'big_viewer', 'width=500 height=800 menubar=no status=no toolbar=no location=no scrollbars=yes resizable=yes'); return false;">
<?= $row['cl_subject'] ?>
</a>
<?php if ($row['cl_type'] != 'default') { ?>
<div class="closet-modify" id="modify_closest_<?= $i ?>">
<input type="hidden" name="cl_id[<?= $modify_index ?>]" value="<?= $row['cl_id'] ?>" />
<input type="text" name="cl_path[<?= $modify_index ?>]" value="<?= $row['cl_path'] ?>" />
<button type="submit" class="ui-btn point" style="height:30px; padding:0;">수정</button>
</div>
<?php $modify_index++;
} ?>
<div class="ui-btn-box" style="width:110px;">
<a href="./closet_update.php?w=u&amp;cl_id=<?= $row['cl_id'] ?>&amp;ch_id=<?= $ch_id ?>"
class="ui-btm btn-use">사용</a>
<?php if ($row['cl_type'] != 'default') { ?>
<a href="javascript:;" class="ui-btm btn-modify" title="수정하기">수정</a>
<a href="./closet_update.php?w=d&amp;cl_id=<?= $row['cl_id'] ?>&amp;ch_id=<?= $ch_id ?>"
onclick="return confirm('삭제한 데이터는 복구할 수 없습니다. 정말 삭제하시겠습니까?');" class="ui-btm btn-del">삭제</a>
<?php } ?>
</div>
</li>
<?php } ?>
</ul>
<?php } ?>
</form>
</div>
<style>
.closet-list ul {
background: rgba(0, 0, 0, .5);
}
.closet-list ul .ui-btn-box a.btn-modify:before {
content: "\e905";
}
.closet-modify {
display: none;
position: relative;
padding-right: 50px;
}
.state-modify .closet-modify {
display: block;
}
.closet-modify input {
width: 100%;
}
.closet-modify button {
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 50px;
text-align: center;
background: #dcd394;
color: #000;
}
</style>

View file

@ -0,0 +1,32 @@
<?php
include_once './_common.php';
$ch = get_character($ch_id);
if (!$ch['ch_id']) {
alert('캐릭터 정보가 존재하지 않습니다.', "./index.php");
}
if ($member['mb_id'] != $ch['mb_id']) {
alert('의상을 관리할 권한이 없습니다.', './viewer.php?ch_id=' . $ch_id);
}
$character_image_path = G5_DATA_PATH . "/character/" . $ch['mb_id'] . "/closet";
$character_image_url = G5_DATA_URL . "/character/" . $ch['mb_id'] . "/closet";
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$sql_add = '';
for ($i = 0; $i < count($cl_id); $i++) {
$cl = sql_fetch("select * from {$g5['closthes_table']} where cl_id = '{$cl_id[$i]}'");
if ($cl['cl_type'] == 'default') {
alert('기본 전신은 수정할 수 없습니다.', './viewer.php?ch_id=' . $ch_id);
} else {
sql_query("update {$g5['closthes_table']} set cl_path = '{$cl_path[$i]}' where cl_id = '{$cl[cl_id]}'");
}
}
goto_url('./viewer.php?ch_id=' . $ch_id);

View file

@ -0,0 +1,78 @@
<?php
include_once './_common.php';
$ch = get_character($ch_id);
if (!$ch['ch_id']) {
alert('캐릭터 정보가 존재하지 않습니다.', "./index.php");
}
if ($member['mb_id'] != $ch['mb_id']) {
alert('의상을 관리할 권한이 없습니다.', './viewer.php?ch_id=' . $ch_id);
}
$character_image_path = G5_DATA_PATH . "/character/" . $ch['mb_id'] . "/closet";
$character_image_url = G5_DATA_URL . "/character/" . $ch['mb_id'] . "/closet";
@mkdir($character_image_path, G5_DIR_PERMISSION);
@chmod($character_image_path, G5_DIR_PERMISSION);
$sql_add = '';
if ($w == '') {
if (!$cl_subject) {
alert('의상명을 입력해 주시길 바랍니다.', './viewer.php?ch_id=' . $ch_id);
}
// 이미지 등록
// -- 의상
if ($_FILES['cl_path_file']['name']) {
// 확장자 따기
$exp = explode(".", $_FILES['cl_path_file']['name']);
$exp = $exp[count($exp) - 1];
$image_name = "closet_" . time() . "." . $exp;
upload_file($_FILES['cl_path_file']['tmp_name'], $image_name, $character_image_path);
$cl_path = $character_image_url . "/" . $image_name;
}
// 이미지 무차별 삭제 방어
if (strstr($cl_path, G5_URL)) {
// 본 사이트의 경로를 가지고 있을 경우
if (!strstr($cl_path, $character_image_url)) {
// 본인의 캐릭터 경로가 아닐 경우
alert("이미지 경로가 올바르지 않습니다.");
}
}
if (!$cl_path) {
alert("의상 이미지를 입력해 주시길 바랍니다.");
}
$sql_add .= " , cl_path = '{$cl_path}'";
sql_query("insert into {$g5['closthes_table']} set ch_id = '{$ch['ch_id']}', cl_subject = '{$cl_subject}', cl_path = '{$cl_path}', cl_use = '0'");
} else {
$cl = sql_fetch("select * from {$g5['closthes_table']} where cl_id = '{$cl_id}'");
if (!$cl['cl_id']) {
alert('의상 정보를 확인할 수 없습니다.', './viewer.php?ch_id=' . $ch_id);
}
if ($w == 'u') {
sql_query("update {$g5['closthes_table']} set cl_use = '0' where cl_id != '{$cl['cl_id']}' and ch_id = '{$ch['ch_id']}'");
sql_query("update {$g5['closthes_table']} set cl_use = '1' where cl_id = '{$cl['cl_id']}'");
} else if ($w == 'd') {
if ($cl['cl_type'] == 'default') {
alert('기본 전신은 삭제할 수 없습니다.', './viewer.php?ch_id=' . $ch_id);
} else if ($cl['cl_use'] == '1') {
alert('현재 사용 중인 의상은 삭제할 수 없습니다.', './viewer.php?ch_id=' . $ch_id);
} else {
$prev_file_path = str_replace(G5_URL, G5_PATH, $cl['cl_path']);
@unlink($prev_file_path);
sql_query("delete from `{$g5['closthes_table']}` where cl_id = '{$cl['cl_id']}'");
}
} else {
alert('잘못된 명령값입니다.', './viewer.php?ch_id=' . $ch_id);
}
}
goto_url('./viewer.php?ch_id=' . $ch_id);

View file

@ -0,0 +1,87 @@
<?php
include_once './_common.php';
include_once './_head.php';
$ch_array = [];
$character_result = sql_query("select * from {$g5['character_table']} where mb_id = '{$member['mb_id']}' and ch_state != '삭제'");
for ($i = 0; $row = sql_fetch_array($character_result); $i++) {
$ch_array[$i] = $row;
}
if ($i == 1) {
//goto_url('./viewer.php?ch_id='.$ch_array[0]['ch_id']);
}
?>
<section>
<div>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
</colgroup>
<tbody>
<tr>
<th>대표캐릭터</th>
<td>
<form name="frm_main_character" action="./maincharacter_update.php" method="post">
<input type="hidden" name="mb_id" value="<?= $member['mb_id'] ?>" />
<input type="hidden" name="return_url" value="character" />
<select name="ch_id" id="ch_id">
<option value="">대표캐릭터 선택</option>
<?php for ($i = 0; $i < count($ch_array); $i++) {
$ch = $ch_array[$i]; ?>
<option value="<?= $ch['ch_id'] ?>" <?= $member['ch_id'] == $ch['ch_id'] ? "selected" : "" ?>>
<?= $ch['ch_name'] ?>
</option>
<?php } ?>
<select>
<input type="submit" value="변경" class="ui-btn" />
</form>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section>
<div class="list-character-box">
<?php for ($i = 0; $i < count($ch_array); $i++) {
$ch = $ch_array[$i]; ?>
<div class="item theme-box">
<a href="./viewer.php?ch_id=<?= $ch['ch_id'] ?>">
<?php if ($ch['ch_thumb']) { ?>
<em style="background-image:url('<?= $ch['ch_thumb'] ?>');"></em>
<?php } else { ?>
<em></em>
<?php } ?>
<strong><?php echo $ch['ch_name'] ?></strong>
<?php if ($config['cf_side_title']) { ?>
<span><?= get_side_name($ch['ch_side']) ?></span>
<?php } ?>
<?php if ($config['cf_class_title']) { ?>
<span><?= get_class_name($ch['ch_class']) ?></span>
<?php } ?>
<?php if ($article['ad_use_rank']) { ?>
<span>
<?php echo get_rank_name($ch['ch_rank']) ?>
</span>
<?php } ?>
<?php if ($article['ad_use_exp']) { ?>
<span>
<?php echo $ch['ch_exp'] . $config['cf_exp_pice'] ?>
</span>
<?php } ?>
</a>
</div>
<?php } ?>
</div>
<?php if ($is_add_character && ($i == 0 || $i < $config['cf_character_count'])) { ?>
<div class="txt-center">
<a href="./character_form.php" class="ui-btn point">신규 캐릭터 등록</a>
</div>
<?php } ?>
</section>
<?php
include_once './_tail.php';

View file

@ -0,0 +1,10 @@
<?php
include_once './_common.php';
if ($member['mb_id'] != $_POST['mb_id']) {
alert('잘못된 접근입니다', "./index.php");
}
sql_query("update {$g5['member_table']} set ch_id = '{$ch_id}' where mb_id = '{$member['mb_id']}'");
goto_url('./index.php');

View file

@ -0,0 +1,21 @@
<?php
include_once './_common.php';
$ch_id = 0;
if ($rm_id) {
$rm = sql_fetch("select * from {$g5['relation_table']} where rm_id = '{$rm_id}'");
$ch = get_character($rm['ch_id']);
$ch_id = $ch['ch_id'];
if ($ch['mb_id'] != $member['mb_id']) {
alert("삭제권한이 없습니다.");
}
sql_query(" delete from {$g5['relation_table']} where rm_id = '{$rm_id}' ");
}
goto_url('./viewer.php?ch_id=' . $ch_id);

View file

@ -0,0 +1,218 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
$relation_list = "select * from {$g5['relation_table']} where ch_id='{$ch_id}' order by rm_order asc, rm_id desc";
$relation = sql_query($relation_list);
// 캐릭터 소유주일 시, 관계란 입력폼 출력
if ($mb['mb_id'] == $member['mb_id']) {
?>
<form name="frmRemember" method="post" action="<?= G5_URL ?>/mypage/character/relation_update.php"
onsubmit="return fwrite_submit(this);">
<input type="hidden" name="w" value="" />
<input type="hidden" name="ch_id" value="<?= $ch_id ?>" />
<input type="hidden" name="re_ch_id" id="search_re_ch_id" value="" />
<table class="theme-form">
<colgroup>
<col style="width: 100px;" />
<col />
</colgroup>
<tbody>
<tr>
<th>대상캐릭터</th>
<td>
<input type="hidden" name="re_ch_id" id="search_re_ch_id" value="" />
<input type="text" name="search_re_ch_name" value="" id="search_re_ch_name"
onkeyup="get_ajax_character(this, 'character_list', 'search_re_ch_id');" />
<div id="character_list" class="ajax-list-box theme-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th>호감도</th>
<td>
<select name="rm_like" style="width: 100%; margin-bottom: 5px;">
<option value="">호감도</option>
<option value="5">5 : ♡♡♡♡♡</option>
<option value="4">4 : ♡♡♡♡</option>
<option value="3">3 : ♡♡♡</option>
<option value="2">2 : ♡♡</option>
<option value="1">1 : </option>
<option value="0">0 </option>
</select>
</td>
</tr>
<tr>
<th>관계요약</th>
<td>
<textarea name="rm_memo" placeholder="관계요약입력" class="full" rows="8"></textarea>
</td>
</tr>
<tr>
<th>관계링크입력</th>
<td>
<textarea name="rm_link" placeholder="관계링크입력 : 여러개를 입력할 경우, 엔터로 구분해 주시길 바랍니다.
ex)
http://url-1
http://url-2
...
" class="full" rows="8"></textarea>
</td>
</tr>
<tr>
<th>순서</th>
<td>
<input type="text" name="rm_order" value="0" class="required frm_input " style="width: 50px;" />
</td>
</tr>
</tbody>
</table>
<button type="submit" class="ui-btn full point">추가</button>
<hr class="padding" />
</form>
<?php } ?>
<ul class="relation-member-list">
<?php
for ($i = 0; $row = sql_fetch_array($relation); $i++) {
$re_ch = get_character($row['re_ch_id']);
if ($row['rm_memo'] == '') {
continue;
}
?>
<li id="rm_<?= $row['rm_id'] ?>">
<div class="ui-thumb">
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $re_ch['ch_id'] ?>" target="_blank">
<img src="<?= $re_ch['ch_thumb'] ?>" />
</a>
</div>
<div class="info">
<div class="rm-name">
<?= $re_ch['ch_name'] ?>
<?php if ($mb['mb_id'] == $member['mb_id']) { ?>
<a href="#rm_<?= $row['rm_id'] ?>" class="btn-modify ui-btn small">수정</a>
<a href="<?= G5_URL ?>/mypage/character/relation_delete.php?rm_id=<?= $row['rm_id'] ?>"
class="btn-delete ui-btn small" onclick="return confirm('삭제된 데이터는 복구할 수 없습니다. 삭제 하시겠습니까?');">삭제</a>
<?php } ?>
</div>
<div class="rm-like-style">
<p>
<?php for ($j = 0; $j < 5; $j++) {
$class = "";
$style = "";
if ($j < $row['rm_like']) {
$class = "txt-point";
} else {
$style = "opacity: 0.2;";
}
?>
<i class="<?= $class ?>" style="<?= $style ?>"></i>
<?php } ?>
</p>
</div>
</div>
<div class="memo theme-box">
<div class="ori-content"><?= nl2br($row['rm_memo']) ?></div>
<?php if ($mb['mb_id'] == $member['mb_id']) { ?>
<div class="modify-box">
<input type="hidden" id="re_ch_id_<?= $row['rm_id'] ?>" value="<?= $row['re_ch_id'] ?>" />
<select id="like_<?= $row['rm_id'] ?>" style="width: 100%; margin-bottom: 5px;">
<option value="">호감도</option>
<option value="5" <?= $row['rm_like'] == '5' ? 'selected' : '' ?>>5 : ♡♡♡♡♡</option>
<option value="4" <?= $row['rm_like'] == '4' ? 'selected' : '' ?>>4 : ♡♡♡♡</option>
<option value="3" <?= $row['rm_like'] == '3' ? 'selected' : '' ?>>3 : ♡♡♡</option>
<option value="2" <?= $row['rm_like'] == '2' ? 'selected' : '' ?>>2 : ♡♡</option>
<option value="1" <?= $row['rm_like'] == '1' ? 'selected' : '' ?>>1 : ♡</option>
<option value="0" <?= $row['rm_like'] == '0' ? 'selected' : '' ?>>0 </option>
</select>
<textarea id="memo_<?= $row['rm_id'] ?>" class="full" rows="8"><?= $row['rm_memo'] ?></textarea>
<textarea id="link_<?= $row['rm_id'] ?>" class="full" rows="8"><?= $row['rm_link'] ?></textarea>
<p>순서 <input type="text" id="order_<?= $row['rm_id'] ?>" value="<?= $row['rm_order'] ?>" class="frm_input "
style="width: 50px;" /></p>
<button type="button" class="ui-btn full point" onclick="fn_relation_modify(<?= $row['rm_id'] ?>);"
style="margin-top: 5px;">UPDATE</button>
</div>
<?php } ?>
</div>
<ol>
<?php
$row['rm_link'] = nl2br($row['rm_link']);
$link_list = explode('<br />', $row['rm_link']);
for ($j = 0; $j < count($link_list); $j++) {
$r_row = $link_list[$j];
if (!$r_row)
continue;
?>
<li>
<a href="<?= $r_row ?>" class="btn-log" target="_blank"></a>
</li>
<?php } ?>
</ol>
</li>
<?php } ?>
</ul>
<?php if ($mb['mb_id'] == $member['mb_id']) { ?>
<form name="frmRemember_modify" id="frmRemember_modify" method="post"
action="<?= G5_URL ?>/mypage/character/relation_update.php" onsubmit="return fwrite_submit(this);">
<input type="hidden" name="ch_id" value="<?= $ch_id ?>" />
<input type="hidden" name="w" value="u" />
<input type="hidden" name="rm_id" />
<input type="hidden" name="re_ch_id" />
<input type="hidden" name="rm_memo" />
<input type="hidden" name="rm_link" />
<input type="hidden" name="rm_order" />
<input type="hidden" name="rm_like" />
</form>
<?php } ?>
<script>
$('.btn-modify').on('click', function () {
$(this).closest('li').toggleClass('state-modify');
return false;
});
function fwrite_submit(f) {
return true;
}
function fn_relation_modify(idx) {
var f = document.frmRemember_modify;
var rm_id = idx;
var re_ch_id = document.getElementById('re_ch_id_' + idx).value;
var rm_memo = document.getElementById('memo_' + idx).value;
var rm_link = document.getElementById('link_' + idx).value;
var rm_order = document.getElementById('order_' + idx).value;
var rm_like = document.getElementById('like_' + idx).value;
f.rm_id.value = rm_id;
f.re_ch_id.value = re_ch_id;
f.rm_memo.value = rm_memo;
f.rm_link.value = rm_link;
f.rm_order.value = rm_order;
f.rm_like.value = rm_like;
f.submit();
}
</script>

View file

@ -0,0 +1,38 @@
<?php
include_once './_common.php';
$ch = get_character($ch_id);
if ($ch['mb_id'] != $member['mb_id']) {
alert("등록권한이 없습니다.");
}
if ($w == '') {
// 신규 입력
if (!$_POST['re_ch_id']) {
$re_ch = sql_fetch("select * from {$g5['character_table']} where ch_name = '{$search_re_ch_name}'");
$_POST['re_ch_id'] = $re_ch['ch_id'];
}
$sql = " insert into {$g5['relation_table']}
set ch_id = '{$_POST['ch_id']}',
re_ch_id = '{$_POST['re_ch_id']}',
rm_like = '{$_POST['rm_like']}',
rm_link = '{$_POST['rm_link']}',
rm_order = '{$_POST['rm_order']}',
rm_memo = '{$_POST['rm_memo']}'";
sql_query($sql);
} else if ($w == 'u') {
// 수정사항
$sql = " update {$g5['relation_table']}
set rm_like = '{$_POST['rm_like']}',
rm_link = '{$_POST['rm_link']}',
rm_order = '{$_POST['rm_order']}',
rm_memo = '{$_POST['rm_memo']}'
where rm_id = '{$_POST['rm_id']}'
";
sql_query($sql);
}
goto_url('./viewer.php?ch_id=' . $ch_id);

View file

@ -0,0 +1,264 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
$state_space_point = get_space_status($ch['ch_id']);
$total_point = $ch['ch_point'] ? $ch['ch_point'] : $config['cf_status_point'];
$status_modify = false;
$use_status_form = false;
$status_fix = true;
$resent_use_point = 0;
if ($member['mb_id']) {
if ($member['mb_id'] == $mb['mb_id']) {
// 캐릭터 수정 상태
if ($ch['ch_state'] != '승인') {
// 미승인 상태 - 수정이 자유로운 경우
$status_modify = true;
$status_fix = false;
} else if ($state_space_point > 0) {
// 승인 상태, 잔여 포인트가 남아 있을 경우
$status_modify = true;
$status_fix = true;
}
if (defined('_CHARACTER_FORM_')) {
// 현재 캐릭터 수정 폼일때
$use_status_form = false;
} else {
// 일반 멤버 프로필 보기 상태일 때
$use_status_form = true;
}
} else if (!$ch['ch_id']) {
// 캐릭터 최초 등록 상태
$status_modify = true;
$use_status_form = false;
$status_fix = false;
}
}
?>
<?php if ($use_status_form && $status_modify) { ?>
<form name="fwrite" id="fwrite" action="<?= G5_URL ?>/mypage/character/status_update.php"
onsubmit="return fstatus_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="ch_id" value="<?php echo $ch['ch_id']; ?>">
<input type="hidden" name="ch_point" value="<?php echo $ch['ch_point']; ?>">
<input type="hidden" name="url" value="<?php echo urlencode($_SERVER['REQUEST_URI']); ?>">
<?php } ?>
<div class="status-bar" data-total="<?= $ch['ch_point'] ?>" data-space="<?= $state_space_point ?>">
<?php for ($i = 0; $i < count($status); $i++) {
$st = $status[$i];
$sc = get_status($ch['ch_id'], $st['st_id']);
$sc['has'] = $sc['has'] ? $sc['has'] : $sc['min'];
$min_data = !$status_fix ? $sc['min'] : $sc['has'];
$status_percent = $sc['max'] ? $sc['has'] / $sc['max'] * 100 : 0;
$mine_percent = $sc['max'] ? $sc['now'] / $sc['max'] * 100 : 0;
$resent_use_point += $sc['has'];
$sub_text = "";
if ($sc['drop'])
$sub_text = "(" . $sc['now'] . ")";
?>
<dl data-idx="<?= $st['st_id'] ?>" data-min="<?= $min_data ?>" data-max="<?= $sc['max'] ?>" <?= $status_modify ? "class='ui-control'" : "" ?>>
<?php if ($status_modify) { ?>
<input type="hidden" id="st_id_<?= $st['st_id'] ?>" name="st_id[]" value="<?= $st['st_id'] ?>" />
<input type="hidden" id="sc_max_<?= $st['st_id'] ?>" name="sc_max[]" value="<?= $sc['has'] ?>">
<?php } ?>
<dt><?= $st['st_name'] ?></dt>
<dd>
<p>
<i><?= $sc['has'] ?><?= $sub_text ?></i>
<span style="width: <?= $status_percent ?>%;"></span>
<sup style="width: <?= $mine_percent ?>%;"></sup>
</p>
<?php if ($st['st_help'] && !$use_status_form && $status_modify) {
echo help($st['st_help']);
} ?>
</dd>
<?php if ($status_modify) { ?>
<dd class="control">
<a href="#" data-idx="<?= $st['st_id'] ?>" data-function="plus"
class="ui-btn <?= ($sc['max'] <= $sc['has']) ? "disable" : "point" ?>">포인트 추가</a>
<a href="#" data-idx="<?= $st['st_id'] ?>" data-function="minus"
class="ui-btn <?= ($min_data >= $sc['has']) ? "disable" : "point" ?>">포인트 차감</a>
</dd>
<?php } ?>
</dl>
<?php } ?>
</div>
<?php if ($status_modify) { ?>
<script>
// 포인트 셋팅
set_space_status('<?= ($total_point - $resent_use_point) ?>');
var now_control_obj = null;
var plus_function = null;
var minus_function = null;
$('a[data-function="plus"]').on('click', function () {
now_control_obj = this;
fn_status_plus();
return false;
}).on('mousedown', function () {
now_control_obj = this;
plus_function = null;
minus_function = null
plus_function = setInterval(fn_status_plus, 500);
}).on('mouseup mouseleave', function () {
clearTimeout(plus_function);
plus_function = null;
minus_function = null
now_control_obj = null;
});
$('a[data-function="minus"]').on('click', function () {
now_control_obj = this;
fn_status_minus();
return false;
}).on('mousedown', function () {
now_control_obj = this;
minus_function = null;
plus_function = null;
minus_function = setInterval(fn_status_minus, 500);
}).on('mouseup mouseleave', function () {
clearTimeout(minus_function);
minus_function = null;
now_control_obj = null;
plus_function = null;
});
function fn_status_plus() {
var obj = now_control_obj;
if ($(obj).hasClass('disable')) {
// 사용불가
} else {
// 스텟 포인트 추가 이벤트
var parent_box = $(obj).closest('.status-bar');
var status = $(obj).closest('dl');
var all_max_point = parent_box.attr('data-total');
var now_space_point = parent_box.attr('data-space');
var state_id = $(obj).attr('data-idx');
// 남은 분배 포인트가 0 보다 클 경우
if (now_space_point > 0) {
var input_obj = $('#sc_max_' + state_id);
var max_point = status.attr('data-max'); // 해당 스텟의 최대값
var temp_point = (input_obj.val() * 1) + 1; // 증가치 계산
if (temp_point <= max_point) {
// 포인트 추가
input_obj.val(temp_point);
// 그래프 사이즈 조절
var percent_value = (temp_point / max_point) * 100;
status.find('dd').find('p').find('span').css('width', ((temp_point / max_point) * 100) + "%");
status.find('dd').find('p').find('i').text(temp_point);
now_space_point = now_space_point - 1;
set_space_status(now_space_point);
if (now_space_point == 0) {
parent_box.find('a[data-function="plus"]').removeClass('point').addClass('disable');
}
} else {
status.find('a[data-function="plus"]').removeClass('point').addClass('disable');
}
if (temp_point == max_point) {
status.find('a[data-function="plus"]').removeClass('point').addClass('disable');
}
}
status.find('a[data-function="minus"]').removeClass('disable').addClass('point');
}
}
function fn_status_minus() {
var obj = now_control_obj;
if ($(obj).hasClass('disable')) {
// 사용불가
} else {
// 스텟 포인트 추가 이벤트
var parent_box = $(obj).closest('.status-bar');
var status = $(obj).closest('dl');
var all_max_point = parent_box.attr('data-total');
var now_space_point = parent_box.attr('data-space');
var state_id = $(obj).attr('data-idx');
var input_obj = $('#sc_max_' + state_id);
var max_point = status.attr('data-max'); // 해당 스텟의 최대값
var min_point = status.attr('data-min'); // 해당 스텟의 최소값
var temp_point = (input_obj.val() * 1) - 1; // 감소치 계산
if (temp_point >= min_point) {
// 포인트 감소
input_obj.val(temp_point);
// 그래프 사이즈 조절
var percent_value = (temp_point / max_point) * 100;
status.find('dd').find('p').find('span').css('width', ((temp_point / max_point) * 100) + "%");
status.find('dd').find('p').find('i').text(temp_point);
now_space_point = (now_space_point * 1) + 1;
set_space_status(now_space_point);
parent_box.find('dl').each(function () {
var now_value = $(this).find('[name="sc_max[]"]').val() * 1;
var max_value = $(this).attr('data-max') * 1;
if (now_value < max_value)
$(this).find('a[data-function="plus"]').removeClass('disable').addClass('point');
});
if (temp_point == min_point) {
status.find('a[data-function="minus"]').removeClass('point').addClass('disable');
}
} else {
status.find('a[data-function="minus"]').removeClass('point').addClass('disable');
}
if (temp_point == min_point) {
status.find('a[data-function="minus"]').removeClass('point').addClass('disable');
}
status.find('a[data-function="plus"]').removeClass('disable').addClass('point');
}
}
function set_space_status(space_point) {
$('.status-bar').attr('data-space', space_point);
$('[data-type="point_space"]').text(space_point);
}
</script>
<?php } ?>
<?php if ($use_status_form && $status_modify) { ?>
<hr class="padding" />
<button type="submit" class="ui-btn point full">스탯 분배하기</button>
</form>
<?php } ?>

View file

@ -0,0 +1,41 @@
<?php
include_once './_common.php';
if ($url) {
$return_url = urldecode($url);
} else {
$return_url = "./viewer.php?ch_id=" . $ch_id;
}
$ch = get_character($ch_id);
if ($ch['mb_id'] != $member['mb_id']) {
alert("캐릭터 스탯 수정 권한이 없습니다.");
}
// --------------------- 캐릭터 스탯 등록
if (count($st_id) > 0) {
// 저장되는 스탯 정보가 존재할 시
for ($i = 0; $i < count($st_id); $i++) {
$temp_st_id = $st_id[$i];
$old_sc = sql_fetch("select * from {$g5['status_table']} where ch_id = '{$ch_id}' and st_id = '{$temp_st_id}'");
if ($old_sc['sc_id']) {
// 업데이트
$sql = " update {$g5['status_table']}
set sc_max = '{$sc_max[$i]}'
where sc_id = '{$old_sc['sc_id']}'
";
sql_query($sql);
} else {
// 등록
$sql = " insert into {$g5['status_table']}
set st_id = '{$st_id[$i]}',
ch_id = '{$ch_id}',
sc_max = '{$sc_max[$i]}'
";
sql_query($sql);
}
}
}
goto_url($return_url);

View file

@ -0,0 +1,46 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
/* 보유중인 타이틀 정보 */
$ti_result = sql_query("select ti_id from {$g5['title_has_table']} where ch_id = '{$ch['ch_id']}'");
$ti = [];
$ti_index = 0;
for ($i = 0; $ti_row = sql_fetch_array($ti_result); $i++) {
$ti_info = get_title($ti_row['ti_id']);
if ($ti_info['ti_id']) {
$ti[$ti_index] = $ti_info;
$ti_index++;
}
}
if (count($ti) > 0) { ?>
<div class="title-list">
<?php for ($i = 0; $i < count($ti); $i++) { ?>
<img src="<?= $ti[$i]['ti_img'] ?>" />
<?php } ?>
</div>
<?php if ($ch['mb_id'] == $member['mb_id']) {
// 캐릭터 소유주와 접속자의 정보가 동일 할 때
// 타이틀 변경
?>
<hr class="line" />
타이틀 변경 :
<select onchange="fn_save_title(this.value, '<?= $ch['ch_id'] ?>');">
<option value="">타이틀 없음</option>
<?php for ($i = 0; $i < count($ti); $i++) { ?>
<option value="<?= $ti[$i]['ti_id'] ?>" <?= $ti[$i]['ti_id'] == $ch['ch_title'] ? "selected" : "" ?>>
<?= $ti[$i]['ti_title'] ?></option>
<?php } ?>
</select>
<?php }
} else {
echo "<div class='no-data'>보유중인 타이틀이 없습니다.</div>";
}
?>

View file

@ -0,0 +1,7 @@
<?php
include_once './_common.php';
$sql = " update {$g5['character_table']}
set ch_title = '{$ti_id}'
where ch_id = '{$ch_id}'";
sql_query($sql);
echo "Y";

View file

@ -0,0 +1,335 @@
<?php
include_once './_common.php';
include_once './_head.php';
if (!$ch_id)
$ch_id = $character['ch_id'];
$ch = get_character($ch_id);
if (!$ch['ch_id']) {
alert("캐릭터 정보가 존재하지 않습니다.");
}
if ($ch['mb_id'] != $member['mb_id'] && !$is_admin) {
alert("본인 소유의 캐릭터가 아닙니다.");
}
/* 오너 정보 */
$mb = $member;
/** 스탯 이용 시 스탯 설정값 가져오기 **/
if ($article['ad_use_status']) {
$status = [];
$st_result = sql_query("select * from {$g5['status_config_table']} order by st_order asc");
for ($i = 0; $row = sql_fetch_array($st_result); $i++) {
$status[$i] = $row;
}
}
/** 추가 항목 설정값 가져오기 **/
$ch_ar = [];
$str_secret = ' where (1) ';
if ($member['mb_id'] == $mb['mb_id']) {
$str_secret .= " and ar_secret != 'H' ";
} else {
$str_secret .= " and ar_secret = '' ";
}
$ar_result = sql_query("select * from {$g5['article_table']} {$str_secret} order by ar_order asc");
for ($i = 0; $row = sql_fetch_array($ar_result); $i++) {
$ch_ar[$i] = $row;
}
// --- 캐릭터 별 추가 항목 값 가져오기
$av_result = sql_query("select * from {$g5['value_table']} where ch_id = '{$ch['ch_id']}'");
for ($i = 0; $row = sql_fetch_array($av_result); $i++) {
$ch[$row['ar_code']] = $row['av_value'];
}
// ------- 캐릭터 의상 정보 가져오기
$temp_cl = sql_fetch("select * from {$g5['closthes_table']} where ch_id = '{$ch_id}' and cl_use = '1'");
if ($temp_cl['cl_path']) {
$ch['ch_body'] = $temp_cl['cl_path'];
}
if (!$tabs) {
$tabs = 'c';
}
?>
<style>
.tab-nav {
text-align: center;
padding: 10px;
margin-bottom: 30px;
background: #333;
}
.tab-nav button {
font-size: 14px;
border: none;
color: #fff;
height: 30px;
padding: 0 20px;
margin: 2px 0;
background: #000;
}
@media all and (max-width:640px) {
.tab-nav {
padding: 10px 0;
}
.tab-nav img {
width: 14px;
}
.tab-nav button {
font-size: 12px;
}
}
@media all and (max-width:520px) {
.profile-viewer .prof,
.tab-nav {
margin-left: -16px;
margin-right: -16px;
}
}
.closet-list {}
.closet-list fieldset {
position: relative;
margin-top: 10px;
padding-left: 120px;
padding-right: 80px;
}
.closet-list fieldset input#cl_sibject {
position: absolute;
top: 0;
left: 0;
width: 115px;
}
.closet-list fieldset input#cl_sibject::placeholder {
color: rgba(255, 255, 255, .3);
}
.closet-list fieldset input[type="submit"] {
position: absolute;
top: 0;
right: 0;
line-height: 1.0em;
height: 30px;
width: 75px;
}
.closet-list ul {
text-align: left;
}
.closet-list ul li {
position: relative;
padding: 10px 80px 10px 10px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.closet-list ul .ui-btn-box {
position: absolute;
top: 5px;
right: 0px;
bottom: 5px;
width: 80px;
}
.closet-list ul .ui-btn-box a {
display: block;
position: relative;
height: 100%;
width: 30px;
float: left;
margin-left: 5px;
overflow: hidden;
text-indent: -999px;
border-radius: 2px;
}
.closet-list ul .ui-btn-box a:before {
display: block;
position: absolute;
font-family: 'icon';
font-size: 15px;
width: 20px;
height: 20px;
left: 50%;
top: 50%;
margin-top: -10px;
margin-left: -10px;
text-indent: 0;
text-align: center;
line-height: 20px;
}
.closet-list ul .ui-btn-box a.btn-use:before {
content: "\e9c3";
font-size: 20px;
line-height: 23px;
}
.closet-list ul .ui-btn-box a.btn-del:before {
content: "\e9ac";
}
.closet-list ul .selected .ui-btn-box {
display: none;
}
.closet-list ul .selected:after {
content: "사용중";
display: block;
position: absolute;
width: 70px;
top: 10px;
right: 10px;
text-align: center;
}
</style>
<div class="profile-viewer">
<div class="body">
<?php
if (strpos($ch['ch_body'], "<img")) {
$ch['ch_body'] = "";
}
?>
<em style="background-image:url('<?= $ch['ch_body'] ?>');"></em>
</div>
<div class="data">
<div class="control">
<?php if ($ch['ch_state'] != '승인' || $is_mod_character || $is_admin) { ?>
<a href="./character_form.php?w=u&amp;ch_id=<?= $ch['ch_id'] ?>">
수정
</a>
<?php } ?>
<a href="<?= G5_URL ?>/member/exp.php?ch_id=<?= $ch['ch_id'] ?>"
onclick="popup_window(this.href, 'exp', 'width=400, height=500'); return false;">
경험치
</a>
</div>
<div class="prof">
<div class="thumb-item">
<?php
if (strpos($ch['ch_thumb'], "<img")) {
$ch['ch_thumb'] = "";
}
?>
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $ch['ch_id'] ?>" class="character-picture"
title="클릭 시 멤버란으로 이동됩니다.">
<div class="ui-thumb">
<?php if ($ch['ch_thumb']) { ?>
<em><img src="<?= $ch['ch_thumb'] ?>" alt="" /></em>
<?php } ?>
</div>
<div class="name">
<strong><?= $ch['ch_name'] ?></strong>
</div>
</a>
</div>
<div class="prof-data">
<p>
<strong><?php echo $ch['ch_name'] ?></strong>
<?php echo get_rank_name($ch['ch_rank']); ?> &middot; <?= get_side_name($ch['ch_side']) ?> &middot;
<?= get_class_name($ch['ch_class']) ?>
</p>
<p>
<?= $ch['ch_exp'] ?> <?= $config['cf_exp_pice'] ?>
</p>
</div>
</div>
<div class="tab-nav">
<?php if ($article['ad_use_closet'] && $article['ad_use_body']) { ?>
<button type="button" onclick="$('#closest_area').show().siblings().hide();">옷장</button>
<?php } ?>
<?php if ($article['ad_use_status']) { ?>
<button type="button" onclick="$('#status_area').show().siblings().hide();">스탯</button>
<?php } ?>
<?php if ($article['ad_use_title']) { ?>
<button type="button" onclick="$('#title_area').show().siblings().hide();">타이틀</button>
<?php } ?>
<?php if ($article['ad_use_inven']) { ?>
<button type="button" onclick="$('#inventory_area').show().siblings().hide();">아이템</button>
<?php } ?>
<?php if ($ch['ch_state'] == '승인') { ?>
<button type="button" onclick="$('#relation_area').show().siblings().hide();">관계</button>
<?php } ?>
</div>
<div class="tab-box-group" style="min-height:300px;">
<?php if ($article['ad_use_closet'] && $article['ad_use_body']) { ?>
<div class="tab-box" id="closest_area" <?= $tabs == 'c' ? "" : "style='display:none;'" ?>>
<?php include_once G5_PATH . "/mypage/character/cloest.inc.php"; ?>
</div>
<?php } ?>
<?php if ($article['ad_use_status']) { ?>
<div class="tab-box" id="status_area" <?= $tabs == 's' ? "" : "style='display:none;'" ?>>
<?php if ($article['ad_use_status']) { ?>
<span style="float:right; display:block;"><em class="txt-point"
data-type="point_space"><?= get_space_status($ch['ch_id']) ?></em>/<?= $ch['ch_point'] ?></span>
<div class="mypage-box" style="overflow:hidden; clear:both;">
<?php include_once G5_PATH . "/mypage/character/status.inc.php"; ?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if ($article['ad_use_title']) { ?>
<div class="tab-box" id="title_area" <?= $tabs == 't' ? "" : "style='display:none;'" ?>>
<div class="mypage-box">
<?php include_once G5_PATH . "/mypage/character/title.inc.php"; ?>
</div>
</div>
<?php } ?>
<?php if ($article['ad_use_inven']) { ?>
<div class="tab-box" id="inventory_area" <?= $tabs == 'i' ? "" : "style='display:none;'" ?>>
<?php include_once G5_PATH . "/inventory/list.inc.php"; ?>
</div>
<?php } ?>
<?php if ($ch['ch_state'] == '승인') { ?>
<div class="tab-box" id="relation_area" <?= $tabs == 'r' ? "" : "style='display:none;'" ?>>
<?php if ($ch['ch_state'] == "승인") { ?>
<div class="mypage-box relation-box">
<?php include(G5_PATH . '/mypage/character/relation_list.php'); ?>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
<?php if ($ch['ch_state'] != '승인') { ?>
<div style="padding-top:50px; text-align:center;">
<a href="./character_delete.php?ch_id=<?= $ch['ch_id'] ?>" class="ui-btn full"
onclick="return confirm('정말 삭제 하시겠습니까?');">
캐릭터 정보 삭제
</a>
</div>
<?php } ?>
</div>
</div>
<hr class="padding" />
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,138 @@
<?php
include_once './_common.php';
include_once './_head.php';
?>
<h2 class="page-title">
<strong>계정정보</strong>
<span>My Information</span>
</h2>
<section>
<table class="theme-form">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<tbody>
<tr>
<th>오너</th>
<td>
<?= $member['mb_nick'] ?> <?php if ($member['mb_birth']) { ?>( <?= @number_format($member['mb_birth']) ?> 년생 )<?php } ?>
</td>
</tr>
<tr>
<th>E-mail</th>
<td>
<?= $member['mb_email'] ?>
</td>
</tr>
<tr>
<th>가입일</th>
<td>
<?= $member['mb_open_date'] ?>
</td>
</tr>
<?php if ($member['mb_error_cnt'] > 0) { ?>
<tr>
<th>경고내역</th>
<td>
<p>
[ <span
style='color: red; font-weight: bold; font-family: "Dotum";'><?= number_format($member['mb_error_cnt']) ?></span>
]
</p>
<?= $member['mb_error_content'] ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<br />
<div class="txt-center">
<a href="<?= G5_BBS_URL ?>/member_confirm.php?url=register_form.php" class="ui-btn">정보수정</a>
</div>
</section>
<h2 class="page-title">
<strong>호출내역</strong>
<span>My Calling</span>
</h2>
<section>
<table class="theme-list">
<colgroup>
<col style="width: 110px;" />
<col />
</colgroup>
<thead>
<tr>
<th>호출</th>
<th>내용</th>
</tr>
</thead>
<tbody>
<?php
$sql = " update {$g5['member_table']}
set mb_board_call = '',
mb_board_link = ''
where mb_id = '" . $member['mb_id'] . "' ";
sql_query($sql);
if (!$page)
$page = 1;
// 알람 내역을 가져온다
$row = sql_fetch("select count(*) as cnt from {$g5['call_table']} where re_mb_id = '{$member['mb_id']}'");
$total_count = $row['cnt'];
$page_rows = 10;
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$sql = " select * from {$g5['call_table']} where re_mb_id = '{$member['mb_id']}' order by bc_datetime desc limit {$from_record}, $page_rows ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
?>
<tr <?= !$row['bc_check'] ? "class='check'" : "" ?>>
<td><?= $row['mb_name'] ?></td>
<td>
<p style="white-space: nowrap; overflow: hidden;text-overflow: ellipsis;">
<a
href="<?= G5_BBS_URL ?>/board.php?bo_table=<?= $row['bo_table'] ?>&amp;log=<?= $row['wr_num'] * -1 ?>"><?= $row['memo'] ?></a>
</p>
</td>
</tr>
<?php }
if ($i == 0) {
?>
<tr>
<td colspan="2" class="no-data">
호출 내역이 존재하지 않습니다.
</td>
</tr>
<?php } ?>
</tbody>
</table>
</section>
<div class="ui-form-layout">
</div>
<?php
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './index.php?page=');
echo $write_pages;
?>
<hr class="padding" />
<div class="txt-center">
<a href="<?php echo G5_BBS_URL; ?>/member_confirm.php?url=member_leave.php" class="ui-btn etc">탈퇴</a>
</div>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,5 @@
<?php
include_once '../../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,9 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_head.php';
?>
<h2 class="page-title">
<strong>로그 관리</strong>
<span>Log management</span>
</h2>

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../tail.sub.php';

View file

@ -0,0 +1,185 @@
<?php
include_once './_common.php';
include_once G5_LIB_PATH . '/thumbnail.lib.php';
include_once './_head.php';
// 내가 쓴 자비란 로그 확인
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b
where a.bo_table = b.bo_table
and b.bo_type = 'mmb'
and a.wr_id = a.wr_parent
and a.mb_id = '{$member['mb_id']}'
";
$sql_order = " order by a.bn_id desc ";
// 전체 갯수 가져오기
$sql = " select count(*) as cnt {$sql_common} ";
$total = sql_fetch($sql);
$total = $total['cnt'];
$rows = 10;
$total_page = ceil($total / $rows); // 전체 페이지 계산
if (!$page)
$page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select a.*, b.bo_subject {$sql_common} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$list = [];
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
if ($row['wr_id'] == $row['wr_parent']) {
// 원글
$comment = "";
$comment_link = "";
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$list[$i] = $row2;
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
// 당일인 경우 시간으로 표시함
$datetime = substr($row2['wr_datetime'], 0, 10);
$datetime2 = $row2['wr_datetime'];
if ($datetime == G5_TIME_YMD) {
$datetime2 = substr($datetime2, 11, 5);
} else {
$datetime2 = substr($datetime2, 5, 5);
}
} else {
// 코멘트
$comment = '[코] ';
$comment_link = '#c_' . $row['wr_id'];
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$list[$i] = $row2;
$list[$i]['wr_id'] = $row['wr_id'];
$list[$i]['mb_id'] = $row3['mb_id'];
$list[$i]['wr_name'] = $row3['wr_name'];
$list[$i]['wr_email'] = $row3['wr_email'];
$list[$i]['wr_homepage'] = $row3['wr_homepage'];
// 당일인 경우 시간으로 표시함
$datetime = substr($row3['wr_datetime'], 0, 10);
$datetime2 = $row3['wr_datetime'];
if ($datetime == G5_TIME_YMD) {
$datetime2 = substr($datetime2, 11, 5);
} else {
$datetime2 = substr($datetime2, 5, 5);
}
}
$list[$i]['gr_id'] = $row['gr_id'];
$list[$i]['bo_table'] = $row['bo_table'];
$list[$i]['name'] = $name;
$list[$i]['comment'] = $comment;
$list[$i]['href'] = './board.php?bo_table=' . $row['bo_table'] . '&amp;wr_id=' . $row2['wr_id'] . $comment_link;
$list[$i]['datetime'] = $datetime;
$list[$i]['datetime2'] = $datetime2;
$list[$i]['gr_subject'] = $row['gr_subject'];
$list[$i]['bo_subject'] = $row['bo_subject'];
$list[$i]['wr_subject'] = $row2['wr_subject'];
}
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&amp;view=$view&amp;mb_id=$mb_id&amp;type=$type&amp;page=");
?>
<nav id="tab_list">
<ul>
<li>
<a href="./index.php" class="point">
나의로그
</a>
</li>
<li class="on">
<a href="./log_favorite.php">
관심로그
</a>
</li>
</ul>
</nav>
<i class="style-line horizon"></i>
<div class="mypage-log-list">
<?php for ($i = 0; $i < count($list); $i++) {
$bo_subject = cut_str($list[$i]['bo_subject'], 20);
$ca_name = $list[$i]['ca_name'];
if ($list[$i]['wr_type'] == 'UPLOAD') {
// Upload 형태로 로그를 등록 하였을 때
$thumb = get_list_thumbnail($list[$i]['bo_table'], $list[$i]['wr_id'], 140, 90);
$image_url = $thumb['src'];
$image_width = 140;
$image_height = 90;
} else if ($list[$i]['wr_type'] == 'URL') {
// URL 형태로 로그를 등록 하였을 때
$image_url = $list[$i]['wr_url'];
$image_width = $list[$i]['wr_width'];
$image_height = $list[$i]['wr_height'];
}
$list[$i]['log_num'] = $list[$i]['wr_num'] * -1;
?>
<dl>
<dt>
<a
href="<?= G5_BBS_URL ?>/board.php?bo_table=<?php echo $list[$i]['bo_table'] ?>&amp;log=<?= $list[$i]['log_num'] ?>">
<img src="<?= $image_url ?>" />
</a>
</dt>
<dd>
<?php
// 코멘트 리스트
$sql = " select * from {$g5['write_prefix']}{$list[$i]['bo_table']} where wr_parent = '{$list[$i]['wr_id']}' and wr_subject != '--|UPLOADING|--' order by wr_datetime desc, wr_comment_reply limit 0, 3";
$result = sql_query($sql);
for ($j = 0; $row = sql_fetch_array($result); $j++) {
$c_list[$j] = $row;
$tmp_name = get_text(cut_str($row['wr_name'], $config['cf_cut_name'])); // 설정된 자리수 만큼만 이름 출력
$c_list[$j]['content'] = $row['wr_content'];
if ($j == 0) {
echo "<ul class='comemnt-list'>";
}
?>
<li>
<p>
<?php if ($c_list[$j]['wr_noname']) { ?>
[ 익명의 누군가 ]
<?php } else { ?>
[ <?= $c_list[$j]['wr_subject'] ?>/<?= $c_list[$j]['wr_name'] ?> ]
<?php } ?>
<?= htmlspecialchars($c_list[$j]['content']) ?>
</p>
<p class="con txt-right">
<span class="date"><?= date('y.m.d H:i', strtotime($c_list[$j]['wr_datetime'])) ?></span>
</p>
</li>
<?php
}
if ($j > 0) {
echo "</ul>";
}
?>
</dd>
</dl>
<?php }
if ($i == 0) { ?>
<div class="no-data">
등록한 로그 내역이 없습니다.
</div>
<?php } ?>
</div>
<i class="style-line horizon"></i>
<?php echo $write_pages ?>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,147 @@
<?php
include_once './_common.php';
include_once G5_LIB_PATH . '/thumbnail.lib.php';
include_once './_head.php';
$sql_common = " from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' ";
$sql_order = " order by ms_id desc ";
$sql = " select count(*) as cnt $sql_common ";
$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; // 시작 열을 구함
$list = [];
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
$list = [];
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
// 순차적인 번호 (순번)
$num = $total_count - ($page - 1) * $rows - $i;
// 게시판 제목
$sql2 = " select bo_subject from {$g5['board_table']} where bo_table = '{$row['bo_table']}' ";
$row2 = sql_fetch($sql2);
if (!$row2['bo_subject'])
$row2['bo_subject'] = '[게시판 없음]';
// 게시물 제목
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
$sql3 = " select wr_subject, wr_type, wr_name, ch_id, wr_num, wr_url from $tmp_write_table where wr_id = '{$row['wr_id']}' ";
$row3 = sql_fetch($sql3, FALSE);
$subject = get_text(cut_str($row3['wr_subject'], 100));
if (!$row3['wr_subject'])
$row3['wr_subject'] = '[글 없음]';
$list[$i]['wr_num'] = $row3['wr_num'];
$list[$i]['wr_type'] = $row3['wr_type'];
$list[$i]['wr_url'] = $row3['wr_url'];
$list[$i]['ca_name'] = $row3['ca_name'];
$list[$i]['opener_href'] = './board.php?bo_table=' . $row['bo_table'];
$list[$i]['opener_href_wr_id'] = './board.php?bo_table=' . $row['bo_table'] . '&amp;wr_id=' . $row['wr_id'];
$list[$i]['bo_subject'] = $row2['bo_subject'];
$list[$i]['subject'] = $subject;
$list[$i]['del_href'] = './scrap_delete.php?ms_id=' . $row['ms_id'] . '&amp;page=' . $page;
$list[$i]['ch_id'] = $row3['ch_id'];
$list[$i]['wr_name'] = $row3['wr_name'];
}
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&amp;view=$view&amp;mb_id=$mb_id&amp;type=$type&amp;page=");
?>
<div class="top-frame-box none-trans">
<i class="top-left"></i><i class="top-right"></i><i class="left"></i><i class="right"></i>
<div class="inner">
<nav id="tab_list">
<ul>
<li>
<a href="./index.php">
나의로그
</a>
</li>
<li class="on">
<a href="./log_favorite.php" class="point">
관심로그
</a>
</li>
</ul>
</nav>
<i class="style-line horizon"></i>
<div class="mypage-favorite-list">
<?php for ($i = 0; $i < count($list); $i++) {
$bo_subject = cut_str($list[$i]['bo_subject'], 20);
$ca_name = $list[$i]['ca_name'];
if ($list[$i]['wr_type'] == 'UPLOAD') {
// Upload 형태로 로그를 등록 하였을 때
$thumb = get_list_thumbnail($list[$i]['bo_table'], $list[$i]['wr_id'], 150, 150);
$image_url = $thumb['src'];
$image_width = 140;
$image_height = 90;
} else if ($list[$i]['wr_type'] == 'URL') {
// URL 형태로 로그를 등록 하였을 때
$image_url = $list[$i]['wr_url'];
$image_width = $list[$i]['wr_width'];
$image_height = $list[$i]['wr_height'];
}
$list[$i]['log_num'] = $list[$i]['wr_num'] * -1;
if ($list[$i]['subject'] == '--|UPLOADING|--') {
$log_name = '???';
} else {
if ($list[$i]['wr_noname']) {
$log_name = '익명의 누군가';
} else {
$log_name = $list[$i]['subject'] . " / " . $list[$i]['wr_name'];
}
}
?>
<dl>
<dt>
<a
href="<?= G5_BBS_URL ?>/board.php?bo_table=<?php echo $list[$i]['bo_table'] ?>&amp;log=<?= $list[$i]['log_num'] ?>">
<img src="<?= $image_url ?>" onerror="$(this).remove();" />
</a>
</dt>
<dd>
<?= $log_name ?>
</dd>
</dl>
<?php }
if ($i == 0) { ?>
<div class="no-data">
등록한 로그 내역이 없습니다.
</div>
<?php } ?>
</div>
<i class="style-line horizon"></i>
<?php echo $write_pages ?>
</div>
</div>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,5 @@
<?php
include_once '../../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_head.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../tail.sub.php';

View file

@ -0,0 +1,5 @@
<?php
include_once '../../../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,53 @@
<?php
include_once './_common.php';
$re_mb = get_member($re_mb_id);
if (!$re_mb['mb_id']) {
return;
}
$re_ch = get_character($re_mb['ch_id']);
$sql = "select *
from {$g5['memo_table']}
where ((me_recv_mb_id = '{$re_mb['mb_id']}' and me_send_mb_id = '{$member['mb_id']}')
OR (me_send_mb_id = '{$re_mb['mb_id']}' and me_recv_mb_id = '{$member['mb_id']}'))
AND me_id > '{$me_id}'
ORDER BY me_id asc ";
$result = sql_query($sql);
$total = sql_num_rows($result);
$last_me_id = 0;
if ($total > 0) {
$sql = " update {$g5['member_table']}
set mb_memo_call = ''
where mb_id = '{$member['mb_id']}'
and mb_name = '{$re_ch['mb_name']}";
sql_query($sql);
for ($i = 0; $me = sql_fetch_array($result); $i++) {
if ($me['me_send_mb_id'] == $member['mb_id']) {
$class = "me";
$mb = $member;
$ch = $character;
$del = './memo_delete.php?me_id=' . $me['me_id'];
} else {
$class = "you";
$mb = $re_mb;
$ch = $re_ch;
$del = '';
$sql = " update {$g5['memo_table']}
set me_read_datetime = '" . G5_TIME_YMDHIS . "'
where me_send_mb_id = '{$re_mb['mb_id']}'
and me_recv_mb_id = '{$member['mb_id']}'
and me_read_datetime = '0000-00-00 00:00:00' ";
sql_query($sql);
}
$last_me_id = $last_me_id > $me['me_id'] ? $last_me_id : $me['me_id'];
// 템플릿 불러오기
include('../memo_view.skin.php');
}
?>
<i id="last_idx" style="display: none;"><?= $last_me_id ?></i>
<i id="last_count" style="display: none;"><?= $i ?></i>
<?php }

View file

@ -0,0 +1,53 @@
<?php
include_once './_common.php';
$re_mb = get_member($re_mb_id);
if (!$re_mb['mb_id']) {
$re_mb['mb_id'] = $re_mb_id;
}
$re_ch = get_character($re_mb['ch_id']);
$sql = "select *
from {$g5['memo_table']}
where (me_recv_mb_id = '{$re_mb['mb_id']}' and me_send_mb_id = '{$member['mb_id']}')
OR (me_send_mb_id = '{$re_mb['mb_id']}' and me_recv_mb_id = '{$member['mb_id']}')
ORDER BY me_id desc ";
$result = sql_query($sql);
$total = sql_num_rows($result);
$page_rows = 5;
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$total_page = ceil($total / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$sql .= " limit {$from_record}, $page_rows ";
$result = sql_query($sql);
$max_count = sql_num_rows($result);
$last_me_id = 0;
$list = [];
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
$last_me_id = $last_me_id > $row['me_id'] ? $last_me_id : $row['me_id'];
}
for ($i = ($max_count - 1); $i >= 0; $i--) {
$me = $list[$i];
if ($me['me_send_mb_id'] == $member['mb_id']) {
$class = "me";
$mb = $member;
$ch = $character;
$del = './memo_delete.php?me_id=' . $me['me_id'];
} else {
$class = "you";
$mb = $re_mb;
$ch = $re_ch;
$del = '';
}
$last_me_id = $me['me_id'];
// 템플릿 불러오기
include('../memo_view.skin.php');
}

View file

@ -0,0 +1,89 @@
<?php
include_once './_common.php';
include_once './_head.php';
$sql = "select
MAX(me_id) as me_id,
COUNT(me_id) as count,
if(me_recv_mb_id = '{$member['mb_id']}', me_send_mb_id, me_recv_mb_id) as mb_id
from {$g5['memo_table']}
where me_send_mb_id = '{$member['mb_id']}'
OR me_recv_mb_id = '{$member['mb_id']}'
group by mb_id
order by me_id desc";
$result = sql_query($sql);
$total = sql_num_rows($result);
$rows = 5;
$total_page = ceil($total / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql .= " limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$write_page = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'] . '?type=');
?>
<div class="ui-list-control">
<a href="javascript:location.reload();" class="ui-btn small">REFRESH</a>
<a href="./memo_form.php" class="ui-btn small point">WRITE</a>
</div>
<div class="ui-chatting-memo">
<?php
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$me = sql_fetch("select * from {$g5['memo_table']} where me_id = '{$row['me_id']}'");
$total = $row['count'];
$mb = get_member($row['mb_id']);
$ch = get_character($mb['ch_id']);
?>
<div class="message-item index you">
<div class="thumb">
<?php if ($ch['ch_thumb']) { ?>
<img src="<?= $ch['ch_thumb'] ?>" />
<?php } ?>
</div>
<div class="detail theme-box">
<h3>
<strong><?= $mb['mb_name'] ?>&nbsp;</strong>
</h3>
<div class="info">
<span class="date">
<strong class="not-mo"><?= $me['me_send_datetime'] ?></strong>
<strong class="only-mo"><?= date('m-d H:i', strtotime($me['me_send_datetime'])) ?></strong>
</span>
<?php if ($me['me_read_datetime'] == '0000-00-00 00:00:00' && $me['me_send_mb_id'] != $member['mb_id']) { ?>
<i class="ico-new">N</i>
<?php } ?>
<i class="ico-total ui-btn point">T</i>
<span class="total-text">
<?= $total ?>
</span>
</div>
<div class="text no-link theme-box <?php if ($me['me_send_mb_id'] == $member['mb_id']) { ?> mine<?php } ?>">
<a href="./memo_view.php?re_mb_id=<?= $row['mb_id'] ?>">
<?php if ($me['me_send_mb_id'] == $member['mb_id']) { ?>
ME
<?php } ?>
<?php echo conv_subject($me['me_memo'], 120, '...'); ?>
</a>
</div>
</div>
</div>
<?php } ?>
</div>
<?= $write_page ?>
<hr class="padding" />
<hr class="padding" />
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,26 @@
<?php
include_once './_common.php';
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
$me = sql_fetch($sql);
if ($me['me_send_mb_id'] != $member['mb_id'] && !$is_admin) {
alert('본인이 보낸 우편만 삭제 가능합니다.');
}
$call_name = get_member_name($row['me_send_mb_id']);
if ($me['me_read_datetime'] == '0000-00-00 00:00:00') {
$sql = " update {$g5['member_table']}
set mb_memo_call = ''
where mb_id = '{$me['me_recv_mb_id']}'
and mb_memo_call = '{$call_name}' ";
sql_query($sql);
}
$sql = " delete from {$g5['memo_table']}
where me_id = '{$me_id}'
and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
sql_query($sql);
goto_url('./memo_view.php?re_mb_id=' . $me['me_recv_mb_id']);

View file

@ -0,0 +1,68 @@
<?php
include_once './_common.php';
include_once './_head.php';
$content = "";
// 탈퇴한 회원에게 쪽지 보낼 수 없음
if ($me_recv_mb_id) {
$mb = get_member($me_recv_mb_id);
if (!$mb['mb_id'])
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
if (!$mb['mb_open'] && $is_admin != 'super')
alert_close('정보공개를 하지 않았습니다.');
// 4.00.15
$row = sql_fetch(" select me_memo from {$g5['memo_table']} where me_id = '{$me_id}' and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ");
if ($row['me_memo']) {
$content = "\n\n\n" . ' >'
. "\n" . ' >'
. "\n" . ' >' . str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
. "\n" . ' >'
. ' >';
}
}
?>
<form name="fmemoform" action="./memo_update.php" onsubmit="return fmemoform_submit(this);" method="post"
autocomplete="off">
<table class="theme-form">
<colgroup>
<col style="width: 100px;" />
<col />
</colgroup>
<tbody>
<tr>
<th>받는사람</th>
<td>
<input type="hidden" name="re_mb_id" id="re_mb_id" value="" />
<input type="text" name="re_mb_name" value="" id="re_mb_name"
onkeyup="get_ajax_member(this, 'member_list', 're_mb_id');" />
<div id="member_list" class="ajax-list-box theme-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th>내용</th>
<td>
<textarea name="me_memo" id="me_memo" required class="required" rows="10"><?php echo $content ?></textarea>
</td>
</tr>
</tbody>
</table>
<div class="txt-center" style="padding: 20px 0;">
<button type="submit" class="ui-btn point">전송</button>
</div>
</form>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,17 @@
<?php
include_once './_common.php';
if ($re_mb_id) {
$re_mb = get_member($re_mb_id);
}
if (!$re_mb['mb_id'] && $re_mb_name) {
$re_mb = sql_fetch("select mb_id from {$g5['member_table']} where mb_name = '{$re_mb_name}'");
$re_mb_id = $re_mb['mb_id'];
}
if ($re_mb['mb_id']) {
send_memo($member['mb_id'], $re_mb_id, $me_memo);
goto_url('./memo_view.php?re_mb_id=' . $re_mb_id);
} else {
alert('상대방을 확인할 수 없습니다.');
}

View file

@ -0,0 +1,172 @@
<?php
include_once './_common.php';
include_once './_head.php';
$re_mb = get_member($re_mb_id);
if (!$re_mb['mb_id']) {
$re_mb['mb_id'] = $re_mb_id;
}
$re_ch = get_character($re_mb['ch_id']);
// 읽음 표시 설정
// -- 해당 멤버와 나눈 대화 전체 읽음 표시
$sql = " update {$g5['memo_table']}
set me_read_datetime = '" . G5_TIME_YMDHIS . "'
where me_send_mb_id = '{$re_mb['mb_id']}'
and me_recv_mb_id = '{$member['mb_id']}'
and me_read_datetime = '0000-00-00 00:00:00' ";
sql_query($sql);
// 대화 알람 제거
$sql = " update {$g5['member_table']}
set mb_memo_call = ''
where mb_id = '{$member['mb_id']}'";
sql_query($sql);
// 최근 대화내역 가져오기
$sql = "select *
from {$g5['memo_table']}
where (me_recv_mb_id = '{$re_mb['mb_id']}' and me_send_mb_id = '{$member['mb_id']}')
OR (me_send_mb_id = '{$re_mb['mb_id']}' and me_recv_mb_id = '{$member['mb_id']}')
ORDER BY me_id desc ";
$result = sql_query($sql);
$total = sql_num_rows($result);
$page_rows = 5;
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$total_page = ceil($total / $page_rows); // 전체 페이지 계산
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$sql .= " limit {$from_record}, $page_rows ";
$result = sql_query($sql);
$max_count = sql_num_rows($result);
$last_me_id = 0;
$list = [];
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
$last_me_id = $last_me_id > $row['me_id'] ? $last_me_id : $row['me_id'];
}
?>
<div class="ui-list-control">
<a href="javascript:location.reload();" class="ui-btn">REFRESH</a>
<a href="./" class="ui-btn point">&nbsp;LIST&nbsp;</a>
</div>
<div class="ui-chatting-memo view">
<?php if ($total_page > 1) { ?>
<a href="#" id="load_talk_prev" class="ui-btn small full etc">이전대화보기</a>
<?php } ?>
<div class="ui-chatting-list">
<?php for ($i = ($max_count - 1); $i >= 0; $i--) {
$me = $list[$i];
if ($me['me_send_mb_id'] == $member['mb_id']) {
$class = "me";
$mb = $member;
$ch = $character;
$del = './memo_delete.php?me_id=' . $me['me_id'];
} else {
$class = "you";
$mb = $re_mb;
$ch = $re_ch;
$del = '';
}
// 템플릿 불러오기
include('./memo_view.skin.php');
} ?>
</div>
<form name="fmemoform" action="./memo_update.php" onsubmit="return fmemoform_submit(this);" method="post"
autocomplete="off">
<input type="hidden" name="pop" value="<?= $pop ?>" />
<input type="hidden" name="re_mb_id" value="<?= $re_mb['mb_id'] ?>" />
<div class="ui-memo-write">
<div class="textarea">
<textarea name="me_memo" id="me_memo" required class="required" tabindex="1"><?php echo $content ?></textarea>
</div>
<div class="win_btn">
<button type="submit" class="ui-btn full point" tabindex="2">답장보내기</button>
</div>
</div>
</form>
</div>
<hr class="padding" />
<hr class="padding" />
<script>
var paging = 1;
$('#me_memo').focus();
$('#load_talk_prev').on('click', function () {
paging++;
$.ajax({
type: 'get'
, async: true
, url: "./ajax/ajax_prev_talk.php?re_mb_id=<?= $re_mb_id ?>&page=" + paging
, beforeSend: function () {
}
, success: function (data) {
var response = data.trim();
$('.ui-chatting-list').prepend(response);
if (!response) {
$('#load_talk_prev').remove();
}
}
, error: function (data, status, err) {
}
, complete: function () {
}
});
return false;
});
$(function () {
setInterval(function () { load_comment_list() }, 5000);
});
var last_cmcode = <?= $last_me_id ?>;
function load_comment_list() {
$.ajax({
type: 'get'
, async: true
, url: "./ajax/ajax_latest_talk.php?re_mb_id=<?= $re_mb_id ?>&me_id=" + last_cmcode
, beforeSend: function () {
}
, success: function (data) {
var response = data.trim();
if (response) {
$('.ui-chatting-list').append(response);
var last_me_id = $('#last_idx').text();
var last_count = $('#last_count').text();
$('#last_idx').remove();
$('#last_count').remove();
last_cmcode = last_me_id;
for (i = 0; i < last_count; i++) {
$('.ui-chatting-list .ch-item').eq(i).remove();
}
}
}
, complete: function () {
}
});
}
function fmemoform_submit(f) {
return true;
}
</script>
<?php
include_once './_tail.php';
?>

View file

@ -0,0 +1,35 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
?>
<div class="message-item <?= $class ?>">
<div class="thumb">
<?php if ($ch['ch_thumb']) { ?>
<a href="<?= G5_URL ?>/member/viewer.php?ch_id=<?= $ch['ch_id'] ?>">
<img src="<?= $ch['ch_thumb'] ?>" />
</a>
<?php } ?>
</div>
<div class="detail theme-box">
<div class="info">
<p class="name"><?php if ($ch['ch_name']) { ?>[<?= $ch['ch_name'] ?>] <?php } ?><?= $mb['mb_name'] ?></p>
<p class="date"><?= date('m-d H:i', strtotime($me['me_send_datetime'])) ?></p>
<p class="check">
<?php if ($me['me_read_datetime'] == '0000-00-00 00:00:00' && $mb['mb_id'] == $member['mb_id']) { ?>
***
<?php } else { ?>
읽음
<?php } ?>
<?php if ($del) { ?>
<a href="<?= $del ?>" onclick="return confirm('정말 삭제하시겠습니까? 상대방의 우편함의 내용도 함께 삭제 됩니다.');"
class="ui-btn ico del">삭제</a>
<?php } ?>
</p>
</div>
<div class="text">
<?= conv_content($me['me_memo'], 0) ?>
</div>
</div>
</div>

View file

@ -0,0 +1,5 @@
<?php
include_once '../../common.php';
if (!$is_member) {
goto_url(G5_BBS_URL . "/login.php");
}

View file

@ -0,0 +1,12 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_head.php';
if (!$ad['ad_use_money'])
alert("사용할 수 없는 페이지 입니다.");
?>
<h2 class="page-title">
<strong><?= $config['cf_money'] ?> 관리</strong>
<span>Money Information</span>
</h2>

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../head.sub.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../_tail.php';

View file

@ -0,0 +1,4 @@
<?php
if (!defined('_GNUBOARD_'))
exit;
include_once '../tail.sub.php';

View file

@ -0,0 +1,118 @@
<?php
include_once './_common.php';
include_once './_head.php';
$sql_common = " from {$g5['point_table']} where mb_id = '" . escape_trim($member['mb_id']) . "' ";
$sql_order = " order by po_id desc ";
$sql = " select count(*) as cnt {$sql_common} ";
$total = sql_fetch($sql);
$total = $total['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total / $rows); // 전체 페이지 계산
if ($page < 1) {
$page = 1;
} // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
{$sql_common}
{$sql_order}
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
?>
<form action="./money_update.php" method="post" name="frmItemSend">
<input type="hidden" name="se_mb_id" value="<?= $member['mb_id'] ?>" />
<table class="theme-form">
<colgroup>
<col style="width: 100px;" />
<col />
</colgroup>
<tbody>
<tr>
<th>받는사람</th>
<td>
<input type="hidden" name="ch_id" id="ch_id" value="" />
<input type="text" name="ch_name" value="" id="ch_name"
onkeyup="get_ajax_character(this, 'character_list', 'ch_id');" />
<div id="character_list" class="ajax-list-box theme-box">
<div class="list"></div>
</div>
</td>
</tr>
<tr>
<th>전달<?= $config['cf_money'] ?></th>
<td>
<input type="text" name="po_point" id="po_point" size="10" /> <?= $config['cf_money_pice'] ?>
</td>
</tr>
</tbody>
</table>
<div class="txt-center" style="padding: 20px 0;">
<button type="submit" class="ui-btn point">전송</button>
</div>
</form>
<hr class="padding" />
<table class="theme-list">
<colgroup>
<col />
<col style="width: 80px;" />
<col style="width: 80px;" />
</colgroup>
<thead>
<tr>
<th scope="col">내용</th>
<th scope="col">획득</th>
<th scope="col">사용</th>
</tr>
</thead>
<tbody>
<?php
$sum_point1 = $sum_point2 = $sum_point3 = 0;
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$point1 = $point2 = 0;
if ($row['po_point'] > 0) {
$point1 = number_format($row['po_point']) . $config['cf_money_pice'];
$sum_point1 += $row['po_point'];
} else {
$point2 = number_format($row['po_point'] * -1) . $config['cf_money_pice'];
$sum_point2 += $row['po_point'];
}
$po_content = $row['po_content'];
$expr = '';
if ($row['po_expired'] == 1)
$expr = ' txt_expired';
?>
<tr>
<td>[<?php echo $row['po_datetime']; ?>] <?php echo $po_content; ?></td>
<td class="txt-right"><?php echo $point1; ?></td>
<td class="txt-right"><?php echo $point2; ?></td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="3" class="no-data">자료가 없습니다.</td></tr>';
else {
if ($sum_point1 > 0)
$sum_point1 = number_format($sum_point1);
$sum_point2 = number_format($sum_point2 * -1);
}
?>
<tr>
<th scope="row">소계</th>
<td class="txt-right"><?php echo $sum_point1; ?><?= $config['cf_money_pice'] ?></td>
<td class="txt-right"><?php echo $sum_point2; ?><?= $config['cf_money_pice'] ?></td>
</tr>
<tr>
<th scope="row">보유 금액</th>
<td colspan="2" class="txt-right"><?php echo number_format($member['mb_point']); ?><?= $config['cf_money_pice'] ?>
</td>
</tr>
</tbody>
</table>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'] . '?' . $qstr . '&amp;page='); ?>
<hr class="padding" />
<?php
include_once './_tail.php';

View file

@ -0,0 +1,34 @@
<?php
include_once './_common.php';
$point = (int) $po_point;
if ($point > 0) {
if ($member['mb_point'] < $point) {
alert("소지" . $config['cf_money'] . " 보다 많은 " . $config['cf_money'] . j($config['cf_money'], '은') . " 보낼 수 없습니다.");
}
if (!$ch_id) {
$re_ch = sql_fetch("select * from {$g5['character_table']} where ch_name = '{$ch_name}'");
} else {
$re_ch = get_character($ch_id);
}
$recv_name = get_member_name($re_ch['mb_id']);
if (!$recv_name) {
alert("상대를 확인할 수 없습니다.");
}
$recv_id = $re_ch['mb_id'];
insert_point($recv_id, $point, "[받음] " . $member['mb_name'] . '님 (' . $point . ' ' . $config['cf_money_pice'] . ' )', 'money', time(), '입금');
insert_point($member['mb_id'], ($point * -1), "[보냄] " . $recv_name . '님 (-' . $point . ' ' . $config['cf_money_pice'] . ' )', 'money', time(), '출금');
$memo_content = $member['mb_name'] . "님이 " . $point . $config['cf_money_pice'] . " 보냈습니다.";
// 쪽지 보내기
send_memo($member['mb_id'], $recv_id, $memo_content);
alert($recv_name . "님께 " . $point . $config['cf_money'] . " 보냈습니다.");
} else {
alert("오류로 인해 보내지 못하였습니다.");
}

View file

@ -7,8 +7,8 @@
/* Start session and load lib */
session_start();
require_once('twitteroauth/twitteroauth.php');
require_once('config.php');
include_once 'twitteroauth/twitteroauth.php';
include_once 'config.php';
/* If the oauth_token is old redirect to the connect page. */
if (isset($_REQUEST['oauth_token']) && $_SESSION['oauth_token'] !== $_REQUEST['oauth_token']) {

View file

@ -9,8 +9,8 @@ include_once "./_common.php";
/* Start session and load lib */
//session_start();
require_once(G5_SNS_PATH . '/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH . '/twitter/twitterconfig.php');
include_once G5_SNS_PATH . '/twitter/twitteroauth/twitteroauth.php';
include_once G5_SNS_PATH . '/twitter/twitterconfig.php';
//print_r2($_SESSION); print_r2($_REQUEST); exit;

View file

@ -9,7 +9,7 @@ include_once "./_common.php";
/**
* Exit with an error message if the CONSUMER_KEY or CONSUMER_SECRET is not defined.
*/
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
include_once G5_SNS_PATH.'/twitter/twitterconfig.php';
if (CONSUMER_KEY === '' || CONSUMER_SECRET === '' || CONSUMER_KEY === 'CONSUMER_KEY_HERE' || CONSUMER_SECRET === 'CONSUMER_SECRET_HERE') {
echo 'You need a consumer key and secret to test the sample code. Get one from <a href="https://dev.twitter.com/apps">dev.twitter.com/apps</a>';
exit;

View file

@ -8,8 +8,8 @@ include_once "./_common.php";
/* Load required lib files. */
//session_start();
require_once(G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
include_once G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php';
include_once G5_SNS_PATH.'/twitter/twitterconfig.php';
/* If access tokens are not available redirect to connect page. */
if (empty($_SESSION['access_token']) || empty($_SESSION['access_token']['oauth_token']) || empty($_SESSION['access_token']['oauth_token_secret'])) {

View file

@ -3,8 +3,8 @@ include_once "./_common.php";
/* Start session and load library. */
//session_start();
require_once(G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php');
require_once(G5_SNS_PATH.'/twitter/twitterconfig.php');
include_once G5_SNS_PATH.'/twitter/twitteroauth/twitteroauth.php';
include_once G5_SNS_PATH.'/twitter/twitterconfig.php';
/* Build TwitterOAuth object with client credentials. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);

Some files were not shown because too many files have changed in this diff Show more