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
|
<?php $sub_menu = "900300"; include_once("./_common.php"); @include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
if( !function_exists('json_encode') ) { function json_encode($data) { $json = new Services_JSON(); return( $json->encode($data) ); } }
ajax_auth_check($auth[$sub_menu], "r");
$lev = array();
for ($i=1; $i<=10; $i++) { $lev[$i] = 0; }
$qry = sql_query("select mb_level, count(*) as cnt from {$g5['member_table']} where mb_sms=1 and not (mb_hp='') group by mb_level");
while ($row = sql_fetch_array($qry)) { $lev[$row['mb_level']] = $row['cnt']; } $str_json = array(); $tmp_str = ''; $tmp_str .= ' <div class="tbl_head01 tbl_wrap"> <table> <thead> <tr> <th scope="col">권한</th> <th scope="col">수신가능</th> <th scope="col">추가</th> </tr> </thead> <tbody>'; for ($i=1; $i<=10; $i++) { $bg = 'bg'.($line++%2); $tmp_str .= ' <tr class="'.$bg.'"> <td>'.$i.' 레벨</td> <td class="td_numbig">'.number_format($lev[$i]).'</td> <td class="td_mng"><button type="button" class="btn_frmline" onclick="sms_obj.level_add('.$i.', \''.number_format($lev[$i]).'\')">추가</button></td> </tr>'; } $tmp_str .= ' </tbody> </table> </div>';
$str_json['html'] = $tmp_str; echo json_encode($str_json); ?>
|