ttrss/mobile/tt-rss.php

72 lines
1.4 KiB
PHP
Raw Normal View History

2006-03-24 10:00:57 +00:00
<?
require_once "../functions.php";
2006-03-27 02:46:22 +00:00
require_once "functions.php";
2006-03-24 10:00:57 +00:00
basic_nosid_redirect_check();
require_once "../sessions.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);
2006-03-27 02:46:22 +00:00
login_sequence($link);
/* perform various redirect-needing subops */
$subop = db_escape_string($_GET["subop"]);
$go = $_GET["go"];
if ($subop == "tc" && !$go) {
$cat_id = db_escape_string($_GET["id"]);
if ($cat_id != 0) {
db_query($link, "UPDATE ttrss_feed_categories SET
collapsed = NOT collapsed WHERE id = '$cat_id' AND owner_uid = " .
$_SESSION["uid"]);
2006-03-27 04:37:06 +00:00
} else {
if ($_COOKIE["ttrss_vf_uclps"] != 1) {
setcookie("ttrss_vf_uclps", 1);
} else {
setcookie("ttrss_vf_uclps", 0);
}
}
2006-03-27 04:37:06 +00:00
header("Location: tt-rss.php");
return;
}
2006-03-24 10:00:57 +00:00
?>
<html>
<head>
<title>Tiny Tiny RSS - Mobile</title>
<link rel="stylesheet" type="text/css" href="mobile.css">
2006-03-27 03:44:43 +00:00
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2006-03-24 10:00:57 +00:00
</head>
<body>
2006-03-27 03:10:46 +00:00
<div id="content">
2006-03-27 02:46:22 +00:00
<?
if (!$go) {
2006-03-27 02:46:22 +00:00
render_feeds_list($link);
2006-03-27 03:44:43 +00:00
} else if ($go == "vf") {
render_headlines($link);
} else if ($go == "view") {
render_article($link);
2006-03-27 03:10:46 +00:00
} else {
print "Function not implemented";
2006-03-27 02:46:22 +00:00
}
?>
2006-03-27 03:10:46 +00:00
</div>
<div id="footer">
<a href="http://tt-rss.spb.ru/">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005-2006 Andrew Dolgov
</div>
2006-03-27 02:46:22 +00:00
2006-03-24 10:00:57 +00:00
</body>
</html>