-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserComments.php
More file actions
34 lines (31 loc) · 1.25 KB
/
Copy pathuserComments.php
File metadata and controls
34 lines (31 loc) · 1.25 KB
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
<?php require_once 'include/lib.php';
if(isset($_POST['id'])){
$uid=$_POST['id'];
$comment=new item_class();
$cmt_ans_ques=new item_class();
?>
<div class="activity-contents-container">
<?php $comment->sql_query("select * from comments where uid='$uid'");
while($cms=$comment->load_datas()){
$ctime=strtotime($cms['time']);
$ctime=date("M j g:ia",$ctime);
?>
<div class="activity-contents">
<div class="activity-contents-data">
<?php if($cms['qid']==null){
$cmt_ans_ques->sql_query("select * from answers where id='$cms[aid]'");
$cmt_data=$cmt_ans_ques->load_datas();
$cms['qid']=$cmt_data['qid'];
}
?>
<div class="activity-cmt">
<span><a href="question.php?id=<?=$cms['qid'];?>">
<?=$cms['body']?></a>
</span>
<div class="dis-time"><?=$ctime?></div>
</div>
</div>
</div>
<?php }?>
</div>
<?php }?>