diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-17 22:08:50 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-17 22:08:50 +0200 |
commit | 3e400c3df5572524b7ba08b030f45eb3ba6b7734 (patch) | |
tree | c7fd7a5d391649c7905ee685cfa7fe7b4498cf1b /t | |
parent | 361bb55f01ba28960a8127b0a16c1e7a7a8de61a (diff) | |
download | cforum-3e400c3df5572524b7ba08b030f45eb3ba6b7734.tar.gz |
Add database helper functions
Diffstat (limited to 't')
-rw-r--r-- | t/post.t | 8 | ||||
-rw-r--r-- | t/post.tc | 14 |
2 files changed, 20 insertions, 2 deletions
@@ -1 +1,7 @@ -<h1>Post <% printf("%d", id); %></h1> +<h1>Post <% printf("%d", id); %>: <%= post->subject %></h1> +<p>From: <%= user->full %> +<<a href="?user=<% printf("%d", user->id); %>"><%= user->name %></a>> +<br>Date: <% PFREE(date(post->created)); %> +<pre> +<%= post->text %> +</pre>
\ No newline at end of file @@ -1,3 +1,15 @@ printf("<h1>Post "); printf("%d", id); -printf("</h1>\n"); +printf(": "); +printf("%s", post->subject ); +printf("</h1>\n<p>From: "); +printf("%s", user->full ); +printf("\n<<a href=\"?user="); +printf("%d", user->id); +printf("\">"); +printf("%s", user->name ); +printf("</a>>\n<br>Date: "); +PFREE(date(post->created)); +printf("\n<pre>\n"); +printf("%s", post->text ); +printf("\n</pre>"); |