=nl2br($row["bd_title"])
=substr($row["bd_regdate"],0,10)
=$row["bd_content"]
if($row["bd_regtype"]=="M"){
if($row["bd_state"]=="end"){
}
}
if($s_keyword){
if($s_keyfield=="all"){
$search_query .=" and (bd_title like '%".$s_keyword."%' || bd_content like '%".$s_keyword."%' || bd_writer like '%".$s_keyword."%' || bd_name like '%".$s_keyword."%' ) ";
}
else if($s_keyfield=="bd_writer" ){
$search_query .=" and (bd_writer like '%".$s_keyword."%' || bd_name like '%".$s_keyword."%' ) ";
}
else{
$search_query .=" and ".$s_keyfield." like '%".$s_keyword."%' ";
}
}
$query2 = "select * from ( select a.*, (select ad_name".$admin_language." from sm_admin where a.bd_regid = ad_id) as bd_writer from sm_board a ) as temp where (bd_rank < '".$row["bd_rank"]."' and bd_id = '".$row["bd_id"]."') ".$search_query." ".$bd_language_query ." order by bd_rank desc limit 0,1";
$result2 = query($query2);
$cnt2 = mysqli_num_rows($result2);
if($cnt2){
$row_pre = mysqli_fetch_array($result2);
if($row_pre["bd_regtype"]=="M"){
if($row_pre["bd_pw_yn"]=="Y"){
$pre_str = "
".$row_pre["bd_title"]."
";
}
else{
$pre_str = "
".$row_pre["bd_title"]."
";
}
}
else{
$pre_str = "
".$row_pre["bd_title"]."
";
}
}
else{
$pre_str ="
이전글이 없습니다.
";
}
$query3 = "select * from ( select a.*, (select ad_name".$admin_language." from sm_admin where a.bd_regid = ad_id) as bd_writer from sm_board a ) as temp where (bd_rank > '".$row["bd_rank"]."' and bd_id = '".$row["bd_id"]."') ".$search_query." ".$bd_language_query ." order by bd_rank asc limit 0,1";
$result3 = query($query3);
$cnt3 = mysqli_num_rows($result3);
if($cnt3){
$row_next = mysqli_fetch_array($result3);
if($row_next["bd_regtype"]=="M"){
if($row_next["bd_pw_yn"]=="Y"){
$next_str = "
".$row_next["bd_title"]."
";
}
else{
$next_str = "
".$row_next["bd_title"]."
";
}
}
else{
$next_str = "
".$row_next["bd_title"]."
";
}
}
else{
$next_str ="
다음글이 없습니다.
";
}
if($row["bd_file1"] != ""){
$bd_file = "./_upload/board/".$row["bd_file1"];
if(is_file($bd_file)){
$imageSize = filesize("./_upload/board/".$row["bd_file1"]) / 1024;
$imageSize = round($imageSize,1);
-
첨부파일
=$row["bd_file1"]
}
}
-
이전글
=$pre_str
-
다음글
=$next_str