Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá estou criando um site de um game chamando Mu online não sei se vocês ja fizeram a base é mssql e estou com dificuldade de fazer uptade na mesma pagina dei conta de criar o sistema de busca agora soh falta editar na mesma pagina.
</div>
</div>
</div>
<h2><span><cufon class="cufon cufon-canvas" alt="Gerenciar Contas" style="width: 19px; height: 18px; "><canvas width="26" height="24" style="width: 26px; height: 24px; top: -7px; left: 1px; "></canvas>
<cufontext>Gerenciar Contas</cufontext></cufon></span></h2>
<form action="?go=painel_gerenciarchars&buscar" method="post" name="buscar" id="buscar">
<table width="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="178"><div align="center"><span class="style18">
Char:
<input name="name" type="text" id="name" style="width: 120px; height:28px;" size="10" maxlength="10" />
</span></div></td>
<td width="54"><input name="buscars" type="submit" class="btn btn-primary" style="color:#FFF; text-decoration:none" value="Buscar" id="buscars" /></td>
<td width="68"> <a href='?go=painel' style='text-decoration:none' class='btn'>Voltar</a></td>
</tr>
</table>
</form>
<?
if (isset($_REQUEST['buscar']) && $_REQUEST['name'] != "") {
$name = $_REQUEST['name'];
$pesquisar = mssql_query("SELECT AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Money, Life, MapNumber, PkCount,
CtlCode, Leadership, foto from Character
WHERE Name='".$name."'");
$dados = mssql_fetch_array($pesquisar);
$verificacao = mssql_num_rows($pesquisar);
if ($verificacao <= 0 )
{
echo "<div align='center'><strong><font color='#000000'>Personagem Não Encontrado: $name</font></strong><br></div>";
}
elseif (eregi("[^a-zA-Z0-9_-]", $name))
{
echo("Use Apenas Letras e Numeros !");
}
//CHAR
$char['nome'] = $dados[Name];
$char['vit'] = $dados[Vitality];
$char['str'] = $dados[strength];
$char['ene'] = $dados[Energy];
$char['agi'] = $dados[Dexterity];
$char['com'] = $dados[Leadership];
$char['class'] = $dados['Class'];
$char['map'] = $dados[MapNumber];
$char['pontos'] = $dados[LevelUpPoint];
$char['level'] = $dados[cLevel];
$char['matou'] = $dados[PkCount];
$char['zen'] = $dados[Money];
$char['guild'] = $dados[G_Name];
$char['foto'] = $dados[foto];
$conta = $dados[AccountID];
//FOTO
if($dados[foto] == "")
{
if ($char['class'] == 0) { $char['foto'] = 'char_dw.jpg'; } // Dark Wizard
if ($char['class'] == 1) { $char['foto'] = 'char_sm.jpg'; } // Soul Master
if ($char['class'] == 2) { $char['foto'] = 'char_gm.jpg'; } // Grand Master
if ($char['class'] == 16) { $char['foto'] = 'char_dk.jpg'; } // Dark Knight
if ($char['class'] == 17) { $char['foto'] = 'char_bk.jpg'; } // Blade Knight
if ($char['class'] == 18) { $char['foto'] = 'char_bm.jpg'; } // Blade Master
if ($char['class'] == 32) { $char['foto'] = 'char_elf.jpg'; } // Elf
if ($char['class'] == 33) { $char['foto'] = 'char_muse.jpg'; } // Muse Elf
if ($char['class'] == 34) { $char['foto'] = 'char_hielf.jpg'; } // High Elf
if ($char['class'] == 48) { $char['foto'] = 'char_mg.jpg'; } // Magic Gladiator
if ($char['class'] == 49) { $char['foto'] = 'char_dm.jpg'; } // Duel Master
if ($char['class'] == 64) { $char['foto'] = 'char_dl.jpg'; } // Dark Lord
if ($char['class'] == 65) { $char['foto'] = 'char_lord.jpg'; } // Lord Emperor
if ($char['class'] == 80) { $char['foto'] = 'char_sum.jpg'; } // Summoner
if ($char['class'] == 81) { $char['foto'] = 'char_bs.jpg'; } // Blood Summoner
if ($char['class'] == 82) { $char['foto'] = 'char_dim.jpg'; } // Dimension Master
}
//STATUS
$status = mssql_fetch_row(mssql_query("SELECT memb___id, IP, ConnectStat, ConnectTM, DisConnectTM, OnlineHours FROM MEMB_STAT WHERE memb___id='".$conta."'"));
if ($status[2] == 0) { $statu = "<font color=red><b>Offiline</b></font>"; }
if ($status[2] == 1) { $statu = "<font color=green><b>Online</b></font>"; }
//VIP
$vips = mssql_fetch_array(mssql_query("SELECT vip FROM MEMB_INFO WHERE memb___id='".$conta."'"));
if ($vips[0] == 0) { $vip = '<font color=red><b>Não</b></font>'; }
if ($vips[0] == 1) { $vip = '<font color=blue><b>Sim</b></font>'; }
//MAPAS
if ($char['map'] == 0) { $char['mapa'] = 'Lorencia'; }
if ($char['map'] == 1) { $char['mapa'] = 'Dungeon'; }
if ($char['map'] == 2) { $char['mapa'] = 'Davias'; }
if ($char['map'] == 3) { $char['mapa'] = 'Noria'; }
if ($char['map'] == 4) { $char['mapa'] = 'Lost Tower'; }
if ($char['map'] == 5) { $char['mapa'] = 'Mapa 5'; }
if ($char['map'] == 6) { $char['mapa'] = 'Stadium'; }
if ($char['map'] == 7) { $char['mapa'] = 'Atlans'; }
if ($char['map'] == 8) { $char['mapa'] = 'Tarkan'; }
if ($char['map'] == 9) { $char['mapa'] = 'Devil Square'; }
if ($char['map'] == 10) { $char['mapa'] = 'Icarus'; }
if ($char['map'] == 11) { $char['mapa'] = 'Blood castle 1'; }
if ($char['map'] == 12) { $char['mapa'] = 'Blood castle 2'; }
if ($char['map'] == 13) { $char['mapa'] = 'Blood castle 3'; }
if ($char['map'] == 14) { $char['mapa'] = 'Blood castle 4'; }
if ($char['map'] == 15) { $char['mapa'] = 'Blood castle 5'; }
if ($char['map'] == 16) { $char['mapa'] = 'Blood castle 6'; }
if ($char['map'] == 17) { $char['mapa'] = 'perdido no mapa'; }
if ($char['map'] == 19) { $char['mapa'] = 'DareDevil'; }
//CLASSES
if ($char['class'] == 0){ $char['classe'] = 'Dark Wizard'; }
if ($char['class'] == 1) { $char['classe'] = 'Soul Master'; }
if ($char['class'] == 2) { $char['classe'] = 'Grand Master'; }
if ($char['class'] == 16) { $char['classe'] = 'Dark Knight'; }
if ($char['class'] == 17) { $char['classe'] = 'Blade Knight'; }
if ($char['class'] == 18) { $char['classe'] = 'Blade Master'; }
if ($char['class'] == 32) { $char['classe'] = 'Elf'; }
if ($char['class'] == 33) { $char['classe'] = 'Muse Elf'; }
if ($char['class'] == 34) { $char['classe'] = 'High Elf'; }
if ($char['class'] == 48) { $char['classe'] = 'Magic Gladiator'; }
if ($char['class'] == 49) { $char['classe'] = 'Duel Master'; }
if ($char['class'] == 64) { $char['classe'] = 'Dark Lord'; }
if ($char['class'] == 65) { $char['classe'] = 'Lord Emperor'; }
if ($char['class'] == 80) { $char['classe'] = 'Summoner'; }
if ($char['class'] == 81) { $char['classe'] = 'Blood Summoner'; }
if ($char['class'] == 82) { $char['classe'] = 'Dimension Master'; }
//GUILD
if ($char['guild'] == null) { $char['guild'] = 'Sem Guild'; }
?><br/><h2><span><cufon class="cufon cufon-canvas" alt="<?=$char['nome']?>" style="width: 19px; height: 18px; "><canvas width="26" height="24" style="width: 26px; height: 24px; top: -7px; left: 1px; "></canvas>
<cufontext><?=$char['nome']?></cufontext></cufon></span></h2> <form action="?go=painel_gerenciarchars&edit" method="post">
<table width="574" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="160" height="230" align="center"><p>
<img src="images/char/<?=$char['foto']?>" alt="id_char" width="140" height="205" hspace="10" vspace="10" align="middle">
<div><strong>Classe:</strong><span class="style10">
</span>
<select name="select" id="select">
<option value="<?=$char['classe']?>"><?=$char['classe']?></option>
</select>
</div>
<td width="390" valign="top"><table width="420" height="197" border="0" align="center" cellpadding="3" cellspacing="0" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;">
<tr>
<td width="21%" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Level</strong></div></td>
<td width="24%" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Status</strong></div></td>
<td width="24%" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Mapa</strong></div></td>
<td width="31%" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Ultimo ip</strong></div></td>
</tr>
<tr bgcolor="#F9F9F9">
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><select name="level" id="level" style="height:26px;">
<option value="<?=$char['level']?>"><?=$char['level']?></option>
<?php
for($i=1;$i<=400;$i++) {
if($i < 10) {
$i = ''.$i;
}
echo '<option value="'.$a.''.$i.'"> '.$a.''.$i.'</option>';
}
?>
</select></td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$statu?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;">
<select name="mapa" id="mapa">
<option value="<?=$char['map']?>"><?=$char['mapa']?></option>
<option value="1">Dungeon</option>
<option value="2">Devias</option>
<option value="3">Noria</option>
<option value="4">Lost Tower</option>
</select></td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$status[1]?></td>
</tr>
<tr>
<td bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Guild</strong></div></td>
<td bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Zen</strong></div></td>
<td bgcolor="#F9F9F9"><div align="center" class="style19"><strong>PK Status</strong></div></td>
<td bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Inicio da conexão</strong></div></td>
</tr>
<tr>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;">
<?=$char['guild']?>
</td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$char['zen']?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$char['matou']?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$status[3]?></td>
</tr>
<tr>
<td height="19" align="center" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Força</strong></div></td>
<td align="center" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Agilidade</strong></div></td>
<td align="center" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Comando</strong></div></td>
<td align="center" bgcolor="#F9F9F9"><div align="center" class="style19"><strong>Fim da conexão</strong></div></td>
</tr>
<tr>
<td height="21" align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;">
<input name="<?=$char['str']?>" type="text" id="<?=$char['guild']?>" value="<?=$char['str']?>" />
</td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?
if($char['agi'] < 0)$limite = "32000";
$agilidade = $limite - $char['agi'] * -1;
echo "$agilidade" ;
}echo $char['agi'];
}
?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"> <?
if($char['com'] < 0)$limite = "32000";
$comando = $limite - $char['com'] * -1;
echo "$comando";
}echo $char['com'];
}
?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$status[4]?></td>
</tr>
<tr >
<td height="19" align="center" bgcolor="#F9F9F9"><strong>Life</strong></td>
<td align="center" bgcolor="#F9F9F9" ><strong>Energia</strong></td>
<td align="center" bgcolor="#F9F9F9" ><strong>Vip</strong></td>
<td align="center" bgcolor="#F9F9F9" ><div align="center" class="style19"><strong>Duracao</strong></div></td>
</tr>
<tr>
<td height="20" align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?
if($char['vit'] < 0)$limite = "32000";
$vitalidade = $limite - $char['vit'] * -1;
echo "$vitalidade";
}echo $char['vit'];
}
?> </td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><span class="style10">
<?
if($char['ene'] < 0)$limite = "32000";
$energia = $limite - $char['ene'] * -1;
echo "$energia";
}echo $char['ene'];
}
?>
</span></td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$vip?></td>
<td align="center" style="border-bottom:1px dashed #CFCFCF; border-top:1px dashed #CFCFCF;"><?=$status[5]?> Horas</td>
</tr>
</table></td>
</tr>
</tbody>
</table>
<div align="center"><input name="editar" type="submit" class="btn btn-primary" style="color:#FFF; text-decoration:none" value="Editar Char" id="editar" /> <a href="?go=painel_gerenciarchars&editar&conta=<?=$dados[AccountID]?>" class="btn" style="text-decoration:none;">Editar Conta</a> <a href="f" class="btn" style="text-decoration:none;">Verificar IP</a> <a class="btn" style="text-decoration:none;" href="javascript:history.back(-1);">Voltar</a></div>
</table>if (isset($_REQUEST['edit']) && $char['nome'] != "") {
$name =$char['nome'];
$level=$_POST['level'];
mssql_query("UPDATE Character SET cLevel='$level' WHERE Name='".$name."'");
?>
<font color=green>Editado</font>
<? }?>
<? }?>
se alguem sabe ajuda ai
Carregando comentários...