|
@@ -12,11 +12,16 @@ if(!defined('entry')) define('entry',true);
|
12
|
12
|
=========================== */
|
13
|
13
|
?>
|
14
|
14
|
<?php
|
15
|
|
- header("Content-type: text/xml; charset=utf-8");
|
16
|
|
-
|
|
15
|
+ header("Content-type: text/xml; charset=utf-8");
|
17
|
16
|
$isFeed = true;
|
18
|
|
- $tumble = new gelato();
|
|
17
|
+
|
|
18
|
+ require(dirname(__FILE__)."/config.php");
|
|
19
|
+
|
|
20
|
+ include("classes/configuration.class.php");
|
19
|
21
|
$conf = new configuration();
|
|
22
|
+
|
|
23
|
+ include("classes/gelato.class.php");
|
|
24
|
+ $tumble = new gelato();
|
20
|
25
|
|
21
|
26
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
22
|
27
|
?>
|
|
@@ -61,14 +66,14 @@ if(!defined('entry')) define('entry',true);
|
61
|
66
|
<posts start="<?php echo $start; ?>" total="<?php echo $total; ?>">
|
62
|
67
|
<?php
|
63
|
68
|
while($register = mysql_fetch_array($rs)) {
|
64
|
|
- $desc = $register["description"];
|
|
69
|
+ $desc = htmlspecialchars($register["description"]);
|
65
|
70
|
$url = $conf->urlGelato."/index.php?post=".$register["id_post"];
|
66
|
71
|
$formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
|
67
|
72
|
|
68
|
73
|
switch ($register["type"]) {
|
69
|
74
|
case "1":
|
70
|
75
|
|
71
|
|
- $tit = ($register["title"]=="") ? $register["description"] : $register["title"];
|
|
76
|
+ $tit = ($register["title"]=="") ? $desc : $register["title"];
|
72
|
77
|
?>
|
73
|
78
|
|
74
|
79
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="regular" date="<?php echo $formatedDate;?>">
|
|
@@ -78,7 +83,7 @@ if(!defined('entry')) define('entry',true);
|
78
|
83
|
<?php
|
79
|
84
|
break;
|
80
|
85
|
case "2":
|
81
|
|
- $tit = ($register["description"]=="") ? "Photo" : $register["description"];
|
|
86
|
+ $tit = ($register["description"]=="") ? "Photo" : $desc;
|
82
|
87
|
?>
|
83
|
88
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="photo" date="<?php echo $formatedDate;?>">
|
84
|
89
|
<?php
|
|
@@ -107,28 +112,41 @@ if(!defined('entry')) define('entry',true);
|
107
|
112
|
<?php
|
108
|
113
|
break;
|
109
|
114
|
case "5":
|
110
|
|
- $lines = explode("\n", $register["description"]);
|
|
115
|
+ $lines = explode("\n", $desc);
|
111
|
116
|
$line = $lines[0];
|
112
|
117
|
$tit = ($register["title"]=="") ? $line : $register["title"];
|
113
|
|
- $desc = $tumble->formatConversation($register["description"]);
|
|
118
|
+ $desc = $tumble->formatConversation($desc);
|
114
|
119
|
?>
|
115
|
120
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="conversation" date="<?php echo $formatedDate;?>">
|
116
|
121
|
<conversation-title><?php echo $tit; ?></conversation-title>
|
117
|
|
- <conversation-text><?php echo $register["description"]; ?></conversation-text>
|
118
|
|
- <?php echo $tumble->formatApiConversation($register["description"]); ?>
|
|
122
|
+ <conversation-text><?php echo $desc; ?></conversation-text>
|
|
123
|
+ <?php echo $tumble->formatApiConversation($desc); ?>
|
119
|
124
|
</post>
|
120
|
125
|
<?php
|
121
|
126
|
break;
|
122
|
|
-/*
|
123
|
127
|
case "6":
|
124
|
|
- $tit = ($register["description"]=="") ? "Video" : $register["description"];
|
|
128
|
+ $tit = ($register["description"]=="") ? "Video" : $desc;
|
125
|
129
|
$desc = $tumble->getVideoPlayer($register["url"]);
|
|
130
|
+?>
|
|
131
|
+ <post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="video" date="<?php echo $formatedDate;?>">
|
|
132
|
+ <video-caption><?php echo $tit; ?></video-caption>
|
|
133
|
+ <video-source><?php echo $register["url"]; ?></video-source>
|
|
134
|
+ <video-player><?php echo htmlspecialchars($desc); ?></video-player>
|
|
135
|
+ </post>
|
|
136
|
+<?php
|
126
|
137
|
break;
|
|
138
|
+
|
127
|
139
|
case "7":
|
128
|
|
- $tit = ($register["description"]=="") ? "MP3" : $register["description"];
|
|
140
|
+ $tit = ($register["description"]=="") ? "Audio" : $desc;
|
129
|
141
|
$desc = $tumble->getMp3Player($register["url"]);
|
|
142
|
+?>
|
|
143
|
+ <post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="audio" date="<?php echo $formatedDate;?>">
|
|
144
|
+ <audio-caption><?php echo $tit; ?></audio-caption>
|
|
145
|
+ <audio-player><?php echo htmlspecialchars($desc); ?></audio-player>
|
|
146
|
+ </post>
|
|
147
|
+<?php
|
130
|
148
|
break;
|
131
|
|
-*/
|
|
149
|
+
|
132
|
150
|
}
|
133
|
151
|
$url = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
134
|
152
|
$formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
|