ZOR Serverlar İçin gerekli OLan Bi dosya
- Kod:
<?php
$msconnect=odbc_connect("$dbname","$dbuser","$dbpass");
$sitem = odbc_exec($msconnect, "SELECT sItem FROM K_MONSTER WHERE strName='".htmlentities($_POST['search_query'])."'");
$rsitem = odbc_result($sitem, 1);
$sindex = odbc_exec($msconnect, "SELECT iItem03,iItem04,iItem05,Spersent03,SPersent04,SPersent05 FROM K_MONSTER_ITEM WHERE sIndex='".$rsitem."'");
$item03 = odbc_result($sindex, 1);
$item04 = odbc_result($sindex, 2);
$item05 = odbc_result($sindex, 3);
$rates1 = odbc_result($sindex, 4);
$rates2 = odbc_result($sindex, 5);
$rates3 = odbc_result($sindex, 6);
$items = odbc_exec($msconnect, "SELECT strName FROM ITEM WHERE Num='".$item03."'");
$items03 = odbc_exec($msconnect, "SELECT strName FROM ITEM WHERE Num='".$item04."'");
$items04 = odbc_exec($msconnect, "SELECT strName FROM ITEM WHERE Num='".$item05."'");
$items1 = odbc_result($items, 1);
$items2 = odbc_result($items03, 1);
$items3 = odbc_result($items04, 1);
if(htmlentities($_POST['search_query']) == NULL || htmlentities($_POST['search_query']) == '')
{
die('You should atleast enter an monster name to continue!');
}
elseif($rsitem == NULL || $rsitem == '')
{
die('Could not find Monster: <b>'.htmlentities(protect($_POST["search_query"])).'</b>');
}
echo'Query completed.<br>';
echo'Monster: '.htmlentities(protect($_POST['search_query'])).'<br>';
echo'Item Drops:<br>';
echo'Item: '.$items1.' | Droprate: '.$rates1.'<br>';
echo'Item: '.$items2.' | Droprate: '.$rates2.'<br>';
echo'Item: '.$items3.' | Droprate: '.$rates3.'<br>';
echo'<br>';
echo'5000 = 50% | 10000 = 100% | Etc.';
?>