Kyberia v2.0
[mirrors/Kyberia-bloodline.git] / inc / eventz / unbook.inc
1 <?php
2 /* This program is free software. It comes without any warranty, to
3 * the extent permitted by applicable law. You can redistribute it
4 * and/or modify it under the terms of the Do What The Fuck You Want
5 * To Public License, Version 2, as published by Sam Hocevar. See
6 * http://sam.zoy.org/wtfpl/COPYING for more details. */
7
8 function unbook() {
9
10 global $db,$error,$node;
11 $q="update neurons set link='soft' where synapse_creator='".$_SESSION['user_id']."' and peripheral='".$node['node_id']."' and link='bookmark'";
12 $result=$db->update($q);
13
14 $q="update node_access set last_visit='',node_bookmark='no' where user_id='".$_SESSION['user_id']."' and node_id='".$node['node_id']."'";
15 $result=$db->query($q);
16 if ($result) {
17 log::log('unbook','ok');
18 return true;
19 }
20 else {
21 log::log('unbook','failed');
22 $error='unbook failed';
23 return false;
24 }
25 }
26 ?>
This page took 0.254586 seconds and 4 git commands to generate.