[Release] Website [Outlaws Mu template] [Drake web]

ето ви една добавка от мен дано да е полезна и newguy неми се сърди :)

ето как да си добавите за дарклорда да се качва Command от сайта

отварате webdir/func/stats.php
Преди промените:

PHP:
<?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:
<?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
    }
}
?>

Следващия Файл е webdir/modules/user/addstats.php

Преди едита:

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>&nbsp;</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:
<?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>&nbsp;</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
                    }
?>

това е всичко дано съм помогнал :)
 
ЕЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙЙ kr373n3 релейсър такъв :D
 
Браво много хубаво изглежда!!!
 
какво споделям тук защото сигурно и други искат да си сложат команд в addstats ако неме мързи ще направа и проверка ако не е Dark Lord да не излиза полето с команд
 
Online Player Modules


създаваме файл в webdir/modules/
с име charonline.php и свагаме следния код

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>

това е !

Демо:
32c9155abcc6f47d1b5153fa8e422a82.png



Credits modules: KR373N
 
Last edited:
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>


Не е ли по-лесно така:

PHP:
<td align=center><b>$xxxx</b></font></td>
И не можах да разбера защо <tr> е в <center> xD

Браво иначе! :)
 
Не е ли по-лесно така:

PHP:
<td align=center><b>$xxxx</b></font></td>
И не можах да разбера защо <tr> е в <center> xD

Браво иначе! :)

що щото ми е било толкова акъла оправих го мерси :)
 
що щото ми е било толкова акъла оправих го мерси :)

Оправи едното, другото го пропусна :D

PHP:
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>
";
==>


PHP:
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>
";
 
само на мен ли не ми показва геройте в control panel-а :( от къде да го оправя...
 
Някой, който използва сайта може ли да даде снимки, че на първата страница са изчезнали.
 
Абе хора я да ви питам тоя DrakE леб става ли за Сезон 6, че съм си наумил нещо (devil) ? :D
 
Абе хора я да ви питам тоя DrakE леб става ли за Сезон 6, че съм си наумил нещо (devil) ? :D
трябва да си го добавиш на ръка...