本文整理汇总了PHP中Layout::Inst方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::Inst方法的具体用法?PHP Layout::Inst怎么用?PHP Layout::Inst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::Inst方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$i = 0;
foreach ($menu_main as $k => $v) {
if ($v['m_hidden'] == 0) {
$v['children'] = array();
foreach ($menu_all as $vv) {
if ($v['m_no'] == $vv['m_parent']) {
$v['children'][] = array('m_id' => $vv['m_id'], 'link' => Path::Root('?id1=' . $v['m_id'] . '&id2=' . $vv['m_id']));
}
}
$menu_main[$k] = $v;
} else {
unset($menu_main[$k]);
}
}
$root = Magic::Inst()->Action('root');
$path = Layout::Inst('index');
?>
<ul class="list">
<?php
foreach ($menu_main as $v) {
?>
<li class="<?php
echo $v['first'] ? 'first' : '';
?>
<?php
echo $v['active'] ? ' active' : '';
?>
">
<a href="<?php
echo $v['link'];
示例2:
<?php
if (!defined('__MAGIC__')) {
exit;
}
$this->btn_modify = Layout::Inst('admin')->path_img('btn_modify.gif');
示例3:
<?php
if (!defined('__MAGIC__')) {
exit;
}
?>
<img id="footer_logo" src="<?php
echo Layout::Inst('index')->path_img('logo_gray.gif');
?>
" alt="footer_logo"/>
<p class="info">웹모나 | 사업자번호: 000-00-00000 | 대표자: 홍길동 | 개인정보관리책임자:홍길동 | admin@webmona.com</p>
<p class="address">서울시 마포구 무교동 건물명 1234호 | TEL: 02-000-0000 | FAX: 02-000-0000 </p>
<p class="copyright">copyright (c) Since 2010-2012. All rights reserved by 웹모나</p>
示例4: explode
Dialog::alert("메뉴명을 입력하세요.");
}
// 부모 아이디를 찾는다
// POST로 root, main 이렇게 넘어옴
if ($_POST['main']) {
$clear['m_parent'] = $_POST['main'];
} else {
if ($_POST['root']) {
$clear['m_parent'] = $_POST['root'];
} else {
$clear['m_parent'] = 0;
}
}
$data = $this->Sql('fetch', GV::Number($this->KN()));
$existing = explode(',', $data['m_contents']);
$layout_contents = Layout::Inst($clear['m_layout'])->FindContents();
$contents = array();
foreach ($layout_contents as $k => $v) {
if ($existing[$k]) {
$contents[] = $existing[$k];
} else {
$contents[] = '[[Widget]]';
}
}
$clear['m_contents'] = implode(',', $contents);
if (!$clear['m_hidden']) {
$clear['m_hidden'] = 0;
}
// 아이디가 변경 되었을 경우
// 페이지 게시판의 게시물 last_id를 모두 변경해주어야 한다
// 관리자페이지 아이디가 변경되었을 경우에는 홈으로 이동해 주어야함
示例5:
"/>
<input id="mb_datetime_now" type="checkbox" name="mb_datetime_now" value="1"/>
<label for="mb_datetime_now">지금으로 변경</label>
</td>
</tr>
<tr>
<th>서명</th>
<td><textarea name="mb_memo" rows="4" cols="40"><?php
echo $v['mb_memo'];
?>
</textarea></td>
</tr>
</tbody>
</table>
<div class="center">
<input class="adjust_button_line" type="image" src="<?php
echo Layout::Inst('admin')->path_img('btn_modify.gif');
?>
" alt="수정"/>
<a onclick="location.href='<?php
echo $this->Link('list');
?>
'"><img src="<?php
echo Layout::Inst('admin')->path_img('btn_cancel.gif');
?>
" alt="취소"/>
</div>
</form>
示例6:
<?php
if (!defined("__MAGIC__")) {
exit;
}
$this->logo = Layout::Inst('admin')->path_img('logo.png');
$this->logo_link = Path::Root('?r=admin');
$this->link_logout = Member::Inst()->Link('logout');
$this->link_home = Path::Root();
$this->btn_home = Layout::Inst('admin')->path_img('btn_home.gif');
$this->btn_logout = Layout::Inst('admin')->path_img('btn_logout.gif');
$this->link_design = Widget::Inst()->Config('link_design');
$this->link_page = Widget::Inst()->Config('link_page');
// 아이콘
if (Widget::Inst()->Config('is_design')) {
$this->icon_design = Layout::Inst('admin')->path_img('icon_design_on.gif');
} else {
$this->icon_design = Layout::Inst('admin')->path_img('icon_design_off.gif');
}
if (Widget::Inst()->Config('is_page')) {
$this->icon_page = Layout::Inst('admin')->path_img('icon_page_on.gif');
} else {
$this->icon_page = Layout::Inst('admin')->path_img('icon_page_off.gif');
}
示例7:
<?php
if (!defined("__MAGIC__")) {
exit;
}
/*
* 해당 레이아웃에서 사용할 css/js set
*/
Scripts::Add(Layout::Inst('index')->path_view('script.js'));
示例8: array_filter
<?php
if (!defined('__MAGIC__')) {
exit;
}
$page = $this->Action('fetch_page');
$contents = array_filter(explode(',', $page['m_contents']));
if (sizeof($contents) != 0) {
$tbn = $this->TBN();
$key_name = $this->KN();
$key = $page[$key_name];
$field = 'm_contents';
/*
* 컨텐츠의 위젯을 미리 html로 변환해 줌
* layout 결과를 받아서 하게되면 해당 위젯의 css,js가 인크루드 되지 못함
*/
foreach ($contents as $k => $v) {
$contents[$k] = Widget::Inst()->Parse($tbn, $key_name, $key, $field, $v, $k);
}
}
echo Layout::Inst($page['m_layout'])->Contents($contents)->html();
示例9: confirm
echo $v['mb_datetime'];
?>
</div></td>
<td class="center"><div class="rline_last">
<a href="<?php
echo $this->Link('modify', $v['mb_no']);
?>
"><img src="<?php
echo Layout::Inst('admin')->path_img('btn_table_admin_modify_icon.gif');
?>
" alt="수정"/></a>
<a href="<?php
echo $this->Link('unregist', $v['mb_no']);
?>
" onclick="return confirm('회원을 탈퇴 시키겠습니까?\n한번 탈퇴한 회원은 복구 할수 없습니다.\n신중히 생각해주세요.')"><img src="<?php
echo Layout::Inst('admin')->path_img('btn_table_admin_delete_icon.gif');
?>
" alt="탈퇴"/></a>
</div></td>
</tr>
<?php
}
?>
</tbody>
</table>
</form>
<!-- 검색 -->
<?php
echo Search::Inst()->Html();
示例10:
><a href="<?php
echo $v['link'];
?>
" <?php
echo $v['popup'] ? 'class="popup"' : '';
?>
><?php
echo $v['m_id'];
?>
</a></li>
<?php
}
?>
</ul>
<?php
}
?>
<div class="banner"><img src="<?php
echo Layout::Inst('index')->path_img('customer_center.gif');
?>
" alt="customer_center"/></div>
<div class="banner"><a href="http://www.webmona.com/" class="popup"><img src="<?php
echo Layout::Inst('index')->path_img('banner_side_release.jpg');
?>
" alt="매직보드 3.x 출시"/></a></div>
<div class="banner"><a href="http://www.webmona.com/" class="popup"><img src="<?php
echo Layout::Inst('index')->path_img('banner_side_download.jpg');
?>
" alt="매직보드 다운로드"/></a></div>
示例11: confirm
" alt="확인"/>
<a href="<?php
echo $this->Link('list');
?>
"><img src="<?php
echo Layout::Inst('admin')->path_img('btn_list.gif');
?>
" alt="목록"/></a>
<?php
if ($view) {
?>
<a href="<?php
echo $this->Link('delete', $view['m_no']);
?>
" onclick="return confirm('정말로 삭제 하시겠습니까?\n삭제한 데이터는 복구할 수 없습니다.')"><img src="<?php
echo Layout::Inst('admin')->path_img('btn_delete.gif');
?>
" alt="삭제"/></a><?php
}
?>
</div>
<iframe id="preview" name="preview" src="" width="100%" height="1000px" frameborder="0"></iframe>
</form>
<script>
function preview() {
var r=$("select[name='root']").get(0);
for(i=0; i<r.length; i++) {
if(r[i].selected) {
示例12: array
<?php
if (!defined("__MAGIC__")) {
exit;
}
// 걸러진 결과값
$clear = $this->Clear();
if (!$clear['m_id']) {
Dialog::alert("메뉴명을 입력하세요.");
}
// 부모 아이디를 찾는다
// POST로 root, main 이렇게 넘어옴
if ($_POST['main']) {
$clear['m_parent'] = $_POST['main'];
} else {
if ($_POST['root']) {
$clear['m_parent'] = $_POST['root'];
} else {
$clear['m_parent'] = 0;
}
}
// 레이아웃에 contents개수 찾기
// contents 개수만큼 [[Widget]] 텍스트를 넣어줌
$contents = array();
foreach (Layout::Inst($clear['m_layout'])->FindContents() as $v) {
$contents[] = '[[Widget]]';
}
$clear['m_contents'] = implode(',', $contents);
$this->Sql('insert', $clear);
Url::Go($this->Link('list'));
exit;