Jeste jednou trasovani
[mirrors/Kyberia-bloodline.git] / scripts / fixaccess.php
CommitLineData
b42b2bf9
H
1<?
2require('../config/config.inc');
3require('../node_types.php');
4require(SYSTEM_ROOT.'inc/log.inc');
5require(SYSTEM_ROOT.'inc/nodes.inc');
6require(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";
11echo $q;
12$set = $db->query($q);
13
14while($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?>
This page took 0.276995 seconds and 4 git commands to generate.