Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Free Torrent Source (http://www.bvlist.com/forumdisplay.php?f=25)
-   -   [FIX] Staff & Settings panel cookie expiration and deletion (http://www.bvlist.com/showthread.php?t=4091)

benjaminbih 29th December 2009 11:42

[FIX] Staff & Settings panel cookie expiration and deletion
 
The admin [staffpanel] and administrator [settingspanel] cookies do not expire and after logout they are not deleted.

Perhaps someone has another opinion, but i think the must bo corrected.

in /admin/index.php cahnge:
PHP Code:

    setcookie('staffpanel','allowed'); 

to
PHP Code:

    $expires time() + 1800;
    
setcookie('staffpanel','allowed'$expires'/admin/'); 

in /administator/index.php cahnge:
PHP Code:

    setcookie('settingspanel','allowed'); 

to
PHP Code:

    $expires time() + 1800;
    
setcookie('settingspanel','allowed'$expires'/administrator/'); 

in /include/functions.php change:
PHP Code:

function logoutcookie()
{
    
setcookie("c_secure_uid"""0x7fffffff"/");
    
setcookie("c_secure_pass"""0x7fffffff"/");
    
setcookie("c_secure_login"""0x7fffffff"/");


to
PHP Code:

function logoutcookie()
{
    
setcookie("c_secure_uid"""0x7fffffff"/");
    
setcookie("c_secure_pass"""0x7fffffff"/");
    
setcookie("c_secure_login"""0x7fffffff"/");
    
setcookie("staffpanel"""0x7fffffff"/admin/");
    unset(
$_COOKIE['staffpanel']);
    
setcookie("settingspanel"""0x7fffffff"/administrator/");
    unset(
$_COOKIE['settingspanel']);



yoligim 29th December 2009 19:23

Thank you:drink:

Edgein 31st December 2009 20:53

Hello

after I've applied this mod
I could not log in admin panel and site settings panel
I got every time the login screen
I myself use firefox

benjaminbih 31st December 2009 22:00

@Edgein do you have deleted your cookies in browser, try it please

Edgein 2nd January 2010 21:46

sorry m8
for the late response
but the site settings is still down after removing the cookies again the login page
the staff pannel works properly

benjaminbih 2nd January 2010 21:51

oh yes i know why :D

in /administrator/index.php change
PHP Code:

    $expires time() + 1800;
    
setcookie('settingspanel','allowed'$expires'/admin/'); 

to
PHP Code:

    $expires time() + 1800;
    
setcookie('settingspanel','allowed'$expires'/administrator/'); 

it must work

First post updated

Edgein 2nd January 2010 21:54

Yess thats the one
works perfect

thx

essayyweb1 6th August 2011 08:10

Ooh thanks that helped me a lot..:muscle:


All times are GMT +2. The time now is 19:50.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.