|
@@ -15,13 +15,9 @@ if(!defined('entry')) define('entry',true);
|
15
|
15
|
header("Content-type: text/xml; charset=utf-8");
|
16
|
16
|
$isFeed = true;
|
17
|
17
|
|
18
|
|
- require(dirname(__FILE__)."/config.php");
|
19
|
|
-
|
20
|
|
- include("classes/configuration.class.php");
|
21
|
|
- $conf = new configuration();
|
22
|
|
-
|
23
|
|
- include("classes/gelato.class.php");
|
24
|
|
- $tumble = new gelato();
|
|
18
|
+ require('entry.php');
|
|
19
|
+ global $user, $conf, $tumble;
|
|
20
|
+ $f = new feeds();
|
25
|
21
|
|
26
|
22
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
27
|
23
|
?>
|
|
@@ -34,31 +30,25 @@ if(!defined('entry')) define('entry',true);
|
34
|
30
|
if (isset($_GET["type"])) { $hasType = true; } else { $hasType = false; }
|
35
|
31
|
if ($total > 50) { $total = 50; }
|
36
|
32
|
?>
|
37
|
|
- <tumblelog name="<?php echo $_SESSION["user_login"];?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>"><?php echo $conf->description;?></tumblelog>
|
|
33
|
+ <tumblelog name="<?php echo $_SESSION["user_login"];?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>"><?php
|
|
34
|
+ echo "\n\t".$conf->description."\n";
|
|
35
|
+?>
|
|
36
|
+ <feeds>
|
|
37
|
+<?php
|
|
38
|
+ $actual_feeds = $f->getFeedList();
|
|
39
|
+ foreach($actual_feeds as $feed){
|
|
40
|
+ $error_text = ($feed["error"]>0) ? "false" : "true";
|
|
41
|
+?>
|
|
42
|
+ <feed id="<?php echo $feed["id_feed"];?>" url="<?php echo htmlspecialchars($feed["url"]);?>" import-type="<?php echo type2Text($feed["type"]);?>" next-update-in-seconds="<? echo $f->getNextUpdate($feed["id_feed"]);?>" title="<?php echo htmlspecialchars($feed["title"]);?>" error-text="<? echo $error_text;?>"/>
|
|
43
|
+<?php
|
|
44
|
+ }
|
|
45
|
+?>
|
|
46
|
+ </feeds>
|
|
47
|
+ </tumblelog>
|
38
|
48
|
|
39
|
49
|
<?php
|
40
|
|
- switch ($hasType) {
|
41
|
|
- case "post":
|
42
|
|
- $_GET["type"] = "1";
|
43
|
|
- break;
|
44
|
|
- case "photo":
|
45
|
|
- $_GET["type"] = "2";
|
46
|
|
- break;
|
47
|
|
- case "quote":
|
48
|
|
- $_GET["type"] = "3";
|
49
|
|
- break;
|
50
|
|
- case "url":
|
51
|
|
- $_GET["type"] = "4";
|
52
|
|
- break;
|
53
|
|
- case "conversation":
|
54
|
|
- $_GET["type"] = "5";
|
55
|
|
- break;
|
56
|
|
- case "video":
|
57
|
|
- $_GET["type"] = "6";
|
58
|
|
- break;
|
59
|
|
- case "mp3":
|
60
|
|
- $_GET["type"] = "7";
|
61
|
|
- break;
|
|
50
|
+ if ($hasType) {
|
|
51
|
+ $postType = type2Number($_GET["type"]);
|
62
|
52
|
}
|
63
|
53
|
$rs = $tumble->getPosts($total, $start);
|
64
|
54
|
if ($tumble->contarRegistros()>0) {
|