Пример #1
0
    if ($tmp) {
        sql_query("update {$write_table} set mb_id = '{$contents_shop_id}' where wr_id = '{$wr_id}'");
    }
    $write_run_time = mw_time_log($write_run_time, "[write-tail] update contentes_shop_id");
}
if ($is_admin && $wr_to_id && $mw_basic[cf_attribute] == "1:1") {
    $tmp = sql_fetch("select * from {$g4['member_table']} where mb_id = '{$wr_to_id}'");
    if ($tmp) {
        sql_query("update {$write_table} set wr_to_id = '{$wr_to_id}' where wr_id = '{$wr_id}'");
    }
    $write_run_time = mw_time_log($write_run_time, "[write-tail] update 1:1 wr_to_id");
}
if ($mw_basic['cf_image_outline']) {
    for ($i = 0, $m = count($upload); $i < $m; ++$i) {
        $dest_file = "{$g4['path']}/data/file/{$bo_table}/" . $upload[$i][file];
        if (is_mw_file($dest_file)) {
            mw_image_outline($dest_file, null, $mw_basic['cf_image_outline_color']);
        }
    }
    $editor_image = mw_get_editor_image($_POST['wr_content']);
    for ($j = 0, $m = count($editor_image['local_path']); $j < $m; $j++) {
        mw_image_outline($editor_image['local_path'][$j], null, $mw_basic['cf_image_outline_color']);
    }
    $write_run_time = mw_time_log($write_run_time, "[write-tail] outline");
}
include_once $board_skin_path . '/mw.proc/naver_syndi.php';
$write_run_time = mw_time_log($write_run_time, "[write-tail] naver_syndi");
if ($mw_basic['cf_include_write_update_tail'] && is_mw_file($mw_basic['cf_include_write_update_tail'])) {
    include $mw_basic['cf_include_write_update_tail'];
    $write_run_time = mw_time_log($write_run_time, "[write-tail] include write_update_tail");
}
Пример #2
0
// 썸네일 생성
$is_thumb = mw_make_thumbnail_row($bo_table, $wr_id, $_POST['wr_content'], $mw_basic['cf_image_remote_save']);
$write_run_time = mw_time_log($write_run_time, "[write] mw_make_thumbnail_row");
// 원본 워터마크
for ($i = 0, $m = sizeof($watermark_files); $i < $m; $i++) {
    // 기존 원터마크 파일 삭제
    unlink($watermark_files[$i]);
    $write_run_time = mw_time_log($write_run_time, "[write] unlink watermark_files");
}
if ($mw_basic[cf_watermark_use] && is_mw_file($mw_basic[cf_watermark_path])) {
    $sql = "select * from {$g4['board_file_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_width > 0  order by bf_no";
    $qry = sql_query($sql);
    while ($row = sql_fetch_array($qry)) {
        $watermark_file = mw_watermark_file("{$file_path}/{$row['bf_file']}");
        if ($mw_basic['cf_image_outline']) {
            mw_image_outline($watermark_file, null, $mw_basic['cf_image_outline_color']);
        }
    }
    $write_run_time = mw_time_log($write_run_time, "[write] watermark and outline");
}
// 생성된 썸네일이 없고, 유튜브 링크를 사용할 경우
// 유튜브 섬네일 가져오기
if (!$is_thumb && !is_mw_file($thumb_file)) {
    if (preg_match("/youtu/i", $wr_link1)) {
        mw_get_youtube_thumb($wr_id, $wr_link1);
    } else {
        if (preg_match("/youtu/i", $wr_link2)) {
            mw_get_youtube_thumb($wr_id, $wr_link2);
        } else {
            if (preg_match("/vimeo/i", $wr_link1)) {
                mw_get_vimeo_thumb($wr_id, $wr_link1);