Exemplo n.º 1
0
?>
)</h3>
			<table class="ui red table">
				<thead>
					<tr>
						<th>Comment</th>
						<th>Owner</th>
						<th><a href="reports.php?cord=count">Reports count</a></th>
						<th><a href="reports.php?cord=date">Last reported</a></th>
						<th>Details</th>
					</tr>
				</thead>
				<tbody>
					<?php 
foreach ($c_reports as $rp) {
    $count = QNA::get_reports_count($rp->id);
    ?>
					<tr>
						<td><a href="/questions/question.php?id=<?php 
    echo $rp->id;
    ?>
"><?php 
    echo $rp->content;
    ?>
</a></td>
						<td><?php 
    echo View::user($rp->uid);
    ?>
</td>
						<td><?php 
    echo $count;
Exemplo n.º 2
0
echo $pag->display();
?>
		<div class="questions front-page" id="questions">
			<?php 
if (count($qs) < 1) {
    echo "There are no stories in this section yet.<br>";
} else {
    foreach ($qs as $q) {
        if ($q->status != 1 && $q->uid != USER_ID) {
            continue;
        }
        $self = $q->uid === USER_ID ?: false;
        $commentsCount = count(Comment::get_comments($q->id));
        $votes = QNA::get_votes($q->id);
        $votes = $votes ?: "0";
        $reports_count = QNA::get_reports_count($q->id) ?: null;
        $img_path = $q->img_path ?: DEF_PIC;
        $type = $q->fid == 5 ? 'Generated' : 'Written';
        ?>
				 	<div class="ui items">
				 		<div class="item">
				 			<div class="ui tiny image">
				 				<a href="/user/<?php 
        echo $q->uid;
        ?>
/"><img src="<?php 
        echo $img_path;
        ?>
"></a>
				 			</div>
				 			<div class="content">
" >
	<button name="comment" id="subcomment" style="display:none;" class="ui blue submit disabled icon button">Submit</button>
</form>
<hr>
<div id="comments">
<?php 
if (count($comments) === 0) {
    echo "<span id=\"emptycmt\">There is nothing here yet, be the first to comment!</span>";
} else {
}
foreach ($comments as $comment) {
    $voted = QNA::has_voted($comment->id, USER_ID);
    $votes = Comment::get_votes($comment->id);
    $votes = $votes > 0 ? '+' . $votes : null;
    $self = $comment->uid === USER_ID;
    $rpsc = QNA::get_reports_count($comment->id) ?: false;
    $comment_date = $comment->created;
    $comment_edited_date = $comment->last_modified;
    if ($comment->last_modified > $comment->created) {
        $edited = "(edited <span class='datetime' title=\"{$comment_edited_date}\">{$comment_edited_date}</span>)";
    } else {
        $edited = "";
    }
    ?>
				<?php 
    if ($session->adminCheck()) {
        ?>
				<a style="color:red;" href="/admin/report.php?id=<?php 
        echo $comment->id;
        ?>
">
Exemplo n.º 4
0
<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/src/init.php";
$pageTitle = "Admin Control Panel";
$session->adminLock();
$admin = new Admin();
$QNA = new QNA();
$total_reports = QNA::get_reports_count();
$users_count = count($admin->getAllUsers());
$qs_count = QNA::get_questions_count();
$qs = $QNA->get_questions(5, 0, true);
$users = $admin->getAllUsers(6, 0);
$sections = QNA::get_sections();
$admin = new Admin();
$count = count($admin->getTraffic());
$database = new Database();
$sec = "staff";
include ROOT_PATH . 'inc/head.php';
?>

<body>
	<div class="main" id="admincp">
		<div class="ui container section">
			<h2>Admin Control Panel</h2><br>
			<div class="ui center aligned grid" id="main_counters">
				<div class="four wide column">
					<div class="ui segment">
						<div class="label">
							<i class="ui icon users blue"></i>Total Users
						</div>
						<div class="value">
Exemplo n.º 5
0
if ($q->status != 1 && !($session->adminCheck() || $session->userCheck($q->uid))) {
    Redirect::redirectTo('404');
}
$user = new User($q->uid);
$user = $user->user;
$self = $q->uid === USER_ID;
$voted = QNA::has_voted($id, USER_ID);
$votes_count = QNA::get_votes($id) ?: "0";
$post_date = $q->created;
$post_modified_date = $q->last_modified;
if ($q->last_modified > $q->created) {
    $edited = " (edited <span class='datetime' title=\"{$post_modified_date}\">{$post_modified_date}</span>)";
} else {
    $edited = "";
}
$rpsc = QNA::get_reports_count($id) ?: false;
if ($rpsc) {
    $reports_count = $rpsc == 1 ? "1 time" : "{$rpsc} times";
} else {
    $reports_count = false;
}
include ROOT_PATH . 'inc/head.php';
$name = $q->full_name;
?>
<body>
	<div class="question-page ui container section">
		<?php 
echo msgs();
?>

		<?php