session_start();
include "../config.php";
// ¸Þ´º ¼³Á¤
$menu_list = "submenu_05.htm/submenu_16-3.htm/submenu_17-3.htm/submenu_18-3.htm";
include "../top_left.htm";
include "dbconn.php";
include "func.php";
$board_size = "647";
#**********************************************************************************
# ÀÚµ¿¸µÅ© ¸¸µé±â ÇÔ¼ö ½ÃÀÛ
include("../INC/function.php");
#**********************************************************************************
# Á¶È¸¼ö ¿Ã¸®±â
$sql = "update $tb_name set hit=(hit+1) where board_code='$board_code'";
$res = mysql_query($sql);
# °øÁö»çÇ×°ú °øÀ¯µÈ ÈýÆ®¼ö°¡ ÀÖ´ÂÁö È®ÀÎÇÑ ÈÄ ÀÖÀ¸¸é ¾÷µ¥ÀÌÆ®¸¦ ½ÃÅ°±âÀ§ÇØ Äõ¸®ÇØ ¿È(Á¦ÀÏ ÇÏ´Ü¿¡ º¸¸é Àû¿ë)
$query = mysql_fetch_row(mysql_query("select hit,notice_code from $tb_name where board_code='$board_code'"));
# ÇØ´ç °Ô½Ã¹° ºÒ·¯¿À±â
$sql = "select * from $tb_name where board_code='$board_code'";
$res = mysql_query($sql);
if(!$res) { echo ""; exit; }
$row = mysql_fetch_array($res);
/*
if($row[html] == "N")
{
$row[subject] = eregi_replace("<", "<", $row[subject]);
$row[subject] = eregi_replace(">", ">", $row[subject]);
$row[writer] = eregi_replace("<", "<", $row[writer]);
$row[writer] = eregi_replace(">", ">", $row[writer]);
$row[contents] = eregi_replace("<", "<", $row[contents]);
$row[contents] = eregi_replace(">", ">", $row[contents]);
$row[contents] = eregi_replace("<br />", "
", $row[contents]);
$row[contents] = eregi_replace("<br>", "
", $row[contents]);
}
*/
//Áö¿ª¹øÈ£°¡ ÀÖ°í ¾øÀ½¿¡ µû¶ó...
$db_tel = explode("-", $row[tel]);
if($db_tel[0]==''){
$db_tel = $db_tel[1].'-'.$db_tel[2];
}else{
$db_tel = $db_tel[0].'-'.$db_tel[1].'-'.$db_tel[2];
}
$db_subject = stripslashes($row[subject]);
//$db_contents = stripslashes(autoLink($row[contents])); //ÀÚµ¿¸µÅ©¸¦ ¸¸µé¾îÁØ´Ù.aksp¸·À½110511
$db_contents = stripslashes($row[contents]);
$db_place = stripslashes($row[place]);
$db_hit_public = $row[hit_public];
/*
// URL ÀÚµ¿¸µÅ©
$row[contents] = eregi_replace("(http://)([a-z0-9\_\-\.\/\~\@\?\=\%\&]+)", "http://\\2", $row[contents]);
// À̸ÞÀÏ ÀÚµ¿¸µÅ©
$row[contents] = eregi_replace("([a-z0-9\_\-\.]+)@([a-z0-9\_\-\.]+)", "\\1@\\2", $row[contents]);
*/
?>
detail.html
> â¾÷¹Ú¶÷ȸ";
}elseif($item_code=="2" || $row[item_code]=="2"){
$boardTitle = " >> »ç¾÷¼³¸íȸ";
}elseif($item_code=="3" || $row[item_code]=="3"){
$boardTitle = " >> â¾÷°ÁÂ";
}
?>
Home >> â¾÷½ºÄð =$boardTitle?> |
|
|
|
|
Á¦ ¸ñ |
|
ȸ »ç ¸í |
|
´ã ´ç ÀÚ |
> |
°³ÃÖÀÏÁ¤ |
|
¿¬ ¶ô ó |
|
°³ÃÖÀå¼Ò |
|
°³ÃÖ³»¿ë |
|
|
if($query_type == "search") : ?>
else : ?>
endif ?>
|
À§Ä¡ |
¾ÆÀÌÅÛ |
Á¦ ¸ñ |
ÁøÇà»óȲ |
ȸ »ç ¸í |
Á¶È¸¼ö |
if($item_code != ""){
$board_where_query = "and item_code='$item_code'";
}
$board_cnt1 = 3; //Á¤¼øÀ¸·Î »Ì±âÀ§ÇØ ¿ª¼ø Ä«¿îÆ®¸¦ ÀÌ¿ëÇÑ´Ù.
for($board_cnt=0 ; $board_cnt<4 ; $board_cnt++){
$board_query1 = "select * from $tb_name where reg_date>'$row[reg_date]' $board_where_query and account='Y' order by reg_date asc limit $board_cnt1,1";
$board_result1 = mysql_query($board_query1);
$board_row1 = mysql_fetch_array($board_result1);
if($board_row1[board_code]!=""){
$board_que[board_code][] = $board_row1[board_code];
$board_que[item_name][] = $board_row1[item_name];
$board_que[email][] = $board_row1[email];
$board_que[subject][] = $board_row1[subject];
$board_que[com_name][] = $board_row1[com_name];
$board_que[start_date][] = $board_row1[start_date];
$board_que[end_date][] = $board_row1[end_date];
$board_que[notice_code][] = $board_row1[notice_code];
$board_que[hit][] = $board_row1[hit];
}
//echo($board_query1." ");
$board_cnt1 = $board_cnt1 - 1;//¿ª¼ø Ä«¿îÆÃ
}
$board_query2 = "SELECT * FROM $tb_name where reg_date<='$row[reg_date]' $board_where_query and account='Y' order by reg_date desc limit 0,5";
$board_result2 = mysql_query($board_query2);
while($board_row2 = mysql_fetch_array($board_result2)){
$board_que[board_code][] = $board_row2[board_code];
$board_que[item_name][] = $board_row2[item_name];
$board_que[email][] = $board_row1[email];
$board_que[subject][] = $board_row2[subject];
$board_que[com_name][] = $board_row2[com_name];
$board_que[start_date][] = $board_row2[start_date];
$board_que[end_date][] = $board_row2[end_date];
$board_que[notice_code][] = $board_row2[notice_code];
$board_que[hit][] = $board_row2[hit];
$board_cnt++;
}
for($ddr1=0 ; $ddr1 $board_que[board_code][$ddr1]){
$board_stand = "¡å";
}elseif($board_code < $board_que[board_code][$ddr1]){
$board_stand = "¡ã";
}elseif($board_code == $board_que[board_code][$ddr1]){
$board_stand = "¢¹";
}
$get_item_name1 = $board_que[item_name][$ddr1];
if($get_item_name1 == "â¾÷¹Ú¶÷ȸ"){
$get_item_name1 = "[â¾÷¹Ú¶÷ȸ]";
}else if($get_item_name1 == "»ç¾÷¼³¸íȸ"){
$get_item_name1 = "[»ç¾÷¼³¸íȸ]";
}else if($get_item_name1 == "â¾÷°ÁÂ"){
$get_item_name1 = "[â¾÷°ÁÂ]";
}
$subject1 = stripslashes($board_que[subject][$ddr1]);
$subject1 = eregi_replace("<", "<", $subject1);
$subject1 = eregi_replace(">", ">", $subject1);
$com_name1 = eregi_replace("<", "<", $board_que[com_name][$ddr1]);
$com_name1 = eregi_replace(">", ">", $com_name1);
$today_y = date("Y");
$today_m = date("m");//¿ùÀ» 01~12·Î ³ªÅ¸³½´Ù. Âü°í...date(n)Àº ¿ùÀ» 1~12 ·Î ³ªÅ¸³½´Ù.
$today_d = date("d");//ÀÏÀ» 01~31·Î ³ªÅ¸³½´Ù. Âü°í...date(j)Àº ¿ùÀ» 1~31 ·Î ³ªÅ¸³½´Ù.
$today = $today_y.$today_m.$today_d; //$db_end ¿Í ºñ±³Çϱâ À§ÇØ »ç¿ë...
$get_start = $board_que[start_date][$ddr1];
$get_start = explode("-",$get_start);
$db_start1 = $get_start[0];
$db_start2 = $get_start[1];
$db_start3 = $get_start[2];
if($db_start2<10){
$db_start2 = "0".$db_start2;
}
if($db_start3<10){
$db_start3 = "0".$db_start3;
}
$db_start = $db_start1.$db_start2.$db_start3;
//$get_start = str_replace("-","",$get_start);
$get_end = $board_que[end_date][$ddr1];
$get_end = explode("-",$get_end);
$db_end1 = $get_end[0];
$db_end2 = $get_end[1];
$db_end3 = $get_end[2];
if($db_end2<10){
$db_end2 = "0".$db_end2;
}
if($db_end3<10){
$db_end3 = "0".$db_end3;
}
$db_end = $db_end1.$db_end2.$db_end3;
//$get_end = str_replace("-","",$get_end);
//Á¾·áÀÏÀ» ¾Ë¾Æ¿Â´Ù.
if($db_start2==12){
$end_y = $db_start1+1;
$end_m = "01";
//±× ´ÞÀÇ ¸¶Áö¸·³¯ µî·ÏÀ» ÇÏ°ÔµÇ¸é ´ÙÀ½´ÞÀÇ ¸¶Áö¸·À» ³¡³ª´Â ³¯·Î ÇÑ´Ù.
if($today_d==date(t)){
if($end_m==1 || $end_m==3 || $end_m==5 || $end_m==7 || $end_m==8 || $end_m==10 || $end_m==12){
$end_d = 31;
}elseif($end_m==2){
if(checkdate(2,29,$end_y)){
$end_d = 29;
}else{
$end_d = 28;
}
}else{
$end_d = 30;
}
}else{
$end_d = $db_start3;
}
}else{
$end_y = $db_start1;
$end_m = $db_start2+1;
//±× ´ÞÀÇ ¸¶Áö¸·³¯ µî·ÏÀ» ÇÏ°ÔµÇ¸é ´ÙÀ½´ÞÀÇ ¸¶Áö¸·À» ³¡³ª´Â ³¯·Î ÇÑ´Ù.
if($db_start3==date(t)){
if($end_m==1 || $end_m==3 || $end_m==5 || $end_m==7 || $end_m==8 || $end_m==10 || $end_m==12){
$end_d = 31;
}elseif($end_m==2){
if(checkdate(2,29,$end_y)){
$end_d = 29;
}else{
$end_d = 28;
}
}else{
$end_d = 30;
}
}else{
$end_d = $db_start3;
}
}
if($end_m<10){ $end_m = "0".$end_m; }
$end = $end_y.$end_m.$end_d;
if($db_end<$end){
if($today < $db_start){
$process = "";
}else if($today >= $db_start && $today <= $db_end){
$process = "";
}else if($today > $db_end){
$process = "";
}
}else{
if($today < $db_start){
$process = "";
}else if($today >= $db_start && $today < $end){
$process = "";
}else if($today > $end){
$process = "";
}
}
?>
onMouseOver="this.style.backgroundColor='#f5f5f5'" onMouseOut="this.style.backgroundColor=''">
=$board_stand?> |
=$get_item_name1?> |
=han_cut($subject1,50);?> |
=$process?> |
=han_cut1($com_name1,10);?> |
$dbConn = @mysql_connect("localhost", "magic2", "magic2");
@mysql_select_db("magic2",$dbConn);
$notice_rows1 = mysql_fetch_row(mysql_query("select hit from hit_public where notice_code='".$board_que[notice_code][$ddr1]."' and board_code='".$board_que[board_code][$ddr1]."'"));
if($notice_rows1[0]!=""){
echo($notice_rows1[0]);
}else{
echo($board_que[hit][$ddr1]);
}
?>
|
}//for ³¡
?>
|
$dbConn = @mysql_connect("localhost", "magic2", "magic2");
@mysql_select_db("magic2",$dbConn);
$notice_rows = mysql_fetch_row(mysql_query("select hit from notice where notice_code='$query[1]' and board_code='$board_code'"));
$hits = $query[0] + $notice_rows[0];
@mysql_query("update hit_public set hit='$hits' where board_code='$board_code' and notice_code='$query[1]'",$dbConn);
@mysql_close($dbConn);
include "../right_bottom.htm";
?>