Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -70,7 +70,7 @@ function member_delete($mb_id)
|
||||
}
|
||||
|
||||
// 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025
|
||||
$sql = " update {$g4['member_table']} set mb_jumin = '', mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_password_q = '', mb_password_a = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G4_SERVER_TIME)." 삭제함".PHP_EOL."{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G4_SERVER_TIME)."' where mb_id = '{$mb_id}' ";
|
||||
$sql = " update {$g4['member_table']} set mb_jumin = '', mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_password_q = '', mb_password_a = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G4_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G4_SERVER_TIME)."' where mb_id = '{$mb_id}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ function help($help="")
|
||||
{
|
||||
global $g4;
|
||||
|
||||
$str = '<span class="adm_field_explain">'.$help.'</span>';
|
||||
$str = '<span class="adm_field_explain">'.str_replace("\n", "<br>", $help).'</span>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ $colspan = 5;
|
||||
|
||||
<?
|
||||
//if (isset($stx))
|
||||
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'.PHP_EOL;
|
||||
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
||||
|
||||
if (strstr($sfl, 'mb_id'))
|
||||
$mb_id = $stx;
|
||||
|
||||
@ -185,7 +185,7 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<tr>
|
||||
<th scope="row"><label for="proc_count">카운트 조정</label></th>
|
||||
<td colspan="2">
|
||||
<?=help('현재 원글수 : '.number_format($board['bo_count_write']).', 현재 댓글수 : '.number_format($board['bo_count_comment']).PHP_EOL.'게시판 목록에서 글의 번호가 맞지 않을 경우에 체크하십시오.')?>
|
||||
<?=help('현재 원글수 : '.number_format($board['bo_count_write']).', 현재 댓글수 : '.number_format($board['bo_count_comment'])."\n".'게시판 목록에서 글의 번호가 맞지 않을 경우에 체크하십시오.')?>
|
||||
<input type="checkbox" id="proc_count" name="proc_count" value="1">
|
||||
</td>
|
||||
</tr>
|
||||
@ -457,7 +457,8 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_grp_use_name" name="chk_grp_use_name" value="1">
|
||||
<label for="chk_grp_use_name">그룹적용</label>
|
||||
<input type="checkbox" id="chk_grp_all_name" name="chk_all_use_name" value="1">
|
||||
|
||||
<input type="checkbox" id="chk_all_use_name" name="chk_all_use_name" value="1">
|
||||
<label for="chk_all_use_name">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
@ -809,8 +810,8 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_grp_gallery_width" name="chk_grp_gallery_width" value="1">
|
||||
<label for="chk_grp_gallery_width">그룹적용</label>
|
||||
<input type="checkbox" id="chk_grp_gallery_width" name="chk_grp_gallery_width" value="1">
|
||||
<label for="chk_grp_gallery_width">전체적용</label>
|
||||
<input type="checkbox" id="chk_all_gallery_width" name="chk_all_gallery_width" value="1">
|
||||
<label for="chk_all_gallery_width">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -833,10 +834,10 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<input type="text" id="bo_mobile_gallery_cols" name="bo_mobile_gallery_cols" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_cols']?>" size="4">
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_grp_gallery_cols" name="chk_grp_gallery_cols" value="1">
|
||||
<label for="chk_grp_gallery_cols">그룹적용</label>
|
||||
<input type="checkbox" id="chk_all_gallery_cols" name="chk_all_gallery_cols" value="1">
|
||||
<label for="chk_all_gallery_cols">전체적용</label>
|
||||
<input type="checkbox" id="mobile_chk_grp_gallery_cols" name="mobile_chk_grp_gallery_cols" value="1">
|
||||
<label for="mobile_chk_grp_gallery_cols">그룹적용</label>
|
||||
<input type="checkbox" id="mobile_chk_all_gallery_cols" name="mobile_chk_all_gallery_cols" value="1">
|
||||
<label for="mobile_chk_all_gallery_cols">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -846,10 +847,10 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<input type="text" id="bo_mobile_gallery_width" name="bo_mobile_gallery_width" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_width']?>" size="4">
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_grp_gallery_width" name="chk_grp_gallery_width" value="1">
|
||||
<label for="chk_grp_gallery_width">그룹적용</label>
|
||||
<input type="checkbox" id="chk_all_gallery_width" name="chk_all_gallery_width" value="1">
|
||||
<label for="chk_all_gallery_width">전체적용</label>
|
||||
<input type="checkbox" id="mobile_chk_grp_gallery_width" name="mobile_chk_grp_gallery_width" value="1">
|
||||
<label for="mobile_chk_grp_gallery_width">그룹적용</label>
|
||||
<input type="checkbox" id="mobile_chk_all_gallery_width" name="mobile_chk_all_gallery_width" value="1">
|
||||
<label for="mobile_chk_all_gallery_width">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -859,10 +860,10 @@ $pg_anchor = "<ul class=\"anchor\">
|
||||
<input type="text" id="bo_mobile_gallery_height" name="bo_mobile_gallery_height" class="required numeric frm_input" required value="<?=$board['bo_mobile_gallery_height']?>" size="4">
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_grp_gallery_height" name="chk_grp_gallery_height" value="1">
|
||||
<label for="chk_grp_gallery_height">그룹적용</label>
|
||||
<input type="checkbox" id="chk_all_gallery_height" name="chk_all_gallery_height" value="1">
|
||||
<label for="chk_all_gallery_height">전체적용</label>
|
||||
<input type="checkbox" id="mobile_chk_grp_gallery_height" name="mobile_chk_grp_gallery_height" value="1">
|
||||
<label for="mobile_chk_grp_gallery_height">그룹적용</label>
|
||||
<input type="checkbox" id="mobile_chk_all_gallery_height" name="mobile_chk_all_gallery_height" value="1">
|
||||
<label for="mobile_chk_all_gallery_height">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -191,7 +191,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('new');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_new_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -202,7 +202,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('new', G4_MOBILE_PATH.'/'.G4_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_new_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -215,7 +215,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('search');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_search_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -226,7 +226,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('search', G4_MOBILE_PATH.'/'.G4_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_search_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -239,7 +239,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('connect');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_connect_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -250,7 +250,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('connect', G4_MOBILE_PATH.'/'.G4_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_connect_skin'], $arr[$i]).">".$arr[$i]."</option>".PHP_EOL;
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -374,7 +374,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('member');
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'.PHP_EOL;
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -385,7 +385,7 @@ $pg_anchor = "
|
||||
<?
|
||||
$arr = get_skin_dir('member', G4_MOBILE_PATH.'/'.G4_SKIN_DIR);
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'.PHP_EOL;
|
||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@ -15,12 +15,35 @@ if ($member['mb_password'] != sql_password($_POST['admin_password'])) {
|
||||
|
||||
$mb_id = mysql_real_escape_string(trim($_POST['mb_id']));
|
||||
|
||||
// 핸드폰번호 체크
|
||||
$mb_hp = $_POST['mb_hp'];
|
||||
if($mb_hp) {
|
||||
$mb_hp = preg_replace("/[^0-9]/", "", $mb_hp);
|
||||
$hp_len = strlen($mb_hp);
|
||||
if($hp_len == 10) {
|
||||
$mb_hp = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "\\1-\\2-\\3", $mb_hp);
|
||||
} else if($hp_len == 11) {
|
||||
$mb_hp = preg_replace("/([0-9]{3})([0-9]{4})([0-9]{4})/", "\\1-\\2-\\3", $mb_hp);
|
||||
} else {
|
||||
alert('핸드폰번호를 올바르게 입력해 주십시오.');
|
||||
}
|
||||
|
||||
// 중복체크
|
||||
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_hp = '$mb_hp' ";
|
||||
if($w == 'u')
|
||||
$sql .= " and mb_id <> '$mb_id' ";
|
||||
|
||||
$row = sql_fetch($sql);
|
||||
if($row['cnt'])
|
||||
alert('다른 회원이 사용 중인 핸드폰번호입니다.');
|
||||
}
|
||||
|
||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||
mb_nick = '{$_POST['mb_nick']}',
|
||||
mb_email = '{$_POST['mb_email']}',
|
||||
mb_homepage = '{$_POST['mb_homepage']}',
|
||||
mb_tel = '{$_POST['mb_tel']}',
|
||||
mb_hp = '{$_POST['mb_hp']}',
|
||||
mb_hp = '$mb_hp',
|
||||
mb_zip1 = '{$_POST['mb_zip1']}',
|
||||
mb_zip2 = '{$_POST['mb_zip2']}',
|
||||
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||
|
||||
@ -16,7 +16,7 @@ echo '<span id="ct"></span>';
|
||||
include_once('./admin.tail.php');
|
||||
flush();
|
||||
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>포인트 정리중...</p>\';</script>'.PHP_EOL;
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>포인트 정리중...</p>\';</script>'."\n";
|
||||
flush();
|
||||
|
||||
$max_count = 50;
|
||||
@ -52,7 +52,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
insert_point($row['mb_id'], $total, '포인트 {$count}건 정리', '@clear', $row['mb_id'], G4_TIME_YMD."-".uniqid(""));
|
||||
|
||||
$str = $row['mb_id']."님 포인트 내역 ".number_format($count)."건 ".number_format($total)."점 정리<br>";
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \''.$str.'\';</script>'.PHP_EOL;
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \''.$str.'\';</script>'."\n";
|
||||
flush();
|
||||
}
|
||||
|
||||
@ -60,5 +60,5 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$sql = " UNLOCK TABLES ";
|
||||
sql_query($sql);
|
||||
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>총 '.$i.'건의 회원포인트 내역이 정리 되었습니다.</p>\';</script>'.PHP_EOL;
|
||||
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>총 '.$i.'건의 회원포인트 내역이 정리 되었습니다.</p>\';</script>'."\n";
|
||||
?>
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
function editor_html($id, $content, $ckeditor=true, $class="")
|
||||
function editor_html($id, $content, $ckeditor=true, $class="")
|
||||
{
|
||||
global $g4;
|
||||
static $js = true;
|
||||
|
||||
$html = "";
|
||||
if ($js) {
|
||||
$html .= PHP_EOL.'<script src="'.G4_CKEDITOR_URL.'/ckeditor.js"></script>';
|
||||
$html .= PHP_EOL.'<script>var g4_ckeditor_url = "'.G4_CKEDITOR_URL.'";</script>';
|
||||
$html .= PHP_EOL.'<script src="'.G4_CKEDITOR_URL.'/config.js"></script>';
|
||||
$html .= "\n".'<script src="'.G4_CKEDITOR_URL.'/ckeditor.js"></script>';
|
||||
$html .= "\n".'<script>var g4_ckeditor_url = "'.G4_CKEDITOR_URL.'";</script>';
|
||||
$html .= "\n".'<script src="'.G4_CKEDITOR_URL.'/config.js"></script>';
|
||||
$js = false;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ function editor_html($id, $content, $ckeditor=true, $class="")
|
||||
|
||||
|
||||
// textarea 로 값을 넘긴다. javascript 반드시 필요
|
||||
function get_editor_js($id, $ckeditor=true)
|
||||
function get_editor_js($id, $ckeditor=true)
|
||||
{
|
||||
if ( $ckeditor ) {
|
||||
return "var {$id}_editor_data = CKEDITOR.instances.{$id}.getData();\n";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
class gcaptcha
|
||||
class gcaptcha
|
||||
{
|
||||
// 이미지크기 폭
|
||||
var $width = 70;
|
||||
@ -77,13 +77,13 @@ class gcaptcha
|
||||
return mt_rand($from, $to);
|
||||
}
|
||||
|
||||
function run()
|
||||
function run()
|
||||
{
|
||||
global $g4;
|
||||
|
||||
// The text to draw
|
||||
$captcha_key = $this->get_captcha_key();
|
||||
|
||||
|
||||
set_session('ss_captcha_cnt', 0);
|
||||
set_session('ss_captcha_key', $captcha_key);
|
||||
|
||||
@ -125,7 +125,7 @@ class gcaptcha
|
||||
imagejpeg($im, G4_DATA_PATH.'/cache/'.$this->captcha_filename.'.jpg');
|
||||
imagedestroy($im);
|
||||
|
||||
$this->make_wav($this->captcha_filename.'.wav');
|
||||
$this->make_wav($this->captcha_filename.'.wav');
|
||||
}
|
||||
|
||||
function get_captcha_filename()
|
||||
@ -152,7 +152,7 @@ class gcaptcha
|
||||
}
|
||||
|
||||
/*
|
||||
사용법 :
|
||||
사용법 :
|
||||
$gcaptcha = new gcaptcha();
|
||||
$gcaptcha->set_captcha_length(mt_rand(4, 6));
|
||||
$gcaptcha->set_position(mt_rand(0, 10), mt_rand(15, 20));
|
||||
@ -172,15 +172,16 @@ 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';
|
||||
|
||||
$html .= PHP_EOL.'<script>var g4_gcaptcha_url = "'.G4_GCAPTCHA_URL.'";</script>';
|
||||
$html .= PHP_EOL.'<script src="'.G4_GCAPTCHA_URL.'/gcaptcha.js"></script>';
|
||||
$html .= "\n".'<script>var g4_gcaptcha_url = "'.G4_GCAPTCHA_URL.'";</script>';
|
||||
$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');
|
||||
?>
|
||||
@ -5,16 +5,16 @@ include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
if ($is_guest)
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
|
||||
if (!$member['mb_open'] && $is_admin != 'super' && $member['mb_id'] != $mb_id)
|
||||
alert_close("자신의 정보를 공개하지 않으면 다른분에게 쪽지를 보낼 수 없습니다. 정보공개 설정은 회원정보수정에서 하실 수 있습니다.");
|
||||
|
||||
$content = "";
|
||||
// 탈퇴한 회원에게 쪽지 보낼 수 없음
|
||||
if ($me_recv_mb_id)
|
||||
if ($me_recv_mb_id)
|
||||
{
|
||||
$mb = get_member($me_recv_mb_id);
|
||||
if (!$mb['mb_id'])
|
||||
alert_close('회원정보가 존재하지 않습니다.'.PHP_EOL.PHP_EOL.'탈퇴하였을 수 있습니다.');
|
||||
alert_close('회원정보가 존재하지 않습니다.\\n\\n탈퇴하였을 수 있습니다.');
|
||||
|
||||
if (!$mb['mb_open'] && $is_admin != 'super')
|
||||
alert_close('정보공개를 하지 않았습니다.');
|
||||
@ -23,10 +23,10 @@ if ($me_recv_mb_id)
|
||||
$row = sql_fetch(" select me_memo from {$g4['memo_table']} where me_id = '{$me_id}' and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ");
|
||||
if ($row['me_memo'])
|
||||
{
|
||||
$content = PHP_EOL.PHP_EOL.PHP_EOL.' >'
|
||||
.PHP_EOL.' >'
|
||||
.PHP_EOL.' >'.preg_replace("/\n/", "\n> ", get_text($row[me_memo], 0))
|
||||
.PHP_EOL.' >'
|
||||
$content = "\n\n\n".' >'
|
||||
."\n".' >'
|
||||
."\n".' >'.preg_replace("/\n/", "\n> ", get_text($row['me_memo'], 0))
|
||||
."\n".' >'
|
||||
.' >';
|
||||
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ while ($row = sql_fetch_array($result))
|
||||
{
|
||||
$nick = cut_str($member['mb_nick'], $config['cf_cut_name']);
|
||||
if (!$row2['wr_is_comment'] && $config['cf_use_copy_log'])
|
||||
$row2['wr_content'] .= PHP_EOL.'<div class="content_'.$sw.'">[이 게시물은 '.$nick.'님에 의해 '.G4_TIME_YMDHIS.' '.$board['bo_subject'].'에서 '.($sw == 'copy' ? '복사' : '이동').' 됨]</div>';
|
||||
$row2['wr_content'] .= "\n".'<div class="content_'.$sw.'">[이 게시물은 '.$nick.'님에 의해 '.G4_TIME_YMDHIS.' '.$board['bo_subject'].'에서 '.($sw == 'copy' ? '복사' : '이동').' 됨]</div>';
|
||||
|
||||
$sql = " insert into $move_write_table
|
||||
set wr_num = '$next_wr_num',
|
||||
|
||||
@ -114,7 +114,7 @@ else
|
||||
include_once($board_skin_path.'/view_comment.skin.php');
|
||||
|
||||
if (!$member['mb_id']) // 비회원일 경우에만
|
||||
echo '<script src="'.G4_JS_URL.'/md5.js"></script>'.PHP_EOL;
|
||||
echo '<script src="'.G4_JS_URL.'/md5.js"></script>'."\n";
|
||||
|
||||
@include_once($board_skin_path.'/view_comment.tail.skin.php');
|
||||
?>
|
||||
@ -67,7 +67,7 @@ if ($w == 'c') // 댓글 입력
|
||||
{
|
||||
/*
|
||||
if ($member[mb_point] + $board[bo_comment_point] < 0 && !$is_admin)
|
||||
alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 댓글쓰기('.number_format($board[bo_comment_point]).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 적립하신 후 다시 댓글를 써 주십시오.');
|
||||
alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 댓글쓰기('.number_format($board[bo_comment_point]).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 댓글를 써 주십시오.');
|
||||
*/
|
||||
// 댓글쓰기 포인트설정시 회원의 포인트가 음수인 경우 댓글를 쓰지 못하던 버그를 수정 (곱슬최씨님)
|
||||
$tmp_point = ($member['mb_point'] > 0) ? $member['mb_point'] : 0;
|
||||
|
||||
@ -349,7 +349,7 @@ if ($w == '' || $w == 'r') {
|
||||
// 쓰기 포인트 부여
|
||||
if ($w == '') {
|
||||
if ($notice) {
|
||||
$bo_notice = $wr_id.PHP_EOL.$board['bo_notice'];
|
||||
$bo_notice = $wr_id."\n".$board['bo_notice'];
|
||||
sql_query(" update {$g4['board_table']} set bo_notice = '{$bo_notice}' where bo_table = '{$bo_table}' ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user