51ff3226 |
1 | <?php |
2 | function unbook() { |
3 | |
fd15ea3a |
4 | global $db,$error,$node; |
51ff3226 |
5 | $q="update neurons set link='soft' where synapse_creator='".$_SESSION['user_id']."' and src='".$node['node_id']."' and link='bookmark'"; |
6 | $result=$db->update($q); |
7 | |
8 | $q="update node_access set last_visit='',node_bookmark='no' where user_id='".$_SESSION['user_id']."' and node_id='".$node['node_id']."'"; |
9 | $result=$db->query($q); |
10 | if ($result) { |
fd15ea3a |
11 | logger::log('unbook','ok'); |
51ff3226 |
12 | return true; |
13 | } |
14 | else { |
fd15ea3a |
15 | logger::log('unbook','failed'); |
51ff3226 |
16 | $error='unbook failed'; |
17 | return false; |
18 | } |
19 | } |
20 | ?> |