当前位置: 首页>>代码示例>>PHP>>正文


PHP Board::Inst方法代码示例

本文整理汇总了PHP中Board::Inst方法的典型用法代码示例。如果您正苦于以下问题:PHP Board::Inst方法的具体用法?PHP Board::Inst怎么用?PHP Board::Inst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Board的用法示例。


在下文中一共展示了Board::Inst方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

  $_list = array(
    'thumb'=>$this->path_img('no_image.gif'),
    'subject'=>array(
      'text'=>'이미지를 등록해 주세요.'
    )
  );
  if($i%$cols==0) {
    $_list['class'] = 'last';
  }
  $list[] = $_list;
}




$config = Board::Inst()->bo_no($this->bo_no);
?>

<?php if($config->bo_use_category) { ?>
<input type="hidden" name="ca1" value='<?php echo $_GET['ca1']?>'/>
<input type="hidden" name="ca2" value='<?php echo $_GET['ca2']?>'/>
<input type="hidden" name="ca3" value='<?php echo $_GET['ca3']?>'/>
<input type="hidden" name="base_url" value='<?php echo Url::Get('',array('ca1','ca2','ca3'))?>'/>
<input type="hidden" name="bo_category" value='<?php echo $config->bo_category?>'/>
<?php }?>

<!-- total,category -->
<div id="ca_line">
  <div id="category"></div>
  <?php if($this->Config('mb','admin')) {?>
  <a class="btn_admin" href="<?php echo $config->bo_admin_path?>"><img src="<?php echo $this->path_img('btn_admin.gif')?>" alt="admin"/></a>
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:list.php

示例2: if

<?php if(!defined("__MAGIC__")) exit; 

$tbn = $this->TBN();
$key = GV::Number($this->KN());
$board = Board::Inst()->bo_no($this->bo_no);
$bo_no = $board->bo_no;

$clear = $this->Clear();
$clear['wr_content'] = Editor::Inst('',$board->bo_editor)->db_in($_POST['wr_content']);

$clear['wr_state'] = 0;
if($_POST['opt_notice']) {
	$clear['wr_state'] = $clear['wr_state']|$this->Config('state', 'notice');
}
if($_POST['opt_secret']) {
	$clear['wr_state'] = $clear['wr_state']|$this->Config('state', 'secret');
}

// 비회원일 경우에 비밀번호 검사를 함
if(!$this->Config('mb','login')) {
	$clear['mb_no'] = 0;
	if($clear['wr_password']!=$_POST['wr_password_check'])
		Dialog::alert('[비밀번호/비밀번호확인]이 일치하지 않습니다.');
	if(!$clear['wr_password'])
		Dialog::alert('비밀번호를 입력해 주세요.');
	$clear['wr_password'] = $this->Sql('password', $clear['wr_password']);
} else {
	$clear['wr_writer'] = Member::Inst()->mb_nick;
}

// 최근게시글을 위해 게시글이 출력되는 아이디를 저장함
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:init.insert.php

示例3: if

<?php if(!defined('__MAGIC__')) exit;

$key = GV::Number($this->KN());
$board = Board::Inst($this->bo_id);
$v = $this->Sql('fetch', $key);
$comments = Comment::Inst(
	)->wr_no($key
	)->bo_no($board->bo_no
	)->html(
);

// 파일 정보를 가져옴
$file = File::Inst()->wr_no($key)->Protection();
?>

<div id="write_view">
<div class="title">
  <div class="title_bg_left">
  <div class="title_bg_right">
  <h2>
    <?php if($v['wr_category']) {?>
    <span class="category"><?php echo array_pop(explode('|',$v['wr_category']))?> | </span>
    <?php }?>
    <?php echo $v['wr_subject']?>
    <span class="hit">조회: <?php echo $v['wr_hit']?></span>
  </h2>
  <p class="writer">
    <span class="datetime"><?php echo $v['wr_datetime']?></span>
    <?php echo $v['wr_writer']?>
  </p>
  </div>
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:view.php

示例4: unset

<?php

if (!defined("__MAGIC__")) {
    exit;
}
// 게시판 생성
if ($_POST['bo_no'] == '') {
    $data['bo_subject'] = GV::String('bo_subject');
    $_POST['bo_no'] = Board::Inst()->Action('insert_record', $data);
    unset($_POST['bo_subject']);
}
if (!$_POST['list_view']) {
    $_POST['list_view'] = 0;
}
if (!$_POST['show_notice']) {
    $_POST['show_notice'] = 0;
}
if (!$_POST['use_comment']) {
    $_POST['use_comment'] = 0;
}
$data = Widget::Inst()->Action('data_implode', $_POST);
$key = DB::Get()->InsertEx($this->TBN(), $data);
if (!$key) {
    Dialog::Alert('정확한 정보를 입력하세요.');
}
Widget::Inst()->Action('add_widget', $key);
?>
<script>
window.opener.location.reload();
window.close();
</script>
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:init.insert.php

示例5:

<?php

if (!defined("__MAGIC__")) {
    exit;
}
$rows = $this->Config('rows');
$tbn = $this->TBN();
$tbn_board = Board::Inst()->TBN();
$sql = "\n\tSELECT\n\t\tA.wr_no,\n\t\tA.wr_subject,\n\t\tA.wr_parent_no,\n\t\tB.bo_subject,\n\t\tA.wr_writer,\n\t\tA.last_id,\n\t\tA.wr_datetime\n\tFROM `{$tbn}` A\n\tINNER JOIN `{$tbn_board}` B ON A.bo_no=B.bo_no\n  WHERE A.wr_writer<>'페이지'\n\tORDER BY A.wr_datetime desc\n\tLIMIT {$rows}\n";
$sql_result = DB::Get()->sql_query_list($sql);
开发者ID:nclco,项目名称:magicboard3,代码行数:10,代码来源:sql.list.php

示例6: if

<?php if(!defined("__MAGIC__")) exit; 

$pass=false;
if(
	$this->Config('mb','admin') ||
	$this->Config('mb','level') >= intval(Board::Inst($this->bo_id)->bo_level_list)
) $pass=true;
开发者ID:nclco,项目名称:magicboard3,代码行数:7,代码来源:can.list.php

示例7:

<?php

if (!defined('__MAGIC__')) {
    exit;
}
$v = Widget::Inst()->Action('data_explode', $this->wg_no);
echo Board::Inst($v['skin'])->html();
开发者ID:nclco,项目名称:magicboard3,代码行数:7,代码来源:view.php

示例8: if

<?php if(!defined("__MAGIC__")) exit; 

// 게시글 조회수 업데이트
$key = GV::Number($this->KN());
$this->wr_no = $key;
// 세션이 끊어 졌을때만 다시 업데이트 함
if(!$_SESSION[$this->Config('hit_check').$key]) {
	$this->Sql('update_hit',$key);
	$_SESSION[$this->Config('hit_check').$key] = true;
}
$data = $this->Sql('fetch', $key);
$data['wr_content'] = Editor::Inst(Board::Inst()->bo_no($this->bo_no)->bo_editor)->db_out($data['wr_content']);

$this->sql['fetch'.$key] = $data;

// 태그 가져오기
$tags = array();
foreach(Tag::Inst()->Sql('list', $this->bo_no, $key) as $v) {
  $tags[] = array(
    'name'=>$v['tag_name'],
    'link'=>Url::Get(array('tag'=>$v['tag_name']),array('ca1','ca2','wr_no','pg'))
  );
}
$this->tags = $tags;

// 홈페이지 타이틀 설정
$title = array_merge(
  array($data['wr_subject']),
  array($data['wr_category']),
  PageElement::Inst('head')->Config('title')
);
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:init.view.php

示例9: array

$this->data = $data;
/*
 * 폼 업데이트 링크 생성
 */
$key_name = $this->KN();
$key = GV::Number($key_name);
$this->action = $this->Link('insert');
if ($key) {
    $this->action = $this->Link('update');
}
/*
 * 게시판 목록 : 기존에 생성된 것
 */
$board_list = array();
$board_list[] = array('bo_subject' => '게시판생성');
foreach (Board::Inst()->Sql('list') as $v) {
    if ($data['bo_no'] == $v['bo_no']) {
        $v['selected'] = 'selected';
    }
    $board_list[] = $v;
}
$this->board_list = $board_list;
/*
 * 게시판 스킨 목록
 */
$skin_list = array();
$skin_list[] = array('name' => '게시판스킨 선택');
foreach (Write::Inst()->SkinList() as $v) {
    if ($data['skin'] == $v['skin']) {
        $v['selected'] = 'selected';
    }
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:init.write.php

示例10:

<?php

if (!defined("__MAGIC__")) {
    exit;
}
// 스킨 변경시 업데이트
$_POST['wg_skin'] = GV::String('wgSkin');
// 게시판 추가하여 저장
if (!$_POST['bo_no']) {
    $r = GV::String('r');
    $id1 = GV::String('id1');
    $id2 = GV::String('id2');
    $clear['bo_subject'] = '페이지';
    $clear['bo_kind'] = 'page';
    $clear['bo_admin_path'] = Url::Get(array('r' => $r, 'id1' => $id1, 'id2' => $id2, 'bo_no' => $clear['bo_no'], $this->Mode('name') => 'write'));
    $key = Board::Inst()->Action('insert_record', $clear);
    // 게시판 번호
    $_POST['bo_no'] = $key;
}
// POST 데이터 변환
$data = Widget::Inst()->Action('data_implode', $_POST);
// 업데이트
DB::Get()->Update($this->TBN(), $data, "where wg_no='{$this->wg_no}'");
?>
<script>
window.opener.location.reload();
window.close();
</script>
<?php 
exit;
开发者ID:nclco,项目名称:magicboard3,代码行数:30,代码来源:init.update.php

示例11:

<?php

if (!defined("__MAGIC__")) {
    exit;
}
$is_login = $this->Config('mb', 'login');
$parent_no = GV::Number('parent_no');
$can_secret = Board::Inst()->bo_no($this->bo_no)->bo_comment_use_secret;
$m = Member::Inst();
$pic = $m->Action('picture');
?>

<?php 
if ($this->Can('write')) {
    ?>
<div class="cmt_form">
  <form method="post" action="<?php 
    echo $this->Link('insert');
    ?>
">
  <input type="hidden" name="edit" value="0"/>
  <input type="hidden" name="wr_no" value="<?php 
    echo $this->wr_no;
    ?>
"/>
  <input type="hidden" name="cmt_parent_no" value="<?php 
    echo $parent_no;
    ?>
"/>

  <img class="pic_insert" src="<?php 
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:form.php

示例12: Insert

function Insert($data, $key = array())
{
    $ret = array();
    // $data의 마지막에 + 기호가 있다면 앞의 결과($key)와 합쳐서 반환함
    if (strpos($data, '+') !== false) {
        $ret[] = $key[0];
        $data = substr($data, 0, -1);
    }
    $_data = explode(':', $data);
    // 타입에 맞도록 데이터 입력
    switch ($_data[0]) {
        case 'widget':
            // 위젯 입력
            $_clear['wg_skin'] = $_data[1];
            $_clear['wg_width'] = '100';
            $_clear['wg_width_unit'] = '%';
            if ($_data[1] == 'page') {
                $_clear['wg_param'] = 'wr_no=' . $key[0] . '[]editor=cheditor[]editor_width=100%[]editor_height=500px';
            } else {
                if ($_data[1] == 'write') {
                    if ($_data[2] == 'mobile') {
                        $_clear['wg_param'] = 'skin=mbasic[]img_width=500[]rows=20[]columns=wr_datetime|wr_subject|wr_writer|wr_hit[]use_comment=1[]show_notice=1[]bo_no=' . $key[0];
                    } else {
                        $_clear['wg_param'] = 'skin=basic[]img_width=500[]rows=20[]columns=wr_datetime|wr_subject|wr_writer|wr_hit[]use_comment=1[]show_notice=1[]bo_no=' . $key[0];
                    }
                } else {
                    if ($_data[1] == 'webclip') {
                        $_clear['wg_param'] = 'skin=' . $_data[2];
                    }
                }
            }
            $ret[] = DB::Get()->InsertEx(Widget::Inst()->TBN(), $_clear);
            break;
        case 'write':
            // 게시글 입력 파일이 있다면 파일 내용을, 없다면 받은 키 값으로 위젯호출 구문을 적어넣는다
            $_path = __DIR__ . '/page/' . $_data[1];
            if (is_file($_path)) {
                $contents = addslashes(implode('', file($_path)));
            } else {
                $contents = '';
                rsort($key);
                foreach ($key as $v) {
                    $contents .= '[[Widget|' . $v . ']]';
                }
            }
            $_clear['bo_no'] = 0;
            $_clear['wr_subject'] = 'page';
            $_clear['wr_content'] = $contents;
            $ret[] = DB::Get()->InsertEx(Write::Inst()->TBN(), $_clear);
            break;
        case 'board':
            // 게시판 입력
            $_clear['bo_subject'] = $_data[1];
            $_clear['bo_editor'] = 'cheditor';
            $ret[] = DB::Get()->InsertEx(Board::Inst()->TBN(), $_clear);
            break;
    }
    return $ret;
}
开发者ID:nclco,项目名称:magicboard3,代码行数:59,代码来源:lib.php

示例13: if

<?php if(!defined('__MAGIC__')) exit;

/* 카테고리별 댓글 개수및 저장소의 댓글 개수 카운팅 */
$_category = json_decode(Board::Inst()->bo_no($this->bo_no)->bo_category,true);
$category_cnt = $this->Sql('category_cnt');

$ca1 = $_GET['ca1'];
$ca2 = $_GET['ca2'];

$category = array();
foreach($_category as $k=>$v) {
  $v['link'] = Url::Get(array('ca1'=>$v['data']),array('ca2', 'wr_no'));
  $v['cnt'] = 0;

  if($v['data']==$ca1) $v['active'] = true;
  if($v['children']) {
    for($i=0; $i<sizeof($v['children']); $i++) {
      $vv = $v['children'][$i];
      $vv['cnt'] = 0;
      $vv['link'] = Url::Get(array('ca1'=>$v['data'], 'ca2'=>$vv['data']),array('wr_no'));
      if($vv['data']==$ca2) $vv['active'] = true;
      $v['children'][$vv['data']] = $vv;
      unset($v['children'][$i]);
    }
  }
  $category[$v['data']] = $v;
}

$cnt_all=0;
foreach ($category_cnt as $v) {
  $cnt = $v['cnt'];
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:side.php

示例14: array

$data['skin'] = GV::String('skin');
if (!$data['skin']) {
    $data['skin'] = $view['skin'];
}
$this->data = $data;
/*
 * 폼 업데이트 링크 생성
 */
$key_name = $this->KN();
$key = GV::Number($key_name);
$this->action = $this->Link('insert');
if ($key) {
    $this->action = $this->Link('update');
}
/*
 * 게시판 스킨 목록
 */
$skin_list = array();
$skin_list[] = array('name' => '스킨선택');
foreach (Board::Inst()->SkinList() as $v) {
    if ($data['skin'] == $v['skin']) {
        $v['selected'] = 'selected';
    }
    $skin_list[] = $v;
}
$this->skin_list = $skin_list;
/*
 * 하단 버튼 링크생성
 */
$this->btn_ok = Widget::Inst()->path_img('btn_ok.gif');
$this->btn_cancel = Widget::Inst()->path_img('btn_cancel.gif');
开发者ID:nclco,项目名称:magicboard3,代码行数:31,代码来源:init.write.php

示例15: if

<?php if(!defined("__MAGIC__")) exit; 

$pass=false;
if(
	$this->Config('mb','admin') ||
	$this->Config('mb','level') >= intval(Board::Inst()->bo_no($this->bo_no)->bo_level_write)
) $pass=true;
开发者ID:nclco,项目名称:magicboard3,代码行数:7,代码来源:can.write.php


注:本文中的Board::Inst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。