묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
카운터와 최근게시물을 한 페이지에 띄우려고 하거둔요..
2002.03.05 01:00
카운터와 최근게시물을 한페이지에 함께 나타내고 싶거둔요
그런데... 최근게시물소스를 넣으면 카운터가 안떠요...
함께 뜰수 있게 하려면 어떻게 수정해야 되는지....
알려주심 감사하겠습니다.. 제발.. ㅜ.ㅜ
-----------------------------------------------------------------
<? include "cgi/counter/dbconn.php3";
include "cgi/counter/zerocounter.php3"; ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>☆☆ 루찌공간 ☆☆</title>
<meta name="generator" content="Namo WebEditor v5.0">
<link rel="stylesheet" href="style_about.css">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" background="image/bg.gif" leftmargin="3" marginwidth="3" topmargin="3" marginheight="3">
<table align="center" cellpadding="0" cellspacing="0" width="507">
<tr>
<td width="507" colspan="3">
<p><img src="image/index/top.jpg" width="507" height="147" border="0"></p>
</td>
</tr>
<tr>
<td width="507" background="image/bg.gif" colspan="3">
<p align="center"><img src="image/menu_left.gif" width="47" height="15" border="0"><a href="index.htm"><img src="image/menu_1-1.gif" width="35" height="15" border="0"></a><a href="about.htm"><img src="image/menu_2-1.gif" width="38" height="15" border="0"></a><a href="portfolio.htm"><img src="image/menu_3-1.gif" width="66" height="15" border="0"></a><a href="webtip.htm"><img src="image/menu_4-1.gif" width="45" height="15" border="0"></a><a href="diary.htm"><img src="image/menu_5-1.gif" width="38" height="15" border="0"></a><a href="album.htm"><img src="image/menu_6-1.gif" width="42" height="15" border="0"></a><a href="links.htm"><img src="image/menu_7-1.gif" width="38" height="15" border="0"></a><a href="bbs.htm"><img src="image/menu_8-1.gif" width="28" height="15" border="0"></a><img src="image/menu_right.gif" width="48" height="15" border="0"></p>
</td>
</tr>
<tr>
<td width="41" background="image/bg.gif">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</td>
<td width="425" background="image/bg_main.gif" valign="top">
<table cellpadding="0" cellspacing="0" width="425">
<tr>
<td width="415" height="5">
</td>
</tr>
<tr>
<td width="425">
<table align="center" cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="400"><p align="left"><img src="image/index/titlebar_1.gif" width="155" height="24" border="0"></p>
</td>
</tr>
<tr>
<td width="400" class="ver9">
<table cellpadding="1" cellspacing="0" width="400">
<tr>
<td width="400">
<!--공지사항시작-->
<?
$connect=mysql_connect("localhost","ID","PW"); // MySQL DB에 접근
mysql_select_db("ID"); // 사용할 DB를 선택
?>
<?
$result=mysql_query("select * from zetyx_board_notice order by no desc limit 1");
?>
<?
while($data=mysql_fetch_array($result))
{
$no=$data[no];
$subject=stripslashes($data[subject]);
$name=stripslashes($data[name]);
$memo=stripslashes($data[memo]);
$data=date("Y/m/d",$data[reg_date]);
echo "<table align=center cellpadding=2 cellspacing=0>
<tr>
<td width=100%>
<p align='justify' style='margin-right:2mm; margin-left:2mm; line-height:150%;'><a href='http://rujji.eelee.net/zboard//zboard.php?id=notice' onfocus='this.blur()'><font size='2' color='black'><b>$subject</b></font></a>
</td>
</tr>
<tr>
<td width=100%>
<p align='justify' style='margin-right:2mm; margin-left:2mm; line-height:150%;'>$memo</p>
</td>
</tr>
<tr>
<td width=100%>
<p align='right' style='margin-right:2mm; margin-left:2mm; line-height:150%;'>$data</a>
</td>
</tr>
</table>
";
}
?>
<!--공지사항끝-->
</td>
</tr>
<tr>
<td width="400">
<!--최근게시물시작-->
<?
$connect=mysql_connect("localhost","ID","PW"); // MySQL DB에 접근
mysql_select_db("ID"); // 사용할 DB를 선택
?>
<?
$result=mysql_query("select * from zetyx_board_notice order by no desc limit 5");
?>
<?
while($data=mysql_fetch_array($result))
{
$no=$data[no];
$name=stripslashes($data[name]);
$data[subject] = stripslashes($data[subject]);
$max = 45; //이건 제목의 길이를 제안.. 그뒤는 ..... 이걸로 나타납니다!!
$count = strlen($data[subject]);
if($count >= $max) {
for ($pos=$max;$pos>0 && ord($new[subject][$pos-1])>=127;$pos--);
if (($max-$pos)%2 == 0)
$data[subject] = substr($data[subject], 0, $max) . "...";
else
$data[subject] = substr($data[subject], 0, $max+1) . "...";
}
else {
$data[subject] = "$data[subject]";
}
echo "<table align=center cellpadding=2 cellspacing=0 width='400'>
<tr>
<td width=400>
[".stripslashes($data[name])."] <a href=http://rujji.eelee.net/board/view.php?id=notice&no=$no')>".stripslashes($data[subject])."
</td>
</tr>
<tr>
<td width=400 bgcolor=silver>
<p></p>
</td>
</tr>
</table>
";
}
?>
<!--최근게시물끝-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="41" background="image/bg.gif">
<p> </p>
</td>
</tr>
<tr>
<td width="507" colspan="3">
<table cellpadding="0" cellspacing="0" width="507">
<tr>
<td width="42" rowspan="2">
<p><img src="image/copyright_left.jpg" width="42" height="94" border="0"></p>
</td>
<td width="423" height="31" background="image/copyright_top.jpg">
<p align="center"><font size="1" face="돋움" color="#CCCCCC"><b>
<!--카운터시작-->
Total : <? echo $count[total_hit]; ?> Yesterday : <? echo $count[yesterday_hit]; ?> Today : <? echo $count[today_hit]; ?>
<!--카운터끝-->
</b></font></p>
</td>
<td width="42" rowspan="2">
<p><img src="image/copyright_right.jpg" width="42" height="94" border="0"></p>
</td>
</tr>
<tr>
<td width="423" height="63">
<p align="center"><img src="image/copyright_bottom.jpg" width="423" height="63" border="0"></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
------------------------------------------------------------------
그런데... 최근게시물소스를 넣으면 카운터가 안떠요...
함께 뜰수 있게 하려면 어떻게 수정해야 되는지....
알려주심 감사하겠습니다.. 제발.. ㅜ.ㅜ
-----------------------------------------------------------------
<? include "cgi/counter/dbconn.php3";
include "cgi/counter/zerocounter.php3"; ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>☆☆ 루찌공간 ☆☆</title>
<meta name="generator" content="Namo WebEditor v5.0">
<link rel="stylesheet" href="style_about.css">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" background="image/bg.gif" leftmargin="3" marginwidth="3" topmargin="3" marginheight="3">
<table align="center" cellpadding="0" cellspacing="0" width="507">
<tr>
<td width="507" colspan="3">
<p><img src="image/index/top.jpg" width="507" height="147" border="0"></p>
</td>
</tr>
<tr>
<td width="507" background="image/bg.gif" colspan="3">
<p align="center"><img src="image/menu_left.gif" width="47" height="15" border="0"><a href="index.htm"><img src="image/menu_1-1.gif" width="35" height="15" border="0"></a><a href="about.htm"><img src="image/menu_2-1.gif" width="38" height="15" border="0"></a><a href="portfolio.htm"><img src="image/menu_3-1.gif" width="66" height="15" border="0"></a><a href="webtip.htm"><img src="image/menu_4-1.gif" width="45" height="15" border="0"></a><a href="diary.htm"><img src="image/menu_5-1.gif" width="38" height="15" border="0"></a><a href="album.htm"><img src="image/menu_6-1.gif" width="42" height="15" border="0"></a><a href="links.htm"><img src="image/menu_7-1.gif" width="38" height="15" border="0"></a><a href="bbs.htm"><img src="image/menu_8-1.gif" width="28" height="15" border="0"></a><img src="image/menu_right.gif" width="48" height="15" border="0"></p>
</td>
</tr>
<tr>
<td width="41" background="image/bg.gif">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</td>
<td width="425" background="image/bg_main.gif" valign="top">
<table cellpadding="0" cellspacing="0" width="425">
<tr>
<td width="415" height="5">
</td>
</tr>
<tr>
<td width="425">
<table align="center" cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="400"><p align="left"><img src="image/index/titlebar_1.gif" width="155" height="24" border="0"></p>
</td>
</tr>
<tr>
<td width="400" class="ver9">
<table cellpadding="1" cellspacing="0" width="400">
<tr>
<td width="400">
<!--공지사항시작-->
<?
$connect=mysql_connect("localhost","ID","PW"); // MySQL DB에 접근
mysql_select_db("ID"); // 사용할 DB를 선택
?>
<?
$result=mysql_query("select * from zetyx_board_notice order by no desc limit 1");
?>
<?
while($data=mysql_fetch_array($result))
{
$no=$data[no];
$subject=stripslashes($data[subject]);
$name=stripslashes($data[name]);
$memo=stripslashes($data[memo]);
$data=date("Y/m/d",$data[reg_date]);
echo "<table align=center cellpadding=2 cellspacing=0>
<tr>
<td width=100%>
<p align='justify' style='margin-right:2mm; margin-left:2mm; line-height:150%;'><a href='http://rujji.eelee.net/zboard//zboard.php?id=notice' onfocus='this.blur()'><font size='2' color='black'><b>$subject</b></font></a>
</td>
</tr>
<tr>
<td width=100%>
<p align='justify' style='margin-right:2mm; margin-left:2mm; line-height:150%;'>$memo</p>
</td>
</tr>
<tr>
<td width=100%>
<p align='right' style='margin-right:2mm; margin-left:2mm; line-height:150%;'>$data</a>
</td>
</tr>
</table>
";
}
?>
<!--공지사항끝-->
</td>
</tr>
<tr>
<td width="400">
<!--최근게시물시작-->
<?
$connect=mysql_connect("localhost","ID","PW"); // MySQL DB에 접근
mysql_select_db("ID"); // 사용할 DB를 선택
?>
<?
$result=mysql_query("select * from zetyx_board_notice order by no desc limit 5");
?>
<?
while($data=mysql_fetch_array($result))
{
$no=$data[no];
$name=stripslashes($data[name]);
$data[subject] = stripslashes($data[subject]);
$max = 45; //이건 제목의 길이를 제안.. 그뒤는 ..... 이걸로 나타납니다!!
$count = strlen($data[subject]);
if($count >= $max) {
for ($pos=$max;$pos>0 && ord($new[subject][$pos-1])>=127;$pos--);
if (($max-$pos)%2 == 0)
$data[subject] = substr($data[subject], 0, $max) . "...";
else
$data[subject] = substr($data[subject], 0, $max+1) . "...";
}
else {
$data[subject] = "$data[subject]";
}
echo "<table align=center cellpadding=2 cellspacing=0 width='400'>
<tr>
<td width=400>
[".stripslashes($data[name])."] <a href=http://rujji.eelee.net/board/view.php?id=notice&no=$no')>".stripslashes($data[subject])."
</td>
</tr>
<tr>
<td width=400 bgcolor=silver>
<p></p>
</td>
</tr>
</table>
";
}
?>
<!--최근게시물끝-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="41" background="image/bg.gif">
<p> </p>
</td>
</tr>
<tr>
<td width="507" colspan="3">
<table cellpadding="0" cellspacing="0" width="507">
<tr>
<td width="42" rowspan="2">
<p><img src="image/copyright_left.jpg" width="42" height="94" border="0"></p>
</td>
<td width="423" height="31" background="image/copyright_top.jpg">
<p align="center"><font size="1" face="돋움" color="#CCCCCC"><b>
<!--카운터시작-->
Total : <? echo $count[total_hit]; ?> Yesterday : <? echo $count[yesterday_hit]; ?> Today : <? echo $count[today_hit]; ?>
<!--카운터끝-->
</b></font></p>
</td>
<td width="42" rowspan="2">
<p><img src="image/copyright_right.jpg" width="42" height="94" border="0"></p>
</td>
</tr>
<tr>
<td width="423" height="63">
<p align="center"><img src="image/copyright_bottom.jpg" width="423" height="63" border="0"></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
------------------------------------------------------------------