Bad Password";}else{$passstate='ok';}
if (!$comment){$go=0;$commentstate="Invalid comment";$comment="INVALID!!!";}else{$commentstate='OK';}
if (strpos($banned_nodes, $node)){$go=0;$bannedstate="Masterize usage on banned nodes";}else{$bannedstate='OK';}
$passstate=addslashes($passstate);
$bannedstate=addslashes($bannedstate);
$comment=addslashes($comment);
$final=addslashes($final);
if ($go==1){$final="GRANTED!!!";}else{$final="NOT GRANTED!!!";}
$params['node_creator']=UBIK_ID;
$params['node_parent']=2058745;
$params['node_name']="masterize execute: user $user, priv: $priv on node: $node by $uname";
$params['node_content']="User who executed masterize: $uname";
$params['node_content'].="
User who wanted to gain privilegues: $user";
$params['node_content'].="
Node on whitch the privilegues should be gained: $node";
$params['node_content'].="
Type of privilegues [empty is for delete]: $priv";
$params['node_content'].="
Password state is: $passstate";
$params['node_content'].="
Banned nodes check is: $bannedstate";
$params['node_content'].="
commentz: $comment";
$params['node_content'].="
$final";
$params['node_content']=addslashes($params['node_content']);
nodes::addNode($params);
if ($go==1){
$q="update node_access set node_permission='$priv' where node_id=$node and user_id='$user'";
$changed=$db->update($q);
if (!$changed) {
$q="insert into node_access set node_permission='$priv',node_id='$node',user_id='$user'";
$db->query($q);
$error="access granted";}}else{$error='access denied';}
return false;
}
?>