notice 오류 해결중

This commit is contained in:
gnuboard
2013-01-09 18:12:31 +09:00
parent c439448eae
commit a618c65321
13 changed files with 45 additions and 82 deletions

View File

@ -1,9 +1,8 @@
<?
$sub_menu = "300100";
//define('_EDITOR_', true);
include_once('./_common.php');
if (isset($editor->lib)) include_once($editor->lib);
auth_check($auth[$sub_menu], 'w');
function b_draw($pos, $color='red') {
@ -818,31 +817,11 @@ function set_point(f) {
}
}
function chk_bo_image(fld)
{
if (fld.value) {
if (!fld.value.toLowerCase().match(/.(gif|jpg|png)$/i)) {
return "이미지가 gif, jpg, png 파일이 아닙니다.";
}
}
return "";
}
function fboardform_submit(f)
{
<?=editor_getdata("bo_content_head");?>
<?=editor_getdata("bo_content_tail");?>
if (msg = chk_bo_image(f.bo_image_head)) {
alert("상단 "+msg);
return false;
}
if (msg = chk_bo_image(f.bo_image_tail)) {
alert("하단 "+msg);
return false;
}
if (parseInt(f.bo_count_modify.value) < 1) {
alert("원글 수정 불가 댓글수는 1 이상 입력하셔야 합니다.");
f.bo_count_modify.focus();

View File

@ -4,8 +4,6 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'w');
$token = get_token();
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
$html_title = '게시판그룹';
@ -35,7 +33,6 @@ include_once('./admin.head.php');
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<table class="frm_tbl">
<caption>그룹 설정</caption>
<tbody>

View File

@ -14,11 +14,8 @@ if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $gr_id))
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
check_token();
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_admin = '{$_POST['gr_admin']}',
gr_use_access = '{$_POST['gr_use_access']}',
gr_admin = '{$_POST['gr_admin']}',
gr_1_subj = '{$_POST['gr_1_subj']}',
gr_2_subj = '{$_POST['gr_2_subj']}',
gr_3_subj = '{$_POST['gr_3_subj']}',
@ -39,9 +36,13 @@ $sql_common = " gr_subject = '{$_POST['gr_subject']}',
gr_8 = '{$_POST['gr_8']}',
gr_9 = '{$_POST['gr_9']}',
gr_10 = '{$_POST['gr_10']}' ";
if (isset($_POST['gr_use_access']))
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
else
$sql_common .= ", gr_use_access = '' ";
if ($w == '') {
if ($w == '')
{
$sql = " select count(*) as cnt from {$g4['group_table']} where gr_id = '{$_POST['gr_id']}' ";
$row = sql_fetch($sql);
if ($row['cnt'])
@ -51,16 +52,17 @@ if ($w == '')
set gr_id = '{$_POST['gr_id']}',
{$sql_common} ";
sql_query($sql);
}
else if ($w == "u")
{
} else if ($w == "u") {
$sql = " update {$g4['group_table']}
set {$sql_common}
where gr_id = '{$_POST['gr_id']}' ";
sql_query($sql);
}
else
} else {
alert('제대로 된 값이 넘어오지 않았습니다.');
}
goto_url('./boardgroup_form.php?w=u&amp;gr_id='.$gr_id.'&amp;'.$qstr);
?>

View File

@ -4,15 +4,13 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
$token = get_token();
$sql_common = " from {$g4['group_table']} ";
$sql_search = " where (1) ";
if ($is_admin != 'super')
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "gr_id" :
@ -95,7 +93,6 @@ var list_update_php = "./boardgroup_list_update.php";
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="token" value="<?=$token?>">
<table class="tbl_gr_list">
<caption>
게시판그룹 목록
@ -131,7 +128,6 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$s_upd = '<a href="./boardgroup_form.php?$qstr&amp;w=u&amp;gr_id='.$row['gr_id'].'">수정</a>';
$s_del = '';
if ($is_admin == 'super') {
//$s_del = '<a href="javascript:del(\'./boardgroup_delete.php?$qstr&gr_id='.$row['gr_id'].'\');">삭제</a>';
$s_del = '<a href="javascript:post_delete(\'boardgroup_delete.php\', \''.$row['gr_id'].'\');">삭제</a>';
}
?>

View File

@ -6,17 +6,15 @@ check_demo();
auth_check($auth[$sub_menu], 'w');
check_token();
for ($i=0; $i<count($chk); $i++)
for ($i=0; $i<count($_POST['chk']); $i++)
{
// 실제 번호를 넘김
$k = $chk[$i];
$k = $_POST['chk'][$i];
$sql = " update {$g4['group_table']}
set gr_subject = '{$_POST['gr_subject'][$k]}',
gr_admin = '{$_POST['gr_admin'][$k]}',
gr_use_access = '{$_POST[gr_use_access][$k]}'
gr_use_access = '{$_POST['gr_use_access'][$k]}'
where gr_id = '{$_POST['gr_id'][$k]}' ";
if ($is_admin != 'super')
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";

View File

@ -5,7 +5,7 @@ include_once('./_common.php');
auth_check($auth[$sub_menu], 'r');
// 체크된 자료 삭제
if (is_array($_POST['chk'])) {
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
for ($i=0; $i<count($chk); $i++) {
// 실제 번호를 넘김
$k = $chk[$i];
@ -17,7 +17,7 @@ if (is_array($_POST['chk'])) {
$sql_common = " from {$g4['popular_table']} a ";
$sql_search = " where (1) ";
if (isset($stx)) {
if ($stx) {
$sql_search .= " and ( ";
switch ($sfl) {
case "pp_word" :
@ -138,7 +138,7 @@ if ($i == 0)
<?}?>
<?
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<div class="pg">
<?=$pagelist?>

View File

@ -34,7 +34,9 @@ $sql = " select pp_word, count(*) as cnt
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
if ($_GET['fr_date'] || $_GET['to_date']) $listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$listall = '';
if (!empty($_GET['fr_date']) || !empty($_GET['to_date']))
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$g4['title'] = '인기검색어순위';
include_once('./admin.head.php');
@ -95,7 +97,7 @@ if ($i == 0)
</table>
<?
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER['PHP_SELF']?$qstr&amp;page=");
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<div class="pg">
<?=$pagelist?>