대류님의 웹진 최근게시물을
감사히 이용하고 있습니다.
그런데
웹사이트에 꼭 필요해서
제로보드 활용팁을 이용하여
카테고리마다 상단에 다른 이미지를
사용하고 있습니다.
그런데 최근게시물을 클릭했을때
상단 이미지가 나타나지 않습니다.
카테고리에 관한 링크가
제로보드 본래의 outlogin.php에서나
대류님의 웹진 최근게시물에서
카테고리에 관련된 정보가
주어지지 않기 때문입니다.
대류님의 최근게시물의 링크소스는 아래와 같습니다.
<a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&no=$data[no]>
이것을
<a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&category=<?=$category_no?>&no=$data[no]>
예를 들어 이런 방법으로 카테고리에 관한
정보를 연결할수가 없을까요?
물론 복잡하고 시간이 많이 걸리는 문제이지만
하도 답답한 마음에 이곳에 올려봅니다.
혹시 도움을 주시면
감사하고 또 감사하겠습니다.
아래는 대류님 최근게시물의 소스입니다.
----------------------------------------------------------------------------------------------
<?
// 자신의 계정에 맞게 설정해 주세요.
$디비호스트 = "localhost"; //디비 호스트를 적습니다.
$디비아이디 = ""; // 디비아이디를 적습니다.
$디비비밀번호 = ""; // 디비비밀번호를 적습니다.
$디비네임 = ""; // 디비네임을 적습니다.
$제로보드경로 = ""; // 제로보드가 설치되어 있는 경로를 적습니다. 끝에 /는 넣지 마세요.
// 다시한번 위 설정이 맞는지 확인하세요.
// 다른건 손데지 않아도 됩니다. 위의 DB 정보만 적으면 됩니다.
//게시판이름, 리스트갯수, 박스제목, 코멘트유무, 글쓴이유무, 날짜유무, 리스트제목글자수, 리스트본문글자수, new이미지유무, 리스트높이, 이미지넓이, 이미지높이, 이미지/제목/본문출력갯수
function dasom_webjin_right($id, $number, $title, $set_comment, $set_name, $set_date, $list_title, $list_memo, $set_new, $list_height, $img_width, $img_height, $change_point)
{
global $디비호스트,$디비아이디,$디비비밀번호,$디비네임,$제로보드경로,$제목길이,$올드아이콘,$뉴아이콘;
$디비접속=mysql_connect($디비호스트,$디비아이디,$디비비밀번호);
mysql_select_db($디비네임,$디비접속);
$result=mysql_query("select * from zetyx_board_$id where is_secret=0 order by no desc limit $number",$디비접속) or die(mysql_error());
// 상단 도트 박스 시작
echo("<table border=0 width=100% cellspacing=0 cellpadding=0>");
echo("<TR>");
echo("<TD>");
echo("<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>");
echo("<TBODY>");
echo("<TR>");
echo("<TD width=100% height=1 background=$제로보드경로/latest_skin/dasom_webjin_n/images/dot_bar.gif> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=28> <img src='$제로보드경로/latest_skin/dasom_webjin_n/images/head.gif'> <a onfocus='this.blur()' href='$제로보드경로/zboard.php?id=$id'>$title</a></TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=1 background=$제로보드경로/latest_skin/dasom_webjin_n/images/dot_bar.gif> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=3 bgcolor=#F5F5F5> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=5> </TD>");
echo("</TR>");
echo("</TBODY>");
echo("</TABLE>");
echo("</TD>");
echo("</TR>");
echo("</table>");
// 상단 도트 박스 끝
$change_count = 0; // by wolf
while($data=mysql_fetch_array($result))
{
$change_count = $change_count + 1; //이미지/제목/본문 출력관련
if($set_name == 1){
$name = stripslashes($data[name]);
$name = "<font color=gray style=font-size:7pt;font-family:tahoma;>by</font><font color=#333333 style=font-size:9pt;font-family:verdana,돋움;> ".$name."</font>";
}
// $data[memo] = del_html(stripslashes($data[memo])); // 본문 html태그 막기.
$data[memo] = strip_tags(stripslashes($data[memo])); // 본문 html태그 삭제
$data[memo]=cut_str($data[memo],$list_memo); // 리스트 본문 글자수입니다.
// $data[memo] = str_replace( "<", "<",$data[memo]);
// $data[memo] = str_replace( ">", ">",$data[memo]);
$data[subject] = stripslashes($data[subject]);
$data[subject] = strip_tags(stripslashes($data[subject])); // 리스트 제목 html태그 삭제
$data[subject]=cut_str($data[subject],$list_title); // 리스트 제목 글자수입니다.
if ( ($data[total_comment] > 0 ) && ($set_comment == 1) ) // 코멘트 유무설정
$data[total_comment]= " <font color=#C00000>+</font> <font color=#C00000>".$data[total_comment]."</font>";
else $data[total_comment]=" ";
if ($set_date == 1 ) // 날짜유무 설정
$reg_date = " ".date("Y.m.d",$data[reg_date])." ";
else $reg_date =" ";
echo(" ");
$passtime = (mktime()-$data[reg_date])/3600;
if(($passtime <48) && ($set_new == 1)) {
$data[subject] = "".$data[subject]."<font color=#333333 style=font-size:7pt;font-family:tahoma;> $data[total_comment] </font>$name <img src=$제로보드경로/latest_skin/dasom_webjin_n/images/new.gif border=0 align=absmiddle>"; // 새 글(new) 아이콘 출력
}else{
$data[subject] = "".$data[subject]."<font color=#333333 style=font-size:7pt;font-family:tahoma;> $data[total_comment] </font>$name";
}
if ($change_point >= $change_count) {
if (!stripslashes($data[file_name2]))
{
// 이미지 출려되지 않을 때
echo " <style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' height='$list_height' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td width='100%' class=dasom_title height=20 valign='top'><img src='$제로보드경로/latest_skin/dasom_webjin_n/images/dasom_arrow.gif'> <a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'><b>".stripslashes($data[subject])."</b></a>");
echo("<font color=green style=font-size:7pt;font-family:tahoma;> ".$reg_date."</font></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' valign=top class=dasom_subject style=text-align:justify;><font color=#666666>".stripslashes($data[memo])."</font></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' height='10' background='$제로보드경로/latest_skin/dasom_webjin_n/images/dot_garo.gif'>");// 도트(점선) 이미지 출력
echo("</td>");
echo("</tr>");
echo("</table>");
}else{
// 이미지 출력 될 때
echo "<style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
.dasom_h {font-family:verdana,돋움;font-size:9pt;color:royalblue;height:20;}
.dasom_c {font-family:tahoma;font-size:7pt;color:green;height:20;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' height='$list_height' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td valign='top' style='padding-top:5;'><a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'><font class=dasom_h>".stripslashes($data[subject])."</font></a><font class=dasom_c> ".$reg_date."</font><br><a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&no=$data[no]><img src=$제로보드경로/".stripslashes($data[file_name2])." border=1 hspace=5 width='$img_width' height='$img_height' align='right' style='border-color:#D7D7D7'></a>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' height='10' colspan=2 background='$제로보드경로/latest_skin/dasom_webjin_n/images/dot_garo.gif'>");// 도트(점선) 이미지 출력
echo("</td>");
echo("</tr>");
echo("</table>");
} //if문의 끝
} else { // by wolf - start
echo " <style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td width='100%' class=dasom_title height=20><img src='$제로보드경로/latest_skin/dasom_webjin_n/images/dasom_arrow.gif'> <a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') >".stripslashes($data[subject])."</a>");
echo("<font color=#666666 style=font-size:7pt;font-family:tahoma;> ".$reg_date."</font></td>");
echo("</tr>");
echo("</table>");
} // by wolf - end
} // while문 끝
} // 함수 끝
감사히 이용하고 있습니다.
그런데
웹사이트에 꼭 필요해서
제로보드 활용팁을 이용하여
카테고리마다 상단에 다른 이미지를
사용하고 있습니다.
그런데 최근게시물을 클릭했을때
상단 이미지가 나타나지 않습니다.
카테고리에 관한 링크가
제로보드 본래의 outlogin.php에서나
대류님의 웹진 최근게시물에서
카테고리에 관련된 정보가
주어지지 않기 때문입니다.
대류님의 최근게시물의 링크소스는 아래와 같습니다.
<a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&no=$data[no]>
이것을
<a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&category=<?=$category_no?>&no=$data[no]>
예를 들어 이런 방법으로 카테고리에 관한
정보를 연결할수가 없을까요?
물론 복잡하고 시간이 많이 걸리는 문제이지만
하도 답답한 마음에 이곳에 올려봅니다.
혹시 도움을 주시면
감사하고 또 감사하겠습니다.
아래는 대류님 최근게시물의 소스입니다.
----------------------------------------------------------------------------------------------
<?
// 자신의 계정에 맞게 설정해 주세요.
$디비호스트 = "localhost"; //디비 호스트를 적습니다.
$디비아이디 = ""; // 디비아이디를 적습니다.
$디비비밀번호 = ""; // 디비비밀번호를 적습니다.
$디비네임 = ""; // 디비네임을 적습니다.
$제로보드경로 = ""; // 제로보드가 설치되어 있는 경로를 적습니다. 끝에 /는 넣지 마세요.
// 다시한번 위 설정이 맞는지 확인하세요.
// 다른건 손데지 않아도 됩니다. 위의 DB 정보만 적으면 됩니다.
//게시판이름, 리스트갯수, 박스제목, 코멘트유무, 글쓴이유무, 날짜유무, 리스트제목글자수, 리스트본문글자수, new이미지유무, 리스트높이, 이미지넓이, 이미지높이, 이미지/제목/본문출력갯수
function dasom_webjin_right($id, $number, $title, $set_comment, $set_name, $set_date, $list_title, $list_memo, $set_new, $list_height, $img_width, $img_height, $change_point)
{
global $디비호스트,$디비아이디,$디비비밀번호,$디비네임,$제로보드경로,$제목길이,$올드아이콘,$뉴아이콘;
$디비접속=mysql_connect($디비호스트,$디비아이디,$디비비밀번호);
mysql_select_db($디비네임,$디비접속);
$result=mysql_query("select * from zetyx_board_$id where is_secret=0 order by no desc limit $number",$디비접속) or die(mysql_error());
// 상단 도트 박스 시작
echo("<table border=0 width=100% cellspacing=0 cellpadding=0>");
echo("<TR>");
echo("<TD>");
echo("<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>");
echo("<TBODY>");
echo("<TR>");
echo("<TD width=100% height=1 background=$제로보드경로/latest_skin/dasom_webjin_n/images/dot_bar.gif> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=28> <img src='$제로보드경로/latest_skin/dasom_webjin_n/images/head.gif'> <a onfocus='this.blur()' href='$제로보드경로/zboard.php?id=$id'>$title</a></TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=1 background=$제로보드경로/latest_skin/dasom_webjin_n/images/dot_bar.gif> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=3 bgcolor=#F5F5F5> </TD>");
echo("</TR>");
echo("<TR>");
echo("<TD width=100% height=5> </TD>");
echo("</TR>");
echo("</TBODY>");
echo("</TABLE>");
echo("</TD>");
echo("</TR>");
echo("</table>");
// 상단 도트 박스 끝
$change_count = 0; // by wolf
while($data=mysql_fetch_array($result))
{
$change_count = $change_count + 1; //이미지/제목/본문 출력관련
if($set_name == 1){
$name = stripslashes($data[name]);
$name = "<font color=gray style=font-size:7pt;font-family:tahoma;>by</font><font color=#333333 style=font-size:9pt;font-family:verdana,돋움;> ".$name."</font>";
}
// $data[memo] = del_html(stripslashes($data[memo])); // 본문 html태그 막기.
$data[memo] = strip_tags(stripslashes($data[memo])); // 본문 html태그 삭제
$data[memo]=cut_str($data[memo],$list_memo); // 리스트 본문 글자수입니다.
// $data[memo] = str_replace( "<", "<",$data[memo]);
// $data[memo] = str_replace( ">", ">",$data[memo]);
$data[subject] = stripslashes($data[subject]);
$data[subject] = strip_tags(stripslashes($data[subject])); // 리스트 제목 html태그 삭제
$data[subject]=cut_str($data[subject],$list_title); // 리스트 제목 글자수입니다.
if ( ($data[total_comment] > 0 ) && ($set_comment == 1) ) // 코멘트 유무설정
$data[total_comment]= " <font color=#C00000>+</font> <font color=#C00000>".$data[total_comment]."</font>";
else $data[total_comment]=" ";
if ($set_date == 1 ) // 날짜유무 설정
$reg_date = " ".date("Y.m.d",$data[reg_date])." ";
else $reg_date =" ";
echo(" ");
$passtime = (mktime()-$data[reg_date])/3600;
if(($passtime <48) && ($set_new == 1)) {
$data[subject] = "".$data[subject]."<font color=#333333 style=font-size:7pt;font-family:tahoma;> $data[total_comment] </font>$name <img src=$제로보드경로/latest_skin/dasom_webjin_n/images/new.gif border=0 align=absmiddle>"; // 새 글(new) 아이콘 출력
}else{
$data[subject] = "".$data[subject]."<font color=#333333 style=font-size:7pt;font-family:tahoma;> $data[total_comment] </font>$name";
}
if ($change_point >= $change_count) {
if (!stripslashes($data[file_name2]))
{
// 이미지 출려되지 않을 때
echo " <style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' height='$list_height' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td width='100%' class=dasom_title height=20 valign='top'><img src='$제로보드경로/latest_skin/dasom_webjin_n/images/dasom_arrow.gif'> <a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'><b>".stripslashes($data[subject])."</b></a>");
echo("<font color=green style=font-size:7pt;font-family:tahoma;> ".$reg_date."</font></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' valign=top class=dasom_subject style=text-align:justify;><font color=#666666>".stripslashes($data[memo])."</font></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' height='10' background='$제로보드경로/latest_skin/dasom_webjin_n/images/dot_garo.gif'>");// 도트(점선) 이미지 출력
echo("</td>");
echo("</tr>");
echo("</table>");
}else{
// 이미지 출력 될 때
echo "<style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
.dasom_h {font-family:verdana,돋움;font-size:9pt;color:royalblue;height:20;}
.dasom_c {font-family:tahoma;font-size:7pt;color:green;height:20;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' height='$list_height' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td valign='top' style='padding-top:5;'><a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'><font class=dasom_h>".stripslashes($data[subject])."</font></a><font class=dasom_c> ".$reg_date."</font><br><a onfocus='this.blur()' href=$제로보드경로/view.php?id=$id&no=$data[no]><img src=$제로보드경로/".stripslashes($data[file_name2])." border=1 hspace=5 width='$img_width' height='$img_height' align='right' style='border-color:#D7D7D7'></a>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' height='10' colspan=2 background='$제로보드경로/latest_skin/dasom_webjin_n/images/dot_garo.gif'>");// 도트(점선) 이미지 출력
echo("</td>");
echo("</tr>");
echo("</table>");
} //if문의 끝
} else { // by wolf - start
echo " <style>
.dasom_subject {font-family:verdana,돋움;font-size:9pt;color:#666666;}
.dasom_title {font-family:verdana,돋움;font-size:9pt;color:#333333;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%' style=padding-left:5px;padding-right:5px;>");
echo("<tr>");
echo("<td width='100%' class=dasom_title height=20><img src='$제로보드경로/latest_skin/dasom_webjin_n/images/dasom_arrow.gif'> <a onfocus='this.blur()' href='$제로보드경로/view.php?id=$id&no=$data[no]') >".stripslashes($data[subject])."</a>");
echo("<font color=#666666 style=font-size:7pt;font-family:tahoma;> ".$reg_date."</font></td>");
echo("</tr>");
echo("</table>");
} // by wolf - end
} // while문 끝
} // 함수 끝