diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-18 10:37:45 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-18 10:37:45 +0200 |
commit | ae9b583b9575679f129680a0f56163fdb6590052 (patch) | |
tree | 75feb531a4a3cad7ba6ce1de217f1c658531da39 /t | |
parent | f8ef7e4a7c538bf392237c6c29caa9dedca6e29e (diff) | |
download | cforum-ae9b583b9575679f129680a0f56163fdb6590052.tar.gz |
Clean up
Diffstat (limited to 't')
-rw-r--r-- | t/err.tc | 7 | ||||
-rw-r--r-- | t/foot.tc | 1 | ||||
-rw-r--r-- | t/front.tc | 22 | ||||
-rw-r--r-- | t/head.tc | 3 | ||||
-rw-r--r-- | t/post.tc | 54 | ||||
-rw-r--r-- | t/user.tc | 7 |
6 files changed, 0 insertions, 94 deletions
diff --git a/t/err.tc b/t/err.tc deleted file mode 100644 index c066a5a..0000000 --- a/t/err.tc +++ /dev/null @@ -1,7 +0,0 @@ -#include "head.tc" -printf("\n<h1>"); -printf("%s", title ); -printf("</h1>\n<p>"); -printf("%s", err ); -printf("</p>\n"); -#include "foot.tc" diff --git a/t/foot.tc b/t/foot.tc deleted file mode 100644 index 927824c..0000000 --- a/t/foot.tc +++ /dev/null @@ -1 +0,0 @@ -printf("</body>\n</html>"); diff --git a/t/front.tc b/t/front.tc deleted file mode 100644 index 4ee561a..0000000 --- a/t/front.tc +++ /dev/null @@ -1,22 +0,0 @@ -#include "head.tc" -printf("\n<h1>"); -printf("%s", site.name ); -printf("</h1>\n<h3>Latest posts</h3>\n<table border=\"1\">\n "); - while(post = getpost(stmt, 0)){ - user = getuser(byid("users", post->user), 1); - -printf("\n <tr>\n <td><a href=\"?post="); -printf("%d", post->id); -printf("\">"); -printf("%s", post->subject ); -printf("</a></td>\n <td><a href=\"?user="); -printf("%d", post->user); -printf("\">"); -printf("%s", user->name ); -printf("</a></td>\n <td>"); -printdate(post->created); -printf("</td>\n </tr>\n "); - } - -printf("\n</table>\n"); -#include "foot.tc" diff --git a/t/head.tc b/t/head.tc deleted file mode 100644 index c19b483..0000000 --- a/t/head.tc +++ /dev/null @@ -1,3 +0,0 @@ -printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">\n<title>"); -printf("%s", title ); -printf("</title>\n</head>\n<body>"); diff --git a/t/post.tc b/t/post.tc deleted file mode 100644 index 4453246..0000000 --- a/t/post.tc +++ /dev/null @@ -1,54 +0,0 @@ -#include "head.tc" -printf("\n<h1>Post "); -printf("%d", id); -printf(": "); -printf("%s", post->subject ); -printf("</h1>\n<p>From: "); -printf("%s", user->full? user->full: "" ); -printf("\n"); -if(user->full) printf("<"); -printf("<a href=\"?user="); -printf("%d", user->id); -printf("\">"); -printf("%s", user->name ); -printf("</a>"); -if(user->full) printf(">"); -printf("\n<br>Date: "); -printdate(post->created); -printf("\n"); -if(post->edited){ - printf("<br>Edited: "); - printdate(post->edited); -} -printf("\n"); -if(post->parent){ -printf("\n<br>In Reply To: <a href=\"?post="); -printf("%d", post->parent); -printf("\">"); -printf("%d", post->parent); -printf("</a>\n"); -} -printf("\n<pre>\n"); -printf("%s", post->text ); -printf("\n</pre>\n"); -if(attachment = getattachment(stmt, 0)){ - -printf("\n<h3>Attachments</h3>\n<table border=\"1\">\n "); - do{ - -printf("\n <tr>\n <td><a href=\"?attachment="); -printf("%d", attachment->id); -printf("\">"); -printf("%s", attachment->name ); -printf("</a></td>\n <td>"); -printf("%s", attachment->mime ); -printf("</td>\n <td>"); -printf("%s", attachment->description ); -printf("</td>\n </tr>\n "); - }while(attachment = getattachment(stmt, 0)); - -printf("\n</table>\n"); -} - -printf("\n"); -#include "foot.tc" diff --git a/t/user.tc b/t/user.tc deleted file mode 100644 index 3527acb..0000000 --- a/t/user.tc +++ /dev/null @@ -1,7 +0,0 @@ -#include "head.tc" -printf("\n<h1>User "); -printf("%d", id); -printf(": "); -printf("%s", user->name ); -printf("</h1>\n"); -#include "foot.tc" |