Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -38,7 +38,7 @@ include_once('./admin.head.php');
|
||||
<tr>
|
||||
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?=help('{이름} , {별명} , {회원아이디} , {이메일} , {생일} 처럼 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.')?>
|
||||
<?=help('{이름} , {별명} , {회원아이디} , {이메일} 처럼 HTML 코드에 삽입하면 해당 내용에 맞게 변환하여 메일 발송합니다.')?>
|
||||
<?=textarea_size('ma_content')?>
|
||||
<textarea id="ma_content" name="ma_content" rows="20" class="required" required title="메일내용"><?=$ma['ma_content']?></textarea>
|
||||
</td>
|
||||
|
||||
@ -34,8 +34,6 @@ if (!isset($mb_id1)) $mb_id1 = 1;
|
||||
if (!isset($mb_level_from)) $mb_level_from = 1;
|
||||
if (!isset($mb_level_to)) $mb_level_to = 10;
|
||||
if (!isset($mb_mailling)) $mb_mailling = 1;
|
||||
if (!isset($mb_sex)) $mb_sex = 1;
|
||||
if (!isset($mb_area)) $mb_area = 1;
|
||||
|
||||
$g4['title'] = '회원메일발송';
|
||||
include_once('./admin.head.php');
|
||||
@ -59,58 +57,12 @@ include_once('./admin.head.php');
|
||||
<input type="radio" id="mb_id1_section" name="mb_id1" value="0" <?=!$mb_id1?"checked":"";?>> <label for="mb_id1_section">구간</label>
|
||||
<input type="text" id="mb_id1_from" name="mb_id1_from" value="<?=$mb_id1_from?>" title="시작구간"> 에서
|
||||
<input type="text" id="mb_id1_to" name="mb_id1_to" value="<?=$mb_id1_to?>" title="종료구간"> 까지
|
||||
|
||||
<script>document.onLoad=mb_id1_click(<?=(int)$mb_id1?>);</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_birth_from">생일</label></th>
|
||||
<td>
|
||||
<?=help('5월5일 인 경우, 0505 와 같이 입력 , 둘다 입력해야함')?>
|
||||
<input type="text" id="mb_birth_from" name="mb_birth_from" maxlength="4" value="<?=$mb_birth_from?>" title="생일구간 시작일" size="6"> 부터
|
||||
<input type="text" id="mb_birth_to" name="mb_birth_to" maxlength="4" value="<?=$mb_birth_to?>" title="생일구간 종료일" size="6"> 까지
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||
<td><input type="text" id="mb_email" name="mb_email" value="<?=$mb_email?>" size="50"> 단어 포함 (예 : @sir.co.kr)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_sex">성별</label></th>
|
||||
<td>
|
||||
<select id="mb_sex" name="mb_sex">
|
||||
<option value="">전체</option>
|
||||
<option value="F">여자</option>
|
||||
<option value="M">남자</option>
|
||||
</select>
|
||||
<script> document.getElementById('mb_sex').value = '<?=$mb_sex?>'; </script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_area">지역</label></th>
|
||||
<td>
|
||||
<select id="mb_area" name="mb_area">
|
||||
<option value="">전체</option>
|
||||
<option value="서울">서울</option>
|
||||
<option value="부산">부산</option>
|
||||
<option value="대구">대구</option>
|
||||
<option value="인천">인천</option>
|
||||
<option value="광주">광주</option>
|
||||
<option value="대전">대전</option>
|
||||
<option value="울산">울산</option>
|
||||
<option value="강원">강원</option>
|
||||
<option value="경기">경기</option>
|
||||
<option value="경남">경남</option>
|
||||
<option value="경북">경북</option>
|
||||
<option value="전남">전남</option>
|
||||
<option value="전북">전북</option>
|
||||
<option value="제주">제주</option>
|
||||
<option value="충남">충남</option>
|
||||
<option value="충북">충북</option>
|
||||
</select>
|
||||
<script> document.getElementById('mb_area').value = '<?=$mb_area?>'; </script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="mb_mailling">메일링</label></th>
|
||||
<td>
|
||||
|
||||
@ -19,18 +19,6 @@ if ($mb_id1 != 1)
|
||||
if ($mb_email != "")
|
||||
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
||||
|
||||
// 성별
|
||||
if ($mb_sex != "")
|
||||
$sql_where .= " and mb_sex = '{$mb_sex}' ";
|
||||
|
||||
// 생일
|
||||
if ($mb_birth_from && $mb_birth_to)
|
||||
$sql_where .= " and substring(mb_birth,5,4) between '{$mb_birth_from}' and '{$mb_birth_to}' ";
|
||||
|
||||
// 지역
|
||||
if ($mb_area != "")
|
||||
$sql_where .= " and mb_addr1 like '{$mb_area}%' ";
|
||||
|
||||
// 메일링
|
||||
if ($mb_mailling != "")
|
||||
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
||||
@ -39,14 +27,12 @@ if ($mb_mailling != "")
|
||||
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
||||
|
||||
// 게시판그룹회원
|
||||
if ($gr_id)
|
||||
{
|
||||
if ($gr_id) {
|
||||
$group_member = "";
|
||||
$comma = "";
|
||||
$sql2 = " select mb_id from {$g4['group_member_table']} where gr_id = '{$gr_id}' order by mb_id ";
|
||||
$result2 = sql_query($sql2);
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++)
|
||||
{
|
||||
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
||||
$comma = ",";
|
||||
}
|
||||
@ -71,10 +57,6 @@ $ma_last_option .= "mb_id1={$mb_id1}";
|
||||
$ma_last_option .= "||mb_id1_from={$mb_id1_from}";
|
||||
$ma_last_option .= "||mb_id1_to={$mb_id1_to}";
|
||||
$ma_last_option .= "||mb_email={$mb_email}";
|
||||
$ma_last_option .= "||mb_sex={$mb_sex}";
|
||||
$ma_last_option .= "||mb_birth_from={$mb_birth_from}";
|
||||
$ma_last_option .= "||mb_birth_to={$mb_birth_to}";
|
||||
$ma_last_option .= "||mb_area={$mb_area}";
|
||||
$ma_last_option .= "||mb_mailling={$mb_mailling}";
|
||||
$ma_last_option .= "||mb_level_from={$mb_level_from}";
|
||||
$ma_last_option .= "||mb_level_to={$mb_level_to}";
|
||||
@ -103,7 +85,7 @@ include_once('./admin.head.php');
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_birth, mb_datetime $sql_common $sql_where order by mb_id ";
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
|
||||
$result = sql_query($sql);
|
||||
$i=0;
|
||||
$ma_list = "";
|
||||
@ -111,7 +93,7 @@ $cr = "";
|
||||
while ($row=sql_fetch_array($result))
|
||||
{
|
||||
$i++;
|
||||
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_birth'] . "||" . $row['mb_datetime'];
|
||||
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
|
||||
$cr = PHP_EOL;
|
||||
?>
|
||||
<tr>
|
||||
|
||||
@ -47,7 +47,7 @@ $subject = $ma['ma_subject'];
|
||||
$cnt = 0;
|
||||
for ($i=0; $i<count($member_list); $i++)
|
||||
{
|
||||
list($email, $mb_id, $name, $nick, $birth, $datetime) = explode("||", trim($member_list[$i]));
|
||||
list($email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
||||
|
||||
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $email);
|
||||
// 올바른 메일 주소만
|
||||
@ -62,7 +62,6 @@ for ($i=0; $i<count($member_list); $i++)
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $email, $content);
|
||||
$content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content);
|
||||
|
||||
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='{$g4['url']}/{$g4['bbs']}/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ $name = $member['mb_name'];
|
||||
$nick = $member['mb_nick'];
|
||||
$mb_id = $member['mb_id'];
|
||||
$email = $member['mb_email'];
|
||||
$birth = $member['mb_birth'];
|
||||
|
||||
$sql = "select ma_subject, ma_content from {$g4['mail_table']} where ma_id = '{$ma_id}' ";
|
||||
$ma = sql_fetch($sql);
|
||||
@ -29,7 +28,6 @@ $content = preg_replace("/{이름}/", $name, $content);
|
||||
$content = preg_replace("/{별명}/", $nick, $content);
|
||||
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||
$content = preg_replace("/{이메일}/", $email, $content);
|
||||
$content = preg_replace("/{생일}/", (int)substr($birth,4,2).'월 '.(int)substr($birth,6,2).'일', $content);
|
||||
|
||||
$mb_md5 = md5($member['mb_id'].$member['mb_email'].$member['mb_datetime']);
|
||||
|
||||
|
||||
52
bbs/rss.php
52
bbs/rss.php
@ -13,63 +13,63 @@ function specialchars_replace($str, $len=0) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
$sql = " select gr_id, bo_subject, bo_page_rows, bo_read_level, bo_use_rss_view from {$g4[board_table]} where bo_table = '{$bo_table}' ";
|
||||
$sql = " select gr_id, bo_subject, bo_page_rows, bo_read_level, bo_use_rss_view from {$g4['board_table']} where bo_table = '$bo_table' ";
|
||||
$row = sql_fetch($sql);
|
||||
$subj2 = specialchars_replace($row[bo_subject], 255);
|
||||
$lines = $row[bo_page_rows];
|
||||
$subj2 = specialchars_replace($row['bo_subject'], 255);
|
||||
$lines = $row['bo_page_rows'];
|
||||
|
||||
// 비회원 읽기가 가능한 게시판만 RSS 지원
|
||||
if ($row[bo_read_level] >= 2) {
|
||||
if ($row['bo_read_level'] >= 2) {
|
||||
echo '비회원 읽기가 가능한 게시판만 RSS 지원합니다.';
|
||||
exit;
|
||||
}
|
||||
|
||||
// RSS 사용 체크
|
||||
if (!$row[bo_use_rss_view]) {
|
||||
if (!$row['bo_use_rss_view']) {
|
||||
echo 'RSS 보기가 금지되어 있습니다.';
|
||||
exit;
|
||||
}
|
||||
|
||||
Header("Content-type: text/xml");
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Pragma: no-cache");
|
||||
Header("Content-type: text/xml");
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Pragma: no-cache");
|
||||
|
||||
$sql = " select gr_subject from {$g4[group_table]} where gr_id = '{$row[gr_id]}' ";
|
||||
$sql = " select gr_subject from {$g4['group_table']} where gr_id = '{$row['gr_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
$subj1 = specialchars_replace($row[gr_subject], 255);
|
||||
?>
|
||||
$subj1 = specialchars_replace($row['gr_subject'], 255);
|
||||
|
||||
<?xml version="1.0" encoding="<?=$g4[charset]?>"?>
|
||||
echo '<?xml version="1.0" encoding="'.$g4['charset'].'"?>'."\n";
|
||||
?>
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title><?=specialchars_replace($config[cf_title].' > '.$subj1.' > '.$subj2)?></title>
|
||||
<link><?=specialchars_replace($g4[url].'/'.$g4[bbs].'/board.php?bo_table='.$bo_table)?></link>
|
||||
<title><?=specialchars_replace($config['cf_title'].' > '.$subj1.' > '.$subj2)?></title>
|
||||
<link><?=specialchars_replace($g4['url'].'/'.$g4['bbs'].'/board.php?bo_table='.$bo_table)?></link>
|
||||
<description>테스트 버전 0.2 (2004-04-26)</description>
|
||||
<language>ko</language>
|
||||
|
||||
<?
|
||||
$sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option
|
||||
from {$g4[write_prefix]}{$bo_table}
|
||||
where wr_is_comment = 0
|
||||
$sql = " select wr_id, wr_subject, wr_content, wr_name, wr_datetime, wr_option
|
||||
from {$g4['write_prefix']}$bo_table
|
||||
where wr_is_comment = 0
|
||||
and wr_option not like '%secret%'
|
||||
order by wr_num, wr_reply limit 0, {$lines} ";
|
||||
order by wr_num, wr_reply limit 0, $lines ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$file = '';
|
||||
|
||||
if (strstr($row[wr_option], 'html'))
|
||||
if (strstr($row['wr_option'], 'html'))
|
||||
$html = 1;
|
||||
else
|
||||
$html = 0;
|
||||
?>
|
||||
|
||||
<item>
|
||||
<title><?=specialchars_replace($row[wr_subject])?></title>
|
||||
<link><?=specialchars_replace($g4[url]/$g4[bbs]/board.php?bo_table=$bo_table&wr_id=$row[wr_id])?></link>
|
||||
<description><![CDATA[<?=$file?><?=conv_content($row[wr_content], $html)?>]]></description>
|
||||
<dc:creator><?=specialchars_replace($row[wr_name])?></dc:creator>
|
||||
<title><?=specialchars_replace($row['wr_subject'])?></title>
|
||||
<link><?=specialchars_replace($g4['url'].'/'.$g4[bbs].'/board.php?bo_table='.$bo_table.'&wr_id='.$row['wr_id'])?></link>
|
||||
<description><![CDATA[<?=$file?><?=conv_content($row['wr_content'], $html)?>]]></description>
|
||||
<dc:creator><?=specialchars_replace($row['wr_name'])?></dc:creator>
|
||||
<?
|
||||
$date = $row[wr_datetime];
|
||||
$date = $row['wr_datetime'];
|
||||
// rss 리더 스킨으로 호출하면 날짜가 제대로 표시되지 않음
|
||||
//$date = substr($date,0,10) . "T" . substr($date,11,8) . "+09:00";
|
||||
$date = date('r', strtotime($date));
|
||||
@ -80,6 +80,6 @@ $date = date('r', strtotime($date));
|
||||
<?
|
||||
}
|
||||
|
||||
echo '</channel>'.PHP_EOL;
|
||||
echo '</rss>'.PHP_EOL;
|
||||
echo '</channel>'."\n";
|
||||
echo '</rss>'."\n";
|
||||
?>
|
||||
28
js/wrest.js
28
js/wrest.js
@ -6,7 +6,29 @@ var wrestFldBackColor = "#ff3061";
|
||||
// subject 속성값을 얻어 return, 없으면 tag의 name을 넘김
|
||||
function wrestItemname(fld)
|
||||
{
|
||||
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
|
||||
//return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
|
||||
var id = fld.getAttribute("id");
|
||||
var labels = document.getElementsByTagName("label");
|
||||
var el = null;
|
||||
|
||||
for(i=0; i<labels.length; i++) {
|
||||
if(id == labels[i].htmlFor) {
|
||||
el = labels[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(el != null) {
|
||||
var text = el.innerHTML.replace(/[<].*[>].*[<]\/+.*[>]/gi, "");
|
||||
|
||||
if(text == '') {
|
||||
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
} else {
|
||||
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
|
||||
}
|
||||
}
|
||||
|
||||
// 양쪽 공백 없애기
|
||||
@ -257,7 +279,7 @@ function wrestSubmit()
|
||||
// 셀렉트 박스일때도 필수 선택 검사합니다. select-one
|
||||
if (el.type=="text" || el.type=="hidden" || el.type=="file" || el.type=="password" || el.type=="select-one" || el.type=="textarea") {
|
||||
if (el.getAttribute("required") != null) {
|
||||
wrestRequired(el);
|
||||
wrestRequired(el);
|
||||
}
|
||||
|
||||
var array_css = el.className.split(" "); // class 를 공백으로 나눔
|
||||
@ -331,7 +353,7 @@ function wrestInitialized()
|
||||
|
||||
for (var j = 0; j < document.forms[i].elements.length; j++) {
|
||||
// 필수 입력일 경우는 * 배경이미지를 준다.
|
||||
if (document.forms[i].elements[j].getAttribute("required") != null ||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user