adm/index.php 페이지에 컨텐츠를 삽입할 수 있는 Hook 추가 (#283)
* 코드 포맷 * adm/index.php 페이지에 컨텐츠를 삽입할 수 있는 Hook 추가 - adm_index_addtional_content_before - adm_index_addtional_content_after
This commit is contained in:
@ -3,8 +3,10 @@ $sub_menu = '100000';
|
||||
require_once './_common.php';
|
||||
|
||||
@require_once './safe_check.php';
|
||||
|
||||
if (function_exists('social_log_file_delete')) {
|
||||
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
//소셜로그인 디버그 파일 24시간 지난것은 삭제
|
||||
social_log_file_delete(86400);
|
||||
}
|
||||
|
||||
$g5['title'] = '관리자메인';
|
||||
@ -14,8 +16,12 @@ $new_member_rows = 5;
|
||||
$new_point_rows = 5;
|
||||
$new_write_rows = 5;
|
||||
|
||||
if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$addtional_content_before = run_replace('adm_index_addtional_content_before', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_before) {
|
||||
echo $addtional_content_before;
|
||||
}
|
||||
|
||||
if (!auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$sql_common = " from {$g5['member_table']} ";
|
||||
|
||||
$sql_search = " where (1) ";
|
||||
@ -31,7 +37,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
|
||||
$sql_order = " order by {$sst} {$sod} ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
@ -41,11 +47,11 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
$leave_count = $row['cnt'];
|
||||
|
||||
// 차단회원수
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$intercept_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 12;
|
||||
@ -78,7 +84,7 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
<?php
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
// 접근가능한 그룹수
|
||||
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$sql2 = " SELECT count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
$group = "";
|
||||
if ($row2['cnt']) {
|
||||
@ -128,7 +134,6 @@ if (! auth_check_menu($auth, '200100', 'r', true)) {
|
||||
<div class="btn_list03 btn_list">
|
||||
<a href="./member_list.php">회원 전체보기</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<?php
|
||||
@ -139,7 +144,7 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||
|
||||
if ($gr_id) {
|
||||
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||
$sql_common .= " and b.gr_id = '{$gr_id}' ";
|
||||
}
|
||||
if (isset($view) && $view) {
|
||||
if ($view == 'w') {
|
||||
@ -150,7 +155,7 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
}
|
||||
$sql_order = " order by a.bn_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
@ -174,16 +179,16 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$sql = " SELECT a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||
$result = sql_query($sql);
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
|
||||
|
||||
// 원글
|
||||
if ($row['wr_id'] == $row['wr_parent']) {
|
||||
// 원글
|
||||
$comment = "";
|
||||
$comment_link = "";
|
||||
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '{$row['wr_id']}' ");
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row2['mb_id'], get_text(cut_str($row2['wr_name'], $config['cf_cut_name'])), $row2['wr_email'], $row2['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
@ -194,12 +199,12 @@ if (! auth_check_menu($auth, '300100', 'r', true)) {
|
||||
} else {
|
||||
$datetime2 = substr($datetime2, 5, 5);
|
||||
}
|
||||
} else // 코멘트
|
||||
{
|
||||
} else {
|
||||
// 코멘트
|
||||
$comment = '댓글. ';
|
||||
$comment_link = '#c_' . $row['wr_id'];
|
||||
$row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
$row2 = sql_fetch(" SELECT * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
$row3 = sql_fetch(" SELECT mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
$name = get_sideview($row3['mb_id'], get_text(cut_str($row3['wr_name'], $config['cf_cut_name'])), $row3['wr_email'], $row3['wr_homepage']);
|
||||
// 당일인 경우 시간으로 표시함
|
||||
@ -247,11 +252,11 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
$sql_search = " where (1) ";
|
||||
$sql_order = " order by po_id desc ";
|
||||
|
||||
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$sql = " SELECT count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$sql = " SELECT * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$colspan = 7;
|
||||
@ -282,7 +287,7 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
$row2['mb_id'] = '';
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
if ($row2['mb_id'] != $row['mb_id']) {
|
||||
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$sql2 = " SELECT mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
}
|
||||
|
||||
@ -325,4 +330,9 @@ if (! auth_check_menu($auth, '200200', 'r', true)) {
|
||||
|
||||
<?php
|
||||
} //endif
|
||||
|
||||
$addtional_content_after = run_replace('adm_index_addtional_content_after', '', $is_admin, $auth, $member);
|
||||
if ($addtional_content_after) {
|
||||
echo $addtional_content_after;
|
||||
}
|
||||
require_once './admin.tail.php';
|
||||
Reference in New Issue
Block a user