| | 130 | /***** submenu generation part. *****/ |
| | 131 | if(isset($blogMenu['topMenu'])) { |
| | 132 | if(Acl::check('group.administrators')) { |
| | 133 | $blogContentMenuItem['center'] = array( |
| | 134 | array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard'), |
| | 135 | ); |
| | 136 | } else{ |
| | 137 | $blogContentMenuItem['center'] = array( |
| | 138 | array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard') |
| | 139 | ); |
| | 140 | } |
| | 141 | if(Acl::check('group.editors')) { |
| | 142 | $blogContentMenuItem['entry'] = array( |
| | 143 | array('menu'=>'post','title'=>_t('글쓰기'),'link'=>'/owner/entry/post'), |
| | 144 | array('menu'=>'entry','title'=>_t('글 목록'),'link'=>'/owner/entry'), |
| | 145 | array('menu'=>'category','title'=>_t('분류 관리'),'link'=>'/owner/entry/category') |
| | 146 | ); |
| | 147 | } else { |
| | 148 | $blogContentMenuItem['entry'] = array( |
| | 149 | array('menu'=>'post','title'=>_t('글쓰기'),'link'=>'/owner/entry/post'), |
| | 150 | array('menu'=>'entry','title'=>_t('글 목록'),'link'=>'/owner/entry') |
| | 151 | ); |
| | 152 | } |
| | 153 | if(Acl::check('group.administrators')) { |
| | 154 | $blogContentMenuItem['communication'] = array( |
| | 155 | array('menu'=>'comment','title'=>_t('소통 기록'),'link'=>'/owner/communication/comment'), |
| | 156 | array('menu'=>'openid','title'=>_t('오픈아이디 목록'),'link'=>'/owner/communication/openid'), |
| | 157 | array('menu'=>'link','title'=>_t('링크'),'link'=>'/owner/communication/link') |
| | 158 | ); |
| | 159 | if($service['reader'] == true) array_push($blogContentMenuItem['communication'],array('menu'=>'reader','title'=>_t('바깥 글 읽기'),'link'=>'/owner/communication/reader')); |
| | 160 | } else { |
| | 161 | $blogContentMenuItem['communication'] = array( |
| | 162 | array('menu'=>'comment','title'=>_t('소통 기록'),'link'=>'/owner/communication/comment'), |
| | 163 | array('menu'=>'trash','title'=>_t('휴지통'),'link'=>'/owner/communication/trash/comment') |
| | 164 | ); |
| | 165 | if($service['reader'] == true) array_push($blogContentMenuItem,array('menu'=>'reader','title'=>_t('바깥 글 읽기'),'link'=>'/owner/communication/reader')); |
| | 166 | } |
| | 167 | if(Acl::check('group.administrators')) { |
| | 168 | $blogContentMenuItem['skin'] = array( |
| | 169 | array('menu'=>'skin','title'=>_t('스킨 선택'),'link'=>'/owner/skin'), |
| | 170 | array('menu'=>'edit','title'=>_t('스킨 편집'),'link'=>'/owner/skin/edit'), |
| | 171 | array('menu'=>'setting','title'=>_t('스킨 상세 설정'),'link'=>'/owner/skin/setting'), |
| | 172 | array('menu'=>'widget','title'=>_t('위젯'),'link'=>'/owner/skin/sidebar'), |
| | 173 | array('menu'=>'adminSkin','title'=>_t('관리자 패널 스킨 선택'),'link'=>'/owner/skin/adminSkin') |
| | 174 | ); |
| | 175 | } |
| | 176 | if(Acl::check('group.administrators')) { |
| | 177 | $blogContentMenuItem['plugin'] = array( |
| | 178 | array('menu'=>'plugin','title'=>_t('플러그인 목록'),'link'=>'/owner/plugin') |
| | 179 | ); |
| | 180 | if(Acl::check('group.creators')) array_push($blogContentMenuItem, array('menu'=>'tableSetting','title'=>_t('플러그인 데이터 관리'),'link'=>'/owner/plugin/tableSetting')); |
| | 181 | } |
| | 182 | if(Acl::check('group.administrators')) { |
| | 183 | $blogContentMenuItem['setting'] = array( |
| | 184 | array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/setting/blog'), |
| | 185 | array('menu'=>'entry','title'=>_t('글 작성'),'link'=>'/owner/setting/entry'), |
| | 186 | array('menu'=>'account','title'=>_t('개인 정보'),'link'=>'/owner/setting/account'), |
| | 187 | array('menu'=>'teamblog','title'=>_t('필진 목록'),'link'=>'/owner/setting/teamblog'), |
| | 188 | array('menu'=>'filter','title'=>_t('스팸 필터'),'link'=>'/owner/setting/filter'), |
| | 189 | array('menu'=>'data','title'=>_t('데이터 관리'),'link'=>'/owner/data') |
| | 190 | ); |
| | 191 | } else { |
| | 192 | $blogContentMenuItem['setting'] = array( |
| | 193 | array('menu'=>'account','title'=>_t('개인 정보'),'link'=>'/owner/setting/account') |
| | 194 | ); |
| | 195 | } |
| | 196 | if(Acl::check('group.creators')) { |
| | 197 | $blogContentMenuItem['control'] = array( |
| | 198 | array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/control/blog'), |
| | 199 | array('menu'=>'user','title'=>_t('사용자'),'link'=>'/owner/control/user'), |
| | 200 | array('menu'=>'server','title'=>_t('서버'),'link'=>'/owner/control/server'), |
| | 201 | array('menu'=>'system','title'=>_t('시스템 정보'),'link'=>'/owner/control/system') |
| | 202 | ); |
| | 203 | } |
| | 204 | } |
| | 205 | |
| | 206 | if( empty($blogContentMenuItem) ) { |
| | 207 | echo _t('접근권한이 없습니다'); |
| | 208 | exit; |
| | 209 | } |
| | 210 | |
| | 211 | foreach($adminMenuMappings as $path => $pluginAdminMenuitem) { |
| | 212 | if(count($blogContentMenuItem[$pluginAdminMenuitem['topMenu']]) < $pluginAdminMenuitem['contentMenuOrder'] |
| | 213 | || $pluginAdminMenuitem['contentMenuOrder'] < 1) |
| | 214 | $pluginAdminMenuitem['contentMenuOrder'] = count($blogContentMenuItem[$pluginAdminMenuitem['topMenu']]); |
| | 215 | array_splice($blogContentMenuItem[$pluginAdminMenuitem['topMenu']], $pluginAdminMenuitem['contentMenuOrder'], 0, |
| | 216 | array(array('menu'=>'adminMenu?name='.$path, |
| | 217 | 'title'=>$pluginAdminMenuitem['title'], |
| | 218 | 'link'=>'/owner/plugin/adminMenu?name='.$path)) |
| | 219 | ); |
| | 220 | } |
| | 221 | $blogContentMenuItem['center'] = array_merge($blogContentMenuItem['center'] , array(array('menu'=>'about','title'=>_t('텍스트큐브는'),'link'=>'/owner/center/about'))); |
| | 222 | // Adds 'about' panel at the last part of center panel. |
| 293 | | <li id="menu-<?php echo $menuItem['menu'];?>"<?php echo $menuItem['menu']==$blogMenu['topMenu'] ? ' class="selected"' : '';?>><a href="<?php echo $blogURL.$menuItem['link'];?>"><span><?php echo $menuItem['title'];?></span></a></li> |
| | 390 | <li id="menu-<?php echo $menuItem['menu'];?>"<?php echo $menuItem['menu']==$blogMenu['topMenu'] ? ' class="selected"' : '';?> onmouseover="previewSubmenu('<?php echo $menuItem['menu'];?>')"> |
| | 391 | <a href="<?php echo $blogURL.$menuItem['link'];?>"><span><?php echo $menuItem['title'];?></span></a> |
| | 392 | <ul id="submenu-<?php echo $menuItem['menu'];?>" class="sub-menu"> |
| | 393 | <?php |
| | 394 | $firstChildClass = ' firstChild'; |
| | 395 | if (isset($_POST['category'])) $currentCategory = $_POST['category']; |
| | 396 | else if (isset($_GET['category'])) $currentCategory = $_GET['category']; |
| | 397 | else $currentCategory = null; |
| | 398 | if(in_array($blogMenu['contentMenu'],array('notify','trackback','trashcomment','trashtrackback'))) |
| | 399 | $blogMenu['contentMenu'] = 'comment'; |
| | 400 | else if(in_array($blogMenu['contentMenu'],array('linkadd','linkedit','linkcategoryEdit','xfn'))) |
| | 401 | $blogMenu['contentMenu'] = 'link'; |
| | 402 | else if(in_array($blogMenu['contentMenu'],array('coverpage','sidebar'))) |
| | 403 | $blogMenu['contentMenu'] = 'widget'; |
| | 404 | |
| | 405 | foreach($blogContentMenuItem[$menuItem['menu']] as $contentMenuItem) { |
| | 406 | $PostIdStr = null; |
| | 407 | if(strstr($contentMenuItem['menu'], 'adminMenu?name=') !== false) { |
| | 408 | $pluginMenuValue = explode('/',substr($contentMenuItem['menu'], 15)); |
| | 409 | $PostIdStr = $pluginMenuValue[0]; |
| | 410 | } else { |
| | 411 | $PostIdStr = $contentMenuItem['menu']; |
| | 412 | } |
| | 413 | ?> |
| | 414 | <li id="sub-menu-<?php echo $PostIdStr;?>"<?php echo |
| | 415 | (($blogMenu['contentMenu'] == $contentMenuItem['menu'] || |
| | 416 | (isset($_GET['name']) && ('adminMenu?name='.$_GET['name'] == $contentMenuItem['menu'])) || |
| | 417 | ($contentMenuItem['menu'] == 'add' && strpos($blogMenu['contentMenu'],'add') !== false) || |
| | 418 | ($contentMenuItem['menu'] == 'blog' && strpos($blogMenu['contentMenu'],'blog') !== false && strpos($blogMenu['contentMenu'],'teamblog') === false) || |
| | 419 | ($contentMenuItem['menu'] == 'user' && strpos($blogMenu['contentMenu'],'user') !== false) || |
| | 420 | ($blogMenu['contentMenu'] == 'edit' && $contentMenuItem['menu'] == 'post')) ? |
| | 421 | " class=\"selected{$firstChildClass}\"" : ($firstChildClass ? " class=\"$firstChildClass\"" : ''));?>><a href="<?php |
| | 422 | echo $blogURL. |
| | 423 | $contentMenuItem['link']. |
| | 424 | ($contentMenuItem['menu'] == 'post' && isset($currentCategory) ? '?category='.$currentCategory : ''); |
| | 425 | ?>"><span class="text"><?php echo $contentMenuItem['title'];?></span></a></li> |
| | 426 | <?php |
| | 427 | $firstChildClass = null; |
| | 428 | } |
| | 429 | ?> |
| | 430 | </ul> |
| | 431 | </li> |
| | 440 | <?php |
| | 441 | /********** Submenu part. ***********/ |
| | 442 | if(!defined('__TEXTCUBE_READER_SUBMENU__')) { |
| | 443 | ?> |
| | 444 | <div id="layout-body"> |
| | 445 | <?php |
| | 446 | } |
| | 447 | ?> |
| | 448 | <h2><?php echo isset($blogMenu['title']) ? _f('서브메뉴 : %1', $blogMenu['title']) : _t('서브메뉴');?></h2> |
| | 449 | |
| | 450 | <?php |
| | 451 | if(isset($blogContentMenuItem[$blogMenu['topMenu']])) { |
| | 452 | ?> |
| | 453 | <div id="sub-menu-box"> |
| | 454 | <ul id="sub-menu"> |
| | 455 | <?php |
| | 456 | $firstChildClass = ' firstChild'; |
| | 457 | $submenuURL = null; |
| | 458 | foreach($blogContentMenuItem[$blogMenu['topMenu']] as $contentMenuItem) { |
| | 459 | $PostIdStr = null; |
| | 460 | if(strstr($contentMenuItem['menu'], 'adminMenu?name=') !== false) { |
| | 461 | $pluginMenuValue = explode('/',substr($contentMenuItem['menu'], 15)); |
| | 462 | $PostIdStr = $pluginMenuValue[0]; |
| | 463 | if(($blogMenu['contentMenu'] == $contentMenuItem['menu'] || (isset($_GET['name']) && ('adminMenu?name='.$_GET['name'] == $contentMenuItem['menu'])) || ($contentMenuItem['menu'] == 'trash' && strpos($blogMenu['contentMenu'],'trash') !== false))) { |
| | 464 | $submenuURL = $pluginMenuValue[0]; |
| | 465 | } |
| | 466 | } else { |
| | 467 | $PostIdStr = $contentMenuItem['menu']; |
| | 468 | if(($blogMenu['contentMenu'] == $contentMenuItem['menu'] |
| | 469 | || (isset($_GET['name']) && ('adminMenu?name='.$_GET['name'] == $contentMenuItem['menu'])) |
| | 470 | || (in_array($contentMenuItem['menu'],array('blog','user')) && strpos($blogMenu['contentMenu'],'detail') !== false) |
| | 471 | )) { |
| | 472 | $submenuURL = $blogMenu['contentMenu']; |
| | 473 | } |
| | 474 | } |
| | 475 | ?> |
| | 476 | <li id="sub-menu-<?php echo $PostIdStr;?>"<?php echo |
| | 477 | (($blogMenu['contentMenu'] == $contentMenuItem['menu'] || |
| | 478 | (isset($_GET['name']) && ('adminMenu?name='.$_GET['name'] == $contentMenuItem['menu'])) || |
| | 479 | ($contentMenuItem['menu'] == 'add' && strpos($blogMenu['contentMenu'],'add') !== false) || |
| | 480 | ($contentMenuItem['menu'] == 'blog' && strpos($blogMenu['contentMenu'],'blog') !== false && strpos($blogMenu['contentMenu'],'teamblog') === false) || |
| | 481 | ($contentMenuItem['menu'] == 'user' && strpos($blogMenu['contentMenu'],'user') !== false) || |
| | 482 | ($blogMenu['contentMenu'] == 'edit' && $contentMenuItem['menu'] == 'post')) ? " class=\"selected{$firstChildClass}\"" : ($firstChildClass ? " class=\"$firstChildClass\"" : ''));?>><a href="<?php |
| | 483 | echo $blogURL. |
| | 484 | $contentMenuItem['link']. |
| | 485 | ($contentMenuItem['menu'] == 'post' && isset($currentCategory) ? '?category='.$currentCategory : ''); |
| | 486 | ?>"><span class="text"><?php echo $contentMenuItem['title'];?></span></a></li> |
| | 487 | <?php |
| | 488 | $firstChildClass = null; |
| | 489 | } |
| | 490 | |
| | 491 | $helpURL = $blogMenu['topMenu'].(isset($blogMenu['contentMenu']) ? '/'.$submenuURL : ''); |
| | 492 | ?> |
| | 493 | </ul> |
| | 494 | <ul id="helper"> |
| | 495 | <li id="sub-menu-helper"><a href="<?php echo getHelpURL($helpURL);?>" onclick="window.open(this.href); return false;"><span class="text"><?php echo _t('도우미');?></span></a></li> |
| | 496 | </ul> |
| | 497 | </div> |
| | 498 | <?php |
| | 499 | } |
| | 500 | if(!defined('__TEXTCUBE_READER_SUBMENU__')) { |
| | 501 | ?> |
| | 502 | <hr class="hidden" /> |
| | 503 | |
| | 504 | <div id="pseudo-box" onmouseover="revertSubmenu();"> |
| | 505 | <div id="data-outbox"> |
| | 506 | <?php |
| | 507 | } |
| | 508 | ?> |