Tem como alguém verificar em que posso melhorar?
Então galera eu apenas quero que se possível onde eu posso mudar para melhorar e por quê! Thanks...
index.php
<html>
<head>
<title>CPanel</title>
</head>
<body bgcolor="Silvergreen">
<h2 align="center"><strong> CPanel</strong></h2>
<h4 style="margin-top:-15;" align="center"><em><font size="2">Painel de Controle & Gerenciador</em><h4>
<hr size="2" width="30%">
<? include "config.php"; ?>
<form method="post" action="connect.php">
<table style="margin-top:60;" border="1" align="center" cellpadding="3" cellspacing="10">
<tr>
<td>
<table style="" border="0" align="center" cellpadding="3" cellspacing="10">
<tr>
<th align="center" colspan="2">Painel de login<hr size="5"></th>
</tr>
<tr>
<td align="center">Login: </td>
<td align="center"><input style="background-color:Silver;" type="text" name="user" maxlength="25"></td>
</tr>
<tr>
<td align="center">Senha: </td>
<td align="center"><input style="background-color:Silver;" type="password" name="pass" maxlength="25"></td>
</tr>
<tr>
<td colspan="2"><hr size="5"></td>
</tr>
<tr>
<td align="right"><input type="submit" value="Conectar"></td>
<td align="right"><input type="reset" value="Resetar"></td>
</tr>
</table>
</td>
</table>
</body>
</html>
Config.php
<?
$FailMessage=array(
'Não foi possível conectar-se ao host!',
'Não foi possível conectar-se ao banco de dados!',
'Usuário não cadastrado!',
'Senha errada!'
);
$Con=array(
'localhost', // IP / Hostname para a conexão com o banco de dados.
'root', // Usuário do SQL.
'server', // Senha do SQL.
'ark-ticket' // Tabela do painel de controle.
);
$Conx=array(
@mysql_connect($Con[0],$Con[1],$Con[2]),
@mysql_select_db($Con[3])
);
//Funções para Verificar as Conexões
if($Conx[0] == false){
echo "
<table bgcolor=red border=1 align=center cellpadding=1 cellspacing=0>
<tr>
<th bordercolor=black>$FailMessage[0]</th>
</tr>
</table>";}
if($Conx[1] == false){
echo "
<table bgcolor=red style=margin-top:1; border=1 align=center cellpaddin=1 cellspacing=0>
<tr>
<th bordercolor=black>$FailMessage[1]</th>
</tr>
</table>";}
?>
Connect.php
<html>
<head>
<title>CPanel</title>
</head>
<body bgcolor="Silvergreen">
<h2 align="center"><strong> CPanel Ark Ticket Sysem</strong></h2>
<h4 style="margin-top:-15;" align="center"><em><font size="2">Painel de Controle & Gerenciador</em><h4>
<hr size="2" width="30%">
<table style="margin-top:20;" border="1" width="600" align="center" cellpadding="3" cellspacing="10">
<tr>
<td align=\"center\" colspan=\"2\">
<?
@include "config.php";
$Cmd = @mysql_query("select * from login where userid='$user'");
$Rst = @mysql_fetch_array($Cmd);
if($Conx[0] == true && $Conx[1] == true){
if($user == null || $pass == null){
echo "Todos os campos são obrigatorios!<hr size=\"5\">";
$null=1;
}
}
if($null != 1){
if($Rst['userid'] != $user){
echo "<font face='Tahoma' style='font-size: 8pt' color='$800000'>* Esse usuario não existe!<br></font><hr size=\"5\">";
$Fail=1;
}
}
if($null != 1){
if($Rst['user_pass'] != $pass){
echo "<font face='Tahoma' style='font-size: 8pt' color='$800000'>* Senha incorreto!<br></font><hr size=\"5\">";
$Fail=1;
}
}
?>
</td>
</body>
</html>Discussão (2)
Carregando comentários...