alex_vidi
Member
- Joined
- Jan 17, 2010
- Messages
- 206
- Reaction score
- 16
Не става ли за с3е2 ?
пробвай може и да стане аз го ползвам за s2 и си върви перфектно
Не става ли за с3е2 ?
<?php
session_start();
include "../includes/config.php";
include "../includes/secure.php";
$character = secure($_POST['character']);
$account = secure($_SESSION['user']);
$strength = secure($_POST['strength']);
$agility = secure($_POST['agility']);
$vitality = secure($_POST['vitality']);
$energy = secure($_POST['energy']);
check_inject();
$charq = mssql_query("Select leveluppoint,Strength,Dexterity,Vitality,Energy,class from Character where name='$character'");
$char = mssql_fetch_row($charq) or die(mssql_get_last_message());
$newstrength = $strength + $char[1];
$newagility = $agility + $char[2];
$newvitality = $vitality + $char[3];
$newenergy = $energy + $char[4];
$allstats = $strength + $agility + $vitality + $energy;
$newleveluppoints = $char[0] - $allstats;
$statusaq = mssql_query("select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$statusa = mssql_num_rows($statusaq);
if ($statusa != 0) {
$statusq = mssql_query("select GameIDC From AccountCharacter where Id='$account'");
$statusr = mssql_fetch_row($statusq);
}
if (empty($character)) {
echo "Error: Please select Character !";
$error = 1;
} else {
if ($statusr[0] == $character) {
echo "Error: Character $character Is Online ! Please Log Off !";
$error = 1;
}
if ($char[0] < $allstats) {
echo "Error: Character $character haven't got enought points !";
$error = 1;
} elseif ($newstrength > 32767 or $newagility > 32767 or $newvitality > 32767 or $newenergy > 32767 or $newcommand > 32767) {
echo "Error: You can't add more than 32767 points !";
$error = 1;
}
if ($error != 1) {
echo "<span class='online'>Points Successfuly added and now $character have $newstrength Strenght , $newagility Agility , $newvitality Vitality , $newenergy Energy and $newleveluppoints points to add !</span>";
$a = mssql_query("Update Character set leveluppoint='$newleveluppoints',Strength='$newstrength',Dexterity='$newagility',Vitality='$newvitality',Energy='$newenergy' where name='$character'");
}
}
?>
<?php
session_start();
include "../includes/config.php";
include "../includes/secure.php";
$character = secure($_POST['character']);
$account = secure($_SESSION['user']);
$strength = secure($_POST['strength']);
$agility = secure($_POST['agility']);
$vitality = secure($_POST['vitality']);
$energy = secure($_POST['energy']);
$leadership = secure($_POST['leadership']);
check_inject();
$charq = mssql_query("Select leveluppoint,Strength,Dexterity,Vitality,Energy,leadership,class from Character where name='$character'"); // edit By KR373N
$char = mssql_fetch_row($charq) or die(mssql_get_last_message());
$newstrength = $strength + $char[1];
$newagility = $agility + $char[2];
$newvitality = $vitality + $char[3];
$newenergy = $energy + $char[4];
$newleadership = $leadership + $char[5]; // Add Funcion Command By KR373N
$allstats = $strength + $agility + $vitality + $energy + $leadership; // Add Funcion Command By KR373N
$newleveluppoints = $char[0] - $allstats;
$statusaq = mssql_query("select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$statusa = mssql_num_rows($statusaq);
if ($statusa != 0) {
$statusq = mssql_query("select GameIDC From AccountCharacter where Id='$account'");
$statusr = mssql_fetch_row($statusq);
}
if (empty($character)) {
echo "Error: Please select Character !";
$error = 1;
} else {
if ($statusr[0] == $character) {
echo "Error: Character $character Is Online ! Please Log Off !";
$error = 1;
}
if ($char[0] < $allstats) {
echo "Error: Character $character haven't got enought points !";
$error = 1;
} elseif ($newstrength > 32767 or $newagility > 32767 or $newvitality > 32767 or $newenergy > 32767 or $newleadership > 32767) { // Add Funcion Command By KR373N
echo "Error: You can't add more than 32767 points !";
$error = 1;
}
if ($error != 1) {
echo "<span class='online'>Points Successfuly added and now $character have $newstrength Strenght , $newagility Agility , $newvitality Vitality , $newenergy Energy , $newleadership leadershipand $newleveluppoints points to add !</span>";
$a = mssql_query("Update Character set leveluppoint='$newleveluppoints',Strength='$newstrength',Dexterity='$newagility',Vitality='$newvitality',Energy='$newenergy',leadership='$newleadership' where name='$character'"); // Add Funcion Command By KR373N
}
}
?>
<?php
session_start();
if (!$_SESSION['user'] == true) {
echo "This page is only for registered users";
} else {
include "../../includes/config.php";
if (preg_match("/index.php/", $_SERVER['HTTP_REFERER'])) {
echo "";
} else {
echo "ERROR";
exit();
}
$user = $_SESSION['user'];
?>
<form id='register' name='' method='post'>
<table align='center' width='400' class='maintable'>
<thead>
<tr>
<td align='center'>Stats Adder</td>
</tr>
</thead>
<tr>
<td> </td>
</tr>
<tr>
<td align='center'>Select Character:
<select class='maintable' name='character'><optgroup label='Select a character'>
<?php
$charq = mssql_query("Select name,leveluppoint from Character where AccountID='$user'");
for ($i = 0; $i < mssql_num_rows($charq); ++$i) {
$row = mssql_fetch_row($charq);
echo"
<option value='$row[0]'><span class='maintable'><b>$row[0] [$row[1]]</span></option>
";
}
?>
</select>
</td>
</tr>
<tr><td align='center'><table width='400' align='center'>
<tr>
<td align='right' width='50%'>Strength:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='strength'></td>
</tr>
<tr>
<td align='right'>Agility:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='agility'></td>
</tr>
<tr>
<td align='right'>Vitality:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='vitality'></td>
</tr>
<tr>
<td align='right'>Energy:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='energy'></td>
</tr>
</table></td></tr>
</tr>
<td align='center'><input type="button" value='Add Stats' onclick="statsadd()"></td>
</tr>
</tr>
</table>
</form>
<?php
}
?>
<?php
session_start();
if (!$_SESSION['user'] == true) {
echo "This page is only for registered users";
} else {
include "../../includes/config.php";
if (preg_match("/index.php/", $_SERVER['HTTP_REFERER'])) {
echo "";
} else {
echo "ERROR";
exit();
}
$user = $_SESSION['user'];
?>
<form id='register' name='' method='post'>
<table align='center' width='400' class='maintable'>
<thead>
<tr>
<td align='center'>Stats Adder</td>
</tr>
</thead>
<tr>
<td> </td>
</tr>
<tr>
<td align='center'>Select Character:
<select class='maintable' name='character'><optgroup label='Select a character'>
<?php
$charq = mssql_query("Select name,leveluppoint from Character where AccountID='$user'");
for ($i = 0; $i < mssql_num_rows($charq); ++$i) {
$row = mssql_fetch_row($charq);
echo"
<option value='$row[0]'><span class='maintable'><b>$row[0] [$row[1]]</span></option>
";
}
?>
</select>
</td>
</tr>
<tr><td align='center'><table width='400' align='center'>
<tr>
<td align='right' width='50%'>Strength:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='strength'></td>
</tr>
<tr>
<td align='right'>Agility:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='agility'></td>
</tr>
<tr>
<td align='right'>Vitality:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='vitality'></td>
</tr>
<tr>
<td align='right'>Energy:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='energy'></td>
</tr>
<tr>
<td align='right'>Command:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='leadership'></td>
</tr>
</table></td></tr>
</tr>
<td align='center'><input type="button" value='Add Stats' onclick="statsadd()"></td>
</tr>
</tr>
</table>
</form>
<?php
}
?>
<?php
$conn=mssql_connect($dbhost,$dbuser,$dbpasswd);
$selected=mssql_select_db('MuOnline', $conn);
$query = 'select memb___id,ConnectTM from MEMB_STAT WHERE ConnectStat = 1 order by ConnectTM desc';
$result = mssql_query($query);
echo '<TABLE border=0 cellPadding=2 cellSpacing=2>
<table id="mutable" class="alt5" width="400" height=10 border="1" cellpadding="0" cellspacing="0" >
<tr>
<td align=center>ID</td>
<td align=center>Character</td>
<td align=center>Online From</td>
<td align=center>Level</td>
<td align=center>Resets</td>
<td align=center>Class</td>
</tr>';
$waw = mssql_query("SELECT count(*) From MEMB_STAT where Connectstat=1");
$xex = mssql_result($waw, 0, 0);
$color = 'darkblue';
for($i=0;$i < $xex;++$i)
{
$row = mssql_fetch_row($result);
$querychar = "Select GameIDC From AccountCharacter where Id='$row[0]'";
$resultchar = mssql_query( $querychar );
$accchar = mssql_fetch_row($resultchar);
$querychar = "Select Name,Class,MapNumber,clevel,resets From Character where Name='$accchar[0]'";
$resultchar = mssql_query($querychar);
$charr = mssql_fetch_row($resultchar);
$rank = $i+1;
if ($charr[1] == 0) { $charr[1] = "Dark Wizard"; }
if ($charr[1] == 1) { $charr[1] = "Soul Master"; }
if ($charr[1] == 16) { $charr[1] = "Dark Knight"; }
if ($charr[1] == 17) { $charr[1] = "Blade Knight"; }
if ($charr[1] == 32) { $charr[1] = "Elf"; }
if ($charr[1] == 33) { $charr[1] = "Muse Elf"; }
if ($charr[1] == 48) { $charr[1] = "Magic Gladiator"; }
if ($charr[1] == 64) { $charr[1] = "Dark Lord"; }
echo "<tr>
<td align=center><b>$rank</b></td>
<td align=center><b>$accchar[0]</b></td>
<td align=center>$row[1]</td>
<td align=center><b>$charr[3]</b></td>
<td align=center><b>[$charr[4]]</b></td>
<td align=center><b>$charr[1]</b></td>
</tr>
";
}
?>
</table>
PHP:<?php $conn=mssql_connect($dbhost,$dbuser,$dbpasswd); $selected=mssql_select_db('MuOnline', $conn); $query = 'select memb___id,ConnectTM from MEMB_STAT WHERE ConnectStat = 1 order by ConnectTM desc'; $result = mssql_query($query); echo '<center><TABLE border=0 cellPadding=2 cellSpacing=2> <table id="mutable" class="alt5" width="400" height=10 border="1" cellpadding="0" cellspacing="0" > <tr> <td align=left><center>ID</center></td> <td align=left><center>Character</center></td> <td align=left><center>Online From</center></td> <td align=left><center>Level</center></td> <td align=left><center>Resets</center></td> <td align=left><center>Class</center></td> </tr></center>'; $waw = mssql_query("SELECT count(*) From MEMB_STAT where Connectstat=1"); $xex = mssql_result($waw, 0, 0); $color = 'darkblue'; for($i=0;$i < $xex;++$i) { $row = mssql_fetch_row($result); $querychar = "Select GameIDC From AccountCharacter where Id='$row[0]'"; $resultchar = mssql_query( $querychar ); $accchar = mssql_fetch_row($resultchar); $querychar = "Select Name,Class,MapNumber,clevel,resets From Character where Name='$accchar[0]'"; $resultchar = mssql_query($querychar); $charr = mssql_fetch_row($resultchar); $rank = $i+1; if ($charr[1] == 0) { $charr[1] = "Dark Wizard"; } if ($charr[1] == 1) { $charr[1] = "Soul Master"; } if ($charr[1] == 16) { $charr[1] = "Dark Knight"; } if ($charr[1] == 17) { $charr[1] = "Blade Knight"; } if ($charr[1] == 32) { $charr[1] = "Elf"; } if ($charr[1] == 33) { $charr[1] = "Muse Elf"; } if ($charr[1] == 48) { $charr[1] = "Magic Gladiator"; } if ($charr[1] == 64) { $charr[1] = "Dark Lord"; } echo "<center><tr> <td align=left><b><center>$rank</center></b></font></td> <td align=left><b><center>$accchar[0]</center></b></td> <td align=left><center>$row[1]</center></td> <td align=left><b><center>$charr[3]</center></b></td> <td align=left><b><center>[$charr[4]]</center></b></td> <td align=left><b><center>$charr[1]</center></b></td> </center></tr> "; } ?> </table>
<td align=center><b>$xxxx</b></font></td>
Не е ли по-лесно така:
И не можах да разбера защо <tr> е в <center> xDPHP:<td align=center><b>$xxxx</b></font></td>
Браво иначе!
що щото ми е било толкова акъла оправих го мерси
echo "<center><tr>
<td align=left><b><center>$rank</center></b></font></td>
<td align=left><b><center>$accchar[0]</center></b></td>
<td align=left><center>$row[1]</center></td>
<td align=left><b><center>$charr[3]</center></b></td>
<td align=left><b><center>[$charr[4]]</center></b></td>
<td align=left><b><center>$charr[1]</center></b></td>
</center></tr>
";
echo "<tr>
<td align=center><b>$rank</b></td>
<td align=center><b>$accchar[0]</b></td>
<td align=center>$row[1]</td>
<td align=center><b>$charr[3]</b></td>
<td align=center><b>[$charr[4]]</b></td>
<td align=center><b>$charr[1]</b></td>
</tr>
";
трябва да си го добавиш на ръка...Абе хора я да ви питам тоя DrakE леб става ли за Сезон 6, че съм си наумил нещо (devil) ?