Example #1
0
<?php

include_once './_common.php';
if (!$is_member) {
    die('0');
}
$uid = trim($_REQUEST['uid']);
$subject = trim($_REQUEST['subject']);
$content = trim($_REQUEST['content']);
if ($subject && $content) {
    $sql = " select count(*) as cnt from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_subject = '{$subject}' and as_content = '{$content}' ";
    $row = sql_fetch($sql);
    if (!$row['cnt']) {
        $sql = " insert into {$g5['autosave_table']} set mb_id = '{$member['mb_id']}', as_uid = '{$uid}', as_subject = '{$subject}', as_content = '{$content}', as_datetime = '" . G5_TIME_YMDHIS . "' on duplicate key update as_subject = '{$subject}', as_content = '{$content}', as_datetime = '" . G5_TIME_YMDHIS . "' ";
        $result = sql_query($sql, false);
        echo autosave_count($member['mb_id']);
    }
}
Example #2
0
    $captcha_html = captcha_html();
    $captcha_js = chk_captcha_js();
}
$is_dhtml_editor = false;
$is_dhtml_editor_use = false;
$editor_content_js = '';
if (!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE) {
    $is_dhtml_editor_use = true;
}
// 모바일에서는 G5_IS_MOBILE_DHTML_USE 설정에 따라 DHTML 에디터 적용
if ($config['cf_editor'] && $is_dhtml_editor_use && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
    $is_dhtml_editor = true;
    if (is_file(G5_EDITOR_PATH . '/' . $config['cf_editor'] . '/autosave.editor.js')) {
        $editor_content_js = '<script src="' . G5_EDITOR_URL . '/' . $config['cf_editor'] . '/autosave.editor.js"></script>' . PHP_EOL;
    }
}
$editor_html = editor_html('wr_content', $content, $is_dhtml_editor);
$editor_js = '';
$editor_js .= get_editor_js('wr_content', $is_dhtml_editor);
$editor_js .= chk_editor_js('wr_content', $is_dhtml_editor);
// 임시 저장된 글 수
$autosave_count = autosave_count($member['mb_id']);
include_once G5_PATH . '/head.sub.php';
@(include_once $board_skin_path . '/write.head.skin.php');
include_once './board_head.php';
$action_url = https_url(G5_BBS_DIR) . "/write_update.php";
echo '<!-- skin : ' . (G5_IS_MOBILE ? $board['bo_mobile_skin'] : $board['bo_skin']) . ' -->';
include_once $board_skin_path . '/write.skin.php';
include_once './board_tail.php';
@(include_once $board_skin_path . '/write.tail.skin.php');
include_once G5_PATH . '/tail.sub.php';