diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-07 02:07:55 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-07 02:07:55 +0000 |
commit | 5a7723ff10ee2b01770542b2b5726cdfb8769e4a (patch) | |
tree | 75c44637d12d9eeaef8fa80ddca680b554d17d17 /admin/upload.php | |
parent | 111a34e5814410be7cf17675d89687c4f420ab8a (diff) |
- some more smarty migration (admin upload ws_checker profile and plugin)
git-svn-id: http://piwigo.org/svn/trunk@2260 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/upload.php')
-rw-r--r-- | admin/upload.php | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/admin/upload.php b/admin/upload.php index 9bc0f5067..55e774de4 100644 --- a/admin/upload.php +++ b/admin/upload.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | file : $Id$ // | last update : $Date$ @@ -143,7 +143,7 @@ $template->set_filenames(array('upload'=>'admin/upload.tpl')); // TabSheet initialization waiting_tabsheet(); -$template->assign_vars(array( +$template->assign(array( 'F_ACTION'=>str_replace( '&', '&', $_SERVER['REQUEST_URI']) )); @@ -156,7 +156,6 @@ $query.= " WHERE validated = 'false'"; $query.= ' ORDER BY storage_category_id'; $query.= ';'; $result = pwg_query( $query ); -$i = 0; while ( $row = mysql_fetch_array( $result ) ) { if ( !isset( $cat_names[$row['storage_category_id']] ) ) @@ -169,13 +168,9 @@ while ( $row = mysql_fetch_array( $result ) ) get_cat_display_name($cat['upper_names']); } $preview_url = PHPWG_ROOT_PATH.$cat_names[$row['storage_category_id']]['dir'].$row['file']; - $class='row1'; - if ( $i++ % 2== 0 ) $class='row2'; - $template->assign_block_vars( - 'picture', + $tpl_var = array( - 'WAITING_CLASS'=>$class, 'CATEGORY_IMG'=>$cat_names[$row['storage_category_id']]['display_name'], 'ID_IMG'=>$row['id'], 'DATE_IMG' => date('Y-m-d H:i:s', $row['date']), @@ -186,7 +181,6 @@ while ( $row = mysql_fetch_array( $result ) ) 'PREVIEW_URL_IMG'=>$preview_url, 'UPLOAD_EMAIL'=>get_email_address_as_display_text($row['mail_address']), 'UPLOAD_USERNAME'=>$row['username'] - ) ); // is there an existing associated thumnail ? @@ -198,26 +192,20 @@ while ( $row = mysql_fetch_array( $result ) ) $url = $cat_names[$row['storage_category_id']]['dir']; $url.= 'thumbnail/'.$thumbnail; - $template->assign_block_vars( - 'picture.thumbnail', + $tpl_var['thumbnail'] = array( 'PREVIEW_URL_TN_IMG' => $url, 'FILE_TN_IMG' => (strlen($thumbnail) > 10) ? (substr($thumbnail, 0, 10)).'...' : $thumbnail, 'FILE_TN_TITLE' => $thumbnail - ) ); } - + $template->append('pictures', $tpl_var); array_push($list, $row['id']); } -$template->assign_vars( - array( - 'LIST' => implode(',', $list) - ) - ); +$template->assign('LIST',implode(',', $list) ); //----------------------------------------------------------- sending html code $template->assign_var_from_handle('ADMIN_CONTENT', 'upload'); |