0

I have spent a lot of time to find what's wrong with my code, but I couldn't find the reason why I have this error. In the logs, I have an error about the last line. The error is:

"PHP Parse error: syntax error, unexpected end of file in .... on line 57"

Here is the code :

<?php
if (!ISSET($_SESSION['id_user_admin'])) {
    header('location: ' . BASE_ADMIN_URL);
} else {
?>

<?php
    $this->title = WEBSITE_NAME . ' |  Panneau d\'Administration';
?>
<?php
    require('extendedcards_menu.php');
?>
<?php
    require __DIR__ . '/../errors/confirmation.php';
?>
<?php
    $htmlRows = '';
    if ($number_of_items) {

        while ($item = $items->fetch()) {
            $htmlRows .= '
        <tr>
      <td><h6 class="mt-2 text-left">' . $this->clean($item['date_creation_fr']) . '</h6></td>
      <td><h6 class="mt-2 text-left"><a target="_blank" href="' . BASE_ADMIN_URL . 'users/userread/' . $this->clean($item['id_user']) . '">
      ' . $this->clean($item['firstname']) . '&nbsp;' . $this->clean($item['name']) . '</a></span></td>
      <td><a href="' . BASE_ADMIN_URL . 'extendedcardsadmin/extendedcardread/' . $this->clean($item['itemid']) . '">
      <img width="125px" src="' . BASE_URL . 'public/images/extendedcard_images/' . $this->clean($item['image']) . '" class="figure-img img-fluid rounded-right"
      alt="' . $this->clean($item['title']) . '" title="' . $this->clean($item['title']) . '"></a></td>
      <td><span class="text-body newstitle"><a href="' . BASE_ADMIN_URL . 'extendedcardsadmin/extendedcardread/' . $this->clean($item['itemid']) . '">
      <h6 class="mt-2 text-left">' . $this->clean($item['title']) . '</h6></a></span></td>
      <td>';
?><?php
            if ($this->clean($item['draft']) == "yes") {
?><span class="badge badge-warning">Br.</span><?
            }
            ;
            '</td>
      <td><a href="' . BASE_ADMIN_URL . 'extendedcardsadmin/extendedcardread/' . $this->clean($item['itemid']) . '" role="button" class="btn btn-sm btn-primary">Modifier</a></td>
      <td><a href="' . BASE_ADMIN_URL . 'extendedcardsadmin/moveitemtobin/' . $this->clean($item['itemid']) . '" role="button" class="btn btn-sm btn-danger">Supprimer</a></td>
      </tr>
  ';
        }
        $htmlPagination .= '
      <tr>';
        if ($items_current_page > $number_of_items_pages) {
            require __DIR__ . '/../errors/item_not_found.php';
        } else {
            require('extendedcards_pagination.php');
        }
        '
    </tr>';
    } else {
        $htmlRows .= '
        <tr>
            <td colspan="5" align="center">Aucune Extended Card trouvée.</td>
        </tr>';
        $htmlPagination .= ' ';
    }
    $data = array(
        "html" => $htmlRows,
        "html" => $htmlPagination
    );
    echo json_encode($data);
?>
<?php
}
;
?>

Can you help me to find what's wrong?

Timus
  • 10,974
  • 5
  • 14
  • 28

0 Answers0