public function SetStyle($style) { $this->use_style = $style; if ($this->use_style) { Styles::Add($this->css()); } else { Styles::Del($this->css()); } }
$this->root['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id']); } $this->main['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id']); $this->sub['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id'] . '&' . $this->Config('sub') . '=' . $this->sub['m_id']); /* if($this->root['m_id']!='mobile' && $this->root['m_id']!='mobile_member' && Util::checkMobile() && is_dir(Path::Root('magic/skin/Layout/mobile'))) { Url::GoReplace(Path::Root('?r=mobile')); } */ // 현재메뉴 정보를 불러옴 // redirection 정보가 있으면 바로 이동해줌 // redirection 보다는 메뉴주소자체를 바로 바꾸어줌 $menu = ''; if ($sub['m_no']) { $menu = $sub; } else { if ($main['m_no']) { $menu = $main; } else { $menu = $root; } } if (isset($menu['m_redirection']) && $menu['m_redirection']) { Url::GoReplace($menu['m_redirection']); } /* * 테마에 따른 css 입력 * 테마는 관리자에서 설정하도록 추가할 예정 */ Styles::Add(Path::Group('/magic/css/' . $this->Config('theme') . '/jquery-ui-all.css'));
<?php if (!defined("__MAGIC__")) { exit; } Styles::Add($this->path_view('jquery.mobile-1.1.0.min.css')); Scripts::Add($this->path_view('jquery.mobile-1.1.0.min.js'));
<?php if (!defined("__MAGIC__")) { exit; } /* * 해당 레이아웃에서 사용할 css/js set */ Styles::Add(Path::Group('magic/css/basic/jquery-ui-all.css')); /* * 페이지 엘리먼트 불러오기 */ $this->header = PageElement::Inst('admin_header')->html(); $this->side = PageElement::Inst('admin_side')->html(); $this->menu = PageElement::Inst('admin_menu')->html(); $this->head = PageElement::Inst('head')->html();
protected function Init() { if ($this->called_init) { return; } if (is_file($this->path_view('style.css'))) { Styles::Add($this->path_view('style.css')); } if (is_file($this->path_view('script.js'))) { Scripts::Add($this->path_view('script.js')); } if (is_file($this->path_controller('auth.php'))) { include $this->path_controller('auth.php'); } if (is_file($this->path_controller('auth.' . $this->CurrentState() . '.php'))) { include $this->path_controller('auth.' . $this->CurrentState() . '.php'); } // 2012.03.19 - 초기화 함수를 뒤로 옮김 삭제나 추가 같은 액션은 초기화에서 삭제나 추가를 하기때문에.... // 예전에 init을 위로 올린 이유가 있었는데... 지금은 해결되었길 바란다. if (is_file($this->path_controller('init.php'))) { include $this->path_controller('init.php'); } if (is_file($this->path_controller('init.' . $this->CurrentState() . '.php'))) { include $this->path_controller('init.' . $this->CurrentState() . '.php'); } $this->called_init = true; }
return; } $source = '<link rel="stylesheet" href="' . $href . '" type="text/css"/>'; if (in_array($source, self::$css)) { return; } self::$css[] = $source; } // 스타일 제거 static function Del($href) { if (!isset($href)) { return; } $source = '<link rel="stylesheet" href="' . $href . '" type="text/css"/>'; if (FALSE !== ($key = array_search($source, self::$css))) { unset(self::$css[$key]); } } static function Get() { return self::$css; } } // mb_js, mb_css에 있는 파일은 자동으로 인크루드 함 $dir = dir(Path::MB_css()); while ($name = $dir->read()) { if (is_file(Path::MB_css($name))) { Styles::Add(Path::MB_css($name)); } }