http://comhard.isp.st/fine9.php정말 넘 감사해요.
좋은 분을 만나 넘 기뻐여..^^
<?
// 자신의 계정에 맞게 설정해 주세요.
$디비호스트 = "localhost"; //디비 호스트를 적습니다.
$디비아이디 = "comhard"; // 디비아이디를 적습니다.
$디비비밀번호 = "7412"; // 디비비밀번호를 적습니다.
$디비네임 = "comhard"; // 디비네임을 적습니다.
$제로보드경로 = "http://comhard.isp.st/zboard"; // 제로보드가 설치되어 있는 상대경로를 적습니다. 끝에 /는 넣지 마세요.
$제목길이 = "60"; // 최대 제목 글자수를 적습니다.
// 다시한번 위 설정이 맞는지 확인하세요.
/*
function cut_str($msg,$cut_size)
{
if($cut_size<=0) return $msg;
if(ereg("[re]",$msg)) $cut_size=$cut_size+4;
for($i=0;$i<$cut_size;$i++) if(ord($msg[$i])>127) $han++; else $eng++;
$cut_size=$cut_size+(int)$han*0.6;
$point=1;
for ($i=0;$i<strlen($msg);$i++)
{
if ($point>$cut_size) {return $pointtmp."..."};
if (ord($msg[$i])<=127)
{
$pointtmp.= $msg[$i];
if ($point%$cut_size==0) {return $pointtmp."..."};
}
else
{
if ($point%$cut_size==0) {return $pointtmp."..."};
$pointtmp.=$msg[$i].$msg[++$i];
$point++;
}
$point++;
}
return $pointtmp;
}
*/
function fine9($id, $number)
{
global $디비호스트,$디비아이디,$디비비밀번호,$디비네임,$제로보드경로,$제목길이,$올드아이콘,$뉴아이콘;
$디비접속=mysql_connect($디비호스트,$디비아이디,$디비비밀번호);
mysql_select_db($디비네임,$디비접속);
$result=mysql_query("select * from zetyx_board_$id order by no desc limit $number",$디비접속) or die(mysql_error());
while($data=mysql_fetch_array($result))
{
$name = stripslashes($data[name]);
$data[memo] = stripslashes($data[memo]);
$data[memo]=cut_str($data[memo],150); // 최대 본문 글자수입니다. 150을 자신에 맞게 수정하세요.
$data[subject] = stripslashes($data[subject]);
$data[subject]=cut_str($data[subject],60); // 최대 제목 글자수입니다. 60을 자신에 맞게 수정하세요.
$passtime = (mktime()-$data[reg_date])/3600;
if($passtime <48) {
$data[subject] = $data[subject]."<img src=./images/new.gif border=0 align=absmiddle>"; //new 아이콘 경로를 자신에 맞게 수정하세요.
}else{
$data[subject] = $data[subject];
}
if (!stripslashes($data[file_name1]))
{
echo " <style>
.memo {font-family:굴림;font-size:9pt;color:black;}
.title {font_family:굴림;font-size:9pt;color:blue;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
echo("<tr>");
echo("<td width='100%' class=title><font color=gray>[".date("Y.m.d",$data[reg_date])." $name]</font> <a href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'>".stripslashes($data[subject])."</a></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' valign=top class=memo style=text-align:justify;>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' background='http://finesite.net/images/bar_dot.gif'>");//점선이미지가 있는 경로를 자신에 맞게 수정하세요.
echo("<p> </p>");
echo("</td>");
echo("</tr>");
echo("</table>");
}else{
echo "<style>
.memo {font-family:굴림;font-size:9pt;color:black;}
.title {font_family:굴림;font-size:9pt;color:blue;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
echo("<tr>");
echo("<td align=right rowspan=2><a href=$제로보드경로/view.php?id=$id&no=$data[no]><img src=$제로보드경로/".stripslashes($data[file_name1])." border=1 hspace=0 width=100 height=100 style='border-color:#6e6e6e'></a></td>");
echo("<td width='90%' colspan=2 class=title style=padding-left:15px;><font color=gray>[".date("Y.m.d",$data[reg_date])." $name]</font> <a href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'>".stripslashes($data[subject])."</a></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='90%' valign=top class=memo style=padding-left:15px; style=text-align:justify;>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='90%' colspan=2 background='http://finesite.net/images/bar_dot.gif'>");//점선이미지가 있는 경로를 자신에 맞게 수정하세요.
echo("<p> </p>");
echo("</td>");
echo("</tr>");
echo("</table>");
}
//윗 부분에 %는 자신에게 맞게 수정해서 사용하셔면 더욱 깔끔합니다.
}
}
좋은 분을 만나 넘 기뻐여..^^
<?
// 자신의 계정에 맞게 설정해 주세요.
$디비호스트 = "localhost"; //디비 호스트를 적습니다.
$디비아이디 = "comhard"; // 디비아이디를 적습니다.
$디비비밀번호 = "7412"; // 디비비밀번호를 적습니다.
$디비네임 = "comhard"; // 디비네임을 적습니다.
$제로보드경로 = "http://comhard.isp.st/zboard"; // 제로보드가 설치되어 있는 상대경로를 적습니다. 끝에 /는 넣지 마세요.
$제목길이 = "60"; // 최대 제목 글자수를 적습니다.
// 다시한번 위 설정이 맞는지 확인하세요.
/*
function cut_str($msg,$cut_size)
{
if($cut_size<=0) return $msg;
if(ereg("[re]",$msg)) $cut_size=$cut_size+4;
for($i=0;$i<$cut_size;$i++) if(ord($msg[$i])>127) $han++; else $eng++;
$cut_size=$cut_size+(int)$han*0.6;
$point=1;
for ($i=0;$i<strlen($msg);$i++)
{
if ($point>$cut_size) {return $pointtmp."..."};
if (ord($msg[$i])<=127)
{
$pointtmp.= $msg[$i];
if ($point%$cut_size==0) {return $pointtmp."..."};
}
else
{
if ($point%$cut_size==0) {return $pointtmp."..."};
$pointtmp.=$msg[$i].$msg[++$i];
$point++;
}
$point++;
}
return $pointtmp;
}
*/
function fine9($id, $number)
{
global $디비호스트,$디비아이디,$디비비밀번호,$디비네임,$제로보드경로,$제목길이,$올드아이콘,$뉴아이콘;
$디비접속=mysql_connect($디비호스트,$디비아이디,$디비비밀번호);
mysql_select_db($디비네임,$디비접속);
$result=mysql_query("select * from zetyx_board_$id order by no desc limit $number",$디비접속) or die(mysql_error());
while($data=mysql_fetch_array($result))
{
$name = stripslashes($data[name]);
$data[memo] = stripslashes($data[memo]);
$data[memo]=cut_str($data[memo],150); // 최대 본문 글자수입니다. 150을 자신에 맞게 수정하세요.
$data[subject] = stripslashes($data[subject]);
$data[subject]=cut_str($data[subject],60); // 최대 제목 글자수입니다. 60을 자신에 맞게 수정하세요.
$passtime = (mktime()-$data[reg_date])/3600;
if($passtime <48) {
$data[subject] = $data[subject]."<img src=./images/new.gif border=0 align=absmiddle>"; //new 아이콘 경로를 자신에 맞게 수정하세요.
}else{
$data[subject] = $data[subject];
}
if (!stripslashes($data[file_name1]))
{
echo " <style>
.memo {font-family:굴림;font-size:9pt;color:black;}
.title {font_family:굴림;font-size:9pt;color:blue;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
echo("<tr>");
echo("<td width='100%' class=title><font color=gray>[".date("Y.m.d",$data[reg_date])." $name]</font> <a href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'>".stripslashes($data[subject])."</a></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' valign=top class=memo style=text-align:justify;>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='100%' background='http://finesite.net/images/bar_dot.gif'>");//점선이미지가 있는 경로를 자신에 맞게 수정하세요.
echo("<p> </p>");
echo("</td>");
echo("</tr>");
echo("</table>");
}else{
echo "<style>
.memo {font-family:굴림;font-size:9pt;color:black;}
.title {font_family:굴림;font-size:9pt;color:blue;}
</style>";
echo("<table border='0' cellpadding='0' cellspacing='0' width='100%'>");
echo("<tr>");
echo("<td align=right rowspan=2><a href=$제로보드경로/view.php?id=$id&no=$data[no]><img src=$제로보드경로/".stripslashes($data[file_name1])." border=1 hspace=0 width=100 height=100 style='border-color:#6e6e6e'></a></td>");
echo("<td width='90%' colspan=2 class=title style=padding-left:15px;><font color=gray>[".date("Y.m.d",$data[reg_date])." $name]</font> <a href='$제로보드경로/view.php?id=$id&no=$data[no]') target='_self'>".stripslashes($data[subject])."</a></td>");
echo("</tr>");
echo("<tr>");
echo("<td width='90%' valign=top class=memo style=padding-left:15px; style=text-align:justify;>".stripslashes($data[memo])."</td>");
echo("</tr>");
echo("<tr>");
echo("<td width='90%' colspan=2 background='http://finesite.net/images/bar_dot.gif'>");//점선이미지가 있는 경로를 자신에 맞게 수정하세요.
echo("<p> </p>");
echo("</td>");
echo("</tr>");
echo("</table>");
}
//윗 부분에 %는 자신에게 맞게 수정해서 사용하셔면 더욱 깔끔합니다.
}
}
------------------------------
<? include "fine9.php"; ?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>제목 없음</title>
<meta name="generator" content="Namo WebEditor v5.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p> </p>
<table border="1" width="417">
<tr>
<td width="407" height="130">
<p><? fine9(happy,5);?> </p>
</td>
</tr>
</table>
<p> </p>
</body>
</html>