게시판 색 번갈아 표시되게 하고 싶은데요... 정보
게시판 색 번갈아 표시되게 하고 싶은데요...본문
게시판 색 흰색과 약간 회색 톤으로 만들려고 하는데
지금 list_skin.php를 수정하고 있습니다.
소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 분류2 옵션
function get_bo_n_option($bo_n='')
{
global $g4, $board;
$arr = explode("|", $board[$bo_n]); // 구분자가 | 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
// 분류 사용 여부 list.php에서 참조 (카테고리가 없는 경우에는 이것은 절대 비활성화)
if ($is_category = true) {
$bo_9_option = get_bo_n_option('bo_9'); // SELECT OPTION 태그로 넘겨받음
}
if ($board[bo_10]) { // 분류1 하위카테고리 (다중카테고리)
include_once "$board_skin_path/skin.lib.php";
if ($is_category) {
$nc_category_location = "./board.php?bo_table=$bo_table&sca=$sca&sfl=wr_5&stx=";
$nc_category_option = get_nc_category_option($bo_table, $sca);
}
}
// 성인 옵션
$query = "SHOW FULL FIELDS FROM $write_table LIKE 'wr_option'";
$temp = sql_fetch($query);
if ($temp['Type'] != "set('html1','html2','secret','mail','adult')") {
$query = "ALTER TABLE $write_table CHANGE `wr_option` `wr_option` SET( 'html1', 'html2', 'secret', 'mail', 'adult' ) NOT NULL ";
sql_query($query);
}
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; clear:both; width:000px;'>제목</nobr>
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
//섬네일 관련 설정
$thumb_width=$board[bo_skin_3];//섬네일 최대폭
$thumb_height=$board[bo_skin_4];//섬네일 최대높이
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_bbs';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 바둑판형 갤러리 가로수 조정
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
//DQ엔진 인클루드 2005-03-22 석훈
include "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$dqEngine['thumb_resize'] = 2;
// 0, 1, 2 사용
// 0: 원본 비율 대칭 리사이즈, 1: 비율유지 안함(찌그러짐), 2: 원본비율 리사이즈 + Center Crop
if($board[bo_skin_1]=="9") { //일정관리 스킨일 경우 출력
if (eregi('%', $width)) {
$col_width = "14%"; //표의 가로 폭이 100보다 크면 픽셀값입력
}else{
$col_width = round($width/7); //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력
}
$col_height= 80 ;//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
if ($year < 1) {
$month = $b_mon;
$mday = $b_day;
$year = $b_year;
}
$lastday=array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
} //일정관리 스킨일 경우 출력
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!--리스트 이미지 새창띄우기-->
<script type="text/javascript">
// 이미지뷰어
<!--
function view_photo(img_url)
{
window.open("<?=$board_skin_path?>/imgOpen.php?img_url=" + img_url, "photo", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes");
}
//-->
</script>
<!--새창띄우기
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0 <? if ($board[bo_color_1]) { ?>bgcolor="#<?=$board[bo_color_1]?>"<?}?>>
<tr>
<td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height=15 colspan="2"></td>
</tr>
<tr height="25">
<td>
<table border="0" cellspacing="0" cellpadding="3"><form name="fcategory" method="get">
<tr>
<? if ($board[bo_use_category]) { ?>
<? if ($board[bo_10]) { // 2단 카테고리 ?>
<td><select name=sca onchange="location='<?=$category_location?>&sca='+this.value+'&wr_6='+this.form.wr_6.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_use_category]?></option><?=$category_option?></select>
<? if ($sca) { ?><select name=nca onchange="location='<?=$nc_category_location?>'+this.value+'&nca='+this.value;"><option value=''>선택하세요</option><?=$nc_category_option?></select><? } ?>
<? if ($stx && $nca) { $stx = ""; $sfl = ""; $sop = ""; } ?></td>
<?}else{?>
<td><select name=sca onchange="location='<?=$category_location?>'+this.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_use_category]?></option><?=$category_option?></select></td>
<?}?>
<?}?>
<? if($board[bo_9_subj]){ // 분류2 사용한다면(분류2 제목) ?>
<td><select name=wr_6 onchange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_6='+this.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_9_subj]?></option><?=$bo_9_option?></select></td>
<?}?>
<td>
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript: my_menu_add()"><font color="#<?=$board[bo_color_6]?>"><b>바로가기</b></font></a> </td>
</tr>
</table><?}else{?><a href="javascript: my_menu_add()" style="margin:0 10px 0 0;"><img src="<?=$board_skin_path?>/img/btn_my_menu.gif" align=absmiddle border="0"></a><?}?>
<script language=javascript>
function my_menu_add() {
if (confirm("'<?=$board[bo_subject]?>' 게시판 바로가기를 등록하시겠습니까?")) {
hiddenframe.location.href = "../bbs/my_menu_add.php?bo_table=<?=$bo_table?>";
}}</script></td>
</tr></form>
</table>
</td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<? if ($is_checkbox) { ?>
<td style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"> </td><?}?>
<td style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"> </td>
<? if ($rss_href) { ?>
<td align="right">
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$rss_href?>"><font color="#<?=$board[bo_color_6]?>"><b>RSS</b></font></a> </td>
</tr>
</table><?}else{?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?></td>
<?}?>
<? if ($admin_href) { ?>
<td align="right"><? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$admin_href?>"><font color="#<?=$board[bo_color_6]?>"><b>관리자</b></font></a> </td>
</tr>
</table><?}else{?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a><?}?></td>
<?}?>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td></td>
</tr>
</table>
<? if($board[bo_skin_1]=="7") { // 한줄 메모장일 경우 쓰기 버튼 출력 ?>
<?
if ($w == "") {
$is_name = false;
$is_password = false;
if (!$member[mb_id] || ($is_admin && $w == 'u' && $member[mb_id] != $write[mb_id])) {
$is_name = true;
$is_password = true;
}
$password_required = "required";
$content = $board[bo_insert_content];
include_once("./norobot.inc.php");
}
if (!$subject) $subject = 한줄방명록;
//if (!$subject) $subject = 1;
?>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<form name="fwrite" method="post" action="./write_update.php" enctype="multipart/form-data" autocomplete="off" style="margin:0px;">
<input type=hidden name=null>
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$wr_id?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>_<?=$wr_id?>">
<?
if ($w == "")
echo "";
else if ($w == "u")
echo "<tr><td height=17 class=name style='padding-left:10px;'>- 수정하기 -</td><td> </td></tr>";
else
echo "<tr><td height=17 class=name style='padding-left:10px;'>- 답변하기 -</td><td> </td></tr>";
?>
<tr><td align=center>
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<? if ($is_name) { ?>
<td width="30" style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;" align="center">이름</td>
<td width="100"><INPUT class=ed maxLength=4 style="width:100%; height:20;color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;" name='wr_name' itemname="이름" required value="<?=$name?>"></td>
<? } ?>
<? if ($is_password) { ?><INPUT class=aa type=hidden maxLength=10 size=8 name=wr_password itemname="비번" <?=$password_required?>><? } ?>
<? if ($is_norobot) { ?><input type=hidden name=wr_key value="<?=$norobot_key?>"><? } ?>
<td width="30" style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;" align="center">메모</td>
<td><INPUT class=ed id="wr_content" name="wr_content" itemname="내용" required maxlength=300 style="width:100%; height:20 ;color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;" value="<?=$content?>"></td>
<td width="50"><INPUT type=image id="btn_submit" src="<?=$board_skin_path?>/img/ok_btn.gif" width="50" height="20" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</form></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td></td>
</tr>
</table>
<?} // 한줄메모장 끝 ?>
<form name="fboardlist" method="post" style="margin:0px;" action="">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<? if($board[bo_skin_1] == "2" || $board[bo_skin_1] == "3" ) { include ("$board_skin_path/list.box.skin.php"); //박스스킨 ?>
<?} else if($board[bo_skin_1] == "4" || $board[bo_skin_1] == "8") { include ("$board_skin_path/list.gallery.skin.php"); // 바둑판형 박스 스킨 ?>
<?} else if($board[bo_skin_1]== "5") { include ("$board_skin_path/list.news.skin.php"); // 웹진형일 경우 ?>
<?} else if($board[bo_skin_1]=="6") { include ("$board_skin_path/list.img.skin.php"); // 미리보기 ?>
<?} else if($board[bo_skin_1]=="7") { include ("$board_skin_path/list.memo.skin.php"); // 한줄 메모장 ?>
<?} else if($board[bo_skin_1]=="9") { include ("$board_skin_path/list.diary.skin.php"); // 일정관리 ?>
<?}else{//일반게시판 시작?>
<table width="100%" border="0" cellspacing="2" cellpadding="0" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>ffffff<?}?>">
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="34">
<tr>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;" class="box_title_font"><strong>번호</strong></span></td>
<td align="center"><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>" class="box_title_font"><strong>제목</strong></font></td>
<? if ($board[bo_option_1] == "1") { // 이름 ?>
<td align="center" width="83"><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>작성자</strong></span></td>
<?}?>
<? if ($board[bo_option_2] == "1") { // 등록일 ?>
<?}?>
<? if ($is_good) { ?>
<td width="82" align="center"><?=subject_sort_link('wr_good', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>공감</strong></span></a></td>
<?}?>
<? if ($is_nogood) { ?>
<td width="83" align="center"><?=subject_sort_link('wr_nogood', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>반대</strong></span></a></td>
<?}?>
<? if ($board[bo_option_10]) { // 다운포인트 ?>
<td width="50" align="center"><?=subject_sort_link('wr_4', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">포인트</span></a></td>
<?}?>
<? if ($board[bo_skin_2] == "2") { // 문서 서식 자료 ?>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_hwp.gif' border='0' alt='한글'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_doc.gif' border='0' alt='워드'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0' alt='엑셀'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_pdf.gif' border='0' alt='PDF'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_file.gif' border='0' alt='기타'></td>
<? } // 서식 끝 ?>
<? if ($board[bo_option_6]) { // 지식포인트 ?>
<td width="50" align="center"><?=subject_sort_link('wr_1', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">내공</span></a></td>
<td width="40" align="center"><?=subject_sort_link('wr_2', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">상태</a></span></td>
<?}?>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="2"></td>
</tr>
</table>
<? for ($i=0; $i<count($list); $i++) {
$bgcolor= $i%2 ? 0 : 1; ?>
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="34">
<tr>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<?
if ($list[$i][is_notice]) // 공지사항
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'><b>! 공지 !</b></font>"; } else { echo "<img src=\"$board_skin_path/img/icon_notice.gif\">"; }
else if ($wr_id == $list[$i][wr_id]) // 현재위치
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'><b>{$list[$i][num]}</b></font>"; } else { echo "<font color='#ff6600;'><b>{$list[$i][num]}</b></font>"; }
else
echo "{$list[$i][num]}";
?></span></td>
<? if($board[bo_skin_1] == "1") { // 베이직 이미지일 경우
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1"; // 링크 새창 열기
$photo_view = $list[$i][file][0][path] .'/'. $list[$i][file][0][file]; // 이미지 새창열기
if (preg_match("/\.(gif|jpg|png|bmp)$/i", $image)) {
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_bbs/" . $list[$i][wr_id].".gif";
make_thumb($thumb_width,$thumb_height,$thumbsource,$thumbimg);
@chmod($thumbimg, 0707);
echo "<td width='80'>";
if ($board[bo_color_3]) { echo "<table width='100%' border='0' cellspacing='3' cellpadding='0' bgcolor='#$board[bo_color_3]'>"; }
else { echo "<table width='100%' border='0' cellspacing='3' cellpadding='0' bgcolor='#f0f0f0'><tr>"; }
if (strstr($list[$i][wr_option], "adult")) {
if (empty($member[mb_id])) { echo "<td bgcolor='#888888' style='filter:Alpha(Opacity=20)'>"; }
else { $temp_mb_birth = substr($member[mb_birth], 0, 4);
if ($temp_mb_birth) {
if (date("Y") - $temp_mb_birth < 18) { echo "<td bgcolor='#888888' style='filter:Alpha(Opacity=20)'>"; }}
}
}else{ echo "<td bgcolor='#888888'>";}
if($board[bo_skin_6] == "2") { echo "<a href='{$href}' target=_blank>"; } // 링크 새창 열기
else if($board[bo_skin_6] == "1") { echo "<a href=# onClick=\"view_photo('{$photo_view}');\" style='cursor:pointer'>"; } // 이미지만 새창으로
else{ echo "<a href='{$list[$i][href]}'>"; } // 내용보기
echo "<img src='$g4[path]/data/file/$bo_table/thumb_bbs/".$list[$i][wr_id].".gif' border='0'></a>";
echo "</td></tr></table></td>";
} }?>
<? if ($is_checkbox) { ?><td width="10"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><?}?>
<? if($list[$i][reply]){ ?><td width='10'><?=$list[$i][icon_reply]?></td><?}?>
<td><a href='<?=$list[$i][ca_name_href]?>'><span style="color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<? if ($board[bo_use_category]) { ?>[<?=$list[$i][ca_name]?>]</span></a><?}?>
<? if($board[bo_9_subj]){?>
<a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&page=1&mode=&sca=&sca=&wr_6=<?=$list[$i][wr_6]?>"><span style="color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">[<?=$list[$i][wr_6]?>]</span></a>
<?}?>
<? if ($board[bo_skin_2] == "1") { echo"<b>[Poll]</b> "; } // 투표일 경우 출력?>
<span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<?
if (strstr($list[$i][wr_option], "adult")) { echo " <img src='$board_skin_path/img/icon_19.gif' align='absmiddle'> "; }
echo $nobr_begin;
$style = "";
if ($list[$i][is_notice] || $wr_id == $list[$i][wr_id]) $style = " style='font-weight:bold;'";
echo "<a href='{$list[$i][href]}'";
if ($bo_table=="ad")
{
echo " target='_blank' ";
}
echo "$style >";
if ($board[bo_color_7]) { echo"<font color=#{$board[bo_color_7]}>{$list[$i][subject]}</font>"; } else { echo $list[$i][subject]; }
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\">";
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'>{$list[$i][comment_cnt]}</font>"; } else { echo"<font color='#ff6600'>{$list[$i][comment_cnt]}</font>";}
echo "</a>";
echo $nobr_end;
?></span>
<? if($list[$i][icon_new]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>N</b></span><?}else{?><?=$list[$i][icon_new]?><?}}?>
<? if($list[$i][icon_file]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>F</b></span><?}else{?><?=$list[$i][icon_file]?><?}}?>
<? if($list[$i][icon_link]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>L</b></span><?}else{?><?=$list[$i][icon_link]?><?}}?>
<? if($list[$i][icon_hot]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>Hot</b></span><?}else{?><?=$list[$i][icon_hot]?><?}}?>
<? if($list[$i][icon_secret]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>S</b></span><?}else{?><?=$list[$i][icon_secret]?><?}}?></td>
<? if ($board[bo_option_1] == "1") { // 이름 ?>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][name]?></span></td>
<?}?>
<? if ($board[bo_option_2] == "1") { // 등록일 ?>
<? } ?>
<? if ($is_good) { ?>
<td width="82" align="center"><span style="display:block; overflow:hidden; clear:both; width:82px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][wr_good]?></span></td>
<? } ?>
<? if ($is_nogood) { ?>
<td width="83" align="center"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][wr_nogood]?></span></td>
<? } ?>
<? if ($board[bo_option_10]) { // 다운포인트 ?>
<td width="50" align="center"><span style="display:block; overflow:hidden; clear:both; width:50px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><font color="#<? if($board[bo_color_8]) { ?><?=$board[bo_color_8]?>><?}else{?>ff6600<?}?>"><? if($list[$i][wr_4]) { echo"{$list[$i][wr_4]}";}else{ echo"무료";}?></font></span></td>
<? } ?>
<? if ($board[bo_skin_2] == "2") { // 서식자료실일 경우 ?>
<td width=22 align="center">
<? if ($list[$i][file][1][file]) { // 한글파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_hwp.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][2][file]) { // 워드파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_doc.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][3][file]) { // 엑셀파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][4][file]) { // PDF파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][5][file]) { // 기타파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?=$list[5][icon_file]?></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font> <? } ?>
</td>
<? } // 서식 끝 ?>
<? if ($board[bo_option_6]) { // 지식포인트 ?>
<td width="50" align="center"><span style="display:block; overflow:hidden; clear:both; width:50px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><font color="#<? if($board[bo_color_8]) { ?><?=$board[bo_color_8]?>><?}else{?>ff6600<?}?>"><?=number_format($list[$i][wr_1])?></font></span></td>
<td align="center" width="40"><?
if ($list[$i][wr_2]) {
echo "<img src='$board_skin_path/img/icon_select.gif' align=absmiddle>";
} else {
if ($list[$i][wr_datetime] > '2006-10-17')
echo "<img src='$board_skin_path/img/icon_standby.gif' align=absmiddle>";
else
echo ' ';
}
?></td>
<?}?>
</tr>
</table>
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="0" height="1" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<tr>
<td></td>
</tr>
</table>
<?}?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td></td>
</tr>
</table>
<?}//일반게시판 끝 ?>
<? if (count($list) == 0) { ?>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>" height="150">
<tr>
<td bgcolor="#<? if ($board[bo_color_1]) { ?><?=$board[bo_color_1]?><?}else{?>ffffff<?}?>" align="center">게시물이 없습니다.</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="7"></td>
</tr>
</table>
<? } ?>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>" border="0" height="26">
<tr>
<td align="center" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<? if ($board[bo_skin_1]=="9") { ?>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>" title="오늘로" onfocus="this.blur()"><span style="font:12pt 굴림체;color:#<? if ($board[bo_color_8]) { ?><?=$board[bo_color_8]?><?}else{?>ff6600<?}?>;"><b><? echo ("$year".년."$month".월); ?></b></span></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<? } else {?>
<? if ($board[bo_color_4]) { ?>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?}else{?>
<? if ($prev_part_href) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>"><tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href='$prev_part_href'><font color="#<?=$board[bo_color_6]?>"><b>이전검색</b></font></a> </td>
</tr></table><?}?><?}?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
if ($board[bo_color_4]) {
$write_pages = str_replace("처음", "<font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">◀◀</font> ", $write_pages);
} else {
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("이전", "<font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">◀</font> ", $write_pages);
} else {
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("다음", " <font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">▶</font>", $write_pages);
} else {
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("맨끝", " <font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">▶▶</font>", $write_pages);
} else {
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
}
if ($board[bo_color_7]) {
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#$board[bo_color_7];\">$1</font></b>", $write_pages);
} else {
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#000000;\">$1</font></b>", $write_pages);
}
if ($board[bo_color_8]) {
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#$board[bo_color_8];\">$1</font></b>", $write_pages);
} else {
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$1</font></b>", $write_pages);
}
?><?=$write_pages?>
<? if ($board[bo_color_4]) { ?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
<?}else{?>
<? if ($next_part_href) {?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>"><tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href='$next_part_href'><font color="#<?=$board[bo_color_6]?>"><b>다음검색</b></font></a> </td>
</tr></table><?}?><?}?><?}?> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="7"></td>
</tr>
</table>
<!-- 링크 버튼, 검색 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td height="40">
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<? if ($list_href) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$list_href?>"><font color="#<?=$board[bo_color_6]?>"><b>목록</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
<? if ($write_href) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$write_href?>"><font color="#<?=$board[bo_color_6]?>"><b>쓰기</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
<? if ($is_checkbox) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_delete();"><font color="#<?=$board[bo_color_6]?>"><b>선택삭제</b></font></a> </td>
</tr>
</table>
</td>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_copy('copy');"><font color="#<?=$board[bo_color_6]?>"><b>선택복사</b></font></a> </td>
</tr>
</table>
</td>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_copy('move');"><font color="#<?=$board[bo_color_6]?>"><b>선택이동</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
<?}else{?>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a>
<? } ?>
<? if ($write_href) { ?>
<a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
<? } ?>
</td>
<td align="right">
<select name=sfl style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</option>
</select>
<input class=ed name=stx maxlength=15 size=10 itemname="검색어" required value='<?=$stx?>' style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<select name=sop style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</td></tr></table>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$wr_6?>') document.fcategory.wr_6.value = '<?=$wr_6?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<!-- 게시판 목록 끝 -->
입니다.
<? for ($i=0; $i<count($list); $i++) {
$bgcolor= $i%2 ? 0 : 1; ?>
이소스를 넣어봤는데 반응이 없더라구요
확인 좀 부탁드려요
그리고 한가지 더 궁금한게 있는데 여기 사이트 처럼 게시판을 메뉴 아래부분
그러니깐 게시판 상단 정렬이 가능한가요??
잘안되더라구요 ㅠㅠ
도와주세요
지금 list_skin.php를 수정하고 있습니다.
소스는
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 분류2 옵션
function get_bo_n_option($bo_n='')
{
global $g4, $board;
$arr = explode("|", $board[$bo_n]); // 구분자가 | 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
// 분류 사용 여부 list.php에서 참조 (카테고리가 없는 경우에는 이것은 절대 비활성화)
if ($is_category = true) {
$bo_9_option = get_bo_n_option('bo_9'); // SELECT OPTION 태그로 넘겨받음
}
if ($board[bo_10]) { // 분류1 하위카테고리 (다중카테고리)
include_once "$board_skin_path/skin.lib.php";
if ($is_category) {
$nc_category_location = "./board.php?bo_table=$bo_table&sca=$sca&sfl=wr_5&stx=";
$nc_category_option = get_nc_category_option($bo_table, $sca);
}
}
// 성인 옵션
$query = "SHOW FULL FIELDS FROM $write_table LIKE 'wr_option'";
$temp = sql_fetch($query);
if ($temp['Type'] != "set('html1','html2','secret','mail','adult')") {
$query = "ALTER TABLE $write_table CHANGE `wr_option` `wr_option` SET( 'html1', 'html2', 'secret', 'mail', 'adult' ) NOT NULL ";
sql_query($query);
}
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; clear:both; width:000px;'>제목</nobr>
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
//섬네일 관련 설정
$thumb_width=$board[bo_skin_3];//섬네일 최대폭
$thumb_height=$board[bo_skin_4];//섬네일 최대높이
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb_bbs';
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
// 바둑판형 갤러리 가로수 조정
$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
//DQ엔진 인클루드 2005-03-22 석훈
include "$g4[path]/thumbEngine/dq_thumb_engine2.php";
$dqEngine['thumb_resize'] = 2;
// 0, 1, 2 사용
// 0: 원본 비율 대칭 리사이즈, 1: 비율유지 안함(찌그러짐), 2: 원본비율 리사이즈 + Center Crop
if($board[bo_skin_1]=="9") { //일정관리 스킨일 경우 출력
if (eregi('%', $width)) {
$col_width = "14%"; //표의 가로 폭이 100보다 크면 픽셀값입력
}else{
$col_width = round($width/7); //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력
}
$col_height= 80 ;//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
if ($year < 1) {
$month = $b_mon;
$mday = $b_day;
$year = $b_year;
}
$lastday=array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
} //일정관리 스킨일 경우 출력
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!--리스트 이미지 새창띄우기-->
<script type="text/javascript">
// 이미지뷰어
<!--
function view_photo(img_url)
{
window.open("<?=$board_skin_path?>/imgOpen.php?img_url=" + img_url, "photo", "toolbar=no, location=no, directories=no,status=no, menubar=no, scrollbars=yes, resizable=yes");
}
//-->
</script>
<!--새창띄우기
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0 <? if ($board[bo_color_1]) { ?>bgcolor="#<?=$board[bo_color_1]?>"<?}?>>
<tr>
<td>
<!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height=15 colspan="2"></td>
</tr>
<tr height="25">
<td>
<table border="0" cellspacing="0" cellpadding="3"><form name="fcategory" method="get">
<tr>
<? if ($board[bo_use_category]) { ?>
<? if ($board[bo_10]) { // 2단 카테고리 ?>
<td><select name=sca onchange="location='<?=$category_location?>&sca='+this.value+'&wr_6='+this.form.wr_6.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_use_category]?></option><?=$category_option?></select>
<? if ($sca) { ?><select name=nca onchange="location='<?=$nc_category_location?>'+this.value+'&nca='+this.value;"><option value=''>선택하세요</option><?=$nc_category_option?></select><? } ?>
<? if ($stx && $nca) { $stx = ""; $sfl = ""; $sop = ""; } ?></td>
<?}else{?>
<td><select name=sca onchange="location='<?=$category_location?>'+this.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_use_category]?></option><?=$category_option?></select></td>
<?}?>
<?}?>
<? if($board[bo_9_subj]){ // 분류2 사용한다면(분류2 제목) ?>
<td><select name=wr_6 onchange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_6='+this.value;" style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'><option value=''><?=$board[bo_9_subj]?></option><?=$bo_9_option?></select></td>
<?}?>
<td>
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript: my_menu_add()"><font color="#<?=$board[bo_color_6]?>"><b>바로가기</b></font></a> </td>
</tr>
</table><?}else{?><a href="javascript: my_menu_add()" style="margin:0 10px 0 0;"><img src="<?=$board_skin_path?>/img/btn_my_menu.gif" align=absmiddle border="0"></a><?}?>
<script language=javascript>
function my_menu_add() {
if (confirm("'<?=$board[bo_subject]?>' 게시판 바로가기를 등록하시겠습니까?")) {
hiddenframe.location.href = "../bbs/my_menu_add.php?bo_table=<?=$bo_table?>";
}}</script></td>
</tr></form>
</table>
</td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<? if ($is_checkbox) { ?>
<td style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"> </td><?}?>
<td style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"> </td>
<? if ($rss_href) { ?>
<td align="right">
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$rss_href?>"><font color="#<?=$board[bo_color_6]?>"><b>RSS</b></font></a> </td>
</tr>
</table><?}else{?><a href='<?=$rss_href?>'><img src='<?=$board_skin_path?>/img/btn_rss.gif' border=0 align=absmiddle></a><?}?></td>
<?}?>
<? if ($admin_href) { ?>
<td align="right"><? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$admin_href?>"><font color="#<?=$board[bo_color_6]?>"><b>관리자</b></font></a> </td>
</tr>
</table><?}else{?><a href="<?=$admin_href?>"><img src="<?=$board_skin_path?>/img/btn_admin.gif" title="관리자" width="63" height="22" border="0" align="absmiddle"></a><?}?></td>
<?}?>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
<tr>
<td></td>
</tr>
</table>
<? if($board[bo_skin_1]=="7") { // 한줄 메모장일 경우 쓰기 버튼 출력 ?>
<?
if ($w == "") {
$is_name = false;
$is_password = false;
if (!$member[mb_id] || ($is_admin && $w == 'u' && $member[mb_id] != $write[mb_id])) {
$is_name = true;
$is_password = true;
}
$password_required = "required";
$content = $board[bo_insert_content];
include_once("./norobot.inc.php");
}
if (!$subject) $subject = 한줄방명록;
//if (!$subject) $subject = 1;
?>
<table width="100%" cellpadding=0 cellspacing=0 border=0>
<form name="fwrite" method="post" action="./write_update.php" enctype="multipart/form-data" autocomplete="off" style="margin:0px;">
<input type=hidden name=null>
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$wr_id?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<input type=hidden name=wr_subject value="<?=$subject?>_<?=$wr_id?>">
<?
if ($w == "")
echo "";
else if ($w == "u")
echo "<tr><td height=17 class=name style='padding-left:10px;'>- 수정하기 -</td><td> </td></tr>";
else
echo "<tr><td height=17 class=name style='padding-left:10px;'>- 답변하기 -</td><td> </td></tr>";
?>
<tr><td align=center>
<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<? if ($is_name) { ?>
<td width="30" style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;" align="center">이름</td>
<td width="100"><INPUT class=ed maxLength=4 style="width:100%; height:20;color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;" name='wr_name' itemname="이름" required value="<?=$name?>"></td>
<? } ?>
<? if ($is_password) { ?><INPUT class=aa type=hidden maxLength=10 size=8 name=wr_password itemname="비번" <?=$password_required?>><? } ?>
<? if ($is_norobot) { ?><input type=hidden name=wr_key value="<?=$norobot_key?>"><? } ?>
<td width="30" style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;" align="center">메모</td>
<td><INPUT class=ed id="wr_content" name="wr_content" itemname="내용" required maxlength=300 style="width:100%; height:20 ;color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;" value="<?=$content?>"></td>
<td width="50"><INPUT type=image id="btn_submit" src="<?=$board_skin_path?>/img/ok_btn.gif" width="50" height="20" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</form></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td></td>
</tr>
</table>
<?} // 한줄메모장 끝 ?>
<form name="fboardlist" method="post" style="margin:0px;" action="">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl' value='<?=$sfl?>'>
<input type='hidden' name='stx' value='<?=$stx?>'>
<input type='hidden' name='spt' value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<? if($board[bo_skin_1] == "2" || $board[bo_skin_1] == "3" ) { include ("$board_skin_path/list.box.skin.php"); //박스스킨 ?>
<?} else if($board[bo_skin_1] == "4" || $board[bo_skin_1] == "8") { include ("$board_skin_path/list.gallery.skin.php"); // 바둑판형 박스 스킨 ?>
<?} else if($board[bo_skin_1]== "5") { include ("$board_skin_path/list.news.skin.php"); // 웹진형일 경우 ?>
<?} else if($board[bo_skin_1]=="6") { include ("$board_skin_path/list.img.skin.php"); // 미리보기 ?>
<?} else if($board[bo_skin_1]=="7") { include ("$board_skin_path/list.memo.skin.php"); // 한줄 메모장 ?>
<?} else if($board[bo_skin_1]=="9") { include ("$board_skin_path/list.diary.skin.php"); // 일정관리 ?>
<?}else{//일반게시판 시작?>
<table width="100%" border="0" cellspacing="2" cellpadding="0" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>ffffff<?}?>">
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="34">
<tr>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;" class="box_title_font"><strong>번호</strong></span></td>
<td align="center"><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>" class="box_title_font"><strong>제목</strong></font></td>
<? if ($board[bo_option_1] == "1") { // 이름 ?>
<td align="center" width="83"><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>작성자</strong></span></td>
<?}?>
<? if ($board[bo_option_2] == "1") { // 등록일 ?>
<?}?>
<? if ($is_good) { ?>
<td width="82" align="center"><?=subject_sort_link('wr_good', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>공감</strong></span></a></td>
<?}?>
<? if ($is_nogood) { ?>
<td width="83" align="center"><?=subject_sort_link('wr_nogood', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>222222<?}?>;"><strong>반대</strong></span></a></td>
<?}?>
<? if ($board[bo_option_10]) { // 다운포인트 ?>
<td width="50" align="center"><?=subject_sort_link('wr_4', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">포인트</span></a></td>
<?}?>
<? if ($board[bo_skin_2] == "2") { // 문서 서식 자료 ?>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_hwp.gif' border='0' alt='한글'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_doc.gif' border='0' alt='워드'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0' alt='엑셀'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_pdf.gif' border='0' alt='PDF'></td>
<td width=22 align="center"><img src='<?=$board_skin_path?>/img/icon_file.gif' border='0' alt='기타'></td>
<? } // 서식 끝 ?>
<? if ($board[bo_option_6]) { // 지식포인트 ?>
<td width="50" align="center"><?=subject_sort_link('wr_1', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">내공</span></a></td>
<td width="40" align="center"><?=subject_sort_link('wr_2', $qstr2, 1)?><span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">상태</a></span></td>
<?}?>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="2"></td>
</tr>
</table>
<? for ($i=0; $i<count($list); $i++) {
$bgcolor= $i%2 ? 0 : 1; ?>
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="34">
<tr>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<?
if ($list[$i][is_notice]) // 공지사항
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'><b>! 공지 !</b></font>"; } else { echo "<img src=\"$board_skin_path/img/icon_notice.gif\">"; }
else if ($wr_id == $list[$i][wr_id]) // 현재위치
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'><b>{$list[$i][num]}</b></font>"; } else { echo "<font color='#ff6600;'><b>{$list[$i][num]}</b></font>"; }
else
echo "{$list[$i][num]}";
?></span></td>
<? if($board[bo_skin_1] == "1") { // 베이직 이미지일 경우
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1"; // 링크 새창 열기
$photo_view = $list[$i][file][0][path] .'/'. $list[$i][file][0][file]; // 이미지 새창열기
if (preg_match("/\.(gif|jpg|png|bmp)$/i", $image)) {
$thumbsource="$g4[path]/data/file/$bo_table/" . $image;
$thumbimg="$g4[path]/data/file/$bo_table/thumb_bbs/" . $list[$i][wr_id].".gif";
make_thumb($thumb_width,$thumb_height,$thumbsource,$thumbimg);
@chmod($thumbimg, 0707);
echo "<td width='80'>";
if ($board[bo_color_3]) { echo "<table width='100%' border='0' cellspacing='3' cellpadding='0' bgcolor='#$board[bo_color_3]'>"; }
else { echo "<table width='100%' border='0' cellspacing='3' cellpadding='0' bgcolor='#f0f0f0'><tr>"; }
if (strstr($list[$i][wr_option], "adult")) {
if (empty($member[mb_id])) { echo "<td bgcolor='#888888' style='filter:Alpha(Opacity=20)'>"; }
else { $temp_mb_birth = substr($member[mb_birth], 0, 4);
if ($temp_mb_birth) {
if (date("Y") - $temp_mb_birth < 18) { echo "<td bgcolor='#888888' style='filter:Alpha(Opacity=20)'>"; }}
}
}else{ echo "<td bgcolor='#888888'>";}
if($board[bo_skin_6] == "2") { echo "<a href='{$href}' target=_blank>"; } // 링크 새창 열기
else if($board[bo_skin_6] == "1") { echo "<a href=# onClick=\"view_photo('{$photo_view}');\" style='cursor:pointer'>"; } // 이미지만 새창으로
else{ echo "<a href='{$list[$i][href]}'>"; } // 내용보기
echo "<img src='$g4[path]/data/file/$bo_table/thumb_bbs/".$list[$i][wr_id].".gif' border='0'></a>";
echo "</td></tr></table></td>";
} }?>
<? if ($is_checkbox) { ?><td width="10"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><?}?>
<? if($list[$i][reply]){ ?><td width='10'><?=$list[$i][icon_reply]?></td><?}?>
<td><a href='<?=$list[$i][ca_name_href]?>'><span style="color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<? if ($board[bo_use_category]) { ?>[<?=$list[$i][ca_name]?>]</span></a><?}?>
<? if($board[bo_9_subj]){?>
<a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>&page=1&mode=&sca=&sca=&wr_6=<?=$list[$i][wr_6]?>"><span style="color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">[<?=$list[$i][wr_6]?>]</span></a>
<?}?>
<? if ($board[bo_skin_2] == "1") { echo"<b>[Poll]</b> "; } // 투표일 경우 출력?>
<span style="font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;">
<?
if (strstr($list[$i][wr_option], "adult")) { echo " <img src='$board_skin_path/img/icon_19.gif' align='absmiddle'> "; }
echo $nobr_begin;
$style = "";
if ($list[$i][is_notice] || $wr_id == $list[$i][wr_id]) $style = " style='font-weight:bold;'";
echo "<a href='{$list[$i][href]}'";
if ($bo_table=="ad")
{
echo " target='_blank' ";
}
echo "$style >";
if ($board[bo_color_7]) { echo"<font color=#{$board[bo_color_7]}>{$list[$i][subject]}</font>"; } else { echo $list[$i][subject]; }
echo "</a>";
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\">";
if ($board[bo_color_8]) { echo "<font color='#{$board[bo_color_8]};'>{$list[$i][comment_cnt]}</font>"; } else { echo"<font color='#ff6600'>{$list[$i][comment_cnt]}</font>";}
echo "</a>";
echo $nobr_end;
?></span>
<? if($list[$i][icon_new]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>N</b></span><?}else{?><?=$list[$i][icon_new]?><?}}?>
<? if($list[$i][icon_file]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>F</b></span><?}else{?><?=$list[$i][icon_file]?><?}}?>
<? if($list[$i][icon_link]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>L</b></span><?}else{?><?=$list[$i][icon_link]?><?}}?>
<? if($list[$i][icon_hot]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>Hot</b></span><?}else{?><?=$list[$i][icon_hot]?><?}}?>
<? if($list[$i][icon_secret]) { if ($board[bo_color_1]){ ?><span style="font:normal 11px tahoma; color:#<?=$board[bo_color_8]?>;"> <b>S</b></span><?}else{?><?=$list[$i][icon_secret]?><?}}?></td>
<? if ($board[bo_option_1] == "1") { // 이름 ?>
<td align="center" width="83"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][name]?></span></td>
<?}?>
<? if ($board[bo_option_2] == "1") { // 등록일 ?>
<? } ?>
<? if ($is_good) { ?>
<td width="82" align="center"><span style="display:block; overflow:hidden; clear:both; width:82px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][wr_good]?></span></td>
<? } ?>
<? if ($is_nogood) { ?>
<td width="83" align="center"><span style="display:block; overflow:hidden; clear:both; width:83px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><?=$list[$i][wr_nogood]?></span></td>
<? } ?>
<? if ($board[bo_option_10]) { // 다운포인트 ?>
<td width="50" align="center"><span style="display:block; overflow:hidden; clear:both; width:50px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><font color="#<? if($board[bo_color_8]) { ?><?=$board[bo_color_8]?>><?}else{?>ff6600<?}?>"><? if($list[$i][wr_4]) { echo"{$list[$i][wr_4]}";}else{ echo"무료";}?></font></span></td>
<? } ?>
<? if ($board[bo_skin_2] == "2") { // 서식자료실일 경우 ?>
<td width=22 align="center">
<? if ($list[$i][file][1][file]) { // 한글파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_hwp.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][2][file]) { // 워드파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_doc.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][3][file]) { // 엑셀파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][4][file]) { // PDF파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src='<?=$board_skin_path?>/img/icon_excel.gif' border='0'></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font><? } ?>
</td>
<td width=22 align="center">
<? if ($list[$i][file][5][file]) { // 기타파일 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?=$list[5][icon_file]?></td>
</tr>
</table>
<? }else{ ?><font color="#<? if ($board[bo_color_7]) { ?><?=$board[bo_color_7]?><?}else{?>222222<?}?>">- </font> <? } ?>
</td>
<? } // 서식 끝 ?>
<? if ($board[bo_option_6]) { // 지식포인트 ?>
<td width="50" align="center"><span style="display:block; overflow:hidden; clear:both; width:50px;font:normal 11px tahoma; color:#<? if ($board[bo_color_9]) { ?><?=$board[bo_color_9]?><?}else{?>999999<?}?>;"><font color="#<? if($board[bo_color_8]) { ?><?=$board[bo_color_8]?>><?}else{?>ff6600<?}?>"><?=number_format($list[$i][wr_1])?></font></span></td>
<td align="center" width="40"><?
if ($list[$i][wr_2]) {
echo "<img src='$board_skin_path/img/icon_select.gif' align=absmiddle>";
} else {
if ($list[$i][wr_datetime] > '2006-10-17')
echo "<img src='$board_skin_path/img/icon_standby.gif' align=absmiddle>";
else
echo ' ';
}
?></td>
<?}?>
</tr>
</table>
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="0" height="1" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<tr>
<td></td>
</tr>
</table>
<?}?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td></td>
</tr>
</table>
<?}//일반게시판 끝 ?>
<? if (count($list) == 0) { ?>
<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>" height="150">
<tr>
<td bgcolor="#<? if ($board[bo_color_1]) { ?><?=$board[bo_color_1]?><?}else{?>ffffff<?}?>" align="center">게시물이 없습니다.</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="7"></td>
</tr>
</table>
<? } ?>
</form>
<!-- 페이지 -->
<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#<? if ($board[bo_color_2]) { ?><?=$board[bo_color_2]?><?}else{?>cccccc<?}?>" border="0" height="26">
<tr>
<td align="center" bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>">
<? if ($board[bo_skin_1]=="9") { ?>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=$month; } else {$year_pre=$year-1; $month_pre=$month;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_prev.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 1) { $year_pre=$year-1; $month_pre=12; } else {$year_pre=$year; $month_pre=$month-1;} echo ("year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_prev.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?>" title="오늘로" onfocus="this.blur()"><span style="font:12pt 굴림체;color:#<? if ($board[bo_color_8]) { ?><?=$board[bo_color_8]?><?}else{?>ff6600<?}?>;"><b><? echo ("$year".년."$month".월); ?></b></span></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/m_next.gif" border="0" title="<?=$month_pre?>월" align="abbottom"></a>
<a href="<?="$_SERVER[PHP_SELF]?bo_table=$bo_table&"?><?if ($month == 12) { $year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month;} echo ("&year=$year_pre&month=$month_pre");?>" target="_self" onfocus="this.blur()"><img src="<?=$board_skin_path?>/img/y_next.gif" border="0" title="<?=$year_pre?>년" align="abbottom"></a>
<? } else {?>
<? if ($board[bo_color_4]) { ?>
<? if ($prev_part_href) { echo "<a href='$prev_part_href'><img src='$board_skin_path/img/btn_search_prev.gif' border=0 align=absmiddle title='이전검색'></a>"; } ?>
<?}else{?>
<? if ($prev_part_href) { ?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>"><tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href='$prev_part_href'><font color="#<?=$board[bo_color_6]?>"><b>이전검색</b></font></a> </td>
</tr></table><?}?><?}?>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
if ($board[bo_color_4]) {
$write_pages = str_replace("처음", "<font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">◀◀</font> ", $write_pages);
} else {
$write_pages = str_replace("처음", "<img src='$board_skin_path/img/begin.gif' border='0' align='absmiddle' title='처음'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("이전", "<font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">◀</font> ", $write_pages);
} else {
$write_pages = str_replace("이전", "<img src='$board_skin_path/img/prev.gif' border='0' align='absmiddle' title='이전'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("다음", " <font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">▶</font>", $write_pages);
} else {
$write_pages = str_replace("다음", "<img src='$board_skin_path/img/next.gif' border='0' align='absmiddle' title='다음'>", $write_pages);
}
if ($board[bo_color_4]) {
$write_pages = str_replace("맨끝", " <font style=\"font-family:tahoma; font-size:9px; color:#$board[bo_color_4];\">▶▶</font>", $write_pages);
} else {
$write_pages = str_replace("맨끝", "<img src='$board_skin_path/img/end.gif' border='0' align='absmiddle' title='맨끝'>", $write_pages);
}
if ($board[bo_color_7]) {
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#$board[bo_color_7];\">$1</font></b>", $write_pages);
} else {
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#000000;\">$1</font></b>", $write_pages);
}
if ($board[bo_color_8]) {
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#$board[bo_color_8];\">$1</font></b>", $write_pages);
} else {
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:tahoma; font-size:11px; color:#E15916;\">$1</font></b>", $write_pages);
}
?><?=$write_pages?>
<? if ($board[bo_color_4]) { ?>
<? if ($next_part_href) { echo "<a href='$next_part_href'><img src='$board_skin_path/img/btn_search_next.gif' border=0 align=absmiddle title='다음검색'></a>"; } ?>
<?}else{?>
<? if ($next_part_href) {?>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>"><tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href='$next_part_href'><font color="#<?=$board[bo_color_6]?>"><b>다음검색</b></font></a> </td>
</tr></table><?}?><?}?><?}?> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#<? if ($board[bo_color_3]) { ?><?=$board[bo_color_3]?><?}else{?>f0f0f0<?}?>" height="3"></td>
</tr>
<tr>
<td height="7"></td>
</tr>
</table>
<!-- 링크 버튼, 검색 -->
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td height="40">
<? if ($board[bo_color_4]) { ?>
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<? if ($list_href) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$list_href?>"><font color="#<?=$board[bo_color_6]?>"><b>목록</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
<? if ($write_href) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="<?=$write_href?>"><font color="#<?=$board[bo_color_6]?>"><b>쓰기</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
<? if ($is_checkbox) { ?>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_delete();"><font color="#<?=$board[bo_color_6]?>"><b>선택삭제</b></font></a> </td>
</tr>
</table>
</td>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_copy('copy');"><font color="#<?=$board[bo_color_6]?>"><b>선택복사</b></font></a> </td>
</tr>
</table>
</td>
<td>
<table border="0" cellspacing="1" cellpadding="2" bgcolor="#<?=$board[bo_color_4]?>">
<tr>
<td bgcolor="#<?=$board[bo_color_5]?>" align="center"> <a href="javascript:select_copy('move');"><font color="#<?=$board[bo_color_6]?>"><b>선택이동</b></font></a> </td>
</tr>
</table>
</td>
<? } ?>
</tr>
</table>
<?}else{?>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" border="0"></a>
<? } ?>
<? if ($write_href) { ?>
<a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a>
<? } ?>
<? if ($is_checkbox) { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" border="0"></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/btn_select_copy.gif" border="0"></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/btn_select_move.gif" border="0"></a>
<? } ?>
<? } ?>
</td>
<td align="right">
<select name=sfl style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<option value='wr_subject'>제목</option>
<option value='wr_content'>내용</option>
<option value='wr_subject||wr_content'>제목+내용</option>
<option value='mb_id,1'>회원아이디</option>
<option value='mb_id,0'>회원아이디(코)</option>
<option value='wr_name,1'>이름</option>
<option value='wr_name,0'>이름(코)</option>
</select>
<input class=ed name=stx maxlength=15 size=10 itemname="검색어" required value='<?=$stx?>' style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<select name=sop style='color:<?=$board[bo_color_6]?>;background-color:<?=$board[bo_color_5]?>;border-color:<?=$board[bo_color_4]?>;border-width:1px;'>
<option value=and>and</option>
<option value=or>or</option>
</select>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle></td>
</tr>
</table>
</form>
</td></tr></table>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$wr_6?>') document.fcategory.wr_6.value = '<?=$wr_6?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<!-- 게시판 목록 끝 -->
입니다.
<? for ($i=0; $i<count($list); $i++) {
$bgcolor= $i%2 ? 0 : 1; ?>
이소스를 넣어봤는데 반응이 없더라구요
확인 좀 부탁드려요
그리고 한가지 더 궁금한게 있는데 여기 사이트 처럼 게시판을 메뉴 아래부분
그러니깐 게시판 상단 정렬이 가능한가요??
잘안되더라구요 ㅠㅠ
도와주세요
댓글 전체
스크롤 후덜덜;
<tr><td> 블라블라 </td></tr>
를
if($i%2==1) $bgcolor= 'style="background:#eee;"'; else $bgcolor='';
<tr $bgcolor><td>블라블라</td></tr>
로 고쳐주세요~
를
if($i%2==1) $bgcolor= 'style="background:#eee;"'; else $bgcolor='';
<tr $bgcolor><td>블라블라</td></tr>
로 고쳐주세요~
죄송한데
<tr><td> 블라블라 </td></tr>
이게 어느 부분인가요??
죄송합니다!! 이해가 안되서요 ㅠㅠ
<tr><td> 블라블라 </td></tr>
이게 어느 부분인가요??
죄송합니다!! 이해가 안되서요 ㅠㅠ