-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresourceobtainer.php
More file actions
33 lines (29 loc) · 873 Bytes
/
Copy pathresourceobtainer.php
File metadata and controls
33 lines (29 loc) · 873 Bytes
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
<html>
<body>
<?php
include "dbclass.php";
if ($_GET['datarequest']=="comment") obtainComments();
else echo "No data requested...";
function obtainComments(){
$id = $_GET["BlogID"];
$numComments=countComments($id);
$allComments=getComments($id);
echo "<ul id=comments style='list-style: none;";//styles!!!!
echo "margin: 0; padding: 0;'> \n";
for($i=0; $i<$numComments;$i=$i+1){
//echo "<li>" . $allComments[$i]['Comment'] . "</li>";
echo "<li>" . $allComments[$i]['Comment']." - ";
echo "<span class='user' style='color:#41608F;'>".$allComments[$i]['User']."</span> ";
echo "<span style='color:gray'> at ";
$time=strtotime($allComments[$i]['Date']);
echo date("h:mA", $time)." on ". date("m/d/y", $time)."</span>";
echo "</li>";
if ($i+1<$numComments){
echo "<hr style='border:1px; width:2em;'/>";
}
}
echo "</ul>";
}
?>
</body>
</html>