Commit | Line | Data |
---|---|---|
b42b2bf9 H |
1 | <? |
2 | require('../config/config.inc'); | |
3 | require('../node_types.php'); | |
4 | require(SYSTEM_ROOT.'inc/log.inc'); | |
5 | require(SYSTEM_ROOT.'inc/nodes.inc'); | |
6 | require(SYSTEM_ROOT.'inc/database.inc'); | |
7 | ||
8 | $db=new CLASS_DATABASE(); | |
9 | ||
10 | $q = "select node_id,user_id,count(*) as pocet from node_access_backup where node_bookmark='yes' group by node_id,user_id order by pocet desc"; | |
11 | echo $q; | |
12 | $set = $db->query($q); | |
13 | ||
14 | while($set->next()) { | |
15 | if ($set->getString('pocet')<2) die(); | |
16 | $node_id=$set->getString('node_id'); | |
17 | $user_id=$set->getString('user_id'); | |
18 | // echo "insert into node_access set node_id=$node_id and user_id=$user_id and node_bookmark='yes'\n"; | |
19 | $db->query("insert into node_access set node_id=$node_id, user_id=$user_id,node_bookmark='yes'"); | |
20 | ||
21 | ||
22 | ||
23 | } | |
24 | ||
25 | ?> |