X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Feventz%2Fverify.inc;h=7eb9008f6050921d92f806635a527cf9a3678cc7;hb=78f1a5f44941de2459b71c375e36cf88227c689c;hp=c0a42932c504e0f3d209c5631d97882eff0d0499;hpb=51ff32267c4949bad6a8dddc502cbc01ed56edc8;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/eventz/verify.inc b/wwwroot/inc/eventz/verify.inc index c0a4293..7eb9008 100644 --- a/wwwroot/inc/eventz/verify.inc +++ b/wwwroot/inc/eventz/verify.inc @@ -1,14 +1,16 @@ -query("select user_id from users where login='$login'"); -$kset->next();$userid=$kset->getString('user_id'); +$kset=$db->query("select user_id,guild_id from users where login='$login'"); +$kset->next(); +$userid=$kset->getString('user_id'); +$guild_id=$kset->getString('guild_id'); -$set=$db->query("select * from nodes where node_id='$userid' and node_parent=1836516"); +$set=$db->query("select node_id from nodes where node_id='$userid' and node_parent=".UNVERIFIED_REGISTRATIONS_NODE); if($set->getNumRows()!=1) { global $error; $error="User already verificated or invalid."; @@ -20,31 +22,36 @@ $kset=$db->query("select hash from users where login='$login'"); $kset->next();$vercode=$kset->getString('hash'); if($uvercode!=$vercode) { -global $error; -$error="Wrong verification code or username"; -return false; -} + global $error; + $error="Wrong verification code or username"; + return false; +} else { -else { // ouch!! this is gonna be dirty!!!!! will be revised later:-) -$q="update nodes set node_parent=2091448, node_vector='00876611020914480$userid' where node_id='$userid'"; -$db->update($q); -$q="update nodes set node_children_count=node_children_count+1 where node_id=2091448"; +// XXX hardcoded, rewrite + +//$q="update nodes set node_parent=".REGISTRATION_REQUEST_NODE.", node_vector='000001010473807402091448$userid' where node_id='$userid'"; +//$db->update($q); + +nodes::setParent($userid,REGISTRATION_REQUEST_NODE); + + +$q="update nodes set node_children_count=node_children_count+1 where node_id=".REGISTRATION_REQUEST_NODE; $db->update($q); $q="update nodes set node_created=NOW() where node_id='$userid'"; $db->update($q); $q="update nodes set node_system_access='public' where node_id='$userid'"; $db->update($q); -$q="update node_access set node_user_subchild_count=node_user_subchild_count+1 where node_id=2091448"; +$q="update node_access set node_user_subchild_count=node_user_subchild_count+1 where node_id=".REGISTRATION_REQUEST_NODE; $db->update($q); - +nodes::putNode($userid,$guild_id,false); // and now the happy news:-)) +echo "
Verification successfull.

from now on your registration is in the hands of kyberians

"; + die(); +} -echo "
Verification successfull.

from now on your registration is in the hands of kyberians

"; -die(); -} } -?> \ No newline at end of file +?>