게시판의 링크를 클릭시 프레임 나누기 정보
게시판의 링크를 클릭시 프레임 나누기관련링크
본문
게시판에 링크를 클릭하게 되면 새창이 떠지죠.?
==>> 거기에 자신이 원하는 상단 메뉴를 계속 유지하기 위해서 프래임을 나누는방식.
즉,
http://fashionlist.co.kr/bbs/link.php?bo_table=mod_701&wr_id=97&no=1
링크 주소를 클릭해두...해당 사이트 주소로 변경이 안되는걸 말해요.
==>> 거기에 자신이 원하는 상단 메뉴를 계속 유지하기 위해서 프래임을 나누는방식.
즉,
http://fashionlist.co.kr/bbs/link.php?bo_table=mod_701&wr_id=97&no=1
링크 주소를 클릭해두...해당 사이트 주소로 변경이 안되는걸 말해요.
추천
0
0
댓글 2개
1. 첫번째 수정할 파일 [ link.php ]
-----------------------------------------
<?
$bo_table = $_GET['bo_table'];
$wr_id = $_GET['wr_id'];
$no = $_GET['no'];
?>
<html>
<head>
<title>순위사이트</title>
</head>
<frameset rows="43,*" framespacing="0" border="0" frameborder="0">
<frame src="a.php" name="menu" frameborder="no" border="0" framespacing="0"
scrolling="no" marginwidth="10" marginheight="0">
<frame src="b.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>&no=<?=$no?>" name="main" scrolling="auto" marginwidth="10" marginheight="10">
</frameset>
</html>
-----------------------------------------
<?
$bo_table = $_GET['bo_table'];
$wr_id = $_GET['wr_id'];
$no = $_GET['no'];
?>
<html>
<head>
<title>순위사이트</title>
</head>
<frameset rows="43,*" framespacing="0" border="0" frameborder="0">
<frame src="a.php" name="menu" frameborder="no" border="0" framespacing="0"
scrolling="no" marginwidth="10" marginheight="0">
<frame src="b.php?bo_table=<?=$bo_table?>&wr_id=<?=$wr_id?>&no=<?=$no?>" name="main" scrolling="auto" marginwidth="10" marginheight="10">
</frameset>
</html>
2. b.php 파일을 만들어 놓으세요.
-----------------------------------
<?
include_once("./_common.php");
$html_title = "$group[gr_subject] > $board[bo_subject] > " . conv_subject($write[wr_subject], 255) . " > 링크";
if (!($bo_table && $wr_id && $no))
alert_close("값이 제대로 넘어오지 않았습니다.");
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g4[write_prefix]}{$bo_table} ", FALSE);
if (!$row[cnt])
alert_close("존재하는 게시판이 아닙니다.");
$ss_name = "ss_link_{$bo_table}_{$wr_id}_{$no}";
if (empty($_SESSION[$ss_name]))
{
$sql = " update {$g4[write_prefix]}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '$wr_id' ";
sql_query($sql);
set_session($ss_name, true);
}
goto_url(set_http($write["wr_link{$no}"]));
?>
-----------------------------------
<?
include_once("./_common.php");
$html_title = "$group[gr_subject] > $board[bo_subject] > " . conv_subject($write[wr_subject], 255) . " > 링크";
if (!($bo_table && $wr_id && $no))
alert_close("값이 제대로 넘어오지 않았습니다.");
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g4[write_prefix]}{$bo_table} ", FALSE);
if (!$row[cnt])
alert_close("존재하는 게시판이 아닙니다.");
$ss_name = "ss_link_{$bo_table}_{$wr_id}_{$no}";
if (empty($_SESSION[$ss_name]))
{
$sql = " update {$g4[write_prefix]}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '$wr_id' ";
sql_query($sql);
set_session($ss_name, true);
}
goto_url(set_http($write["wr_link{$no}"]));
?>