Commit c785268f authored by root's avatar root
Browse files

display comments for the admin

parent 7e453099
......@@ -155,7 +155,47 @@ function postOpinion($conn){
* Display all comments
* @param $conn : A valid database PDO connection
function showAllComments($conn){
global $VIEW;
$stmt = $conn->prepare("select * from comments ");
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
$VIEW['MAIN'].= HTMLbr().HTMLbr().HTMLbr().HTMLbr().
HTMLp("The users comments !",array("class"=>"alert alert-dark","style"=>"color:black !important;width:50%;margin-left:25%;")).
HTMLtag("ul",array("class"=>"list-group", "style"=>"max-width:70%;margin-left:15%"));
$item.= HTMLtag("li",array("class"=>"list-group-item", "style"=>"color:black !important; text-align:left;")).
"<h3 style=\"color:black !important;\">".
""."Comment : ".$line["content"].
$stmt = $conn->prepare("select from users join comments as s on where s.iduser=:id");
$stmt->bindParam(':id', $line["iduser"], PDO::PARAM_STR);
$result = $stmt->setFetchMode(PDO::FETCH_ASSOC);
"<h3 style=\"color:black !important; padding-left: 86%;\">".
""."Author : ".$line['name'].
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment