query("SELECT UserID FROM $Table WHERE UserID='$LoggedUser[ID]' AND $Col='".db_string($_GET['id'])."'"); if($DB->record_count() == 0) { $DB->query("INSERT IGNORE INTO $Table (UserID, $Col, Time) VALUES ('$LoggedUser[ID]', '".db_string($_GET['id'])."', '".sqltime()."')"); $Cache->delete_value('bookmarks_'.$Type.'_'.$LoggedUser['ID']); if ($Type == 'torrent') { $Cache->delete_value('bookmarks_torrent_'.$LoggedUser['ID'].'_full'); } elseif ($Type == 'request') { $DB->query("SELECT UserID FROM $Table WHERE $Col='".db_string($_GET['id'])."'"); $Bookmarkers = $DB->collect('UserID'); $SS->UpdateAttributes('requests requests_delta', array('bookmarker'), array($_GET['id'] => array($Bookmarkers)), true); } } ?>