묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
get방식의 검색에서...마지막 x와 y 때문?[추가질문 포함]
2005.07.27 23:12
앞부분 생략 &Date_Year=2005&Date_Month=7&Date_Day=27&Period=1&City=%C1%F6%BF%AA%BA%B0%C0%FC%C3%BC&Man_Count=2&x=31&y=15
날짜와 기타 검색후 마지막에 x 와 y에 대한 검색은 뭔지 모르겠어요..
이건 검색항목에도 나오지 않는 필드인데...이게 왜 뜨는 것이지요?
아래소스 좀 봐주세요...페이지숫자가 안나오거든요...
그냥[1]만 나오고 뒤에 숫자들이 안나오는데...봐주세요
상단부분.....인크루트 한 파일입니다...
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>MnPGuide ::: 가이드</title>
<meta name="generator" content="Namo WebEditor v5.0">
<SCRIPT language="JavaScript">
Now = new Date();
NowDay = Now.getDate();
NowMonth = Now.getMonth();
NowYear = Now.getYear();
if (NowYear < 2000) NowYear += 1900; //for Netscape
function DaysInMonth(WhichMonth, WhichYear)
{
var DaysInMonth = 31;
if (WhichMonth == "4월" || WhichMonth == "6월" || WhichMonth == "9월" || WhichMonth == "11월") DaysInMonth = 30;
if (WhichMonth == "2월" && (WhichYear/4) != Math.floor(WhichYear/4)) DaysInMonth = 28;
if (WhichMonth == "2월" && (WhichYear/4) == Math.floor(WhichYear/4)) DaysInMonth = 29;
return DaysInMonth;
}
function ChangeOptionDays(Which)
{
DaysObject = eval("document.Form1." + Which + "Day");
MonthObject = eval("document.Form1." + Which + "Month");
YearObject = eval("document.Form1." + Which + "Year");
Month = MonthObject[MonthObject.selectedIndex].text;
Year = YearObject[YearObject.selectedIndex].text;
DaysForThisSelection = DaysInMonth(Month, Year);
CurrentDaysInSelection = DaysObject.length;
if (CurrentDaysInSelection > DaysForThisSelection)
{
for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
{
DaysObject.options[DaysObject.options.length - 1] = null
}
}
if (DaysForThisSelection > CurrentDaysInSelection)
{
for (i=0; i<(DaysForThisSelection-CurrentDaysInSelection); i++)
{
NewOption = new Option(DaysObject.options.length + 1);
DaysObject.add(NewOption);
}
}
if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex == 0;
}
function SetToToday(Which)
{
DaysObject = eval("document.Form1." + Which + "Day");
MonthObject = eval("document.Form1." + Which + "Month");
YearObject = eval("document.Form1." + Which + "Year");
YearObject[0].selected = true;
MonthObject[NowMonth].selected = true;
ChangeOptionDays(Which);
DaysObject[NowDay-1].selected = true;
}
function WriteYearOptions(YearsAhead)
{
line = "";
for (i=0; i<YearsAhead; i++)
{
line += "<OPTION>";
line += NowYear + i;
}
return line;
}
</SCRIPT>
</head>
<body onload="SetToToday('Date_');">
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td background="../images/m_search_topbg.gif">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<FORM method=get name="Form1" action="?" enctype=multipart/form-data onsubmit="return check_submit();">
<input type="hidden" name="Guide_idx" value="Minbak">
<input type="hidden" name="MB" value="Reser_Search">
<tr>
<td style="padding-left:230px;">
<SELECT name="Date_Year" onchange="ChangeOptionDays('Date_')">
<SCRIPT language="JavaScript">document.write(WriteYearOptions(5));</SCRIPT>
</SELECT>년
<SELECT name="Date_Month" onchange="ChangeOptionDays('Date_')">
<OPTION>1
<OPTION>2
<OPTION>3
<OPTION>4
<OPTION>5
<OPTION>6
<OPTION>7
<OPTION>8
<OPTION>9
<OPTION>10
<OPTION>11
<OPTION>12
</SELECT>월
<SELECT name="Date_Day">
<OPTION>1
<OPTION>2
<OPTION>3
<OPTION>4
<OPTION>5
<OPTION>6
<OPTION>7
<OPTION>8
<OPTION>9
<OPTION>10
<OPTION>11
<OPTION>12
<OPTION>13
<OPTION>14
<OPTION>15
<OPTION>16
<OPTION>17
<OPTION>18
<OPTION>19
<OPTION>20
<OPTION>21
<OPTION>22
<OPTION>23
<OPTION>24
<OPTION>25
<OPTION>26
<OPTION>27
<OPTION>28
<OPTION>29
<OPTION>30
<OPTION>31
</SELECT>일
~
<select name="Period" size="1">
<option value="1">1박2일</option>
<option value="2">2박3일</option>
<option value="3">3박4일</option>
<option value="4">4박5일</option>
<option value="5">5박6일</option>
<option value="6">6박7일</option>
<option value="7">7박8일</option>
</select> <select name="City" size="1">
<option value="지역별전체">지역별전체</option>
<option value="강원도">강원도</option>
<option value="경기도">경기도</option>
<option value="충청남도">충청남도</option>
<option value="충청북도">충청북도</option>
<option value="경상남도">경상남도</option>
<option value="경상북도">경상북도</option>
<option value="전라남도">전라남도</option>
<option value="전라북도">전라북도</option>
<option value="제주도">제주도</option>
</select>
<input type="text" name="Man_Count" value="2" maxlength="5" size="3">명
<input type="hidden" name="page" value="<?=$move_page?>">
<input type="image" src="../images/m_search_go.gif" align="absmiddle" width="50" height="24" border="0"></p>
</td>
</tr>
<tr>
<td>
<p> </p>
</td>
</tr>
</FORM>
</table>
<table border="0" cellpadding="5" cellspacing="1" width="100%">
<tr>
<td width="110">
<p> </p>
</td>
<td width="652">
<p> </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
검색시 보여질 부분
<?
$num_rows = '5'; //가로출력할 갯수
$width_per = (int)(148/$num_rows);
if(!$page_num)$page_num=2;
if(!$page) $page=1;
$start_num=($page-1)*$page_num;
$total_page=(int)(($total-1)/$page_num)+1;
$number=$total-($page-1)*$page_num;
$result = mysql_query("SELECT * FROM zetyx_member_table where name like '%$list_id%' order by no desc limit $start_num, $page_num");
$i=$start_num+1;
$number = '1';
while($data = mysql_fetch_array($result)) {
if($data[picture]) { $picture_file = "<a href=?Guide_idx=Profile&user_id=".$data[user_id]."&num=".$data[no]." onFocus=this.blur()><img src=".$_zb_url."".$data[picture]." border=0 width=148 height=100></a>"; }
else { $picture_file = "<img src=../images/nopic.gif width=102 height=74 border=0>"; }
$co++;
$mod_co = $co%$num_rows;
if($mod_co == "1") echo "<tr>";
echo "<td width=$width_per% bgcolor=#FFFFFF align=center valign=top>";
?>
<table border="0" cellpadding="0" cellspacing="1" width="148" bgcolor="#CCCCCC">
<tr>
<td bgcolor="white" height="100" align="center"><?=$picture_file?></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="5"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#CCCCCC">
<tr onClick=location.href="/?Guide_idx=Profile&user_id=<?=$data[user_id]?>&no=<?=$data[no]?>" onMouseOut="style.backgroundColor=''; style.border='0 solid black';" onMouseOver="style.backgroundColor=''; style.cursor='hand'; style.border='0 solid'">
<td bgcolor="white" align="center" style="padding-top:6px; padding-bottom:3px;">
<b><?=cut_str($data[name],15)?></b>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td height="3"></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center"><table border="0" width="100%"><tr><td align="center"><img src="../images/e.gif" align="absbottom" width="11" height="12" border="0"></td><td width="40" style="font-size:8pt;">방문</td></tr></table></td>
<td><table border="0" width="100%"><tr><td align="center"><img src="../images/doc.gif" align="absbottom" width="14" height="11" border="0"></td><td width="40 style="font-size:8pt;">보기</td></tr></table></td>
<td><table border="0" width="100%"><tr><td align="center"><img src="../images/num.gif" align="absbottom" width="16" height="13" border="0"></td><td width="23" style="font-size:8pt;">찜</td></tr></table></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="1" background="../images/width_dot.gif"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
</td>
</tr>
</table>
<?
echo "</td>";
if($mod_co == "0") {
echo "</tr>";
}
$number--;
$i++;
}
while($mod_co > 0) {
$co++;
$mod_co = $co%$num_rows;
if($mod_co == "1") echo "<tr>";
echo "<td width=$width_per% bgcolor=#FFFFFF align=center></td>";
if($mod_co == "0") echo "</tr>";
}
?>
그리고 마지막 페이지 부분입니다.
<?
$show_page_num=10;
$start_page=(int)(($page-1)/$show_page_num)*$show_page_num;
$i=1;
if($page>$show_page_num){$prev_page=$start_page;echo"<a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$prev_page'><b>[이전 10개]</b></a>";}
while($i+$start_page<=$total_page&&$i<=$show_page_num)
{
$move_page=$i+$start_page;
if($page==$move_page) echo" [<b><font color=red>$move_page</font></b>]";
else echo" <a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$move_page'>[$move_page]</a>";
$i++;
}
if($total_page>$move_page){$next_page=$move_page+1;echo"<a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$next_page'><b>[다음 10개]</b></a>";}
?>
날짜와 기타 검색후 마지막에 x 와 y에 대한 검색은 뭔지 모르겠어요..
이건 검색항목에도 나오지 않는 필드인데...이게 왜 뜨는 것이지요?
아래소스 좀 봐주세요...페이지숫자가 안나오거든요...
그냥[1]만 나오고 뒤에 숫자들이 안나오는데...봐주세요
상단부분.....인크루트 한 파일입니다...
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>MnPGuide ::: 가이드</title>
<meta name="generator" content="Namo WebEditor v5.0">
<SCRIPT language="JavaScript">
Now = new Date();
NowDay = Now.getDate();
NowMonth = Now.getMonth();
NowYear = Now.getYear();
if (NowYear < 2000) NowYear += 1900; //for Netscape
function DaysInMonth(WhichMonth, WhichYear)
{
var DaysInMonth = 31;
if (WhichMonth == "4월" || WhichMonth == "6월" || WhichMonth == "9월" || WhichMonth == "11월") DaysInMonth = 30;
if (WhichMonth == "2월" && (WhichYear/4) != Math.floor(WhichYear/4)) DaysInMonth = 28;
if (WhichMonth == "2월" && (WhichYear/4) == Math.floor(WhichYear/4)) DaysInMonth = 29;
return DaysInMonth;
}
function ChangeOptionDays(Which)
{
DaysObject = eval("document.Form1." + Which + "Day");
MonthObject = eval("document.Form1." + Which + "Month");
YearObject = eval("document.Form1." + Which + "Year");
Month = MonthObject[MonthObject.selectedIndex].text;
Year = YearObject[YearObject.selectedIndex].text;
DaysForThisSelection = DaysInMonth(Month, Year);
CurrentDaysInSelection = DaysObject.length;
if (CurrentDaysInSelection > DaysForThisSelection)
{
for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
{
DaysObject.options[DaysObject.options.length - 1] = null
}
}
if (DaysForThisSelection > CurrentDaysInSelection)
{
for (i=0; i<(DaysForThisSelection-CurrentDaysInSelection); i++)
{
NewOption = new Option(DaysObject.options.length + 1);
DaysObject.add(NewOption);
}
}
if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex == 0;
}
function SetToToday(Which)
{
DaysObject = eval("document.Form1." + Which + "Day");
MonthObject = eval("document.Form1." + Which + "Month");
YearObject = eval("document.Form1." + Which + "Year");
YearObject[0].selected = true;
MonthObject[NowMonth].selected = true;
ChangeOptionDays(Which);
DaysObject[NowDay-1].selected = true;
}
function WriteYearOptions(YearsAhead)
{
line = "";
for (i=0; i<YearsAhead; i++)
{
line += "<OPTION>";
line += NowYear + i;
}
return line;
}
</SCRIPT>
</head>
<body onload="SetToToday('Date_');">
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td background="../images/m_search_topbg.gif">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<FORM method=get name="Form1" action="?" enctype=multipart/form-data onsubmit="return check_submit();">
<input type="hidden" name="Guide_idx" value="Minbak">
<input type="hidden" name="MB" value="Reser_Search">
<tr>
<td style="padding-left:230px;">
<SELECT name="Date_Year" onchange="ChangeOptionDays('Date_')">
<SCRIPT language="JavaScript">document.write(WriteYearOptions(5));</SCRIPT>
</SELECT>년
<SELECT name="Date_Month" onchange="ChangeOptionDays('Date_')">
<OPTION>1
<OPTION>2
<OPTION>3
<OPTION>4
<OPTION>5
<OPTION>6
<OPTION>7
<OPTION>8
<OPTION>9
<OPTION>10
<OPTION>11
<OPTION>12
</SELECT>월
<SELECT name="Date_Day">
<OPTION>1
<OPTION>2
<OPTION>3
<OPTION>4
<OPTION>5
<OPTION>6
<OPTION>7
<OPTION>8
<OPTION>9
<OPTION>10
<OPTION>11
<OPTION>12
<OPTION>13
<OPTION>14
<OPTION>15
<OPTION>16
<OPTION>17
<OPTION>18
<OPTION>19
<OPTION>20
<OPTION>21
<OPTION>22
<OPTION>23
<OPTION>24
<OPTION>25
<OPTION>26
<OPTION>27
<OPTION>28
<OPTION>29
<OPTION>30
<OPTION>31
</SELECT>일
~
<select name="Period" size="1">
<option value="1">1박2일</option>
<option value="2">2박3일</option>
<option value="3">3박4일</option>
<option value="4">4박5일</option>
<option value="5">5박6일</option>
<option value="6">6박7일</option>
<option value="7">7박8일</option>
</select> <select name="City" size="1">
<option value="지역별전체">지역별전체</option>
<option value="강원도">강원도</option>
<option value="경기도">경기도</option>
<option value="충청남도">충청남도</option>
<option value="충청북도">충청북도</option>
<option value="경상남도">경상남도</option>
<option value="경상북도">경상북도</option>
<option value="전라남도">전라남도</option>
<option value="전라북도">전라북도</option>
<option value="제주도">제주도</option>
</select>
<input type="text" name="Man_Count" value="2" maxlength="5" size="3">명
<input type="hidden" name="page" value="<?=$move_page?>">
<input type="image" src="../images/m_search_go.gif" align="absmiddle" width="50" height="24" border="0"></p>
</td>
</tr>
<tr>
<td>
<p> </p>
</td>
</tr>
</FORM>
</table>
<table border="0" cellpadding="5" cellspacing="1" width="100%">
<tr>
<td width="110">
<p> </p>
</td>
<td width="652">
<p> </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
검색시 보여질 부분
<?
$num_rows = '5'; //가로출력할 갯수
$width_per = (int)(148/$num_rows);
if(!$page_num)$page_num=2;
if(!$page) $page=1;
$start_num=($page-1)*$page_num;
$total_page=(int)(($total-1)/$page_num)+1;
$number=$total-($page-1)*$page_num;
$result = mysql_query("SELECT * FROM zetyx_member_table where name like '%$list_id%' order by no desc limit $start_num, $page_num");
$i=$start_num+1;
$number = '1';
while($data = mysql_fetch_array($result)) {
if($data[picture]) { $picture_file = "<a href=?Guide_idx=Profile&user_id=".$data[user_id]."&num=".$data[no]." onFocus=this.blur()><img src=".$_zb_url."".$data[picture]." border=0 width=148 height=100></a>"; }
else { $picture_file = "<img src=../images/nopic.gif width=102 height=74 border=0>"; }
$co++;
$mod_co = $co%$num_rows;
if($mod_co == "1") echo "<tr>";
echo "<td width=$width_per% bgcolor=#FFFFFF align=center valign=top>";
?>
<table border="0" cellpadding="0" cellspacing="1" width="148" bgcolor="#CCCCCC">
<tr>
<td bgcolor="white" height="100" align="center"><?=$picture_file?></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="5"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#CCCCCC">
<tr onClick=location.href="/?Guide_idx=Profile&user_id=<?=$data[user_id]?>&no=<?=$data[no]?>" onMouseOut="style.backgroundColor=''; style.border='0 solid black';" onMouseOver="style.backgroundColor=''; style.cursor='hand'; style.border='0 solid'">
<td bgcolor="white" align="center" style="padding-top:6px; padding-bottom:3px;">
<b><?=cut_str($data[name],15)?></b>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tr>
<td height="3"></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center"><table border="0" width="100%"><tr><td align="center"><img src="../images/e.gif" align="absbottom" width="11" height="12" border="0"></td><td width="40" style="font-size:8pt;">방문</td></tr></table></td>
<td><table border="0" width="100%"><tr><td align="center"><img src="../images/doc.gif" align="absbottom" width="14" height="11" border="0"></td><td width="40 style="font-size:8pt;">보기</td></tr></table></td>
<td><table border="0" width="100%"><tr><td align="center"><img src="../images/num.gif" align="absbottom" width="16" height="13" border="0"></td><td width="23" style="font-size:8pt;">찜</td></tr></table></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="1" background="../images/width_dot.gif"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
</td>
</tr>
</table>
<?
echo "</td>";
if($mod_co == "0") {
echo "</tr>";
}
$number--;
$i++;
}
while($mod_co > 0) {
$co++;
$mod_co = $co%$num_rows;
if($mod_co == "1") echo "<tr>";
echo "<td width=$width_per% bgcolor=#FFFFFF align=center></td>";
if($mod_co == "0") echo "</tr>";
}
?>
그리고 마지막 페이지 부분입니다.
<?
$show_page_num=10;
$start_page=(int)(($page-1)/$show_page_num)*$show_page_num;
$i=1;
if($page>$show_page_num){$prev_page=$start_page;echo"<a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$prev_page'><b>[이전 10개]</b></a>";}
while($i+$start_page<=$total_page&&$i<=$show_page_num)
{
$move_page=$i+$start_page;
if($page==$move_page) echo" [<b><font color=red>$move_page</font></b>]";
else echo" <a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$move_page'>[$move_page]</a>";
$i++;
}
if($total_page>$move_page){$next_page=$move_page+1;echo"<a href='/?Guide_idx=$Guide_idx&MB=$MB&Date_Year=$Date_Year&Date_Month=$Date_Month&Date_Day=$Date_Day&Period=$Period&City=$City&Man_Count=$Man_Count&page=$next_page'><b>[다음 10개]</b></a>";}
?>
댓글 3
-
곽군
2005.07.28 04:56
x,y 값은 submit 버튼을 이미지로 image타입으로 넣었을 경우 이미지버튼의 클릭 좌표입니다. 신경쓰지 않으셔도 되요~ -
냐하하~∏^∏
2005.07.28 11:09
폼에서 자동으로 이벤트 발생 좌표가 넘어오는것뿐이죠뭐 -
만인의연인
2005.08.03 20:24
좌표를 없앨 방법은 없나요?