-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuhome.php
70 lines (56 loc) · 2.25 KB
/
uhome.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php include_once('fix_mysql.inc.php');
session_start();
require("header.php");
require("checkUser.php");
?>
<script type="text/javascript">
document.getElementById("auhome").className="active";
</script>
<br/><br/>
<h5><a href="que.php">My Questions</a>     
<a href="ans.php">My Answers </a></h5>
<br><br>
<div class="section value u-max-full-width" id="threadsSection">
<div class="container">
<div class="row">
<div class="three columns value">
<h1 class="value-heading" id="threadsHeading">Threads</h1>
</div>
</div>
<div class="row">
<table class="u-full-width">
<thead>
<tr>
<th class="two columns">Started By</th>
<th class="six columns">Title</th>
<th class="two columns">Date Posted</th>
<th class="two columns">Replies</th>
</tr>
</thead>
<tbody id="tableContent">
<?php
$sql="select * from question,user where question.user_id=user.user_id ORDER BY datetime desc limit 0,5";
$result=ExecuteQuery($sql);
while($row = mysql_fetch_array($result))
{
// echo "<span class='box2'>";
$rowsc=ExecuteQuery("SELECT count(*) as counter from answer where question_id=$row[question_id]");
$rowc = mysql_fetch_array($rowsc);
$count = $rowc['counter'];
echo "<table class='u-full-width'>";
echo "<tr><td class='two columns'>
<img src='$row[uimg]' alt='' style='width:75px;height:75px;' class='uimg'/>
$row[fullname]</td>
<td class='six columns'><a href='questionview.php?qid=$row[question_id]' >$row[heading]</a><br/><br/><br/>
$row[question_detail]</td>
<td class='two columns'>$row[datetime]<br/><br/><br/>
</td>
<td class='two columns'><br/>$count<br/><br/><br/></td></tr>";
echo "</table>";
}
?>
</tbody>
</table>
</div>
</div>
</div>