2 /***********************************************************************/
\r
4 /***********************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or */
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /***********************************************************************/
\r
14 // check whether user needs to or have already agreed with legal disclaimer
\r
15 function agreed_legal_disclaimer() {
\r
16 global $_config, $db;
\r
18 // users are not required to agree with legal disclaimer
\r
19 if (!isset($_config['enable_terms_and_conditions']) || $_config['enable_terms_and_conditions'] <> 1) {
\r
22 // check whether the user has agreed with legal disclaimer
\r
23 $sql = "SELECT * FROM ".TABLE_PREFIX."DS_agreed_logins
\r
24 WHERE login = '".$_SESSION['login']."' ";
\r
25 $result = mysql_query($sql, $db);
\r
26 if (mysql_num_rows($result) > 0) {
\r
34 function save_agreed_login($login) {
\r
37 if ($login == '') return;
\r
39 $sql = "INSERT INTO ".TABLE_PREFIX."DS_agreed_logins (login)
\r
40 VALUES ('".$login."')";
\r
41 $result = mysql_query($sql, $db);
\r