//REGISTRATION_VOTES CONSTANT DEFINED IN INC/SENATE.INC
define('REGISTER_TEXT','request for access');
-define('REGISTRATION_REQUEST_NODE',2091448);
$_SESSION['user_id']=UBIK_ID;
// XXX hardcoded, rewrite
$q="select users.login as persona,users.email as email,k,node_id,node_creator,login from nodes
-left join users on nodes.node_creator=users.user_id where node_name!='request for access' and node_parent=2091448 and
-k>=3";
+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;
$set=$db->query($q);
while ($set->next()) {
$kset->next();$userid=$kset->getString('user_id');
// XXX HARD CODED
-$set=$db->query("select * from nodes where node_id='$userid' and node_parent=1836516");
+$set=$db->query("select * from nodes where node_id='$userid' and node_parent=".UNVERIFIED_REGISTRATIONS_NODE);
if($set->getNumRows()!=1) {
global $error;
$error="User already verificated or invalid.";
} else {
// ouch!! this is gonna be dirty!!!!! will be revised later:-)
// XXX hardcoded, rewrite
-$q="update nodes set node_parent=2091448, node_vector='0000010120914480$userid' where node_id='$userid'";
+$q="update nodes set node_parent=".REGISTRATION_REQUEST_NODE.", node_vector='0000010120914480$userid' where node_id='$userid'";
$db->update($q);
-$q="update nodes set node_children_count=node_children_count+1 where node_id=2091448";
+$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);
global $db,$error;
$q="select users.login as persona,users.email as email,k,node_id,node_creator,login from nodes
-left join users on nodes.node_creator=users.user_id where node_name='request for access' and node_parent=2091448 and k<=4";
+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;
$set=$db->query($q);
while ($set->next()) {
// unfriend.inc
// $q = "update nodes set external_link='', node_parent=123456, node_vector='001234560$node_id' whe
-// uprav_zaregistrovanych.inc
-// node_parent=2091448 and k>=3
-
// verify.inc
-// node_parent=1836516")
-// $q="update nodes set node_parent=2091448,
// node_vector='0000010120914480$userid' where node_id='$user
// vycisti_registracky.inc
-// node_parent=2091448 and k<=4
// $q="delete from nodes where node_vector like '020914480$noda%'";
// resource.kyberia.php
}
//modifying node glass pearl //XXX WTF
-if (is_array($children_types[$node['node_type']])) {
- $smarty->assign('children_types',$children_types[$node['node_type']]);
-}
-$smarty->assign('types',$types);
+//if (is_array($children_types[$node['node_type']])) {
+// $smarty->assign('children_types',$children_types[$node['node_type']]);
+//}
+
+smarty->assign('types',$types);
//$node['node_type']=$types[$node['node_type']];