* This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
if (!defined("_GNUBOARD_")) {
    exit;
}
// 개별 페이지 접근 불가
//if (function_exists('mw_moa_insert') && !$wr_anonymous && $mw_basic[cf_attribute] != 'anonymous') {
if (function_exists('mw_moa_insert')) {
    mw_moa_insert($wr_id, $comment_id, $write[mb_id], $member[mb_id]);
}
if (function_exists('mw_lucky_writing') && $w == 'c') {
    mw_lucky_writing($bo_table, $comment_id);
}
if ($mw_basic[cf_comment_file]) {
    //------------------------------------------------------------------------------
    // 가변 파일 업로드
    // 나중에 테이블에 저장하는 이유는 $comment_id 값을 저장해야 하기 때문입니다.
    $i = 0;
    $row = sql_fetch(" select count(*) as cnt from {$mw['comment_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' and bf_no = '{$i}' ");
    if ($row[cnt]) {
        // 삭제에 체크가 있거나 파일이 있다면 업데이트를 합니다.
        // 그렇지 않다면 내용만 업데이트 합니다.
        if ($upload[del_check] || $upload[file]) {
            $sql = " update {$mw['comment_file_table']}\n                        set bf_source = '{$upload[source]}',\n                            bf_file = '{$upload[file]}',\n                            bf_content = '{$bf_content}',\n                            bf_filesize = '{$upload[filesize]}',\n                            bf_width = '{$upload[image][0]}',\n                            bf_height = '{$upload[image][1]}',\n                            bf_type = '{$upload[image][2]}',\n                            bf_datetime = '{$g4['time_ymdhis']}'\n                      where bo_table = '{$bo_table}'\n                        and wr_id = '{$comment_id}'\n                        and bf_no = '{$i}' ";
Пример #2
0
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
if (!defined("_GNUBOARD_")) {
    exit;
}
// 개별 페이지 접근 불가
if ($mw_basic[cf_contents_shop_write] && $w == "") {
    mw_buy_contents2($member[mb_id], $mw_basic[cf_contents_shop_write_cash], "{$board['bo_subject']} 게시물 작성", $bo_table, $wr_id);
    $write_run_time = mw_time_log($write_run_time, "[write-tail] mw_buy_contents2");
}
//if (function_exists('mw_moa_insert') && !$wr_anonymous && $mw_basic[cf_attribute] != 'anonymous') {
if (function_exists('mw_moa_insert')) {
    mw_moa_insert($write[wr_id], $wr_id, $write[mb_id], $member[mb_id]);
    $write_run_time = mw_time_log($write_run_time, "[write-tail] mw_moa_insert");
}
if (function_exists('mw_lucky_writing') && $w == '') {
    mw_lucky_writing($bo_table, $wr_id);
    $write_run_time = mw_time_log($write_run_time, "[write-tail] mw_lucky_writing");
}
sql_query(" delete from {$mw['temp_table']} where bo_table = '{$bo_table}' and mb_id = '{$member['mb_id']}' ", false);
$write_run_time = mw_time_log($write_run_time, "[write-tail] delete temp");
if ($mw_basic[cf_content_align] && $wr_align) {
    sql_query(" update {$write_table} set wr_align = '{$wr_align}' where wr_id = '{$wr_id}' ");
    $write_run_time = mw_time_log($write_run_time, "[write-tail] update wr_align");
}
if ($is_admin && $contents_shop_id && $mw_basic[cf_contents_shop]) {
    $tmp = sql_fetch("select * from {$g4['member_table']} where mb_id = '{$contents_shop_id}'");
    if ($tmp) {
Пример #3
0
    if ($answer[mb_id] == $write[mb_id] && !$is_admin) {
        die("자신의 답변은 채택하실 수 없습니다.");
    }
    if ($answer[wr_ip] == $write[wr_ip] && !$is_admin) {
        die("자신의 답변은 채택하실 수 없습니다.");
    }
    if ($answer[mb_id] == '@lucky-writing') {
        $mb = get_member("@lucky-writing", "mb_nick");
        die("{$mb[mb_nick]}은 채택하실 수 없습니다.");
    }
    $row = sql_fetch("select wr_id from {$write_table} where wr_id = '{$choose_id}' and wr_parent = '{$wr_id}' and wr_is_comment = '1'");
    if (!$row) {
        die("존재하지 않는 게시물입니다.");
    }
    sql_query("update {$write_table} set wr_qna_status = '1', wr_qna_id = '{$choose_id}' where wr_id = '{$wr_id}'");
    $qna_save_point = round($write[wr_qna_point] * round($mw_basic[cf_qna_save] / 100, 2));
    $qna_total_point = $qna_save_point + $mw_basic[cf_qna_point_add];
    delete_point($write[mb_id], $bo_table, $wr_id, '@qna-hold');
    insert_point($answer[mb_id], $qna_total_point, "답변채택 포인트", $bo_table, $wr_id, '@qna-choose');
    if (function_exists('mw_moa_insert')) {
        $w = 'a';
        mw_moa_insert($wr_id, $choose_id, $answer[mb_id], $write[mb_id]);
    }
    die("답변이 채택되었습니다.|ok");
} else {
    // 보류
    sql_query("update {$write_table} set wr_qna_status = '2' where wr_id = '{$wr_id}'");
    $hold_point = round($write[wr_qna_point] * $mw_basic[cf_qna_hold] / 100, 0);
    insert_point($write[mb_id], $hold_point, "질문 보류, 포인트 {$mw_basic['cf_qna_hold']}% 환원", $bo_table, $wr_id, '@qna-hold');
    die("질문이 보류되었습니다.|ok");
}