01-25-2021, 03:48 PM
1

[img]Registrate o inicia tu sesión para ver este contenido[/img]
Ejecutar esta consulta
Código PHP: ( Seleccionar Todo )
ALTER TABLE `u_miembros` ADD `user_acces` INT NOT NULL
En c.user.php --> inc --> class --> c.user.php
Buscar:
Código PHP: ( Seleccionar Todo )
// HORA EN LA CUAL RECARGAR PUNTOS 0 = MEDIA NOCHE DEL SERVIDOR
$ultimaRecarga = $this->info['user_nextpuntos'];
$tiempoActual = time();
Debajo agregar:
Código PHP: ( Seleccionar Todo )
//////////ACCESO RESTRINGIDO EN LA ADMINISTRACION ADAPTADO POR TUTAN-KABRON////////
$tiempo = time();
$resultado= $tiempo;
$timeuser= $this->info['user_acces'] + 360;
if($timeuser < $resultado){
db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE u_miembros SET user_acces = \'0\' WHERE user_id = \''.$this->uid.'\'');
}
//////////////////////FIN ACCESO/////////////////////////
Buscar:
Código PHP: ( Seleccionar Todo )
// NOMBRE
$this->nick = $this->info['user_name'];
$this->uid = $this->info['user_id'];
Debajo agregar:
Código PHP: ( Seleccionar Todo )
$this->acces = $this->info['user_acces'];
En c.admin.php --> inc --> class --> c.admin.php
Buscar:
Código PHP: ( Seleccionar Todo )
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
// ADMINISTRAR \\
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
Debajo agregar:
Código PHP: ( Seleccionar Todo )
/*
getSecure()
*/
function getSecure(){
global $tsUser,$tsCore;
//
$username= $tsCore->setSecure($_POST['username']);
$password= $tsCore->setSecure($_POST['pass']);
$username = strtolower($username);
$pp_password = md5(md5($password).strtolower($username));
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT user_name,user_password FROM u_miembros WHERE user_password = \''.$pp_password.'\' AND user_name = \''.$username.'\'');
//
$data = result_array($query);
$tiempo = time();
$resultado= $tiempo;
if($resultado=0){
$resultado=1;
}else{
$resultado= $tiempo;
}
if(!empty($data)){
db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE u_miembros SET user_acces = '.$resultado.' WHERE user_id = '.$tsUser->uid.'');
}
return $data;
}
En admin.php --> inc --> php --> admin.php
Buscar:
Código PHP: ( Seleccionar Todo )
/**********************************\
* (INSTRUCCIONES DE CODIGO) *
\*********************************/
Debajo agregar:
Código PHP: ( Seleccionar Todo )
$smarty->assign("tsAcces",$tsAdmin->getSecure());
if(!empty($_POST['pass'])) {
$tsCore->redirectTo($tsCore->settings['url'].'/admin/');
}
En t.admin.tpl --> themes --> default --> templates --> t.admin.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
{include file='sections/main_header.tpl'}
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsUser->acces>0}
Buscar:
Código PHP: ( Seleccionar Todo )
<div style="clear:both"></div>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{else}
{include file='modules/m.acces.tpl'}
{/if}
Y subir esta carpeta
Mega
Google Drive
Mediafire
Creditos: Debes agradecer para ver el contenido...


Facebook
Twitter
Reddit
Digg
del.icio.us
Tumblr
Pinterest
Blogger
Fark
LinkedIn
Mix
Google