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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| <?php
|
|
| class history_model extends model
| {
|
| function addHistory($name, $value)
| {
| global $config;
|
| if ($config['sy_onedomain'] != "") {
|
| $weburl = get_domain($this->config['sy_onedomain']);
|
| } elseif ($config['sy_indexdomain'] != "") {
|
| $weburl = get_domain($this->config['sy_indexdomain']);
|
| } else {
|
| $weburl = get_domain($this->config['sy_weburl']);
|
| }
|
| if ($_COOKIE[$name]) {
|
| $Arr = explode(',', $_COOKIE[$name]);
| }
|
| $Arr[] = $value;
|
| if ($this->config['sy_web_site'] == "1") {
|
| SetCookie($name, @implode(',', $Arr), time() + 86400, "/", $weburl);
| } else {
|
| SetCookie($name, @implode(',', $Arr), time() + 86400, "/");
| }
| }
| }
| ?>
|
|