forked from moonhouse-80san/board_extend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboard_extend.controller.php
More file actions
38 lines (35 loc) · 1.68 KB
/
Copy pathboard_extend.controller.php
File metadata and controls
38 lines (35 loc) · 1.68 KB
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
<?php
/**
* @class board_extendAdminController
* @author xiso (xiso@xiso.co.kr)
* @brief board_extend module admin controller class
**/
require_once(_XE_PATH_.'modules/board/board.controller.php');
class board_extendController extends boardController {
function triggerDisplay(){
//trigger display before();
if(strpos(Context::get('act'),"ispBoardAdmin") || strpos(Context::get('act'),"ispBoard_extendAdmin")){
$core_ver = __XE_VERSION__ ? __XE_VERSION__ : __ZBXE_VERSION__;
$is_active = (Context::get('act') == 'dispBoard_extendAdminBoardModify') ? true : false;
$url = getNotEncodedUrl('act','dispBoard_extendAdminBoardModify', 'selected_var_idx', '', 'type', '');
$text = "목록수정";
if($core_ver >= 1.7){
$active = $is_active ? "class='x_active'" : "";
$html = sprintf("<li %s><a href='%s'>%s</a></li>",$active,$url,$text);
$script = "jQuery(document).ready(function(\$){\$('.x_nav').append(\"$html\");});";
}else if($core_ver >= 1.5){
$active = $is_active ? "class='active'" : "";
$html = sprintf("<li %s><a href='%s'>%s</a></li>",$active,$url,$text);
$script = "jQuery(document).ready(function(\$){\$('.x .cnb ul').append(\"$html\");});";
}else if($core_ver >= 1.4){
$active = $is_active ? "class='on'" : "";
$html = sprintf("<li %s><a href='%s'>%s</a></li>",$active,$url,$text);
$script = "jQuery(document).ready(function(\$){\$('#xeAdmin .header4 .localNavigation').append(\"$html\");});";
}else{
$this->stop('지원하지 않는 버전입니다. board_extend 모듈을 제거해주시기 바랍니다.');
}
Context::addHtmlHeader("<script type='text/javascript'>$script</script>");
}
}
}
?>