Guest User

Untitled

a guest
Mar 9th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.79 KB | None | 0 0
  1. <?php ob_start();
  2. session_start();
  3. $dbname = "kn_online";
  4. $dbuser = "";
  5. $dbpass = "";
  6. $username= $_SESSION['SeveNUser'];
  7. $conn = odbc_connect("$dbname","$dbuser","$dbpass");
  8. $kilitbelirle1=$_POST['kilitbelirle1'];
  9. $kilitbelirle2=$_POST['kilitbelirle2'];
  10. $islem=$_GET['islem'];
  11. $sira=$_POST['sira'];
  12. $kilit=$_POST['kilit'];
  13. $char = odbc_result(odbc_exec($conn,"SELECT strcharid1 FROM account_char WHERE strAccountID ='$username'"), 1);
  14. $onlinemi = odbc_result(odbc_exec($conn,"select count(*) from CURRENTUSER where strCharID = '$char'"), 1);
  15. if ($onlinemi>0) die ('Bu islemi yapabilmek icin oncelikle oyundan cıkmaniz gerekmektedir.');
  16. function itemözellik ($item)
  17. {$dbname = "kn_online";
  18. $dbuser = "";
  19. $dbpass = "";
  20. $conn = odbc_connect("$dbname","$dbuser","$dbpass");
  21. $itemal=odbc_exec($conn,"select ItemType,Kind,strName,Damage,Delay,Range,Hitrate,E vasionrate,Weight,Duration,Ac,DaggerAc,SwordAc,Mac eAc,AxeAc,SpearAc,BowAc,FireDamage,IceDamage,Light ningDamage,PoisonDamage,HPDrain,MPDamage,MPDrain,M irrorDamage,StrB,StaB,MaxHpB,DexB,IntelB,MaxMpB,Ch aB,FireR,ColdR,LightningR,MagicR,PoisonR,CurseR,Re qStr,ReqSta,ReqDex,ReqIntel,ReqCha from item where num=$item");
  22. $ItemType=odbc_result($itemal,1);
  23. $Kind=odbc_result($itemal,2);
  24. $strName=odbc_result($itemal,3);
  25. $Damage=odbc_result($itemal,4);
  26. $Delay=odbc_result($itemal,5);
  27. $Range=odbc_result($itemal,6);
  28. $Hitrate=odbc_result($itemal,7);
  29. $Evasionrate=odbc_result($itemal,8);
  30. $Weight=odbc_result($itemal,9);
  31. $Duration=odbc_result($itemal,10);
  32. $Ac=odbc_result($itemal,11);
  33. $DaggerAc=odbc_result($itemal,12);
  34. $SwordAc=odbc_result($itemal,13);
  35. $MaceAc=odbc_result($itemal,14);
  36. $AxeAc=odbc_result($itemal,15);
  37. $SpearAc=odbc_result($itemal,16);
  38. $BowAc=odbc_result($itemal,17);
  39. $FireDamage=odbc_result($itemal,18);
  40. $IceDamage=odbc_result($itemal,19);
  41. $LightningDamage=odbc_result($itemal,20);
  42. $PoisonDamage=odbc_result($itemal,21);
  43. $HPDrain=odbc_result($itemal,22);
  44. $MPDamage=odbc_result($itemal,23);
  45. $MPDrain=odbc_result($itemal,24);
  46. $MirrorDamage=odbc_result($itemal,25);
  47. $StrB=odbc_result($itemal,26);
  48. $StaB=odbc_result($itemal,27);
  49. $MaxHpB=odbc_result($itemal,28);
  50. $DexB=odbc_result($itemal,29);
  51. $IntelB=odbc_result($itemal,30);
  52. $MaxMpB=odbc_result($itemal,31);
  53. $ChaB=odbc_result($itemal,32);
  54. $FireR=odbc_result($itemal,33);
  55. $ColdR=odbc_result($itemal,34);
  56. $LightningR=odbc_result($itemal,35);
  57. $MagicR=odbc_result($itemal,36);
  58. $PoisonR=odbc_result($itemal,37);
  59. $CurseR=odbc_result($itemal,38);
  60. $ReqStr=odbc_result($itemal,39);
  61. $ReqSta=odbc_result($itemal,40);
  62. $ReqDex=odbc_result($itemal,41);
  63. $ReqIntel=odbc_result($itemal,42);
  64. $ReqCha=odbc_result($itemal,43);
  65. $tip = $ItemType;
  66. switch($tip)
  67. {case 0:{$type = "Non Upgrade Item";$renk = "white";} break;
  68. case 1:{$type = "Magic Item";$renk = "blue";}break;
  69. case 2:{$type = "Rare Item";$renk = "yellow";}break;
  70. case 3:{$type = "Craft Item";$renk = "lime";}break;
  71. case 4:{$type = "Unique Item";$renk = "#DFC68C";}break;
  72. case 5:{$type = "Upgrade Item";$renk = "purple";}break;
  73. case 6:{$type = "Event Item";$renk = "#18ffff";}}
  74. $cins = $Kind;
  75. switch($cins)
  76. {case 11:{$kind = "Dagger";} break;
  77. case 21:{$kind = "One-handed Sword";}break;
  78. case 22:{$kind = "Two-handed Sword";}break;
  79. case 31:{$kind = "Axe";}break;
  80. case 32 :{$kind = "Two-handed Axe";}break;
  81. case 41 :{$kind = "Club";}break;
  82. case 42 :{$kind = "Two-handed Club";}break;
  83. case 51 :{$kind = "Spear";}break;
  84. case 52 :{$kind = "Long Spear";}break;
  85. case 60 :{$kind = "Shield";}break;
  86. case 70 :{$kind = "Bow";}break;
  87. case 71 :{$kind = "Crossbow";}break;
  88. case 91 :{$kind = "Earring";}break;
  89. case 92 :{$kind = "Necklace";}break;
  90. case 93 :{$kind = "Ring";}break;
  91. case 94 :{$kind = "Belt";}break;
  92. case 95 :{$kind = "Lune Item";}break;
  93. case 110:{$kind = "Staff";}break;
  94. case 210:{$kind = "Warrior Armor";}break;
  95. case 220:{$kind = "Rogue Armor";}break;
  96. case 230:{$kind = "Magician Armor";}break;
  97. case 240:{$kind = "Priest Armor";}}
  98. $aciklama = '';
  99. $strName = str_replace("(+0)","",$strName);
  100. $parse['name'] = trim($strName);
  101. $parse['type'] = $type;
  102. $parse['renk'] = $renk;
  103. $parse['kind'] = $kind;
  104. $parse['ozellik1'] = "";
  105. $parse['ozellik2'] = "";
  106. $parse['ozellik3'] = "";
  107. if ($Damage!=0) $parse['ozellik1'] .="Attack Power : " . $Damage . "<br>";
  108. $speed = $Delay;
  109. switch($speed)
  110. {case ($speed >0 and $speed <90):{$delay = "Very Fast";} break;
  111. case ($speed >89 and $speed <111):{$delay = "Fast";}break;
  112. case ($speed >110 and $speed <131):{$delay = "Normal";}break;
  113. case ($speed >130 and $speed <151):{$delay = "Slow";}break;
  114. case ($speed >150 and $speed <201):{$delay = "Very Slow";}}
  115. if ($speed!=0) $parse['ozellik1'] .="Attack Speed : " . $delay . "<br>";
  116. if ($Range>9) $range=($Range/10) ; else $range=($Range/10) . "0";
  117. if ($Range!=0) $parse['ozellik1'] .="Effective Range : " . $range . "<br>";
  118. if ($Hitrate!=0) $parse['ozellik1'] .="Increase Attack Power by : " . $Hitrate . "%<br>";
  119. if ($Evasionrate!=0) $parse['ozellik1'] .="Increase Dodging Power by : " . $Evasionrate . "%<br>";
  120. if ($Weight>9) $weight=($Weight/10) . ".00"; else $weight=($Weight/10) . "0";
  121. if ($Weight!=0) $parse['ozellik1'] .="Weight : " . $weight . "<br>";
  122. if ($Duration>1) $parse['ozellik1'] .="Max Durability : " . $Duration . "<br>";
  123. if ($Ac!=0) $parse['ozellik1'] .="Defense Ability : " . $Ac . "<br>";
  124. if ($DaggerAc!=0) $parse['ozellik2'] .="Defense Ability (Dagger) : " . $DaggerAc . "<br>";
  125. if ($SwordAc!=0) $parse['ozellik2'] .="Defense Ability (Sword) : " . $SwordAc . "<br>";
  126. if ($MaceAc!=0) $parse['ozellik2'] .="Defense Ability (Club) : " . $MaceAc . "<br>";
  127. if ($AxeAc!=0) $parse['ozellik2'] .="Defense Ability (Axe) : " . $AxeAc . "<br>";
  128. if ($SpearAc!=0) $parse['ozellik2'] .="Defense Ability (Spear) : " . $SpearAc . "<br>";
  129. if ($BowAc!=0) $parse['ozellik2'] .="Defense Ability (Arrow) : " . $BowAc . "<br>";
  130. if ($FireDamage!=0) $parse['ozellik2'] .="Flame Damage : " . $FireDamage . "<br>";
  131. if ($IceDamage!=0) $parse['ozellik2'] .="Ice Damage : " . $IceDamage . "<br>";
  132. if ($LightningDamage!=0) $parse['ozellik2'] .="Lightning Damage : " . $LightningDamage . "<br>";
  133. if ($PoisonDamage!=0) $parse['ozellik2'] .="Poison Damage : " . $PoisonDamage . "<br>";
  134. if ($HPDrain!=0) $parse['ozellik2'] .="HP Recovery : " . $HPDrain . "<br>";
  135. if ($MPDamage!=0) $parse['ozellik2'] .="MP Damage : " . $MPDamage . "<br>";
  136. if ($MPDrain!=0) $parse['ozellik2'] .="MP Recovery : " . $MPDrain . "<br>";
  137. if ($MirrorDamage!=0) $parse['ozellik2'] .="Repel Physical Damage : " . $MirrorDamage . "<br>";
  138. if ($StrB!=0) $parse['ozellik2'] .="Strength Bonus : " . $StrB . "<br>";
  139. if ($StaB!=0) $parse['ozellik2'] .="Health Bonus : " . $StaB . "<br>";
  140. if ($MaxHpB!=0) $parse['ozellik2'] .="HP Bonus : " . $MaxHpB . "<br>";
  141. if ($DexB!=0) $parse['ozellik2'] .="Dexterity Bonus : " . $DexB . "<br>";
  142. if ($IntelB!=0) $parse['ozellik2'] .="Intelligence Bonus : " . $IntelB . "<br>";
  143. if ($MaxMpB!=0) $parse['ozellik2'] .="MP Bonus : " . $MaxMpB . "<br>";
  144. if ($ChaB!=0) $parse['ozellik2'] .="Magic Power Bonus : " . $ChaB . "<br>";
  145. if ($FireR!=0) $parse['ozellik2'] .="Resistance to Flame : " . $FireR . "<br>";
  146. if ($ColdR>5) $parse['ozellik2'] .="Resistance to Glacier : " . $ColdR . "<br>";
  147. if ($LightningR>5) $parse['ozellik2'] .="Resistance to Lightning : " . $LightningR . "<br>";
  148. if ($MagicR!=0) $parse['ozellik2'] .="Resistance to Magic : " . $MagicR . "<br>";
  149. if ($PoisonR!=0) $parse['ozellik2'] .="Resistance to Poison : " . $PoisonR . "<br>";
  150. if ($CurseR!=0) $parse['ozellik2'] .="Resistance to Curse : " . $CurseR . "<br>";
  151. if ($ReqStr!=0) $parse['ozellik3'] .="Required Strength : " . $ReqStr . "<br>";
  152. if ($ReqSta!=0) $parse['ozellik3'] .="Required Health : " . $ReqSta . "<br>";
  153. if ($ReqDex!=0) $parse['ozellik3'] .="Required Dexterity : " . $ReqDex . "<br>";
  154. if ($ReqIntel!=0) $parse['ozellik3'] .="Required Intelligence : " . $ReqIntel . "<br>";
  155. if ($ReqCha!=0) $parse['ozellik3'] .="Required Magic Power : " . $ReqCha . "<br>";
  156. return '<center><font color='.$renk.'>'.$strName.'<br>('.$type.')</font><br>'.$kind.'<br></center><font color=lime>'.$parse[ozellik1].$parse[ozellik2].$parse[ozellik3].'</font>';
  157. }
  158. if ($_SESSION['itemkilitlemesifre']=='') {
  159. $itemkilitsifre = odbc_result(odbc_exec($conn,"SELECT itemkilitsifre FROM tb_user WHERE straccountid ='$username'"), 1);
  160. if ($itemkilitsifre=='') {
  161. echo 'HOSGELDINIZ '.$char.' ITEM KILIT SIFRENIZ BELIRLENMEMIS.LUTFEN ITEM KILIT SIFRENIZI BELIRLEYINIZ VE NOT ALINIZ.';
  162. echo '<BR><BR><BR>
  163. <form action="/itemkilit1.html" method="post">
  164. <table style="margin-top:10px; text-align:center; border:1px solid #413f22; background-color:#221f13" cellpadding="0" cellspacing="1" width="480">
  165. <tr><td align="left">ITEM Kilit SIFRE</td><td> :</td><td> <input type="password" name="kilitbelirle1" required></td><td>
  166. <tr><td align="left">ITEM Kilit SIFRE Tekrar </td><td> :</td><td> <input type="password" name="kilitbelirle2" required></td><td></table><input type="submit" value="OK"> </form>
  167. ';} else {echo 'HOSGELDINIZ '.$char.' ITEM KILIT SIFRENIZI GIRINIZ ';
  168. echo '<BR><BR><BR><form action="/itemkilit1.html" method="post">
  169. <table style="margin-top:10px; text-align:center; border:1px solid #413f22; background-color:#221f13" cellpadding="0" cellspacing="1" width="480">
  170. <tr><td align="left">ITEM Kilit SIFRE</td><td> :</td><td> <input type="password" name="kilit" required ></td><td>
  171. </table><input type="submit" value="OK"> </form>
  172. ';}}
  173. if ($kilitbelirle1!=''){
  174. if ($kilitbelirle1!=$kilitbelirle2) die ('Girdiginiz SIFREler uyusmuyor!!!!');
  175. if ($itemkilitsifre=='') {
  176. odbc_exec($conn,"update tb_user set itemkilitsifre='$kilitbelirle1' WHERE straccountid ='$username'");}
  177. echo'<meta [Only Registered Users Can See Links]"refresh" content="0;URL=itemkilit1.html">';}
  178. if ($kilit!=''){
  179. if ($itemkilitsifre==$kilit){
  180.  
  181.  
  182. $_SESSION['itemkilitlemesifre'] = $kilit;
  183. $_SESSION['charid1'] = $char ;
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190. } else echo 'SIFRE Yanlis!!!';}
  191. if ($_SESSION['itemkilitlemesifre']!='') {
  192. if ($sira>(-1)) {
  193. odbc_exec($conn,"exec itemkilitlepanel '".$char."',$sira ");
  194.  
  195.  
  196. }
  197. odbc_exec($conn,"exec FetchUserItems '$char'");
  198. $bankaitemleri=odbc_exec($conn,"select itempos,itemnum,itemsealed,itemserial from ListUserItems where struserid='$char' and itempos<42 order by itempos");
  199. $sutunno=1;
  200. $inventoryno=0;
  201. echo 'KILITLEMEK YADA KILIDINI ACMAK ISTEDIGINIZ ITEMIN UZERINE TIKLAYINIZ<br><br><br><table border="0">';
  202. while (odbc_fetch_row($bankaitemleri)) {
  203. $itemresimkodu1=odbc_result($bankaitemleri,2);
  204. $itemkodu=odbc_result($bankaitemleri,2);
  205. $itemsira=odbc_result($bankaitemleri,1);
  206. $kilitlimi=odbc_result($bankaitemleri,3);
  207. $iteminseriali=odbc_result($bankaitemleri,4);
  208. $serialyazisi='';
  209. $altyazi='';
  210. if ($kilitlimi=='1') {$serialyazisi='2/';
  211. $altyazi='<font color=yellow>Kilitli Item SteelKO';}
  212. $itemresimkodu2='itemicon_'.$itemresimkodu1[0].'_'.$itemresimkodu1[1].''.$itemresimkodu1[2].''.$itemresimkodu1[3].''.$itemresimkodu1[4].'_'.$itemresimkodu1[5].'0_0.jpg'.$adetyazisi;
  213. $ozeelikleriyaz=itemözellik("$itemkodu");
  214. if ($sutunno==1) echo '<tr>';
  215. echo '<td width="55">';
  216. if ($itemkodu>0 and $iteminseriali>0) echo '<div onmouseover="return overlib(\'<table border=0 cellspadding=10 cellspacing=10><tr><td align=left><font style=font-size:11px><font color=white>'.$ozeelikleriyaz.'<font style=font-size:9px>'.$altyazi.'</td></tr></table> \', LEFT, WIDTH, 200);" onMouseOut="return nd();" style="width:45px; height:45px;"><form action="/itemkilit1.html" method="post"><input type="hidden" name="sira" value="'.$itemsira.'"><button type="submit" value="submit" ><img src="[Only Registered Users Can See Links]'.$serialyazisi.''.$itemresimkodu2.'" border=0 width=45 height=45 alt="Submit"></button></form></div>';
  217. echo '</td>';
  218. $sutunno++;
  219.  
  220.  
  221. if ($inventoryno<13){
  222. if ($sutunno==4) { echo '</tr>';
  223. $sutunno=1;}} else if ($inventoryno==13) {echo '<tr></tr>';
  224. $sutunno=1;
  225. }
  226. else if ($sutunno==8) { echo '</tr>';
  227. $sutunno=1;}
  228.  
  229.  
  230. $inventoryno++;
  231. }
  232. echo '</table><br><br><br><br><br><br><br><br>';}?>
Advertisement
Add Comment
Please, Sign In to add comment