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 category";
13 $set=$db_old->query($q);
14 $db->query("set autocommit=0");
15 while ($set->next()) {
17 $q="insert into nodes set ";
18 $q.="node_name='".addslashes(strip_tags($set->getString('category_name')))."'";
19 if ($set->getString('category_parent')>0) {
20 $q2="select node_id from nodes where old_type='category' and old_id='".$set->getString('category_parent')."'";
21 $res2=$db->query($q2);
23 $q.=",node_parent='".$res2->getString('node_id')."'";
24 $q.=",node_thread_vector=';1;101;".$res2->getString('node_id')."'";
27 $q.=",node_parent='101' ,node_thread_vector=';1;101'";
33 ,node_system_access='".$set->getString('public')."'
34 ,old_id='".$set->getString('category_id')."'";
37 //$q="insert into node_content set node_content='".AddSlashes($set->getString('description'))."',node_id=LAST_INSERT_ID()";
This page took 0.360685 seconds and 4 git commands to generate.