닫기
<?
// 아이템 정보 뽑아오기~~
$item_search_q = mysql_query("select * from ragnarok_item_db where id='$id'");
$item_search2_q = mysql_query("select * from ragnarok_item_info_db where id='$id'");
$item = mysql_fetch_array($item_search_q);
$item2 = mysql_fetch_array($item_search2_q);
include "./equip_location.php";
include "./job.php";
include "./type.php";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<!-- 좌측 부분 -->
<td valign="top" width="100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="<?=$config[cf_home_margin]?>"><td></td></tr>
<td width=10%></td><td width=80%>
<form name="item" method="post" action="view.php">
<SELECT name=item_sort style="WIDTH: 130px">
<option value="item_name">아이템 이름</option>
</SELECT>
<INPUT name="item_search" style="WIDTH: 200px">
<INPUT type=submit value=찾기>
</form></td>
<td width=10%></td>
<tr>
<!-- 아이템 정보 결과 부분-->
<td></td><td>
<table width=100% border=0>
<tr>
<td width="28%" height=220 rowspan=4><p align="center"><img src=http://fornow.naezip.net/ro/images/items/large/<?=$item[id]?>.gif></p></td>
<td width="18%"><b>타입</b></td>
<td width="18%"><?=$itemtype?></td>
<td width="18%"><b><?=$item_type?></b></td>
<td width="18%"><?=$item_type2?></td>
</tr>
<tr>
<td><b>구입가격</b></td><td>
<?
if($item[price_buy] != 0) {
$price_buy = $item[price_buy];
$price_sell = $item[price_buy]/2;
}
else {
$price_buy = "<font color=red>구입불가</font>";
$price_sell = $item[price_sell];
}
echo "$price_buy";
?></td><td><b>판매가격</b></td><td><?=$price_sell?></td>
</tr>
<tr>
<td><b><?=$item_type4?></b></td><td><?=$itemequip_location?></td><td><b><?=$item_type3?></b></td><td><?=$item[slots]?></td>
</tr>
<tr>
<td colspan=4><?=$item2[info]?></td>
</tr>
<tr>
<td><b><center><?=$item[name_english]?>
<?
if($item[slots] != 0) {
echo "[$item[slots]]";
}
?></center></b></td>
<td colspan=4>
<b>판매 NPC</b>
</td>
</tr>
<tr>
<td></td>
<td colspan=4>
판매 리스트
</td>
</tr>
<tr>
<td></td>
<td colspan=4>
<b>획득 몬스터</b>
</td>
</tr>
<tr>
<td></td>
<td colspan=4>
<?
$drop_mon_q = "select * from ragnarok_mob_db where Drop1id like '$id' or Drop2id like '$id' or Drop3id like '$id' or Drop4id like '$id' or Drop5id like '$id' or Drop6id like '$id' or Drop7id like '$id' or Drop8id like '$id' or Drop9id like '$id' or DropCardid like '$id'";
$drop_mon_r = mysql_query($drop_mon_q);
$slash = '';
while($item_mon=mysql_fetch_array($drop_mon_r)) {
if($drop_mon_r != 0) {
$item_name1 = "<a href=../monster/view_info.php?id=$item_mon[ID]>$item_mon[kName]</a>";
$item_name = $slash.$item_name1;
$slash = ', ';
echo "$item_name";
}
}
?>
</td>
</tr>
</table>
<br><br>
</td><td></td>
<!-- 아이템 정보 결과 끝-->
</tr>
</table>
</td>
</tr>
</table>
닫기
보시면 아시겠지만 정말 기초적인 구문만 사용했습니다.
순전히 단순한 생각입니다.
- if구문으로 해결됩니다.
여기선 if구문 말고 쓴게 없군요.
프로그래밍이 어려워 보일진 몰라도, 기초 단계입니다.