mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
Migration of installation procedure
git-svn-id: http://piwigo.org/svn/trunk@367 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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);
|
||||
?>
|
||||
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -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';
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user