|
|
@@ -1,212 +1,269 @@
|
|
|
<?php
|
|
|
- $http_host = $_SERVER['HTTP_HOST'];
|
|
|
+ $http_host = $_SERVER["HTTP_HOST"];
|
|
|
include("../functions.php");
|
|
|
$con = startdb();
|
|
|
$proto = getProtocol();
|
|
|
+ $server = "$proto$http_host";
|
|
|
|
|
|
//Language
|
|
|
$lang = selectLanguage();
|
|
|
- include("../lang/lang_" . $lang . ".php");
|
|
|
+ include("../lang/lang_$lang.php");
|
|
|
|
|
|
- $cur_section = $lng['section_blog'];
|
|
|
+ $cur_section = $lng["section_blog"];
|
|
|
|
|
|
// Get current post id. Redirect if inexistent or invisible
|
|
|
- $perm = mysqli_real_escape_string($con, $_GET['perm']);
|
|
|
+ $perm = mysqli_real_escape_string($con, $_GET["perm"]);
|
|
|
$q = mysqli_query($con, "SELECT id, permalink, title_$lang AS title, text_$lang AS text, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, DATE_FORMAT(dtime,'%b %d, %Y T%T') as dtime, comments FROM post WHERE permalink = '$perm' AND visible = 1;");
|
|
|
if (mysqli_num_rows($q) == 0){
|
|
|
- header("Location: $proto$http_host/blog/");
|
|
|
+ header("Location: $server/blog/");
|
|
|
exit(-1);
|
|
|
}
|
|
|
$r = mysqli_fetch_array($q);
|
|
|
- $id = $r['id'];
|
|
|
+ $id = $r["id"];
|
|
|
?>
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta content="text/html; charset=windows-1252" http-equiv="content-type"/>
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
|
|
- <title><?php echo $r["title"] . " - Gasteizko Margolariak"; ?></title>
|
|
|
- <link rel="shortcut icon" href="<?php echo "$proto$http_host/img/logo/favicon.ico";?>">
|
|
|
+ <title><?=$r["title"]?> - Gasteizko Margolariak</title>
|
|
|
+ <link rel="shortcut icon" href="<?=$server?>/img/logo/favicon.ico">
|
|
|
<!-- CSS files -->
|
|
|
<style>
|
|
|
- <?php
|
|
|
- include("../css/ui.css");
|
|
|
- include("../css/blog.css");
|
|
|
- ?>
|
|
|
+<?php
|
|
|
+ include("../css/ui.css");
|
|
|
+ include("../css/blog.css");
|
|
|
+?>
|
|
|
</style>
|
|
|
<!-- CSS for mobile version -->
|
|
|
<style media="(max-width : 990px)">
|
|
|
- <?php
|
|
|
- include("../css/m/ui.css");
|
|
|
- include("../css/m/blog.css");
|
|
|
- ?>
|
|
|
+<?php
|
|
|
+ include("../css/m/ui.css");
|
|
|
+ include("../css/m/blog.css");
|
|
|
+?>
|
|
|
</style>
|
|
|
<!-- Script files -->
|
|
|
<script type="text/javascript">
|
|
|
- <?php
|
|
|
- include("../script/ui.js");
|
|
|
- include("../script/blog.js");
|
|
|
- ?>
|
|
|
+<?php
|
|
|
+ include("../script/ui.js");
|
|
|
+ include("../script/blog.js");
|
|
|
+?>
|
|
|
</script>
|
|
|
<!-- Meta tags -->
|
|
|
- <link rel="canonical" href="<?php echo "$proto$http_host/blog/" . $r['permalink']; ?>"/>
|
|
|
- <link rel="author" href="<?php echo "$proto$http_host"; ?>"/>
|
|
|
- <link rel="publisher" href="<?php echo "$proto$http_host"; ?>"/>
|
|
|
- <meta name="description" content="<?php echo strip_tags($r["text"]);?>"/>
|
|
|
- <meta property="og:title" content="<?php echo $r["title"] . " - Gasteizko Margolariak"; ?>"/>
|
|
|
- <meta property="og:url" content="<?php echo "$proto$http_host/blog/" . $r['permalink']; ?>"/>
|
|
|
- <meta property="og:description" content="<?php echo strip_tags($r["text_$lang"]);?>"/>
|
|
|
- <?php
|
|
|
- $q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id ORDER BY idx;");
|
|
|
- if (mysqli_num_rows($q_image) == 0)
|
|
|
- $img = "$proto$http_host/img/logo/cover.png";
|
|
|
- else{
|
|
|
- $r_image = mysqli_fetch_array($q_image);
|
|
|
- $img = "$proto$http_host/img/blog/preview/" . $r_image['image'];
|
|
|
- }
|
|
|
- ?>
|
|
|
- <meta property="og:image" content="<?php echo $img;?>"/>
|
|
|
+ <link rel="canonical" href="<?=$server?>/blog/<?=$r["permalink"]?>"/>
|
|
|
+ <link rel="author" href="<?=$server?>"/>
|
|
|
+ <link rel="publisher" href="<?=$server?>"/>
|
|
|
+ <meta name="description" content="<?=strip_tags($r["text"])?>"/>
|
|
|
+ <meta property="og:title" content="<?=$r["title"]?> - Gasteizko Margolariak"/>
|
|
|
+ <meta property="og:url" content="<?=$server?>/blog/<?=$r["permalink"]?>"/>
|
|
|
+ <meta property="og:description" content="<?=strip_tags($r["text_$lang"])?>"/>
|
|
|
+<?php
|
|
|
+ $q_image = mysqli_query($con, "SELECT image FROM post_image WHERE post = $id ORDER BY idx;");
|
|
|
+ if (mysqli_num_rows($q_image) == 0)
|
|
|
+ $img = "$server/img/logo/cover.png";
|
|
|
+ else{
|
|
|
+ $r_image = mysqli_fetch_array($q_image);
|
|
|
+ $img = "$server/img/blog/preview/" . $r_image["image"];
|
|
|
+ }
|
|
|
+?>
|
|
|
+ <meta property="og:image" content="<?=$img?>"/>
|
|
|
<meta property="og:site_name" content="Gasteizko Margolariak"/>
|
|
|
<meta property="og:type" content="article"/>
|
|
|
- <meta property="og:locale" content="<?php echo $lang;?>"/>
|
|
|
+ <meta property="og:locale" content="<?=$lang?>"/>
|
|
|
<meta property="article:section" content="Blog"/>
|
|
|
- <!-- TODO: Review time format -->
|
|
|
- <meta property="article:published-time" content="<?php echo $r['time'];?>"/>
|
|
|
- <meta property="article:modified-time" content="<?php echo $r['time'];?>"/>
|
|
|
+ <meta property="article:published-time" content="<?=$r["time"]?>"/>
|
|
|
+ <meta property="article:modified-time" content="<?=$r["time"]?>"/>
|
|
|
<meta property="article:author" content="Gasteizko Margolariak"/>
|
|
|
- <?php
|
|
|
- $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post = $id;");
|
|
|
- $tag_string = "vitoria cuadrilla gasteizko margolariak ";
|
|
|
- while ($r_tag = mysqli_fetch_array($q_tag))
|
|
|
- $tag_string = $tag_string . " " . $r_tag['tag']
|
|
|
- ?>
|
|
|
- <meta property="article:tag" content="<?php echo $tag_string ?>"/>
|
|
|
+<?php
|
|
|
+ $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post = $id;");
|
|
|
+ $tag_string = "vitoria cuadrilla gasteizko margolariak ";
|
|
|
+ while ($r_tag = mysqli_fetch_array($q_tag))
|
|
|
+ $tag_string = $tag_string . " " . $r_tag["tag"]
|
|
|
+?>
|
|
|
+ <meta property="article:tag" content="<?=$tag_string?>"/>
|
|
|
<meta name="twitter:card" content="summary"/>
|
|
|
- <meta name="twitter:title" content="<?php echo $r["title"] . " - Gasteizko Margolariak";?>"/>
|
|
|
- <meta name="twitter:description" content="<?php echo strip_tags($r["text"]);?>"/>
|
|
|
- <meta name="twitter:image" content="<?php echo $img;?>"/>
|
|
|
- <meta name="twitter:url" content="<?php echo "$proto$http_host/blog/$r[permalink]"; ?>"/>
|
|
|
+ <meta name="twitter:title" content="<?=$r["title"]?> - Gasteizko Margolariak"/>
|
|
|
+ <meta name="twitter:description" content="<?=strip_tags($r["text_$lang"])?>"/>
|
|
|
+ <meta name="twitter:image" content="<?=$img?>"/>
|
|
|
+ <meta name="twitter:url" content="<?=$server?>/blog/<?=$r["permalink"]?>"/>
|
|
|
<meta name="robots" content="index follow"/>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <?php include("../header.php"); ?>
|
|
|
+<?php
|
|
|
+ include("../header.php");
|
|
|
+?>
|
|
|
<div id="content">
|
|
|
- <?php include("common/leftpanel.php"); ?>
|
|
|
+<?php
|
|
|
+ include("common/leftpanel.php");
|
|
|
+?>
|
|
|
<div id="middle_column">
|
|
|
- <?php
|
|
|
- echo "<div itemscope itemtype='http://schema.org/BlogPosting' class='section blog_entry'>\n";
|
|
|
- echo "<meta itemprop='inLanguage' content='$lang'/>\n";
|
|
|
- echo "<meta itemprop='datePublished dateModified' content='$r[isodate]'/>\n";
|
|
|
- echo "<meta itemprop='headline name' content='$r[title]'/>\n";
|
|
|
- echo "<meta itemprop='mainEntityOfPage' content='$proto$http_host'/>\n";
|
|
|
- echo "<div class='hidden' itemprop='author publisher' itemscope itemtype='http://schema.org/Organization'>\n";
|
|
|
- echo "<meta itemprop='legalName' content='Asociación Cultural Recreativa Gasteizko Margolariak'/>\n";
|
|
|
- echo "<meta itemprop='name' content='Gasteizko Margolariak'/>\n";
|
|
|
- echo "<meta itemprop='logo' content='$proto$http_host/img/logo/logo.png'/>\n";
|
|
|
- echo "<meta itemprop='foundingDate' content='03-02-2013'/>\n";
|
|
|
- echo "<meta itemprop='telephone' content='+34637140371'/>\n";
|
|
|
- echo "<meta itemprop='url' content='$proto$http_host'/>\n";
|
|
|
- echo "</div>\n";
|
|
|
- echo("<h3 class='section_title'>$r[title]</h3>\n");
|
|
|
- echo("<div class='entry'>\n");
|
|
|
+ <div itemscope itemtype='http://schema.org/BlogPosting' class='section blog_entry'>
|
|
|
+ <meta itemprop='inLanguage' content='<?=$lang?>'/>
|
|
|
+ <meta itemprop='datePublished dateModified' content='<?=$r["isodate"]?>'/>
|
|
|
+ <meta itemprop='headline name' content='<?=$r["title"]?>'/>
|
|
|
+ <meta itemprop='mainEntityOfPage' content='<?=$server?>'/>
|
|
|
+ <div class='hidden' itemprop='author publisher' itemscope itemtype='http://schema.org/Organization'>
|
|
|
+ <meta itemprop='legalName' content='Asociación Cultural Recreativa Gasteizko Margolariak'/>
|
|
|
+ <meta itemprop='name' content='Gasteizko Margolariak'/>
|
|
|
+ <meta itemprop='logo' content='<?=$server?>/img/logo/logo.png'/>
|
|
|
+ <meta itemprop='foundingDate' content='03-02-2013'/>
|
|
|
+ <meta itemprop='telephone' content='+34637140371'/>
|
|
|
+ <meta itemprop='url' content='<?=$server?>'/>
|
|
|
+ </div>
|
|
|
+ <h3 class='section_title'><?=$r["title"]?></h3>
|
|
|
+ <div class='entry'>
|
|
|
+<?php
|
|
|
if ($r_image != null){
|
|
|
- echo "<div class='image_container'>\n";
|
|
|
- echo "<meta itemprop='image' content='$proto$http_host/img/blog/$r_image[image]'/>\n";
|
|
|
- echo "<img class='post_image post_image_large' alt='$r[title]' src='/img/blog/preview/$r_image[image]'/>\n";
|
|
|
- echo "</div>\n";
|
|
|
+?>
|
|
|
+ <div class='image_container'>
|
|
|
+ <meta itemprop='image' content='<?=$server?>/img/blog/<?=$r_image["image"]?>'/>
|
|
|
+ <img class='post_image post_image_large' alt='<?=$r["title"]?>' src='/img/blog/preview/<?=$r_image["image"]?>'/>\n";
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
}
|
|
|
- echo "<p itemprop='text articleBody'>$r[text]</p>\n";
|
|
|
+?>
|
|
|
+ <p itemprop='text articleBody'><?=$r["text"]?></p>
|
|
|
+<?php
|
|
|
//Other images
|
|
|
if ($r_image != null){
|
|
|
- echo "<table id='secondary_images'><tr>\n";
|
|
|
- while ($r_image = mysqli_fetch_array($q_image)){
|
|
|
- echo "<meta itemprop='image' content='$proto$http_host/img/blog/$r_image[image]'/>\n";
|
|
|
- echo "<td><img src='/img/blog/preview/$r_image[image]'/></td>\n";
|
|
|
- }
|
|
|
- echo "</tr></table>\n";
|
|
|
- }
|
|
|
- # Tags (if any) and date
|
|
|
- echo "<hr><table class='post_footer'><tr>\n";
|
|
|
- $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post= $id;");
|
|
|
- if (mysqli_num_rows($q_tag) > 0){
|
|
|
- $tag_string = "<span id='tags' class='desktop'>Tags: ";
|
|
|
- $tag_raw = "";
|
|
|
- while ($r_tag = mysqli_fetch_array($q_tag)){
|
|
|
- $tag_string = $tag_string . "<a href='/blog/buscar/tag/$r_tag[tag]'>$r_tag[tag]</a>, ";
|
|
|
- $tag_raw = $tag_raw . "$r_tag[tag],";
|
|
|
- }
|
|
|
- $tag_string = substr($tag_string, 0, strlen($tag_string) - 2);
|
|
|
- $tag_string = $tag_string . "</span>";
|
|
|
- $tag_raw = substr($tag_raw, 0, strlen($tag_raw) - 1);
|
|
|
- echo "<meta itemprop='keywords' content='$tag_raw'/>\n";
|
|
|
- echo "<td><span class='date'>" . formatDate($r['dtime'], $lang) . "</span><br/><br class='mobile'/>$tag_string</td>\n";
|
|
|
- }
|
|
|
- else{
|
|
|
- echo "<td><span class='date'><span class='hidden'>" . formatDate($r['dtime'], $lang) . "</span></td>\n";
|
|
|
+?>
|
|
|
+ <table id='secondary_images'>
|
|
|
+ <tr>
|
|
|
+<?php
|
|
|
+ while ($r_image = mysqli_fetch_array($q_image)){
|
|
|
+?>
|
|
|
+ <meta itemprop='image' content='<?=$server?>/img/blog/<?=$r_image["image"]?>'/>
|
|
|
+ <td>
|
|
|
+ <img src='<?=$server?>/img/blog/preview/<?=$r_image["image"]?>'/>
|
|
|
+ </td>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+<?php
|
|
|
}
|
|
|
- #Share
|
|
|
- echo "<td class='r_share'><span class='share'><span class='desktop'>$lng[blog_share]</span>\n";
|
|
|
- $title = urlencode("$r[title] - $http_host");
|
|
|
- $url_f = htmlspecialchars("https://www.facebook.com/sharer/sharer.php?u=$proto$http_host$_SERVER[REQUEST_URI]");
|
|
|
- $url_t = htmlspecialchars("https://twitter.com/share?url=$proto$http_host$_SERVER[REQUEST_URI]&text=$title");
|
|
|
- $url_g = htmlspecialchars("https://plus.google.com/share?url=$proto$http_host$_SERVER[REQUEST_URI]");
|
|
|
- echo "<a href='$url_f' target='_blank'><img class='share_icon' alt='Facebook' src='$proto$http_host/img/social/facebook.gif'/></a>\n";
|
|
|
- echo "<a href='$url_t' target='_blank'><img class='share_icon' alt='Twitter' src='$proto$http_host/img/social/twitter.gif'/></a>\n";
|
|
|
- echo "<a href='$url_g' target='_blank'><img class='share_icon' src='$proto$http_host/img/social/googleplus.gif' alt='Google+'/></a>\n";
|
|
|
- echo "</span></td>\n";
|
|
|
- echo "</tr></table>\n";
|
|
|
+?>
|
|
|
+ <hr>
|
|
|
+ <table class='post_footer'>
|
|
|
+ <tr>
|
|
|
+<?php
|
|
|
+ # Tags (if any) and date
|
|
|
+ $q_tag = mysqli_query($con, "SELECT tag FROM post_tag WHERE post= $id;");
|
|
|
+ if (mysqli_num_rows($q_tag) > 0){
|
|
|
+ $tag_string = "<span id='tags' class='desktop'>Tags: ";
|
|
|
+ $tag_raw = "";
|
|
|
+ while ($r_tag = mysqli_fetch_array($q_tag)){
|
|
|
+ $tag_string = $tag_string . "<a href='$server/blog/buscar/tag/$r_tag[tag]'>$r_tag[tag]</a>, ";
|
|
|
+ $tag_raw = $tag_raw . "$r_tag[tag],";
|
|
|
+ }
|
|
|
+ $tag_string = substr($tag_string, 0, strlen($tag_string) - 2);
|
|
|
+ $tag_string = $tag_string . "</span>";
|
|
|
+ $tag_raw = substr($tag_raw, 0, strlen($tag_raw) - 1);
|
|
|
+?>
|
|
|
+ <meta itemprop='keywords' content='<?=$tag_raw?>'/>
|
|
|
+ <td>
|
|
|
+ <span class='date'><?=formatDate($r["dtime"], $lang)?></span>
|
|
|
+ <br/><br class='mobile'/>
|
|
|
+ <?=$tag_string?>
|
|
|
+ </td>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ else{
|
|
|
+?>
|
|
|
+ <td>
|
|
|
+ <span class='date'>
|
|
|
+ <span class='hidden'><?=formatDate($r["dtime"], $lang)?>
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ #Share
|
|
|
+?>
|
|
|
+ <td class='r_share'>
|
|
|
+ <span class='share'>
|
|
|
+ <span class='desktop'>$lng[blog_share]</span>
|
|
|
+<?php
|
|
|
+ $title = urlencode("$r[title] - $http_host");
|
|
|
+ $url_f = htmlspecialchars("https://www.facebook.com/sharer/sharer.php?u=$server$_SERVER[REQUEST_URI]");
|
|
|
+ $url_t = htmlspecialchars("https://twitter.com/share?url=$server$_SERVER[REQUEST_URI]&text=$title");
|
|
|
+ $url_g = htmlspecialchars("https://plus.google.com/share?url=$server$_SERVER[REQUEST_URI]");
|
|
|
+?>
|
|
|
+ <a href='$url_f' target='_blank'><img class='share_icon' alt='Facebook' src='$server/img/social/facebook.gif'/></a>\n";
|
|
|
+ <a href='$url_t' target='_blank'><img class='share_icon' alt='Twitter' src='$server/img/social/twitter.gif'/></a>\n";
|
|
|
+ <a href='$url_g' target='_blank'><img class='share_icon' src='$server/img/social/googleplus.gif' alt='Google+'/></a>\n";
|
|
|
+ </span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table> <!-- .post_footer -->
|
|
|
+<?php
|
|
|
#Comments
|
|
|
- if ($r['comments'] == 1){
|
|
|
- echo "<hr>\n";
|
|
|
+ if ($r["comments"] == 1){
|
|
|
$q_comment = mysqli_query($con, "SELECT id, post, DATE_FORMAT(dtime, '%Y-%m-%dT%T') AS isodate, dtime, user, username, lang, text FROM post_comment WHERE post = $id AND approved = 1 ORDER BY dtime;");
|
|
|
$count = mysqli_num_rows($q_comment);
|
|
|
- echo "<meta itemprop='commentCount interactionCount' content='$count'/>\n";
|
|
|
+?>
|
|
|
+ <hr/>
|
|
|
+ <meta itemprop='commentCount interactionCount' content='<?=$count?>'/>
|
|
|
+<?php
|
|
|
switch ($count){
|
|
|
case 0:
|
|
|
- echo "<h4><meta itemprop='interactionCount' content='0'/></meta>$lng[blog_comments_0]</h4>\n";
|
|
|
+ $comment_count = "<h4><meta itemprop='interactionCount' content='0'/></meta>$lng[blog_comments_0]</h4>";
|
|
|
break;
|
|
|
case 1:
|
|
|
- echo "<h4><span itemprop='interactionCount'>1</span> $lng[blog_comments_1]</h4>\n";
|
|
|
+ $comment_count = "<h4><span itemprop='interactionCount'>1</span> $lng[blog_comments_1]</h4>";
|
|
|
break;
|
|
|
default:
|
|
|
- echo "<h4><span itemprop='interactionCount'>$count</span> $lng[blog_comments_multiple]</h4>\n";
|
|
|
- }
|
|
|
- echo "<div id='comment_list'>\n";
|
|
|
- //WARNING: If changes are done here, do the same in comment.php
|
|
|
- while ($r_comment = mysqli_fetch_array($q_comment)){
|
|
|
- echo "<div itemprop='comment' itemscope itemtype='http://schema.org/UserComments' id='comment_$r_comment[id]' class='comment'>\n";
|
|
|
- //When official users are implementes, see if there is user or username
|
|
|
- echo "<span itemprop='creator' class='comment_user'>$r_comment[username]</span>\n";
|
|
|
- echo "<span class='comment_date date'><meta itemprop='commentTime' content='$r_comment[isodate]'/>" . formatDate($r_comment['dtime'], $lang) . "</span>\n";
|
|
|
- echo "<p itemprop='commentText' class='comment_text'>$r_comment[text]</p>";
|
|
|
- echo "<hr class='comment_line'/>\n";
|
|
|
- echo "</div>\n";
|
|
|
+ $comment_count = "<h4><span itemprop='interactionCount'>$count</span> $lng[blog_comments_multiple]</h4>";
|
|
|
}
|
|
|
- echo "</div>\n";
|
|
|
- #Comment form
|
|
|
- echo "<div class='comment' id='comment_new'>\n";
|
|
|
- echo "<form id='comment_form' method='post' action='/' onsubmit='event.preventDefault();postComment($id, \"$lang\");'>\n";
|
|
|
- echo "<textarea id='new_comment_text' name='text' maxlength='1800' onChange='defaultInputBorder(this);' onKeyDown='defaultInputBorder(this);' placeholder='$lng[blog_placeholder_text]'></textarea>\n";
|
|
|
- echo "<input type='hidden' name='id' value='$id'>\n";
|
|
|
- echo "<div id='identification_form'>\n";
|
|
|
- echo "<br><input id='new_comment_user' name='user' maxlength='50' type='text' placeholder='$lng[blog_placeholder_name]' onChange='defaultInputBorder(this);' onKeyDown='defaultInputBorder(this);'/>\n";
|
|
|
- echo "<input type='submit' value='$lng[blog_send]'/>\n";
|
|
|
- echo "</div>\n";
|
|
|
- echo "</form>\n";
|
|
|
- echo "</div>\n";
|
|
|
+?>
|
|
|
+ <?=$comment_count?>
|
|
|
+ <div id='comment_list'>
|
|
|
+<?php
|
|
|
+ //WARNING: If changes are done here, do the same in comment.php
|
|
|
+ while ($r_comment = mysqli_fetch_array($q_comment)){
|
|
|
+?>
|
|
|
+ <div itemprop='comment' itemscope itemtype='http://schema.org/UserComments' id='comment_<?=$r_comment["id"]?>' class='comment'>
|
|
|
+ <span itemprop='creator' class='comment_user'><?=$r_comment["username"]?></span>
|
|
|
+ <span class='comment_date date'>
|
|
|
+ <meta itemprop='commentTime' content='<?=$r_comment["isodate"]?>'/>
|
|
|
+ <?=formatDate($r_comment["dtime"], $lang)?>
|
|
|
+ </span>
|
|
|
+ <p itemprop='commentText' class='comment_text'><?=$r_comment["text"]?></p>
|
|
|
+ <hr class='comment_line'/>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </div> <!-- #comment_list -->
|
|
|
+ <div class='comment' id='comment_new'>
|
|
|
+ <form id='comment_form' method='post' action='/' onsubmit='event.preventDefault();postComment(<?=$id?>, "<?=$lang?>");'>
|
|
|
+ <textarea id='new_comment_text' name='text' maxlength='1800' onChange='defaultInputBorder(this);' onKeyDown='defaultInputBorder(this);' placeholder='<?=$lng["blog_placeholder_text"]?>'></textarea>
|
|
|
+ <input type='hidden' name='id' value='<?=$id?>'>
|
|
|
+ <div id='identification_form'>
|
|
|
+ <br>
|
|
|
+ <input id='new_comment_user' name='user' maxlength='50' type='text' placeholder='<?=$lng["blog_placeholder_name"]?>' onChange='defaultInputBorder(this);' onKeyDown='defaultInputBorder(this);'/>
|
|
|
+ <input type='submit' value='<?=$lng["blog_send"]?>'/>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div> <!-- .comment_new -->
|
|
|
+<?php
|
|
|
}
|
|
|
else{
|
|
|
- echo "<h4>$lng[blog_comments_closed]</h4>";
|
|
|
+?>
|
|
|
+ <h4><?=$lng["blog_comments_closed"]?></h4>
|
|
|
+<?php
|
|
|
}
|
|
|
- echo "</div></div>\n";
|
|
|
- ?>
|
|
|
- </div>
|
|
|
- <?php include("common/rightpanel.php"); ?>
|
|
|
- </div>
|
|
|
- <?php
|
|
|
+?>
|
|
|
+ </div> <!-- .entry -->
|
|
|
+ </div> <!-- #middle_column -->
|
|
|
+<?php
|
|
|
+ include("common/rightpanel.php");
|
|
|
+?>
|
|
|
+ </div> <!-- .content -->
|
|
|
+<?php
|
|
|
include("../footer.php");
|
|
|
$ad = ad($con, $lang, $lng);
|
|
|
stats($ad, $ad_static, "blog", "$id");
|
|
|
- ?>
|
|
|
+?>
|
|
|
</body>
|
|
|
</html>
|