51ff3226 |
1 | <?php |
2 | function vycisti_registracky() { |
3 | global $db,$error; |
4 | |
5 | $q="select users.login as persona,users.email as email,k,node_id,node_creator,login from nodes |
09f0f2fa |
6 | left join users on nodes.node_creator=users.user_id where node_name='request for access' and node_parent=".REGISTRATION_REQUEST_NODE." and k<=".REGISTRATION_VOTES; |
51ff3226 |
7 | |
8 | $set=$db->query($q); |
9 | while ($set->next()) { |
10 | $noda=$set->getString('node_id'); |
11 | echo "Uchadzac "; |
12 | echo $set->getString('login'); |
13 | echo "<br>Jeho noda:: "; |
14 | echo $set->getString('node_id'); |
15 | echo "<br>"; |
16 | echo " pocet hlasov:: "; |
17 | echo $set->getString('k'); |
18 | echo "<br>"; |
19 | $q="delete from users where user_id=$noda"; |
20 | echo $q; |
21 | $db->update($q); |
22 | echo "<br>"; |
ac3bdc72 |
23 | // XXX hard coded, fix |
51ff3226 |
24 | $q="delete from nodes where node_vector like '020914480$noda%'"; |
25 | echo $q; |
26 | $db->update($q); |
27 | echo "<br>"; |
28 | echo "<hr>"; |
29 | $mail=$set->getString('email'); |
b6e35197 |
30 | mail($mail,SYSTEM_URL. " registracia","Lutujem, vasa registracia bola zamietnuta"); |
51ff3226 |
31 | // echo $mail; |
32 | |
33 | |
34 | } |
35 | |
36 | return false; |
37 | } |
b6e35197 |
38 | ?> |