link, "DELETE FROM ttrss_linked_instances WHERE id IN ($ids)"); } function add() { $id = db_escape_string($_REQUEST["id"]); $access_url = db_escape_string($_REQUEST["access_url"]); $access_key = db_escape_string($_REQUEST["access_key"]); db_query($this->link, "BEGIN"); $result = db_query($this->link, "SELECT id FROM ttrss_linked_instances WHERE access_url = '$access_url'"); if (db_num_rows($result) == 0) { db_query($this->link, "INSERT INTO ttrss_linked_instances (access_url, access_key, last_connected, last_status_in, last_status_out) VALUES ('$access_url', '$access_key', '1970-01-01', -1, -1)"); } db_query($this->link, "COMMIT"); } function edit() { $id = db_escape_string($_REQUEST["id"]); $result = db_query($this->link, "SELECT * FROM ttrss_linked_instances WHERE id = '$id'"); print ""; print ""; print ""; print "
" . __("Use one access key for both linked instances."); print "
" . __("You can connect other instances of Tiny Tiny RSS to this one to share Popular feeds. Link to this instance of Tiny Tiny RSS by using this URL:"); print " (display url)"; print "
".__('Instance URL')." | ".__('Access key')." | ".__('Last connected')." | ".__('Stored feeds')." | |
"; $onclick = "onclick='editInstance($id, event)' title='".__('Click to edit')."'"; $access_key = mb_substr($line['access_key'], 0, 4) . '...' . mb_substr($line['access_key'], -4); print " | " . htmlspecialchars($line['access_url']) . " | "; print "" . htmlspecialchars($access_key) . " | "; print "" . htmlspecialchars($line['last_connected']) . " | "; print "" . htmlspecialchars($line['num_feeds']) . " | "; print "