Location: PHPKode > projects > MGB OpenSource Guestbook > mgb-0.6.9.1/includes/load_settings.inc.php
<?php
	/*
	MGB 0.6.x - OpenSource PHP and MySql Guestbook
	Copyright (C) 2004 - 2011 Juergen Grueneisl - http://www.m-gb.org/

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
	*/

	// =========================== //
	// load_settings.inc.php - 1.0 //
	// =========================== //
	//
	// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //

	// load settings from database
	$sql = "SELECT
			title,
			h_author,
			h_domain,
			gb_path,
			h_keywords,
			h_description,
			admin_name,
			admin_email,
			admin_gbemail,
			sendmail_admin,
			sendmail_admin_text,
			sendmail_user,
			sendmail_user_text,
			sendmail_user_notification_text,
			sendmail_comment_text,
			sendmail_contactmail_text,
			template_path,
			template_style_path,
			iconset_path,
			language_path,
			badwords,
			bbcode,
			allow_img_tag,
			max_img_width,
			max_img_height,
			center_img,
			allow_flash_tag,
			max_flash_width,
			max_flash_height,
			center_flash,
			smileys,
			smileys_break,
			smileys_order,
			captcha,
			captcha_method,
			captcha_coords_x,
			captcha_coords_y,
			captcha_color,
			captcha_angle_1,
			captcha_angle_2,
			akismet_plugin,
			akismet_api,
			akismet_mark_as_spam,
			time_lock,
			time_lock_value,
			time_lock_maxtime,
			user_notification,
			user_show_email,
			session_timeout,
			password_min_length,
			moderated,
			entries_per_page,
			entries_order,
			entries_order_asc_desc,
			entries_numbering,
			spam_protection,
			ipblocker,
			wordwrap,
			dateform,
			gravatar_show,
			gravatar_rating,
			gravatar_type,
			gravatar_size,
			gravatar_position,
			version FROM ".$db['prefix']."settings";

	$link = @mysql_connect($db['hostname'], $db['username'], $db['password']) or die ("(load_settings.inc.php) Error, line 95: ".mysql_error());
	@mysql_select_db($db['dbname'], $link) or die ("(load_settings.inc.php) Error, line 96: ".mysql_error());
	$result = @mysql_query($sql, $link) or die ("(load_settings.inc.php) Error, line 97: ".mysql_error()."<br><br>Did you upgrade to a newer version shortly? Try to run <a href='install/upgrade.php'>upgrade.php</a> in install directory if this problem exists permanently.");

	$settings = @mysql_fetch_array($result);

	$settings['sendmail_admin_text'] = xhtmlbr2nl($settings['sendmail_admin_text']);
	$settings['sendmail_user_text'] = xhtmlbr2nl($settings['sendmail_user_text']);
	$settings['sendmail_user_notification_text'] = xhtmlbr2nl($settings['sendmail_user_notification_text']);
	$settings['sendmail_comment_text'] = xhtmlbr2nl($settings['sendmail_comment_text']);
	$settings['sendmail_contactmail_text'] = xhtmlbr2nl($settings['sendmail_contactmail_text']);
?>
Return current item: MGB OpenSource Guestbook