»Ç¶ó´åÄÄ
Loading...




À¥µðÀÚÀÎ,Æ÷Åä¼¥,±×´©º¸µå,Á¦·Îº¸µå,µ¿¿µ»óÁ¦ÀÛ °ü·Ã ¸Þ¸ð >>


¦­Àüü(437)¦­ÀÎÅͳÝ,ÄÄÇ»ÅÍ (94) | À¥µðÀÚÀÎtip (182) | CG,±×·¡ÇÈtip (70) | BBS_Tip (74) | ¿µ»ótip (17) |
ÃֱٰԽù° À¥ÁøÃâ·Â 2010-06-13 20:15:25
ȨÆäÀÌÁöȨÆäÀÌÁö

<style type="text/css">
a.a1:link {color:0066FF; text-decoration:none}
a.a1:visited {color:000000; text-decoration:none}
a.a1:active {color:000000; text-decoration:none}
a.a1:hover{color:yellow; text-decoration:none}

.text {font-size:9pt;}
.title {font-size:10pt;}
</style>
<?
$connect=mysql_connect("localhost","µðºñ¾ÆÀ̵ð","µðºñÆÐ½º"); // MySQL DB¿¡ Á¢±Ù
mysql_select_db("µðºñÀ̸§"); // »ç¿ëÇÒ DB¸¦ ¼±ÅÃ
$url = "Á¦·Îº¸µåurl"; // Á¦·Îº¸µåURL ³¡¿¡ '/'¸¦ ºÙÀÌÁö¸»°Í
$id = "id"; // °Ô½ÃÆÇ ¾ÆÀ̵ð
$result=mysql_query("select * from zetyx_board_$id order by no desc limit 3"); // ¿©±â¼­ limit 2 ´Â ³ªÅ¸³»´Â °øÁö°¹¼ö¸¦ ³ªÅ¸³¿
?>
<?
while($data=mysql_fetch_array($result))
{
  $max = 140; //º»¹®ÀÌ ±ÛÀÚ °ª ÀÌ»óÀÌ µÇ¸é .....À¸·Î Ç¥½Ã
  $count = strlen($data[memo]);
  $memo = $data[memo];    //º»¹®ÀÌ$max º¸´Ù ÀÛÀ» ¶§ ±×´ë·Î Ç¥½Ã
  if($count >= $max) {
  for ($pos=$max;$pos>0 && ord($new[memo][$pos-1])>=127;$pos--);
  if (($max-$pos)%2 == 0)
  $memo = substr($data[memo], 0, $max) . "..." ;
  else
  $memo = substr($data[memo], 0, $max+1) . "...";
  }
  $no=$data[no];

  // Á¦¸ñÀÌ ±æ¸é ÀÚ¸£±â..
  $max = 40; //Á¦¸ñ ±ÛÀÚ °ª ÀÌ»óÀº .....À¸·Î Ç¥½Ã
  $count = strlen($data[subject]);
  $subject=$data[subject];
  if($count >= $max) {
  for ($pos=$max;$pos>0 && ord($new[subject][$pos-1])>=127;$pos--);
  if (($max-$pos)%2 == 0)
  $subject = substr($data[subject], 0, $max) . "...";
  else
  $subject = substr($data[subject], 0, $max+1) . "...";
  }

 $date=date("m/d",$data[reg_date]);
 // ¿©±â¼­ºÎÅÍ ³»¿ëº¸±âÀÔ´Ï´Ù.
 echo "<table width='300' border='0'>";
 echo "<tr><td class='title' colspan='2'> <a class='a1' href=$url/view.php?id=$id&no=$no target='_self'><b>$subject</b></a></td></tr>";
 echo "<tr><td><img src=$url/".stripslashes($data[file_name1])." border=1 hspace=0 width=65 height=52 style='border-color:#6e6e6e'></td>";
 echo "<td class='text' style=text-align:justify;> $memo  [$date]</td></tr>";
 echo "</table>";
 }
 ?>





    



¸ñ·Ïº¸±â »èÁ¦Çϱâ