/home/mjc1/public_html/j3demo/adm/auth_reg.inc.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
$dir 
".";
include_once(
$dir."/_common.php");
include(
$j3_adm_path."/admin.menu.php");

$sql "select code,name,login_id from employees a where login_id <> '' "// 관리자 가져옴
$res mysql_query($sql,$connect_j3);
while(
$info mysql_fetch_array($res)){
    
$emp_array[] = $info;
}

foreach(
$menu1_array as $key=>$cate1){
    foreach(
$cate1[4] as $key=>$cate2){
        
$auth_array[] = array($cate2['0'],$cate2['0']." ".$cate2['1']);
    }
}

?>
<style>
    .cust_modal1, 
    .cust_modal2 { border:0px solid #e1e1e1; width:700px; padding:10px; font-size:13px }
    .cust_modal1 h4, 
    .cust_modal2 h4 { position:relative; top:-5px; font-size:14px; font-weight:bold; }
    .cust_modal2 { margin-top:0px; }
    .table-top-border tbody { border-top:1px solid #e1e1e1;}
    .cust_modal1 table tbody td,
    .cust_modal2 table tbody td { text-align:left; padding-left:5px;  }
    .cust_modal1 table tbody td input,
    .cust_modal2 table tbody td input{ border:1px solid #e9e9e9;  }
    .input_readonly {background:#E9E9E9; }
    .width_500 { width:500px !important; }
    .width_80 { width:80px !important; }
    .width_120 { width:120px !important; }
</style>
<form name='auth_reg_form' method='post' action=''>
<input type='hidden' name='qstr' value=''>
<input type='hidden' name='code' value='<?php echo $cinfo['code'];?>'>
<input type='hidden' name='pcode' value='<?php echo $pcode;?>'>

<div class='cust_modal1'>
    <h4>기본정보</h4>
    <table class="order-sheet table-top-border">
        <caption class="screen_out">기본정보</caption>
        <colgroup>
            <col style="width:100px;"><col style="width:200px;">
            <col style="width:100px;"><col style="width:200px;">
        </colgroup>

        <tbody>
        <tr>
            <th>관리자 선택</th>
            <td colspan=3>
                <select name='ecode' style='width:150px;'>
<?php
    
foreach($emp_array as $key=>$val){
        echo    
"    <option value='{$val['code']}'>{$val['login_id']} {$val['name']}</option>";
    }
?>
                </select>
            </td>
        </tr>
        <tr>
            <th>접근가능메뉴</th>
            <td colspan=3>
                <select name='auth_list[]' multiple='multiple' style='width:250px;height:200px;'>
<?php
    
foreach($auth_array as $key=>$val){
        echo    
"    <option value='{$val[0]}'>{$val[1]}</option>";
    }
?>
                </select><br>
                <span class='help_info' style='line-height:15px;display:inline-block;'>
                    shift + click : 범위 선택<br>
                    ctrl + click : 개별 선택<br>
                    이미 적용된메뉴는 권한지정이 수정되어 적용되며, 권한 삭제는 리스트에서 삭제 처리함 
                </span>
            </td>
        </tr>
        <tr class='screen_out'>
            <th>권한지정</th>
            <td colspan=3>
                <input type='checkbox' name='au_auth1' value='r'> 읽기(보기)
                &nbsp;
                <input type='checkbox' name='au_auth2' value='w'> 쓰기(추가/수정)
                &nbsp;
                <input type='checkbox' name='au_auth3' value='d'> 삭제
                &nbsp;
            </td>
        </tr>
    </table>
</div>
</form>
<script>
$(function(){
    
})
</script>