Overview
Comment:Fix [fcfc2b9395] : garder la session en vie tant que la page est dans un onglet
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 71b6152ae3e3d58459ef21f988db03ff234bda9d
User & Date: bohwaz on 2012-04-03 01:18:43
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2012-04-03
01:21
Version 0.2.1 check-in: 2e4bfa6a54 user: bohwaz tags: trunk
01:18
Fix [fcfc2b9395] : garder la session en vie tant que la page est dans un onglet check-in: 71b6152ae3 user: bohwaz tags: trunk
01:05
fix [c94f57b5f8] + prĂ©cisions et suppression de la colonne ville dans la liste des membres check-in: 3817c1fa22 user: bohwaz tags: trunk
Changes

Modified include/class.membres.php from [d17c974854] to [add9991889].

45
46
47
48
49
50
51





52
53
54
55
56
57
58
                if (isset($GLOBALS[$key]))
                    unset($GLOBALS[$key]);
            }
        }

        return true;
    }






    public function login($email, $passe)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL))
            return false;

        $db = Garradin_DB::getInstance();







>
>
>
>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
                if (isset($GLOBALS[$key]))
                    unset($GLOBALS[$key]);
            }
        }

        return true;
    }

    public function keepSessionAlive()
    {
        $this->_sessionStart(true);
    }

    public function login($email, $passe)
    {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL))
            return false;

        $db = Garradin_DB::getInstance();

Modified templates/admin/_foot.tpl from [73366e88b5] to [3bf65433df].

1
















2
3
4
</div>

















</body>
</html>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</div>

<script type="text/javascript" defer="defer">
{literal}
(function () {
    var keep_session_url = "{$www_url}admin/login.php?keepSessionAlive&amp;";

    function refreshSession()
    {
        var _RIMAGE = new Image(1,1);
        _RIMAGE.src = keep_session_url + Math.round(Math.random()*1000000000);
        window.setTimeout("refreshSession()", 15 * 60 * 1000);
    }
    window.setTimeout(refreshSession, 20 * 60 * 1000);
} ());
{/literal}
</script>

</body>
</html>

Modified www/admin/login.php from [615f4edde4] to [9c18b1f51c].

1
2
3
4














5
6
7
8
9
10
11
<?php

define('GARRADIN_LOGIN_PROCESS', true);
require_once __DIR__ . '/_inc.php';















$error = false;

if (!empty($_POST['login']))
{
    if (!utils::CSRF_check('login'))
    {




>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
<?php

define('GARRADIN_LOGIN_PROCESS', true);
require_once __DIR__ . '/_inc.php';

// Relance session_start et renvoie une image de 1px transparente
if (isset($_GET['keepSessionAlive']))
{
    $membres->keepSessionAlive();

    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');

    header('Content-Type: image/gif');
    echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");

    exit;
}

$error = false;

if (!empty($_POST['login']))
{
    if (!utils::CSRF_check('login'))
    {