2 set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
5 require_once "autoload.php";
6 require_once "functions.php";
7 require_once "sessions.php";
8 require_once "sanity_check.php";
9 require_once "config.php";
10 require_once "db.php";
11 require_once "db-prefs.php";
13 if (!init_plugins()) return;
15 $op = $_REQUEST['op'];
17 if ($op == "publish"){
18 $key = db_escape_string( $_REQUEST["key"]);
20 $result = db_query( "SELECT owner_uid
21 FROM ttrss_access_keys WHERE
22 access_key = '$key' AND feed_id = 'OPML:Publish'");
24 if (db_num_rows($result) == 1) {
25 $owner_uid = db_fetch_result($result, 0, "owner_uid");
27 $opml = new Opml($_REQUEST);
28 $opml->opml_export("", $owner_uid, true, false);
31 print "<error>User not found</error>";