최근게시물 new.skin.php에서 새창 띄우기 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최근게시물 new.skin.php에서 새창 띄우기 정보

최근게시물 new.skin.php에서 새창 띄우기

본문

최근게시물 skin/new/basic/new.skin.php에서 새창 띄우기를 하려니 안되는군요.

최신글에서는 답변이 많은데요.

댓글 전체

답변 감사합니다만 도움이 되질 못하는군요. new.skin.php 는 이렇습니다

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>



<!-- 분류 시작 -->
<form name=fnew method=get style="margin:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td height=30>
        <?=$group_select?>
        <select id=view name=view onchange="select_change()">
            <option value=''>전체게시물
            <option value='w'>원글만
            <option value='c'>코멘트만
        </select>
        &nbsp;<b>회원아이디 : </b>
        <input type=text id='mb_id' name='mb_id' value='<?=$mb_id?>'>
        <input type=submit value='검색'>
        <script language="JavaScript">
        function select_change()
        {
            document.fnew.submit();
        }
        document.getElementById("gr_id").value = "<?=$gr_id?>";
        document.getElementById("view").value = "<?=$view?>";
        </script>
    </td>
</tr>
</table>
</form>
<!-- 분류 끝 -->

<!-- 제목 시작 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td height="1" bgcolor="#CCCCCC"></td>
</tr>
<?
for ($i=0; $i<count($list); $i++)
{
    $gr_subject = $list[$i][gr_subject];
    $bo_subject = $list[$i][bo_subject];
    $wr_subject = get_text(cut_str($list[$i][wr_subject], 40));
    $wr_content = cut_str($list[$i][wr_content], 300);

$wr_content = strip_tags($wr_content);

if($list[$i][gr_id] == "cafe"){

if (!$list[$i][comment]){

$icon = "<img src='{$new_skin_path}/img/sub_icon.gif' border='0' align='absmiddle' title='subject'>";

$java_act2 = $list[$i][bo_table].$i;
$list[$i][doc] = "$g4[bbs_path]/board.php?bo_table=".$list[$i][bo_table]."&wr_id=".$list[$i][wr_id]."&sca=".$list[$i][ca_name];
$href = "<SCRIPT LANGUAGE=\"JavaScript\">
function ex".$java_act2."()
{
var f = document.form".$java_act2.";

f.action = \"$g4[path]/cafe/cafe_main.php?cb_id=".$list[$i][bo_table]."\";
f.submit();
}
</SCRIPT>
<table width=\"97%\" align=center  border=\"0\" cellspacing=\"0\">
<tr>
<form method=\"post\" name=\"form".$java_act2."\">
<td width='' style='word-break:break-all;' height=20>
<INPUT TYPE=\"hidden\" name=doc value=\"".$list[$i][doc]."\">
{$icon}&nbsp;
<a class=\"n_title3\" href=\"javascript:ex".$java_act2."();\"><B>".$wr_subject."</B></a>
</td>
</tr>
<tr>
<td width='' style='word-break:break-all;'>
<a href='".$list[$i][href]."'>$wr_content</a>
</td>
</tr>
<tr>
<td width='' align=right style='word-break:break-all;'>
<span class=\"n_title1\">[ <a class=\"n_title1\" href='./new.php?gr_id=".$list[$i][gr_id]."'>{$gr_subject}</a> : <a class=\"n_title1\" href='./board.php?bo_table=".$list[$i][bo_table]."'>{$bo_subject}</a> ]→[".$list[$i][datetime2]."&nbsp;&nbsp;".$list[$i][name]."]</span>
</td>
</form>
</tr>
</table>";

} else {

$icon = str_replace("[코]", "<img src='{$new_skin_path}/img/com_icon.gif' border='0' align='absmiddle' title='코멘트'>", $list[$i][comment]);

$java_act2 = $list[$i][bo_table].$i;
$list[$i][doc] = "$g4[bbs_path]/board.php?bo_table=".$list[$i][bo_table]."&wr_id=".$list[$i][wr_id]."&sca=".$list[$i][ca_name];
$href = "<SCRIPT LANGUAGE=\"JavaScript\">
function ex".$java_act2."()
{
var f = document.form".$java_act2.";

f.action = \"$g4[path]/cafe/cafe_main.php?cb_id=".$list[$i][bo_table]."\";
f.submit();
}
</SCRIPT>
<table width=\"97%\" align=center  border=\"0\" cellspacing=\"0\">
<tr>
<form method=\"post\" name=\"form".$java_act2."\">
<td width='' style='word-break:break-all;' height=20>
<INPUT TYPE=\"hidden\" name=doc value=\"".$list[$i][doc]."\">
{$icon}&nbsp;<img src='{$new_skin_path}/img/sub_icon.gif' border='0' align='absmiddle' title='subject'>&nbsp;&nbsp;
<a class=\"n_title2\" href=\"javascript:ex".$java_act2."();\"><B>".$wr_subject."</B></a>
<span class=\"n_title1\">[ <a class=\"n_title1\" href='./new.php?gr_id=".$list[$i][gr_id]."'>{$gr_subject}</a> : <a class=\"n_title1\" href='./board.php?bo_table=".$list[$i][bo_table]."'>{$bo_subject}</a> ]→[".$list[$i][datetime2]."&nbsp;&nbsp;".$list[$i][name]."]</span>
</td>
</form>
</tr>
</table>";

}


} else {

if (!$list[$i][comment]){
$icon = "<img src='{$new_skin_path}/img/sub_icon.gif' border='0' align='absmiddle' title='subject'>";

$href = "<table width=\"97%\" align=center  border=\"0\" cellspacing=\"0\">
<tr>
<td width='' style='word-break:break-all;' height=20>
&nbsp;{$icon}
<a class=\"n_title3\" href=\"".$list[$i][href]."\"><B>".$wr_subject."</B></a>
</td>
</tr>
<tr>
<td width='' style='word-break:break-all;'>
<a href='".$list[$i][href]."'>$wr_content</a>
</td>
</tr>
<tr>
<td width='' align=right style='word-break:break-all;'>
<span class=\"n_title1\">[ <a class=\"n_title1\" href='./new.php?gr_id=".$list[$i][gr_id]."'>{$gr_subject}</a> : <a class=\"n_title1\" href='./board.php?bo_table=".$list[$i][bo_table]."'>{$bo_subject}</a> ]→[".$list[$i][datetime2]."&nbsp;&nbsp;".$list[$i][name]."]</span>
</td>
</tr>
</table>";

} else {

$icon = str_replace("[코]", "<img src='{$new_skin_path}/img/com_icon.gif' border='0' align='absmiddle' title='코멘트'>", $list[$i][comment]);

$href = "<table width=\"97%\" align=center  border=\"0\" cellspacing=\"0\">
<tr>
<td width='' style='word-break:break-all;' height=20>
&nbsp;{$icon}
<a class=\"n_title2\" href=\"".$list[$i][href]."\"><B>".$wr_subject."</B></a>
<span class=\"n_title1\">[ <a class=\"n_title1\" href='./new.php?gr_id=".$list[$i][gr_id]."'>{$gr_subject}</a> : <a class=\"n_title1\" href='./board.php?bo_table=".$list[$i][bo_table]."'>{$bo_subject}</a> ]→[".$list[$i][datetime2]."&nbsp;&nbsp;".$list[$i][name]."]</span>
</td>
</tr>
</table>";

}
}


$_width = "100";
$_height = "70";
$quality = "80";


$data_path = $g4['path']."/data/file/".$list[$i][bo_table];
$thumb_path = $data_path.'/thumb';
$thumb = $thumb_path."/".$list[$i][wr_id];

@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);


    $sql=" select * from $g4[board_file_table] where  bo_table = '".$list[$i][bo_table]."' and wr_id = '".$list[$i][wr_id]."' and bf_no = '0' order by bf_no asc";
    $_file = sql_fetch($sql);

if (!file_exists($thumb))
    {
        $file = $data_path .'/'. $_file[bf_file];
    // 업로드된 파일이 이미지라면
    if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
        $size = getimagesize($file);
        if ($size[2] == 1)
            $src = imagecreatefromgif($file);
        else if ($size[2] == 2)
            $src = imagecreatefromjpeg($file);
        else if ($size[2] == 3)
            $src = imagecreatefrompng($file);
        else
            break;

        $rate = $_width / $size[0];
        $height = (int)($size[1] * $rate);

        @unlink($thumb_path.'/'.$list[$i][wr_id]);
        // 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
        if ($height < $_height){
            // 계산된 이미지 높이로 복사본 이미지 생성
            $dst = imagecreatetruecolor($_width, $height);
        } else {
            // 설정된 이미지 높이로 복사본 이미지 생성
            $dst = imagecreatetruecolor($_width, $_height);
}
        imagecopyresampled($dst, $src, 0, 0, 0, 0, $_width, $height, $size[0], $size[1]);
        imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $quality);
        chmod($thumb_path.'/'.$list[$i][wr_id], 0606);

        }
    }



if (file_exists($thumb)){
$image_t = "<td align='center' height='30' width='80'><img src='$thumb' border=1 width='80'></td><td align='center' width='5'>&nbsp;</td>";
} else {
    $image_t = "";
}
if(!$list[$i][comment]){

    echo <<<HEREDOC

<tr>
    <td height="5"></td>
</tr>
<tr>
    <td width="">
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
$image_t
<TD valign="top">
$href
</TD>
</TR>
</TABLE>
</td>
</tr>
<tr>
    <td height="5"></td>
</tr>
<tr>
    <td height="1" background="{$new_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
} else {
    echo <<<HEREDOC

<tr>
    <td colspan="$colspan" height="5"></td>
</tr>
<tr>
<td width="">
$href
</td>
</tr>
<tr>
    <td colspan="$colspan" height="5"></td>
</tr>
<tr>
    <td colspan="$colspan" height="1" background="{$new_skin_path}/img/dot_bg.gif"></td>
</tr>
HEREDOC;
}
}
?>

<? if ($i == 0) { ?>
<tr><td height=50 align=center>게시물이 없습니다.</td></tr>
<? } ?>
<tr>
    <td height="30" align="center"><?=$write_pages?></td>
</tr>
</table>
전체 27 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT