alert_close 함수 수정
This commit is contained in:
@ -2,12 +2,15 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$_POST['po_id']}' ");
|
||||
if (!$po['po_id'])
|
||||
if (!$po['po_id'])
|
||||
alert('po_id 값이 제대로 넘어오지 않았습니다.');
|
||||
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
alert_close('권한 '.$po['po_level'].' 이상 회원만 투표에 참여하실 수 있습니다.');
|
||||
|
||||
if(!$gb_poll)
|
||||
alert_close('항목을 선택하세요.');
|
||||
|
||||
// 쿠키에 저장된 투표번호가 없다면
|
||||
if (get_cookie('ck_po_id') != $po['po_id']) {
|
||||
// 투표했던 ip들 중에서 찾아본다
|
||||
|
||||
@ -142,13 +142,21 @@ function alert($msg='', $url='', $error=true)
|
||||
|
||||
|
||||
// 경고메세지 출력후 창을 닫음
|
||||
function alert_close($msg)
|
||||
function alert_close($msg, $error=true)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
/*
|
||||
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset={$g4['charset']}\">";
|
||||
echo "<script> alert('$msg'); window.close(); </script>";
|
||||
exit;
|
||||
*/
|
||||
$header = '';
|
||||
if (isset($g4['title'])) {
|
||||
$header = $g4['title'];
|
||||
}
|
||||
include_once("{$g4['bbs_path']}/alert_close.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// confirm 창
|
||||
|
||||
Reference in New Issue
Block a user