aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-01-18 02:13:02 +0000
committergweltas <gweltas@piwigo.org>2004-01-18 02:13:02 +0000
commit00ac0f8d3e45c4fa8b25c646c2b162742038849a (patch)
tree94a3447e7ef57e2a37c667248be79e48066435e1 /include
parent64e1ebb49cfa1f329bedbe62841c995f335810d3 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/init.inc.php5
-rw-r--r--include/page_header.php30
-rw-r--r--include/page_tail.php19
3 files changed, 54 insertions, 0 deletions
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 @@
+<?php
+
+//
+// Start output of page
+//
+$vtp = new VTemplate;
+$handle = $vtp->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.'&amp;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 @@
+<?php
+$handle = $vtp->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