#30 CMS Comments

This commit is contained in:
Ulrich Block 2015-05-15 20:52:27 +02:00
parent 715e5ffd5b
commit 262d647e69
5 changed files with 258 additions and 249 deletions

View File

@ -159,6 +159,11 @@ if ($ui->smallletters('w', 9, 'get') == 'datatable') {
require_once(EASYWIDIR . '/stuff/ajax/datatable_webmasterserver.php');
// Page comments
} else if ($ui->smallletters('d', 12, 'get') == 'pagecomments' and isset($admin_id) and isset($reseller_id) and isset($resellerLockupID) and $pa['cms_pages']) {
require_once(EASYWIDIR . '/stuff/ajax/datatable_pagecomments.php');
// Code wise it seems odd, but this way we can get plausible userIDs for following queries up front without having to repeat ourselves
} else {

View File

@ -103,126 +103,8 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
$template_file = $spracheResponse->error_table;
}
} else {
$query = $sql->prepare("SELECT `seo` FROM `page_settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($reseller_id));
$seo = $query->fetchColumn();
$table = array();
$getParams = '';
$s = 1;
$m = 1;
if ($ui->id('spam',1, 'get')==1) {
$s = 0;
$getParams='&spam=1';
$AND="AND `markedSpam`='Y'";
} else if ($ui->id('mod',1, 'get')==1) {
$m = 0;
$getParams='&mod=1';
$AND="AND `markedSpam`='N' AND `moderateAccepted`='N'";
} else {
$AND="AND `markedSpam`='N' AND `moderateAccepted`='Y'";
}
$query = $sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `resellerID`=? $AND");
$query->execute(array($reseller_id));
$colcount = $query->fetchColumn();
if ($start>$colcount ) {
if (isset($amount)) {
$start = $colcount-$amount;
} else {
$start = $colcount-20;
}
if ($start<0) {
$start = 0;
}
}
$query = $sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `resellerID`=?");
$query->execute(array($reseller_id));
$totalCount = $query->fetchColumn();
$query = $sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `resellerID`=? AND `markedSpam`='N' AND `moderateAccepted`='N'");
$query->execute(array($reseller_id));
$moderationExpectedCount = $query->fetchColumn();
$query = $sql->prepare("SELECT COUNT(`commentID`) AS `amount` FROM `page_comments` WHERE `resellerID`=? AND `markedSpam`='Y'");
$query->execute(array($reseller_id));
$spamCount = $query->fetchColumn();
$next = $start+$amount;
if ($colcount>$next) {
$vor = $start+$amount;
} else {
$vor = $start;
}
$back = $start - $amount;
if ($back>=0){
$zur = $start - $amount;
} else {
$zur = $start;
}
$o = $ui->st('o', 'get');
if ($ui->st('o', 'get') == 'dt') {
$orderby = 't.`title` DESC';
} else if ($ui->st('o', 'get') == 'at') {
$orderby = 't.`title` ASC';
} else if ($ui->st('o', 'get') == 'dd') {
$orderby = 'c.`date` DESC';
} else if ($ui->st('o', 'get') == 'ad') {
$orderby = 'c.`date` ASC';
} else if ($ui->st('o', 'get') == 'dn') {
$orderby = 'c.`authorname` DESC';
} else if ($ui->st('o', 'get') == 'an') {
$orderby = 'c.`authorname` ASC';
} else if ($ui->st('o', 'get') == 'ds') {
$orderby = 'c.`markedSpam` DESC';
} else if ($ui->st('o', 'get') == 'as') {
$orderby = 'c.`markedSpam` ASC';
} else if ($ui->st('o', 'get') == 'dm') {
$orderby = 'c.`moderateAccepted` DESC';
} else if ($ui->st('o', 'get') == 'am') {
$orderby = 'c.`moderateAccepted` ASC';
} else if ($ui->st('o', 'get') == 'di') {
$orderby = 'c.`commentID` DESC';
} else {
$orderby = 'c.`commentID` ASC';
}
$query = $sql->prepare("SELECT t.`pageid`,t.`language`,t.`title`,c.`commentID`,c.`date`,c.`authorname`,c.`markedSpam`,c.`spamReason`,c.`moderateAccepted`,c.`comment` FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`resellerID`=? $AND ORDER BY $orderby");
$query->execute(array($reseller_id));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
if (!isset($titleLanguages[$row['language']])) {
$titleLanguages[$row['language']] = array('page' => getlanguagefile('page', $row['language'],0),'general' => getlanguagefile('general', $row['language'],0));
}
$commentDate='m.d.Y H:i';
if ($user_language == 'de') $commentDate='d.m.Y H:i';
$moderated = $gsprache->no;
if ($row['moderateAccepted'] == 'N') $moderated = $gsprache->yes;
$spam = $gsprache->no;
if ($row['markedSpam'] == 'Y') $spam = $gsprache->yes;
if ($seo== 'N') {
$link = $page_url.'/index.php?site=news&amp;id='.$row['pageid'];
} else {
$link = $page_url. '/' . $row['language'] . '/' . szrp($titleLanguages[$row['language']]['general']->news) . '/' . szrp($row['title']) . '/';
}
$table[] = array('pageid' => $row['pageid'], 'title' => htmlentities($row['title']),'comment' => htmlentities($row['comment']),'commentID' => $row['commentID'], 'date' => date($commentDate,strtotime($row['date'])),'authorname' => htmlentities($row['authorname']),'moderated' => $moderated,'spam' => $spam,'spamReason' => $row['spamReason'], 'link' => $link);
}
$pageamount = ceil($colcount / $amount);
$link='<a href="admin.php?w=pc&amp;o='.$o.'&amp;a=';
if (!isset($amount)) {
$link .="20";
} else {
$link .= $amount;
}
if ($start==0) {
$link .= '&p=0'.$getParams.'" class="bold">1</a>';
} else {
$link .= '&p=0'.$getParams.'">1</a>';
}
$pages[] = $link;
$i = 2;
while ($i<=$pageamount) {
$selectpage = ($i - 1) * $amount;
if ($start==$selectpage) {
$pages[] = '<a href="admin.php?w=pc&amp;o='.$o.'&amp;a=' . $amount . '&p='.$selectpage.$getParams.'" class="bold">' . $i . '</a>';
} else {
$pages[] = '<a href="admin.php?w=pc&amp;o='.$o.'&amp;a=' . $amount . '&p='.$selectpage.$getParams.'">' . $i . '</a>';
}
$i++;
}
$pages=implode(', ',$pages);
configureDateTables('-1', '1, "desc"', 'ajax.php?w=datatable&d=pagecomments');
$template_file = 'admin_page_comments_list.tpl';
}

View File

@ -0,0 +1,110 @@
<?php
/**
* File: datatable_pagecommentphp.
* Author: Ulrich Block
* Date: 15.05.15
* Contact: <ulrich.block@easy-wi.com>
*
* This file is part of Easy-WI.
*
* Easy-WI is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Easy-WI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more detail
*
* You should have received a copy of the GNU General Public License
* along with Easy-WI. If not, see <http://www.gnu.org/licenses/>.
*
* Diese Datei ist Teil von Easy-WI.
*
* Easy-WI ist Freie Software: Sie koennen es unter den Bedingungen
* der GNU General Public License, wie von der Free Software Foundation,
* Version 3 der Lizenz oder (nach Ihrer Wahl) jeder spaeteren
* veroeffentlichten Version, weiterverbreiten und/oder modifizieren.
*
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
* Siehe die GNU General Public License fuer weitere Detail
*
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!defined('AJAXINCLUDED')) {
die('Do not access directly!');
}
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `page_comments` WHERE `resellerID`=?");
$query->execute(array($resellerLockupID));
$array['iTotalRecords'] = $query->fetchColumn();
if ($sSearch) {
$toLower = strtolower($sSearch);
$statusQuery = array();
if (strpos(strtolower($gsprache->yes), $toLower) !== false) {
$statusQuery[] = "OR c.`markedSpam`='Y'";
$statusQuery[] = "OR c.`moderateAccepted`='Y'";
}
if (strpos(strtolower($gsprache->no), $toLower) !== false) {
$statusQuery[] = "OR c.`markedSpam`='N'";
$statusQuery[] = "OR c.`moderateAccepted`='N'";
}
$statusQuery = (count($statusQuery) > 0) ? implode(' ', $statusQuery) : '';
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`resellerID`=:reseller_id AND (t.`title` LIKE :search OR c.`commentID` LIKE :search OR c.`authorname` LIKE :search OR c.`date` LIKE :search {$statusQuery})");
$query->execute(array(':search' => '%' . $sSearch . '%',':reseller_id' => $resellerLockupID));
$array['iTotalDisplayRecords'] = $query->fetchColumn();
} else {
$array['iTotalDisplayRecords'] = $array['iTotalRecords'];
}
$orderFields = array(0 => 't.`title`', 1 => 'c.`commentID`', 2 => 'c.`authorname`', 3 => 'c.`date`', 4 => 'c.`moderateAccepted`', 5 => 'c.`markedSpam`');
if (isset($orderFields[$iSortCol]) and is_array($orderFields[$iSortCol])) {
$orderBy = implode(' ' . $sSortDir . ', ', $orderFields[$iSortCol]) . ' ' . $sSortDir;
} else if (isset($orderFields[$iSortCol]) and !is_array($orderFields[$iSortCol])) {
$orderBy = $orderFields[$iSortCol] . ' ' . $sSortDir;
} else {
$orderBy = 'c.`commentID` DESC';
}
$query = $sql->prepare("SELECT `seo` FROM `page_settings` WHERE `resellerid`=? LIMIT 1");
$query->execute(array($resellerLockupID));
$seoActive = $query->fetchColumn();
if ($sSearch) {
$query = $sql->prepare("SELECT t.`pageid`,t.`language`,t.`title`,c.`commentID`,c.`date`,c.`authorname`,c.`markedSpam`,c.`moderateAccepted` FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`resellerID`=:reseller_id AND (t.`title` LIKE :search OR c.`commentID` LIKE :search OR c.`authorname` LIKE :search OR c.`date` LIKE :search {$statusQuery}) ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
$query->execute(array(':search' => '%' . $sSearch . '%', ':reseller_id' => $resellerLockupID));
} else {
$query = $sql->prepare("SELECT t.`pageid`,t.`language`,t.`title`,c.`commentID`,c.`date`,c.`authorname`,c.`markedSpam`,c.`moderateAccepted` FROM `page_comments` c LEFT JOIN `page_pages_text` t ON c.`pageTextID`=t.`id` WHERE c.`resellerID`=? ORDER BY $orderBy LIMIT {$iDisplayStart},{$iDisplayLength}");
$query->execute(array($resellerLockupID));
}
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
if (!isset($titleLanguages[$row['language']])) {
$titleLanguages[$row['language']] = array(
'page' => getlanguagefile('page', $row['language'], 0),
'general' => getlanguagefile('general', $row['language'], 0)
);
}
$moderated = ($row['moderateAccepted'] == 'N') ? $gsprache->yes : $gsprache->no;
$spam = ($row['markedSpam'] == 'Y') ? $gsprache->yes : $gsprache->no;
$link = ($seoActive == 'N') ? $page_url . '/index.php?site=news&amp;id=' . $row['pageid'] : $page_url . '/' . $row['language'] . '/' . szrp($titleLanguages[$row['language']]['general']->news) . '/' . szrp($row['title']) . '/';
$array['aaData'][] = array('<a href="' .$link . '" target="_blank">' . $row['title'] . '</a>', $row['commentID'], $row['authorname'], $row['date'], (string) $moderated, (string) $spam, returnButton($template_to_use, 'ajax_admin_buttons_dl.tpl', 'pc', 'dl', $row['commentID'], $gsprache->del) . ' ' . returnButton($template_to_use, 'ajax_admin_buttons_md.tpl', 'pc', 'md', $row['commentID'], $gsprache->mod));
}

View File

@ -1,59 +1,45 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
<li><?php echo $gsprache->comments;?></li>
</ul>
<section class="content-header">
<h1><?php echo $gsprache->comments;?></h1>
<ol class="breadcrumb">
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="admin.php?w=pn"><i class="fa fa-globe"></i> CMS</a></li>
<li><a href="admin.php?w=pc"><i class="fa fa-comments"></i> <?php echo $gsprache->comments;?></a></li>
<li class="active"><?php echo $gsprache->overview;?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<div class="box-body table-responsive">
<table id="dataTable" class="table table-bordered table-hover">
<thead>
<tr>
<th>URL</th>
<th>ID</a></th>
<th><?php echo $sprache->author;?></th>
<th><?php echo $sprache->date;?></th>
<th><?php echo $sprache->moderate;?></th>
<th>Spam</th>
<th><?php echo $gsprache->action;?></th>
</tr>
</thead>
<tfoot>
<tr>
<th>URL</th>
<th>ID</a></th>
<th><?php echo $sprache->author;?></th>
<th><?php echo $sprache->date;?></th>
<th><?php echo $sprache->moderate;?></th>
<th>Spam</th>
<th><?php echo $gsprache->action;?></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span11">
<h4>Total (<?php echo $totalCount;?>)</h4>
<a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;o=<?php echo $o;?>&amp;spam=<?php echo $s;?>">Spam</a> (<?php echo $spamCount;?>)<?php if($ui->id('spam',1,'get')==1) echo ' <i class="icon-check"></i>';?>,
<a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;o=<?php echo $o;?>&amp;mod=<?php echo $m;?>"><?php echo $sprache->moderate;?></a> (<?php echo $moderationExpectedCount;?>)<?php if($ui->id('mod',1,'get')==1) echo ' <i class="icon-check"></i>';?>
</div>
</div>
<hr>
<div class="row-fluid">
<div class="span11 pagination">
<ul>
<li><a href="admin.php?w=pc&amp;o=<?php echo $o;?>&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $zur;?>"><i class="icon-step-backward"></i></a></li>
<li><a href="admin.php?w=pc&amp;o=<?php echo $o;?>&amp;a=20&amp;p=<?php echo $start; ?>">20</a></li>
<li><a href="admin.php?w=pc&amp;o=<?php echo $o;?>&amp;a=50&amp;p=<?php echo $start; ?>">50</a></li>
<li><a href="admin.php?w=pc&amp;o=<?php echo $o;?>&amp;a=100&amp;p=<?php echo $start; ?>">100</a></li>
<li><a href="admin.php?w=pc&amp;o=<?php echo $o;?>&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $vor;?>"><i class="icon-step-forward"></i></a></li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span11">
<table class="table table-bordered table-hover table-striped footable">
<thead>
<tr>
<th data-class="expand"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='at') { echo 'dt'; } else { echo 'at'; }; echo $getParams; ?>">URL</a></th>
<th data-hide="phone"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='an') { echo 'dn'; } else { echo 'an'; }; echo $getParams; ?>"><?php echo $sprache->author;?></a></th>
<th data-hide="phone,tablet"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='ai') { echo 'di'; } else { echo 'ai'; }; echo $getParams; ?>">ID</a></th>
<th data-hide="phone,tablet"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='ad') { echo 'dd'; } else { echo 'ad'; }; echo $getParams; ?>"><?php echo $sprache->date;?></a></th>
<th data-hide="phone,tablet"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='am') { echo 'dm'; } else { echo 'am'; }; echo $getParams; ?>"><?php echo $sprache->moderate;?></a></th>
<th data-hide="phone,tablet"><a href="admin.php?w=pc&amp;a=<?php if(!isset($amount)) echo "20"; else echo $amount; ?>&amp;p=<?php echo $start;?>&amp;o=<?php if ($o=='as') { echo 'ds'; } else { echo 'as'; }; echo $getParams; ?>">Spam</a></th>
<th><?php echo $gsprache->del;?></th>
<th><?php echo $gsprache->mod;?></th>
</tr>
</thead>
<tbody>
<?php foreach ($table as $table_row) { ?>
<tr>
<td><a href="<?php echo $table_row['link'];?>" target="_blank"><?php echo $table_row['title'];?></a></td>
<td onclick="textdrop('<?php echo $table_row['commentID'];?>');"><?php echo $table_row['authorname'];?></td>
<td onclick="textdrop('<?php echo $table_row['commentID'];?>');"><?php echo $table_row['commentID'];?></td>
<td onclick="textdrop('<?php echo $table_row['commentID'];?>');"><?php echo $table_row['date'];?></td>
<td onclick="textdrop('<?php echo $table_row['commentID'];?>');"><?php echo $table_row['moderated'];?></td>
<td onclick="textdrop('<?php echo $table_row['commentID'];?>');"><?php echo $table_row['spam'];?></td>
<td><a href="admin.php?w=pc&amp;d=dl&amp;r=pc&amp;id=<?php echo $table_row['commentID'];?>"onclick="return confirm('<?php echo $gsprache->sure;?>');"><span class="btn btn-mini btn-danger"><i class="fa fa-trash-o"></i></span></a></td>
<td><a href="admin.php?w=pc&amp;d=md&amp;id=<?php echo $table_row['commentID'];?>"><span class="btn btn-mini btn-primary"><i class="icon-white icon-edit"></i></span></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</section>

View File

@ -1,71 +1,97 @@
<div class="row-fluid">
<div class="span12">
<ul class="breadcrumb">
<li><a href="admin.php">Home</a> <span class="divider">/</span></li>
<li><a href="admin.php?w=pc"><?php echo $gsprache->comments;?></a> <span class="divider">/</span></li>
<li><?php echo $gsprache->mod;?></li>
</ul>
<section class="content-header">
<h1><?php echo $gsprache->comments;?></h1>
<ol class="breadcrumb">
<li><a href="admin.php"><i class="fa fa-home"></i> Home</a></li>
<li><a href="admin.php?w=pn"><i class="fa fa-globe"></i> CMS</a></li>
<li><a href="admin.php?w=pc"><i class="fa fa-comments"></i> <?php echo $gsprache->comments;?></a></li>
<li class="active"><?php echo $gsprache->mod;?></li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-primary">
<form role="form" action="admin.php?w=pc&amp;d=md&amp;id=<?php echo $id;?>&amp;r=pc" onsubmit="return confirm('<?php echo $gsprache->sure;?>');" method="post" >
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="md">
<div class="box-body">
<div class="form-group">
<label for="inputAuthor"><?php echo $sprache->author;?></label>
<div class="controls"><input class="form-control" id="inputAuthor" type="text" name="name" value="<?php echo $authorname?>" readonly="readonly"></div>
</div>
<div class="form-group">
<label for="inputMail">E-Mail</label>
<div class="controls"><input class="form-control" id="inputMail" type="text" name="mail" value="<?php echo $email?>" readonly="readonly"></div>
</div>
<div class="form-group">
<label for="inputIP">IP</label>
<div class="controls"><input class="form-control" id="inputIP" type="text" name="ip" value="<?php echo $ip?>" readonly="readonly"></div>
</div>
<div class="form-group">
<label for="inputDNS">DNS</label>
<div class="controls"><input class="form-control" id="inputDNS" type="text" name="dns" value="<?php echo $dns?>" readonly="readonly"></div>
</div>
<div class="form-group">
<label for="inputDate"><?php echo $sprache->date;?></label>
<div class="controls"><input class="form-control" id="inputDate" type="text" name="date" value="<?php echo $date?>" readonly="readonly"></div>
</div>
<?php if($markedSpam=='Y'){ ?>
<div class="form-group">
<label for="inputSpam">Spam</label>
<div class="controls"><input class="form-control" id="inputSpam" type="text" name="spam" value="<?php echo $spamReason?>" readonly="readonly"></div>
</div>
<?php } ?>
<div class="form-group">
<label for="inputModerate"><?php echo $sprache->moderate;?></label>
<div class="controls">
<select class="form-control" id="inputModerate" name="moderateAccepted">
<option value="Y"><?php echo $gsprache->no;?></option>
<option value="N" <?php if($moderateAccepted=='N') echo 'selected="selected"';?> ><?php echo $gsprache->yes;?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputSpam">Spam</label>
<div class="controls">
<select class="form-control" id="inputSpam" name="markedSpam">
<option value="Y"><?php echo $gsprache->yes;?></option>
<option value="N" <?php if($markedSpam=='N') echo 'selected="selected"';?> ><?php echo $gsprache->no;?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputURL">URL</label>
<div class="controls">
<input class="form-control" id="inputURL" type="url" name="homepage" value="<?php echo $homepage;?>">
</div>
</div>
<div class="form-group">
<label for="inputComment"></label>
<div class="controls">
<textarea class="form-control" id="inputComment" name="comment" rows="5" required><?php echo $comment;?></textarea>
</div>
</div>
</div>
<div class="box-footer">
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="fa fa-save">&nbsp;<?php echo $gsprache->save;?></i></button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span6">
<dl class="dl-horizontal">
<dt><?php echo $sprache->author;?></dt>
<dd><?php echo $authorname;?> <a href="mailto:<?php echo $email;?>">(<?php echo $email;?>)</a></dd>
<dt>IP</dt>
<dd><?php echo $ip;?></dd>
<dt>DNS</dt>
<dd><?php echo $dns;?></dd>
<dt><?php echo $sprache->date;?></dt>
<dd><?php echo $date;?></dd>
<?php if($markedSpam=='Y'){ ?>
<dt>Spam</dt>
<dd><?php echo $spamReason;?></dd>
<?php } ?>
</dl>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<form class="form-horizontal" action="admin.php?w=pc&amp;d=md&amp;id=<?php echo $id;?>&amp;r=pc" onsubmit="return confirm('<?php echo $gsprache->sure; ?>');" method="post">
<input type="hidden" name="token" value="<?php echo token();?>">
<input type="hidden" name="action" value="md">
<div class="control-group">
<label class="control-label" for="inputModerate"><?php echo $sprache->moderate;?></label>
<div class="controls">
<select id="inputModerate" name="moderateAccepted">
<option value="Y"><?php echo $gsprache->no;?></option>
<option value="N" <?php if($moderateAccepted=='N') echo 'selected="selected"';?> ><?php echo $gsprache->yes;?></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputSpam">Spam</label>
<div class="controls">
<select id="inputSpam" name="markedSpam">
<option value="Y"><?php echo $gsprache->yes;?></option>
<option value="N" <?php if($markedSpam=='N') echo 'selected="selected"';?> ><?php echo $gsprache->no;?></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputURL">URL</label>
<div class="controls">
<input id="inputURL" type="url" name="homepage" value="<?php echo $homepage;?>">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputComment"></label>
<div class="controls">
<textarea class="span11" rows="10" id="inputComment" name="comment" rows="5" cols="75" required><?php echo $comment;?></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEdit"></label>
<div class="controls">
<button class="btn btn-primary" id="inputEdit" type="submit"><i class="icon-edit icon-white"></i> <?php echo $gsprache->save;?></button>
</div>
</div>
</form>
</div>
</div>
</section>