if (!($_SESSION["uid"] && validate_session($link)) && $op != "globalUpdateFeeds" &&
$op != "rss" && $op != "getUnread" && $op != "getProfiles" &&
- $op != "pubsub") {
+ $op != "logout" && $op != "pubsub") {
header("Content-Type: text/plain");
print json_encode(array("error" => array("code" => 6)));
}
break;
+
+ case "logout":
+ logout_user();
+ header("Location: tt-rss.php");
+ break;
+
+ default:
+ header("Content-Type: text/plain");
+ print json_encode(array("error" => array("code" => 7)));
+ break;
} // Select action according to $op value.
// We close the connection to database.
print "<p>".T_sprintf("Finished. Performed <b>%d</b> update(s) up to schema
version <b>%d</b>.", $num_updates, $version)."</p>";
- print "<form method=\"GET\" action=\"logout.php\">
+ print "<form method=\"GET\" action=\"backend.php?op=logout\">
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
</form>";
<?php
- require_once "functions.php";
+ require_once "functions.php";
require_once "sessions.php";
require_once "sanity_check.php";
- require_once "version.php";
+ require_once "version.php";
require_once "config.php";
require_once "db-prefs.php";
- $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
login_sequence($link);
no_cache_incantation();
header('Content-Type: text/html; charset=utf-8');
-
+
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<img src="images/indicator_white.gif"/>
<?php echo __("Loading, please wait...") ?>
</div>
- </div>
+ </div>
<div id="header">
<?php } ?>
<?php if (!SINGLE_USER_MODE) { ?>
- <a href="logout.php"><?php echo __('Logout') ?></a>
+ <a href="backend.php?op=logout"><?php echo __('Logout') ?></a>
<?php } ?>
</div>
</div>
<div id="headlines">
- <h1><a href="#" onclick="viewfeed(-4)"><?php echo __('headlines') ?></a>:
+ <h1><a href="#" onclick="viewfeed(-4)"><?php echo __('headlines') ?></a>:
<span id="headlines-title"></span></h1>
<ul id="headlines-content"> </ul>
<a href="http://tt-rss.org/">Tiny Tiny RSS</a>
<?php if (!defined('HIDE_VERSION')) { ?>
- v<?php echo VERSION ?>
+ v<?php echo VERSION ?>
<?php } ?>
- © 2005–<?php echo date('Y') ?>
+ © 2005–<?php echo date('Y') ?>
<a href="http://fakecake.org/">Andrew Dolgov</a>
-
+
<br/>
<a href="tt-rss.php">
+++ /dev/null
-<?php
- require_once "functions.php";
- require_once "sessions.php";
- require_once "sanity_check.php";
- require_once "version.php";
- require_once "config.php";
- require_once "db-prefs.php";
-
- logout_user();
- header("Location: tt-rss.php");
-?>
if (!ENABLE_REGISTRATION) {
print_error(__("New user registrations are administratively disabled."));
- print "<p><form method=\"GET\" action=\"logout.php\">
+ print "<p><form method=\"GET\" action=\"backend.php?op=logout\">
<input type=\"submit\" value=\"".__("Return to Tiny Tiny RSS")."\">
</form>";
return;