function getReviewsTable() { $reviewModel = new ReviewModel(); $reviews = $reviewModel->getReviews(); $result = "<div style='height:400px;overflow:auto;'>\n\t\t\t\t\t<table class='tables'>\n\t\t\t\t\t <thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t <th>Id review</th>\n\t\t\t\t\t\t <th>Description</th>\n\t\t\t\t\t\t <th>Id user</th>\n\t\t\t\t\t\t <th>Id book</th>\n\t\t\t\t\t\t <th>Approved</th>\n\t\t\t\t\t\t <th>Approve review</th>\n\t\t\t\t\t\t <th>Delete review</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t </thead>\n\t\t\t\t\t <tbody>"; foreach ($reviews as $review) { $result = $result . "<tr>\n\t\t\t\t\t\t <td>{$review->idReview}</td>\n\t\t\t\t\t\t <td><div style='width:600px;height:40px;overflow:auto;'>{$review->description}</div></td>\n\t\t\t\t\t\t <td>{$review->idUser}</td>\n\t\t\t\t\t\t <td>{$review->idBook}</td>\n\t\t\t\t\t\t <td>{$review->approved}</td>\n\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t<!--<input type='image' src='img/check.png' alt='submit' style = 'width: 40px; height: 40px;' name='approve'/>-->\n\t\t\t\t\t\t\t<input type='hidden' name='idreview' value='{$review->idReview}' />\n\t\t\t\t\t\t\t<input type='submit' name='approve' value='' id='approve'/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t \n\t\t\t\t\t\t <td>\n\t\t\t\t\t\t\t<form action='' method='post'>\n\t\t\t\t\t\t\t<!--<input type='image' src='img/check.png' alt='submit' style = 'width: 40px; height: 40px;' name='approve'/>-->\n\t\t\t\t\t\t\t<input type='hidden' name='idreview' value='{$review->idReview}' />\n\t\t\t\t\t\t\t<input type='submit' name='deletereview' value='' id='deletereview'/>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t</tr>"; } $result = $result . "</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t</div>"; return $result; }