Beispiel #1
0
    function DbRecordToHtml($comment)
    {
        $date = datetime_to_est($comment['datetime'], true);
        if (strlen($comment['homepage']) > 0) {
            $name = "<a href=\"{$comment['homepage']}\" title=\"kommenteerija koduleht\">{$comment['name']}</a>";
        } else {
            $name = $comment['name'];
        }
        return <<<EOHTML
<div id="kommentaar_{$comment['id']}">
{$comment['text']}
<p class="autor">Seda ütles {$date} {$name}.</p>
</div>

EOHTML;
    }
Beispiel #2
0
function commentToHtml($comment)
{
    $date = datetime_to_est($comment['datetime'], true);
    if (strlen($comment['homepage']) > 0) {
        $name = "<a href=\"{$comment['homepage']}\" title=\"kommenteerija koduleht\">{$comment['name']}</a>";
    } else {
        $name = $comment['name'];
    }
    return <<<EOHTML
<div id="kommentaar_{$comment['id']}">
{$comment['text']}
  <p class="autor">
  Teema: {$comment['article']}<br />
  {$date} {$name} ({$comment['email']}).<br />
  <b><a href="?delete={$comment['id']}">Kustuta</a></b>
  </p>
</div>
EOHTML;
}
Beispiel #3
0
    /**
            getContent
            Tagastab sisu
        **/
    function GetContent()
    {
        $date = "Kirjutatud " . datetime_to_est($this->mDate, false, false);
        if (strlen($this->mLastModified) > 0) {
            $date .= ", viimati muudetud " . datetime_to_est($this->mLastModified, false, false);
        }
        if (strlen($this->mUrl) > 0) {
            if ($this->mComments == 'Y') {
                if ($this->mCommentCount == 0) {
                    return $this->mContent . <<<EOHTML
<div>
<p>
<span class="date">{$date}.</span>
<a class="kommentaarid" href="{$this->mUrl}">Avalda oma arvamust.</a>
</p>
</div>

EOHTML;
                } else {
                    return $this->mContent . <<<EOHTML
<div>
<p>
<span class="date">{$date}.</span>
<a class="kommentaarid" href="{$this->mUrl}">Kommentaarid <span>({$this->mCommentCount})</span></a>
</p>
</div>

EOHTML;
                }
            } else {
                return $this->mContent . <<<EOHTML
<div>
<p>
<span class="date">{$date}.</span>
<a class="kommentaarid" href="{$this->mUrl}">Püsilink.</a>
</p>
</div>

EOHTML;
            }
        } else {
            return $this->mContent . <<<EOHTML
<div>
<p><span class="date">{$date}.</span></p>
</div>

EOHTML;
        }
    }