유용한 팁 공유 게시판
팁공유라고 해서 아주 특별하거나 기발한거 아니어도 됩니다.
자신이 제로보드를 사용하면서 생긴 자신만의 노하우나 아주 사소한 팁이어도 좋습니다.
자신에겐 아무것도 아니더라도 다른분들께는 분명 중요하고 소중한 팁이 될수 있을겁니다.
이미지 크기 자동으로 메인에 나타내기 이미지 클릭시 새창이 아닌 게시판으로 들어가기
참고 홈페이지 http://www.slrpoem.com
<meta name="generator" content="Namo WebEditor">
<?
if (preg_match("/:\/\//i",$_zb_path) || (preg_match("/\.\./i",$_zb_path))) $_zb_path="";
/*****************************************************
* wkrk
* 홈페이지:(http://www.rwapm.server.ne.kr)
* 이 3줄은 삭제하지 말아 주십시오.
******************************************************/
//제로보드 주소 끝에 /을 붙이세요.
//(예제:http://xxx.com/bbs/)
$_zb_url = "http://slrpoem.homejoa.com/bbs/";
//제로보드 절대경로 끝에 /을 붙이세요.
//(예제:/home/www/bbs/)
$_zb_path = "/home/slrpoem/public_html/bbs/";
// 이부분은 수정하면 안됨.
include $_zb_path."_head.php";
//전체 추출개수를 적어주세요.
$nos = "12";
//제목 짜르기. 지정된 숫자 이상이면 ...로 표시.
$max = "10";
//추출할 게시판 아이디 통합추출
//아이디|아이디|아이디 형식으로 추가가능합니다.
$boardss = "40|41|42|43";
//가로로 보일 이미지 개수
$_images_num = "4";
$zero_bbs = explode("|", $boardss);
$li = 0;
for ($i = 0; $i < sizeof($zero_bbs); $i++)
{
$boards = "zetyx_board_".$zero_bbs[$i];
$boards_category = "zetyx_board_category_".$zero_bbs[$i];
$query = "select $boards.no,$boards.name,$boards.subject,$boards.file_name1,$boards.category,$boards.total_comment,$boards.hit,$boards.reg_date,$boards_category.name as category_name from $boards,$boards_category where category=$boards_category.no and $boards.is_secret=0 and $boards.arrangenum=0 and $boards.headnum >-2000000000 order by $boards.reg_date desc limit $nos";
$result = mysql_query($query);
while ($data_board = mysql_fetch_array($result))
{
$tmp_zero_bbs[] = $zero_bbs[$i];
$subjects[] = stripslashes($data_board[subject]);
$names[] = stripslashes($data_board[name]);
$commentss[] = $data_board[total_comment];
$nums[] = $data_board[no];
$hit_bbs[] = $data_board[hit];
$date1[] = $data_board[reg_date];
$date2[] = date("Y.m.d",$data_board[reg_date]);
$date2s[] = date("l. Y년m월d일,A h:i:s",$data_board[reg_date]);
$b_file_name1[] = $data_board[file_name1];
$img_files[] = $data_board[file_name1];
$category_names[] = htmlspecialchars(stripslashes($data_board[category_name]));
$setup0 = mysql_fetch_array(mysql_query("select * from $admin_table where name='$zero_bbs[$i]'"));
$categorys[] = stripslashes($setup0[use_category]);
$title_gal[] = stripslashes($setup0[title]);
$li++;
}
}
?>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
a.aa:link { color:#CCCCCC; text-decoration:none; }
a.aa:visited { color:#CCCCCC; text-decoration:none; }
a.aa:hover { text-decoration:underline; }
.table1 {width:100%;height:100%;}
.table2 {width:100%;height:32px;background-color:#525252;table-layout:fixed;}
.table3 {width:150px;table-layout:fixed;background-color:#3E3E3E;}
.table4 {width:150px;table-layout:fixed;}
.col1 {width:100%;background-color:#3E3E3E;}
.td1 {border-width:1px;border-color:#3E3E3E;border-style:solid;background-color:#3E3E3E;}
.td2 {white-space:nowrap;}
.span1 {font-size:9pt;font-family:굴림;font-weight:bold;color:;}
.span2 {color:#CECFCE;}
.span3 {font-size:9pt;font-family:굴림;color:#CCCCCC;line-height:140%;}
.span4 {font-size:9pt;font-family:굴림;color:#000000;padding-bottom:4px;padding-top:2px;line-height:140%;}
.img1 {border:0px;vertical-align: middle;}
.comment1 {font-family:verdana;font-size:7pt;}
/*]]>*/-->
</style>
<body bgcolor="#3E3E3E">
<table cellspacing="0" cellpadding="0" class="table1">
<tr>
<td valign="top" align="left">
<table cellspacing="3" cellpadding="5" class="table2">
<col class="col1" />
<tr>
<td align="left" class="td1">
<span class="span1">전체 갤러리</span> <span class="span2">|</span>
<span class="span3">최근 올라온 사진 입니다 ▶사진시◀방문을 환영합니다</span></td>
</tr>
</table>
<table cellpadding="4" cellspacing="0" align="center">
<?
$_xx = 0;
$date3 = $date1;
@rsort($date1);
for($j=0;$j<$nos;$j++)
{
$tmp_date = $date1[$j];
for($i=0;$i<count($subjects);$i++)
{
if($tmp_date==$date3[$i])
{
//코멘트가 있을때 코멘트 숫자 표시.없을때는 0
if($commentss[$i]==0) $comments="0"; else $comments="".$commentss[$i]."";
//링크설정 게시판설정 전체목록보기 체크일때 zboard.php 언체크일때 view.php
if($use_alllists[$i]) $target = $_zb_url."zboard.php"; else $target = $_zb_url."view.php";
//카테고리일때 카테고리 추출,아닐경우 카테고리 제외.
if($title_gal[$i]) $title_bbs_gal = "".$title_gal[$i].""; else $title_bbs_gal = "".$tmp_zero_bbs[$i]."";
if($categorys[$i]) $use_category = "<br />위치: ".$title_bbs_gal.">".$category_names[$i].""; else $use_category = "<br />위치: ".$title_bbs_gal."";
//제목 일정길이이상 짜름.
$subject_i = cut_str($subjects[$i], $max);
//링크튤팁,테그제거.
$subject_is = strip_tags($subjects[$i]);
//링크분분.
$subject_i2 = "<a href=\"".$target."?id=".$tmp_zero_bbs[$i]."&no=".$nums[$i]."\" title=\"".$subject_is."\n작성자:".$names[$i]."\n글쓴날:".$date2s[$i]."\n조회수:".$hit_bbs[$i]."\" class=\"aa\">".$subject_i."";
// 24시간안에 올라온글이 있다면 new표시.
$recent_time = 60*60*24;
$reg_time = $tmp_date;
if(time() - $reg_time < $recent_time) {
$new="<img src=\"".$_zb_url."lat_bbs_gl/images/new.gif\" class=\"img1\" alt=\"24시간 안에 올라온글입니다\" />";
} else {
$new="";
}
//이미지 원본 사이즈를 구함.
$img_files_i = $_zb_path.$img_files[$i];
if ($img_files[$i]) {
$imgs = getimagesize($img_files_i);
$imgs_x = $imgs[0];
$imgs_y = $imgs[1];
}
//링크분분.
$img_link="<a href=\"javascript:클릭 하시면 원본 사진을 보실 수 있습니다;\" onclick=\"window.open('".$_zb_url."lat_bbs_gl/img.php?img_file_url=".str_replace("%2F","/",htmlspecialchars(urlencode($img_files[$i])))."','','width=".$imgs_x."px,height=".$imgs_y."px,resizable=no,toolbars=no,scrollbars=no'); return false;\" title=\"클릭 하시면 원본 사진을 보실 수 있습니다.\" class=\"aa\">";
// 이미지 파일이 아닐수도 있으니..이미지 파일인지 검사.
// 이미지 파일이라면 출력.
//이미지가 한글파일일수도 있으니 urlencode 처리
//정규식을 이용,이미지 파일인지 검사.
$file_1sss = substr(strrchr($b_file_name1[$i], '.'), 1);
if(preg_match("/(jpg|png|gif|jpeg|bmp)/i",$file_1sss)) $b_file_name1s="<img src=\"".$_zb_url.str_replace("%2F","/",htmlspecialchars(urlencode($b_file_name1[$i])))."\" style=\"height:135px;border:1px solid #000000;vertical-align: top;\" alt=\"클릭 하시면 원본 사진을 보실 수 있습니다.\" />"; else $b_file_name1s = "";
$_xx ++;
$_images = $_xx % $_images_num;
?>
<?if($_images==1){?>
<tr>
<?}?>
<td align="left" valign="top">
<?if(preg_match("/(jpg|png|gif|jpeg|bmp)/i",$file_1sss)) {?><table cellspacing="3" cellpadding="5" class="table3">
<col class="col1" />
<tr>
<td align="left" class="td1">
<?=$img_link?><?=$b_file_name1s?></td>
</tr>
</table><?}?>
<table cellspacing="3" cellpadding="8" class="table4">
<col class="col1" />
<tr>
<td align="left" class="td1" valign="top"><span class="span3"><b><font color="#D0832C"><?=$subject_i2?></font></b><font color="#D0832C"> </font><?=$new?><br /></span><span class="span3" style="font-size:8pt;"><font color="#999999">코멘트: <?=$comments?> , hit: <?=$hit_bbs[$i]?><br />글쓴이: <?=$names[$i]?><br /></span>
</td>
</tr>
</table>
</td>
<?if(!$_images){?>
</tr>
<tr>
<td style="height:1px;" colspan="<?=$_images_num?>"><span style="font-size:8pt;"><font color="#999999"> </font></span><? } ?>
<? }}} ?>
</table>
</td>
</tr>
</table>


