Minor display cleanup
[mirrors/Kyberia-bloodline.git] / scripts / usersave.php
1 #!/usr/local/bin/php
2 <?php
3 require('../config/config.inc');
4 //connecting to database and creating universal $db object
5 require(SYSTEM_ROOT.'/inc/log.inc');
6 require(SYSTEM_ROOT.'/inc/database.inc');
7 require(SYSTEM_ROOT.'/inc/nodes.inc');
8 $db=new CLASS_DATABASE();
9
10 $q="select user_id,login from users";
11 $set=$db->query($q);
12 $i=0;
13 while ($set->next()) {
14 $user_id=$set->getString('user_id');
15 $user_name=$set->getString('login');
16 $us=$db->query("select node_id from nodes where node_id='$user_id'");
17
18 if (!$us->getNumRows()) {
19 ++$i;
20 $q="insert into nodes set node_id='$user_id',node_creator='$user_id',node_system_access='public',
21 node_external_access='yes',template_id='7',node_name='$user_name',external_link='session://user',node_vector='$vector'";
22 echo "\n $i $q <br>";
23 $db->update($q);
24 }
25 }
26 ?>
This page took 0.889533 seconds and 4 git commands to generate.