3 global $error,$node,$db;
5 $user_id = $_SESSION['user_id'];
6 $bookstyl = $_POST['bookstyl']; //XXX sqli
8 $set=$db->query("select * from nodes where node_parent=19 and external_link='session://bookstyl' and node_creator='$user_id'");
9 if($set->getNumRows() == 0) {
11 $addnode['node_content'] = $bookstyl;
12 $addnode['node_name'] = "book styl";
13 $addnode['node_creator'] = $user_id;
14 $addnode['node_parent'] = 19;
15 $addnode['template_id'] = 4;
16 $addnode['external_link'] = "session://bookstyl";
17 $addnode_id = nodes::addNode($addnode);
18 $_SESSION['bookstyl']= $bookstyl;
23 $q = "update nodes set node_content='$bookstyl' where node_parent=19 and external_link='session://bookstyl' and node_creator='$user_id'";
27 $_SESSION['bookstyl']= $bookstyl;