<?php
// init database
if (!$dbh = mysql_pconnect ($db_hostname, $db_username, $db_password)) { echo mysql_error (); exit; }
mysql_select_db ($db_name, $dbh);
// compatibility with MySQL 5 Strict Mode
$mysql_ver = substr (mysql_get_server_info (), 0, 1);
if ($mysql_ver > 4) mysql_query ("SET @@global.sql_mode=''");
// READ CONFIG DB
$res = mysql_query ('SELECT * FROM m_config');
while ($row = mysql_fetch_array ($res))
{
$config[$row['config_id']] = $row['config_value'];
}
// more config
$txt['url'] = cur_url (); // current url
$txt['site_url'] = $config['site_url'];
// server dependent config
if (!get_magic_quotes_gpc ()) $config['gpc_quotes'] = 0; else $config['gpc_quotes'] = 1; // detect magic quote gpc
if (substr (php_uname (), 0, 7) == "Windows") $config['under_windows'] = 1; else $config['under_windows'] = 0;
// qTPL ADP
$adp2_prg_alias[1] = 'blog'; $adp2_prg_call[1] = 'blog.php';
$adp2_prg_alias[2] = 'category'; $adp2_prg_call[2] = 'category.php';
// power config
$config['short_query'] = 0; // do NOT change!
$config['multi_rte'] = 0; // do NOT change!
$config['total_mysql_query'] = 0; // do NOT change!
$config['force_redir'] = 1; // still redir after header sent?
$config['multi_lang'] = 0; // enable multi lingual support
$config['rte_skin'] = 'skins/_rte/editor.tpl'; // location of RTE skin (editor.tpl)
$config['rte_basedir'] = 'skins/_rte'; // top dir of RTE
$config['rte_rpc'] = 1; // convert relative address to absolute address while editing using RTE
// eg <img src="images/logo.gif"> to <img src="http://myweb.tld/images/logo.gif">
// this will be reverted to relative upon saving.
$config['list_ppp'] = 10; // num of pagination per page * REQUIRED IN PAGINATION() *
$config['abs_path'] = str_replace ('\\', '/', $config['abs_path']); // for Windows
// demo mode (as seen in our demo site)
$config['demo_mode'] = 0; // enable demo mode => caution! everything will be reset every 24 hours
$config['demo_path'] = './install1'; // demo mode support files location
?>