일대일 문의 기능 추가
@ -5,5 +5,6 @@ $menu['menu300'] = array (
|
||||
array('300200', '게시판그룹관리', ''.G5_ADMIN_URL.'/boardgroup_list.php', 'bbs_group'),
|
||||
array('300300', '인기검색어관리', ''.G5_ADMIN_URL.'/popular_list.php', 'bbs_poplist', 1),
|
||||
array('300400', '인기검색어순위', ''.G5_ADMIN_URL.'/popular_rank.php', 'bbs_poprank', 1),
|
||||
array('300500', '1:1문의설정', ''.G5_ADMIN_URL.'/qa_config.php', 'qa'),
|
||||
);
|
||||
?>
|
||||
@ -28,7 +28,7 @@ if (!isset($config['cf_mobile_new_skin'])) {
|
||||
if (isset($config['cf_gcaptcha_mp3'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
CHANGE `cf_gcaptcha_mp3` `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' ", true);
|
||||
} else if (!isset($config['cf_captcha_mp3'])) {
|
||||
} else if (!isset($config['cf_captcha_mp3'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_captcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true);
|
||||
}
|
||||
@ -121,6 +121,15 @@ if(!isset($config['cf_analytics'])) {
|
||||
ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true);
|
||||
}
|
||||
|
||||
if(!isset($config['cf_sms_use'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||
ADD `cf_sms_use` varchar(255) NOT NULL DEFAULT '' AFTER `cf_cert_limit`,
|
||||
ADD `cf_icode_id` varchar(255) NOT NULL DEFAULT '' AFTER `cf_sms_use`,
|
||||
ADD `cf_icode_pw` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_id`,
|
||||
ADD `cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_pw`,
|
||||
ADD `cf_icode_server_port` varchar(255) NOT NULL DEFAULT '' AFTER `cf_icode_server_ip` ", true);
|
||||
}
|
||||
|
||||
$g5['title'] = '환경설정';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
@ -135,8 +144,63 @@ $pg_anchor = '<ul class="anchor">
|
||||
<li><a href="#anc_cf_vote_mail">투표메일</a></li>
|
||||
<li><a href="#anc_cf_sns">SNS</a></li>
|
||||
<li><a href="#anc_cf_lay">레이아웃 추가설정</a></li>
|
||||
<li><a href="#anc_cf_sms">SMS</a></li>
|
||||
<li><a href="#anc_cf_extra">여분필드</a></li>
|
||||
</ul>';
|
||||
|
||||
if (!function_exists("get_sock")) {
|
||||
function get_sock($url)
|
||||
{
|
||||
// host 와 uri 를 분리
|
||||
//if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res))
|
||||
if (preg_match("/http:\/\/([a-zA-Z0-9_\-\.]+)([^<]*)/", $url, $res))
|
||||
{
|
||||
$host = $res[1];
|
||||
$get = $res[2];
|
||||
}
|
||||
|
||||
// 80번 포트로 소캣접속 시도
|
||||
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
|
||||
if (!$fp)
|
||||
{
|
||||
die("$errstr ($errno)\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
fputs($fp, "GET $get HTTP/1.0\r\n");
|
||||
fputs($fp, "Host: $host\r\n");
|
||||
fputs($fp, "\r\n");
|
||||
|
||||
// header 와 content 를 분리한다.
|
||||
while (trim($buffer = fgets($fp,1024)) != "")
|
||||
{
|
||||
$header .= $buffer;
|
||||
}
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buffer .= fgets($fp,1024);
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
|
||||
// content 만 return 한다.
|
||||
return $buffer;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||
|
||||
if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
$res = get_sock('http://www.icodekorea.com/res/userinfo.php?userid='.$config['cf_icode_id'].'&userpw='.$config['cf_icode_pw']);
|
||||
$res = explode(';', $res);
|
||||
$userinfo = array(
|
||||
'code' => $res[0], // 결과코드
|
||||
'coin' => $res[1], // 고객 잔액 (충전제만 해당)
|
||||
'gpay' => $res[2], // 고객의 건수 별 차감액 표시 (충전제만 해당)
|
||||
'payment' => $res[3] // 요금제 표시, A:충전제, C:정액제
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);">
|
||||
@ -940,6 +1004,86 @@ $pg_anchor = '<ul class="anchor">
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_sms">
|
||||
<h2 class="h2_frm">SMS</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>SMS 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_sms_use">SMS 사용</label></th>
|
||||
<td>
|
||||
<select id="cf_sms_use" name="cf_sms_use">
|
||||
<option value="" <?php echo get_selected($config['cf_sms_use'], ''); ?>>사용안함</option>
|
||||
<option value="icode" <?php echo get_selected($config['cf_sms_use'], 'icode'); ?>>아이코드</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 패스워드</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 패스워드를 입력합니다."); ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" class="frm_input" id="cf_icode_pw">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">요금제</th>
|
||||
<td>
|
||||
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
|
||||
<?php
|
||||
if ($userinfo['payment'] == 'A') {
|
||||
echo '충전제';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
|
||||
} else if ($userinfo['payment'] == 'C') {
|
||||
echo '정액제';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7296">';
|
||||
} else {
|
||||
echo '가입해주세요.';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<?php echo help("아래 링크에서 회원가입 하시면 문자 건당 16원에 제공 받을 수 있습니다."); ?>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr>
|
||||
<th scope="row">충전 잔액</th>
|
||||
<td colspan="3">
|
||||
<?php echo number_format($userinfo['coin']); ?> 원.
|
||||
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $default['de_icode_id']; ?>&icode_passwd=<?php echo $default['de_icode_pw']; ?>" target="_blank" class="btn_frmline" onclick="window.open(this.href,'icode_payment', 'scrollbars=1,resizable=1'); return false;">충전하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">건수별 금액</th>
|
||||
<td colspan="3">
|
||||
<?php echo number_format($userinfo['gpay']); ?> 원.
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="anc_cf_extra">
|
||||
<h2 class="h2_frm">여분필드 기본 설정</h2>
|
||||
<?php echo $pg_anchor ?>
|
||||
|
||||
@ -115,6 +115,11 @@ $sql = " update {$g5['config_table']}
|
||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||
cf_facebook_appid = '{$_POST['cf_facebook_appid']}',
|
||||
cf_facebook_secret = '{$_POST['cf_facebook_secret']}',
|
||||
|
||||
@ -187,8 +187,7 @@ $colspan = 15;
|
||||
|
||||
$address = $row['mb_zip1'] ? $row['mb_addr1'].' '.$row['mb_addr2'] : '';
|
||||
|
||||
$tr_bg = '';
|
||||
if ($i%2 == 0) $tr_bg = 'class="tr_bg"';
|
||||
$tr_bg = $i%2 ? 'class="tr_bg1"' : 'class="tr_bg0"';
|
||||
|
||||
switch($row['mb_certify']) {
|
||||
case 'hp':
|
||||
|
||||
257
adm/qa_config.php
Normal file
@ -0,0 +1,257 @@
|
||||
<?php
|
||||
$sub_menu = "300500";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$g5['title'] = '1:1문의 설정';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
// DB 테이블 생성
|
||||
if(!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_config_table']}` (
|
||||
`qa_title` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_send_number` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_admin_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_image_width` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_upload_size` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_insert_content` text NOT NULL,
|
||||
`qa_1_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT ''
|
||||
)", true);
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_content_table']}` (
|
||||
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`qa_num` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_parent` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_related` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`qa_name` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_type` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_content` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_status` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_file1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_file2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`qa_id`),
|
||||
KEY `qa_num_parent` (`qa_num`,`qa_parent`)
|
||||
)", true);
|
||||
}
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
if(empty($qaconfig)) {
|
||||
$sql = " insert into `{$g5['qa_config_table']}`
|
||||
( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content )
|
||||
values
|
||||
( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fqaconfigform" id="fqaconfigform" method="post" onsubmit="return fqaconfigform_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
|
||||
<section id="anc_cf_qa_config">
|
||||
<h2 class="h2_frm">1:1문의 설정</h2>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>1:1문의 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_title">타이틀<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_title" value="<?php echo $qaconfig['qa_title'] ?>" id="qa_title" required class="required frm_input" size="40">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/qalist.php" class="btn_frmline">1:1문의 바로가기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||
<input type="text" name="qa_category" value="<?php echo $qaconfig['qa_category'] ?>" id="qa_category" required class="required frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_skin_select('qa', 'qa_skin', 'qa_skin', $qaconfig['qa_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_skin">모바일 스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_mobile_skin_select('qa', 'qa_skin', 'qa_skin', $qaconfig['qa_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">이메일 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="qa_use_email" value="1" id="qa_use_email" <?php echo $qaconfig['qa_use_email']?'checked':''; ?>> <label for="qa_use_email">보이기</label>
|
||||
<input type="checkbox" name="qa_req_email" value="1" id="qa_req_email" <?php echo $qaconfig['qa_req_email']?'checked':''; ?>> <label for="qa_req_email">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">휴대폰 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="qa_use_hp" value="1" id="qa_use_hp" <?php echo $qaconfig['qa_use_hp']?'checked':''; ?>> <label for="qa_use_hp">보이기</label>
|
||||
<input type="checkbox" name="qa_req_hp" value="1" id="qa_req_hp" <?php echo $qaconfig['qa_req_hp']?'checked':''; ?>> <label for="qa_req_hp">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_use_sms">SMS 알림</label></th>
|
||||
<td>
|
||||
<?php echo help('휴대폰 입력을 사용하실 경우 문의글 등록시 등록자가 답변등록시 SMS 알림 수신을 선택할 수 있도록 합니다.<br>SMS 알림을 사용하기 위해서는 기본환경설정 > <a href="'.G5_ADMIN_URL.'/config_form.php#anc_cf_sms">SMS 설정</a>을 하셔야 합니다.') ?>
|
||||
<select name="qa_use_sms" id="qa_use_sms">
|
||||
<?php echo option_selected(0, $qaconfig['qa_use_sms'], '사용안함'); ?>
|
||||
<?php echo option_selected(1, $qaconfig['qa_use_sms'], '사용함'); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_send_number">SMS 발신번호</label></th>
|
||||
<td>
|
||||
<?php echo help('SMS 알림 전송시 발신번호로 사용됩니다.'); ?>
|
||||
<input type="text" name="qa_send_number" value="<?php echo $qaconfig['qa_send_number'] ?>" id="qa_send_number" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_admin_hp">관리자 휴대폰번호</label></th>
|
||||
<td>
|
||||
<?php echo help('관리자 휴대폰번호를 입력하시면 문의글 등록시 등록하신 번호로 SMS 알림이 전송됩니다.<br>SMS 알림을 사용하지 않으시면 알림이 전송되지 않습니다.'); ?>
|
||||
<input type="text" name="qa_admin_hp" value="<?php echo $qaconfig['qa_admin_hp'] ?>" id="qa_admin_hp" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_use_editor">DHTML 에디터 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.'); ?>
|
||||
<select name="qa_use_editor" id="qa_use_editor">
|
||||
<?php echo option_selected(0, $qaconfig['qa_use_editor'], '사용안함'); ?>
|
||||
<?php echo option_selected(1, $qaconfig['qa_use_editor'], '사용함'); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject_len">제목 길이</label></th>
|
||||
<td>
|
||||
<?php echo help('목록에서의 제목 글자수') ?>
|
||||
<input type="text" name="qa_subject_len" value="<?php echo $qaconfig['qa_subject_len'] ?>" id="qa_subject_len" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_subject_len">모바일 제목 길이</label></th>
|
||||
<td>
|
||||
<?php echo help('목록에서의 제목 글자수') ?>
|
||||
<input type="text" name="qa_mobile_subject_len" value="<?php echo $qaconfig['qa_mobile_subject_len'] ?>" id="qa_mobile_subject_len" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_page_rows">페이지당 목록 수</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_page_rows" value="<?php echo $qaconfig['qa_page_rows'] ?>" id="qa_page_rows" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_page_rows">모바일 페이지당 목록 수</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_mobile_page_rows" value="<?php echo $qaconfig['qa_mobile_page_rows'] ?>" id="qa_mobile_page_rows" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_image_width">이미지 폭 크기</label></th>
|
||||
<td>
|
||||
<?php echo help('게시판에서 출력되는 이미지의 폭 크기') ?>
|
||||
<input type="text" name="qa_image_width" value="<?php echo $qaconfig['qa_image_width'] ?>" id="qa_image_width" required class="required numeric frm_input" size="4"> 픽셀
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_upload_size">파일 업로드 용량</label></th>
|
||||
<td>
|
||||
<?php echo help('최대 '.ini_get("upload_max_filesize").' 이하 업로드 가능, 1 MB = 1,048,576 bytes') ?>
|
||||
업로드 파일 한개당 <input type="text" name="qa_upload_size" value="<?php echo $qaconfig['qa_upload_size'] ?>" id="qa_upload_size" required class="required numeric frm_input" size="10"> bytes 이하
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1; $i<=5; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_extra">
|
||||
<label for="qa_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="qa_<?php echo $i ?>_subj" id="qa_<?php echo $i ?>_subj" value="<?php echo get_text($qaconfig['qa_'.$i.'_subj']) ?>" class="frm_input">
|
||||
<label for="qa_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||
<input type="text" name="qa_<?php echo $i ?>" value="<?php echo get_text($qaconfig['qa_'.$i]) ?>" id="qa_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fqaconfigform_submit(f)
|
||||
{
|
||||
f.action = "./qa_config_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
44
adm/qa_config_update.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
$sub_menu = "300500";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
qa_skin = '{$_POST['qa_skin']}',
|
||||
qa_mobile_skin = '{$_POST['qa_mobile_skin']}',
|
||||
qa_use_email = '{$_POST['qa_use_email']}',
|
||||
qa_req_email = '{$_POST['qa_req_email']}',
|
||||
qa_use_hp = '{$_POST['qa_use_hp']}',
|
||||
qa_req_hp = '{$_POST['qa_req_hp']}',
|
||||
qa_use_sms = '{$_POST['qa_use_sms']}',
|
||||
qa_send_number = '{$_POST['qa_send_number']}',
|
||||
qa_admin_hp = '{$_POST['qa_admin_hp']}',
|
||||
qa_use_editor = '{$_POST['qa_use_editor']}',
|
||||
qa_subject_len = '{$_POST['qa_subject_len']}',
|
||||
qa_mobile_subject_len = '{$_POST['qa_mobile_subject_len']}',
|
||||
qa_page_rows = '{$_POST['qa_page_rows']}',
|
||||
qa_mobile_page_rows = '{$_POST['qa_mobile_page_rows']}',
|
||||
qa_image_width = '{$_POST['qa_image_width']}',
|
||||
qa_upload_size = '{$_POST['qa_upload_size']}',
|
||||
qa_insert_content = '{$_POST['qa_insert_content']}',
|
||||
qa_1_subj = '{$_POST['qa_1_subj']}',
|
||||
qa_2_subj = '{$_POST['qa_2_subj']}',
|
||||
qa_3_subj = '{$_POST['qa_3_subj']}',
|
||||
qa_4_subj = '{$_POST['qa_4_subj']}',
|
||||
qa_5_subj = '{$_POST['qa_5_subj']}',
|
||||
qa_1 = '{$_POST['qa_1']}',
|
||||
qa_2 = '{$_POST['qa_2']}',
|
||||
qa_3 = '{$_POST['qa_3']}',
|
||||
qa_4 = '{$_POST['qa_4']}',
|
||||
qa_5 = '{$_POST['qa_5']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url('./qa_config.php');
|
||||
?>
|
||||
68
bbs/qadelete.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
|
||||
|
||||
$tmp_array = array();
|
||||
if ($qa_id) // 건별삭제
|
||||
$tmp_array[0] = $qa_id;
|
||||
else // 일괄삭제
|
||||
$tmp_array = $_POST['chk_qa_id'];
|
||||
|
||||
$count = count($tmp_array);
|
||||
if(!$count)
|
||||
alert('삭제할 게시글을 하나이상 선택해 주십시오.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$qa_id = $tmp_array[$i];
|
||||
|
||||
$sql = " select qa_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2
|
||||
from {$g5['qa_content_table']}
|
||||
where qa_id = '$qa_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['qa_id'])
|
||||
continue;
|
||||
|
||||
// 첨부파일 삭제
|
||||
for($k=1; $k<=2; $k++) {
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);
|
||||
// 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['qa_file'.$k])) {
|
||||
delete_qa_thumbnail($row['qa_file'.$k]);
|
||||
}
|
||||
}
|
||||
|
||||
// 에디터 썸네일 삭제
|
||||
delete_editor_thumbnail($row['qa_content']);
|
||||
|
||||
// 답변이 있는 질문글이라면 답변글 삭제
|
||||
if(!$row['qa_type'] && $row['qa_status']) {
|
||||
$row2 = sql_fetch(" select qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_parent = '$qa_id' ");
|
||||
// 첨부파일 삭제
|
||||
for($k=1; $k<=2; $k++) {
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$row2['qa_file'.$k]);
|
||||
// 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['qa_file'.$k])) {
|
||||
delete_qa_thumbnail($row2['qa_file'.$k]);
|
||||
}
|
||||
}
|
||||
|
||||
// 에디터 썸네일 삭제
|
||||
delete_editor_thumbnail($row2['qa_content']);
|
||||
|
||||
sql_query(" delete from {$g5['qa_content_table']} where qa_type = '1' and qa_parent = '$qa_id' ");
|
||||
}
|
||||
|
||||
// 답변글 삭제시 질문글의 상태변경
|
||||
if($row['qa_type']) {
|
||||
sql_query(" update {$g5['qa_content_table']} set qa_status = '0' where qa_id = '{$row['qa_parent']}' ");
|
||||
}
|
||||
|
||||
// 글삭제
|
||||
sql_query(" delete from {$g5['qa_content_table']} where qa_id = '$qa_id' ");
|
||||
}
|
||||
|
||||
goto_url(G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr));
|
||||
?>
|
||||
67
bbs/qadownload.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$no = (int)$no;
|
||||
|
||||
// 쿠키에 저장된 ID값과 넘어온 ID값을 비교하여 같지 않을 경우 오류 발생
|
||||
// 다른곳에서 링크 거는것을 방지하기 위한 코드
|
||||
if (!get_session('ss_qa_view_'.$qa_id))
|
||||
alert('잘못된 접근입니다.');
|
||||
|
||||
$sql = " select qa_subject, qa_file{$no}, qa_source{$no} from {$g5['qa_content_table']} where qa_id = '$qa_id' ";
|
||||
$file = sql_fetch($sql);
|
||||
if (!$file['qa_file'.$no])
|
||||
alert_close('파일 정보가 존재하지 않습니다.');
|
||||
|
||||
if($is_guest) {
|
||||
alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL.'/login.php?url='.urlencode(G5_BBS_URL.'/qaview.php?qa_id='.$qa_id));
|
||||
}
|
||||
|
||||
$filepath = G5_DATA_PATH.'/qa/'.$file['qa_file'.$no];
|
||||
$filepath = addslashes($filepath);
|
||||
if (!is_file($filepath) || !file_exists($filepath))
|
||||
alert('파일이 존재하지 않습니다.');
|
||||
|
||||
$g5['title'] = '다운로드 > '.conv_subject($file['qa_subject'], 255);
|
||||
|
||||
$original = urlencode($file['qa_source'.$no]);
|
||||
|
||||
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
header("content-type: doesn/matter");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-transfer-encoding: binary");
|
||||
} else {
|
||||
header("content-type: file/unknown");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-description: php generated data");
|
||||
}
|
||||
header("pragma: no-cache");
|
||||
header("expires: 0");
|
||||
flush();
|
||||
|
||||
$fp = fopen($filepath, 'rb');
|
||||
|
||||
// 4.00 대체
|
||||
// 서버부하를 줄이려면 print 나 echo 또는 while 문을 이용한 방법보다는 이방법이...
|
||||
//if (!fpassthru($fp)) {
|
||||
// fclose($fp);
|
||||
//}
|
||||
|
||||
$download_rate = 10;
|
||||
|
||||
while(!feof($fp)) {
|
||||
//echo fread($fp, 100*1024);
|
||||
/*
|
||||
echo fread($fp, 100*1024);
|
||||
flush();
|
||||
*/
|
||||
|
||||
print fread($fp, round($download_rate * 1024));
|
||||
flush();
|
||||
usleep(1000);
|
||||
}
|
||||
fclose ($fp);
|
||||
flush();
|
||||
?>
|
||||
124
bbs/qalist.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$g5['title'] = $qaconfig['qa_title'];
|
||||
include_once('./_head.php');
|
||||
|
||||
$qa_skin_path = (G5_IS_MOBILE ? G5_MOBILE_PATH : G5_PATH).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$qa_skin_url = (G5_IS_MOBILE ? G5_MOBILE_URL : G5_URL).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$skin_file = $qa_skin_path.'/list.skin.php';
|
||||
|
||||
$category_option = '';
|
||||
if ($qaconfig['qa_category']) {
|
||||
$category_href = G5_BBS_URL.'/qalist.php';
|
||||
|
||||
$category_option .= '<li><a href="'.$category_href.'"';
|
||||
if ($sca=='')
|
||||
$category_option .= ' id="bo_cate_on"';
|
||||
$category_option .= '>전체</a></li>';
|
||||
|
||||
$categories = explode('|', $qaconfig['qa_category']); // 구분자가 | 로 되어 있음
|
||||
for ($i=0; $i<count($categories); $i++) {
|
||||
$category = trim($categories[$i]);
|
||||
if ($category=='') continue;
|
||||
$category_msg = '';
|
||||
$category_option .= '<li><a href="'.($category_href."?sca=".urlencode($category)).'"';
|
||||
if ($category==$sca) { // 현재 선택된 카테고리라면
|
||||
$category_option .= ' id="bo_cate_on"';
|
||||
$category_msg = '<span class="sound_only">열린 분류 </span>';
|
||||
}
|
||||
$category_option .= '>'.$category_msg.$category.'</a></li>';
|
||||
}
|
||||
}
|
||||
|
||||
if(is_file($skin_file)) {
|
||||
$sql_common = " from {$g5['qa_content_table']} ";
|
||||
$sql_search = " where qa_type = '0' ";
|
||||
|
||||
if(!$is_admin)
|
||||
$sql_search .= " and mb_id = '{$member['mb_id']}' ";
|
||||
|
||||
if($sca) {
|
||||
if (preg_match("/[a-zA-Z]/", $sca))
|
||||
$sql_search .= " and INSTR(LOWER(qa_category), LOWER('$sca')) > 0 ";
|
||||
else
|
||||
$sql_search .= " and INSTR(qa_category, '$sca') > 0 ";
|
||||
}
|
||||
|
||||
$stx = trim($stx);
|
||||
if($stx) {
|
||||
if (preg_match("/[a-zA-Z]/", $stx))
|
||||
$sql_search .= " and ( INSTR(LOWER(qa_subject), LOWER('$sca')) > 0 or INSTR(LOWER(qa_content), LOWER('$stx')) > 0 )";
|
||||
else
|
||||
$sql_search .= " and ( INSTR(qa_subject, '$stx') > 0 or INSTR(qa_content, '$stx') > 0 ) ";
|
||||
}
|
||||
|
||||
$sql_order = " order by qa_num ";
|
||||
|
||||
$sql = " select count(*) as cnt
|
||||
$sql_common
|
||||
$sql_search ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$page_rows = G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows'];
|
||||
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
|
||||
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
|
||||
|
||||
$sql = " select *
|
||||
$sql_common
|
||||
$sql_search
|
||||
$sql_order
|
||||
limit $from_record, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$list = array();
|
||||
$num = $total_count - ($page - 1) * $page_rows;
|
||||
$subject_len = G5_IS_MOBILE ? $qaconfig['qa_mobile_subject_len'] : $qaconfig['qa_subject_len'];
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$list[$i] = $row;
|
||||
|
||||
$list[$i]['category'] = get_text($row['qa_category']);
|
||||
$list[$i]['subject'] = conv_subject($row['qa_subject'], $subject_len, '…');
|
||||
if ($stx) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
|
||||
$list[$i]['view_href'] = G5_BBS_URL.'/qaview.php?qa_id='.$row['qa_id'].$qstr;
|
||||
|
||||
$list[$i]['icon_file'] = '';
|
||||
if(trim($row['qa_file1']) || trim($row['qa_file2']))
|
||||
$list[$i]['icon_file'] = '<img src="'.$qa_skin_url.'/img/icon_file.gif">';
|
||||
|
||||
$list[$i]['name'] = get_text($row['qa_name']);
|
||||
$list[$i]['date'] = substr($row['qa_datetime'], 2, 8);
|
||||
|
||||
$list[$i]['num'] = $num - $i;
|
||||
}
|
||||
|
||||
$is_checkbox = false;
|
||||
$admin_href = '';
|
||||
if($is_admin) {
|
||||
$is_checkbox = true;
|
||||
$admin_href = G5_ADMIN_URL.'/qa_config.php';
|
||||
}
|
||||
|
||||
$list_href = G5_BBS_URL.'/qalist.php';
|
||||
$write_href = G5_BBS_URL.'/qawrite.php';
|
||||
|
||||
$list_pages = preg_replace('/(\.php)(&|&)/i', '$1?', get_paging(G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows'], $page, $total_page, './qalist.php'.$qstr.'&page='));
|
||||
|
||||
$stx = get_text(stripslashes($stx));
|
||||
include_once($skin_file);
|
||||
} else {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
175
bbs/qaview.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$g5['title'] = $qaconfig['qa_title'];
|
||||
include_once('./_head.php');
|
||||
|
||||
$qa_skin_path = (G5_IS_MOBILE ? G5_MOBILE_PATH : G5_PATH).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$qa_skin_url = (G5_IS_MOBILE ? G5_MOBILE_URL : G5_URL).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$skin_file = $qa_skin_path.'/view.skin.php';
|
||||
|
||||
if(is_file($skin_file)) {
|
||||
$sql = " select * from {$g5['qa_content_table']} where qa_id = '$qa_id' ";
|
||||
if(!$is_admin) {
|
||||
$sql .= " and mb_id = '{$member['mb_id']}' ";
|
||||
}
|
||||
|
||||
$view = sql_fetch($sql);
|
||||
|
||||
if(!$view['qa_id'])
|
||||
alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.');
|
||||
|
||||
$subject_len = G5_IS_MOBILE ? $qaconfig['qa_mobile_subject_len'] : $qaconfig['qa_subject_len'];
|
||||
|
||||
$view['category'] = get_text($view['qa_category']);
|
||||
$view['subject'] = conv_subject($view['qa_subject'], $subject_len, '…');
|
||||
$view['content'] = conv_content($view['qa_content'], $view['qa_html']);
|
||||
$view['name'] = get_text($view['qa_name']);
|
||||
$view['datetime'] = $view['qa_datetime'];
|
||||
|
||||
if (trim($stx))
|
||||
$view['subject'] = search_font($stx, $view['subject']);
|
||||
|
||||
if (trim($stx))
|
||||
$view['content'] = search_font($stx, $view['content']);
|
||||
|
||||
// 이전글, 다음글
|
||||
$sql = " select qa_id, qa_subject
|
||||
from {$g5['qa_content_table']}
|
||||
where qa_type = '0' ";
|
||||
if(!$is_admin) {
|
||||
$sql .= " and mb_id = '{$member['mb_id']}' ";
|
||||
}
|
||||
|
||||
// 이전글
|
||||
$prev_search = " and qa_num < '{$view['qa_num']}' order by qa_num desc limit 1 ";
|
||||
$prev = sql_fetch($sql.$prev_search);
|
||||
|
||||
$prev_href = '';
|
||||
if (isset($prev['qa_id']) && $prev['qa_id']) {
|
||||
$prev_qa_subject = get_text(cut_str($prev['qa_subject'], 255));
|
||||
$prev_href = G5_BBS_URL.'/qaview.php?qa_id='.$prev['qa_id'].$qstr;
|
||||
}
|
||||
|
||||
// 다음글
|
||||
$next_search = " and qa_num > '{$view['qa_num']}' order by qa_num asc limit 1 ";
|
||||
$next = sql_fetch($sql.$next_search);
|
||||
|
||||
$next_href = '';
|
||||
if (isset($next['qa_id']) && $next['qa_id']) {
|
||||
$next_qa_subject = get_text(cut_str($next['qa_subject'], 255));
|
||||
$next_href = G5_BBS_URL.'/qaview.php?qa_id='.$next['qa_id'].$qstr;
|
||||
}
|
||||
|
||||
|
||||
// 관련질문
|
||||
$rows = 10;
|
||||
$sql = " select *
|
||||
from {$g5['qa_content_table']}
|
||||
where qa_id <> '$qa_id'
|
||||
and qa_related = '{$view['qa_related']}'
|
||||
and qa_type = '0'
|
||||
order by qa_num, qa_type
|
||||
limit 0, $rows ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$rel_list = array();
|
||||
$rel_count = 0;
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$rel_list[$i] = $row;
|
||||
$rel_list[$i]['category'] = get_text($row['qa_category']);
|
||||
$rel_list[$i]['subject'] = conv_subject($row['qa_subject'], $subject_len, '…');
|
||||
$rel_list[$i]['name'] = get_text($row['qa_name']);
|
||||
$rel_list[$i]['date'] = substr($row['qa_datetime'], 2, 8);
|
||||
$rel_list[$i]['view_href'] = G5_BBS_URL.'/qaview.php?qa_id='.$row['qa_id'].$qstr;
|
||||
$rel_count++;
|
||||
}
|
||||
$view['rel_count'] = $rel_count;
|
||||
|
||||
$update_href = '';
|
||||
$delete_href = '';
|
||||
$write_href = G5_BBS_URL.'/qawrite.php';
|
||||
$rewrite_href = G5_BBS_URL.'/qawrite.php?w=r&qa_id='.$view['qa_id'];
|
||||
$list_href = G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr);
|
||||
|
||||
/*
|
||||
if($view['qa_type']) {
|
||||
if($is_admin)
|
||||
$update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$view['qa_id'].$qstr;
|
||||
} else {
|
||||
if($view['qa_status'] == 0)
|
||||
$update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$view['qa_id'].$qstr;
|
||||
}
|
||||
*/
|
||||
if(($view['qa_type'] && $is_admin) || (!$view['qa_type'] && $view['qa_status'] == 0)) {
|
||||
$update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$view['qa_id'].$qstr;
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].$qstr;
|
||||
}
|
||||
|
||||
// 질문글이고 등록된 답변이 있다면
|
||||
$answer = array();
|
||||
$answer_update_href = '';
|
||||
$answer_delete_href = '';
|
||||
if(!$view['qa_type'] && $view['qa_status']) {
|
||||
$sql = " select *
|
||||
from {$g5['qa_content_table']}
|
||||
where qa_type = '1'
|
||||
and qa_parent = '{$view['qa_id']}' ";
|
||||
$answer = sql_fetch($sql);
|
||||
|
||||
if($is_admin) {
|
||||
$answer_update_href = G5_BBS_URL.'/qawrite.php?w=u&qa_id='.$answer['qa_id'].$qstr;
|
||||
$answer_delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$answer['qa_id'].$qstr;
|
||||
}
|
||||
}
|
||||
|
||||
$stx = get_text(stripslashes($stx));
|
||||
|
||||
$is_dhtml_editor = false;
|
||||
// 모바일에서는 DHTML 에디터 사용불가
|
||||
if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && !G5_IS_MOBILE) {
|
||||
$is_dhtml_editor = true;
|
||||
}
|
||||
$editor_html = editor_html('qa_content', $content, $is_dhtml_editor);
|
||||
$editor_js = '';
|
||||
$editor_js .= get_editor_js('qa_content', $is_dhtml_editor);
|
||||
$editor_js .= chk_editor_js('qa_content', $is_dhtml_editor);
|
||||
|
||||
$ss_name = 'ss_qa_view_'.$qa_id;
|
||||
if(!get_session($ss_name))
|
||||
set_session($ss_name, TRUE);
|
||||
|
||||
// 첨부파일
|
||||
$view['img_file'] = array();
|
||||
$view['download_href'] = array();
|
||||
$view['download_source'] = array();
|
||||
$view['img_count'] = 0;
|
||||
$view['download_count'] = 0;
|
||||
|
||||
for ($i=1; $i<=2; $i++) {
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $view['qa_file'.$i])) {
|
||||
$view['img_file'][] = '<a href="'.G5_BBS_URL.'/view_image.php?fn='.urlencode('/data/qa/'.$view['qa_file'.$i]).'" target="_blank" class="view_image"><img src="'.G5_DATA_URL.'/qa/'.$view['qa_file'.$i].'"></a>';
|
||||
$view['img_count']++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($view['qa_file'.$i]) {
|
||||
$view['download_href'][] = G5_BBS_URL.'/qadownload.php?qa_id='.$view['qa_id'].'&no='.$i;
|
||||
$view['download_source'][] = $view['qa_source'.$i];
|
||||
$view['download_count']++;
|
||||
}
|
||||
}
|
||||
|
||||
include_once($skin_file);
|
||||
} else {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
141
bbs/qawrite.php
Normal file
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
if($w != '' && $w != 'u' && $w != 'r') {
|
||||
alert('올바른 방법으로 이용해 주십시오.');
|
||||
}
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
$g5['title'] = $qaconfig['qa_title'];
|
||||
include_once('./_head.php');
|
||||
|
||||
$qa_skin_path = (G5_IS_MOBILE ? G5_MOBILE_PATH : G5_PATH).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$qa_skin_url = (G5_IS_MOBILE ? G5_MOBILE_URL : G5_URL).'/'.G5_SKIN_DIR.'/qa/'.$qaconfig['qa_skin'];
|
||||
$skin_file = $qa_skin_path.'/write.skin.php';
|
||||
|
||||
if(is_file($skin_file)) {
|
||||
/*==========================
|
||||
$w == a : 답변
|
||||
$w == r : 추가질문
|
||||
$w == u : 수정
|
||||
==========================*/
|
||||
|
||||
if($w == 'u' || $w == 'r') {
|
||||
$sql = " select * from {$g5['qa_content_table']} where qa_id = '$qa_id' ";
|
||||
if(!$is_admin) {
|
||||
$sql .= " and mb_id = '{$member['mb_id']}' ";
|
||||
}
|
||||
|
||||
$write = sql_fetch($sql);
|
||||
|
||||
if($w == 'u') {
|
||||
if(!$write['qa_id'])
|
||||
alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.');
|
||||
|
||||
if(!$is_admin) {
|
||||
if($write['qa_type'] == 0 && $write['qa_status'] == 1)
|
||||
alert('답변이 등록된 문의글은 수정할 수 없습니다.');
|
||||
|
||||
if($write['mb_id'] != $member['mb_id'])
|
||||
alert('게시글을 수정할 권한이 없습니다.\\n\\n올바른 방법으로 이용해 주십시오.', G5_URL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 분류
|
||||
$category_option = '';
|
||||
if(trim($qaconfig['qa_category'])) {
|
||||
$category = explode('|', $qaconfig['qa_category']);
|
||||
for($i=0; $i<count($category); $i++) {
|
||||
$category_option .= option_selected($category[$i], $write['qa_category']);
|
||||
}
|
||||
} else {
|
||||
alert('1:1문의 설정에서 분류를 설정해 주십시오');
|
||||
}
|
||||
|
||||
$is_dhtml_editor = false;
|
||||
// 모바일에서는 DHTML 에디터 사용불가
|
||||
if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && !G5_IS_MOBILE) {
|
||||
$is_dhtml_editor = true;
|
||||
}
|
||||
|
||||
// 추가질문에서는 제목을 공백으로
|
||||
if($w == 'r')
|
||||
$write['qa_subject'] = '';
|
||||
|
||||
$content = '';
|
||||
if ($w == '') {
|
||||
$content = $qaconfig['qa_insert_content'];
|
||||
} else if($w == 'r') {
|
||||
if($is_dhtml_editor)
|
||||
$content = '<div><br><br><br>====== 이전 답변내용 =======<br></div>';
|
||||
else
|
||||
$content = "\n\n\n\n====== 이전 답변내용 =======\n";
|
||||
|
||||
$content .= get_text($write['qa_content'], 0);
|
||||
} else {
|
||||
$content = get_text($write['qa_content'], 0);
|
||||
}
|
||||
|
||||
$editor_html = editor_html('qa_content', $content, $is_dhtml_editor);
|
||||
$editor_js = '';
|
||||
$editor_js .= get_editor_js('qa_content', $is_dhtml_editor);
|
||||
$editor_js .= chk_editor_js('qa_content', $is_dhtml_editor);
|
||||
|
||||
$upload_max_filesize = number_format($qaconfig['qa_upload_size']) . ' 바이트';
|
||||
|
||||
$html_value = '';
|
||||
if ($write['qa_html']) {
|
||||
$html_checked = 'checked';
|
||||
$html_value = $write['qa_html'];
|
||||
|
||||
if($w == 'r' && $write['qa_html'] == 1 && !$is_dhtml_editor)
|
||||
$html_value = 2;
|
||||
}
|
||||
|
||||
$is_email = false;
|
||||
$req_email = '';
|
||||
if($qaconfig['qa_use_email']) {
|
||||
$is_email = true;
|
||||
|
||||
if($qaconfig['qa_req_email'])
|
||||
$req_email = 'required';
|
||||
|
||||
if($w == '' || $w == 'r')
|
||||
$write['qa_email'] = $member['mb_email'];
|
||||
|
||||
if($w == 'u' && $is_admin && $write['qa_type'])
|
||||
$is_email = false;
|
||||
}
|
||||
|
||||
$is_hp = false;
|
||||
$req_hp = '';
|
||||
if($qaconfig['qa_use_hp']) {
|
||||
$is_hp = true;
|
||||
|
||||
if($qaconfig['qa_req_hp'])
|
||||
$req_hp = 'required';
|
||||
|
||||
if($w == '' || $w == 'r')
|
||||
$write['qa_hp'] = $member['mb_hp'];
|
||||
|
||||
if($w == 'u' && $is_admin && $write['qa_type'])
|
||||
$is_hp = false;
|
||||
}
|
||||
|
||||
$list_href = G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr);
|
||||
|
||||
$action_url = https_url(G5_BBS_DIR).'/qawrite_update.php';
|
||||
|
||||
include_once($skin_file);
|
||||
} else {
|
||||
echo '<div>'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.</div>';
|
||||
}
|
||||
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
339
bbs/qawrite_update.php
Normal file
@ -0,0 +1,339 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
/*==========================
|
||||
$w == a : 답변
|
||||
$w == r : 추가질문
|
||||
$w == u : 수정
|
||||
==========================*/
|
||||
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php'));
|
||||
|
||||
$msg = array();
|
||||
|
||||
$qa_subject = '';
|
||||
if (isset($_POST['qa_subject'])) {
|
||||
$qa_subject = substr(trim($_POST['qa_subject']),0,255);
|
||||
}
|
||||
if ($qa_subject == '') {
|
||||
$msg[] = '<strong>제목</strong>을 입력하세요.';
|
||||
}
|
||||
|
||||
$qa_content = '';
|
||||
if (isset($_POST['qa_content'])) {
|
||||
$qa_content = substr(trim($_POST['qa_content']),0,65536);
|
||||
}
|
||||
if ($qa_content == '') {
|
||||
$msg[] = '<strong>내용</strong>을 입력하세요.';
|
||||
}
|
||||
|
||||
if (!empty($msg)) {
|
||||
$msg = implode('<br>', $msg);
|
||||
alert($msg);
|
||||
}
|
||||
|
||||
// 090710
|
||||
if (substr_count($qa_content, '&#') > 50) {
|
||||
alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.');
|
||||
exit;
|
||||
}
|
||||
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
|
||||
if (empty($_POST)) {
|
||||
alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n게시판관리자 또는 서버관리자에게 문의 바랍니다.");
|
||||
}
|
||||
|
||||
for ($i=1; $i<=5; $i++) {
|
||||
$var = "qa_$i";
|
||||
$$var = "";
|
||||
if (isset($_POST['qa_'.$i]) && $_POST['qa_'.$i]) {
|
||||
$$var = escape_trim($_POST['qa_'.$i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 1:1문의 설정값
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
if($w == 'u' || $w == 'a' || $w == 'r') {
|
||||
if($w == 'a' && !$is_admin)
|
||||
alert('답변은 관리자만 등록할 수 있습니다.');
|
||||
|
||||
$sql = " select * from {$g5['qa_content_table']} where qa_id = '$qa_id' ";
|
||||
if(!$is_admin) {
|
||||
$sql .= " and mb_id = '{$member['mb_id']}' ";
|
||||
}
|
||||
|
||||
$write = sql_fetch($sql);
|
||||
|
||||
if($w == 'u') {
|
||||
if(!$write['qa_id'])
|
||||
alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.');
|
||||
|
||||
if(!$is_admin) {
|
||||
if($write['qa_type'] == 0 && $write['qa_status'] == 1)
|
||||
alert('답변이 등록된 문의글은 수정할 수 없습니다.');
|
||||
|
||||
if($write['mb_id'] != $member['mb_id'])
|
||||
alert('게시글을 수정할 권한이 없습니다.\\n\\n올바른 방법으로 이용해 주십시오.', G5_URL);
|
||||
}
|
||||
}
|
||||
|
||||
if($w == 'a') {
|
||||
if(!$write['qa_id'])
|
||||
alert('문의글이 존재하지 않아 답변글을 등록할 수 없습니다.');
|
||||
|
||||
if($write['qa_type'] == 1)
|
||||
alert('답변글에는 다시 답변을 등록할 수 없습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
|
||||
|
||||
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
|
||||
|
||||
// 가변 파일 업로드
|
||||
$file_upload_msg = '';
|
||||
$upload = array();
|
||||
for ($i=1; $i<=count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['file'] = '';
|
||||
$upload[$i]['source'] = '';
|
||||
$upload[$i]['del_check'] = false;
|
||||
|
||||
// 삭제에 체크가 되어있다면 파일을 삭제합니다.
|
||||
if (isset($_POST['bf_file_del'][$i]) && $_POST['bf_file_del'][$i]) {
|
||||
$upload[$i]['del_check'] = true;
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]);
|
||||
// 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) {
|
||||
delete_qa_thumbnail($write['qa_file'.$i]);
|
||||
}
|
||||
}
|
||||
|
||||
$tmp_file = $_FILES['bf_file']['tmp_name'][$i];
|
||||
$filesize = $_FILES['bf_file']['size'][$i];
|
||||
$filename = $_FILES['bf_file']['name'][$i];
|
||||
$filename = preg_replace('/(<|>|=)/', '', $filename);
|
||||
|
||||
// 서버에 설정된 값보다 큰파일을 업로드 한다면
|
||||
if ($filename) {
|
||||
if ($_FILES['bf_file']['error'][$i] == 1) {
|
||||
$file_upload_msg .= '\"'.$filename.'\" 파일의 용량이 서버에 설정('.$upload_max_filesize.')된 값보다 크므로 업로드 할 수 없습니다.\\n';
|
||||
continue;
|
||||
}
|
||||
else if ($_FILES['bf_file']['error'][$i] != 0) {
|
||||
$file_upload_msg .= '\"'.$filename.'\" 파일이 정상적으로 업로드 되지 않았습니다.\\n';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_uploaded_file($tmp_file)) {
|
||||
// 관리자가 아니면서 설정한 업로드 사이즈보다 크다면 건너뜀
|
||||
if (!$is_admin && $filesize > $qaconfig['qa_upload_size']) {
|
||||
$file_upload_msg .= '\"'.$filename.'\" 파일의 용량('.number_format($filesize).' 바이트)이 게시판에 설정('.number_format($qaconfig['qa_upload_size']).' 바이트)된 값보다 크므로 업로드 하지 않습니다.\\n';
|
||||
continue;
|
||||
}
|
||||
|
||||
//=================================================================\
|
||||
// 090714
|
||||
// 이미지나 플래시 파일에 악성코드를 심어 업로드 하는 경우를 방지
|
||||
// 에러메세지는 출력하지 않는다.
|
||||
//-----------------------------------------------------------------
|
||||
$timg = @getimagesize($tmp_file);
|
||||
// image type
|
||||
if ( preg_match("/\.({$config['cf_image_extension']})$/i", $filename) ||
|
||||
preg_match("/\.({$config['cf_flash_extension']})$/i", $filename) ) {
|
||||
if ($timg['2'] < 1 || $timg['2'] > 16)
|
||||
continue;
|
||||
}
|
||||
//=================================================================
|
||||
|
||||
if ($w == 'u') {
|
||||
// 존재하는 파일이 있다면 삭제합니다.
|
||||
@unlink(G5_DATA_PATH.'/qa/'.$write['qa_file'.$i]);
|
||||
// 이미지파일이면 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $write['qa_file'.$i])) {
|
||||
delete_qa_thumbnail($row['qa_file'.$i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 프로그램 원래 파일명
|
||||
$upload[$i]['source'] = $filename;
|
||||
$upload[$i]['filesize'] = $filesize;
|
||||
|
||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
|
||||
shuffle($chars_array);
|
||||
$shuffle = implode('', $chars_array);
|
||||
|
||||
// 첨부파일 첨부시 첨부파일명에 공백이 포함되어 있으면 일부 PC에서 보이지 않거나 다운로드 되지 않는 현상이 있습니다. (길상여의 님 090925)
|
||||
$upload[$i]['file'] = abs(ip2long($_SERVER['REMOTE_ADDR'])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode(str_replace(' ', '_', $filename)));
|
||||
|
||||
$dest_file = G5_DATA_PATH.'/qa/'.$upload[$i]['file'];
|
||||
|
||||
// 업로드가 안된다면 에러메세지 출력하고 죽어버립니다.
|
||||
$error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]);
|
||||
|
||||
// 올라간 파일의 퍼미션을 변경합니다.
|
||||
chmod($dest_file, G5_FILE_PERMISSION);
|
||||
}
|
||||
}
|
||||
|
||||
if($w == '' || $w == 'a' || $w == 'r') {
|
||||
if($w == '' || $w == 'r') {
|
||||
$row = sql_fetch(" select MIN(qa_num) as min_qa_num from {$g5['qa_content_table']} ");
|
||||
$qa_num = $row['min_qa_num'] - 1;
|
||||
}
|
||||
|
||||
if($w == 'a') {
|
||||
$qa_num = $write['qa_num'];
|
||||
$qa_parent = $write['qa_id'];
|
||||
$qa_related = $write['qa_related'];
|
||||
$qa_category = $write['qa_category'];
|
||||
$qa_type = 1;
|
||||
$qa_status = 1;
|
||||
}
|
||||
|
||||
$sql = " insert into {$g5['qa_content_table']}
|
||||
set qa_num = '$qa_num',
|
||||
mb_id = '{$member['mb_id']}',
|
||||
qa_name = '{$member['mb_nick']}',
|
||||
qa_email = '$qa_email',
|
||||
qa_hp = '$qa_hp',
|
||||
qa_type = '$qa_type',
|
||||
qa_parent = '$qa_parent',
|
||||
qa_related = '$qa_related',
|
||||
qa_category = '$qa_category',
|
||||
qa_email_recv = '$qa_email_recv',
|
||||
qa_sms_recv = '$qa_sms_recv',
|
||||
qa_html = '$qa_html',
|
||||
qa_subject = '$qa_subject',
|
||||
qa_content = '$qa_content',
|
||||
qa_status = '$qa_status',
|
||||
qa_file1 = '{$upload[1]['file']}',
|
||||
qa_source1 = '{$upload[1]['source']}',
|
||||
qa_file2 = '{$upload[2]['file']}',
|
||||
qa_source2 = '{$upload[2]['source']}',
|
||||
qa_ip = '{$_SERVER['REMOTE_ADDR']}',
|
||||
qa_datetime = '".G5_TIME_YMDHIS."',
|
||||
qa_1 = '$qa_1',
|
||||
qa_2 = '$qa_2',
|
||||
qa_3 = '$qa_3',
|
||||
qa_4 = '$qa_4',
|
||||
qa_5 = '$qa_5' ";
|
||||
sql_query($sql);
|
||||
|
||||
if($w == '' || $w == 'r') {
|
||||
$qa_id = mysql_insert_id();
|
||||
|
||||
if($w == 'r' && $write['qa_related']) {
|
||||
$qa_related = $write['qa_related'];
|
||||
} else {
|
||||
$qa_related = $qa_id;
|
||||
}
|
||||
|
||||
$sql = " update {$g5['qa_content_table']}
|
||||
set qa_parent = '$qa_id',
|
||||
qa_related = '$qa_related'
|
||||
where qa_id = '$qa_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if($w == 'a') {
|
||||
$sql = " update {$g5['qa_content_table']}
|
||||
set qa_status = '1'
|
||||
where qa_id = '{$write['qa_parent']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
} else if($w == 'u') {
|
||||
if(!$upload[1]['file'] && !$upload[1]['del_check']) {
|
||||
$upload[1]['file'] = $write['qa_file1'];
|
||||
$upload[1]['source'] = $write['qa_source1'];
|
||||
}
|
||||
|
||||
if(!$upload[2]['file'] && !$upload[2]['del_check']) {
|
||||
$upload[2]['file'] = $write['qa_file2'];
|
||||
$upload[2]['source'] = $write['qa_source2'];
|
||||
}
|
||||
|
||||
$sql = " update {$g5['qa_content_table']}
|
||||
set qa_email = '$qa_email',
|
||||
qa_hp = '$qa_hp',
|
||||
qa_category = '$qa_category',
|
||||
qa_html = '$qa_html',
|
||||
qa_subject = '$qa_subject',
|
||||
qa_content = '$qa_content',
|
||||
qa_file1 = '{$upload[1]['file']}',
|
||||
qa_source1 = '{$upload[1]['source']}',
|
||||
qa_file2 = '{$upload[2]['file']}',
|
||||
qa_source2 = '{$upload[2]['source']}',
|
||||
qa_1 = '$qa_1',
|
||||
qa_2 = '$qa_2',
|
||||
qa_3 = '$qa_3',
|
||||
qa_4 = '$qa_4',
|
||||
qa_5 = '$qa_5' ";
|
||||
if($qa_sms_recv)
|
||||
$sql .= ", qa_sms_recv = '$qa_sms_recv' ";
|
||||
$sql .= " where qa_id = '$qa_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
// SMS 알림
|
||||
if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
|
||||
include_once(G5_LIB_PATH.'/icode.sms.lib.php');
|
||||
|
||||
// 답변글은 질문 등록자에게 전송
|
||||
if($w == 'a' && $write['qa_sms_recv'] && trim($write['qa_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 답변이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_send_number']);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $write['qa_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
}
|
||||
}
|
||||
|
||||
// 문의글 등록시 관리자에게 전송
|
||||
if(($w == '' || $w == 'r') && trim($qaconfig['qa_admin_hp'])) {
|
||||
$sms_content = $config['cf_title'].' '.$qaconfig['qa_title'].'에 문의글이 등록되었습니다.';
|
||||
$send_number = preg_replace('/[^0-9]/', '', $qa_hp);
|
||||
$recv_number = preg_replace('/[^0-9]/', '', $qaconfig['qa_admin_hp']);
|
||||
|
||||
if($recv_number) {
|
||||
$SMS = new SMS; // SMS 연결
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
$SMS->Add($recv_number, $send_number, $config['cf_icode_id'], iconv("utf-8", "euc-kr", stripslashes($sms_content)), "");
|
||||
$SMS->Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 답변 이메일전송
|
||||
if($w == 'a' && $write['qa_email_recv'] && trim($write['qa_email'])) {
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$subject = $config['cf_title'].' '.$qaconfig['qa_title'].' 답변 알림 메일';
|
||||
$content = conv_content($qa_content, $qa_html);
|
||||
|
||||
mailer($config['cf_title'], $admin['mb_email'], $write['qa_email'], $subject, $content, 1);
|
||||
}
|
||||
|
||||
if($w == 'a')
|
||||
$result_url = G5_BBS_URL.'/qaview.php?qa_id='.$qa_id.$qstr;
|
||||
else if($w == 'u' && $write['qa_type'])
|
||||
$result_url = G5_BBS_URL.'/qaview.php?qa_id='.$write['qa_parent'].$qstr;
|
||||
else
|
||||
$result_url = G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr);
|
||||
|
||||
if ($file_upload_msg)
|
||||
alert($file_upload_msg, $result_url);
|
||||
else
|
||||
goto_url($result_url);
|
||||
?>
|
||||
@ -10,6 +10,9 @@ $bo_table = $_GET['bo_table'];
|
||||
if(strpos($filename, 'data/editor')) {
|
||||
$editor_file = strstr($filename, 'editor');
|
||||
$filepath = G5_DATA_PATH.'/'.$editor_file;
|
||||
} else if(strpos($filename, 'data/qa')) {
|
||||
$editor_file = strstr($filename, 'qa');
|
||||
$filepath = G5_DATA_PATH.'/'.$editor_file;
|
||||
} else {
|
||||
$editor_file = '';
|
||||
$filepath = G5_DATA_PATH.'/file/'.$bo_table.'/'.$filename;
|
||||
|
||||
@ -246,7 +246,8 @@ tfoot th, tfoot td {padding:10px 0;border:1px solid #c1d1d5;background:#d7e0e2}
|
||||
tfoot th {}
|
||||
tfoot td {font-weight:bold;text-align:center}
|
||||
table .tr_bg0 {background:#fff}
|
||||
table .tr_bg1 {background:#f9f9f9}
|
||||
table .tr_bg1 {background:#f5fbe8}
|
||||
table .tr_bg1 td {border-color:#e4f1c6}
|
||||
|
||||
.tbl_wrap {margin:0 0 10px;padding:0 20px}
|
||||
.tbl_wrap td.empty_table {padding:100px 0;text-align:center}
|
||||
@ -383,7 +384,6 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
.txt_true {color:#e8180c}
|
||||
.txt_false {color:#ccc}
|
||||
|
||||
|
||||
.banner_or_img {margin:10px 0 0}
|
||||
.banner_or_img button {display:block;margin:5px 0 0}
|
||||
.txt_active {color:#5d910b}
|
||||
@ -624,15 +624,15 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
|
||||
/* 새창 기본 스타일 */
|
||||
.new_win {}
|
||||
.new_win h1 {margin-bottom:20px;padding:0 20px;min-width:320px/* 적정값으로 변경하여 사용하세요. */;height:60px;border-top:2px solid #484848;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em;line-height:5em}
|
||||
.new_win h1 {margin-bottom:20px;padding:0 20px;min-width:480px;height:60px;border-top:2px solid #484848;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em;line-height:5em}
|
||||
.new_win h2 {margin:0 20px 10px}
|
||||
.new_win_ul {margin:-20px 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #515151;background:#484848;list-style:none;zoom:1}
|
||||
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.new_win_ul li {float:left;margin-left:-1px}
|
||||
|
||||
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none}
|
||||
.new_win_desc {margin:0 auto;width:93%}
|
||||
.new_win .anchor {margin:0 auto 5px;width:93%}
|
||||
.new_win_desc {margin:0 20px}
|
||||
.new_win .anchor {margin:0 20px 5px}
|
||||
.new_win .tbl_wrap {margin:0 20px 20px;padding:0}
|
||||
|
||||
.new_win .local_sch, .new_win .local_cmd, .new_win .local_desc01, .new_win .local_desc02, .new_win .local_ov {min-width:480px}
|
||||
|
||||
@ -7,10 +7,12 @@ body {margin:0;padding:0;background:#f9fafe;color:#000;font-size:0.75em;font-fam
|
||||
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
|
||||
h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
||||
|
||||
#hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none}
|
||||
legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
|
||||
label, input, select, img {vertical-align:middle}
|
||||
input, button {margin:0;padding:0;font-family:dotum;font-size:1em}
|
||||
|
||||
textarea, select {font-family:dotum;font-size:1em}
|
||||
p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
|
||||
hr {display:none}
|
||||
|
||||
@ -10,7 +10,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
|
||||
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
|
||||
legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
|
||||
label, input, select, img {vertical-align:middle}
|
||||
input,button {margin:0;padding:0;font-size:1em}
|
||||
input, button {margin:0;padding:0;font-size:1em}
|
||||
input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em;-webkit-appearance:none}
|
||||
textarea, select {font-size:1em}
|
||||
textarea {border-radius:0;-webkit-appearance:none}
|
||||
@ -111,16 +111,18 @@ a.btn02:focus, .btn02:hover {text-decoration:none}
|
||||
.btn_confirm {text-align:center} /* 서식단계 진행 */
|
||||
|
||||
input.btn_submit {padding:0 10px;height:2.6em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;-webkit-appearance:none}
|
||||
fieldset .btn_submit {padding:0 10px;height:1.9em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;-webkit-appearance:none}
|
||||
button.btn_submit {height:1.9em}
|
||||
fieldset .btn_submit {height:1.9em}
|
||||
|
||||
a.btn_cancel {display:inline-block;padding:0 10px;height:2.4em;border:1px solid #ccc;background:#fafafa;color:#000;font-size:1em;text-decoration:none;line-height:2.5em;vertical-align:top}
|
||||
|
||||
a.btn_frmline, button.btn_frmline {display:inline-block;padding:0 5px;height:1.9em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;text-decoration:none;vertical-align:top;line-height:1.9em} /* 우편번호검색버튼 등 */
|
||||
button.btn_frmline {font-size:1em}
|
||||
|
||||
/* 게시판용 버튼 */
|
||||
a.btn_b01 {display:inline-block;margin:0 0 3px;padding:0 10px;border:1px solid #eee;background:#fafafa;color:#000;text-decoration:none;line-height:2em;vertical-align:middle}
|
||||
a.btn_b01:focus, .btn_b01:hover {text-decoration:none}
|
||||
a.btn_b02 {display:inline-block;margin:0 0 3px;padding:0 10px;border:1px solid #eee;background:#fafafa;color:#000;text-decoration:none;line-height:2em;vertical-align:middle}
|
||||
a.btn_b02 {display:inline-block;margin:0 0 3px;padding:0 10px;border:1px solid #333;background:#333;color:#fff;text-decoration:none;line-height:2em;vertical-align:middle}
|
||||
a.btn_b02:focus, .btn_b02:hover {text-decoration:none}
|
||||
a.btn_admin {display:inline-block;margin:0 0 3px;padding:0 10px;border:1px solid #e8180c;background:#e8180c;color:#fff;text-decoration:none;line-height:2em;vertical-align:middle} /* 관리자 전용 버튼 */
|
||||
a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
||||
@ -160,6 +162,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
||||
|
||||
/* 테이블 항목별 정의 */
|
||||
.td_board {width:120px;text-align:center}
|
||||
.td_category {width:80px;text-align:center}
|
||||
.td_chk {width:30px;text-align:center}
|
||||
.td_date {width:60px;text-align:center}
|
||||
.td_datetime {width:150px;text-align:center}
|
||||
@ -170,6 +173,12 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
||||
.td_nick {width:100px;text-align:center}
|
||||
.td_num {width:50px;text-align:center}
|
||||
.td_numbig {width:80px;text-align:center}
|
||||
.td_stat {width:60px;text-align:center}
|
||||
|
||||
.txt_active {color:#5d910b}
|
||||
.txt_done {color:#e8180c}
|
||||
.txt_expired {color:#ccc}
|
||||
.txt_rdy {color:#8abc2a}
|
||||
|
||||
/* 새창 기본 스타일 */
|
||||
.new_win {}
|
||||
|
||||
6
head.php
@ -110,6 +110,12 @@ if ($config['cf_include_head']) {
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li>
|
||||
<a href="<?php echo G5_BBS_URL ?>/qalist.php">
|
||||
<img src="<?php echo G5_IMG_URL ?>/tnb_cnt.jpg" alt="">
|
||||
1:1문의
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo G5_BBS_URL ?>/current_connect.php">
|
||||
<img src="<?php echo G5_IMG_URL ?>/tnb_cnt.jpg" alt="">
|
||||
|
||||
@ -289,6 +289,11 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
|
||||
`cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_cert_limit` int(11) NOT NULL DEFAULT '0',
|
||||
`cf_sms_use` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_pw` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_port` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_googl_shorturl_apikey` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_facebook_appid` varchar(255) NOT NULL,
|
||||
`cf_facebook_secret` varchar(255) NOT NULL,
|
||||
@ -698,3 +703,79 @@ CREATE TABLE IF NOT EXISTS `g5_autosave` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_qa_config`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `g5_qa_config` (
|
||||
`qa_title` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_send_number` varchar(255) NOT NULL DEFAULT '0',
|
||||
`qa_admin_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_image_width` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_upload_size` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_insert_content` text NOT NULL,
|
||||
`qa_1_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_qa_content`
|
||||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `g5_qa_content` (
|
||||
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`qa_num` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_parent` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_related` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`qa_name` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_type` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_content` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_status` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_file1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_file2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`qa_id`),
|
||||
KEY `qa_num_parent` (`qa_num`,`qa_parent`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@ -2039,6 +2039,20 @@ function delete_editor_thumbnail($contents)
|
||||
}
|
||||
}
|
||||
|
||||
// 1:1문의 첨부파일 썸네일 삭제
|
||||
function delete_qa_thumbnail($file)
|
||||
{
|
||||
if(!$file)
|
||||
return;
|
||||
|
||||
$fn = preg_replace("/\.[^\.]+$/i", "", basename($file));
|
||||
$files = glob(G5_DATA_PATH.'/qa/thumb-'.$fn.'*');
|
||||
if (is_array($files)) {
|
||||
foreach ($files as $filename)
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
// 스킨 style sheet 파일 얻기
|
||||
function get_skin_stylesheet($skin_path, $dir='')
|
||||
{
|
||||
@ -2357,4 +2371,15 @@ function certify_count_check($mb_id, $type)
|
||||
if((int)$row['cnt'] >= (int)$config['cf_cert_limit'])
|
||||
alert_close('오늘 '.$cert.' 본인확인을 '.$row['cnt'].'회 이용하셔서 더 이상 이용할 수 없습니다.');
|
||||
}
|
||||
|
||||
// 1:1문의 설정로드
|
||||
function get_qa_config($fld='*')
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$sql = " select $fld from {$g5['qa_config_table']} ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
return $row;
|
||||
}
|
||||
?>
|
||||
153
lib/icode.sms.lib.php
Normal file
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
// 아이코드에서 제공하는 함수
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 이 부분은 건드릴 필요가 없습니다.
|
||||
|
||||
function spacing($text,$size) {
|
||||
for ($i=0; $i<$size; $i++) $text.=" ";
|
||||
$text = substr($text,0,$size);
|
||||
return $text;
|
||||
}
|
||||
|
||||
function cut_char($word, $cut) {
|
||||
// $word=trim(stripslashes($word));
|
||||
$word=substr($word,0,$cut); // 필요한 길이만큼 취함.
|
||||
for ($k=$cut-1; $k>1; $k--) {
|
||||
if (ord(substr($word,$k,1))<128) break; // 한글값은 160 이상.
|
||||
}
|
||||
$word=substr($word,0,$cut-($cut-$k+1)%2);
|
||||
return $word;
|
||||
}
|
||||
|
||||
function CheckCommonType($dest, $rsvTime) {
|
||||
//$dest=eregi_replace("[^0-9]","",$dest);
|
||||
$dest=preg_replace("/[^0-9]/i","",$dest);
|
||||
if (strlen($dest)<10 || strlen($dest)>11) return "휴대폰 번호가 틀렸습니다";
|
||||
$CID=substr($dest,0,3);
|
||||
//if ( eregi("[^0-9]",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
if ( preg_match("/[^0-9]/i",$CID) || ($CID!='010' && $CID!='011' && $CID!='016' && $CID!='017' && $CID!='018' && $CID!='019') ) return "휴대폰 앞자리 번호가 잘못되었습니다";
|
||||
//$rsvTime=eregi_replace("[^0-9]","",$rsvTime);
|
||||
$rsvTime=preg_replace("/[^0-9]/i","",$rsvTime);
|
||||
if ($rsvTime) {
|
||||
if (!checkdate(substr($rsvTime,4,2),substr($rsvTime,6,2),substr($rsvTime,0,4))) return "예약날짜가 잘못되었습니다";
|
||||
if (substr($rsvTime,8,2)>23 || substr($rsvTime,10,2)>59) return "예약시간이 잘못되었습니다";
|
||||
}
|
||||
}
|
||||
|
||||
class SMS {
|
||||
var $ID;
|
||||
var $PWD;
|
||||
var $SMS_Server;
|
||||
var $port;
|
||||
var $SMS_Port;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
$this->ID=$sms_id; // 계약 후 지정
|
||||
$this->PWD=$sms_pw; // 계약 후 지정
|
||||
$this->SMS_Server=$sms_server;
|
||||
$this->SMS_Port=$port;
|
||||
$this->ID = spacing($this->ID,10);
|
||||
$this->PWD = spacing($this->PWD,10);
|
||||
}
|
||||
|
||||
function Init() {
|
||||
$this->Data = "";
|
||||
$this->Result = "";
|
||||
}
|
||||
|
||||
function Add($dest, $callBack, $Caller, $msg, $rsvTime="") {
|
||||
global $g5;
|
||||
|
||||
// 내용 검사 1
|
||||
$Error = CheckCommonType($dest, $rsvTime);
|
||||
if ($Error) return $Error;
|
||||
// 내용 검사 2
|
||||
//if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
|
||||
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다.
|
||||
if (strtolower($g5['charset'])=='utf-8') {
|
||||
if (function_exists("iconv")) {
|
||||
$msg = iconv("utf-8", "euc-kr", $msg);
|
||||
}
|
||||
}
|
||||
|
||||
$msg=cut_char($msg,80); // 80자 제한
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$callBack = spacing($callBack,11);
|
||||
$Caller = spacing($Caller,10);
|
||||
$rsvTime = spacing($rsvTime,12);
|
||||
$msg = spacing($msg,80);
|
||||
|
||||
$this->Data[] = '01144 '.$this->ID.$this->PWD.$dest.$callBack.$Caller.$rsvTime.$msg;
|
||||
return "";
|
||||
}
|
||||
|
||||
function AddURL($dest, $callBack, $URL, $msg, $rsvTime="") {
|
||||
// 내용 검사 1
|
||||
$Error = CheckCommonType($dest, $rsvTime);
|
||||
if ($Error) return $Error;
|
||||
// 내용 검사 2
|
||||
//$URL=str_replace("http://","",$URL);
|
||||
if (strlen($URL)>50) return "URL이 50자가 넘었습니다";
|
||||
switch (substr($dest,0,3)) {
|
||||
case '010': //20바이트
|
||||
$msg=cut_char($msg,20);
|
||||
break;
|
||||
case '011': //80바이트
|
||||
$msg=cut_char($msg,80);
|
||||
break;
|
||||
case '016': // 80바이트
|
||||
$msg=cut_char($msg,80);
|
||||
break;
|
||||
case '017': // URL 포함 80바이트
|
||||
$msg=cut_char($msg,80-strlen($URL));
|
||||
break;
|
||||
case '018': // 20바이트
|
||||
$msg=cut_char($msg,20);
|
||||
break;
|
||||
case '019': // 20바이트
|
||||
$msg=cut_char($msg,20);
|
||||
break;
|
||||
default:
|
||||
return "아직 URL CallBack이 지원되지 않는 번호입니다";
|
||||
break;
|
||||
}
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$URL = spacing($URL,50);
|
||||
$callBack = spacing($callBack,11);
|
||||
$rsvTime = spacing($rsvTime,12);
|
||||
$msg = spacing($msg,80);
|
||||
$this->Data[] = '05173 '.$this->ID.$this->PWD.$dest.$callBack.$URL.$rsvTime.$msg;
|
||||
return "";
|
||||
}
|
||||
|
||||
function Send () {
|
||||
$fp=@fsockopen(trim($this->SMS_Server),trim($this->SMS_Port));
|
||||
if (!$fp) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 122번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fp,$puts);
|
||||
while(!$gets) { $gets=fgets($fp,30); }
|
||||
if (substr($gets,0,19)=="0223 00".$dest) $this->Result[]=$dest.":".substr($gets,19,10);
|
||||
else $this->Result[$dest]=$dest.":Error";
|
||||
$gets="";
|
||||
}
|
||||
fclose($fp);
|
||||
$this->Data="";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -61,6 +61,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
</fieldset>
|
||||
|
||||
<ul id="mb_nb">
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php" id="snb_new">1:1문의</a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" id="snb_cnt">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
|
||||
<li><a href="<?php echo G5_BBS_URL ?>/new.php" id="snb_new">새글</a></li>
|
||||
<?php if ($is_member) { ?>
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
|
||||
#bo_v_table {padding:0 10px;color:#999;font-size:0.9em;font-weight:bold}
|
||||
|
||||
#bo_v_title {padding:0 7px 5px;font-size:1.2em}
|
||||
#bo_v_title {padding:0 10px 5px;font-size:1.2em}
|
||||
|
||||
#bo_v_info {padding:0 10px 10px;border-bottom:1px solid #ddd}
|
||||
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
@ -185,7 +185,7 @@
|
||||
.bo_v_com {float:right}
|
||||
.bo_v_com li {float:left;margin-left:5px}
|
||||
|
||||
#bo_v_atc {min-height:200px;padding:0 10px;min-height:200px}
|
||||
#bo_v_atc {padding:0 10px;min-height:200px}
|
||||
#bo_v_atc_title {margin:0;padding:0;height:0;overflow:hidden}
|
||||
|
||||
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
|
||||
#bo_v_table {padding:0 10px;color:#999;font-size:0.9em;font-weight:bold}
|
||||
|
||||
#bo_v_title {padding:0 5px 5px;font-size:1.2em}
|
||||
#bo_v_title {padding:0 10px 5px;font-size:1.2em}
|
||||
|
||||
#bo_v_info {padding:0 10px 10px;border-bottom:1px solid #ddd}
|
||||
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
@ -171,7 +171,7 @@
|
||||
.bo_v_com {float:right}
|
||||
.bo_v_com li {float:left;margin-left:5px}
|
||||
|
||||
#bo_v_atc {min-height:200px;padding:0 10px;min-height:200px}
|
||||
#bo_v_atc {padding:0 10px;min-height:200px}
|
||||
#bo_v_atc_title {margin:0;padding:0;height:0;overflow:hidden}
|
||||
|
||||
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
|
||||
|
||||
@ -105,8 +105,8 @@
|
||||
#mb_login h1 {margin:0 0 15px;padding:0 10px;font-size:1.3em}
|
||||
#mb_login h2 {margin:0}
|
||||
#mb_login fieldset {position:relative;padding:0 5px;font-size:1em}
|
||||
#mb_login .frm_input {display:block;margin-bottom:5px;padding:0;width:80%;height:1.8em;line-height:1.8em}
|
||||
#mb_login .btn_submit {position:absolute;top:0;right:5px;padding:0 !important;width:18%;height:4em !important;text-align:center}
|
||||
#mb_login .frm_input {display:block;margin-bottom:5px;padding:0;width:81%;height:1.8em;line-height:1.8em}
|
||||
#mb_login .btn_submit {position:absolute;top:0;right:5px;padding:0 !important;width:18%;height:4.3em !important;text-align:center}
|
||||
#mb_login section {margin:30px 0;padding:15px 10px;border:1px solid #cfded8;background:#f7f7f7}
|
||||
#mb_login section div {text-align:right}
|
||||
|
||||
|
||||
BIN
mobile/skin/qa/basic/img/btn_close.gif
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
mobile/skin/qa/basic/img/icon_answer.gif
Normal file
|
After Width: | Height: | Size: 77 B |
BIN
mobile/skin/qa/basic/img/icon_file.gif
Normal file
|
After Width: | Height: | Size: 107 B |
BIN
mobile/skin/qa/basic/img/icon_hot.gif
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
mobile/skin/qa/basic/img/icon_img.gif
Normal file
|
After Width: | Height: | Size: 145 B |
BIN
mobile/skin/qa/basic/img/icon_link.gif
Normal file
|
After Width: | Height: | Size: 104 B |
BIN
mobile/skin/qa/basic/img/icon_mobile.gif
Normal file
|
After Width: | Height: | Size: 62 B |
BIN
mobile/skin/qa/basic/img/icon_movie.gif
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
mobile/skin/qa/basic/img/icon_new.gif
Normal file
|
After Width: | Height: | Size: 71 B |
BIN
mobile/skin/qa/basic/img/icon_secret.gif
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
mobile/skin/qa/basic/img/icon_sound.gif
Normal file
|
After Width: | Height: | Size: 113 B |
166
mobile/skin/qa/basic/list.skin.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 6;
|
||||
|
||||
if ($is_checkbox) $colspan++;
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
|
||||
<div id="bo_list">
|
||||
<?php if ($category_option) { ?>
|
||||
<!-- 카테고리 시작 { -->
|
||||
<nav id="bo_cate">
|
||||
<h2><?php echo $qaconfig['qa_title'] ?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- } 카테고리 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<!-- 게시판 페이지 정보 및 버튼 시작 { -->
|
||||
<div class="bo_fx">
|
||||
<div id="bo_list_total">
|
||||
<span>Total <?php echo number_format($total_count) ?>건</span>
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($admin_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin">관리자</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">문의등록</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">번호</th>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col">분류</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">글쓴이</th>
|
||||
<th scope="col">상태</th>
|
||||
<th scope="col">등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $list[$i]['num']; ?></td>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<td class="td_chk">
|
||||
<label for="chk_qa_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject']; ?></label>
|
||||
<input type="checkbox" name="chk_qa_id[]" value="<?php echo $list[$i]['qa_id'] ?>" id="chk_qa_id_<?php echo $i ?>">
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td><?php echo $list[$i]['category']; ?></td>
|
||||
<td class="td_subject">
|
||||
<a href="<?php echo $list[$i]['view_href']; ?>">
|
||||
<?php echo $list[$i]['subject']; ?>
|
||||
</a>
|
||||
<?php echo $list[$i]['icon_file']; ?>
|
||||
</td>
|
||||
<td class="td_name"><?php echo $list[$i]['name']; ?></td>
|
||||
<td class="td_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></td>
|
||||
<td class="td_date"><?php echo $list[$i]['date']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($i == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bo_fx">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<ul class="btn_bo_adm">
|
||||
<li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">문의등록</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 페이지 -->
|
||||
<?php echo $list_pages; ?>
|
||||
|
||||
<!-- 게시판 검색 시작 { -->
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input required" size="15" maxlength="15">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
</fieldset>
|
||||
<!-- } 게시판 검색 끝 -->
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fqalist;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_qa_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
function fqalist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_qa_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 목록 끝 -->
|
||||
256
mobile/skin/qa/basic/style.css
Normal file
@ -0,0 +1,256 @@
|
||||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 시작 ### */
|
||||
|
||||
/* 게시판 버튼 */
|
||||
/* 목록 버튼 */
|
||||
#bo_list a.btn_b01 {}
|
||||
#bo_list a.btn_b01:focus, #bo_list .btn_b01:hover {}
|
||||
#bo_list a.btn_b02 {}
|
||||
#bo_list a.btn_b02:focus, #bo_list .btn_b02:hover {}
|
||||
#bo_list a.btn_admin {} /* 관리자 전용 버튼 */
|
||||
#bo_list a.btn_admin:focus, #bo_list a.btn_admin:hover {}
|
||||
|
||||
/* 읽기 버튼 */
|
||||
#bo_v a.btn_b01 {}
|
||||
#bo_v a.btn_b01:focus, #bo_v .btn_b01:hover {}
|
||||
#bo_v a.btn_b02 {}
|
||||
#bo_v a.btn_b02:focus, #bo_v .btn_b02:hover {}
|
||||
#bo_v a.btn_admin {} /* 관리자 전용 버튼 */
|
||||
#bo_v a.btn_admin:focus, #bo_v a.btn_admin:hover {}
|
||||
|
||||
/* 쓰기 버튼 */
|
||||
#bo_w .btn_confirm {} /* 서식단계 진행 */
|
||||
#bo_w .btn_submit {}
|
||||
#bo_w .btn_cancel {}
|
||||
#bo_w .btn_frmline {} /* 우편번호검색버튼 등 */
|
||||
|
||||
/* 기본테이블 */
|
||||
/* 목록 테이블 */
|
||||
#bo_list .tbl_head01 {}
|
||||
#bo_list .tbl_head01 caption {}
|
||||
#bo_list .tbl_head01 thead th {}
|
||||
#bo_list .tbl_head01 thead a {}
|
||||
#bo_list .tbl_head01 thead th input {} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
#bo_list .tbl_head01 tfoot th {}
|
||||
#bo_list .tbl_head01 tfoot td {}
|
||||
#bo_list .tbl_head01 tbody th {}
|
||||
#bo_list .tbl_head01 td {}
|
||||
#bo_list .tbl_head01 a {}
|
||||
#bo_list td.empty_table {}
|
||||
|
||||
/* 읽기 내 테이블 */
|
||||
#bo_v .tbl_head01 {}
|
||||
#bo_v .tbl_head01 caption {}
|
||||
#bo_v .tbl_head01 thead th {}
|
||||
#bo_v .tbl_head01 thead a {}
|
||||
#bo_v .tbl_head01 thead th input {} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
#bo_v .tbl_head01 tfoot th {}
|
||||
#bo_v .tbl_head01 tfoot td {}
|
||||
#bo_v .tbl_head01 tbody th {}
|
||||
#bo_v .tbl_head01 td {}
|
||||
#bo_v .tbl_head01 a {}
|
||||
#bo_v td.empty_table {}
|
||||
|
||||
/* 쓰기 테이블 */
|
||||
#bo_w table {}
|
||||
#bo_w caption {}
|
||||
#bo_w .frm_address {}
|
||||
#bo_w .frm_file {}
|
||||
#bo_w .frm_info {}
|
||||
|
||||
#bo_w .tbl_frm01 {}
|
||||
#bo_w .tbl_frm01 caption {}
|
||||
#bo_w .tbl_frm01 th {}
|
||||
#bo_w .tbl_frm01 td {}
|
||||
#bo_w .tbl_frm01 textarea, #bo_w .frm_input {}
|
||||
#bo_w .tbl_frm01 textarea {}
|
||||
/*
|
||||
#bo_w .tbl_frm01 #captcha {}
|
||||
#bo_w .tbl_frm01 #captcha input {}
|
||||
*/
|
||||
#bo_w .tbl_frm01 a {}
|
||||
|
||||
#bo_w .required, #bo_w textarea.required {}
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 끝 ### */
|
||||
|
||||
/* 게시판 목록 */
|
||||
#bo_list .td_chk {width:30px;text-align:center}
|
||||
#bo_list .td_group {width:100px;text-align:center}
|
||||
#bo_list .td_board {width:120px;text-align:center}
|
||||
#bo_list .td_num {width:50px;text-align:center}
|
||||
#bo_list .td_numbig {width:80px;text-align:center}
|
||||
#bo_list .td_mb_id {width:100px;text-align:center}
|
||||
#bo_list .td_nick {width:100px;text-align:center}
|
||||
#bo_list .td_name {width:100px;text-align:left}
|
||||
#bo_list .td_date {width:60px;text-align:center}
|
||||
#bo_list .td_datetime {width:150px;text-align:center}
|
||||
#bo_list .td_mng {width:80px;text-align:center}
|
||||
|
||||
#bo_cate h2 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_cate ul {margin:5px 10px;padding-left:1px;zoom:1}
|
||||
#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_cate li {float:left;margin-bottom:-1px;width:25%}
|
||||
#bo_cate a {display:block;position:relative;margin-left:-1px;padding:5px 0;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;text-decoration:none;letter-spacing:-0.1em}
|
||||
#bo_cate a:focus,
|
||||
#bo_cate a:hover,
|
||||
#bo_cate a:active {text-decoration:none}
|
||||
#bo_cate #bo_cate_on {z-index:2;border:1px solid #565e60;background:#fff;color:#565e60;font-weight:bold}
|
||||
|
||||
/* 관리자일 때 */
|
||||
#bo_list_admin th label {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#bo_list_admin th:nth-of-type(1) {width:40px}
|
||||
#bo_list_admin th:nth-of-type(3) {width:100px}
|
||||
|
||||
#bo_list_admin td:nth-of-type(1) {text-align:center}
|
||||
#bo_list_admin td:nth-of-type(3) {text-align:center}
|
||||
|
||||
/* 관리자가 아닐 때 */
|
||||
#bo_list th:nth-of-type(2) {width:100px}
|
||||
|
||||
#bo_list td:nth-of-type(2) {text-align:center}
|
||||
|
||||
/* 게시판 목록 공통 */
|
||||
.bo_fx {margin-bottom:5px;padding:5px 10px}
|
||||
.bo_fx:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_fx ul {margin:0;padding:0;list-style:none}
|
||||
#bo_list_total {float:left;padding:0;height:2.5em;line-height:2.5em}
|
||||
.btn_bo_user {float:right;margin:0;padding:0;list-style:none}
|
||||
.btn_bo_user li {float:left;margin-left:5px}
|
||||
.btn_bo_adm {float:left}
|
||||
.btn_bo_adm li {float:left;margin-right:5px}
|
||||
.btn_bo_adm input {padding:0 10px;height:2em;border:1px solid #e8180c !important;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-appearance:none}
|
||||
.bo_notice td {background:#f7f7f7}
|
||||
.bo_notice td a {font-weight:bold}
|
||||
.td_num strong {color:#000}
|
||||
.bo_cate_link {display:inline-block;margin:0 3px 0 0;padding:0 6px 0 0;border-right:1px solid #e7f1ed;color:#999 !important;font-weight:bold;text-decoration:none} /* 글제목줄 분류스타일 */
|
||||
.bo_current {color:#e8180c}
|
||||
.td_subject img {margin-left:3px}
|
||||
#bo_list .cnt_cmt {display:inline-block;margin:0 0 0 3px;font-weight:bold}
|
||||
|
||||
#bo_sch {margin-bottom:10px;padding-top:5px;text-align:center}
|
||||
|
||||
/* 게시판 쓰기 */
|
||||
#bo_w #wr_email, #bo_w #wr_homepage, #bo_w #wr_subject {width:100%}
|
||||
|
||||
#char_count_desc {display:block;margin:0 0 5px;padding:0}
|
||||
#char_count_wrp {margin:5px 0 0;text-align:right}
|
||||
#char_count {font-weight:bold}
|
||||
|
||||
#qa_email {width:50%}
|
||||
#qa_subject {width:100%}
|
||||
|
||||
/* 게시판 읽기 */
|
||||
#bo_v {margin-bottom:15px;padding-bottom:15px}
|
||||
|
||||
#bo_v_table {margin:0 0 5px;padding:0 10px;color:#999;font-size:0.9em;font-weight:bold}
|
||||
|
||||
#bo_v_title {padding:0 10px 10px;font-size:1.2em}
|
||||
|
||||
#bo_v_info {padding:0 10px 10px;border-bottom:1px solid #ddd}
|
||||
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_info {}
|
||||
#bo_v_info strong {display:inline-block;margin:0 0 0 5px;font-weight:normal}
|
||||
|
||||
#bo_v_file {}
|
||||
#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_file ul {margin:0;padding:0;list-style:none}
|
||||
#bo_v_file li {padding:0 10px;border-bottom:1px solid #eee;background:#f7f7f7}
|
||||
#bo_v_file a {display:inline-block;padding:5px 0;color:#000;text-decoration:none}
|
||||
#bo_v_file a:focus, #bo_v_file a:hover, #bo_v_file a:active {text-decoration:none}
|
||||
.bo_v_file_cnt {display:inline-block;margin:0 10px}
|
||||
|
||||
#bo_v_link {}
|
||||
#bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_link ul {margin:0;padding:0;list-style:none}
|
||||
#bo_v_link li {padding:0 10px;border-bottom:1px solid #eee;background:#f7f7f7}
|
||||
#bo_v_link a {display:inline-block;padding:5px 0;color:#000;text-decoration:none}
|
||||
#bo_v_link a:focus, #bo_v_link a:hover, #bo_v_link a:active {text-decoration:none}
|
||||
.bo_v_link_cnt {display:inline-block;margin:0 10px}
|
||||
|
||||
#bo_v_top {margin:0 0 10px;padding:10px}
|
||||
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_top ul {margin:0;padding:0;list-style:none}
|
||||
|
||||
#bo_v_bot {padding:0 10px}
|
||||
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_bot h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_bot ul {margin:0;padding:0;list-style:none}
|
||||
|
||||
.bo_v_nb {float:left}
|
||||
.bo_v_nb li {float:left;margin-right:5px}
|
||||
.bo_v_com {float:right}
|
||||
.bo_v_com li {float:left;margin-left:5px}
|
||||
|
||||
#bo_v_atc {padding:0 10px;min-height:100px}
|
||||
#bo_v_atc_title {margin:0;padding:0;height:0;overflow:hidden}
|
||||
|
||||
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
|
||||
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_img img {margin-bottom:15px;max-width:100%;height:auto}
|
||||
|
||||
#bo_v_con {margin-bottom:20px;width:100%;line-height:1.7em;word-break:break-all;overflow:hidden}
|
||||
#bo_v_con a {color:#000;text-decoration:underline}
|
||||
#bo_v_con img {max-width:100%;height:auto}
|
||||
|
||||
#bo_v_act {margin-bottom:20px;text-align:center}
|
||||
#bo_v_act a {margin-right:5px;vertical-align:top}
|
||||
#bo_v_act span {display:inline-block;margin-right:5px;padding:0 10px;border:1px solid #eee !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:2em;vertical-align:top}
|
||||
#bo_v_act strong {color:#ff3061}
|
||||
#bo_v_act_good, #bo_v_act_nogood {display:inline-block;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#bo_v_sns {margin:0 0 20px;padding:0;list-style:none;zoom:1}
|
||||
#bo_v_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_sns li {float:left;margin:0 5px 0 0}
|
||||
|
||||
#bo_v_addq {margin:0 0 30px;text-align:right}
|
||||
|
||||
#bo_v_ans {margin:0 10px 30px;padding:30px 0 0;border-top:1px solid #e9e9e9}
|
||||
#bo_v_ans h2 {display:inline-block;vertical-align:middle;font-size:1.2em}
|
||||
#bo_v_ans #ans_datetime {margin:10px 0;color:#999}
|
||||
#bo_v_ans #ans_con {margin:0 0 10px;line-height:1.8em}
|
||||
#bo_v_ans #ans_add {text-align:right}
|
||||
#bo_v_ans #ans_msg {padding:40px 0;background:#f2f5f9;text-align:center}
|
||||
|
||||
#bo_v_rel {margin:0 0 30px;padding:30px 0 0;border-top:1px solid #e9e9e9}
|
||||
#bo_v_rel h2 {margin:0 10px 10px;font-size:1.2em}
|
||||
|
||||
#bo_v form {padding-top:15px}
|
||||
|
||||
/* 게시판 댓글 */
|
||||
#bo_vc {margin:0 0 5px;padding:15px 15px 5px;border-top:1px solid #cfded8;border-bottom:1px solid #cfded8;background:#f7f7f7}
|
||||
#bo_vc h2 {margin-bottom:5px}
|
||||
#bo_vc article {padding:0 0 5px;border-top:1px dotted #ccc}
|
||||
#bo_vc header {position:relative;padding:13px 0 5px}
|
||||
#bo_vc header .icon_reply {position:absolute;top:13px;left:-20px}
|
||||
#bo_vc .sv_member, #bo_vc .sv_guest {font-weight:bold}
|
||||
.bo_vc_hdinfo {display:inline-block;margin:0 10px 0 5px}
|
||||
#bo_vc h1 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_vc a {color:#000;text-decoration:none}
|
||||
#bo_vc p {padding:0 0 5px;line-height:1.8em}
|
||||
#bo_vc p a {text-decoration:underline}
|
||||
#bo_vc_empty {margin:0;padding:15px !important;border-bottom:1px dotted #ccc;text-align:center}
|
||||
#bo_vc fieldset {margin:0 0 10px;padding:0}
|
||||
#bo_vc #bo_vc_winfo {float:left}
|
||||
#bo_vc footer {zoom:1}
|
||||
#bo_vc footer:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
.bo_vc_act {float:right;margin:0;list-style:none}
|
||||
.bo_vc_act:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_vc_act li {float:left;margin-left:5px}
|
||||
|
||||
#bo_vc_w {position:relative;margin-bottom:10px;padding:0 15px 15px;border-bottom:1px solid #cfded8}
|
||||
#bo_vc_w h2 {padding:10px 0 5px}
|
||||
#bo_vc_w #char_cnt {display:block;margin-bottom:5px}
|
||||
#bo_vc_w textarea {width:99%}
|
||||
|
||||
#bo_vc_sns {margin:0;padding:0;list-style:none;zoom:1}
|
||||
#bo_vc_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_vc_sns li {float:left;margin:0 10px 0 0}
|
||||
#bo_vc_sns input {margin:0 0 0 5px}
|
||||
|
||||
#bo_vc form {padding:0}
|
||||
24
mobile/skin/qa/basic/view.answer.skin.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<section id="bo_v_ans">
|
||||
<h2>답변: <?php echo get_text($answer['qa_subject']); ?></h2>
|
||||
<a href="<?php echo $rewrite_href; ?>" class="btn_b01">추가질문</a>
|
||||
|
||||
<div id="ans_datetime">
|
||||
<?php echo $answer['qa_datetime']; ?>
|
||||
</div>
|
||||
<div id="ans_con">
|
||||
<?php echo conv_content($answer['qa_content'], $answer['qa_html']); ?>
|
||||
</div>
|
||||
|
||||
<div id="ans_add">
|
||||
<?php if($answer_update_href) { ?>
|
||||
<a href="<?php echo $answer_update_href; ?>" class="btn_b01">답변수정</a>
|
||||
<?php } ?>
|
||||
<?php if($answer_delete_href) { ?>
|
||||
<a href="<?php echo $answer_delete_href; ?>" class="btn_b01" onclick="del(this.href); return false;">답변삭제</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
125
mobile/skin/qa/basic/view.answerform.skin.php
Normal file
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<section id="bo_v_ans">
|
||||
<?php
|
||||
if($is_admin) // 관리자이면 답변등록
|
||||
{
|
||||
?>
|
||||
<h2>답변등록</h2>
|
||||
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" autocomplete="off">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
|
||||
<input type="hidden" name="w" value="a">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
$option = '';
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?php echo $option; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th><label for="qa_subject">제목</label></th>
|
||||
<td><input type="text" name="qa_subject" value="" id="qa_subject" required class="frm_input required" size="50" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content">
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="답변쓰기" id="btn_submit" accesskey="s" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "2";
|
||||
else
|
||||
obj.value = "1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.qa_subject.value,
|
||||
"content": f.qa_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.qa_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_qa_content) != "undefined")
|
||||
ed_qa_content.returnFalse();
|
||||
else
|
||||
f.qa_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p id="ans_msg">고객님의 문의에 대한 답변을 준비 중입니다.</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
169
mobile/skin/qa/basic/view.skin.php
Normal file
@ -0,0 +1,169 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
|
||||
|
||||
<!-- 게시물 읽기 시작 { -->
|
||||
<div id="bo_v_table"><?php echo $qaconfig['qa_title']; ?></div>
|
||||
|
||||
<article id="bo_v">
|
||||
<header>
|
||||
<h1 id="bo_v_title">
|
||||
<?php
|
||||
echo $view['category'].' | '; // 분류 출력 끝
|
||||
echo $view['subject']; // 글제목 출력
|
||||
?>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<section id="bo_v_info">
|
||||
<h2>페이지 정보</h2>
|
||||
작성자 <strong><?php echo $view['name'] ?></strong>
|
||||
<span class="sound_only">작성일</span><strong><?php echo $view['datetime']; ?></strong>
|
||||
</section>
|
||||
|
||||
<?php if($view['download_count']) { ?>
|
||||
<!-- 첨부파일 시작 { -->
|
||||
<section id="bo_v_file">
|
||||
<h2>첨부파일</h2>
|
||||
<ul>
|
||||
<?php
|
||||
// 가변 파일
|
||||
for ($i=0; $i<$view['download_count']; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<img src="<?php echo $qa_skin_url ?>/img/icon_file.gif" alt="첨부">
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- } 첨부파일 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<!-- 게시물 상단 버튼 시작 { -->
|
||||
<div id="bo_v_top">
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
<?php if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<?php if ($prev_href) { ?><li><a href="<?php echo $prev_href ?>" class="btn_b01">이전글</a></li><?php } ?>
|
||||
<?php if ($next_href) { ?><li><a href="<?php echo $next_href ?>" class="btn_b01">다음글</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="bo_v_com">
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>" class="btn_b01">수정</a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" class="btn_b01" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
|
||||
<li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</div>
|
||||
<!-- } 게시물 상단 버튼 끝 -->
|
||||
|
||||
<section id="bo_v_atc">
|
||||
<h2 id="bo_v_atc_title">본문</h2>
|
||||
|
||||
<?php
|
||||
// 파일 출력
|
||||
if($view['img_count']) {
|
||||
echo "<div id=\"bo_v_img\">\n";
|
||||
|
||||
for ($i=0; $i<$view['img_count']; $i++) {
|
||||
//echo $view['img_file'][$i];
|
||||
echo get_view_thumbnail($view['img_file'][$i], $qaconfig['qa_image_width']);
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 본문 내용 시작 { -->
|
||||
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content'], $qaconfig['qa_image_width']); ?></div>
|
||||
<!-- } 본문 내용 끝 -->
|
||||
|
||||
<?php if($view['qa_type']) { ?>
|
||||
<div><a href="<?php echo $rewrite_href; ?>" class="btn_b01">추가질문</a></div>
|
||||
<?php } ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
// 질문글에서 답변이 있으면 답변 출력, 답변이 없고 관리자이면 답변등록폼 출력
|
||||
if(!$view['qa_type']) {
|
||||
if($view['qa_status'] && $answer['qa_id'])
|
||||
include_once($qa_skin_path.'/view.answer.skin.php');
|
||||
else
|
||||
include_once($qa_skin_path.'/view.answerform.skin.php');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if($view['rel_count']) { ?>
|
||||
<section id="bo_v_rel">
|
||||
<h2>연관질문</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">분류</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">상태</th>
|
||||
<th scope="col">등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $i<$view['rel_count']; $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_category"><?php echo get_text($rel_list[$i]['category']); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo $rel_list[$i]['view_href']; ?>">
|
||||
<?php echo $rel_list[$i]['subject']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="td_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></td>
|
||||
<td class="td_date"><?php echo $rel_list[$i]['date']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 링크 버튼 시작 { -->
|
||||
<div id="bo_v_bot">
|
||||
<?php echo $link_buttons ?>
|
||||
</div>
|
||||
<!-- } 링크 버튼 끝 -->
|
||||
|
||||
</article>
|
||||
<!-- } 게시판 읽기 끝 -->
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.view_image").click(function() {
|
||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||
return false;
|
||||
});
|
||||
|
||||
// 이미지 리사이즈
|
||||
$("#bo_v_atc").viewimageresize();
|
||||
});
|
||||
</script>
|
||||
175
mobile/skin/qa/basic/write.skin.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
|
||||
<section id="bo_w">
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $qa_id ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
$option = '';
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php if ($category_option) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="qa_category" id="qa_category" required class="required" >
|
||||
<option value="">선택하세요</option>
|
||||
<?php echo $category_option ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?php echo $option; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_email) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" id="qa_email_recv" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_hp) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_email.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content">
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">파일 #1</th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[1]" title="파일첨부 1 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file frm_input">
|
||||
<?php if($w == 'u' && $write['qa_file1']) { ?>
|
||||
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="1"> <label for="bf_file_del1"><?php echo $write['qa_source1']; ?> 파일 삭제</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">파일 #2</th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[2]" title="파일첨부 2 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file frm_input">
|
||||
<?php if($w == 'u' && $write['qa_file2']) { ?>
|
||||
<input type="checkbox" id="bf_file_del2" name="bf_file_del[2]" value="1"> <label for="bf_file_del2"><?php echo $write['qa_source2']; ?> 파일 삭제</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="글쓰기" id="btn_submit" accesskey="s" class="btn_submit">
|
||||
<a href="<?php echo $list_href; ?>" class="btn_cancel">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "2";
|
||||
else
|
||||
obj.value = "1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.qa_subject.value,
|
||||
"content": f.qa_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.qa_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_qa_content) != "undefined")
|
||||
ed_qa_content.returnFalse();
|
||||
else
|
||||
f.qa_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 끝 -->
|
||||
BIN
skin/qa/basic/img/btn_close.gif
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
skin/qa/basic/img/icon_answer.gif
Normal file
|
After Width: | Height: | Size: 77 B |
BIN
skin/qa/basic/img/icon_file.gif
Normal file
|
After Width: | Height: | Size: 107 B |
BIN
skin/qa/basic/img/icon_hot.gif
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
skin/qa/basic/img/icon_img.gif
Normal file
|
After Width: | Height: | Size: 145 B |
BIN
skin/qa/basic/img/icon_link.gif
Normal file
|
After Width: | Height: | Size: 104 B |
BIN
skin/qa/basic/img/icon_mobile.gif
Normal file
|
After Width: | Height: | Size: 62 B |
BIN
skin/qa/basic/img/icon_movie.gif
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
skin/qa/basic/img/icon_new.gif
Normal file
|
After Width: | Height: | Size: 71 B |
BIN
skin/qa/basic/img/icon_secret.gif
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
skin/qa/basic/img/icon_sound.gif
Normal file
|
After Width: | Height: | Size: 113 B |
166
skin/qa/basic/list.skin.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
|
||||
$colspan = 6;
|
||||
|
||||
if ($is_checkbox) $colspan++;
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
|
||||
<div id="bo_list">
|
||||
<?php if ($category_option) { ?>
|
||||
<!-- 카테고리 시작 { -->
|
||||
<nav id="bo_cate">
|
||||
<h2><?php echo $qaconfig['qa_title'] ?> 카테고리</h2>
|
||||
<ul id="bo_cate_ul">
|
||||
<?php echo $category_option ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- } 카테고리 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<!-- 게시판 페이지 정보 및 버튼 시작 { -->
|
||||
<div class="bo_fx">
|
||||
<div id="bo_list_total">
|
||||
<span>Total <?php echo number_format($total_count) ?>건</span>
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($admin_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin">관리자</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">문의등록</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
<form name="fqalist" id="fqalist" action="./qadelete.php" onsubmit="return fqalist_submit(this);" method="post">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">번호</th>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<th scope="col">
|
||||
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
|
||||
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th scope="col">분류</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">글쓴이</th>
|
||||
<th scope="col">상태</th>
|
||||
<th scope="col">등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $i<count($list); $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_num"><?php echo $list[$i]['num']; ?></td>
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<td class="td_chk">
|
||||
<label for="chk_qa_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject']; ?></label>
|
||||
<input type="checkbox" name="chk_qa_id[]" value="<?php echo $list[$i]['qa_id'] ?>" id="chk_qa_id_<?php echo $i ?>">
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td class="td_category"><?php echo $list[$i]['category']; ?></td>
|
||||
<td class="td_subject">
|
||||
<a href="<?php echo $list[$i]['view_href']; ?>">
|
||||
<?php echo $list[$i]['subject']; ?>
|
||||
</a>
|
||||
<?php echo $list[$i]['icon_file']; ?>
|
||||
</td>
|
||||
<td class="td_name"><?php echo $list[$i]['name']; ?></td>
|
||||
<td class="td_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></td>
|
||||
<td class="td_date"><?php echo $list[$i]['date']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($i == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bo_fx">
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<ul class="btn_bo_adm">
|
||||
<li><input type="submit" name="btn_submit" value="선택삭제" onclick="document.pressed=this.value"></li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($list_href) { ?><li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li><?php } ?>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">문의등록</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if($is_checkbox) { ?>
|
||||
<noscript>
|
||||
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
|
||||
</noscript>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 페이지 -->
|
||||
<?php echo $list_pages; ?>
|
||||
|
||||
<!-- 게시판 검색 시작 { -->
|
||||
<fieldset id="bo_sch">
|
||||
<legend>게시물 검색</legend>
|
||||
|
||||
<form name="fsearch" method="get">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input required" size="15" maxlength="15">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
</fieldset>
|
||||
<!-- } 게시판 검색 끝 -->
|
||||
|
||||
<?php if ($is_checkbox) { ?>
|
||||
<script>
|
||||
function all_checked(sw) {
|
||||
var f = document.fqalist;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_qa_id[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
function fqalist_submit(f) {
|
||||
var chk_count = 0;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_qa_id[]" && f.elements[i].checked)
|
||||
chk_count++;
|
||||
}
|
||||
|
||||
if (!chk_count) {
|
||||
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(document.pressed == "선택삭제") {
|
||||
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 게시판 목록 끝 -->
|
||||
273
skin/qa/basic/style.css
Normal file
@ -0,0 +1,273 @@
|
||||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 시작 ### */
|
||||
|
||||
/* 게시판 버튼 */
|
||||
/* 목록 버튼 */
|
||||
#bo_list a.btn_b01 {}
|
||||
#bo_list a.btn_b01:focus, #bo_list a.btn_b01:hover {}
|
||||
#bo_list a.btn_b02 {}
|
||||
#bo_list a.btn_b02:focus, #bo_list a.btn_b02:hover {}
|
||||
#bo_list a.btn_admin {} /* 관리자 전용 버튼 */
|
||||
#bo_list a.btn_admin:focus, #bo_list .btn_admin:hover {}
|
||||
|
||||
/* 읽기 버튼 */
|
||||
#bo_v a.btn_b01 {}
|
||||
#bo_v a.btn_b01:focus, #bo_v a.btn_b01:hover {}
|
||||
#bo_v a.btn_b02 {}
|
||||
#bo_v a.btn_b02:focus, #bo_v a.btn_b02:hover {}
|
||||
#bo_v a.btn_admin {} /* 관리자 전용 버튼 */
|
||||
#bo_v a.btn_admin:focus, #bo_v a.btn_admin:hover {}
|
||||
|
||||
/* 쓰기 버튼 */
|
||||
#bo_w .btn_confirm {} /* 서식단계 진행 */
|
||||
#bo_w .btn_submit {}
|
||||
#bo_w button.btn_submit {}
|
||||
#bo_w fieldset .btn_submit {}
|
||||
#bo_w .btn_cancel {}
|
||||
#bo_w button.btn_cancel {}
|
||||
#bo_w .btn_cancel:focus, #bo_w .btn_cancel:hover {}
|
||||
#bo_w a.btn_frmline, #bo_w button.btn_frmline {} /* 우편번호검색버튼 등 */
|
||||
#bo_w button.btn_frmline {}
|
||||
|
||||
/* 기본 테이블 */
|
||||
/* 목록 테이블 */
|
||||
#bo_list .tbl_head01 {}
|
||||
#bo_list .tbl_head01 caption {}
|
||||
#bo_list .tbl_head01 thead th {}
|
||||
#bo_list .tbl_head01 thead a {}
|
||||
#bo_list .tbl_head01 thead th input {} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
#bo_list .tbl_head01 tfoot th {}
|
||||
#bo_list .tbl_head01 tfoot td {}
|
||||
#bo_list .tbl_head01 tbody th {}
|
||||
#bo_list .tbl_head01 td {}
|
||||
#bo_list .tbl_head01 a {}
|
||||
#bo_list td.empty_table {}
|
||||
|
||||
/* 읽기 내 테이블 */
|
||||
#bo_v .tbl_head01 {}
|
||||
#bo_v .tbl_head01 caption {}
|
||||
#bo_v .tbl_head01 thead th {}
|
||||
#bo_v .tbl_head01 thead a {}
|
||||
#bo_v .tbl_head01 thead th input {} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
#bo_v .tbl_head01 tfoot th {}
|
||||
#bo_v .tbl_head01 tfoot td {}
|
||||
#bo_v .tbl_head01 tbody th {}
|
||||
#bo_v .tbl_head01 td {}
|
||||
#bo_v .tbl_head01 a {}
|
||||
#bo_v td.empty_table {}
|
||||
|
||||
/* 쓰기 테이블 */
|
||||
#bo_w table {}
|
||||
#bo_w caption {}
|
||||
#bo_w .frm_info {}
|
||||
#bo_w .frm_address {}
|
||||
#bo_w .frm_file {}
|
||||
|
||||
#bo_w .tbl_frm01 {}
|
||||
#bo_w .tbl_frm01 th {}
|
||||
#bo_w .tbl_frm01 td {}
|
||||
#bo_w .tbl_frm01 textarea, #bo_w tbl_frm01 .frm_input {}
|
||||
#bo_w .tbl_frm01 textarea {}
|
||||
/*
|
||||
#bo_w .tbl_frm01 #captcha {}
|
||||
#bo_w .tbl_frm01 #captcha input {}
|
||||
*/
|
||||
#bo_w .tbl_frm01 a {}
|
||||
|
||||
/* 필수입력 */
|
||||
#bo_w .required, #bo_w textarea.required {}
|
||||
|
||||
#bo_w .cke_sc {}
|
||||
#bo_w button.btn_cke_sc{}
|
||||
#bo_w .cke_sc_def {}
|
||||
#bo_w .cke_sc_def dl {}
|
||||
#bo_w .cke_sc_def dl:after {}
|
||||
#bo_w .cke_sc_def dt, #bo_w .cke_sc_def dd {}
|
||||
#bo_w .cke_sc_def dt {}
|
||||
#bo_w .cke_sc_def dd {}
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 끝 ### */
|
||||
|
||||
/* 게시판 목록 */
|
||||
#bo_list .td_board {width:120px;text-align:center}
|
||||
#bo_list .td_chk {width:30px;text-align:center}
|
||||
#bo_list .td_date {width:60px;text-align:center}
|
||||
#bo_list .td_datetime {width:110px;text-align:center}
|
||||
#bo_list .td_group {width:100px;text-align:center}
|
||||
#bo_list .td_mb_id {width:100px;text-align:center}
|
||||
#bo_list .td_mng {width:80px;text-align:center}
|
||||
#bo_list .td_name {width:100px;text-align:left}
|
||||
#bo_list .td_nick {width:100px;text-align:center}
|
||||
#bo_list .td_num {width:50px;text-align:center}
|
||||
#bo_list .td_numbig {width:80px;text-align:center}
|
||||
|
||||
#bo_list .txt_active {color:#5d910b}
|
||||
#bo_list .txt_expired {color:#ccc}
|
||||
|
||||
#bo_cate h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_cate ul {margin-bottom:10px;padding-left:1px;width:728px;zoom:1}
|
||||
#bo_cate ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_cate li {float:left;margin-bottom:-1px}
|
||||
#bo_cate a {display:block;position:relative;margin-left:-1px;padding:6px 0 5px;width:90px;border:1px solid #ddd;background:#f7f7f7;color:#888;text-align:center;letter-spacing:-0.1em;line-height:1.2em;cursor:pointer}
|
||||
#bo_cate a:focus, #bo_cate a:hover, #bo_cate a:active {text-decoration:none}
|
||||
#bo_cate #bo_cate_on {z-index:2;border:1px solid #565e60;background:#fff;color:#565e60;font-weight:bold}
|
||||
|
||||
.td_subject img {margin-left:3px}
|
||||
|
||||
/* 게시판 목록 공통 */
|
||||
.bo_fx {margin-bottom:5px;zoom:1}
|
||||
.bo_fx:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_fx ul {margin:0;padding:0;list-style:none}
|
||||
#bo_list_total {float:left;padding-top:5px}
|
||||
.btn_bo_user {float:right;margin:0;padding:0;list-style:none}
|
||||
.btn_bo_user li {float:left;margin-left:5px}
|
||||
.btn_bo_adm {float:left}
|
||||
.btn_bo_adm li {float:left;margin-right:5px}
|
||||
.btn_bo_adm input {padding:0 10px;height:25px;border:1px solid #e8180c !important;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle;cursor:pointer}
|
||||
.bo_notice td {background:#f5f6fa}
|
||||
.bo_notice td a {font-weight:bold}
|
||||
.td_num strong {color:#000}
|
||||
.bo_cate_link {display:inline-block;margin:0 3px 0 0;padding:0 6px 0 0;border-right:1px solid #e7f1ed;color:#999 !important;font-weight:bold;text-decoration:none} /* 글제목줄 분류스타일 */
|
||||
.bo_current {color:#e8180c}
|
||||
#bo_list .cnt_cmt {display:inline-block;margin:0 0 0 3px;font-weight:bold}
|
||||
|
||||
#bo_sch {margin-bottom:10px;padding-top:5px;text-align:center}
|
||||
#bo_sch legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
|
||||
|
||||
/* 게시판 쓰기 */
|
||||
#char_count_desc {display:block;margin:0 0 5px;padding:0}
|
||||
#char_count_wrp {margin:5px 0 0;text-align:right}
|
||||
#char_count {font-weight:bold}
|
||||
|
||||
#autosave_wrapper {position:relative}
|
||||
#autosave_pop {display:none;z-index:10;position:absolute;top:24px;right:117px;padding:8px;width:350px;height:auto !important;height:180px;max-height:180px;border:1px solid #565656;background:#fff;overflow-y:scroll}
|
||||
html.no-overflowscrolling #autosave_pop {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */
|
||||
#autosave_pop strong {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#autosave_pop div {text-align:right}
|
||||
#autosave_pop button {margin:0;padding:0;border:0;background:transparent}
|
||||
#autosave_pop ul {margin:10px 0;padding:0;border-top:1px solid #e9e9e9;list-style:none}
|
||||
#autosave_pop li {padding:8px 5px;border-bottom:1px solid #e9e9e9;zoom:1}
|
||||
#autosave_pop li:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#autosave_pop a {display:block;float:left}
|
||||
#autosave_pop span {display:block;float:right}
|
||||
.autosave_close {cursor:pointer}
|
||||
.autosave_content {display:none}
|
||||
|
||||
/* 게시판 읽기 */
|
||||
#bo_v {margin-bottom:20px;padding-bottom:20px}
|
||||
|
||||
#bo_v_table {position:absolute;top:0;right:15px;margin:0;padding:0 5px;height:25px;background:#565e60;color:#fff;font-weight:bold;line-height:2.2em}
|
||||
|
||||
#bo_v_title {padding:10px 0;font-size:1.2em}
|
||||
|
||||
#bo_v_info {padding:0 0 10px;border-bottom:1px solid #ddd}
|
||||
#bo_v_info h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_info strong {display:inline-block;margin:0 15px 0 5px;font-weight:normal}
|
||||
#bo_v_info .sv_member,
|
||||
#bo_v_info .sv_guest,
|
||||
#bo_v_info .member,
|
||||
#bo_v_info .guest {font-weight:bold}
|
||||
|
||||
#bo_v_file {}
|
||||
#bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_file ul {margin:0;padding:0;list-style:none}
|
||||
#bo_v_file li {padding:0 10px;border-bottom:1px solid #eee;background:#f5f6fa}
|
||||
#bo_v_file a {display:inline-block;padding:8px 0 7px;width:100%;color:#000;word-wrap:break-word}
|
||||
#bo_v_file a:focus, #bo_v_file a:hover, #bo_v_file a:active {text-decoration:none}
|
||||
#bo_v_file img {float:left;margin:0 10px 0 0}
|
||||
.bo_v_file_cnt {display:inline-block;margin:0 0 3px 16px}
|
||||
|
||||
#bo_v_link {}
|
||||
#bo_v_link h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_link ul {margin:0;padding:0;list-style:none}
|
||||
#bo_v_link li {padding:0 10px;border-bottom:1px solid #eee;background:#f5f6fa}
|
||||
#bo_v_link a {display:inline-block;padding:8px 0 7px;width:100%;color:#000;word-wrap:break-word}
|
||||
#bo_v_link a:focus, #bo_v_link a:hover, #bo_v_link a:active {text-decoration:none}
|
||||
.bo_v_link_cnt {display:inline-block;margin:0 0 3px 16px}
|
||||
|
||||
#bo_v_top {margin:0 0 10px;padding:10px 0;zoom:1}
|
||||
#bo_v_top:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_top h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_top ul {margin:0;padding:0;list-style:none}
|
||||
|
||||
#bo_v_bot {zoom:1}
|
||||
#bo_v_bot:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_bot h2 {margin:0;padding:0;height:0;overflow:hidden}
|
||||
#bo_v_bot ul {margin:0;padding:0;list-style:none}
|
||||
|
||||
.bo_v_nb {float:left}
|
||||
.bo_v_nb li {float:left;margin-right:5px}
|
||||
.bo_v_com {float:right}
|
||||
.bo_v_com li {float:left;margin-left:5px}
|
||||
|
||||
#bo_v_atc {min-height:100px;height:auto !important;height:100px}
|
||||
#bo_v_atc_title {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#bo_v_img {margin:0 0 10px;width:100%;overflow:hidden;zoom:1}
|
||||
#bo_v_img:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_img img {margin-bottom:20px;max-width:100%;height:auto}
|
||||
|
||||
#bo_v_con {margin-bottom:30px;width:100%;line-height:1.7em;word-break:break-all;overflow:hidden}
|
||||
#bo_v_con a {color:#000;text-decoration:underline}
|
||||
#bo_v_con img {max-width:100%;height:auto}
|
||||
|
||||
#bo_v_act {margin-bottom:30px;text-align:center}
|
||||
#bo_v_act a {margin-right:5px;vertical-align:top}
|
||||
#bo_v_act span {display:inline-block;margin-right:5px;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:2.15em;vertical-align:top}
|
||||
#bo_v_act strong {color:#ff3061}
|
||||
#bo_v_act_good,
|
||||
#bo_v_act_nogood {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#bo_v_sns {margin:0 0 20px;padding:0;list-style:none;zoom:1}
|
||||
#bo_v_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_v_sns li {float:left;margin:0 5px 0 0}
|
||||
|
||||
#bo_v_addq {margin:0 0 30px;text-align:right}
|
||||
|
||||
#bo_v_ans {margin:0 0 30px;padding:30px 0 0;border-top:1px solid #e9e9e9}
|
||||
#bo_v_ans h2 {display:inline-block;vertical-align:middle;font-size:1.2em}
|
||||
#bo_v_ans #ans_datetime {margin:10px 0;color:#999}
|
||||
#bo_v_ans #ans_con {margin:0 0 10px;line-height:1.8em}
|
||||
#bo_v_ans #ans_add {text-align:right}
|
||||
#bo_v_ans #ans_msg {padding:40px 0;background:#f2f5f9;text-align:center}
|
||||
|
||||
#bo_v_rel {margin:0 0 30px;padding:30px 0 0;border-top:1px solid #e9e9e9}
|
||||
#bo_v_rel h2 {margin:0 0 10px;font-size:1.2em}
|
||||
|
||||
#bo_v form {padding-top:20px}
|
||||
|
||||
/* 게시판 댓글 */
|
||||
#bo_vc {padding:20px 20px 10px;border-top:1px solid #cfded8;border-bottom:1px solid #cfded8;background:#f5f6fa}
|
||||
#bo_vc h2 {margin-bottom:10px}
|
||||
#bo_vc article {padding:0 0 10px;border-top:1px dotted #ccc}
|
||||
#bo_vc header {position:relative;padding:15px 0 5px}
|
||||
#bo_vc header .icon_reply {position:absolute;top:15px;left:-20px}
|
||||
#bo_vc .sv_wrap {margin-right:15px}
|
||||
#bo_vc .member, #bo_vc .guest, #bo_vc .sv_member, #bo_vc .sv_guest {font-weight:bold}
|
||||
.bo_vc_hdinfo {display:inline-block;margin:0 15px 0 5px}
|
||||
#bo_vc h1 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_vc a {color:#000;text-decoration:none}
|
||||
#bo_vc p {padding:0 0 5px;line-height:1.8em}
|
||||
#bo_vc p a {text-decoration:underline}
|
||||
#bo_vc_empty {margin:0;padding:20px !important;text-align:center}
|
||||
#bo_vc fieldset {margin:0 0 10px;padding:0}
|
||||
#bo_vc #bo_vc_winfo {float:left}
|
||||
#bo_vc footer {zoom:1}
|
||||
#bo_vc footer:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
.bo_vc_act {float:right;margin:0;list-style:none;zoom:1}
|
||||
.bo_vc_act:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.bo_vc_act li {float:left;margin-left:5px}
|
||||
|
||||
#bo_vc_w {position:relative;margin:0 0 10px;padding:0 0 20px;border-bottom:1px solid #cfded8}
|
||||
#bo_vc_w h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
#bo_vc_w #char_cnt {display:block;margin:0 0 5px}
|
||||
|
||||
#bo_vc_sns {margin:0;padding:0;list-style:none;zoom:1}
|
||||
#bo_vc_sns:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#bo_vc_sns li {float:left;margin:0 20px 0 0}
|
||||
#bo_vc_sns input {margin:0 0 0 5px}
|
||||
|
||||
#bo_vc form {padding:0}
|
||||
25
skin/qa/basic/view.answer.skin.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<section id="bo_v_ans">
|
||||
<h2>답변: <?php echo get_text($answer['qa_subject']); ?></h2>
|
||||
<a href="<?php echo $rewrite_href; ?>" class="btn_b01">추가질문</a>
|
||||
|
||||
<div id="ans_datetime">
|
||||
<?php echo $answer['qa_datetime']; ?>
|
||||
</div>
|
||||
|
||||
<div id="ans_con">
|
||||
<?php echo conv_content($answer['qa_content'], $answer['qa_html']); ?>
|
||||
</div>
|
||||
|
||||
<div id="ans_add">
|
||||
<?php if($answer_update_href) { ?>
|
||||
<a href="<?php echo $answer_update_href; ?>" class="btn_b01">답변수정</a>
|
||||
<?php } ?>
|
||||
<?php if($answer_delete_href) { ?>
|
||||
<a href="<?php echo $answer_delete_href; ?>" class="btn_b01" onclick="del(this.href); return false;">답변삭제</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
125
skin/qa/basic/view.answerform.skin.php
Normal file
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<section id="bo_v_ans">
|
||||
<?php
|
||||
if($is_admin) // 관리자이면 답변등록
|
||||
{
|
||||
?>
|
||||
<h2>답변등록</h2>
|
||||
|
||||
<form name="fanswer" method="post" action="./qawrite_update.php" onsubmit="return fwrite_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $view['qa_id']; ?>">
|
||||
<input type="hidden" name="w" value="a">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
$option = '';
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?php echo $option; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th><label for="qa_subject">제목</label></th>
|
||||
<td><input type="text" name="qa_subject" value="" id="qa_subject" required class="frm_input required" size="50" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content">
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="답변쓰기" id="btn_submit" accesskey="s" class="btn_submit">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "2";
|
||||
else
|
||||
obj.value = "1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.qa_subject.value,
|
||||
"content": f.qa_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.qa_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_qa_content) != "undefined")
|
||||
ed_qa_content.returnFalse();
|
||||
else
|
||||
f.qa_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<p id="ans_msg">고객님의 문의에 대한 답변을 준비 중입니다.</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
169
skin/qa/basic/view.skin.php
Normal file
@ -0,0 +1,169 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
|
||||
|
||||
<!-- 게시물 읽기 시작 { -->
|
||||
<div id="bo_v_table"><?php echo $qaconfig['qa_title']; ?></div>
|
||||
|
||||
<article id="bo_v">
|
||||
<header>
|
||||
<h1 id="bo_v_title">
|
||||
<?php
|
||||
echo $view['category'].' | '; // 분류 출력 끝
|
||||
echo $view['subject']; // 글제목 출력
|
||||
?>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<section id="bo_v_info">
|
||||
<h2>페이지 정보</h2>
|
||||
작성자 <strong><?php echo $view['name'] ?></strong>
|
||||
<span class="sound_only">작성일</span><strong><?php echo $view['datetime']; ?></strong>
|
||||
</section>
|
||||
|
||||
<?php if($view['download_count']) { ?>
|
||||
<!-- 첨부파일 시작 { -->
|
||||
<section id="bo_v_file">
|
||||
<h2>첨부파일</h2>
|
||||
<ul>
|
||||
<?php
|
||||
// 가변 파일
|
||||
for ($i=0; $i<$view['download_count']; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<img src="<?php echo $qa_skin_url ?>/img/icon_file.gif" alt="첨부">
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- } 첨부파일 끝 -->
|
||||
<?php } ?>
|
||||
|
||||
<!-- 게시물 상단 버튼 시작 { -->
|
||||
<div id="bo_v_top">
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
<?php if ($prev_href || $next_href) { ?>
|
||||
<ul class="bo_v_nb">
|
||||
<?php if ($prev_href) { ?><li><a href="<?php echo $prev_href ?>" class="btn_b01">이전글</a></li><?php } ?>
|
||||
<?php if ($next_href) { ?><li><a href="<?php echo $next_href ?>" class="btn_b01">다음글</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<ul class="bo_v_com">
|
||||
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>" class="btn_b01">수정</a></li><?php } ?>
|
||||
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>" class="btn_b01" onclick="del(this.href); return false;">삭제</a></li><?php } ?>
|
||||
<li><a href="<?php echo $list_href ?>" class="btn_b01">목록</a></li>
|
||||
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>" class="btn_b02">글쓰기</a></li><?php } ?>
|
||||
</ul>
|
||||
<?php
|
||||
$link_buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
</div>
|
||||
<!-- } 게시물 상단 버튼 끝 -->
|
||||
|
||||
<section id="bo_v_atc">
|
||||
<h2 id="bo_v_atc_title">본문</h2>
|
||||
|
||||
<?php
|
||||
// 파일 출력
|
||||
if($view['img_count']) {
|
||||
echo "<div id=\"bo_v_img\">\n";
|
||||
|
||||
for ($i=0; $i<$view['img_count']; $i++) {
|
||||
//echo $view['img_file'][$i];
|
||||
echo get_view_thumbnail($view['img_file'][$i], $qaconfig['qa_image_width']);
|
||||
}
|
||||
|
||||
echo "</div>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- 본문 내용 시작 { -->
|
||||
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content'], $qaconfig['qa_image_width']); ?></div>
|
||||
<!-- } 본문 내용 끝 -->
|
||||
|
||||
<?php if($view['qa_type']) { ?>
|
||||
<div id="bo_v_addq"><a href="<?php echo $rewrite_href; ?>" class="btn_b01">추가질문</a></div>
|
||||
<?php } ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
// 질문글에서 답변이 있으면 답변 출력, 답변이 없고 관리자이면 답변등록폼 출력
|
||||
if(!$view['qa_type']) {
|
||||
if($view['qa_status'] && $answer['qa_id'])
|
||||
include_once($qa_skin_path.'/view.answer.skin.php');
|
||||
else
|
||||
include_once($qa_skin_path.'/view.answerform.skin.php');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if($view['rel_count']) { ?>
|
||||
<section id="bo_v_rel">
|
||||
<h2>연관질문</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">분류</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">상태</th>
|
||||
<th scope="col">등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($i=0; $i<$view['rel_count']; $i++) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="td_category"><?php echo get_text($rel_list[$i]['category']); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo $rel_list[$i]['view_href']; ?>">
|
||||
<?php echo $rel_list[$i]['subject']; ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="td_stat <?php echo ($list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '답변완료' : '답변대기'); ?></td>
|
||||
<td class="td_date"><?php echo $rel_list[$i]['date']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
<?php } ?>
|
||||
|
||||
<!-- 링크 버튼 시작 { -->
|
||||
<div id="bo_v_bot">
|
||||
<?php echo $link_buttons ?>
|
||||
</div>
|
||||
<!-- } 링크 버튼 끝 -->
|
||||
|
||||
</article>
|
||||
<!-- } 게시판 읽기 끝 -->
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("a.view_image").click(function() {
|
||||
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
|
||||
return false;
|
||||
});
|
||||
|
||||
// 이미지 리사이즈
|
||||
$("#bo_v_atc").viewimageresize();
|
||||
});
|
||||
</script>
|
||||
175
skin/qa/basic/write.skin.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo $qa_skin_url ?>/style.css">
|
||||
|
||||
<section id="bo_w">
|
||||
<!-- 게시물 작성/수정 시작 { -->
|
||||
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||
<input type="hidden" name="qa_id" value="<?php echo $qa_id ?>">
|
||||
<input type="hidden" name="sca" value="<?php echo $sca ?>">
|
||||
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||
<?php
|
||||
$option = '';
|
||||
$option_hidden = '';
|
||||
$option = '';
|
||||
|
||||
if ($is_dhtml_editor) {
|
||||
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
|
||||
} else {
|
||||
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
|
||||
}
|
||||
|
||||
echo $option_hidden;
|
||||
?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrp">
|
||||
<table>
|
||||
<tbody>
|
||||
<?php if ($category_option) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<select name="qa_category" id="qa_category" required class="required" >
|
||||
<option value="">선택하세요</option>
|
||||
<?php echo $category_option ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($option) { ?>
|
||||
<tr>
|
||||
<th scope="row">옵션</th>
|
||||
<td><?php echo $option; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_email) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_email">이메일</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_email" value="<?php echo $write['qa_email']; ?>" id="qa_email" <?php echo $req_email; ?> class="<?php echo $req_email.' '; ?>frm_input email" size="50" maxlength="100">
|
||||
<input type="checkbox" name="qa_email_recv" value="1" <?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>>
|
||||
<label for="qa_email_recv">답변받기</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_hp) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_hp">휴대폰</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_hp" value="<?php echo $write['qa_hp']; ?>" id="qa_hp" <?php echo $req_hp; ?> class="<?php echo $req_email.' '; ?>frm_input" size="30">
|
||||
<?php if($qaconfig['qa_use_sms']) { ?>
|
||||
<input type="checkbox" name="qa_sms_recv" value="1" <?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>> 답변등록 SMS알림 수신
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject">제목<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_subject" value="<?php echo $write['qa_subject']; ?>" id="qa_subject" required class="frm_input required" size="50" maxlength="255">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content">내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td class="wr_content">
|
||||
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">파일 #1</th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[1]" title="파일첨부 1 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file frm_input">
|
||||
<?php if($w == 'u' && $write['qa_file1']) { ?>
|
||||
<input type="checkbox" id="bf_file_del1" name="bf_file_del[1]" value="1"> <label for="bf_file_del1"><?php echo $write['qa_source1']; ?> 파일 삭제</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">파일 #2</th>
|
||||
<td>
|
||||
<input type="file" name="bf_file[2]" title="파일첨부 2 : 용량 <?php echo $upload_max_filesize; ?> 이하만 업로드 가능" class="frm_file frm_input">
|
||||
<?php if($w == 'u' && $write['qa_file2']) { ?>
|
||||
<input type="checkbox" id="bf_file_del2" name="bf_file_del[2]" value="1"> <label for="bf_file_del2"><?php echo $write['qa_source2']; ?> 파일 삭제</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" value="글쓰기" id="btn_submit" accesskey="s" class="btn_submit">
|
||||
<a href="<?php echo $list_href; ?>" class="btn_cancel">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function html_auto_br(obj)
|
||||
{
|
||||
if (obj.checked) {
|
||||
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
|
||||
if (result)
|
||||
obj.value = "2";
|
||||
else
|
||||
obj.value = "1";
|
||||
}
|
||||
else
|
||||
obj.value = "";
|
||||
}
|
||||
|
||||
function fwrite_submit(f)
|
||||
{
|
||||
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
|
||||
|
||||
var subject = "";
|
||||
var content = "";
|
||||
$.ajax({
|
||||
url: g5_bbs_url+"/ajax.filter.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"subject": f.qa_subject.value,
|
||||
"content": f.qa_content.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data, textStatus) {
|
||||
subject = data.subject;
|
||||
content = data.content;
|
||||
}
|
||||
});
|
||||
|
||||
if (subject) {
|
||||
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
|
||||
f.qa_subject.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (content) {
|
||||
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
|
||||
if (typeof(ed_qa_content) != "undefined")
|
||||
ed_qa_content.returnFalse();
|
||||
else
|
||||
f.qa_content.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById("btn_submit").disabled = "disabled";
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
<!-- } 게시물 작성/수정 끝 -->
|
||||