Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -172,6 +172,7 @@ function captcha_html($class='captcha')
|
||||
$obj = new gcaptcha();
|
||||
$obj->run();
|
||||
|
||||
$rand = rand();
|
||||
$jpg_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.jpg';
|
||||
$wav_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.wav';
|
||||
|
||||
@ -179,8 +180,8 @@ function captcha_html($class='captcha')
|
||||
$html .= "\n".'<script src="'.G4_GCAPTCHA_URL.'/gcaptcha.js"></script>';
|
||||
$html .= '<fieldset id="captcha" class="'.$class.'">';
|
||||
$html .= '<legend class="sound_only">자동등록방지</legend>';
|
||||
$html .= '<img src="'.$jpg_file_url.'?_='.rand().'" alt="자동등록방지 숫자">';
|
||||
$html .= '<a href="'.$wav_file_url.'" id="captcha_wav" target="_blank"><img src="'.G4_GCAPTCHA_URL.'/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
|
||||
$html .= '<img src="'.$jpg_file_url.'?_='.$rand.'" alt="자동등록방지 숫자">';
|
||||
$html .= '<a href="'.$wav_file_url.'?_='.$rand.'" id="captcha_wav" target="_blank"><img src="'.G4_GCAPTCHA_URL.'/img/sound.gif" alt="숫자를 음성으로 듣기"></a>';
|
||||
$html .= '<input type="text" id="captcha_key" name="captcha_key" class="captcha_box frm_input" size="6" maxlength="6" required title="자동등록방지 숫자 입력">';
|
||||
$html .= '<p class="sound_only">자동등록방지 숫자를 순서대로 입력하세요.</p>';
|
||||
$html .= '</fieldset>';
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
// prepare an array of wavfiles
|
||||
$wavs_dir = $g4['path'].'/plugin/captcha/wavs/';
|
||||
$number = (string)$_SESSION['ss_captcha_key'];
|
||||
$wavs = array();
|
||||
for($i=0;$i<strlen($number);$i++){
|
||||
$file = $wavs_dir.$number[$i].'.wav';
|
||||
$wavs[] = $file;
|
||||
}
|
||||
|
||||
header('Content-type: audio/x-wav');
|
||||
header('Content-Disposition: attachment;filename=captcha.wav');
|
||||
|
||||
echo joinwavs($wavs);
|
||||
|
||||
|
||||
/**
|
||||
* Join multiple wav files
|
||||
*
|
||||
* All wave files need to have the same format and need to be uncompressed.
|
||||
* The headers of the last file will be used (with recalculated datasize
|
||||
* of course)
|
||||
*
|
||||
* @link http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/
|
||||
* @link http://www.thescripts.com/forum/thread3770.html
|
||||
*/
|
||||
function joinwavs($wavs)
|
||||
{
|
||||
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
||||
'H8Subchunk1ID', 'VSubchunk1Size',
|
||||
'vAudioFormat', 'vNumChannels', 'VSampleRate',
|
||||
'VByteRate', 'vBlockAlign', 'vBitsPerSample' ));
|
||||
$data = '';
|
||||
$info = array();
|
||||
foreach($wavs as $wav){
|
||||
$fp = fopen($wav,'rb');
|
||||
$header = fread($fp,36);
|
||||
$info = unpack($fields,$header);
|
||||
|
||||
// read optional extra stuff
|
||||
if($info['Subchunk1Size'] > 16){
|
||||
$header .= fread($fp,($info['Subchunk1Size']-16));
|
||||
}
|
||||
|
||||
// read SubChunk2ID
|
||||
$header .= fread($fp,4);
|
||||
|
||||
// read Subchunk2Size
|
||||
$size = unpack('vsize',fread($fp, 4));
|
||||
$size = $size['size'];
|
||||
|
||||
// read data
|
||||
$data .= fread($fp,$size);
|
||||
}
|
||||
|
||||
return ''
|
||||
.pack('a4', 'RIFF')
|
||||
.pack('V', strlen($data) + 36)
|
||||
.pack('a4', 'WAVE')
|
||||
.pack('a4', 'fmt ')
|
||||
.pack('V', $info['Subchunk1Size']) // 16
|
||||
.pack('v', $info['AudioFormat']) // 1
|
||||
.pack('v', $info['NumChannels']) // 1
|
||||
.pack('V', $info['SampleRate']) // 8000
|
||||
.pack('V', $info['ByteRate']) // 8000
|
||||
.pack('v', $info['BlockAlign']) // 1
|
||||
.pack('v', $info['BitsPerSample']) // 8
|
||||
.pack('a4', 'data')
|
||||
.pack('V', strlen($data))
|
||||
.$data;
|
||||
}
|
||||
?>
|
||||
@ -1,45 +0,0 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = 'E-mail 중복확인';
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_email = trim($mb_email);
|
||||
|
||||
if ($member[mb_id]) // 수정중 중복확인이면
|
||||
$sql = " select mb_email from {$g4[member_table]} where mb_email = '{$mb_email}' and mb_id <> '{$member[mb_id]}' ";
|
||||
else
|
||||
$sql = " select mb_email from {$g4[member_table]} where mb_email = '{$mb_email}' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if ($row[mb_email]) {
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
alert(''.$mb_email.'은(는) 이미 다른 회원이 사용하는 E-mail이므로 사용하실 수 없습니다.');
|
||||
//opener.fmbform.mb_email_enabled.value = "0"; // 새창으로 열 경우에...
|
||||
parent.document.getElementById('mb_email_enabled').value = -1;
|
||||
window.close();
|
||||
</script>
|
||||
HEREDOC;
|
||||
} else {
|
||||
if (!preg_match("/([0-9a-zA-Z_-]+)@([0-9a-zA-Z_-]+)\.([0-9a-zA-Z_-]+)/", $mb_email)) {
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
alert(''.$mb_email.'은(는) E-mail 주소 형식이 아니므로 사용하실 수 없습니다.');
|
||||
parent.document.getElementById('mb_email_enabled').value = '';
|
||||
window.close();
|
||||
</script>
|
||||
HEREDOC;
|
||||
} else {
|
||||
echo <<<HEREDOC
|
||||
<script>
|
||||
alert(''.$mb_email.'은(는) 중복된 E-mail이 없습니다.'.PHP_EOL.PHP_EOL.'사용하셔도 좋습니다.');
|
||||
parent.document.getElementById('mb_email_enabled').value = 1;
|
||||
window.close();
|
||||
</script>
|
||||
HEREDOC;
|
||||
}
|
||||
}
|
||||
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,39 +0,0 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = '회원아이디 중복확인';
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_id = trim($mb_id);
|
||||
|
||||
$mb = get_member($mb_id);
|
||||
if ($mb[mb_id]) {
|
||||
?>
|
||||
<script>
|
||||
alert('<?=$mb_id?>은(는) 이미 가입된 회원아이디 이므로 사용하실 수 없습니다.');
|
||||
parent.document.getElementById(\"mb_id_enabled\").value = -1;
|
||||
window.close();
|
||||
</script>';
|
||||
<?
|
||||
} else {
|
||||
if (preg_match("/[\,]?{$mb_id}/i", $config[cf_prohibit_id])) {
|
||||
?>
|
||||
<script>';
|
||||
alert('<?=$mb_id?>은(는) 예약어로 사용하실 수 없는 회원아이디입니다.');
|
||||
parent.document.getElementById(\"mb_id_enabled\").value = -2;
|
||||
window.close();';
|
||||
</script>';
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
alert('<?=$mb_id?>은(는) 중복된 회원아이디가 없습니다. 사용하셔도 좋습니다.');
|
||||
parent.document.getElementById(\"mb_id_enabled\").value = 1;';
|
||||
window.close();';
|
||||
</script>';
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -1,51 +0,0 @@
|
||||
<?
|
||||
include_once('./_common.php');
|
||||
|
||||
$g4['title'] = '별명 중복확인';
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
|
||||
$mb_nick = trim($mb_nick);
|
||||
|
||||
// 별명은 한글, 영문, 숫자만 가능
|
||||
if (!check_string($mb_nick, _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
|
||||
?>
|
||||
<script>
|
||||
alert('별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.');
|
||||
parent.document.getElementById('mb_nick_enabled').value = '';
|
||||
window.close();
|
||||
</script>
|
||||
<?
|
||||
exit;
|
||||
}
|
||||
|
||||
$mb = sql_fetch(" select mb_nick from $g4[member_table] where mb_nick = '$mb_nick' ");
|
||||
if ($mb[mb_nick]) {
|
||||
?>
|
||||
<script>
|
||||
alert('<?=$mb_nick?> 은(는) 이미 다른분께서 사용하고 있는 별명이므로 사용하실 수 없습니다.');
|
||||
parent.document.getElementById('mb_nick_enabled').value = -1;
|
||||
window.close();
|
||||
</script>
|
||||
<?
|
||||
} else {
|
||||
if (preg_match("/[\,]?{$mb_nick}/i", $config[cf_prohibit_id])) {
|
||||
?>
|
||||
<script>
|
||||
alert('<?=$mb_nick?> 은(는) 예약어로 사용하실 수 없는 별명입니다.');
|
||||
parent.document.getElementById('mb_nick_enabled').value = -2;
|
||||
window.close();
|
||||
</script>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
alert('<?=$mb_nick?> 은(는) 별명으로 사용할 수 있습니다.');
|
||||
parent.document.getElementById('mb_nick_enabled').value = 1;
|
||||
window.close();
|
||||
</script>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -288,22 +288,22 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
|
||||
.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%}
|
||||
|
||||
/* 사이드뷰 */
|
||||
.sv_wrap {display:inline-block;position:relative;font-weight:normal}
|
||||
.sv_wrap .sv {z-index:5;display:none;margin:5px 0 0;border:1px solid #283646;background:#334356}
|
||||
.sv_nojs .sv {display:block}
|
||||
.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:3px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important}
|
||||
.sv_wrap a:focus,
|
||||
.sv_wrap a:hover,
|
||||
.sv_wrap a:active {text-decoration:none !important}
|
||||
.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important;background:#ddd}
|
||||
|
||||
/* 관리자 패스워드 확인 */
|
||||
#admin_confirm {padding:0 0 10px;background:#222;text-align:center}
|
||||
#admin_confirm p {margin:0 0 10px;color:#9ab9c5;background:#383a3f}
|
||||
#admin_confirm label {color:#fff}
|
||||
#admin_confirm .frm_input {border-color:#000}
|
||||
|
||||
/* 사이드뷰 */
|
||||
.sv_wrap {display:inline-block;position:relative;font-weight:normal}
|
||||
.sv_wrap .sv {z-index:5;display:none;margin:5px 0 0;border:1px solid #283646;background:#334356}
|
||||
.sv_js_off .sv {display:block}
|
||||
.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:3px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important}
|
||||
.sv_wrap a:focus,
|
||||
.sv_wrap a:hover,
|
||||
.sv_wrap a:active {text-decoration:none !important}
|
||||
.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto !important;background:#ddd}
|
||||
|
||||
/* pagination */
|
||||
.pg_wrap {clear:both;margin:0 0 20px;padding-top:20px;text-align:center}
|
||||
.pg {display:inline-block;border:1px solid #ddd;letter-spacing:-4px}
|
||||
@ -317,7 +317,4 @@ td {padding:8px 5px 6px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9
|
||||
.pg_prev {border-right:1px solid #ddd}
|
||||
.pg_end,
|
||||
.pg_next {border-left:1px solid #ddd}
|
||||
.pg_current {background:#444;color:#fff;font-weight:bold}
|
||||
|
||||
/* 스킨자료실 바로가기 */
|
||||
.goto_sirskin {color:#ff5300}
|
||||
.pg_current {background:#444;color:#fff;font-weight:bold}
|
||||
@ -641,7 +641,7 @@ fieldset button {padding:0 15px;height:24px;border:0;background:#333;color:#fff;
|
||||
/* 사이드뷰 */
|
||||
.sv_wrap {display:inline-block;position:relative;font-weight:normal}
|
||||
.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #283646;background:#111}
|
||||
.sv_nojs .sv {display:block}
|
||||
.sv_js_off .sv {display:block}
|
||||
.sv_wrap .sv a {display:inline-block !important;margin:0 !important;padding:3px !important;width:94px;border-bottom:1px solid #283646;color:#fff !important}
|
||||
.sv_wrap a:focus,
|
||||
.sv_wrap a:hover,
|
||||
|
||||
@ -998,7 +998,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
$email = get_text($email);
|
||||
$homepage = get_text($homepage);
|
||||
|
||||
$str = "<span class=\"sv_wrap\">\n";
|
||||
$str = "<span class=\"sv_wrap sv_js_off\">\n";
|
||||
$str .= $tmp_name."\n";
|
||||
|
||||
if(!G4_IS_MOBILE) {
|
||||
@ -1024,7 +1024,7 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
|
||||
$str2 .= "<a href=\"".G4_ADMIN_URL."/point_list.php?sfl=mb_id&stx=".$mb_id."\" target=\"_blank\">포인트내역</a>\n";
|
||||
}
|
||||
$str2 .= "</span>\n";
|
||||
$str .= $str2."\n<noscript class=\"sv_nojs\">".$str2."</noscript>";
|
||||
$str .= $str2;//."\n<noscript class=\"sv_nojs\">".$str2."</noscript>";
|
||||
}
|
||||
|
||||
$str .= "</span>";
|
||||
|
||||
@ -21,6 +21,8 @@ $(function() {
|
||||
<![endif]-->
|
||||
|
||||
<script>
|
||||
$('.sv_wrap').removeClass('sv_js_off'); //js 사용 가능한지를 사이드뷰에 알려주는 역할
|
||||
|
||||
$(function(){
|
||||
var hide_menu = false;
|
||||
var mouse_event = false;
|
||||
|
||||
Reference in New Issue
Block a user