setParent fix
[mirrors/Kyberia-bloodline.git] / trash / uprav_zaregistrovanych.inc
1 <?php
2 function uprav_zaregistrovanych() {
3 global $db,$error;
4 // 2110364 >> debug user
5
6 // XXX remove ?
7
8 // XXX hardcoded, rewrite
9 $q="select users.login as persona,users.email as email,k,node_id,node_creator,login from nodes
10 left join users on nodes.node_creator=users.user_id where node_name!='request for access' and node_parent=".REGISTRATION_REQUEST_NODE." and
11 k>=".REGISTRATION_VOTES;
12
13 $set=$db->query($q);
14 while ($set->next()) {
15 $noda=$set->getString('node_id');
16 echo "User ";
17 echo $set->getString('login');
18 echo "<br>Jeho noda:: ";
19 echo $set->getString('node_id');
20 echo "<br>";
21 echo " pocet hlasov:: ";
22 echo $set->getString('k');
23 echo "<br>";
24 $q="update nodes set external_link='db://user' where node_id=$noda";
25 echo $q;
26 $db->update($q);
27 echo "<br>";
28 $q="update nodes set template_id=7 where node_id=$noda";
29 echo $q;
30 $db->update($q);
31 echo "<br>";
32 $q="update nodes set node_parent=0 where node_id=$noda";
33 echo $q;
34 $db->update($q);
35 echo "<br>";
36 $q="update nodes set node_vector='0$noda' where node_id=$noda"; // XXX setParent
37 echo $q;
38 $db->update($q);
39
40 $q="update users set user_mail=0 where user_id=$noda";
41 echo $q;
42 $db->update($q);
43
44 echo "<br>";
45 echo "<hr>";
46
47
48
49
50 }
51
52 return false;
53 }
54 ?>
This page took 0.445833 seconds and 4 git commands to generate.