안녕하세요..
첨으로 이곳에 글을 올려보는데.. 도움을 청하는 글이라 미안하네요..^^
아는것도 없고 답답하기만 하네요.
홈을 조금 수정해 보려고 index.php 파일을 만지작 거렸더니..
최근게시물들이 온데간데 없이 사라져버렸어요..엉엉..
무엇이 잘못된건지 한번 봐주세요...
부탁드립니다..
<? include "/home/yesdoll/head.php"; ?>
<?
function print_bbs($skinname, $title, $id, $num=5, $textlen=30, $datetype="Y/m/d") {
global $_zb_path, $_zb_url, $connect, $t_board, $admin_table;
if(!$skinname||!$id||!$title) return;
$str = zReadFile($_zb_path."latest_skin/".$skinname."/main.html");
if(!$str) {
echo "지정하신 $skinname 이라는 최근목록 스킨이 존재하지 않습니다<br>";
return;
}
$setup = mysql_fetch_array(mysql_query("select use_alllist from $admin_table where name='$id'"));
if($setup[use_alllist]) $target = "zboard.php?id=".$id;
else $target = "view.php?id=".$id;
$result = mysql_query("select * from $t_board"."_$id where is_secret=0 order by no desc limit $num", $connect) or die(mysql_error());
$tmpStr = explode("[loop]",$str);
$header = $tmpStr[0];
$tmpStr2 = explode("[/loop]",$tmpStr[1]);
$loop = $tmpStr2[0];
$footer = $tmpStr2[1];
// 공지사항 형식을 만들때 사용
if(eregi("[notice_",$header)) {
$data=mysql_fetch_array($result);
$memo = stripslashes($data[memo]);
if($data[use_html]<2) $memo = nl2br($memo);
else $memo = strip_tags($memo);
$filename1 = $data[file_name1];
$filename2 = $data[file_name2];
if(eregi(".gif|.jpg",$filename1))$uploadimage1 = "<img src=".$_zb_url.$filename1." border=0><br>"; else $uploadimage1="";
if(eregi(".gif|.jpg",$filename2))$uploadimage2 = "<img src=".$_zb_url.$filename1." border=0><br>"; else $uploadimage2="";
$memo = autolink($uploadimage1.$uploadimage2.$memo);
if($data[ismember]) {
$imageBoxPattern = "/[img:(.+?).(jpg|gif),align=([a-z]){0,},width=([0-9]+),height=([0-9]+),vspace=([0-9]+),hspace=([0-9]+),border=([0-9]+)]/i";
$memo=preg_replace($imageBoxPattern,"<img src='".$_zb_url."icon/member_image_box/$data[ismember]/\1.\2' align='\3' width='\4' height='\5' vspace='\6' hspace='\7' border='\8'>", stripslashes($memo));
}
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
$date = date($datetype, $data[reg_date]);
$header = str_replace("[notice_memo]",$memo,$header);
$header = str_replace("[notice_subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$header);
// $header = str_replace("[notice_subject]",$subject,$header);
$header = str_replace("[notice_date]",$date,$header);
}
$main_data = "";
while($data=mysql_fetch_array($result)) {
$name = stripslashes($data[name]);
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
$date = date($datetype, $data[reg_date]);
if($data[total_comment]) $comment = "[".$data[total_comment]."]"; else $comment="";
$main = $loop;
$main = str_replace("[name]",$name,$main);
$main = str_replace("[date]",$date,$main);
$main = str_replace("[subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$main);
$main = str_replace("[comment]",$comment,$main);
$main_data .= "n".$main;
}
$list = $header.$main_data.$footer;
$list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
$list = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$list);
echo $list;
}
?>
<frameset rows="*,20" frameborder=0 frame=0 border=0>
<frame src="file:///C|/WINDOWS/바탕%20화면/zip/메인파일" scrolling="auto" marginwidth=0>
<frame src="file:///C|/WINDOWS/바탕%20화면/zip/yesdoll.com/sarangbi_bgm/sarangbi_bgm.php" scrolling="no" marginwidth=0>
<noframes>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border=0 style='table-layout:fixed;'>
<col width=60%></col><col width=40%></col>
<tr><td style='border-width:0 1 0 0;border-color:E0E0E0;border-style:solid;'>
<? print_bbs("notice102", "NOTICE", "25", 3, 35)?>
</td><td valign=top style='padding:10 8 0 8;'>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border=0 style='table-layout:fixed;'>
<tr><td valign=top style='padding:10 8 0 8;'>
<? print_bbs("ggambo_latest104", "Gallery", "11", 5, 25, m·d)?>
</td></tr>
</tr><td valign=top style='padding:10 8 0 8;'>
<? print_bbs("ggambo_latest104", "FREEBOARD", "21", 5, 25, m·d)?><br>
</td></tr></table></td></tr></table>
<? include "/home/yesdoll/foot.php"; ?>
</noframes>
</frameset>
첨으로 이곳에 글을 올려보는데.. 도움을 청하는 글이라 미안하네요..^^
아는것도 없고 답답하기만 하네요.
홈을 조금 수정해 보려고 index.php 파일을 만지작 거렸더니..
최근게시물들이 온데간데 없이 사라져버렸어요..엉엉..
무엇이 잘못된건지 한번 봐주세요...
부탁드립니다..
<? include "/home/yesdoll/head.php"; ?>
<?
function print_bbs($skinname, $title, $id, $num=5, $textlen=30, $datetype="Y/m/d") {
global $_zb_path, $_zb_url, $connect, $t_board, $admin_table;
if(!$skinname||!$id||!$title) return;
$str = zReadFile($_zb_path."latest_skin/".$skinname."/main.html");
if(!$str) {
echo "지정하신 $skinname 이라는 최근목록 스킨이 존재하지 않습니다<br>";
return;
}
$setup = mysql_fetch_array(mysql_query("select use_alllist from $admin_table where name='$id'"));
if($setup[use_alllist]) $target = "zboard.php?id=".$id;
else $target = "view.php?id=".$id;
$result = mysql_query("select * from $t_board"."_$id where is_secret=0 order by no desc limit $num", $connect) or die(mysql_error());
$tmpStr = explode("[loop]",$str);
$header = $tmpStr[0];
$tmpStr2 = explode("[/loop]",$tmpStr[1]);
$loop = $tmpStr2[0];
$footer = $tmpStr2[1];
// 공지사항 형식을 만들때 사용
if(eregi("[notice_",$header)) {
$data=mysql_fetch_array($result);
$memo = stripslashes($data[memo]);
if($data[use_html]<2) $memo = nl2br($memo);
else $memo = strip_tags($memo);
$filename1 = $data[file_name1];
$filename2 = $data[file_name2];
if(eregi(".gif|.jpg",$filename1))$uploadimage1 = "<img src=".$_zb_url.$filename1." border=0><br>"; else $uploadimage1="";
if(eregi(".gif|.jpg",$filename2))$uploadimage2 = "<img src=".$_zb_url.$filename1." border=0><br>"; else $uploadimage2="";
$memo = autolink($uploadimage1.$uploadimage2.$memo);
if($data[ismember]) {
$imageBoxPattern = "/[img:(.+?).(jpg|gif),align=([a-z]){0,},width=([0-9]+),height=([0-9]+),vspace=([0-9]+),hspace=([0-9]+),border=([0-9]+)]/i";
$memo=preg_replace($imageBoxPattern,"<img src='".$_zb_url."icon/member_image_box/$data[ismember]/\1.\2' align='\3' width='\4' height='\5' vspace='\6' hspace='\7' border='\8'>", stripslashes($memo));
}
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
$date = date($datetype, $data[reg_date]);
$header = str_replace("[notice_memo]",$memo,$header);
$header = str_replace("[notice_subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$header);
// $header = str_replace("[notice_subject]",$subject,$header);
$header = str_replace("[notice_date]",$date,$header);
}
$main_data = "";
while($data=mysql_fetch_array($result)) {
$name = stripslashes($data[name]);
$subject = cut_str(stripslashes($data[subject]),$textlen)."</font></b>";
$date = date($datetype, $data[reg_date]);
if($data[total_comment]) $comment = "[".$data[total_comment]."]"; else $comment="";
$main = $loop;
$main = str_replace("[name]",$name,$main);
$main = str_replace("[date]",$date,$main);
$main = str_replace("[subject]","<a href='".$_zb_url.$target."&no=$data[no]'>".$subject."</a>",$main);
$main = str_replace("[comment]",$comment,$main);
$main_data .= "n".$main;
}
$list = $header.$main_data.$footer;
$list = str_replace("[title]","<a href='".$_zb_url."zboard.php?id=".$id."'>".$title."</a>",$list);
$list = str_replace("[dir]",$_zb_url."latest_skin/".$skinname."/images/",$list);
echo $list;
}
?>
<frameset rows="*,20" frameborder=0 frame=0 border=0>
<frame src="file:///C|/WINDOWS/바탕%20화면/zip/메인파일" scrolling="auto" marginwidth=0>
<frame src="file:///C|/WINDOWS/바탕%20화면/zip/yesdoll.com/sarangbi_bgm/sarangbi_bgm.php" scrolling="no" marginwidth=0>
<noframes>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border=0 style='table-layout:fixed;'>
<col width=60%></col><col width=40%></col>
<tr><td style='border-width:0 1 0 0;border-color:E0E0E0;border-style:solid;'>
<? print_bbs("notice102", "NOTICE", "25", 3, 35)?>
</td><td valign=top style='padding:10 8 0 8;'>
<table align="center" cellpadding="0" cellspacing="0" width="100%" border=0 style='table-layout:fixed;'>
<tr><td valign=top style='padding:10 8 0 8;'>
<? print_bbs("ggambo_latest104", "Gallery", "11", 5, 25, m·d)?>
</td></tr>
</tr><td valign=top style='padding:10 8 0 8;'>
<? print_bbs("ggambo_latest104", "FREEBOARD", "21", 5, 25, m·d)?><br>
</td></tr></table></td></tr></table>
<? include "/home/yesdoll/foot.php"; ?>
</noframes>
</frameset>
경로도 이상하고.. 전체적으로 문제가 많이 있는 것 같아요...