37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<?php
|
|
|
|
if (!isset($seo[1])) redirect();
|
|
|
|
$blog = new blog($seo[1]);
|
|
|
|
if (theme_component('entry'))
|
|
include theme_component('entry');
|
|
else
|
|
if ($blog->entries)
|
|
while ($data = $blog->entry())
|
|
{
|
|
addTitle($data['entryTitle']);
|
|
|
|
if ($data['entryHidden']) echo "<p>{locale:hidden_content}</p>";
|
|
|
|
if ($data['entryPIN'] && get_pin() != $data['entryPIN'])
|
|
echo "<p>{locale:pin_protected_content}</p>
|
|
<form action='".get_entry_link($data['entrySlug'])."' method='post' name='entry-pin-input'>
|
|
<input type='text' name='read_entry_pin' placeholder='{locale:entry_pin}' />
|
|
<button type='submit'>{locale:unlock}</button>
|
|
</form>";
|
|
else
|
|
{
|
|
addDescription(entry_show_init($data['entryContent'], $data['entrySlug']));
|
|
addImage((preg_match('/< *img[^>]*src *= *["\']?([^"\']*)/i', $data['entryContent'], $images) ? $images[1] : 0));
|
|
headerImage($data['entryHeader']);
|
|
echo "<article class='full'>
|
|
<h2>".htmlspecialchars($data['entryTitle'])."</h2>
|
|
<div class='content'>".entry_show_all($data['entryContent'])."</div>
|
|
<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>".get_entry_admin($data)."</p>
|
|
</article>\n";
|
|
}
|
|
}
|
|
else
|
|
echo "<h1>{locale:entry_not_found_title}</h1>"
|
|
."<p>{locale:entry_not_found}</p>\n"; |