File: testcookie.class

package info (click to toggle)
basilix 1.0.3b-1.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 828 kB
  • ctags: 206
  • sloc: php: 2,681; sql: 45; makefile: 40; sh: 7
file content (25 lines) | stat: -rw-r--r-- 729 bytes parent folder | download
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
/*
+-------------------------------------------------------------------+
| BasiliX - Copyright (C) 2000 Murat Arslan <arslanm@cyberdude.com> |
+-------------------------------------------------------------------+
*/

// ------------------------------------------------------------------
class test_cookie {
    function test_cookie() {
	// do nothing
    }
    function do_test($cookie_var, $cookie_sent) {
        global $BSX_BASEHREF, $BSX_PHP_EXTENSION;
	if(!$cookie_var && $cookie_sent) return false;
	if(!$cookie_sent) {
	   SetCookie("BSX_TestCookie", "Yes");
	   url_redirect("$BSX_BASEHREF/index" . $BSX_PHP_EXTENSION . "?" . "testCookie=1");
	} else {
	   if(!$cookie_var) return false;
	}
	return true;
   }
}
?>