aboutsummaryrefslogtreecommitdiffstats
path: root/upload.php
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 /upload.php
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 '')
-rw-r--r--upload.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/upload.php b/upload.php
index 91f93e973..98505961b 100644
--- a/upload.php
+++ b/upload.php
@@ -109,13 +109,7 @@ if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
$page['cat_site_id'] = $result['site_id'];
$page['cat_name'] = $result['name'];
$page['cat_uploadable'] = $result['uploadable'];
-}
-else
-{
- $access_forbidden = true;
-}
-if ( $access_forbidden == true
- or $page['cat_site_id'] != 1
+if ( $page['cat_site_id'] != 1
or !$conf['upload_available']
or !$page['cat_uploadable'] )
{
@@ -124,8 +118,13 @@ if ( $access_forbidden == true
echo $lang['thumbnails'].'</a></div>';
exit();
}
+}
//----------------------------------------------------- template initialization
-$vtp = new VTemplate;
+//
+// Start output of page
+//
+$title= $lang['upload_title'];
+include('include/page_header.php');
$handle = $vtp->Open( './template/'.$user['template'].'/upload.vtp' );
initialize_template();
@@ -347,12 +346,16 @@ if ( !$page['upload_successful'] )
else $mail_address=$user['mail_address'];
$vtp->setGlobalVar( $handle, 'user_mail_address',$user['mail_address'] );
// name of the picture
+ if (isset($_POST['name']))
$vtp->setVar( $handle, 'fields.name', $_POST['name'] );
// author
+ if (isset($_POST['author']))
$vtp->setVar( $handle, 'fields.author', $_POST['author'] );
// date of creation
+ if (isset($_POST['date_creation']))
$vtp->setVar( $handle, 'fields.date_creation', $_POST['date_creation'] );
// comment
+ if (isset($_POST['comment']))
$vtp->setVar( $handle, 'fields.comment', $_POST['comment'] );
$vtp->closeSession( $handle, 'fields' );
@@ -373,4 +376,5 @@ $vtp->setGlobalVar( $handle, 'return_url', add_session_id( $url ) );
//----------------------------------------------------------- html code display
$code = $vtp->Display( $handle, 0 );
echo $code;
+include('include/page_tail.php');
?> \ No newline at end of file