2 //requiring main config file with path/database etc. constants
3 require('../config/config.inc');
5 //connecting to database and creating universal $db object
6 require(SYSTEM_ROOT
.'/inc/log.inc');
7 require(SYSTEM_ROOT
.'/inc/database.inc');
8 require(SYSTEM_ROOT
.'/inc/nodes.inc');
9 $db=new CLASS_DATABASE();
10 $db_old=new CLASS_DATABASE("kyberia","kyberia","cyb3ry","127.0.0.1");
12 $q="select * from nodes where node_type='7'";
13 $userset=$db->query($q);
14 while ($userset->next()) {
15 $users[$userset->getString('old_id')]=$userset->getString('node_id');
20 $q="select * from node_access where node_type='journaux'";
21 $set=$db_old->query($q);
22 $db->query("set autocommit=0");
24 while ($set->next()) {
25 echo "OLDUSERID::".$set->getString('user_id');
27 $user_id=$users[$set->getString('user_id')];
28 echo "<br>NEWUSERID".$user_id;
30 $q="select node_id from nodes where node_type='6' and old_id='".$set->getString('node_id')."'";
34 $node_id=$set2->getString('node_id');
36 $q="insert into node_access set node_id='$node_id',user_id='$user_id',node_bookmark='no',node_permission='".$set->getString('access_type')."'";
38 // if ($node_id>0 AND $user_id>0) $db->query($q);
This page took 0.296029 seconds and 4 git commands to generate.