login.php
<?php include("sessiones.php");
if($user->data['is_registered'])
{
//en phpbb3_ suponemos que el prefijo de la tabla es phpbb3_
$conexion = mysql_connect($dbhost, $dbuser, $dbpasswd); mysql_select_db($dbuser);
unset($dbpasswd);
$avvy = "SELECT * FROM phpbb_users WHERE user_id =" . $user->data['user_id'];
$result = mysql_query($avvy) or die (mysql_error());
while($row = mysql_fetch_array($result))
{
$link = $row['user_avatar'];
$width = $row['user_avatar_width'];
$height = $row['user_avatar_height'];
mysql_close($conexion);
}?>
<a href="<?php echo $phpbb_url_path?>memberlist.php?mode=viewprofile&u=<?php echo $user->data['user_id'];?> " target="_self"></a>
<table width="145" height="392" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" valign="top">
<table width="145" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">Bienvenido <?php echo $user->data['username'];?>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=URL INDEX.PHP">
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
} else {
?>
<form action="<?php echo $phpbb_url_path?>ucp.php?mode=
LOGIN
" target="_top" method="post" enctype="multipart/form-data">
<table border="0" cellpadding="0" cellspacing="2">
<tr align="center">
<td>
Usuario:
<input name="username" type="text" maxlenght="50" value="" />
</td>
<td>
Contraseña:
<input type="password" name="password" maxlength="32" >
</td>
<td>
<input type="submit" value=" Entrar " name="
LOGIN
" >
</td>
<td>
<input type="checkbox" name="autologin" id="autologin" class="checkbox" value="ON"/>Autologin
<input type="hidden" name="redirect" value="../index.php">
</td>
<td>
<a href="<?php echo $phpbb_url_path?>ucp.php?mode=register" title="Lꦴe las condiciones y decide si quieres pertenecer a esta comunidad." >Soy nuevo</a>
<a href="<?php echo $phpbb_url_path?>ucp.php?mode=sendpassword" title="Danos tu nombre de usuario y tu correo electrónico y te mandamos una nueva" >Recordar password </a>
</td>
</td>
</tr>
</table>
</form>
<?php }
?>
sessiones.php
<?php
define('IN_PHPBB', true); // se define que se va a usar phpbb.
$phpbb_root_path = '/home/USER31254/public_html/Foro/'; // el path directo del servidor a phpbb3, varia algo dependiendo del servidor, si hay errores con esto en el mismo error sale el path correcto.
$phpbb_url_path = 'http://www.criptcoins.esy.es/Foro/'; // la url hacia tu phpbb3
$phpEx = substr(strrchr(__FILE__, '.'), 1); // tipo de extension
include($phpbb_root_path . 'common.' . $phpEx); // incluimos el common.php que es muy importante para la bd
include($phpbb_root_path . 'config.' . $phpEx); //include de config.php importante tambien en bd usuarios y pass
// iniciamos sesion
$user->session_begin();
$auth->acl($user->data);
?>
Datos del soporte
URL: http://criptcoins.esy.es/Foro/index.php
Estilo(s) usuado(s): PS4
MODs/Extensiones instaladas: ninguna
Versión de phpBB: 3.1.10
Tu conocimiento: Conocimiento Avanzado
Servidor: Gratuito Hostinger
Es una actualización desde otra versión: NO
Es una conversión desde otro tipo de Foro: no