-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingresar.php
191 lines (158 loc) · 6.73 KB
/
ingresar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php
session_start();
error_reporting(0);
if(isset($_SESSION['User']))
{
echo "<script>window.location='cuenta.php';</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Anuncio -->
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-1072011961085613",
enable_page_level_ads: true
});
</script>
<!-- Anuncio -->
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>
<?php
include_once('./css/index.php');
include_once('./kev/idioma.php');
require("./conectados/samp_query.php");
try
{
$rQuery = new QueryServer( $serverIP2, $serverPort );
$aInformation = $rQuery->GetInfo( );
$aServerRules = $rQuery->GetRules( );
$aBasicPlayer = $rQuery->GetPlayers( );
$aTotalPlayers = $rQuery->GetDetailedPlayers( );
$rQuery->Close( );
}
catch (QueryServerException $pError)
{
} echo $NombreServidor?> Roleplay - <?php echo $Texto_Index_92;?></title>
<link rel="stylesheet" type="text/css" href="./css/estilos3.css"/>
<link rel="shortcut icon" href="./imagenes/favicon/favicon.ico" />
<link rel="stylesheet" href="./css/style.css"/>
</head>
<body>
<table width="997" border="0" cellpadding="0" cellspacing="0" bgcolor="#E4E4E4" align="center">
<tr>
<td width="997">
<style>.alertas{float:left;margin-left:660px;margin-top:170px;position:absolute;background-color:#0081ff;border-radius:3px;padding:0.2em 0.4em 0.2em;color:#FFFFFF;font-weight:bold;}.alertas a{color:#FFF;}.alertas:hover{background-color:#0068ce;}.alertas a:hover{color:#f0f0f0;}</style>
<div style="background-color:#000; position:absolute; width:997px; height:164px; top:29px; background-image:url(./imagenes/fondos-cabecera/<?php $andi = rand(1, 6); echo $andi;?>.jpg)"></div>
<div class="header-s3-">
<div class="ip">
<font size="2px">IP S1:</font> <b><a href="samp://<?php echo $serverIP ?><?php if($activar_pt == 1){?>:<?php echo $serverPort ?><?php } ?>" style="color:#FFFFFF; font-size: 13px;" title="Agregar a favoritos"><?php echo $serverIP ?><?php if($activar_pt == 1){?>:<?php echo $serverPort ?><?php } ?></a></b>
</div>
<div class="casa"><a href="/ingresar.php" title="<?php echo $Texto_Index_92;?>"><img src="./imagenes/iconos/casa.png" align="absmiddle" border="0"></a></div>
<div class="nologeado">
<a href="/ingresar.php" title="<?php echo $Texto_Index_92;?>"><?php echo $Texto_Index_91;?></a>
</div>
</div>
<div id="menu-superior-s3">
<ul>
<li id="principal"><a href="index.php">Pincipal</a></li>
<li id="foro"><a href="./foro/">Foro</a></li>
<li id="tucuenta-ac"><a href="./cuenta.php">Tu cuenta</a></li>
<li id="crear-cuenta"><a href="./nuevo.php">Tu cuenta</a></li>
<li id="cuenta-creada"><a></a></li>
</ul>
<div class="invitaciones-pendientes">
</div>
</div>
<div id="contenido" style="position:relative; z-index:999;">
<div id="contenido-izquierdo">
<?php
$submit = $_POST['submit'];
$username = $_POST['username'];
$password = $_POST['password'];
$hashedPassword = md5($password);
if($submit)
{
if($username)
{
if($password)
{
if($_SESSION['img_number'] == $_POST['numeros'])
{
try
{
$stmt = $con->prepare("SELECT * FROM usuarios WHERE Username = :usuario");
$stmt->bindParam(':usuario', $username, PDO::PARAM_STR);
$stmt->execute();
$num_rows = $stmt->rowCount();
if($num_rows == 1)
{
while($datos = $stmt->fetch())
{
$dbusername = $datos['Username'];
$dbpassword = $datos['Password'];
}
if((strcasecmp($username, $dbusername) == 0) && $hashedPassword == $dbpassword)
{
$_SESSION['User'] = $dbusername;
echo "<script>window.location='cuenta.php';</script>";
}
else echo '<div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>Contrasena incorrecta</strong></div>';
}
else echo '<div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>No existe ninguna cuenta con los datos ingresados.</strong></div>';
}
catch(PDOException $e)
{
echo 'Error: ' . $e->getMessage();
}
}
else echo '<div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>El código de seguridad ingresado no es correcto.</strong></div>';
}
else echo '<div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>Te faltó ingresar la contraseña.</strong></div>';
}
else echo '<div class="login" style="padding:5px;top:20px;background-color:#F00; color:#FFFFFF; width:560px; text-align:center;"><strong>Te faltó ingresar el nombre de usuario.</strong></div>';
}
if(isset($_POST['recordarme']))
{
setcookie("NOLOG:USER", $_POST['username'], time()+3600*48);
}
?>
<section class="elcontenedor">
<div class="login">
<h1><?php echo $Texto_Index_15;?></h1>
<form method="post" accept-charset="UTF-8" autocomplete="off">
<p><input type="text" name="username" value="" placeholder="<?php echo $Texto_Index_23;?>" autocomplete="off"></p>
<p><input type="password" name="password" value="" placeholder="<?php echo $Texto_Index_24;?>" autocomplete="off"></p>
<p>
<div style="padding:5px; margin-top:20px">
<img id="seg" src="./captcha/image.php"> <script>
function recarga()
{
document.getElementById('seg').src='./captcha/image.php';
}
</script>
<a style="width:25px; height:25px;background-image:url('./imagenes/refresh.gif'); display:block; float:left; margin-right:1px" href="javascript:recarga();" title="<?php echo $Texto_Index_25;?>" alt="S"></a>
</div>
</p>
<p><input type="text" name="numeros" value="" placeholder="<?php echo $Texto_Index_22;?>"></p>
<p class="recordarme">
<label>
<input type="checkbox" name="recordarme" id="recordarme"/><?php echo $Texto_Index_16;?>.
</label>
</p>
<p class="submit"><input type="submit" name="submit" value="<?php echo $Texto_Index_21;?>"></p>
</form>
</div>
<div class="login-ayuda">
<p><?php echo $Texto_Index_17;?> <a href="perdida.php"><?php echo $Texto_Index_18;?></a>.</p>
<p><?php echo $Texto_Index_19;?> <a href="nuevo.php"><?php echo $Texto_Index_20;?></a>.</p>
</div>
</section>
</div>
<div id="menu-derecho">
<style>.rounded-img{display:inline-block;overflow:hidden;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.9);-moz-box-shadow:0 1px 3px rgba(0,0,0,.9);box-shadow:0 1px 3px rgba(0,0,0,.9);}</style>
<?php include "menu.php" ?>
</div>
<?php include "pie.php" ?>