Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -55,11 +55,6 @@ include_once('./admin.head.php');
|
|||||||
$colspan = 5;
|
$colspan = 5;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
|
||||||
var list_update_php = '';
|
|
||||||
var list_delete_php = 'auth_list_delete.php';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<form id="fsearch" name="fsearch" method="get">
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
<input type="hidden" id="sfl" name="sfl" value="a.mb_id">
|
<input type="hidden" id="sfl" name="sfl" value="a.mb_id">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
@ -77,7 +72,7 @@ var list_delete_php = 'auth_list_delete.php';
|
|||||||
<h2>설정된 관리권한 내역</h2>
|
<h2>설정된 관리권한 내역</h2>
|
||||||
<p>권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.</p>
|
<p>권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.</p>
|
||||||
|
|
||||||
<form id="fauthlist" name="fauthlist" method="post">
|
<form id="fauthlist" name="fauthlist" method="post" action="./auth_list_delete.php">
|
||||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||||
@ -142,8 +137,8 @@ var list_delete_php = 'auth_list_delete.php';
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
if (isset($stx))
|
//if (isset($stx))
|
||||||
echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'.PHP_EOL;
|
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'.PHP_EOL;
|
||||||
|
|
||||||
if (strstr($sfl, 'mb_id'))
|
if (strstr($sfl, 'mb_id'))
|
||||||
$mb_id = $stx;
|
$mb_id = $stx;
|
||||||
@ -153,7 +148,7 @@ var list_delete_php = 'auth_list_delete.php';
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<form id="fauthlist2" name="fauthlist2" method="post" onsubmit="return fauthlist2_submit(this);" autocomplete="off">
|
<form id="fauthlist2" name="fauthlist2" method="post" action="./auth_update.php" autocomplete="off">
|
||||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||||
@ -192,11 +187,18 @@ var list_delete_php = 'auth_list_delete.php';
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fauthlist2_submit(f)
|
$(function() {
|
||||||
{
|
$('#fauthlist').submit(function() {
|
||||||
f.action = "./auth_update.php";
|
var cnt = $('input[name^=chk]:checked').length;
|
||||||
return true;
|
|
||||||
}
|
if(cnt < 1) {
|
||||||
|
alert('삭제할 권한 내역을 1개 이상 선택해 주세요.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
|||||||
@ -21,8 +21,8 @@ $sql = " insert into {$g4['auth_table']}
|
|||||||
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
||||||
$result = sql_query($sql, FALSE);
|
$result = sql_query($sql, FALSE);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$sql = " update $g4['auth_table']
|
$sql = " update {$g4['auth_table']}
|
||||||
set au_auth = '{$_POST[r]},{$_POST['w']},{$_POST['d']}'
|
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
|
||||||
where mb_id = '{$_POST['mb_id']}'
|
where mb_id = '{$_POST['mb_id']}'
|
||||||
and au_menu = '{$_POST['au_menu']}' ";
|
and au_menu = '{$_POST['au_menu']}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?
|
<?
|
||||||
$sub_menu = '300100';
|
$sub_menu = '300100';
|
||||||
define('G4_CAPTCHA', 1);
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
@ -106,11 +106,11 @@ $sql = " insert into {$g4['board_table']}
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
// 게시판 폴더 생성
|
// 게시판 폴더 생성
|
||||||
@mkdir($g4['path'].'/data/file/'.$target_table, 0707);
|
@mkdir(G4_DATA_PATH.'/file/'.$target_table, 0707);
|
||||||
@chmod($g4['path'].'/data/file/'.$target_table, 0707);
|
@chmod(G4_DATA_PATH.'/file/'.$target_table, 0707);
|
||||||
|
|
||||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||||
$board_path = $g4['path'].'/data/file/'.$target_table;
|
$board_path = G4_DATA_PATH.'/file/'.$target_table;
|
||||||
$file = $board_path . '/index.php';
|
$file = $board_path . '/index.php';
|
||||||
$f = @fopen($file, 'w');
|
$f = @fopen($file, 'w');
|
||||||
@fwrite($f, '');
|
@fwrite($f, '');
|
||||||
@ -119,26 +119,26 @@ $f = @fopen($file, 'w');
|
|||||||
|
|
||||||
$copy_file = 0;
|
$copy_file = 0;
|
||||||
if ($copy_case == 'schema_data_both') {
|
if ($copy_case == 'schema_data_both') {
|
||||||
$d = dir($g4['path'].'/data/file/'.$bo_table);
|
$d = dir(G4_DATA_PATH.'/file/'.$bo_table);
|
||||||
while ($entry = $d->read()) {
|
while ($entry = $d->read()) {
|
||||||
if ($entry == '.' || $entry == '..') continue;
|
if ($entry == '.' || $entry == '..') continue;
|
||||||
|
|
||||||
// 김선용 201007 :
|
// 김선용 201007 :
|
||||||
if(is_dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry)){
|
if(is_dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||||
$dd = dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry);
|
$dd = dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||||
@mkdir($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
@mkdir(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||||
@chmod($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||||
while ($entry2 = $dd->read()) {
|
while ($entry2 = $dd->read()) {
|
||||||
if ($entry2 == '.' || $entry2 == '..') continue;
|
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||||
@copy($g4['path'].'/data/file/'.$bo_table.'/'.$entry.'/'.$entry2, $g4['path'].'/data/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
@copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||||
@chmod($g4['path'].'/data/file/'.$target_table.'/'.$entry.'/'.$entry2, 0707);
|
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, 0707);
|
||||||
$copy_file++;
|
$copy_file++;
|
||||||
}
|
}
|
||||||
$dd->close();
|
$dd->close();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@copy($g4['path'].'/data/file/'.$bo_table.'/'.$entry, $g4['path'].'/data/file/'.$target_table.'/'.$entry);
|
@copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||||
@chmod($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||||
$copy_file++;
|
$copy_file++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user