Beispiel #1
0
function call_board_latest_thumbnail_func($viewType, $article, $board_id, $idno, $file1, $file2, $ment, $width, $height, $quard, $margin)
{
    if ($viewType == "p") {
        $viewDir = "";
    } else {
        $viewDir = "m/";
    }
    $lib = new libraryClass();
    //본문내 첫번째 이미지 태그를 추출
    preg_match("/<img[^>]*src=[\"']?([^>\"']+)[\"']?[^>]*>/i", $ment, $match);
    if (strtolower(array_pop(explode(".", $file1))) == 'gif' || strtolower(array_pop(explode(".", $file1))) == 'jpg' || strtolower(array_pop(explode(".", $file1))) == 'bmp' || strtolower(array_pop(explode(".", $file1))) == 'png') {
        $thumb = $lib->func_img_resize("modules/board/upload/" . $board_id . "/", $file1, $width, $height, $margin, $quard);
    } else {
        if (strtolower(array_pop(explode(".", $file2))) == 'gif' || strtolower(array_pop(explode(".", $file2))) == 'jpg' || strtolower(array_pop(explode(".", $file2))) == 'bmp' || strtolower(array_pop(explode(".", $file2))) == 'png') {
            $thumb = $lib->func_img_resize("modules/board/upload/" . $board_id . "/", $file2, $width, $height, $margin, $quard);
        } else {
            if (isset($match[0])) {
                $thumb = "<img src=\"{$match[1]}\" width=\"" . $width . "\" height=\"" . $height . "\" />";
            } else {
                $thumb = $lib->func_img_resize("images/", "blank_thumbnail.jpg", $width, $height, $margin, $quard);
            }
        }
    }
    return $thumb;
}
Beispiel #2
0
/*
템플릿 치환
*/
//header
echo $header->skin_echo();
//loop
if ($array_total > 0) {
    $i = 0;
    do {
        $mysql->htmlspecialchars = 1;
        $mysql->nl2br = 1;
        $mysql->fetchArray("img,name,memo,void_use,link");
        $array = $mysql->array;
        $loop->skin_modeling("[number]", $paging->getNo($i));
        $i++;
        $loop->skin_modeling("[memo]", $array['memo']);
        $loop->skin_modeling("[link]", link_func());
        $loop->skin_modeling("[use_void]", use_void());
        $loop->skin_modeling("[thumbnail]", $lib->func_img_resize("upload/siteInformations/", $array['img'], 120, 60, 0, 0));
        $loop->skin_modeling("[modify_btn]", "<a href=\"" . __URL_PATH__ . "admin/?p=popupList_modify&type=modify&act=" . $array['name'] . "\" class=\"__btn_s_setting\" title=\"설정 변경\"></a>");
        echo $loop->skin_echo();
    } while ($mysql->nextRec());
}
//footer
if ($array_total > 0) {
    $footer->skin_modeling_hideArea("[{not_content_start}]", "[{not_content_end}]", "hide");
} else {
    $footer->skin_modeling_hideArea("[{not_content_start}]", "[{not_content_end}]", "show");
}
$footer->skin_modeling("[paging_area]", $paging->Show(__URL_PATH__ . "admin/?p=poopupList"));
echo $footer->skin_echo();
Beispiel #3
0
} else {
    if ($type == "new") {
        $tpl->skin_modeling_hideArea("[{name_new_start}]", "[{name_new_end}]", "show");
        $tpl->skin_modeling_hideArea("[{name_modify_start}]", "[{name_modify_end}]", "hide");
        $tpl->skin_modeling_hideArea("[{deleteBtn_start}]", "[{deleteBtn_end}]", "hide");
        $tpl->skin_modeling_hideArea("[{popup_modify_start}]", "[{popup_modify_end}]", "hide");
        $tpl->skin_modeling("[btop]", 200);
        $tpl->skin_modeling("[bleft]", 300);
        $tpl->skin_modeling("[link]", "");
        $tpl->skin_modeling("[pop_article_txt]", "");
    }
}
$tpl->skin_modeling("[site_url]", $site_config['ad_site_url']);
$tpl->skin_modeling("[name]", $array['name']);
$tpl->skin_modeling("[memo]", $array['memo']);
$tpl->skin_modeling("[img_value]", $array['img']);
$tpl->skin_modeling("[bleft]", $array['bleft']);
$tpl->skin_modeling("[btop]", $array['btop']);
$tpl->skin_modeling("[link]", $array['link']);
$tpl->skin_modeling("[target_radio_self_checked]", target_radio_checked("_self"));
$tpl->skin_modeling("[target_radio_blank_checked]", target_radio_checked("_blank"));
$tpl->skin_modeling("[link_radio_Y_checked]", link_radio_checked("Y"));
$tpl->skin_modeling("[link_radio_N_checked]", link_radio_checked("N"));
$tpl->skin_modeling("[use_radio_Y_checked]", use_radio_checked("Y"));
$tpl->skin_modeling("[use_radio_N_checked]", use_radio_checked("N"));
$tpl->skin_modeling("[img_file_name]", $lib->func_img_resize("upload/siteInformations/", $array['img'], 300, 300, 0, 1));
$tpl->skin_modeling("[type_value]", $type);
$tpl->skin_modeling("[pop_article_option_value]", pop_article_option_value());
$tpl->skin_modeling("[memeber_level_option_value]", memeber_level_option_value("start_level"));
$tpl->skin_modeling("[memeber_level_option_value_end]", memeber_level_option_value("end_level"));
echo $tpl->skin_echo();