|
@@ -59,16 +59,16 @@ if(!defined('entry')) define('entry',true);
|
59
|
59
|
<posts start="<?php echo $start; ?>" total="<?php echo $total; ?>">
|
60
|
60
|
<?php
|
61
|
61
|
while($register = mysql_fetch_array($rs)) {
|
62
|
|
- $desc = htmlspecialchars($register["description"]);
|
63
|
|
- $url = $conf->urlGelato."/index.php?post=".$register["id_post"];
|
64
|
|
- $formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
|
|
62
|
+ $desc = trimString($register["description"]);
|
|
63
|
+ $strEnd = ($conf->urlFriendly) ? "/" : "";
|
|
64
|
+ $url = $conf->urlGelato.($conf->urlFriendly ? "/post/" : "/index.php?post=").$register["id_post"].$strEnd;
|
|
65
|
+ $formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"]) + transform_offset($conf->offsetTime));
|
65
|
66
|
|
66
|
67
|
switch ($register["type"]) {
|
67
|
68
|
case "1":
|
68
|
69
|
|
69
|
|
- $tit = ($register["title"]=="") ? $desc : $register["title"];
|
70
|
|
-?>
|
71
|
|
-
|
|
70
|
+ $tit = (empty($register["title"])) ? $desc : strip_tags($register["title"]);
|
|
71
|
+?>
|
72
|
72
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="regular" date="<?php echo $formatedDate;?>">
|
73
|
73
|
<regular-title><?php echo $tit;?></regular-title>
|
74
|
74
|
<regular-body><?php echo $desc;?></regular-body>
|
|
@@ -76,7 +76,7 @@ if(!defined('entry')) define('entry',true);
|
76
|
76
|
<?php
|
77
|
77
|
break;
|
78
|
78
|
case "2":
|
79
|
|
- $tit = ($register["description"]=="") ? "Photo" : $desc;
|
|
79
|
+ $tit = (empty($register["description"])) ? "Photo" : $desc;
|
80
|
80
|
?>
|
81
|
81
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="photo" date="<?php echo $formatedDate;?>">
|
82
|
82
|
<?php
|
|
@@ -91,12 +91,12 @@ if(!defined('entry')) define('entry',true);
|
91
|
91
|
?>
|
92
|
92
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="quote" date="<?php echo $formatedDate;?>">
|
93
|
93
|
<quote-text><?php echo $desc; ?></quote-text>
|
94
|
|
- <quote-source><?php echo $register["title"]; ?></quote-source>
|
|
94
|
+ <quote-source><?php echo strip_tags($register["title"]); ?></quote-source>
|
95
|
95
|
</post>
|
96
|
96
|
<?php
|
97
|
97
|
break;
|
98
|
98
|
case "4":
|
99
|
|
- $tit = ($register["title"]=="") ? $register["url"] : $register["title"];
|
|
99
|
+ $tit = (empty($register["title"])) ? $register["url"] : strip_tags($register["title"]);
|
100
|
100
|
?>
|
101
|
101
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="link" date="<?php echo $formatedDate;?>">
|
102
|
102
|
<link-text><?php echo $tit; ?></link-text>
|
|
@@ -107,7 +107,7 @@ if(!defined('entry')) define('entry',true);
|
107
|
107
|
case "5":
|
108
|
108
|
$lines = explode("\n", $desc);
|
109
|
109
|
$line = $lines[0];
|
110
|
|
- $tit = ($register["title"]=="") ? $line : $register["title"];
|
|
110
|
+ $tit = (empty($register["title"])) ? trimString($line) : $register["title"];
|
111
|
111
|
$desc = $tumble->formatConversation($desc);
|
112
|
112
|
?>
|
113
|
113
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="conversation" date="<?php echo $formatedDate;?>">
|
|
@@ -118,7 +118,7 @@ if(!defined('entry')) define('entry',true);
|
118
|
118
|
<?php
|
119
|
119
|
break;
|
120
|
120
|
case "6":
|
121
|
|
- $tit = ($register["description"]=="") ? "Video" : $desc;
|
|
121
|
+ $tit = (empty($register["description"])) ? "Video" : $desc;
|
122
|
122
|
$desc = $tumble->getVideoPlayer($register["url"]);
|
123
|
123
|
?>
|
124
|
124
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="video" date="<?php echo $formatedDate;?>">
|
|
@@ -130,7 +130,7 @@ if(!defined('entry')) define('entry',true);
|
130
|
130
|
break;
|
131
|
131
|
|
132
|
132
|
case "7":
|
133
|
|
- $tit = ($register["description"]=="") ? "Audio" : $desc;
|
|
133
|
+ $tit = (empty($register["description"])) ? "Audio" : $desc;
|
134
|
134
|
$desc = $tumble->getMp3Player($register["url"]);
|
135
|
135
|
?>
|
136
|
136
|
<post id="<?php echo $register["id_post"]; ?>" url="<?php echo $url;?>" type="audio" date="<?php echo $formatedDate;?>">
|
|
@@ -140,11 +140,8 @@ if(!defined('entry')) define('entry',true);
|
140
|
140
|
<?php
|
141
|
141
|
break;
|
142
|
142
|
|
143
|
|
- }
|
144
|
|
- $url = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
145
|
|
- $formatedDate = gmdate("D, d M Y H:i:s", strtotime($register["date"])+transform_offset($conf->offsetTime));
|
146
|
|
- }
|
147
|
|
-
|
|
143
|
+ }
|
|
144
|
+ }
|
148
|
145
|
?>
|
149
|
146
|
</posts>
|
150
|
147
|
<?php
|