Files
ystavakylaecard/application/views/_partial_cardlist.php
Ismo Vuorinen fe84af8649 - Creating cards now works. We use Open Sans to make texts beautiful
- Added card counts to default controller
- Load images from our basecards folder in assets
- Administration now includes card counts
- Other misc improvements
2013-07-16 19:02:40 +03:00

43 lines
1.0 KiB
PHP

<div class="large-12 columns">
<div class="panel">
<ul class="small-block-grid-2 large-block-grid-5">
<?php
$t_start = "1302000000";
$t_end = time();
if (empty($amount)) {
$amount = 5;
}
echo "\n";
$cards = $this->ecard
->order_by('created_at', 'DESC')
->limit($amount)
->get_many_by('card_status', 'public');
foreach ($cards as $card) {
$url = site_url('/ecards/' . $card->hash);
$img = site_url('assets/cards/' . $card->hash . '.png');
$time = date("d.m.Y \k\l\o H.i", strtotime($card->created_at));
$url = '<a href="'.$url.'" title="'.$time.'">';
$img = '<img src="'.$img.'" alt="'.$time.'">';
?>
<li class="image-panel">
<?php echo $url."\n"; ?>
<?php echo $img; ?>
<em><?php echo $time; ?></em>
</a>
</li>
<?php
echo "\n";
}
?>
</ul>
</div>
</div>