|
|
<div class="row">
|
|
|
<div class="col-md-10">
|
|
|
<h1><?php echo $lang['comments']; ?></h1>
|
|
|
</div>
|
|
|
<div class="col-md-2">
|
|
|
<div id="itemnav">
|
|
|
<form method="get" action="index.php">
|
|
|
<div class="form-group">
|
|
|
<input type="hidden" name="mode" value="comments" />
|
|
|
<input type="hidden" name="type" value="<?php echo $type; ?>" />
|
|
|
<select class="form-control form-control-medium btn-top pull-right" size="1" name="comment_id" onchange="this.form.submit();">
|
|
|
<option value="0"><?php if($type==0) echo $lang['comments_all_pages']; else echo $lang['comments_all_photos']; ?></option>
|
|
|
<?php foreach($items as $key => $val): ?>
|
|
|
<option value="<?php echo $key; ?>"<?php if($key==$comment_id): ?> selected="selected"<?php endif; ?>><?php echo $val['title']; ?></option>
|
|
|
<?php endforeach; ?>
|
|
|
</select><!--<input type="submit" name="" value="" src="<?php echo BASE_URL; ?>templates/admin/images/submit.png" value="»" />-->
|
|
|
</div>
|
|
|
</form>
|
|
|
</div></div>
|
|
|
</div>
|
|
|
|
|
|
<h1></h1>
|
|
|
|
|
|
<?php /*
|
|
|
<div id="nav">
|
|
|
<ul id="navlist">
|
|
|
<li><a <?php if($type==0): ?>class="active" <?php endif; ?>href="index.php?mode=comments&type=0" style="width:140px;"><?php echo $lang['comments_page_c']; ?></a></li>
|
|
|
<li><a <?php if($type==1): ?>class="active" <?php endif; ?>href="index.php?mode=comments&type=1" style="width:140px;"><?php echo $lang['comments_photo_c']; ?></a></li>
|
|
|
</ul>
|
|
|
<p> </p>
|
|
|
</div>
|
|
|
*/ ?>
|
|
|
|
|
|
<?php if(isset($comments)): ?>
|
|
|
|
|
|
<form id="entryeditform" method="post" action="index.php">
|
|
|
<div>
|
|
|
<input type="hidden" name="mode" value="comments" />
|
|
|
|
|
|
<div class="table-responsive">
|
|
|
<table class="table table-striped table-hover">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th> </th>
|
|
|
<th><?php if($type==0) echo $lang['comments_page']; else echo $lang['comments_photo']; ?></th>
|
|
|
<th><?php echo $lang['comments_time']; ?></th>
|
|
|
<th><?php echo $lang['comments_name']; ?></th>
|
|
|
<th><?php echo $lang['comments_comment']; ?></th>
|
|
|
<th><?php echo $lang['comments_ip']; ?></th>
|
|
|
<th colspan="<?php if($settings['akismet_key']!='' && $settings['akismet_entry_check']==1): ?>3<?php else: ?>2<?php endif; ?>"> </th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<?php $i=0; foreach($comments as $comment): ?>
|
|
|
<tr class="<?php if($i%2==0): ?>a<?php else: ?>b<?php endif; ?>">
|
|
|
<td><input class="commentcheckbox" type="checkbox" name="checked[]" value="<?php echo $comment['id']; ?>" /></td>
|
|
|
<td><?php if($type==1): ?><?php if(isset($items[$comment['comment_id']])): ?><a href="<?php echo BASE_URL.MEDIA_DIR.$items[$comment['comment_id']]['photo_normal']; ?>"><img src="<?php echo BASE_URL.MEDIA_DIR.$items[$comment['comment_id']]['photo_thumbnail']; ?>" title="<?php echo $items[$comment['comment_id']]['title']; ?>" alt="<?php echo $items[$comment['comment_id']]['title']; ?>" onclick="image_popup('<?php echo BASE_URL.MEDIA_DIR.$items[$comment['comment_id']]['photo_normal']; ?>'); return false" /></a><?php else: ?>-<?php endif; ?><?php else: ?><?php if(isset($items[$comment['comment_id']])): ?><a href="<?php echo BASE_URL.$items[$comment['comment_id']]['page']; ?>#comments"><?php echo $items[$comment['comment_id']]['title']; ?></a><?php else: ?>-<?php endif; ?><?php endif; ?></td>
|
|
|
<td><?php echo strftime($lang['time_format'], $comment['time']); ?></td>
|
|
|
<td><?php if(isset($comment['email_hp'])): ?><a href="<?php echo $comment['email_hp']; ?>"><?php echo $comment['name']; ?></a><?php else: ?><?php echo $comment['name']; ?><?php endif; ?></td>
|
|
|
<td><?php if($comment['comment']=='' && $type==0): ?><em><?php echo $lang['pingback']; ?></em><?php else: echo $comment['comment']; endif; ?></td>
|
|
|
<td><?php echo $comment['ip']; ?></td>
|
|
|
<td class="nowrap"><a class="btn btn-primary btn-xs" href="index.php?mode=comments&type=<?php echo $type; ?>&edit=<?php echo $comment['id']; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $page; ?>" title="<?php echo $lang['edit']; ?>"><span class="glyphicon glyphicon-pencil"></span></a>
|
|
|
<a class="btn btn-danger btn-xs" href="index.php?mode=comments&type=<?php echo $type; ?>&delete=<?php echo $comment['id']; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $page; ?>" title="<?php echo $lang['delete']; ?>" data-delete-confirm="<?php echo rawurlencode($lang['delete_this_comment_confirm']); ?>"><span class="glyphicon glyphicon-remove"></span></a></td>
|
|
|
<?php if($settings['akismet_key']!='' && $settings['akismet_entry_check']==1): ?>
|
|
|
<td class="<?php if($i%2==0): ?>a<?php else: ?>b<?php endif; ?>"><a href="index.php?mode=comments&type=<?php echo $type; ?>&report_spam=<?php echo $comment['id']; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $page; ?>"><img src="<?php echo BASE_URL; ?>templates/admin/images/exclamation.png" alt="<?php echo $lang['report_as_spam']; ?>" title="<?php echo $lang['report_as_spam']; ?>" width="16" height="16" /></a></td>
|
|
|
<?php endif ?>
|
|
|
</tr>
|
|
|
<?php $i++; endforeach; ?>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
<button type="button" class="btn btn-default" data-toggle-checkboxes="commentcheckbox"><?php echo $lang['toggle_selection']; ?></button>
|
|
|
<input class="btn btn-danger" type="submit" name="delete_checked" value="<?php echo $lang['comments_del_checked']; ?>" />
|
|
|
<?php if($comment_id==0): ?>
|
|
|
<input class="btn btn-danger" type="submit" name="delete_all_comments" value="<?php echo $lang['comments_delete_all']; ?>" />
|
|
|
<?php else: ?>
|
|
|
<?php if($type==0): ?>
|
|
|
<input class="btn btn-danger" type="submit" name="delete_all_comments_page" value="<?php echo $lang['delete_all_comments_page']; ?>">
|
|
|
<?php else: ?>
|
|
|
<?php echo $lang['delete_all_comments_photo']; ?>
|
|
|
<input class="btn btn-danger" type="submit" name="delete_all_comments_page" value="<?php echo $lang['delete_all_comments_photo']; ?>">
|
|
|
<?php endif; ?>
|
|
|
|
|
|
<input type="hidden" name="comment_id" value="<?php echo $comment_id; ?>" />
|
|
|
<?php endif; ?>
|
|
|
<input type="hidden" name="type" value="<?php echo $type; ?>" />
|
|
|
<input type="hidden" name="page" value="<?php echo $page; ?>" />
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</form>
|
|
|
|
|
|
<div id="pagination">
|
|
|
<?php if($pagination): ?>
|
|
|
<?php if($pagination['previous']): ?> <a href="index.php?mode=comments&type=<?php echo $type; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $pagination['previous']; ?>">«</a> <?php endif; ?>
|
|
|
<?php foreach($pagination['items'] as $item): ?>
|
|
|
<?php if(empty($item)): ?> ..<?php elseif($item==$pagination['current']): ?> <span class="current"><?php echo $item; ?></span><?php else: ?> <a href="index.php?mode=comments&type=<?php echo $type; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $item; ?>"><?php echo $item; ?></a><?php endif; ?>
|
|
|
<?php endforeach; ?>
|
|
|
<?php if($pagination['next']): ?> <a href="index.php?mode=comments&type=<?php echo $type; ?>&comment_id=<?php echo $comment_id; ?>&page=<?php echo $pagination['next']; ?>">»</a><?php endif; ?>
|
|
|
<?php endif; ?>
|
|
|
</div>
|
|
|
|
|
|
<?php else: ?>
|
|
|
<div class="alert alert-warning">
|
|
|
<?php echo $lang['no_comments']; ?>
|
|
|
</div>
|
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php if($type==1 && $settings['photos_commentable']==1): ?>
|
|
|
<p class="small"><?php echo $lang['photo_comments_enabled']; ?></p>
|
|
|
<?php elseif($type==1 && $settings['photos_commentable']==0): ?>
|
|
|
<p class="small"><?php echo $lang['photo_comments_disabled']; ?></p>
|
|
|
<?php endif; ?>
|