Ejemplo n.º 1
0
	  <div class="panel-body">
	    <i class="fa fa-star"></i> ' . get_votes_on_post($id, $mysqli) . ' ' . $vote . ' <a href="#" class="btn-default" data-id="' . $id . '" data-toggle="modal" data-target="#sendResponseModal" title="Send Response" onclick="add_id(' . $id . ');">Send Response</a>
	  </div>
	</div>';
} else {
    $love = '<div class="alert alert-warning alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  To like or respond, login.
</div>';
}
// Building a post
$sql = "SELECT ppl.people_name,ppl.people_id,b.blog_title,b.blog_post,b.blog_lastUpdated,b.blog_id FROM blog b INNER JOIN people ppl ON b.blog_by = ppl.people_id WHERE blog_id='" . $id . "' AND blog_final=1";
$getUSR = query_exec($sql, $mysqli);
$getUSR->bind_result($blog_usr_name, $blog_usr_id, $blog_title, $blog_content, $blog_date, $blog_id);
while ($getUSR->fetch()) {
    $sc = get_votes_on_post($blog_id, $mysqli);
    if ($sc < $blog_approval_ceil) {
        include 'error/404.html';
        exit;
    }
    // Score check
    $blog_usr_name = '<a href="profile.php?id=' . $blog_usr_id . '" title="View Profile" class="pull-right" >' . $blog_usr_name . '</a>';
    $blog_title = $blog_title;
    $blog_content = $blog_content;
    $blog_date = $blog_date;
}
$sql = "SELECT contact_link FROM contact WHERE contact_people_id='" . $id . "'";
$getUSR = query_exec($sql, $mysqli);
$getUSR->bind_result($con_link);
$con_name = "ytest";
while ($getUSR->fetch()) {
Ejemplo n.º 2
0
<?php

$page = "Browse";
include 'header.php';
$getBlogList = $mysqli->prepare('SELECT b.blog_id,b.blog_title,b.blog_lastUpdated,ppl.people_name FROM blog b INNER JOIN people ppl ON ppl.people_id = b.blog_by WHERE b.blog_final=1') or die($mysqli->error);
$getBlogList->execute();
$getBlogList->store_result();
$getBlogList->bind_result($blog_id, $blog_title, $blog_u, $blog_by);
while ($getBlogList->fetch()) {
    $op .= '			 <a href="post.php?id=' . $blog_id . '" class="list-group-item no-justify">
				    <h4 class="list-group-item-heading">' . $blog_title . '
					<span class="badge" style="vertical-align:middle;">' . get_votes_on_post($blog_id, $mysqli) . '</span>
				    </h4>
				    <p class="list-group-item-text">By ' . $blog_by . ' on ' . $blog_u . '</p>
				    
				  </a>';
}
?>

   		<br><br><br>

	  	<br><br>
<!-- Browse main -->
		<div class="row-fluid">
	      		

				<div class="col-xs-6 ">

					<h2><span class="glyphicon glyphicon-list"></span> Browse</h2>
				</div>