示例#1
0
if ($key) {
    $this->action = $this->Link('update');
}
/*
 * 게시판 목록 : 기존에 생성된 것
 */
$board_list = array();
foreach (Board::Inst()->Sql('list') as $v) {
    if (in_array($v['bo_no'], $data['bo_no'])) {
        $v['selected'] = 'selected';
    }
    $board_list[] = $v;
}
$this->board_list = $board_list;
/*
 * 게시판 스킨 목록
 */
$skin_list = array();
$skin_list[] = array('name' => '최신글스킨선택');
foreach (Latest::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');
示例#2
0
<?php

if (!defined('__MAGIC__')) {
    exit;
}
$v = Widget::Inst()->Action('data_explode', $this->wg_no);
echo Latest::Inst($v['skin'], explode(',', $v['bo_no']))->SetConfig('rows', '', $v['rows'])->html();
示例#3
0
  $cnt_all+=$cnt;
}

$archive=array();
foreach($this->Sql('list_all') as $v) {
  if(!isset($archive[$v['wr_datetime_text']])) $archive[$v['wr_datetime_text']]=0;
  $archive[$v['wr_datetime_text']]++;
}
krsort($archive);

// 공시사항
$notice = $this->Sql('list_notice');
// 최신댓글
$comment = Comment::Inst()->Sql('latest', $this->bo_no, 10);
// 최신글
$latest = Latest::Inst('blog_side', $this->bo_no)->html();
// 태그
$tags = Tag::Inst('basic', $this->bo_no)->SetConfig('hide_count','',1)->html();

if(!function_exists('strcut_utf8')) {
  function strcut_utf8($str, $len, $checkmb=false, $tail='') {
    /**
    * UTF-8 Format
    * 0xxxxxxx = ASCII, 110xxxxx 10xxxxxx or 1110xxxx 10xxxxxx 10xxxxxx
    * latin, greek, cyrillic, coptic, armenian, hebrew, arab characters consist of 2bytes
    * BMP(Basic Mulitilingual Plane) including Hangul, Japanese consist of 3bytes
    **/
    preg_match_all('/[\xE0-\xFF][\x80-\xFF]{2}|./', $str, $match); // target for BMP

    $m = $match[0];
    $slen = strlen($str); // length of source string