¸µÅ©°¡ ¤Ð_¤Ð..
¿ì¿¡¿¨ ¤Ð_¤Ð..
Á¦°¡ ÇÁ·¹ÀÓÀ» 3³ðÀ¸·Î ³ª´³¾î¿ä
À§ Áß°£ ¾Æ·¹ À§¿¡´Â ¸Å´º Áß°£¿¡´Â ³»¿ë ¾Æ·¹´Â ±× ¹¹Áö ¤Ñ¤Ñ;;¹¹ ±Ã½Ã¶û½á³õ´Â°ÅÁö²¨¶ó°í
±×·±µ¥;;
Áß°£¿¡´Ù ÃֱٰԽù° ¼³Ä¡Çؼ µüÇÏ´Ï ¿Ã·Áº¸´Ï±î ¸µÅ©°¡ ¾Æ·¹Âɱ׸¶ÇÑ
ÄÀ¸·Î ¤Ð_¤Ð..¹¹°¡ À߸ø µÈ°ÅÁÒ;;
»õâ ¿©´Â ¸µÅ©³ª °¡¿îµ¥Ã¢À¸·Î ¹Ù·Î ¸µÅ©µÇ´Â°Å¿´À¸¸é Çϴµ¥ ¤Ð_¤Ð
ºÎŹµå·Á¿ä ¤Ð_¤Ð.
<?
// ¿©±â¼ºÎÅÍ........
$µðºñÈ£½ºÆ® = "localhost"; //µðºñ È£½ºÆ®¸¦ Àû¾îÁÖ¼¼¿ä....
$µðºñ¾ÆÀ̵ð = "id"; // ¾ÆÀ̵𸦠Àû¾îÁÖ¼¼¿ä....
$µðºñºñ¹Ð¹øÈ£ = "password"; // ºñ¹Ð¹øÈ£¸¦ Àû¾îÁÖ¼¼¿ä...
$µðºñ³×ÀÓ = "name"; // µðºñ ³×ÀÓÀ» Àû¾îÁÖ¼¼¿ä...
$Á¦·Îº¸µå°æ·Î = "./zboard"; // Á¦·Îº¸µåÀÇ À§Ä¡..... ³¡ºÎºÐ¿¡ / ´Â ³ÖÁö ¸»¾ÆÁÖ¼¼¿ä...
$Á¦¸ñ±æÀÌ = "17"; // ±æÀ̸¦ Àû¾îÁÖ¼¼¿ä....
$¿Ãµå¾ÆÀÌÄÜ = "<img src=gul.gif>"; //¿À´Ã±ÛÀÌ ¾Æ´Ñ°æ¿ì ³ªÅ¸³ª´Â ¾ÆÀÌÄÜ
$´º¾ÆÀÌÄÜ = "<img src=new.gif>"; //¿À´Ã±ÛÀÏ °æ¿ì ³ªÅ¸³ª´Â ¾ÆÀÌÄÜ
// ¿©±â±îÁö¸¸ ¼³Á¤ÇØÁÖ¼¼¿ä.....
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 nero($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))
{
$data[subject] = stripslashes($data[subject]);
$data[subject]=cut_str($data[subject], $Á¦¸ñ±æÀÌ); // ¿øÇÏ´Â ±æÀ̸¸Å Á¦¸ñÀ» ÀÚ¸¨´Ï´Ù....
$count = strlen($data[subject]);
if (date("Y.m.d", $data[reg_date]) < date("Y.m.d")) // ´º ¾ÆÀÌÄÜ ±â´ÉÃß°¡ÀÔ´Ï´Ù.
{
$¾ÆÀÌÄÜ = $¿Ãµå¾ÆÀÌÄÜ;
}
else
{
$¾ÆÀÌÄÜ =$´º¾ÆÀÌÄÜ;
}
if ($data[total_comment] != 0) //ÄÚ¸àÆ®±â´ÉÃß°¡ÀÔ´Ï´Ù..
{
$data[total_comment]= "[$data[total_comment]]";
}
else
{
$data[total_comment]= "";
}
echo " <style type=\"text/css\">
body,td {font-family:±¼¸²;font-size:9pt;color:black;}
A:link {color:black;text-decoration:none;}
A:visited {color:black;text-decoration:none;}
A:active {color:black;text-decoration:none;}
A:hover {color:#FF6633;text-decoration:underline overline blink;} //½ºÅ¸ÀÏ ½ÃÆ®¿¡¼ ÆùÆ®¿Í ¸µÅ© ¼³Á¤
</style>";
echo"<table border='0' cellpadding='0' cellspacing='0' width='100%'>";
echo "<tr><td width='100%' height='16'>";
echo "".$¾ÆÀÌÄÜ." <a href='$Á¦·Îº¸µå°æ·Î/view.php?id=$id&no=$data[no]') onfocus='this.blur()' title='ÀÛ¼ºÀÚ: [$data[name]] ÀÛ¼ºÀÏ: [".date("Y.m.d",$data[reg_date])."]'>".stripslashes($data[subject])."</a><font style=font-family:Tahoma;font-size:6pt;> " .stripslashes($data[total_comment])."</font>"; // ´º¾ÆÀÌÄÜ+³¯ÀÚ+Á¦¸ñ+¸ÇÆ® Ãâ·Â
echo "</td></tr>";
echo "<tr><td width='100%' background='dot_cross.gif'><img border='0' src='_cl.gif' width='1' height='1'></td></tr>";//ĸ¶´Ù ³ª¿Ã µµÆ® ¼¿ ,,,,µµÆ®¼¿ÀÌ ÇÊ¿ä¾øÀ¸¸é »èÁ¦ÇÏ¸é µÊ
echo "</table>";
}
mysql_close(); // ¿©·¯°³ °Ô½ÃÆÇÀÇ °Ô½Ã¹°À» ÃßÃâ½Ã¿£ ÀÌ ºÎºÐ mysql_close(); À» »èÁ¦ÇÏ½Ã°í °Ô½Ã¹° ÃßÃâ ÆäÀÌÁö ¸Ç ¸¶Áö¸· ºÎºÐ¿¡ <? mysql_close(); ? >¸¦ Ãß°¡ÇØÁÖ¼¼¿ä.
}
?> |
|