$grant_list) { echo " "; } if($title=='자료마당'){ $title="복지자료"; } if(($tbl=='board_mem_notice' || $tbl=='board_mem_free' || $tbl=='board_mem_work_manual' || $tbl=='board_mem_form' || $tbl=='board_mem_data') && ($member[level]>7 || $member[level]=='')){ echo " "; } ?> 실로암시각장애인복지관

어두운 세상속에 빛이 되는 실로암

  • 소식알림

"; } if ($tbl=='board_library_list' or $tbl=='board_library_toy') { if ($c == $temp_cate[Id]) echo "$temp_cate[name](선택됨)"; else echo "$temp_cate[name]"; } if ($temp_cate[Id]=='5') echo ""; if($m=='P04') { if ($c == $temp_cate[Id]) echo "$temp_cate[name](선택됨)"; else echo "$temp_cate[name]"; } } //사진 게시판 else if($use_category=='1' && $tbl==board_comm_album01) { $query_cate = "SELECT * FROM $tbl"."_category"; $result_cate=mysql_query($query_cate);?>
    $temp_cate[name]"; }else{ echo "
  • $temp_cate[name]
  • "; } if ($temp_cate[Id]=='5') echo ""; if($m=='P04') { if ($c == $temp_cate[Id]) echo "$temp_cate[name](선택됨)"; else echo "$temp_cate[name]"; } } ?>

"; ?>
>
게시판
>
게시판
게시판
";//번호 if($use_secret=='1') echo ""; else echo ""; echo ""; if($use_secret=='1') echo ""; else echo ""; echo ""; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { //echo $constant; if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c'order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_name") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and name like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } if ($constant) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE constant=$constant order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE constant=$constant and subject like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE constant=$constant and memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_name") $result=mysql_query("SELECT * FROM $tbl WHERE constant=$constant and name like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE constant=$constant and subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1){ $querytest="SELECT * FROM $tbl order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num"; $result=mysql_query($querytest,$connect); } elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_name") $result=mysql_query("SELECT * FROM $tbl WHERE name like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,reg_date desc,Id desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp[confirm] = 0; if ($temp[confirm]=="1" && $temp[name]!=$member[name] && $_SERVER['REMOTE_ADDR']!=$temp[ip]) { $temp[id]=null; $temp = null; } // 자신이 쓴 글은 자신만 열람 가능(관리자 승인 시 보임) - 일반게시판에만 적용 //$reg_date = date('Y-m-d',$temp[reg_date]); $reg_date = date('Y-m-d H:i:s',$temp[reg_date]); $time = time(); $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 ///////////////////////////////// $font = substr_count($temp[subject], ''); if($font=='0'){ if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,50,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,50,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,50,'utf-8'); } } else { if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,78,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,78,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,66,'utf-8'); } } ///////////////////////////////// $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." (댓글".$comment.") "; if($temp[file_name1]) $addfile1 = "파일1";else $addfile1=""; if($temp[file_name2]) $addfile2 = "파일2";else $addfile2="";// 첨부파일 $addfile = null; if($tempzz[secret]=='1') $secret = "비공개"; else $secret = "공개";// 공개여부 if($b_id=='2' || $b_id=='3' || $b_id=='4') $temp[name]="관리자"; //소통마당 작성자 if ($temp[notice]==1){ echo " "; if($tbl=="board_goodneighbors") { echo ""; }else { if($use_secret=='1') { echo "" ; }else { echo ""; } } }else{ echo " "; if($tbl=="board_goodneighbors") { echo ""; }else { if($use_secret=='1') { echo "" ; }else { echo ""; } } } // str_ct -> 공지제목들 /* // 공지사항 echo " "; } else { echo $number; echo ""; } if($tbl=="board_goodneighbors") { echo ""; } */ //공지 내용 //공지내용끝 //작성자 등 echo ""; echo ""; echo" "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } if($flag=='1') { // 사진형게시물출력 echo "
"; if ($total=='0') echo "
"; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc reg_date desc,notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc reg_date desc, notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $photo1 = ""; if($tbl=='board_comm_album01' and $temp[Id]<1273) { $temp[file_name1] = str_replace("data/gallery/","",$temp[file_name1]); $temp[file_savename1] = str_replace("data/gallery/","",$temp[s_file_name1]); } /* $file_name1 = str_replace("data/gallery/","",$temp[file_name1]); $file_savename1 = str_replace("data/gallery/","",$temp[file_savename1]); */ $fext = substr($temp[file_name1],-3); // 파일 확장자 추출 $fpath = "http://211.253.26.38/v2/data/board/".$tbl."/".$temp[file_savename1]; /* if (eregi("swf",$fext)) { $photo1 = "";} */ if (eregi("avi|asf|mpg|wmv|swf",$fext)&&$tbl=='board_facilities') { $photo1 = "해외기관홈페이지";} else if($tbl=='board_comm_album01'){ $photo1 = "$temp[subject] 썸네일"; } else if($tbl=='board_comm_album02'){ $photo1 = "$temp[subject] 썸네일"; } else if($tbl=='board_comm_newsletter'){ $photo1 = "$temp[subject] 썸네일"; } else{ $photo1 = "$temp[subject] 썸네일"; } $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 //$str_subject = mb_substr($temp[subject],0,30,'utf-8'); $str_subject = $temp[subject]; $str_memo = mb_substr($temp[memo],0,200,'utf-8'); //$str_ct = substr($temp_07[subject],0,50); $str_ct = $temp[subject]; $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." 댓글".$comment." "; $temp_catename=@mysql_fetch_array(mysql_query("SELECT * FROM `$tbl"."_category` WHERE Id = '$temp[category]'"));////글제목에 카테고리 나오도록 if($tbl=='board_comm_album01'){ $text = preg_replace('/]*>]*>/i','',$str_memo); echo "

  • $photo1



    $str_ct

    ";echo mb_substr($text,0,300)."

    관리자
    $reg_date $temp[hit]

"; ?>

  • $photo1

    $str_ct
    ";echo mb_substr($str_memo,0,300)."

    관리자
    $reg_date $temp[hit]

  • "; } else if($tbl=='board_comm_newsletter'){ echo "

    • $photo1


       $str_ct


       등록일자 : $reg_date

       조회수 : $temp[hit]






    "; } $number--; // 가상 번호를 1씩 뺌 } } echo ""; // echo ""; } if($flag=='2') { if ($total=='0') echo "
    "; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc reg_date desc,Id desc, notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc reg_date desc,Id desc, notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } if($total) { echo "
    게시판
     번호제목공개여부제 목첨부 작성자 작성일 조회
    등록된 내용이 없습니다
     공지  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $secret  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "
     $number  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $secret  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "
     "; if ($temp[notice]==1){ echo "공지  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo " $addfile1 $addfile2  $temp[name] $reg_date $temp[hit]
    등록된 내용이 없습니다
    등록된 내용이 없습니다
    "; if($page_num==$total_page) $table_page=$total; else $table_page=$page_num; for($i=1;$i <= $table_page;$i++) { $temp = mysql_fetch_array($result); $photo1 = ""; //$fext = substr($temp[file_name1],-3); // 파일 확장자 추출 $fpath = "http://211.253.26.38/v2/data/board/".$tbl."/".$temp[file_savename1]; if($temp[0]=="") break; // 시작보다 작으면 패스 if($tbl=='board_bnt_n' || $tbl=='board_bnt_book02') $photo1 = " $temp[subject] 썸네일"; else $photo1 = " $temp[subject] 썸네일"; //$str_subject1 = mb_substr($temp[subject],0,14,'utf-8'); $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." [C".$comment."] "; echo(""); if($i % 5 == 0) { echo("");//4칸마다 줄바꾸기 } } //빈칸채우기 for($j = $total;$j <= 4;$j++) { echo(""); } echo(""); echo("
    $photo1

    $temp[subject]
    "); } } $number--; // 가상 번호를 1씩 뺌 // echo ""; } if($flag=='3') { echo " "; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc Id desc,notice desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." [C".$comment."] "; $temp_subject=explode(";",$temp[subject]); if($temp[temp1]!='') { $fpath_b = "http://211.253.26.38/v2/data/board/".$tbl."/".$temp[temp1]; $img_b = "$temp_subject[0]배너"; } else $img_b = "$temp_subject[0]배너"; echo " "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } if($flag=='4') { echo " "; // 순번 echo ""; // 형태 echo ""; // 제목 echo ""; // 저자 echo ""; // 출판사 echo ""; // 배포형태 echo ""; // 분류 echo ""; // 상태 echo ""; echo ""; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { if($r) { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and category='$c' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_title") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and category='$c' and title like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_author") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and category='$c' and author like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_publisher") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and category='$c' and publisher like '%$term1%' order by id desc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_title") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and title like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_author") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and author like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_publisher") $result=mysql_query("SELECT * FROM $tbl WHERE recommend='$r' and publisher like '%$term1%' order by id desc limit $start_num,$page_num",$connect); } } else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by id desc limit $start_num,$page_num",$connect); elseif($book_srch=="1") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and title like '%$_title%' and author like '%$_author%' and publisher like '%$_publisher%' and _release like '%$_release%' and _type like '%$_type%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_title") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and title like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_author") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and author like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_publisher") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and publisher like '%$term1%' order by id desc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by id desc limit $start_num,$page_num",$connect); elseif($book_srch=="1") $result=mysql_query("SELECT * FROM $tbl WHERE title like '%$_title%' and author like '%$_author%' and publisher like '%$_publisher%' and _release like '%$_release%' and _type like '%$_type%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_title") $result=mysql_query("SELECT * FROM $tbl WHERE title like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_author") $result=mysql_query("SELECT * FROM $tbl WHERE author like '%$term1%' order by id desc limit $start_num,$page_num",$connect); elseif($select_srch=="_publisher") $result=mysql_query("SELECT * FROM $tbl WHERE publisher like '%$term1%' order by id desc limit $start_num,$page_num",$connect); } } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp[confirm] = 0; if ($temp[confirm]=="1" && $temp[name]!=$member[name] && $_SERVER['REMOTE_ADDR']!=$temp[ip]) { $temp[id]=null; $temp = null; } // 자신이 쓴 글은 자신만 열람 가능(관리자 승인 시 보임) - 일반게시판에만 적용 //$reg_date = date('Y-m-d',$temp[reg_date]); $reg_date = date('Y-m-d H:i:s',$temp[reg_date]); $time = time(); $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 ///////////////////////////////// $font = substr_count($temp[title], ''); if($font=='0'){ if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[title],0,32,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[title],0,32,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[title],0,50,'utf-8'); } } else { if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[title],0,78,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[title],0,78,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[title],0,66,'utf-8'); } } ///////////////////////////////// $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." (댓글".$comment.") "; if($temp[file_name1]) $addfile1 = "파일1";else $addfile1=""; if($temp[file_name2]) $addfile2 = "파일2";else $addfile2="";// 첨부파일 $addfile = null; if($temp[secret]=='1') $secret = "비공개"; else $secret = "공개";// 공개여부 if($b_id=='2' || $b_id=='3' || $b_id=='4') $temp[name]="관리자"; //소통마당 작성자 $temp_catename=@mysql_fetch_array(mysql_query("SELECT * FROM `$tbl"."_category` WHERE Id = '$temp[category]'"));////글제목에 카테고리 나오도록 echo ""; if ($member[id]=='admin' or $member[id]=='hhr') { echo ""; } else { echo ""; } echo " "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } if($flag=='5') { echo " "; // 순번 echo ""; // 이름 echo ""; // 사용연령 echo ""; // 상태 echo ""; echo " "; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc Id desc,notice desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE subject like '%$term1%' or memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp[confirm] = 0; if ($temp[confirm]=="1" && $temp[name]!=$member[name] && $_SERVER['REMOTE_ADDR']!=$temp[ip]) { $temp[id]=null; $temp = null; } // 자신이 쓴 글은 자신만 열람 가능(관리자 승인 시 보임) - 일반게시판에만 적용 //$reg_date = date('Y-m-d',$temp[reg_date]); $reg_date = date('Y-m-d H:i:s',$temp[reg_date]); $time = time(); $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 ///////////////////////////////// $font = substr_count($temp[subject], ''); if($font=='0'){ if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,32,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,32,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,50,'utf-8'); } } else { if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,78,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,78,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,66,'utf-8'); } } ///////////////////////////////// $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." (댓글".$comment.") "; if($temp[file_name1]) $addfile1 = "파일1";else $addfile1=""; if($temp[file_name2]) $addfile2 = "파일2";else $addfile2="";// 첨부파일 $addfile = null; if($temp[secret]=='1') $secret = "비공개"; else $secret = "공개";// 공개여부 if($b_id=='2' || $b_id=='3' || $b_id=='4') $temp[name]="관리자"; //소통마당 작성자 $temp_catename=@mysql_fetch_array(mysql_query("SELECT * FROM `$tbl"."_category` WHERE Id = '$temp[category]'"));////글제목에 카테고리 나오도록 echo ""; } else { if($use_secret=='1') {echo "";} else {echo "";} } echo " "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } if($flag=='6') { echo " "; // 순번 echo ""; // 자산이름 echo ""; // 첨부 echo ""; // 관리번호 echo ""; // 단체명 echo ""; echo " "; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc Id desc,notice desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="org_name") $result=mysql_query("SELECT * FROM $tbl WHERE org_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="equip_name") $result=mysql_query("SELECT * FROM $tbl WHERE equip_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="manage_num") $result=mysql_query("SELECT * FROM $tbl WHERE manage_num like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="purchase_date") $result=mysql_query("SELECT * FROM $tbl WHERE purchase_date like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="manage_dept") $result=mysql_query("SELECT * FROM $tbl WHERE manage_dept like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="user_name") $result=mysql_query("SELECT * FROM $tbl WHERE user_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="equip_location") $result=mysql_query("SELECT * FROM $tbl WHERE equip_location like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_manager3") $result=mysql_query("SELECT * FROM $tbl WHERE _manager3 like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_manager4") $result=mysql_query("SELECT * FROM $tbl WHERE _manager4 like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp[confirm] = 0; if ($temp[confirm]=="1" && $temp[name]!=$member[name] && $_SERVER['REMOTE_ADDR']!=$temp[ip]) { $temp[id]=null; $temp = null; } // 자신이 쓴 글은 자신만 열람 가능(관리자 승인 시 보임) - 일반게시판에만 적용 //$reg_date = date('Y-m-d',$temp[reg_date]); $reg_date = date('Y-m-d H:i:s',$temp[reg_date]); $time = time(); $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 ///////////////////////////////// $font = substr_count($temp[subject], ''); if($font=='0'){ if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,32,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,32,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,50,'utf-8'); } } else { if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,78,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,78,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,66,'utf-8'); } } ///////////////////////////////// $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." (댓글".$comment.") "; if($temp[file_name1]) $addfile1 = "파일1";else $addfile1=""; if($temp[file_name2]) $addfile2 = "파일2";else $addfile2="";// 첨부파일 $addfile = null; if($temp[secret]=='1') $secret = "비공개"; else $secret = "공개";// 공개여부 if($b_id=='2' || $b_id=='3' || $b_id=='4') $temp[name]="관리자"; //소통마당 작성자 $temp_catename=@mysql_fetch_array(mysql_query("SELECT * FROM `$tbl"."_category` WHERE Id = '$temp[category]'"));////글제목에 카테고리 나오도록 echo ""; echo " "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } if($flag=='7') { echo " "; // 기안번호 echo ""; // 기안제목 echo ""; // 결재대상자 echo ""; // 작성자 echo ""; // 작성일 echo ""; // 조회여부 echo ""; echo " "; /////////////////////////////////////// 게시글 출력 if($tbl=='board_goodneighbors') $f_asc = "field_asc asc,"; else $f_asc = ""; // 내림차순정렬 추가시 if ($total=='0') echo ""; else { if($c) { if(!$term1) $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_subject") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_memo") $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and memo like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); else $result=mysql_query("SELECT * FROM $tbl WHERE category='$c' and subject like '%$term1%' or memo like '%$term1%' order by $f_asc Id desc,notice desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } else { if(!$term1) $result=mysql_query("SELECT * FROM $tbl order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="org_name") $result=mysql_query("SELECT * FROM $tbl WHERE org_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="equip_name") $result=mysql_query("SELECT * FROM $tbl WHERE equip_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="manage_num") $result=mysql_query("SELECT * FROM $tbl WHERE manage_num like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="purchase_date") $result=mysql_query("SELECT * FROM $tbl WHERE purchase_date like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="manage_dept") $result=mysql_query("SELECT * FROM $tbl WHERE manage_dept like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="user_name") $result=mysql_query("SELECT * FROM $tbl WHERE user_name like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="equip_location") $result=mysql_query("SELECT * FROM $tbl WHERE equip_location like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_manager3") $result=mysql_query("SELECT * FROM $tbl WHERE _manager3 like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); elseif($select_srch=="_manager4") $result=mysql_query("SELECT * FROM $tbl WHERE _manager4 like '%$term1%' order by $f_asc notice desc,Id desc,reg_date desc,headnum desc,depth asc limit $start_num,$page_num",$connect); } $memo=trim(stripslashes($result[memo])); $number = $total-($page-1)*$page_num; // 앞에 붙는 가상번호 while ($temp = @mysql_fetch_array($result)) { $temp[confirm] = 0; if ($temp[confirm]=="1" && $temp[name]!=$member[name] && $_SERVER['REMOTE_ADDR']!=$temp[ip]) { $temp[id]=null; $temp = null; } // 자신이 쓴 글은 자신만 열람 가능(관리자 승인 시 보임) - 일반게시판에만 적용 //$reg_date = date('Y-m-d',$temp[reg_date]); $reg_date = date('Y-m-d H:i:s',$temp[reg_date]); $time = time(); $reg_date = substr($temp[reg_date],0,10); $new = strtotime($temp[reg_date]); //new아이콘 ///////////////////////////////// $font = substr_count($temp[subject], ''); if($font=='0'){ if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,32,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,32,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,50,'utf-8'); } } else { if ($temp[notice]==1) $str_ct = ''.mb_substr($temp[subject],0,78,'utf-8'); // 공지표시 else { if ($temp[depth]==1) $str_ct = '└>'.mb_substr($temp[subject],0,78,'utf-8'); // 답글표시 else $str_ct = mb_substr($temp[subject],0,66,'utf-8'); } } ///////////////////////////////// $temp_comment=@mysql_fetch_array(mysql_query("SELECT count(*) FROM $tbl"."_comment WHERE parent=$temp[Id]"));// 코멘트 $comment = $temp_comment[0]; if($comment>0) $str_ct = $str_ct." (댓글".$comment.") "; if($temp[file_name1]) $addfile1 = "파일1";else $addfile1=""; if($temp[file_name2]) $addfile2 = "파일2";else $addfile2="";// 첨부파일 $addfile = null; if($temp[secret]=='1') $secret = "비공개"; else $secret = "공개";// 공개여부 if($b_id=='2' || $b_id=='3' || $b_id=='4') $temp[name]="관리자"; //소통마당 작성자 $temp_catename=@mysql_fetch_array(mysql_query("SELECT * FROM `$tbl"."_category` WHERE Id = '$temp[category]'"));////글제목에 카테고리 나오도록 echo ""; echo " "; $number--; // 가상 번호를 1씩 뺌 } } // echo ""; } ?>
    업체명 후원내역 홈페이지
    등록된 내용이 없습니다
    $img_b

    $temp_subject[0]
    $temp_subject[1] $temp_subject[2]
     번호형태 제목 저자 출판사 배포형태 분류 상태
    등록된 내용이 없습니다
     "; if ($temp[notice]==1) echo "공지"; else echo $number; echo " $temp_catename[name]  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo " $str_ct  $temp[author]  $temp[publisher]  $temp[_release]  $temp[_type]  $temp[status]
     번호이름 사용연령 상태
    등록된 내용이 없습니다
     "; if ($temp[notice]==1) echo "공지"; else echo $number; if($tbl=="board_goodneighbors") { echo "  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo "  $secret  $str_ct ";if(time() < $new + 24*60*60) echo "새글"; echo " $temp[age]  $temp[status]
     순번자산이름 첨부 관리번호 단체명
    등록된 내용이 없습니다
     "; if ($temp[notice]==1) echo "공지"; else echo $number; echo"  $temp[equip_name] $addfile1 $addfile2  $temp[manage_num]  $temp[org_name]
    접수번호기안제목 결재대상자 작성자 작성일 조회여부
    등록된 내용이 없습니다
     "; if ($temp[notice]==1) echo "공지"; else echo $number; echo"  $temp[equip_name] $addfile1 $addfile2  $temp[manage_num]  $temp[org_name]
    $show_page_num) { $prev_page = $start_page-1;echo"이전";} while($i+$start_page<=$total_page&&$i<=$show_page_num) { $move_page = $i+$start_page; if ($page == $move_page) echo "$move_page"; else echo"$move_page"; $i++; } if ($total_page>$move_page) { $next_page = $move_page+1;echo"다음";} } elseif ($r=='1') { if ($page>$show_page_num) { $prev_page = $start_page-1;echo"이전";} while($i+$start_page<=$total_page&&$i<=$show_page_num) { $move_page = $i+$start_page; if ($page == $move_page) echo "$move_page"; else echo"$move_page"; $i++; } if ($total_page>$move_page) { $next_page = $move_page+1;echo"다음";} } elseif ($constant == '1') { if ($page>$show_page_num) { $prev_page = $start_page-1;echo"이전";} while($i+$start_page<=$total_page&&$i<=$show_page_num) { $move_page = $i+$start_page; if ($page == $move_page) echo "$move_page"; else echo"$move_page"; $i++; } if ($total_page>$move_page) { $next_page = $move_page+1;echo"다음";} } else { if ($page>$show_page_num) { $prev_page = $start_page-1; echo "이전"; } while($i+$start_page<=$total_page&&$i<=$show_page_num) { $move_page = $i+$start_page; if ($page == $move_page){ echo "$move_page"; } else { echo"$move_page"; } $i++; } if ($total_page>$move_page) { $next_page = $move_page+1;echo"다음";} } ?>
    "; } else{ echo "



    "; } } elseif($tbl=='board_library_list') { if (!$r) { if($member[id]=='admin' or $member[id]=='hhr'){ echo "      "; }else{ echo "



    "; } } else { echo "    "; echo "



    "; } } elseif($tbl=='board_library_toy2') { if($member[id]=='admin' or $member[id]=='hhr'){ echo "      "; } else{ echo "



    "; } } elseif($tbl=='board_comm_workassist') { if($member[id]=='admin' or $member[id]=='gprud' or $member[id]=='hayo2' or $member[id]=='ekdma2459'){ echo "      "; }else{ echo "



    "; } }elseif($tbl=='board_sil_apply'){ if($member[id]=='admin2' ){ echo "      "; }else{ echo "



    "; } } else { if($member[level]<=$grant_write){ echo "      "; }else{ echo "



    "; } } ?>