113 lines
2.8 KiB
PHP
113 lines
2.8 KiB
PHP
<?
|
|
include $_SERVER[DOCUMENT_ROOT] . "/backoffice/header.php";
|
|
if(!in_array("admin_manage",$_SESSION[$_SITE["DOMAIN"]]["ADMIN"]["AUTH"]) && $_SESSION[$_SITE["DOMAIN"]]["ADMIN"]["GRADE"]!="ROOT"):
|
|
jsMsg("권한이 없습니다.");
|
|
jsHistory("-1");
|
|
endif;
|
|
|
|
//DB연결
|
|
$dblink = SetConn($_conf_db["main_db"]);
|
|
/*
|
|
$arrInfo = getArticleInfo($GLOBALS["_conf_tbl"]["admin"], $idx);
|
|
|
|
$arrAuth = explode(",",str_replace(" ","",$arrInfo["list"][0][a_auth]));
|
|
*/
|
|
|
|
$arrList = getAdminMenu1();
|
|
//DB해제
|
|
SetDisConn($dblink);
|
|
?>
|
|
<script type="text/javascript">
|
|
function checkForm(frm){
|
|
//var isSeasonChk = false;
|
|
var arr_Auth = document.getElementsByName("a_auth[]");
|
|
var auth_var = "";
|
|
for(var i=0;i<arr_Auth.length;i++){
|
|
if(arr_Auth[i].checked == true) {
|
|
//alert(arr_Auth[i].value);
|
|
auth_var += arr_Auth[i].value;
|
|
if(i<(arr_Auth.length-1)){
|
|
auth_var += ",";
|
|
}
|
|
}
|
|
|
|
}
|
|
//alert(auth_var);
|
|
//return false;
|
|
}
|
|
|
|
function checkForm1(type){
|
|
var frm = document.frmOpenInfo;
|
|
if(type=="1"){
|
|
frm.evnType.value="1";
|
|
}else{
|
|
frm.evnType.value="2";
|
|
}
|
|
|
|
frm.submit();
|
|
}
|
|
|
|
function changeType(type){
|
|
var arr_Auth = document.getElementsByName("a_auth[]");
|
|
var auth_var = "";
|
|
for(var i=0;i<arr_Auth.length;i++){
|
|
arr_Auth[i].checked = false;
|
|
}
|
|
if(type=="1"){
|
|
arr_Auth[2].checked = true;
|
|
}else if(type=="2"){
|
|
arr_Auth[2].checked = true;
|
|
arr_Auth[12].checked = true;
|
|
}else if(type=="3"){
|
|
arr_Auth[2].checked = true;
|
|
arr_Auth[7].checked = true;
|
|
arr_Auth[16].checked = true;
|
|
}else if(type=="4"){
|
|
arr_Auth[2].checked = true;
|
|
arr_Auth[7].checked = true;
|
|
arr_Auth[12].checked = true;
|
|
arr_Auth[16].checked = true;
|
|
}else if(type=="5"){
|
|
arr_Auth[2].checked = true;
|
|
arr_Auth[7].checked = true;
|
|
arr_Auth[9].checked = true;
|
|
arr_Auth[10].checked = true;
|
|
arr_Auth[11].checked = true;
|
|
arr_Auth[19].checked = true;
|
|
}else if(type=="6"){
|
|
arr_Auth[2].checked = true;
|
|
arr_Auth[7].checked = true;
|
|
arr_Auth[9].checked = true;
|
|
arr_Auth[10].checked = true;
|
|
arr_Auth[11].checked = true;
|
|
arr_Auth[12].checked = true;
|
|
arr_Auth[19].checked = true;
|
|
}
|
|
arr_Auth[3].checked = true;
|
|
arr_Auth[15].checked = true;
|
|
arr_Auth[18].checked = true;
|
|
}
|
|
</script>
|
|
<div id="admin-container">
|
|
<? include "menu.php"; ?>
|
|
<div id="admin-content">
|
|
<h2 class="admin-title">관리자 관리</h2>
|
|
<h3 class="admin-title-middle">SQL문</h3>
|
|
<?
|
|
for($i=$_GET[column_enum];$i>=$_GET[column_snum];$i--){
|
|
echo "alter table ".$_GET[tbl_id]." add column etc_".$i." varchar(255) not null after serial;</br>";
|
|
}
|
|
?>
|
|
<br />
|
|
<h3 class="admin-title-middle">PHP수정</h3>
|
|
<?
|
|
for($i=$_GET[column_snum];$i<=$_GET[column_enum];$i++){
|
|
echo "etc_$i = '\".mysql_real_escape_string(\$_POST[etc_$i]).\"',</br>";
|
|
}
|
|
?>
|
|
<br />
|
|
</div>
|
|
</div>
|
|
<?
|
|
include $_SERVER[DOCUMENT_ROOT] . "/backoffice/footer.php";
|
|
?>
|