bug 1192: work on CCA agreement
authorINOPIAE <inopiae@cacert.org>
Fri, 20 Sep 2013 14:01:35 +0000 (16:01 +0200)
committerINOPIAE <inopiae@cacert.org>
Fri, 20 Sep 2013 14:01:35 +0000 (16:01 +0200)
www/index.php

index e1e8e69..4d403a8 100644 (file)
@@ -378,13 +378,18 @@ if ($id == 52 )
        $agree = ""; if(array_key_exists('agree',$_REQUEST)) $agree=$_REQUEST['agree'];
        if (!$agree) {
                $_SESSION['profile']['loggedin'] = 0;
-               $id=4;
        }else{
                write_user_agreement($_SESSION['profile']['id'], "CCA", "Login acception", "", 1);
                $_SESSION['profile']['loggedin'] = 1;
                header("location: https://".$_SERVER['HTTP_HOST']."/account.php");
                exit;
        }
+       $disagree = ""; if(array_key_exists('disagree',$_REQUEST)) $disagree=$_REQUEST['disagree'];
+       if ($disagree) {
+               $_SESSION['profile']['loggedin'] = 0;
+               header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=4");
+               exit;
+       }
 }