0) { // falls Eintraege freigeschaltet werden muessen, dann diese nur anzeigen, wenn Rechte vorhanden if((int) $gSettingsManager->get('enable_guestbook_moderation') > 0 && $getModeration) { $conditions = ' AND gbc_locked = 1 '; } else { $conditions = ' AND gbc_locked = 0 '; } $sql = 'SELECT * FROM '.TBL_GUESTBOOK_COMMENTS.' INNER JOIN '.TBL_GUESTBOOK.' ON gbo_id = gbc_gbo_id WHERE gbo_id = ? -- $getGbcGboId AND gbo_org_id = ? -- $gCurrentOrganization->getValue(\'org_id\') '.$conditions.' ORDER BY gbc_timestamp_create ASC'; $commentStatement = $gDb->queryPrepared($sql, array($getGbcGboId, (int) $gCurrentOrganization->getValue('org_id'))); if($commentStatement->rowCount() > 0) { $gbComment = new TableGuestbookComment($gDb); // Jetzt nur noch die Kommentare auflisten while ($row = $commentStatement->fetch()) { // GBComment-Objekt initialisieren und neuen DS uebergeben $gbComment->clear(); $gbComment->setArray($row); $gbcId = (int) $gbComment->getValue('gbc_id'); $getGbcGboId = (int) $gbComment->getValue('gbc_gbo_id'); $gbcEmail = $gbComment->getValue('gbc_email'); echo '