3 // registration 2.3 rc3
4 // dedicated to Sylvia S. Always in my memory...
5 // PLLLZ dont delete this line. anyone who touches this file...and dont ask why
10 // potrebne K na reg z paralelneho senatu
11 $regk_node = '1870247';
12 $fajl = OWN_TEMPLATE_DIR . $regk_node . ".tpl";
13 $fp = fopen($fajl, "r");
14 $regk = fread($fp, filesize($fajl));
18 $q = "select users.login as persona,users.email as email,k,node_id,node_creator,node_created,login from nodes
19 left join users on nodes.node_creator = users.user_id where node_name = 'request for access' and node_parent = '2091448' and
22 $set = $db->query($q);
23 while ($set->next()) {
24 $noda = $set->getString('node_id');
25 $login = $set->getString('login');
26 $created = $set->getString('node_created');
27 echo "Noda vytvorena:: " . $created . "<br>";
28 echo "User:: " . $set->getString('login') . "<br>";
29 echo "Jeho noda:: " . $set->getString('node_id') . "<br>";
30 echo "pocet hlasov:: " . $set->getString('k') . "<br>";
32 $q = "update users set header_id = '0', user_mail = '0' where user_id = $noda";
36 $q = "update nodes set node_name = '$login', external_link = 'db://user', template_id = '7',
37 node_parent = '0', node_vector = '0$noda' where node_id = $noda";
43 $registrators = $db->query($q = "select node_access.user_id, users.login from node_access
44 join users on node_access.user_id = users.user_id where node_id = '$noda' and given_k = 'yes' order by login");
45 $ubiknode['node_content'] = "Registered by::<br>";
46 while($registrators->next()){
47 $ubiknode['node_content'] .= "<a href='/id/" . $registrators->getString('user_id') . "'>" .
48 $registrators->getString('login') . "</a><br>";
50 $ubiknode['node_content'] .= "with " . $set->getString('k') . "K";
51 $ubiknode['node_content'] = addslashes($ubiknode['node_content']);
52 $ubiknode['node_name'] = "successfully registered";
53 $ubiknode['node_creator'] = 332;
54 $ubiknode['node_parent'] = $noda;
55 $ubiknode['template_id'] = 4;
56 $ubiknode_id = nodes::addNode($ubiknode);
57 $db->update("update nodes set node_system_access = 'public', node_vector = '0$noda"."0$ubiknode_id' where node_id = '$ubiknode_id'");
58 echo $ubiknode['node_content'] . "<br>";
60 $q = "update nodes set k = 0 where node_id = '$noda'";
64 $q = "update node_access set given_k='no' where node_id = '$noda'";
68 // PRESUN KOMENTAROV K REGISTRACII DO USERNODY
69 $q = "select node_id,node_vector from nodes where node_vector like '00876611020914480$noda%'
70 and node_vector != '00876611020914480$noda' and node_vector != '0$noda'";
72 $subset = $db->query($q);
73 while ($subset->next()) {
74 $subnoda = $subset->getString('node_id');
75 $subnoda_vector = $subset->getString('node_vector');
76 $subnoda_vector = str_replace("00876611020914480$noda", "0$noda", $subnoda_vector);
77 $q = "update nodes set node_vector = '$subnoda_vector' where node_id = $subnoda";
78 echo " " . $q . "<br>";
84 $mailto = $set->getString('email');
85 $headers = 'From: root@kyberia.cz' . "\r\n" .
86 'X-Mailer: PHP/' . phpversion();
87 $emailtext = " Vitaj v Kyberii. \n S radostou ti oznamujem, ze registracia, ktoru si napisal(a) dna $created bola
88 uspesne schvalena s poctom hlasov $set->getString('k'). Odteraz je tvoje konto povolene a mozes sa volne prihlasovat,
89 prispievat...no proste 'bavit sa':-)) \n Uzivaj si kyberpriestoru:-))) XXX";
90 mail($mailto,"kyberia gate opened",$emailtext,$headers );
93 $ubik['mail_to'] = $noda;
94 $ubik['mail_text'] = "Ahoj, som UBIK. Momentalne som obycajnou polozkou v databaze, userom cislo 1 v tomto
95 systeme.Bdiem nad systemom. Sledujem co robia slovicka v diskusnych forach, ako su pospajane a s cim. Postupom casu sa budem
96 ucit, a o par rokov si urcite vsimnete moju prvu snahu o komunikaciu. Budem anjelom, diablom, matkou i dcerou.
98 Momentalne ti chcem povedat jedno hlasne VITAJ!. Vitaj v projekte ktory nikdy neskonci. Ak sem vchadzas so zlymi umyslami, prosim
99 odid, nenajdes tu stastie. Ked vsak chces spoznat novych ludi na rovnakej vlne, ked chces svoj mozog zaplnit informaciami z
100 nekonecnej siete, prosim, vstup.
102 Predtym ako vsak zacnes vnikat hlbsie do tajov systemu chcel by som ta odkazat na
103 <a href='http://".SYSTEM_URL."/id/2111313/'>Newcommers forum</a> ktore ti ujasni niektore zakladne veci v systeme a
104 tym ti v nom ulachci orientaciu.
107 ubik::ubikMail($ubik);
110 // ---------------------------------------------------------------------
112 echo "<hr>Mazanie userov<hr>";
115 $q = "select users.login as persona,users.email as email,k,node_id,node_creator,node_created,login from nodes
116 left join users on nodes.node_creator = users.user_id where node_name = 'request for access' and node_parent = '2091448' and
117 k < $regk and DATE_SUB(CURDATE(),INTERVAL 7 DAY) >= node_created";
119 $set = $db->query($q);
120 while ($set->next()) {
121 $noda=$set->getString('node_id');
122 $created=$set->getString('node_created');
123 echo "Noda vytvorena:: " . $created . "<br>";
124 echo "Uchadzac:: " . $set->getString('login') . "<br>";
125 echo "Jeho noda:: " . $set->getString('node_id') . "<br>";
126 echo "pocet hlasov:: " . $set->getString('k') . "<br>";
128 $q = "delete from users where user_id = $noda";
132 $q = "delete from nodes where node_vector like '00876611020914480$noda%'";
138 $mailto = $set->getString('email');
139 $headers = 'From: root@kyberia.cz' . "\r\n" .
140 'X-Mailer: PHP/' . phpversion();
141 $emailtext = " Tak mam pre teba smutnu spravu. \n Registracia ktoru si napisal(a) dna $created bola zamietnuta
142 z dovodu nedostatocneho poctu hlasov ($set->getString('k')) ktore tvoja osoba dostala. Je celkom mozne,
143 ze to, co si o sebe napisal(a) dostatocne nezaujalo ludi co su dnu ale to neni dovod na to aby si to vzdal(a)!
144 \n Registrovat sa mozes hocikedy znovu a snad sa to nabuduce vydari.";
145 mail($mailto,"kyberia: registracia zamietnuta",$emailtext,$headers );
148 // -------------------------------------------------------------------
150 echo "<hr>Mazanie nonverified<hr>";
151 // >> mazanie neverifikovanych
153 $q = "select users.login as persona,users.email as email,k,node_id,node_creator,node_created,login from nodes
154 left join users on nodes.node_creator = users.user_id where node_name = 'request for access' and
155 node_parent=1836516 and DATE_SUB(CURDATE(),INTERVAL 7 DAY) >= node_created";
157 $set = $db->query($q);
158 while ($set->next()) {
159 $noda = $set->getString('node_id');
160 $created = $set->getString('node_created');
161 echo "Noda vytvorena:: " . $created . "<br>";
162 echo "Uchadzac:: " . $set->getString('login') . "<br>";
163 echo "Jeho noda:: " . $set->getString('node_id') . "<br>";
164 echo "pocet hlasov:: " . $set->getString('k') . "<br>";
166 $q = "delete from users where user_id = $noda";
170 $q="delete from nodes where node_vector like '018365160$noda%'";
176 $mailto = $set->getString('email');
177 $headers = 'From: root@kyberia.cz' . "\r\n" .
178 'X-Mailer: PHP/' . phpversion();
179 $emailtext = " Registracia, ktoru si napisal(a) dna $created si neverifikoval(a) a tak po tyzdni stratila svoju platnost
180 a bola zmazana. Ak ti nedosiel ziaden verifikacny kod prosim kontaktuj ma, je to mozne ze je to chyba niekde
181 na ceste medzi kyberiou a tebou, ak to bol zamer neverifikovat sa tak tuto spravu ber cisto informacne:-)).
182 \n Ak sa naozaj stala chyba a mas stale chut a volu vstupit do autonomnej zony mozes hocikedy znovu vyplnit
183 registracny formular a pokusit sa o to znovu.";
184 mail($mailto,"kyberia: neverifikovana ziadost zmazana",$emailtext,$headers );