* Based on Advanced Guestbook 2.3.x (PHP/MySQL) * Copyright (c)2001 Chi Kien Uong * URL: http://www.proxy2.de * Last Modified: Wed, 13 March 2013 20:17:01 GMT * ---------------------------------------------- */ ob_start(); define('LAZ_INCLUDE_PATH', dirname(__FILE__)); require_once LAZ_INCLUDE_PATH . '/admin/version.php'; require_once LAZ_INCLUDE_PATH . '/admin/config.inc.php'; require_once LAZ_INCLUDE_PATH . '/lib/mysql.class.php'; require_once LAZ_INCLUDE_PATH . '/lib/vars.class.php'; require_once LAZ_INCLUDE_PATH . '/lib/template.class.php'; define('LAZ_TABLE_PREFIX', $table_prefix); $entry = isset($_GET['entry']) ? intval($_GET['entry']) : 0; $db = new guestbook_vars(LAZ_INCLUDE_PATH); $db->getVars(); header('Content-type: application/xml; charset=' . $db->VARS['charset'] . ''); function selfURL() { $s = empty($_SERVER['HTTPS']) ? '' : $_SERVER['HTTPS'] == 'on' ? 's' : ''; $protocol = strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s; $port = $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']; return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); } $whereRwe = selfURL(); $i = 0;
// 4 = No font files loaded (not freetype) // 5 = Failed header test // ///////////////////////////////////////////// // Lets grab the database username to use as a key //LAZ_INCLUDE_PATH = dirname(__FILE__); define('LAZ_INCLUDE_PATH', dirname(__FILE__)); require_once LAZ_INCLUDE_PATH . '/admin/version.php'; require_once LAZ_INCLUDE_PATH . '/admin/config.inc.php'; require_once LAZ_INCLUDE_PATH . '/lib/mysql.class.php'; require_once LAZ_INCLUDE_PATH . '/lib/vars.class.php'; require_once LAZ_INCLUDE_PATH . '/lib/template.class.php'; $number_of_chars = 5; // DO NOT TOUCH THIS!!!! define('LAZ_TABLE_PREFIX', $table_prefix); $db = new guestbook_vars(LAZ_INCLUDE_PATH); $db->getVars(); $usecolor = $db->VARS['captcha_grey'] ? 0 : 1; $image_height = !empty($db->VARS['captcha_height']) && is_int(intval($db->VARS['captcha_height'])) ? $db->VARS['captcha_height'] : 100; $image_width = !empty($db->VARS['captcha_width']) && is_int(intval($db->VARS['captcha_width'])) ? $db->VARS['captcha_width'] : 350; $thekey = !empty($GB_DB['user']) ? $GB_DB['user'] : '******'; // create an image with width 120px, height 20px $image = imagecreatetruecolor($image_width, $image_height); // Assign a background colour $background = imagecolorallocate($image, 255, 255, 255); // Make background transparent if desired if ($db->VARS['captcha_trans'] == 1) { imagecolortransparent($image, $background); } // Fill it in with the background colour imagefill($image, 0, 0, $background);