summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-x.htaccess2
-rw-r--r--[-rwxr-xr-x]pages/archive.php48
-rwxr-xr-xpages/season.php34
-rwxr-xr-xstyle.css5
4 files changed, 82 insertions, 7 deletions
diff --git a/.htaccess b/.htaccess index 84bfa5b..317cda7 100755 --- a/.htaccess +++ b/.htaccess
@@ -10,4 +10,6 @@ RewriteRule images/ / [R]
10RewriteCond %{REQUEST_FILENAME} .png 10RewriteCond %{REQUEST_FILENAME} .png
11RewriteRule images/comics/(.+).png /comic.php?id=$1 [L] 11RewriteRule images/comics/(.+).png /comic.php?id=$1 [L]
12RewriteCond %{REQUEST_FILENAME} .htm 12RewriteCond %{REQUEST_FILENAME} .htm
13RewriteRule season(.+).htm /index.php?area=season&season=$1 [QSA,L]
14RewriteCond %{REQUEST_FILENAME} .htm
13RewriteRule (.+).htm /index.php?area=$1 [QSA,L] 15RewriteRule (.+).htm /index.php?area=$1 [QSA,L]
diff --git a/pages/archive.php b/pages/archive.php index c1cd8ab..85a73d5 100755..100644 --- a/pages/archive.php +++ b/pages/archive.php
@@ -1,14 +1,48 @@
1 <H1>Archive</H1> 1 <H1>Archives</H1>
2
3 <TABLE ID="seasons">
4 <TR>
5 <TH>Season</TH>
6 <TH>First Comic</TH>
7 <TH>Last Comic</TH>
8 <TH>Comics</TH>
9 </TR>
2 10
3 <UL ID="archive">
4<?php 11<?php
5 12
6$getcomics = "SELECT * FROM comics WHERE status = \"publish\" ORDER BY comic_id ASC"; 13$getseasons = "SELECT * FROM seasons ORDER BY season_id ASC";
7$getcomics2 = mysql_query($getcomics); 14$getseasons2 = mysql_query($getseasons);
8while ($getcomics3 = mysql_fetch_array($getcomics2)) 15while ($getseasons3 = mysql_fetch_array($getseasons2))
9{ 16{
10?> <LI><A HREF="/comic<?php echo($getcomics3['comic_id']); ?>.htm"><?php echo($getcomics3['title']); ?></A></LI> 17 $getfc = "SELECT * FROM comics WHERE comic_id = " . $getseasons3['first_comic_id'];
18 $getfc2 = mysql_query($getfc);
19 $getfc3 = mysql_fetch_array($getfc2);
20
21 if (!is_null($getseasons3['last_comic_id']))
22 {
23 $getlc = "SELECT * FROM comics WHERE comic_id = " . $getseasons3['last_comic_id'];
24 $getlc2 = mysql_query($getlc);
25 $getlc3 = mysql_fetch_array($getlc2);
26
27 $count = $getseasons3['last_comic_id'] - ($getseasons3['first_comic_id']-1);
28 } else {
29 $getcnt = "SELECT COUNT(*) FROM comics WHERE comic_id >= " . $getseasons3['first_comic_id'];
30 $getcnt2 = mysql_query($getcnt);
31 $getcnt3 = mysql_fetch_array($getcnt2);
32
33 $count = $getcnt3[0];
34 }
35
36?>
37 <TR>
38 <TD><A HREF="/season<?php echo($getseasons3['season_id']); ?>.htm">1</A></TD>
39 <TD><A HREF="/comic<?php echo($getfc3['comic_id']); ?>.htm"><?php echo($getfc3['title']); ?></A><BR />(<?php echo(date('F j Y',strtotime(get_meta($getfc3['id'], 'pubDate')))); ?>)</TD>
40 <TD><?php if (!is_null($getseasons3['last_comic_id'])) { ?><A HREF="/comic<?php echo($getlc3['comic_id']); ?>.htm"><?php echo($getlc3['title']); ?></A><BR />(<?php echo(date('F j Y',strtotime(get_meta($getlc3['id'], 'pubDate')))); ?>)<?php } else { ?><EM>N/A</EM><?php } ?></TD>
41 <TD><?php echo($count); ?></TD>
42 </TR>
11<?php 43<?php
44
12} 45}
13 46
14?> </UL> 47?>
48 </TABLE>
diff --git a/pages/season.php b/pages/season.php new file mode 100755 index 0000000..6b45a27 --- /dev/null +++ b/pages/season.php
@@ -0,0 +1,34 @@
1<?php
2
3if (is_numeric($_GET['season']))
4{
5 $getseason = "SELECT * FROM seasons WHERE season_id = " . $_GET['season'];
6 $getseason2 = mysql_query($getseason);
7 $getseason3 = mysql_fetch_array($getseason2);
8}
9
10if (isset($getseason3) && ($getseason3['season_id'] == $_GET['season']))
11{
12
13?>
14 <H1>Archive for Season <?php echo($_GET['season']); ?></H1>
15
16 <UL ID="archive">
17<?php
18
19$getcomics = "SELECT * FROM comics WHERE status = \"publish\" AND comic_id >= " . $getseason3['first_comic_id'] . " AND comic_id <= " . $getseason3['last_comic_id'] . " ORDER BY comic_id ASC";
20$getcomics2 = mysql_query($getcomics);
21while ($getcomics3 = mysql_fetch_array($getcomics2))
22{
23?> <LI><A HREF="/comic<?php echo($getcomics3['comic_id']); ?>.htm"><?php echo($getcomics3['title']); ?></A></LI>
24<?php
25}
26
27?> </UL>
28<?php
29
30} else {
31 include('pages/comic.php');
32}
33
34?>
diff --git a/style.css b/style.css index 0699038..580235b 100755 --- a/style.css +++ b/style.css
@@ -97,3 +97,8 @@ ul#archive {
97a img { 97a img {
98 border: 0; 98 border: 0;
99} 99}
100
101table#seasons {
102 text-align: center;
103 width: 100%;
104}