Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -215,7 +215,7 @@ $pg_anchor = "
|
||||
<th scope="row"><label for="cf_link_target">새창 링크</label></th>
|
||||
<td>
|
||||
<?=help('글내용중 자동 링크되는 타켓을 지정합니다.')?>
|
||||
<select id="cf_link_target">
|
||||
<select id="cf_link_target" name="cf_link_target">
|
||||
<option value="_blank"<?=get_selected($config['cf_link_target'], '_blank')?>>_blank</option>
|
||||
<option value="_self"<?=get_selected($config['cf_link_target'], '_self')?>>_self</option>
|
||||
<option value="_top"<?=get_selected($config['cf_link_target'], '_top')?>>_top</option>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?
|
||||
define('G4_CAPTCHA', true);
|
||||
include_once('./_common.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
// 090710
|
||||
if (substr_count($wr_content, "&#") > 50) {
|
||||
@ -20,6 +21,8 @@ if (!empty($_POST['wr_email']))
|
||||
if ($is_guest) {
|
||||
if ($wr_name == '')
|
||||
alert('이름은 필히 입력하셔야 합니다.');
|
||||
if(!chk_captcha())
|
||||
alert('스팸방지에 입력한 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
if ($w == "c" || $w == "cu") {
|
||||
@ -45,7 +48,7 @@ if (empty($wr['wr_id']))
|
||||
// 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다.
|
||||
//if (!trim($_POST["wr_content"])) die ("내용을 입력하여 주십시오.");
|
||||
|
||||
if ($member[mb_id])
|
||||
if ($member[mb_id])
|
||||
{
|
||||
$mb_id = $member['mb_id'];
|
||||
// 4.00.13 - 실명 사용일때 코멘트에 별명으로 입력되던 오류를 수정
|
||||
|
||||
23
js/wrest.js
23
js/wrest.js
@ -331,39 +331,22 @@ function wrestSubmit()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.oldsubmit && this.oldsubmit == false)
|
||||
return false;
|
||||
if (this.oldsubmit && this.oldsubmit() == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 초기에 onsubmit을 가로채도록 한다.
|
||||
function wrestInitialized()
|
||||
{
|
||||
//var regexp = /required/;
|
||||
var regexp = /\brequired\b/;
|
||||
|
||||
for (var i = 0; i < document.forms.length; i++) {
|
||||
// onsubmit 이벤트가 있다면 저장해 놓는다.
|
||||
if (document.forms[i].onsubmit) {
|
||||
document.forms[i].oldsubmit = document.forms[i].onsubmit;
|
||||
}
|
||||
document.forms[i].onsubmit = wrestSubmit;
|
||||
|
||||
// 이 부분은 CSS 로 대체를 합니다. github issue #282, 지운아빠 작업예정
|
||||
for (var j = 0; j < document.forms[i].elements.length; j++) {
|
||||
// 필수 입력일 경우는 * 배경이미지를 준다.
|
||||
if (document.forms[i].elements[j].getAttribute("required") != null ||
|
||||
regexp.test(document.forms[i].elements[j].className)) {
|
||||
//if (regexp.test(document.forms[i].elements[j].className)) {
|
||||
//document.forms[i].elements[j].style.backgroundColor = wrestFldDefaultColor;
|
||||
//document.forms[i].elements[j].className = "wrest_required";
|
||||
document.forms[i].elements[j].style.backgroundImage = "url('"+g4_url+"/js/wrest.gif')";
|
||||
document.forms[i].elements[j].style.backgroundPosition = "top right";
|
||||
document.forms[i].elements[j].style.backgroundRepeat = "no-repeat";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -221,11 +221,8 @@ function url_auto_link($str)
|
||||
//$str = preg_replace("/([^(HREF=\"?'?)|(SRC=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,]+)/i", "\\1<A HREF=\"\\2\" TARGET='$config['cf_link_target']'>\\2</A>", $str);
|
||||
// 100825 : () 추가
|
||||
// 120315 : CHARSET 에 따라 링크시 글자 잘림 현상이 있어 수정
|
||||
if (strtoupper($g4['charset']) == 'UTF-8') {
|
||||
$str = preg_replace("/([^(HREF=\"?'?)|(SRC=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
|
||||
} else {
|
||||
$str = preg_replace("/([^(HREF=\"?'?)|(SRC=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
|
||||
}
|
||||
$str = preg_replace("/([^(HREF=\"?'?)|(SRC=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
|
||||
|
||||
// 이메일 정규표현식 수정 061004
|
||||
//$str = preg_replace("/(([a-z0-9_]|\-|\.)+@([^[:space:]]*)([[:alnum:]-]))/i", "<a href='mailto:\\1'>\\1</a>", $str);
|
||||
$str = preg_replace("/([0-9a-z]([-_\.]?[0-9a-z])*@[0-9a-z]([-_\.]?[0-9a-z])*\.[a-z]{2,4})/i", "<a href='mailto:\\1'>\\1</a>", $str);
|
||||
|
||||
@ -73,9 +73,7 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
<?}?>
|
||||
<? if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><? } ?>
|
||||
|
||||
</section>
|
||||
|
||||
<? if ($is_comment_write) {
|
||||
<? if ($is_comment_write) {
|
||||
if($w == '')
|
||||
$w = 'c';
|
||||
?>
|
||||
@ -93,44 +91,23 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="is_good" value="">
|
||||
|
||||
<table class="frm_tbl">
|
||||
<tbody>
|
||||
<? if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="wr_name" name="wr_name" class="frm_input required" maxLength="20" size="5" required></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" id="wr_password" name="wr_password" class="frm_input required" maxLength="20" size="10" required></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="wr_secret">비밀글사용</label></th>
|
||||
<td><input type="checkbox" id="wr_secret" name="wr_secret" value="secret"></td>
|
||||
</tr>
|
||||
<? if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td><?=$captcha_html;?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td>
|
||||
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
|
||||
<textarea id="wr_content" name="wr_content" required
|
||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> title="댓글내용입력(필수)"><? echo $c_wr_content; ?></textarea>
|
||||
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" class="btn_submit" value="댓글입력">
|
||||
<fieldset id="bo_vc_winfo">
|
||||
<legend class="sound_only">작성자</legend>
|
||||
<? if ($is_guest) { ?>
|
||||
<label for="wr_name">이름<strong class="sound_only">필수</strong></label> <input type="text" id="wr_name" name="wr_name" class="fs_input required" maxLength="20" size="5" required>
|
||||
<label for="wr_password">패스워드<strong class="sound_only">필수</strong></label> <input type="password" id="wr_password" name="wr_password" class="fs_input required" maxLength="20" size="10" required>
|
||||
<? } ?>
|
||||
<input type="checkbox" id="wr_secret" name="wr_secret" value="secret">
|
||||
<label for="wr_secret">비밀글</label>
|
||||
</fieldset>
|
||||
<? echo $captcha_html; ?>
|
||||
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
|
||||
<div id="bo_vc_warea">
|
||||
<textarea id="wr_content" name="wr_content" required
|
||||
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> title="댓글내용입력(필수)"><? echo $c_wr_content; ?></textarea>
|
||||
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
|
||||
<input type="submit" class="bo_vc_submit" value="댓글입력">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
@ -280,9 +257,6 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
|
||||
save_before = el_id;
|
||||
}
|
||||
|
||||
if (typeof(wrestInitialized) != 'undefined')
|
||||
wrestInitialized();
|
||||
}
|
||||
|
||||
function comment_delete(url)
|
||||
@ -293,3 +267,4 @@ var char_max = parseInt(<?=$comment_max?>); // 최대
|
||||
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
|
||||
</script>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user