<?php
// Soll IP Lock aktiviert werden (true / false)
$ipLockStatus = true;
include_once($rel."libraries/BTPL_functions.inc.php");
// Ip Objekt instanziieren, damit IP Lock Funktionen genutzt werden können
include_once($path["cb"].$cbDirLib."CB_ip.class.php" );
$ipObject = &new CB_ip();
// Module String for ip_table
$ipObject->setModule("guestbook");
// Time Difference of 10 minutes in seconds
$ipObject->setTimeDifference("60");
// Typ setzen ... hier Gästebuch
$type = "guestbook";
// Gästebuch ID, frei wählbar, mehrere Gästebücher pro C*B dadurch möglich
$entryID = 1;
$submitLabel = "GUESTBOOK_submit";
$outputOrder = "ORDER BY datetime DESC";
$outputLimit = "";
// Check ob der User innerhalb der Frist schon mal gepostet hat
$lockUser = false;
if($ipLockStatus) {
$lockUser = $ipObject->checkIPLock($entryID);
}
// Wenn User nicht gepostet hat, dann insertComment
if(isset($GUESTBOOK_submit)) {
if(!$lockUser) {
include($rel."libraries/comment/insertComment.php");
// Wenn IP Lock aktiviert ist, User loggen
if($ipLockStatus) {
$ipObject->setIPEntry($entryID);
}
}
}
// restlichen Kommentare in jedem Fall anzeigen
include($rel."libraries/comment/displayComments.php");
$tpl->display("entries.template", null, "guestbook");
?>