get_image_link fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / set_creator.inc
1 <?php
2
3 function set_creator() {
4 global $node,$db;
5 $owner=$_POST['owner'];
6 $userset=$db->query("select user_id from users where login='$owner'");
7 $userset->next();
8 $user_id=$userset->getString('user_id');
9 if (!is_numeric($user_id)) {
10 $error="user $owner does not exist";
11 return false;
12 }
13
14 if ($node['node_creator']!=$_SESSION['user_id']) {
15 $error="you are not owner of da node";
16 return false;
17 }
18
19 $node_id=$node['node_id'];
20 if (is_numeric($node_id)) {
21 $q="update nodes set node_creator='$user_id' where node_id='$node_id'";
22 $db->query($q);
23 $ubik['mail_to']=$user_id;
24 $ubik['mail_text']="user ".$_SESSION['user_name']." have given you node <a href='/id/$node_id'>".$node['node_name']."</a>";
25 ubik::ubikMail($ubik);
26 return false;
27 }
28
29 }
30
31 ?>
This page took 1.643382 seconds and 4 git commands to generate.