aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.inc.php9
-rw-r--r--include/functions_user.inc.php12
-rw-r--r--include/user.inc.php3
3 files changed, 13 insertions, 11 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index 844c8f433..577917e0d 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -112,7 +112,7 @@ $user = array();
$lang = array();
-include(PHPWG_ROOT_PATH .'config.php');
+include(PHPWG_ROOT_PATH .'include/mysql.inc.php');
if( !defined("PHPWG_INSTALLED") )
{
header( 'Location: install.php' );
@@ -121,18 +121,18 @@ if( !defined("PHPWG_INSTALLED") )
include(PHPWG_ROOT_PATH . 'include/constants.php');
+include(PHPWG_ROOT_PATH . 'include/config.inc.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
include(PHPWG_ROOT_PATH . 'include/template.php');
include(PHPWG_ROOT_PATH . 'include/vtemplate.class.php');
-include(PHPWG_ROOT_PATH . 'include/config.inc.php');
//
// Database connection
//
-mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
+mysql_connect( $dbhost, $dbuser, $dbpasswd )
or die ( "Could not connect to server" );
-mysql_select_db( $cfgBase )
+mysql_select_db( $dbname )
or die ( "Could not connect to database" );
//
@@ -210,3 +210,4 @@ if ( $user['is_the_guest'] ) $user['username'] = $lang['guest'];
include_once( './template/'.$user['template'].'/htmlfunctions.inc.php' );
define('PREFIX_TABLE', $table_prefix);
?>
+
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 1d205414f..34697897f 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -271,11 +271,11 @@ function init_userprefs($userdata)
function setup_style($style)
{
- $template_path = 'template/' ;
- $template_name = $style ;
-
- $template = new Template(PHPWG_ROOT_PATH . $template_path . $template_name);
- return $template;
+ $template_path = 'template/' ;
+ $template_name = $style ;
+ include_once( PHPWG_ROOT_PATH . $template_path . $template_name.'/htmlfunctions.inc.php' );
+ $template = new Template(PHPWG_ROOT_PATH . $template_path . $template_name);
+ return $template;
}
function encode_ip($dotquad_ip)
@@ -289,4 +289,4 @@ function decode_ip($int_ip)
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
}
-?> \ No newline at end of file
+?>
diff --git a/include/user.inc.php b/include/user.inc.php
index f28a395f0..c86ce93fc 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -128,6 +128,7 @@ $isadmin = false;
if ($user['status'] == 'admin') $isadmin =true;
// calculation of the number of picture to display per page
$user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
-
init_userprefs($user);
+$user['lien_expanded']='./template/'.$user['template'].'/theme/expanded..gif';
+$user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif';
?>