From 7fac0f20beffe1a1b99351893add73d5eef33f2c Mon Sep 17 00:00:00 2001 From: piernov Date: Thu, 7 Mar 2013 00:08:36 +0100 Subject: Importation initiale du projet --- comments.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 comments.rb (limited to 'comments.rb') diff --git a/comments.rb b/comments.rb new file mode 100755 index 0000000..e58d681 --- /dev/null +++ b/comments.rb @@ -0,0 +1,36 @@ +# encoding: utf-8 +def comments_tpe(cgi,id,page,div_width) + html = < +
+

Commentaires

+
+HTML_TPE + $db.execute("SELECT auteur, texte, DATE_FORMAT(date, '%W %e %M %Y à %k:%i') as date FROM commentaires WHERE id_page=#{id}").each { |row| + html = html + < + #{row["texte"]} +
De #{row["auteur"]} le #{row["date"]}
+ +HTML_TPE + } + html.force_encoding('utf-8') + page.force_encoding('utf-8') + html = html +< +

+ :
+ :
+ :
+

+

+
+ +

+ + + +HTML_TPE + return html +end -- cgit v1.2.3-54-g00ecf