|
|
@ -4752,14 +4752,8 @@
|
|
|
|
post_id = '$id' AND content_url != ''");
|
|
|
|
post_id = '$id' AND content_url != ''");
|
|
|
|
|
|
|
|
|
|
|
|
if (db_num_rows($result) > 0) {
|
|
|
|
if (db_num_rows($result) > 0) {
|
|
|
|
print "<div class=\"postEnclosures\">";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (db_num_rows($result) == 1) {
|
|
|
|
|
|
|
|
print __("Attachment:") . " ";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
print __("Attachments:") . " ";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$entries_html = array();
|
|
|
|
$entries = array();
|
|
|
|
$entries = array();
|
|
|
|
|
|
|
|
|
|
|
|
while ($line = db_fetch_assoc($result)) {
|
|
|
|
while ($line = db_fetch_assoc($result)) {
|
|
|
@ -4783,10 +4777,43 @@
|
|
|
|
$entry .= "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" .
|
|
|
|
$entry .= "<a target=\"_blank\" href=\"" . htmlspecialchars($url) . "\">" .
|
|
|
|
$filename . " (" . $ctype . ")" . "</a>";
|
|
|
|
$filename . " (" . $ctype . ")" . "</a>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
array_push($entries_html, $entry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$entry = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$entry["type"] = $ctype;
|
|
|
|
|
|
|
|
$entry["filename"] = $filename;
|
|
|
|
|
|
|
|
$entry["url"] = $url;
|
|
|
|
|
|
|
|
|
|
|
|
array_push($entries, $entry);
|
|
|
|
array_push($entries, $entry);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print join(", ", $entries);
|
|
|
|
if (!preg_match("/img/i", $line["content"]) &&
|
|
|
|
|
|
|
|
preg_match("/image/", $entries[0]["type"])) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "<div class=\"postEnclosures\">";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!preg_match("/img/i", $line["content"])) {
|
|
|
|
|
|
|
|
foreach ($entries as $entry) {
|
|
|
|
|
|
|
|
if (preg_match("/image/", $entry["type"])) {
|
|
|
|
|
|
|
|
print "<p><img
|
|
|
|
|
|
|
|
alt=\"".htmlspecialchars($entry["filename"])."\"
|
|
|
|
|
|
|
|
src=\"" .htmlspecialchars($entry["url"]) . "\"></p>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print "<div class=\"postEnclosures\">";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (db_num_rows($result) == 1) {
|
|
|
|
|
|
|
|
print __("Attachment:") . " ";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
print __("Attachments:") . " ";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print join(", ", $entries_html);
|
|
|
|
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
print "</div>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|