[Help] Смени раса

soempty

New Member
Joined
Mar 26, 2009
Messages
96
Reaction score
9
здравейте можете ли да ми едитнете този модул тои е за смени раса с стоне някои може ли да ми го направи с смс !

<table width="270" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="270">
<div align="center"><fieldset style="border: 1px dotted #808080">
<legend><b><font color="#FF0000">&nbsp;Class Changer</font></b><font color="#FF0000">
<font face="Times New Roman">»</font></font></legend>
<table width="270" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="270"><br>
<div align="center">
<form action="" method="post" name="class_change" id="stone_for_zen">
<table width="148" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="142">
<div align="right" class="normal_text_white">Character:
</div></td>
<td width="104">
<?
$account_id = stripslashes($_SESSION['user']);
$account_id = clean_var($account_id);
require("config.php");
print"<select name='name' id='name'>";
$query = mssql_query("select Name,Leveluppoint from Character where AccountID='$_SESSION[user]'");
while($result = mssql_fetch_array($query)){
echo "<option value='$result[Name]'>$result[Name]</option>";
}

print'</select>';
?></td>
</tr>
<tr>
<td>
<div align="right" class="normal_text_white">Exchange:
</div></td>
<td>
<select name='class' id='stones'>
<option value='48'>To Magic Gladiator</option>
<option value='17'>To Blade Knight</option>
<option value='1'>To Soul Matser</option>
<option value='33'>To Muse Elf</option>
</select>
</td>
</tr>

</table>
<table width="200" border="0" cellspacing="4" cellpadding="0">
<tr>
<td width="118">
<div align="right"><br>
<input type="hidden" name="cc" value="stone_for_zen">
<input type="submit" name="Submit" value="Exchange" class="button">
</div></td>

</tr>
</table>
</form></div></td>
</tr>
</table></fieldset> </div></td>
</tr>
</table>
<table width="393" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="394">&nbsp;</td>
</tr>
<tr>
<td><div align="center">
<?php
if (isset($_POST["cc"]))
{

require 'config.php';
$login= stripslashes($_SESSION['user']);
$name = stripslashes($_POST['name']);
$class = stripslashes($_POST['class']);

$stones = mssql_fetch_row(mssql_query("SELECT StoneCount FROM T_BLOOD_CASTLE WHERE AccountID = '$login'"));
$online_check = mssql_fetch_row(mssql_query("SELECT ConnectStat FROM MEMB_STAT where memb___id='$login'"));
$acc_char = mssql_fetch_row(mssql_query("SELECT count(*) FROM Character WHERE AccountID = '$login' and Name='$name'"));

if($online_check[0] >0) {
echo "$warning_start Please log off. $warning_end";
$error = 1; }
elseif($stones[0] < 300) {
echo "$warning_start You don't have enough stones! $warning_end";
$error = 1; }
elseif($acc_char[0] == 0) {
echo "$warning_start You don't own this character! $warning_end";
$error = 1; }
elseif(!intval($class)) {
echo "$warning_start More Hackers?!?!?! $warning_end";
$error = 1; }

if ($error != 1) {
$msquery = "UPDATE dbo.Character SET Class='".$class."' WHERE Name='$name'";
$msquery1 = "Update T_BLOOD_CASTLE Set StoneCount=StoneCount-300 WHERE AccountID = '$login'";
$msresults= mssql_query($msquery);
$msresults1= mssql_query($msquery1);
if($msresults && $msresults){
echo "$ok_start Class successfully changed! $ok_end"; }
}

}
?>
</div></td>
</tr>
</table>