-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresponse.php
43 lines (35 loc) · 1.34 KB
/
response.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<hr>
<div id="responses">
<div class="col-md-12">
<ol>
<?php
/**
* responses output here
*/
// prv is going to be a 1 or 0 (integer)
$prv_int = (int) 1;
$idd_is = filter_var( $id, FILTER_VALIDATE_INT );
//require_once 'inc/dbh.php';
$stmt = $dbh->prepare('SELECT * FROM tsw_respond WHERE idd_is = :idd_is AND prv = :prv_int');
if( $stmt->execute( array( ':idd_is' => $idd_is, ':prv_int' => $prv_int ) )) {
// loop all open responses
while( $row = $stmt->fetch(PDO::FETCH_ASSOC) ) {
?>
<li class="container" id="respond-panel">
<div class="col-sm-4">
<p><i class="fa fa-calendar"></i> <time datetime="<?php esc( $row['date_respond'] ); ?>" class="date-response"><?php esc( $row['date_respond'] ); ?></time></p>
<p><i class="fa fa-user"></i> <?php esc( $row['name'] ); ?></p>
</div>
<div class="col-sm-8 pull-right">
<div class="detail-item-respond">
<p><?php esc( $row['respond'] ); ?></p>
</div>
</div>
</li>
<?php
}
} else { print("Could not find any responses"); }
?>
</ol>
</div>
</div><!-- <div class="clearfix"></div> -->