5 $uvercode=mysql_real_escape_string($_POST['vc']);
6 $login=mysql_real_escape_string($_POST['login']);
8 $kset=$db->query("select user_id,guild_id from users where login='$login'");
10 $userid=$kset->getString('user_id');
11 $guild_id=$kset->getString('guild_id');
13 $set=$db->query("select node_id from nodes where node_id='$userid' and node_parent=".UNVERIFIED_REGISTRATIONS_NODE);
14 if($set->getNumRows()!=1) {
16 $error="User already verificated or invalid.";
21 $kset=$db->query("select hash from users where login='$login'");
22 $kset->next();$vercode=$kset->getString('hash');
24 if($uvercode!=$vercode) {
26 $error="Wrong verification code or username";
30 // ouch!! this is gonna be dirty!!!!! will be revised later:-)
31 // XXX hardcoded, rewrite
33 $q="update nodes set node_parent=".REGISTRATION_REQUEST_NODE.", node_vector='000001010473807402091448$userid' where node_id='$userid'";
37 // $params['node_parent']=REGISTRATION_REQUEST_NODE;
38 // $params['node_id']=$userid;
39 // nodes::setParent($params);
42 $q="update nodes set node_children_count=node_children_count+1 where node_id=".REGISTRATION_REQUEST_NODE;
44 $q="update nodes set node_created=NOW() where node_id='$userid'";
46 $q="update nodes set node_system_access='public' where node_id='$userid'";
48 $q="update node_access set node_user_subchild_count=node_user_subchild_count+1 where node_id=".REGISTRATION_REQUEST_NODE;
51 nodes::putNode($userid,$guild_id,false);
53 // and now the happy news:-))
54 echo "<center>Verification successfull.<br><h3>from now on your registration is in the hands of kyberians</h3></center>";