¡Bienvenido! ¿Aún no estás registrado?, deberás registrarte antes de poder usar el Chat, Comentar y Descargar en el Foro. Usa un email válido para la activación.
Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5

COMPLEMENTOS Seguridad Pass en la Admin (Act 1.3)
#1

1
Mejor respuesta del mensaje Seguridad Pass en la Admin (Act 1.3)
[img]Registrate o inicia tu sesión para ver este contenido[/img]


Ejecutar esta consulta

ALTER TABLE `u_miembrosADD `user_accesINT NOT NULL 


En c.user.php --> inc --> class --> c.user.php

Buscar:

// HORA EN LA CUAL RECARGAR PUNTOS 0 = MEDIA NOCHE DEL SERVIDOR
        
$ultimaRecarga $this->info['user_nextpuntos'];
        
$tiempoActual time(); 


Debajo agregar:

//////////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:

// NOMBRE
        
$this->nick $this->info['user_name'];
        
$this->uid $this->info['user_id']; 



Debajo agregar:

$this->acces $this->info['user_acces']; 


En c.admin.php --> inc --> class --> c.admin.php

Buscar:

/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
    // ADMINISTRAR \\
    /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 


Debajo agregar:

/*
    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:

/**********************************\

*    (INSTRUCCIONES DE CODIGO)        *

\*********************************/ 


Debajo agregar:

$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:

{include file='sections/main_header.tpl'


Debajo agregar:

{if $tsUser->acces>0


Buscar:

<div style="clear:both"></div


Debajo agregar:

{else}
                {include 
file='modules/m.acces.tpl'}
                {/if} 


Y subir esta carpeta


Mega
Debes agradecer para ver el contenido...

Google Drive
Debes agradecer para ver el contenido...

Mediafire
Debes agradecer para ver el contenido...



Creditos: Debes agradecer para ver el contenido...
Responder


Compartir en:

Mensajes en este tema
Seguridad Pass en la Admin (Act 1.3) - por Chctrpgo - 01-25-2021, 03:48 PM

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)