Ejemplo n.º 1
0
  $_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>
Ejemplo n.º 2
0
<?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;
}

// 최근게시글을 위해 게시글이 출력되는 아이디를 저장함
Ejemplo n.º 3
0
<?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>
Ejemplo n.º 4
0
<?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>
Ejemplo n.º 5
0
<?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);
Ejemplo n.º 6
0
<?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;
Ejemplo n.º 7
0
<?php

if (!defined('__MAGIC__')) {
    exit;
}
$v = Widget::Inst()->Action('data_explode', $this->wg_no);
echo Board::Inst($v['skin'])->html();
Ejemplo n.º 8
0
<?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')
);
Ejemplo n.º 9
0
$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';
    }
Ejemplo n.º 10
0
<?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;
Ejemplo n.º 11
0
<?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 
Ejemplo n.º 12
0
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;
}
Ejemplo n.º 13
0
<?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'];
Ejemplo n.º 14
0
$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');
Ejemplo n.º 15
0
<?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;
Ejemplo n.º 16
0
 * version 1.0
 * 사용자의 구미에 맞도록 초기설치 제어를 수행함
 */
$cfg = array();
// 데이터베이스 정보
$cfg['dbinfo'] = array('host' => 'localhost', 'user' => '', 'password' => '', 'db' => '', 'prefix' => 'm3_');
// 관리자 정보
$cfg['admin_info'] = array('id' => 'admin', 'password' => '', 'password_confirm' => '', 'name' => '최고관리자');
// 홈페이지 기본정보
$cfg['hp_info'] = array('title' => '매직보드');
// data 폴더 목록
// '폴더명'=>'권한값'
$cfg['data_folder'] = array(Path::data() => 0707, Path::data_file() => 0707, Path::data('cache') => 0707, Path::data('zmLog') => 0707, Path::data('zmLogConnect') => 0755, Path::data('cheditor') => 0707, Path::data_member() => 0707);
// 설치 테이블 정보
// '테이블명'=>'설치모듈 인스턴스'
$cfg['tables'] = array('magic' => Magic::Inst(), 'config' => Config::Inst(), 'write' => Write::Inst(), 'board' => Board::Inst(), 'file' => File::Inst(), 'comment' => Comment::Inst(), 'member' => Member::Inst(), 'tag' => Tag::Inst(), 'widget' => Widget::Inst());
/*
* 메뉴구성 및 기본 컨텐츠 설정
$cfg['default_data'] = "
kr:index				=widget:page=write:index.html
+메뉴얼:basic			=widget:page=write=widget:webclip:sub_title+=widget:page
++영문홈페이지:basic	=widget:page=write=widget:webclip:sub_title+=widget:page
++모바일홈페이지:basic	=widget:page=write=widget:webclip:sub_title+=widget:page
+게시판:basic			=widget:page=write=widget:webclip:sub_title+=widget:page
++공지사항:basic		=widget:page=write=widget:webclip:sub_title+=widget:write=board:공지

eng:index				=widget:page=write:index.html
+English Sample:basic	=widget:page=write

member:member