commit
ac74c00540
@ -1,9 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY'))
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
die('Hacking attempt');
|
|
||||||
|
// Include markdown library
|
||||||
|
use \Michelf\Markdown;
|
||||||
|
|
||||||
|
// Fetch active news to display
|
||||||
|
$aNews = $news->getAllActive();
|
||||||
|
foreach ($aNews as $key => $aData) {
|
||||||
|
// Transform Markdown content to HTML
|
||||||
|
$aNews[$key]['content'] = Markdown::defaultTransform($aData['content']);
|
||||||
|
}
|
||||||
|
|
||||||
// Tempalte specifics
|
// Tempalte specifics
|
||||||
|
$smarty->assign("NEWS", $aNews);
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// Make sure we are called from index.php
|
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
|
||||||
|
|
||||||
// Include markdown library
|
|
||||||
use \Michelf\Markdown;
|
|
||||||
|
|
||||||
// Fetch active news to display
|
|
||||||
$aNews = $news->getAllActive();
|
|
||||||
foreach ($aNews as $key => $aData) {
|
|
||||||
// Transform Markdown content to HTML
|
|
||||||
$aNews[$key]['content'] = Markdown::defaultTransform($aData['content']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tempalte specifics
|
|
||||||
$smarty->assign("NEWS", $aNews);
|
|
||||||
$smarty->assign("CONTENT", "default.tpl");
|
|
||||||
?>
|
|
||||||
@ -15,7 +15,6 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=admin&action=user">User Info</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=admin&action=user">User Info</a></li>
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=admin&action=wallet">Wallet Info</a></li>
|
<li><a href="{$smarty.server.PHP_SELF}?page=admin&action=wallet">Wallet Info</a></li>
|
||||||
<li><a href="{$smarty.server.PHP_SELF}?page=admin&action=news">News Posts</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
{include file="global/block_header.tpl" BLOCK_HEADER="ThePool Collective"}
|
{section name=news loop=$NEWS}
|
||||||
<p>Please head over to our <a href="{$smarty.server.PHP_SELF}?page=about&action=pool">pool page</a> for more details.
|
{include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"}
|
||||||
{include file="global/block_footer.tpl"}
|
{$NEWS[news].content}
|
||||||
|
{include file="global/block_footer.tpl"}
|
||||||
|
{/section}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
{section name=news loop=$NEWS}
|
|
||||||
{include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"}
|
|
||||||
{$NEWS[news].content}
|
|
||||||
{include file="global/block_footer.tpl"}
|
|
||||||
{/section}
|
|
||||||
Loading…
Reference in New Issue
Block a user