name = $guestbookfile; $gb->server = $db_server; $gb->login = $db_login; $gb->password = $db_password; $gb->database = $db_database; $gb->init(); $bf = new mysql; $bf->name = $blocking_file; $bf->server = $db_server; $bf->login = $db_login; $bf->password = $db_password; $bf->database = $db_database; $bf->init(); } if ( $data_source == "csvfile" ) { // include class for csv-textfile support require ( "csvfile.inc.php" ); // prepare object for file access $gb = new csvfile; $gb->name = $guestbookfile; $gb->init(); $bf = new csvfile; $bf->name = $blocking_file; $bf->init(); } ?> //Following line used for testing //echo $REMOTE_ADDR; if ($REMOTE_ADDR == "") { echo "
Toegang geweigerd!
"; exit("Sorry, maar u heeft geen toegang tot deze site!."); } if ($REMOTE_ADDR == "") { echo "Toegang geweigerd!
"; exit("Sorry, maar u heeft geen toegang tot deze site!."); } if ($REMOTE_ADDR == "") { echo "Toegang geweigerd!
"; exit("Sorry, maar u heeft geen toegang tot deze site!."); } ?>append( $dummy ); } function check_ip( ) // Task: checks whether the ip address of the surfer is invalid // // Input: none // // Output: none { global $_like_you_anyway, $bf, $REMOTE_ADDR; $stamp = gmmktime(); $max = $bf->entries(); $search_pattern = array(); $search_pattern["ip"] = $REMOTE_ADDR; $position = $bf->find_entry( $search_pattern ); if ( $position < $max ) { $entry = array(); $bf->get_entry( $position, $entry ); // does the visitor try to spam the guestbook? if ( ($entry["ip"] == $REMOTE_ADDR ) and ($stamp <= $entry["timestamp"]) ) { echo $_like_you_anyway; exit(); } } } function email_notification( $ddate, $ttime, $ip, $name, $mail, $msg, $key ) // Task: notifies the webmaster by e-mail if a new guestbook entry was made // // Input: none // // Output: none { global $administrator_address, $_new_entry, $_permit, $_delete, $_change, $_guestbook, $guestbook_id, $SERVER_NAME, $SCRIPT_NAME, $gmt_ofs, $language, $_guestbook_admin_tool, $quick_admin; $mailheader = trim( "From: ".$_guestbook."
$_het bericht is toegevoegd
"; if ($permission_required) echo "$_permission_info_message
"; echo ''; exit; } // Show current page of the Guestbook! if ( !empty( $HTTP_GET_VARS[ "page" ] ) ) { $page = $HTTP_GET_VARS[ "page" ]; } else $page = 1; if ($page > 1) $separate_input_form = true; $entries = $gb->entries(); $maxpages = ceil( $entries / $entries_per_page ); if ( $page < $maxpages ) { $nextpage = $page+1; } else { $nextpage = $maxpages; } $lastpage = $page-1; if ($page > 1) $seperate_input_form = true; if ( !empty( $HTTP_GET_VARS["do"] ) ) { $do = $HTTP_GET_VARS["do"]; } else { $do = "default"; } if ( !$separate_input_form ) { require ( "form.inc.php" ); } elseif ($do != "sign_in") { echo '
'; } if ($do != "sign_in") { $pagenavigation = <<