Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -10,6 +10,8 @@ if (!count($_POST['chk'])) {
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
if ($_POST['act_button'] == "선택수정") {
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
|
||||
@ -4,6 +4,8 @@ include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$po_id = isset($po_id) ? (int) $po_id : 0;
|
||||
|
||||
$html_title = '투표';
|
||||
if ($w == '')
|
||||
$html_title .= ' 생성';
|
||||
|
||||
@ -10,9 +10,9 @@ if ($w == 'u') // 업데이트
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$fg_no = $_POST['fg_no'][$k];
|
||||
$fg_name = $_POST['fg_name'][$k];
|
||||
$fg_member = $_POST['fg_member'][$k];
|
||||
$fg_no = (int) $_POST['fg_no'][$k];
|
||||
$fg_name = strip_tags($_POST['fg_name'][$k]);
|
||||
$fg_member = strip_tags($_POST['fg_member'][$k]);
|
||||
|
||||
if (!is_numeric($fg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@ -38,7 +38,7 @@ else if ($w == 'de') // 그룹삭제
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$fg_no = $_POST['fg_no'][$k];
|
||||
$fg_no = (int) $_POST['fg_no'][$k];
|
||||
|
||||
if (!is_numeric($fg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@ -57,7 +57,7 @@ else if ($w == 'em')
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$fg_no = $_POST['fg_no'][$k];
|
||||
$fg_no = (int) $_POST['fg_no'][$k];
|
||||
|
||||
if ($fg_no == 'no') $fg_no = 0;
|
||||
|
||||
@ -71,6 +71,8 @@ else if ($w == 'no')
|
||||
{
|
||||
if ($fg_no == 'no') $fg_no = 0;
|
||||
|
||||
$fg_no = (int) $fg_no;
|
||||
|
||||
if ($fg_no)
|
||||
sql_query("update {$g5['sms5_form_group_table']} set fg_count = 0 where fg_no = '$fg_no'");
|
||||
|
||||
@ -81,6 +83,8 @@ else // 등록
|
||||
if (!strlen(trim($fg_name)))
|
||||
alert('그룹명을 입력해주세요');
|
||||
|
||||
$fg_name = strip_tags($fg_name);
|
||||
|
||||
$res = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_name = '$fg_name'");
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
@ -4,6 +4,9 @@ include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$fo_name = isset($fo_name) ? strip_tags($fo_name) : '';
|
||||
$fo_content = isset($fo_content) ? strip_tags($fo_content) : '';
|
||||
|
||||
$g5['title'] = "이모티콘 업데이트";
|
||||
|
||||
if ($w == 'u') // 업데이트
|
||||
|
||||
@ -10,8 +10,8 @@ if ($w == 'u') // 업데이트
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$bg_no = $_POST['bg_no'][$k];
|
||||
$bg_name = $_POST['bg_name'][$k];
|
||||
$bg_no = (int) $_POST['bg_no'][$k];
|
||||
$bg_name = strip_tags($_POST['bg_name'][$k]);
|
||||
|
||||
if (!is_numeric($bg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@ -36,7 +36,7 @@ else if ($w == 'de') // 그룹삭제
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$bg_no = $_POST['bg_no'][$k];
|
||||
$bg_no = (int) $_POST['bg_no'][$k];
|
||||
|
||||
if (!is_numeric($bg_no))
|
||||
alert('그룹 고유번호가 없습니다.');
|
||||
@ -55,7 +55,7 @@ else if ($w == 'em') // 비우기
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$bg_no = $_POST['bg_no'][$k];
|
||||
$bg_no = (int) $_POST['bg_no'][$k];
|
||||
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_count = 0, bg_member = 0, bg_nomember = 0, bg_receipt = 0, bg_reject = 0 where bg_no='$bg_no'");
|
||||
sql_query("delete from {$g5['sms5_book_table']} where bg_no='$bg_no'");
|
||||
@ -63,6 +63,8 @@ else if ($w == 'em') // 비우기
|
||||
}
|
||||
else // 등록
|
||||
{
|
||||
$bg_name = strip_tags($bg_name);
|
||||
|
||||
if (!strlen(trim($bg_name)))
|
||||
alert('그룹명을 입력해주세요');
|
||||
|
||||
|
||||
@ -11,7 +11,10 @@ set_cookie('ck_auto', '', 0);
|
||||
// 자동로그인 해제 end --------------------------------
|
||||
|
||||
if ($url) {
|
||||
$p = @parse_url($url);
|
||||
if ( substr($url, 0, 2) == '//' )
|
||||
$url = 'http:' . $url;
|
||||
|
||||
$p = @parse_url(urldecode($url));
|
||||
if ($p['scheme'] || $p['host']) {
|
||||
alert('url에 도메인을 지정할 수 없습니다.');
|
||||
}
|
||||
|
||||
@ -4,6 +4,8 @@ include_once('./_common.php');
|
||||
if ($is_guest)
|
||||
alert_close('회원만 이용하실 수 있습니다.');
|
||||
|
||||
set_session('ss_memo_delete_token', $token = uniqid(time()));
|
||||
|
||||
$g5['title'] = '내 쪽지함';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
@ -65,7 +67,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
$list[$i]['send_datetime'] = $send_datetime;
|
||||
$list[$i]['read_datetime'] = $read_datetime;
|
||||
$list[$i]['view_href'] = './memo_view.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&kind='.$kind;
|
||||
$list[$i]['del_href'] = './memo_delete.php?me_id='.$row['me_id'].'&token='.$token.'&kind='.$kind;
|
||||
}
|
||||
|
||||
include_once($member_skin_path.'/memo.skin.php');
|
||||
|
||||
@ -4,6 +4,12 @@ include_once('./_common.php');
|
||||
if (!$is_member)
|
||||
alert('회원만 이용하실 수 있습니다.');
|
||||
|
||||
$delete_token = get_session('ss_memo_delete_token');
|
||||
set_session('ss_memo_delete_token', '');
|
||||
|
||||
if (!($token && $delete_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
$me_id = (int)$_REQUEST['me_id'];
|
||||
|
||||
$sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
|
||||
|
||||
@ -4,6 +4,12 @@ include_once('./_common.php');
|
||||
if($is_guest)
|
||||
alert('회원이시라면 로그인 후 이용해 주십시오.', G5_URL);
|
||||
|
||||
$delete_token = get_session('ss_qa_delete_token');
|
||||
set_session('ss_qa_delete_token', '');
|
||||
|
||||
if (!($token && $delete_token == $token))
|
||||
alert('토큰 에러로 삭제 불가합니다.');
|
||||
|
||||
$tmp_array = array();
|
||||
if ($qa_id) // 건별삭제
|
||||
$tmp_array[0] = $qa_id;
|
||||
|
||||
@ -109,7 +109,8 @@ if(is_file($skin_file)) {
|
||||
*/
|
||||
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;
|
||||
set_session('ss_qa_delete_token', $token = uniqid(time()));
|
||||
$delete_href = G5_BBS_URL.'/qadelete.php?qa_id='.$view['qa_id'].'&token='.$token.$qstr;
|
||||
}
|
||||
|
||||
// 질문글이고 등록된 답변이 있다면
|
||||
|
||||
@ -200,7 +200,7 @@ for ($i=1; $i<=count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['filesize'] = $filesize;
|
||||
|
||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
|
||||
shuffle($chars_array);
|
||||
$shuffle = implode('', $chars_array);
|
||||
|
||||
@ -524,7 +524,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['filesize'] = $filesize;
|
||||
|
||||
// 아래의 문자열이 들어간 파일은 -x 를 붙여서 웹경로를 알더라도 실행을 하지 못하도록 함
|
||||
$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
$filename = preg_replace("/\.(php|pht|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
|
||||
|
||||
shuffle($chars_array);
|
||||
$shuffle = implode('', $chars_array);
|
||||
|
||||
@ -592,7 +592,7 @@ fclose($f);
|
||||
// data 디렉토리 및 하위 디렉토리에서는 .htaccess .htpasswd .php .phtml .html .htm .inc .cgi .pl 파일을 실행할수 없게함.
|
||||
$f = fopen($data_path.'/.htaccess', 'w');
|
||||
$str = <<<EOD
|
||||
<FilesMatch "\.(htaccess|htpasswd|[Pp][Hh][Pp]|[Pp]?[Hh][Tt][Mm][Ll]?|[Ii][Nn][Cc]|[Cc][Gg][Ii]|[Pp][Ll])">
|
||||
<FilesMatch "\.(htaccess|htpasswd|[Pp][Hh][Pp]|[Pp][Hh][Tt]|[Pp]?[Hh][Tt][Mm][Ll]?|[Ii][Nn][Cc]|[Cc][Gg][Ii]|[Pp][Ll])">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
@ -2967,9 +2967,13 @@ function replace_filename($name)
|
||||
@session_start();
|
||||
$ss_id = session_id();
|
||||
$usec = get_microtime();
|
||||
$ext = array_pop(explode('.', $name));
|
||||
$file_path = pathinfo($name);
|
||||
$ext = $file_path['extension'];
|
||||
$return_filename = sha1($ss_id.$_SERVER['REMOTE_ADDR'].$usec);
|
||||
if( $ext )
|
||||
$return_filename .= '.'.$ext;
|
||||
|
||||
return sha1($ss_id.$_SERVER['REMOTE_ADDR'].$usec).'.'.$ext;
|
||||
return $return_filename;
|
||||
}
|
||||
|
||||
// 아이코드 사용자정보
|
||||
|
||||
Reference in New Issue
Block a user