Modifications linked to the move of admin.php to the root directory of PhpWebGallery

git-svn-id: http://piwigo.org/svn/trunk@228 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub 2003-11-03 21:35:24 +00:00
parent 5fdc7ea1e5
commit 860a39302e
8 changed files with 19 additions and 28 deletions

View file

@ -18,10 +18,10 @@
***************************************************************************/
//----------------------------------------------------------- personnal include
include_once( './include/isadmin.inc.php' );
include_once( './admin/include/isadmin.inc.php' );
//----------------------------------------------------- template initialization
$vtp = new VTemplate;
$handle = $vtp->Open( '../template/'.$user['template'].'/admin/admin.vtp' );
$handle = $vtp->Open( './template/'.$user['template'].'/admin.vtp' );
// language
$tpl = array( 'title_default','charset','install_warning' );
templatize_array( $tpl, 'lang', $handle );
@ -117,9 +117,9 @@ switch ( $_GET['page'] )
{
$title.= ' '.$lang['title_thumbnails_2'].' <span style="color:#006699;">';
// $_GET['dir'] contains :
// ../galleries/vieux_lyon ou
// ../galleries/vieux_lyon/visite ou
// ../galleries/vieux_lyon/visite/truc ...
// ./galleries/vieux_lyon ou
// ./galleries/vieux_lyon/visite ou
// ./galleries/vieux_lyon/visite/truc ...
$dir = explode( "/", $_GET['dir'] );
$title.= $dir[2];
for ( $i = 3; $i < sizeof( $dir ) - 1; $i++ )
@ -237,13 +237,13 @@ $vtp->closeSession( $handle, 'summary' );
// back to thumbnails page
$vtp->addSession( $handle, 'summary' );
$vtp->setVar( $handle, 'summary.indent', '| ' );
$vtp->setVar( $handle, 'summary.link', add_session_id( '../category.php' ) );
$vtp->setVar( $handle, 'summary.link', add_session_id( './category.php' ) );
$vtp->setVar( $handle, 'summary.name', $lang['menu_back'] );
$vtp->closeSession( $handle, 'summary' );
//------------------------------------------------------------- content display
if ( $page_valide )
{
include ( $_GET['page'].'.php' );
include ( './admin/'.$_GET['page'].'.php' );
}
else
{

View file

@ -60,17 +60,12 @@ function display_pictures( $mysql_result, $maxtime, $validation_box = false )
$name.= ' [ '.$subrow['file'].' ]';
$vtp->setVar( $sub, 'picture.title', $name );
// source of the thumbnail picture
$src = '';
if ( $array_cat_site_id[$subrow['cat_id']] == 1 )
{
$src.= '.';
}
$src.= $array_cat_directories[$subrow['cat_id']];
$src = $array_cat_directories[$subrow['cat_id']];
$src.= 'thumbnail/'.$conf['prefix_thumbnail'];
$src.= $file.'.'.$subrow['tn_ext'];
$vtp->setVar( $sub, 'picture.thumb_src', $src );
// link to the full size picture
$url = '../picture.php?cat='.$subrow['cat_id'];
$url = './picture.php?cat='.$subrow['cat_id'];
$url.= '&amp;image_id='.$row['image_id'];
$vtp->setVar( $sub, 'picture.thumb_url', add_session_id( $url ) );
// 3. for each picture, retrieving all comments

View file

@ -589,7 +589,7 @@ $vtp->addSession( $sub, 'param_line' );
$vtp->setVar( $sub, 'param_line.name', $lang['customize_language'] );
$vtp->addSession( $sub, 'select' );
$vtp->setVar( $sub, 'select.name', 'language' );
$option = get_languages( '../language/' );
$option = get_languages( './language/' );
for ( $i = 0; $i < sizeof( $option ); $i++ )
{
$vtp->addSession( $sub, 'option' );

View file

@ -29,7 +29,7 @@ foreach ( $categories as $category ) {
if ( $category == 'images' )
{
$vtp->addSession( $sub, 'illustration' );
$vtp->setVar( $sub, 'illustration.pic_src', './images/admin.png' );
$vtp->setVar( $sub, 'illustration.pic_src', './admin/images/admin.png' );
$vtp->setVar( $sub, 'illustration.pic_alt', '' );
$vtp->setVar( $sub, 'illustration.caption', $lang['help_images_intro'] );
$vtp->closeSession( $sub, 'illustration' );

View file

@ -272,10 +272,6 @@ if ( isset( $page['cat'] ) )
get_complete_dir( $row['storage_category_id'] );
}
$thumbnail_url = $array_cat_directories[$row['storage_category_id']];
if ( preg_match( '/^\.\/galleries/', $thumbnail_url ) )
{
$thumbnail_url = '.'.$thumbnail_url;
}
$thumbnail_url.= 'thumbnail/';
$thumbnail_url.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext'];
$vtp->setVar( $sub, 'picture.thumbnail_url', $thumbnail_url );

View file

@ -421,7 +421,7 @@ if ( isset( $_GET['dir'] ) )
else
{
$vtp->addSession( $sub, 'directory_list' );
get_displayed_dirs( '../galleries', 60 );
get_displayed_dirs( './galleries', 60 );
$vtp->closeSession( $sub, 'directory_list' );
}
//----------------------------------------------------------- sending html code

View file

@ -22,12 +22,12 @@ include_once( './admin/include/isadmin.inc.php' );
function insert_local_category( $cat_id )
{
global $conf, $page, $user, $lang;
$site_id = 1;
// 0. retrieving informations on the category to display
$cat_directory = '../galleries';
$cat_directory = './galleries';
if ( is_numeric( $cat_id ) )
{
$cat_directory.= '/'.get_local_dir( $cat_id );
@ -64,7 +64,7 @@ function insert_local_category( $cat_id )
while ( $row = mysql_fetch_array( $result ) )
{
// retrieving the directory
$rep = '../galleries/'.get_local_dir( $row['id'] );
$rep = './galleries/'.get_local_dir( $row['id'] );
// is the directory present ?
if ( !is_dir( $rep ) ) delete_category( $row['id'] );
}
@ -588,7 +588,7 @@ if ( !isset( $_GET['update'] )
$vtp->setVar( $sub, 'introduction.all:url', $url );
$vtp->closeSession( $sub, 'introduction' );
}
//------------------------------------------------- local update : ../galleries
//-------------------------------------------------- local update : ./galleries
else
{
$count_new = 0;

View file

@ -216,7 +216,7 @@ if ( $user['status'] == 'admin' )
{
$vtp->addSession( $handle, 'summary' );
$vtp->setVar( $handle, 'summary.url',
add_session_id( './admin/admin.php' ) );
add_session_id( './admin.php' ) );
$vtp->setVar( $handle, 'summary.title', $lang['hint_admin'] );
$vtp->setVar( $handle, 'summary.name', replace_space( $lang['admin'] ) );
$vtp->closeSession( $handle, 'summary' );