Discussion:
Advanced Guestbook 2.4.1
(te oud om op te antwoorden)
Wigér
17 jaar geleden
Permalink
Betreft gastenboek "Advanced Guestbook 2.4.1"

Hoe kan ik bij de antispamcode een tekst toevoegen dat men daar een code in
moet voeren?
Wigér
17 jaar geleden
Permalink
Post by Wigér
Betreft gastenboek "Advanced Guestbook 2.4.1"
Hoe kan ik bij de antispamcode een tekst toevoegen dat men daar een code
in moet voeren?
Dit staat er nu:
<?php
$include_path = dirname(__FILE__);
include_once $include_path."/admin/config.inc.php";
include_once $include_path."/lib/$DB_CLASS";
include_once $include_path."/lib/captcha.class.php";

if (USE_CAPTCHA) {
if (isset($_GET['id']) && !empty($_GET['id'])) {
$_GET['id'] = trim($_GET['id']);
$id = addslashes($_GET['id']);
$expired = time() - 2*3600;
$db = new gbook_sql();
$db->connect();
$db->query("DELETE FROM {$GB_TBL["cap"]} WHERE timestamp < $expired");
$res = $db->query("SELECT * FROM {$GB_TBL["cap"]} WHERE session_id='$id'
LIMIT 1");
$result = $db->fetch_array($res);
if (isset($result['validate_key'])) {
$imageType = "";
if (extension_loaded("gd") && function_exists("imagettftext")) {
$img = new SimpleCaptcha();
$img->setFontSizeRange(14,18);
reset($img->supportedImagesTypes);
$imageType = key($img->supportedImagesTypes);
} else {
include_once $include_path."/lib/bitmapimagetext.class.php";
$img = new BitmapImageText();
}

$img->setText($result['validate_key']);
$img->setBackgroundColors(array("EEEEEE", "F2F3D3", "F5EAEA", "E4F3EE",
"EEE4F3", "FFE6E6"));
$img->setTextColors(array("000000", "FD130A", "0A1BFD", "149703",
"486C66", "870DC3", "D78406", "105243"));
if (!empty($imageType)) {
$img->getImage($imageType);
} else {
$img->getImage();
}
exit();
}
}
}

SimpleCaptcha::createPixel();

?>

Loading...