From 00ac0f8d3e45c4fa8b25c646c2b162742038849a Mon Sep 17 00:00:00 2001 From: gweltas Date: Sun, 18 Jan 2004 02:13:02 +0000 Subject: Conformity with the XHTML 1.0 transitional standard Creation of the following files : - template/default/header.php and template/default/footer.php to ensure a common standard - default.css to be CSS valid Obsolescence of the following files : - template/default/theme/conf.php - template/default/style.inc.php Custom galleries should reflect those changes. git-svn-id: http://piwigo.org/svn/branches/release-1_3@290 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/init.inc.php | 5 +++++ include/page_header.php | 30 ++++++++++++++++++++++++++++++ include/page_tail.php | 19 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 include/page_header.php create mode 100644 include/page_tail.php (limited to 'include') diff --git a/include/init.inc.php b/include/init.inc.php index 19e308441..6b3af68bb 100644 --- a/include/init.inc.php +++ b/include/init.inc.php @@ -16,6 +16,11 @@ * the Free Software Foundation; * * * ***************************************************************************/ +// determine the initial instant to indicate the generation time of this page +$t1 = explode( ' ', microtime() ); +$t2 = explode( '.', $t1[0] ); +$t2 = $t1[1].'.'.$t2[1]; + define( 'PREFIX_INCLUDE', '' ); include_once( './include/config.inc.php' ); diff --git a/include/page_header.php b/include/page_header.php new file mode 100644 index 000000000..68bb17993 --- /dev/null +++ b/include/page_header.php @@ -0,0 +1,30 @@ +Open( './template/'.$user['template'].'/header.vtp' ); +$vtp->setGlobalVar( $handle, 'charset', $lang['charset'] ); +$vtp->setGlobalVar( $handle, 'style', './template/'.$user['template'].'/'.$user['template'].'.css'); + + // refresh + if ( isset( $refresh ) && $refresh >0 && isset($url_link)) + { + $vtp->addSession( $handle, 'refresh' ); + $vtp->setVar( $handle, 'refresh.time', $refresh ); + $url = $url_link.'&slideshow='.$refresh; + $vtp->setVar( $handle, 'refresh.url', add_session_id( $url ) ); + $vtp->closeSession( $handle, 'refresh' ); + } + +$vtp->setGlobalVar( $handle, 'title', $title ); +$vtp->setVarF( $handle, 'header', './template/'.$user['template'].'/header.htm' ); + +// +// Generate the page +// + +$code = $vtp->Display( $handle, 0 ); +echo $code; +?> \ No newline at end of file diff --git a/include/page_tail.php b/include/page_tail.php new file mode 100644 index 000000000..d4548f170 --- /dev/null +++ b/include/page_tail.php @@ -0,0 +1,19 @@ +Open( './template/'.$user['template'].'/footer.vtp' ); + +//------------------------------------------------------------- generation time +$time = get_elapsed_time( $t2, get_moment() ); +$vtp->setGlobalVar( $handle, 'time', $time ); + +$vtp->setGlobalVar( $handle, 'generation_time', $lang['generation_time'] ); +$vtp->setGlobalVar( $handle, 'version', $conf['version'] ); +$vtp->setGlobalVar( $handle, 'site_url', $conf['site_url'] ); +$vtp->setVarF( $handle, 'footer', './template/'.$user['template'].'/footer.htm' ); + +// +// Generate the page +// + +$code = $vtp->Display( $handle, 0 ); +echo $code; +?> \ No newline at end of file -- cgit v1.2.3