묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
==아래파일명 slide1.htm에서 slide1-view.php파일 include해서 조회된내용 5개 가져옴
근데 데이터와 사진은 불러오는데 사진이 링크가 안됩니다. 한번 마우스를 움직이면
그때 되구요 slide1-view.php에 있는 bbs_latest()를 호출하는 겁니다.
뭐가 문제인지 궁금합니다.
==아래파일명 slide1.htm입니다.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title> 제목 없음</title>
<meta name="GENERATOR" content="Namo WebEditor v6.0">
<meta name="description" content="스타일이 전혀 적용되지 않은 새 문서 양식을 만듭니다.">
<?
$_zb_url="http://k-auto.net/~mjlee/woorimarin/";
$_zb_path = "/home/mjlee/public_html/woorimarin/";
include $_zb_path."slide1-view.php";
?>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="white">
<table>
<tr>
<td width="713" height="275" valign="top">
<script>
var bwhref = "";
function bwhrefgo()
{
this.location=bwhref;
}
//원하는 상위 메뉴 수 만큼 생성
function change_href(layerno)
{
if (layerno == 1)
{
bwhref="";
}
else if (layerno == 2)
{
bwhref="";
}
}
function MM_findObj(n, d) { //v4.0
var p,i,x;
if(!d)
d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length)
{
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
}
if(!(x=d[n])&&d.all)
x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById)
x=document.getElementById(n); return x;
}
//==============================================================================
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
if ((obj=MM_findObj(args[i]))!=null)
{
v=args[i+2];
if (obj.style)
{
obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v;
}
obj.visibility=v;
}
}
</script>
<TABLE cellSpacing="0" cellPadding="0" width=580 align=left border="0" style="padding-top:0px; padding-left:0px">
<tr>
<td height="23" background="../slide_menu_fig/javaimages/notice-bg.gif ">
<div>
<table align=left valign=top>
<tr>
<TD width=72 height=23 class="ms"><A onmouseover="MM_showHideLayers('+ '+ 'Layer1','','hide','Layer2','','hide','Layer3','','hide','news1','','show','news2','','hide','news3',''+ ','hide','title1','','show','title2','','hide','title3'+ ',''+ ','hide'); cursor='hand'; change_href(1);"><img src="../slide_menu_fig/javaimages/menu1-2.gif" border=0></A></td>
<TD width=72 height=23 class="ms"><A onmouseover="MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','news1','','hide','news2','','show','news3','','hide','title1','+ '','hide','title2','','show','title3','','hide'); cursor='hand'; change_href(2);"><img src="../slide_menu_fig/javaimages/menu1-3.gif" border=0></A></td>
</tr>
</table>
</div>
</td>
<td width=72 height=23><a href="../bbs/zboard.php?id=bbs1" target="_parent">
<img src="../slide_menu_fig/javaimages/news_more.gif" border=0></a>
</td>
</tr>
</TABLE>
<!--묶음 div -->
<DIV style="Z-INDEX: 4; WIDTH: 580px; POSITION: absolute; HEIGHT: 170px ; LEFT : 200PX; TOP : 40PX;">
<DIV id="news1" style="width:580px; height:170px; position:absolute; left:1px; top:160px; z-index:5;">
<META http-equiv=Content-Type content="text/html; charset=ks_c_5601-1987">
<link rel="stylesheet" href="css/main.css">
<table width="580" border="0" cellspacing="5" cellpadding="0">
<tr><td width=440><? bbs_latest("PORTER 1T")?></td></tr>
</table>
</DIV>
<DIV id="news2" style="width:580px; height:170px; position:absolute; left:1px; top:160px; z-index:6; visibility:hidden;">
<META http-equiv=Content-Type content="text/html; charset=ks_c_5601-1987">
<link rel="stylesheet" href="css/main.css">
<table width="580" border="0" cellspacing="5" cellpadding="0">
<tr><td width=440><? bbs_latest("TICO")?></td></tr>
</table>
</DIV>
</DIV>
<DIV id="title1" style="Z-INDEX: 11; LEFT: 259px; WIDTH: 72px; POSITION: absolute; TOP: 182px; HEIGHT: 50px; class=ms">
<a href="http://busanjin.kdlp.org/busanjin1/bbs/zboard.php?id=committee" target="_parent">
<img border="0" src="../slide_menu_fig/javaimages/menu1-2.gif" class=ms></a></DIV>
<DIV id="title2" style="Z-INDEX: 12; LEFT: 335px; VISIBILITY: hidden; WIDTH: 72px; POSITION: absolute; TOP: 182px; HEIGHT: 50px; class=ms">
<a href="http://busanjin.kdlp.org/busanjin1/bbs/zboard.php?id=bbs1" target="_parent">
<img border="0" src="../slide_menu_fig/javaimages/menu1-3.gif" class=ms></a></DIV>
</td></tr>
</table>
</body>
</html>
=== 아래 파일명 slide1-view.php
<?
// 게시물 함수.
function bbs_latest($tcarkind)
{
?>
<TABLE borderColor=#999999 cellSpacing=1 borderColorDark=#eeeeee cellPadding=1
width="70%" align=center bgColor=#dddddd borderColorLight=#999999 border=0>
<?
/* 해당 게시판 테이블에서 게시물 리스트 추출 */
$connect = mysql_connect("localhost","aaa","1234");
mysql_select_db("kauto",$connect);
$sQuery = "Select * From mainlist where carkind = '$tcarkind' and no like '04%' ";
$sQuery .= "order by no asc limit 5";
$objRecordSet = mysql_query($sQuery, $connect);
$iTotalRecord = mysql_num_rows($objRecordSet);
for($i = 0; $i < 5; $i++) {
$objRecord = mysql_fetch_array($objRecordSet, MYSQL_ASSOC);
$iUno = $objRecord["id"];
$no = $objRecord["no"];
$carkind = $objRecord["carkind"];
echo ("<tr>
<td align=left height=23 bgcolor=#E9EBF2><p><span style=font-size:9pt;><font face=Arial>$no</font></span></p></td>
<td align=center height=23 bgcolor=#E9EBF2><p>
<a href='carview.htm?imgno=$no-1' target=_parent><span style=font-size:9pt;><font face=Arial>$carkind</font></span></a></p></td>
<td align=center height=23 bgcolor=#E9EBF2><p>
<a href='carview.htm?imgno=$no-1'><img border=1 HEIGHT=23 WIDTH=30 SRC='http://k-auto.net/~carimage/$no-1.jpg'></a></p></td>
///// 처음에 화면에 뜰때는 이부분이 링크가 안됩니다. 마우스를 해당 버튼에 올려놓으면 데이터가 바뀌고 링크도 살아납니다.
</tr>
");
}
mysql_free_result($objRecordSet);
?>
<br>
</table>
<?
}
?>
최근 게시물 연습중.. 질문입니다.
2006.08.23 16:58
==아래파일명 slide1.htm에서 slide1-view.php파일 include해서 조회된내용 5개 가져옴
근데 데이터와 사진은 불러오는데 사진이 링크가 안됩니다. 한번 마우스를 움직이면
그때 되구요 slide1-view.php에 있는 bbs_latest()를 호출하는 겁니다.
뭐가 문제인지 궁금합니다.
==아래파일명 slide1.htm입니다.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title> 제목 없음</title>
<meta name="GENERATOR" content="Namo WebEditor v6.0">
<meta name="description" content="스타일이 전혀 적용되지 않은 새 문서 양식을 만듭니다.">
<?
$_zb_url="http://k-auto.net/~mjlee/woorimarin/";
$_zb_path = "/home/mjlee/public_html/woorimarin/";
include $_zb_path."slide1-view.php";
?>
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="white">
<table>
<tr>
<td width="713" height="275" valign="top">
<script>
var bwhref = "";
function bwhrefgo()
{
this.location=bwhref;
}
//원하는 상위 메뉴 수 만큼 생성
function change_href(layerno)
{
if (layerno == 1)
{
bwhref="";
}
else if (layerno == 2)
{
bwhref="";
}
}
function MM_findObj(n, d) { //v4.0
var p,i,x;
if(!d)
d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length)
{
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
}
if(!(x=d[n])&&d.all)
x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById)
x=document.getElementById(n); return x;
}
//==============================================================================
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
if ((obj=MM_findObj(args[i]))!=null)
{
v=args[i+2];
if (obj.style)
{
obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v;
}
obj.visibility=v;
}
}
</script>
<TABLE cellSpacing="0" cellPadding="0" width=580 align=left border="0" style="padding-top:0px; padding-left:0px">
<tr>
<td height="23" background="../slide_menu_fig/javaimages/notice-bg.gif ">
<div>
<table align=left valign=top>
<tr>
<TD width=72 height=23 class="ms"><A onmouseover="MM_showHideLayers('+ '+ 'Layer1','','hide','Layer2','','hide','Layer3','','hide','news1','','show','news2','','hide','news3',''+ ','hide','title1','','show','title2','','hide','title3'+ ',''+ ','hide'); cursor='hand'; change_href(1);"><img src="../slide_menu_fig/javaimages/menu1-2.gif" border=0></A></td>
<TD width=72 height=23 class="ms"><A onmouseover="MM_showHideLayers('Layer1','','hide','Layer2'+ ','','hide','Layer3','','hide','news1','','hide','news2','','show','news3','','hide','title1','+ '','hide','title2','','show','title3','','hide'); cursor='hand'; change_href(2);"><img src="../slide_menu_fig/javaimages/menu1-3.gif" border=0></A></td>
</tr>
</table>
</div>
</td>
<td width=72 height=23><a href="../bbs/zboard.php?id=bbs1" target="_parent">
<img src="../slide_menu_fig/javaimages/news_more.gif" border=0></a>
</td>
</tr>
</TABLE>
<!--묶음 div -->
<DIV style="Z-INDEX: 4; WIDTH: 580px; POSITION: absolute; HEIGHT: 170px ; LEFT : 200PX; TOP : 40PX;">
<DIV id="news1" style="width:580px; height:170px; position:absolute; left:1px; top:160px; z-index:5;">
<META http-equiv=Content-Type content="text/html; charset=ks_c_5601-1987">
<link rel="stylesheet" href="css/main.css">
<table width="580" border="0" cellspacing="5" cellpadding="0">
<tr><td width=440><? bbs_latest("PORTER 1T")?></td></tr>
</table>
</DIV>
<DIV id="news2" style="width:580px; height:170px; position:absolute; left:1px; top:160px; z-index:6; visibility:hidden;">
<META http-equiv=Content-Type content="text/html; charset=ks_c_5601-1987">
<link rel="stylesheet" href="css/main.css">
<table width="580" border="0" cellspacing="5" cellpadding="0">
<tr><td width=440><? bbs_latest("TICO")?></td></tr>
</table>
</DIV>
</DIV>
<DIV id="title1" style="Z-INDEX: 11; LEFT: 259px; WIDTH: 72px; POSITION: absolute; TOP: 182px; HEIGHT: 50px; class=ms">
<a href="http://busanjin.kdlp.org/busanjin1/bbs/zboard.php?id=committee" target="_parent">
<img border="0" src="../slide_menu_fig/javaimages/menu1-2.gif" class=ms></a></DIV>
<DIV id="title2" style="Z-INDEX: 12; LEFT: 335px; VISIBILITY: hidden; WIDTH: 72px; POSITION: absolute; TOP: 182px; HEIGHT: 50px; class=ms">
<a href="http://busanjin.kdlp.org/busanjin1/bbs/zboard.php?id=bbs1" target="_parent">
<img border="0" src="../slide_menu_fig/javaimages/menu1-3.gif" class=ms></a></DIV>
</td></tr>
</table>
</body>
</html>
=== 아래 파일명 slide1-view.php
<?
// 게시물 함수.
function bbs_latest($tcarkind)
{
?>
<TABLE borderColor=#999999 cellSpacing=1 borderColorDark=#eeeeee cellPadding=1
width="70%" align=center bgColor=#dddddd borderColorLight=#999999 border=0>
<?
/* 해당 게시판 테이블에서 게시물 리스트 추출 */
$connect = mysql_connect("localhost","aaa","1234");
mysql_select_db("kauto",$connect);
$sQuery = "Select * From mainlist where carkind = '$tcarkind' and no like '04%' ";
$sQuery .= "order by no asc limit 5";
$objRecordSet = mysql_query($sQuery, $connect);
$iTotalRecord = mysql_num_rows($objRecordSet);
for($i = 0; $i < 5; $i++) {
$objRecord = mysql_fetch_array($objRecordSet, MYSQL_ASSOC);
$iUno = $objRecord["id"];
$no = $objRecord["no"];
$carkind = $objRecord["carkind"];
echo ("<tr>
<td align=left height=23 bgcolor=#E9EBF2><p><span style=font-size:9pt;><font face=Arial>$no</font></span></p></td>
<td align=center height=23 bgcolor=#E9EBF2><p>
<a href='carview.htm?imgno=$no-1' target=_parent><span style=font-size:9pt;><font face=Arial>$carkind</font></span></a></p></td>
<td align=center height=23 bgcolor=#E9EBF2><p>
<a href='carview.htm?imgno=$no-1'><img border=1 HEIGHT=23 WIDTH=30 SRC='http://k-auto.net/~carimage/$no-1.jpg'></a></p></td>
///// 처음에 화면에 뜰때는 이부분이 링크가 안됩니다. 마우스를 해당 버튼에 올려놓으면 데이터가 바뀌고 링크도 살아납니다.
</tr>
");
}
mysql_free_result($objRecordSet);
?>
<br>
</table>
<?
}
?>