Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{capture assign='title'}Weblogs added in {$display_month}{/capture} | ||
{include file='inc_head.txt'} | ||
|
||
{if $blogs|@count} | ||
|
||
<div class="section"> | ||
{if $blogs|@count>1} | ||
<h1>All {$blogs|@count} Weblogs added in {$display_month}</h1> | ||
{else} | ||
<h1>Weblogs added in {$display_month}</h1> | ||
{/if} | ||
|
||
<p><a href="/weblogs/">« Back to the weblog month archive</a>.</p> | ||
</div> | ||
|
||
<div class="col"> | ||
<div class="section"> | ||
{include file='inc_weblogs.txt' weblogs=$blogs|@slice:2:1} | ||
</div> | ||
</div> | ||
|
||
<div class="col"> | ||
<div class="section"> | ||
{include file='inc_weblogs.txt' weblogs=$blogs|@slice:2:2} | ||
</div> | ||
</div> | ||
|
||
<div style="clear: both"></div> | ||
|
||
<div class="section"> | ||
<p><a href="/weblogs/">« Back to the weblog month archive</a>.</p> | ||
</div> | ||
|
||
{else} | ||
<div class="section"> | ||
<h1>Weblogs added in {$display_month}</h1> | ||
|
||
{if $is_future} | ||
<p>There are no weblogs from the future. Yet.</p> | ||
{else} | ||
<p>There were no weblogs added in {$display_month}.</p> | ||
{/if} | ||
|
||
<p><a href="/weblogs/">« Back to the weblog month archive</a>.</p> | ||
</div> | ||
{/if} | ||
|
||
|
||
{include file='inc_foot.txt'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<? | ||
include("include/init.php"); | ||
|
||
loadlib('blogs'); | ||
|
||
|
||
# | ||
# get blogs | ||
# | ||
|
||
$y = intval($_GET['y']); | ||
$m = intval($_GET['m']); | ||
|
||
if ($m < 1 || $m > 12) error_404(); | ||
|
||
if ($y < 2000 || $y > 2038) error_404(); | ||
|
||
$ts = mktime(0,0,0,$m,1,$y); | ||
|
||
$smarty->assign('display_month', date('F Y', $ts)); | ||
$smarty->assign('is_future', $ts > time()); | ||
|
||
$d = sprintf('%04d-%02d-01', $y, $m); | ||
|
||
$ret = db_fetch("SELECT * FROM tube_weblogs WHERE month_create='$d' ORDER BY blog_name ASC"); | ||
|
||
$smarty->assign_by_ref('blogs', $ret['rows']); | ||
|
||
|
||
# | ||
# output | ||
# | ||
|
||
$smarty->display('page_weblogs_month.txt'); | ||
?> |