Exemplo n.º 1
0
' />
        <?php 
if ($w == "") {
    echo "영문자, 숫자, _ 만 가능 (공백없이 20자 이내)";
} else {
    echo "<a href='{$g4['bbs_path']}/board.php?bo_table={$board['bo_table']}'><img src='{$g4['admin_path']}/img/icon_view.gif' alt='' class='icon_btn' /></a>";
}
?>
    </td>
</tr>
<tr>
    <td></td>
    <th>그룹</th>
    <td>
        <?php 
echo get_group_select('gr_id', $board[gr_id], "class='required' title='그룹'");
?>
        <?php 
if ($w == 'u') {
    ?>
<a href="javascript:location.href='./board_list.php?sfl=a.gr_id&amp;stx='+document.getElementById('fboardform').gr_id.value;">동일그룹게시판목록</a><?php 
}
?>
</td>
</tr>
<tr>
    <td></td>
    <th>게시판 제목</th>
    <td>
        <input type='text' name='bo_subject' size='60' maxlength='120' class='text required' title='게시판 제목' value='<?php 
echo get_text($board[bo_subject]);
Exemplo n.º 2
0
    ?>
/board.php?bo_table=<?php 
    echo $board['bo_table'];
    ?>
" class="btn_frmline">게시판 바로가기</a>
                    <a href="./board_list.php" class="btn_frmline">목록으로</a>
                <?php 
}
?>
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="gr_id">그룹<strong class="sound_only">필수</strong></label></th>
            <td colspan="2">
                <?php 
echo get_group_select('gr_id', $board['gr_id'], 'required');
?>
                <?php 
if ($w == 'u') {
    ?>
<a href="javascript:document.location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;" class="btn_frmline">동일그룹 게시판목록</a><?php 
}
?>
</td>
            </td>
        </tr>
        <tr>
            <th scope="row"><label for="bo_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
            <td colspan="2">
                <input type="text" name="bo_subject" value="<?php 
echo get_text($board['bo_subject']);
Exemplo n.º 3
0
    ?>
</label>
            <input type="checkbox" name="chk[]" value="<?php 
    echo $i;
    ?>
" id="chk_<?php 
    echo $i;
    ?>
">
        </td>
        <td>
            <?php 
    if ($is_admin == 'super') {
        ?>
                <?php 
        echo get_group_select("gr_id[{$i}]", $row['gr_id']);
        ?>
            <?php 
    } else {
        ?>
                <input type="hidden" name="gr_id[<?php 
        echo $i;
        ?>
]" value="<?php 
        echo $row['gr_id'];
        ?>
"><?php 
        echo $row['gr_subject'];
        ?>
            <?php 
    }
Exemplo n.º 4
0
    echo "<input type=hidden name=board_table[{$i}] value='{$row['bo_table']}'>";
    echo "<tr class='list{$list} col1 ht center'>";
    echo "<td rowspan=2 height=25><input type=checkbox name=chk[] value='{$i}'></td>";
    echo "<td rowspan=2><a href='{$g4['bbs_path']}/board.php?bo_table={$row['bo_table']}'><b>{$row['bo_table']}</b></a></td>";
    echo "<td colspan=2 align=left height=25><input type=text class=ed name=bo_subject[{$i}] value='" . get_text($row[bo_subject]) . "' style='width:99%'></td>";
    echo "<td rowspan=2 title='읽기 포인트'><input type=text class=ed name=bo_read_point[{$i}] value='{$row['bo_read_point']}' style='width:33px;'></td>";
    echo "<td rowspan=2 title='쓰기 포인트'><input type=text class=ed name=bo_write_point[{$i}] value='{$row['bo_write_point']}' style='width:33px;'></td>";
    echo "<td rowspan=2 title='속글쓰기 포인트'><input type=text class=ed name=bo_comment_point[{$i}] value='{$row['bo_comment_point']}' style='width:33px;'></td>";
    echo "<td rowspan=2 title='다운로드 포인트'><input type=text class=ed name=bo_download_point[{$i}] value='{$row['bo_download_point']}' style='width:33px;'></td>";
    echo "<td rowspan=2 title='검색사용'><input type=checkbox name=bo_use_search[{$i}] " . ($row[bo_use_search] ? 'checked' : '') . " value='1'></td>";
    echo "<td rowspan=2 title='검색순서'><input type=text class=ed name=bo_order_search[{$i}] value='{$row['bo_order_search']}' size=2></td>";
    echo "<td rowspan=2>{$s_upd} {$s_del} {$s_copy}</td>";
    echo "</tr>";
    echo "<tr class='list{$list} col1 ht center'>";
    if ($is_admin == "super") {
        echo "<td align=left>" . get_group_select("gr_id[{$i}]", $row[gr_id]) . "</td>";
    } else {
        echo "<td align=center><input type=hidden name='gr_id[{$i}]' value='{$row['gr_id']}'>{$row['gr_subject']}</td>";
    }
    echo "<td align=left><select id=bo_skin_{$i} name=bo_skin[{$i}]>{$skin_options}</select></td>";
    echo "</tr>\n";
    echo "<script type='text/javascript'>document.getElementById('bo_skin_{$i}').value='{$row['bo_skin']}';</script>";
}
if ($i == 0) {
    echo "<tr><td colspan='{$colspan}' align=center height=100 bgcolor=#ffffff>자료가 없습니다.</td></tr>";
}
echo "<tr><td colspan='{$colspan}' class='line2'></td></tr>";
echo "</table>";
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "{$_SERVER['PHP_SELF']}?{$qstr}&page=");
echo "<table width=100% cellpadding=3 cellspacing=1>";
echo "<tr><td width=70%>";
Exemplo n.º 5
0
'>
        <?php 
if ($w == "") {
    echo "영문자, 숫자, _ 만 가능 (공백없이 20자 이내)";
} else {
    echo "<a href='{$g4['bbs_path']}/board.php?bo_table={$board['bo_table']}'><img src='{$g4['admin_path']}/img/icon_view.gif' border=0 align=absmiddle></a>";
}
?>
    </td>
</tr>
<tr class='ht'>
    <td></td>
    <td>그룹</td>
    <td>
        <?php 
echo get_group_select('gr_id', $board[gr_id], "required itemname='그룹'");
?>
        <?php 
if ($w == 'u') {
    ?>
<a href="javascript:location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;">동일그룹게시판목록</a><?php 
}
?>
</td>
</tr>
<tr class='ht'>
    <td></td>
    <td>게시판 제목</td>
    <td>
        <input type=text class=ed name=bo_subject size=60 maxlength=120 required itemname='게시판 제목' value='<?php 
echo get_text($board[bo_subject]);
Exemplo n.º 6
0
 function form($w = '', $bo_table = '')
 {
     $this->load->library('form_validation');
     $config = array(array('field' => 'bo_table', 'label' => 'TABLE', 'rules' => 'trim|required|min_length[3]|max_length[20]|alpha_dash|xss_clean'), array('field' => 'gr_id', 'label' => '게시판 그룹', 'rules' => 'trim|required|min_length[3]|max_length[20]|alpha_dash'), array('field' => 'bo_subject', 'label' => '게시판 제목', 'rules' => 'trim|required|max_length[20]'), array('field' => 'bo_admin', 'label' => '게시판 관리자', 'rules' => 'trim|min_length[3]|max_length[20]|alpha_dash'));
     $this->form_validation->set_rules($config);
     if ($this->form_validation->run() == FALSE) {
         if (!$this->Board_model->is_group()) {
             alert('게시판그룹이 한개 이상 생성되어야 합니다.', ADM_F . '/boardgroup/form');
         }
         if ($w == '' || $w != 'u') {
             $title = '생성';
             $board = array_false(array('bo_table', 'bo_subject', 'bo_admin', 'bo_head', 'bo_tail', 'bo_sort_field', 'bo_insert_content', 'bo_use_private', 'bo_use_rss', 'bo_use_sns', 'bo_use_category', 'bo_use_name', 'bo_use_ip_view', 'bo_use_list_view', 'bo_use_email', 'bo_use_extra', 'bo_use_syntax', 'bo_order_search'));
             $board['bo_count_delete'] = 0;
             $board['bo_count_modify'] = 0;
             $board['bo_use_secret'] = 0;
             $board['bo_page_rows'] = 15;
             $board['bo_page_rows_comt'] = 50;
             $board['bo_subject_len'] = 75;
             $board['bo_new'] = 24;
             $board['bo_hot'] = 100;
             $board['bo_image_width'] = 800;
             $board['bo_upload_ext'] = 'zip|swf';
             $board['bo_upload_size'] = 2048;
             $board['bo_reply_order'] = 1;
             $board['bo_use_comment'] = 1;
             $board['bo_use_sideview'] = 1;
             $board['bo_use_editor'] = 1;
             $board['bo_use_search'] = 1;
             $board['bo_skin'] = 'basic';
             $board['gr_id'] = $w;
         } else {
             if ($w == 'u') {
                 $title = '수정';
                 $board = $this->Basic_model->get_board($bo_table);
                 if (!isset($board['bo_table'])) {
                     alert('존재하지 않은 게시판 입니다.');
                 }
             }
         }
         $upload_max_size = ini_get('upload_max_filesize');
         if (!preg_match("/([m|M])\$/", $upload_max_size)) {
             $upload_max_size = (int) ($upload_max_size / 1048576);
         }
         $head = array('title' => '게시판' . $title);
         $data = array('w' => $w, 'token' => get_token(), 'bo_table' => $board['bo_table'], 'bo_subject' => $board['bo_subject'], 'bo_admin' => $board['bo_admin'], 'bo_head' => $board['bo_head'], 'bo_tail' => $board['bo_tail'], 'bo_insert_content' => $board['bo_insert_content'], 'bo_order_search' => $board['bo_order_search'], 'bo_sort_field' => $board['bo_sort_field'], 'bo_count_write' => isset($board['bo_count_write']) ? number_format($board['bo_count_write']) : FALSE, 'bo_count_comment' => isset($board['bo_count_comment']) ? number_format($board['bo_count_comment']) : FALSE, 'upload_max_size' => $upload_max_size, 'bo_skin' => $board['bo_skin'], 'gr_id' => $board['gr_id'], 'bo_count_delete' => $board['bo_count_delete'], 'bo_count_modify' => $board['bo_count_modify'], 'bo_use_secret' => $board['bo_use_secret'], 'bo_page_rows' => $board['bo_page_rows'], 'bo_page_rows_comt' => $board['bo_page_rows_comt'], 'bo_subject_len' => $board['bo_subject_len'], 'bo_new' => $board['bo_new'], 'bo_hot' => $board['bo_hot'], 'bo_image_width' => $board['bo_image_width'], 'bo_upload_ext' => $board['bo_upload_ext'], 'bo_upload_size' => $board['bo_upload_size'], 'bo_reply_order' => $board['bo_reply_order'], 'use_private_chk' => $board['bo_use_private'] ? "checked='checked'" : '', 'use_rss_chk' => $board['bo_use_rss'] ? "checked='checked'" : '', 'use_sns_chk' => $board['bo_use_sns'] ? "checked='checked'" : '', 'use_comment_chk' => $board['bo_use_comment'] ? "checked='checked'" : '', 'use_category_chk' => $board['bo_use_category'] ? "checked='checked'" : '', 'use_sideview_chk' => $board['bo_use_sideview'] ? "checked='checked'" : '', 'use_editor_chk' => $board['bo_use_editor'] ? "checked='checked'" : '', 'use_name_chk' => $board['bo_use_name'] ? "checked='checked'" : '', 'use_ip_view_chk' => $board['bo_use_ip_view'] ? "checked='checked'" : '', 'use_list_view_chk' => $board['bo_use_list_view'] ? "checked='checked'" : '', 'use_email_chk' => $board['bo_use_email'] ? "checked='checked'" : '', 'use_extra_chk' => $board['bo_use_extra'] ? "checked='checked'" : '', 'use_syntax_chk' => $board['bo_use_syntax'] ? "checked='checked'" : '', 'use_search_chk' => $board['bo_use_search'] ? "checked='checked'" : '', 'group_select' => get_group_select('gr_id', $board['gr_id']), 'skin_select' => get_skin_dir('board', 'bo_skin', $board['bo_skin']), 'bo_list_level' => get_mb_level_select('bo_list_level', isset($board['bo_list_level']) ? $board['bo_list_level'] : 1), 'bo_read_level' => get_mb_level_select('bo_read_level', isset($board['bo_read_level']) ? $board['bo_read_level'] : 1), 'bo_write_level' => get_mb_level_select('bo_write_level', isset($board['bo_write_level']) ? $board['bo_write_level'] : 2), 'bo_reply_level' => get_mb_level_select('bo_reply_level', isset($board['bo_reply_level']) ? $board['bo_reply_level'] : 2), 'bo_comment_level' => get_mb_level_select('bo_comment_level', isset($board['bo_comment_level']) ? $board['bo_comment_level'] : 2), 'bo_upload_level' => get_mb_level_select('bo_upload_level', isset($board['bo_upload_level']) ? $board['bo_upload_level'] : 2), 'bo_download_level' => get_mb_level_select('bo_download_level', isset($board['bo_download_level']) ? $board['bo_download_level'] : 2));
         widget::run('head', $head);
         $this->load->view(ADM_F . '/board_form', $data);
         widget::run('tail');
     } else {
         check_token();
         $w = $this->input->post('w');
         $bo_table = $this->input->post('bo_table');
         if (!$w) {
             $bo = $this->Basic_model->get_board($bo_table, 'bo_table');
             if (isset($bo['bo_table'])) {
                 alert($bo['bo_table'] . '은(는) 이미 존재하는 TABLE 입니다.');
             }
             $board_path = DATA_PATH . '/file/' . $bo_table;
             // 게시판 디렉토리 생성
             mkdir($board_path, 0707);
             chmod($board_path, 0707);
             // 게시판 썸네일 디렉토리 생성
             mkdir($board_path . '/thumb', 0707);
             chmod($board_path . '/thumb', 0707);
             $this->load->helper('file');
             $board_index = $board_path . '/index.html';
             write_file($board_index, '');
             chmod($board_index, 0606);
             $this->Board_model->insert();
         } else {
             if ($w == 'u') {
                 // 글수 조정
                 if ($this->input->post('proc_count')) {
                     $this->Board_model->proc_count();
                 }
                 // 공지 가져오기
                 $is_notice = '';
                 $bo = $this->Basic_model->get_board($bo_table, 'bo_notice');
                 if (isset($bo['bo_notice'])) {
                     $is_notice = $bo['bo_notice'];
                 }
                 $this->Board_model->update($is_notice);
             } else {
                 alert('잘못된 접근입니다.');
             }
         }
         if ($this->input->post('chk')) {
             $this->Board_model->group_update();
         }
         goto_url(ADM_F . '/board/form/u/' . $bo_table);
     }
 }