Това от Оптинет ли го видя ?
Тоя е скрипта, който преди време направих за Му Оптинет.
Забележка: Работи само за muweb.
Code:
<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"> exchange stones for zen</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="stone_for_zen" 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='stones' id='stones'>
<option value='25'>25 stones for 50 mil</option>
<option value='50'>50 stones for 80 mil</option>
<option value='100'>100 stones for 400 mil</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="stone_for_zen" 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"> </td>
</tr>
<tr>
<td><div align="center">
<?php
if (isset($_post["stone_for_zen"]))
{
require 'config.php';
$login= stripslashes($_session['user']);
$name = stripslashes($_post['name']);
$stones_exchange = stripslashes($_post['stones']);
if ($stones_exchange == 25){$zen='50000000'; $kinti='50 mil';}
elseif ($stones_exchange == 50){$zen='80000000'; $kinti='80 mil';}
elseif ($stones_exchange == 100){$zen='400000000'; $kinti='400 mil';}
$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'"));
if ($online_check[0] >0) {
echo "$warning_start please log off. $warning_end";
$error = 1;
}
elseif ($stones[0] < $stones_exchange) {
echo "$warning_start not enough stones! $warning_end";
$error = 1;
}
if ($error != 1) {
$msquery = "
update dbo.character set money = money + '$zen'
where accountid = '$login'
and name = '$name'
update dbo.t_blood_castle set stonecount = stonecount - '$stones_exchange'
where accountid = '$login'
";
$msresults= mssql_query($msquery);
echo "$ok_start you successfully exchanged $stones_exchange stones for $kinti. $ok_end";
}
}
?>
</div></td>
</tr>
</table>