Changeset 3225
- Timestamp:
- 11/28/2005 11:13:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/inline-uploading.php
r3181 r3225 6 6 die(__('You do not have permission to edit posts.')); 7 7 8 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment' , 'flickrtag');8 $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment'); 9 9 10 10 for ($i=0; $i<count($wpvarstoreset); $i += 1) { … … 38 38 case 'delete': 39 39 40 if ( !current_user_can('edit_post', (int) $attachment) ) 41 die(printf(__('You are not allowed to delete this attachment. %sGo back</a>'), '<a href="'.basename(__FILE__)."?post=$post&all=$all&action=upload\">") ); 42 40 43 wp_delete_attachment($attachment); 41 44 … … 69 72 $id = wp_insert_attachment($attachment, $file, $post); 70 73 71 // Generate the attachment's postmeta. 72 $imagesize = getimagesize($file); 73 $imagedata['width'] = $imagesize['0']; 74 $imagedata['height'] = $imagesize['1']; 75 list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']); 76 $imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'"; 77 $imagedata['file'] = $file; 78 $imagedata['thumb'] = "thumb-$filename"; 79 80 add_post_meta($id, '_wp_attachment_metadata', $imagedata); 81 82 if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { 83 if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) 84 $error = wp_create_thumbnail($file, 128); 85 elseif ( $imagedata['height'] > 96 ) 86 $error = wp_create_thumbnail($file, 96); 74 if ( preg_match('!^image/!', $attachment['post_mime_type']) ) { 75 // Generate the attachment's postmeta. 76 $imagesize = getimagesize($file); 77 $imagedata['width'] = $imagesize['0']; 78 $imagedata['height'] = $imagesize['1']; 79 list($uwidth, $uheight) = get_udims($imagedata['width'], $imagedata['height']); 80 $imagedata['hwstring_small'] = "height='$uheight' width='$uwidth'"; 81 $imagedata['file'] = $file; 82 $imagedata['thumb'] = "thumb-$filename"; 83 84 add_post_meta($id, '_wp_attachment_metadata', $imagedata); 85 86 if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { 87 if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 ) 88 $error = wp_create_thumbnail($file, 128); 89 elseif ( $imagedata['height'] > 96 ) 90 $error = wp_create_thumbnail($file, 96); 91 } 92 } else { 93 add_post_meta($id, '_wp_attachment_metadata', array()); 87 94 } 88 95 … … 109 116 } 110 117 118 if (! current_user_can('edit_others_posts') ) 119 $and_user = "AND post_author = " . $user_ID; 120 111 121 if ( $last ) 112 $start = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image'$and_post") - $num;122 $start = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' $and_user $and_post") - $num; 113 123 else 114 124 $start = (int) $start; … … 120 130 $sort = "post_date_gmt DESC"; 121 131 122 $ images = $wpdb->get_results("SELECT ID, post_date, post_title, guid FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image' $and_postORDER BY $sort LIMIT $start, $double", ARRAY_A);123 124 if ( count($ images) == 0 ) {132 $attachments = $wpdb->get_results("SELECT ID, post_date, post_title, post_mime_type, guid FROM $wpdb->posts WHERE post_status = 'attachment' $and_type $and_post $and_user ORDER BY $sort LIMIT $start, $double", ARRAY_A); 133 134 if ( count($attachments) == 0 ) { 125 135 header("Location: ".basename(__FILE__)."?post=$post&action=upload"); 126 136 die; 127 } elseif ( count($ images) > $num ) {128 $next = $start + count($ images) - $num;137 } elseif ( count($attachments) > $num ) { 138 $next = $start + count($attachments) - $num; 129 139 } else { 130 140 $next = false; … … 140 150 141 151 $uwidth_sum = 0; 142 $ images_html = '';143 $ images_style = '';144 $ images_script = '';145 if ( count($ images) > 0 ) {146 $ images = array_slice( $images, 0, $num );152 $html = ''; 153 $style = ''; 154 $script = ''; 155 if ( count($attachments) > 0 ) { 156 $attachments = array_slice( $attachments, 0, $num ); 147 157 $__delete = __('Delete'); 148 $__attachment_on = __('Link to Page'); 149 $__attachment_off = __('Link to Image'); 150 $__thumbnail_on = __('Use Thumbnail'); 151 $__thumbnail_off = __('Use Full Image'); 158 $__not_linked = __('Not Linked'); 159 $__linked_to_page = __('Linked to Page'); 160 $__linked_to_image = __('Linked to Image'); 161 $__using_thumbnail = __('Using Thumbnail'); 162 $__using_original = __('Using Original'); 152 163 $__no_thumbnail = __('<del>No Thumbnail</del>'); 153 164 $__close = __('Close Options'); 154 $__confirmdelete = __('Delete this photofrom the server?');165 $__confirmdelete = __('Delete this file from the server?'); 155 166 $__nothumb = __('There is no thumbnail associated with this photo.'); 156 $images_script .= "attachmenton = '$__attachment_on';\nattachmentoff = '$__attachment_off';\n"; 157 $images_script .= "thumbnailon = '$__thumbnail_on';\nthumbnailoff = '$__thumbnail_off';\n"; 158 foreach ( $images as $key => $image ) { 159 $attachment_ID = $image['ID']; 160 $meta = get_post_meta($attachment_ID, '_wp_attachment_metadata', true); 167 $script .= "notlinked = '$__not_linked'; 168 linkedtoimage = '$__linked_to_image'; 169 linkedtopage = '$__linked_to_page'; 170 usingthumbnail = '$__using_thumbnail'; 171 usingoriginal = '$__using_original'; 172 "; 173 foreach ( $attachments as $key => $attachment ) { 174 $ID = $attachment['ID']; 175 $meta = get_post_meta($ID, '_wp_attachment_metadata', true); 161 176 if (!is_array($meta)) { 162 $meta = get_post_meta($ attachment_ID, 'imagedata', true); // Try 1.6 Alpha meta key177 $meta = get_post_meta($ID, 'imagedata', true); // Try 1.6 Alpha meta key 163 178 if (!is_array($meta)) { 164 continue; 179 $meta = array(); 180 } 181 add_post_meta($ID, '_wp_attachment_metadata', $meta); 182 } 183 $attachment = array_merge($attachment, $meta); 184 $delete_cancel = "<a onclick=\"return confirm('$__confirmdelete')\" href=\"".basename(__FILE__)."?action=delete&attachment={$ID}&all=$all&start=$start&post=$post\">$__delete</a> 185 <a onclick=\"popup.style.display='none';return false;\" href=\"javascript:void()\">$__close</a> 186 "; 187 $uwidth_sum += 128; 188 if ( preg_match('!^image/!', $attachment['post_mime_type'] ) ) { 189 $image = & $attachment; 190 if ( ($image['width'] > 128 || $image['height'] > 96) && !empty($image['thumb']) && file_exists(dirname($image['file']).'/'.$image['thumb']) ) { 191 $src = str_replace(basename($image['guid']), $image['thumb'], $image['guid']); 192 $script .= "src{$ID}a = '$src'; 193 src{$ID}b = '{$image['guid']}'; 194 "; 195 $thumb = 'true'; 196 $thumbtext = $__using_thumbnail; 165 197 } else { 166 add_post_meta($attachment_ID, '_wp_attachment_metadata', $meta); 198 $src = $image['guid']; 199 $thumb = 'false'; 200 $thumbtext = $__no_thumbnail; 167 201 } 168 } 169 $image = array_merge($image, $meta); 170 if ( ($image['width'] > 128 || $image['height'] > 96) && !empty($image['thumb']) && file_exists(dirname($image['file']).'/'.$image['thumb']) ) { 171 $src = str_replace(basename($image['guid']), '', $image['guid']) . $image['thumb']; 172 $images_script .= "src".$attachment_ID."a = '$src';\nsrc".$attachment_ID."b = '".$image['guid']."';\n"; 173 $thumb = 'true'; 174 $thumbtext = $__thumbnail_on; 175 } else { 176 $src = $image['guid']; 177 $thumb = 'false'; 178 $thumbtext = $__no_thumbnail; 179 } 180 list($image['uwidth'], $image['uheight']) = get_udims($image['width'], $image['height']); 181 $height_width = 'height="'.$image['uheight'].'" width="'.$image['uwidth'].'"'; 182 $uwidth_sum += 128; 183 $xpadding = (128 - $image['uwidth']) / 2; 184 $ypadding = (96 - $image['uheight']) / 2; 185 $images_style .= "#target{$attachment_ID} img { padding: {$ypadding}px {$xpadding}px; }\n"; 186 $href = get_attachment_link($attachment_ID); 187 $images_script .= "href{$attachment_ID}a = '$href';\nhref{$attachment_ID}b = '{$image['guid']}';\n"; 188 $images_html .= " 189 <div id='target{$attachment_ID}' class='imagewrap left'> 190 <div id='popup{$attachment_ID}' class='popup'> 191 <a id=\"L{$attachment_ID}\" onclick=\"toggleLink({$attachment_ID});return false;\" href=\"javascript:void();\">$__attachment_on</a> 192 <a id=\"I{$attachment_ID}\" onclick=\"if($thumb)toggleImage({$attachment_ID});else alert('$__nothumb');return false;\" href=\"javascript:void();\">$thumbtext</a> 193 <a onclick=\"return confirm('$__confirmdelete')\" href=\"".basename(__FILE__)."?action=delete&attachment={$attachment_ID}&all=$all&start=$start&post=$post\">$__delete</a> 194 <a onclick=\"popup.style.display='none';return false;\" href=\"javascript:void()\">$__close</a> 202 list($image['uwidth'], $image['uheight']) = get_udims($image['width'], $image['height']); 203 $height_width = 'height="'.$image['uheight'].'" width="'.$image['uwidth'].'"'; 204 $xpadding = (128 - $image['uwidth']) / 2; 205 $ypadding = (96 - $image['uheight']) / 2; 206 $style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n"; 207 $href = get_attachment_link($ID); 208 $script .= "a{$ID}a = '<a id=\"{$ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">'; 209 a{$ID}b = '<a class=\"imagelink\" href=\"{$image['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">'; 210 img{$ID}a = '<img id=\"image{$ID}\" src=\"$src\" alt=\"{$image['post_title']}\" $height_width />'; 211 img{$ID}b = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$image['post_title']}\" $height_width />'; 212 "; 213 $html .= "<div id='target{$ID}' class='attwrap left'> 214 <div id='popup{$ID}' class='popup'> 215 <a id=\"I{$ID}\" onclick=\"if($thumb)toggleImage({$ID});else alert('$__nothumb');return false;\" href=\"javascript:void()\">$thumbtext</a> 216 <a id=\"L{$ID}\" onclick=\"toggleLink({$ID});return false;\" href=\"javascript:void()\">$__not_linked</a> 217 {$delete_cancel} 195 218 </div> 196 < a id=\"{$attachment_ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"imagePopup({$attachment_ID});return false;\" title=\"{$image['post_title']}\">197 <img id=\"image{$ attachment_ID}\" src=\"$src\" alt=\"{$attachment_ID}\" $height_width />198 </ a>219 <div id='div{$ID}' class='imagewrap' onclick=\"doPopup({$ID});\"> 220 <img id=\"image{$ID}\" src=\"$src\" alt=\"{$image['post_title']}\" $height_width /> 221 </div> 199 222 </div> 200 223 "; 201 } 202 } 203 204 $images_width = $uwidth_sum + ( count($images) * 5 ) + 30; 224 } else { 225 $html .= "<div id='target{$ID}' class='attwrap left'> 226 <div id='popup{$ID}' class='popup'> 227 <div class='filetype'>File Type: ".str_replace('/',"/\n",$attachment['post_mime_type'])."</div> 228 {$delete_cancel} 229 </div> 230 <div id='div{$ID}' class='otherwrap' onmousedown=\"selectLink({$ID})\" onclick=\"doPopup({$ID});return false;\"> 231 <a id=\"{$ID}\" href=\"{$attachment['guid']}\" onmousedown=\"selectLink({$ID});\" onclick=\"return false;\">{$attachment['post_title']}</a> 232 </div> 233 </div> 234 "; 235 } 236 } 237 } 238 239 $images_width = $uwidth_sum + ( count($images) * 6 ) + 35; 205 240 206 241 break; … … 218 253 <script type="text/javascript"> 219 254 /* Define any variables we'll need, such as alternate URLs. */ 220 <?php echo $images_script; ?> 221 222 function validateImageName() { 223 /* This is more for convenience than security. Server-side validation is very thorough.*/ 224 obj = document.getElementById('upload'); 225 r = /.jpg$|.gif$|.png$/i; 226 if ( obj.value.match(r) ) 227 return true; 228 alert('Please select a JPG, PNG or GIF file.'); 229 return false; 230 } 255 <?php echo $script; ?> 256 231 257 function cancelUpload() { 232 o = document.getElementById('uploadForm'); 233 o.method = 'GET'; 234 o.action.value = 'view'; 235 o.submit(); 236 } 237 function imagePopup(i) { 238 if ( popup ) 239 popup.style.display = 'none'; 240 target = document.getElementById('target'+i); 241 popup = document.getElementById('popup'+i); 242 //popup.style.top = (target.offsetTop + 3) + 'px'; 243 popup.style.left = (target.offsetLeft) + 'px'; 244 popup.style.display = 'block'; 258 o = document.getElementById('uploadForm'); 259 o.method = 'GET'; 260 o.action.value = 'view'; 261 o.submit(); 262 } 263 function doPopup(i) { 264 if ( popup ) 265 popup.style.display = 'none'; 266 target = document.getElementById('target'+i); 267 popup = document.getElementById('popup'+i); 268 popup.style.left = (target.offsetLeft) + 'px'; 269 popup.style.display = 'block'; 245 270 } 246 271 function init() { 247 popup = false; 272 popup = false; 273 } 274 function selectLink(n) { 275 o=document.getElementById('div'+n); 276 r = document.body.createTextRange(); 277 if ( typeof r != 'undefined' ) { 278 r.moveToElementText(o); 279 r.select(); 280 } 248 281 } 249 282 function toggleLink(n) { 250 o =document.getElementById(n);251 o i=document.getElementById('L'+n);252 if ( oi.innerHTML == attachmenton ) {253 o.href = eval('href'+n+'b');254 oi.innerHTML = attachmentoff;283 od=document.getElementById('div'+n); 284 ol=document.getElementById('L'+n); 285 oi=document.getElementById('I'+n); 286 if ( oi.innerHTML == usingthumbnail ) { 287 img = eval('img'+n+'a'); 255 288 } else { 256 o.href = eval('href'+n+'a'); 257 oi.innerHTML = attachmenton; 289 img = eval('img'+n+'b'); 290 } 291 if ( ol.innerHTML == notlinked ) { 292 od.innerHTML = eval('a'+n+'b')+img+'</a>'; 293 ol.innerHTML = linkedtoimage; 294 } else if ( ol.innerHTML == linkedtoimage ) { 295 od.innerHTML = eval('a'+n+'a')+img+'</a>'; 296 ol.innerHTML = linkedtopage; 297 } else { 298 od.innerHTML = img; 299 ol.innerHTML = notlinked; 258 300 } 259 301 } … … 261 303 o = document.getElementById('image'+n); 262 304 oi = document.getElementById('I'+n); 263 if ( oi.innerHTML == thumbnailon) {305 if ( oi.innerHTML == usingthumbnail ) { 264 306 o.src = eval('src'+n+'b'); 265 oi.innerHTML = thumbnailoff;307 oi.innerHTML = usingoriginal; 266 308 } else { 267 309 o.src = eval('src'+n+'a'); 268 oi.innerHTML = thumbnailon;310 oi.innerHTML = usingthumbnail; 269 311 } 270 312 } … … 279 321 } 280 322 form { 281 margin: 6px 2px 0px 6px;323 margin: 3px 2px 0px 6px; 282 324 } 283 325 #wrap { 284 326 clear: both; 285 margin: 0px;286 327 padding: 0px; 287 height: 133px;288 328 width: 100%; 289 overflow: auto;290 329 } 291 330 #images { 292 331 clear: both; 293 332 margin: 0px; 294 padding: 5px 15px;333 padding: 3px 15px; 295 334 height: 96px; 296 white-space: nowrap; 335 /* white-space: nowrap;*/ 297 336 width: <?php echo $images_width; ?>px; 298 337 } … … 300 339 background-color: rgb(209, 226, 239); 301 340 } 302 <?php echo $images_style; ?> 341 <?php echo $style; ?> 342 .attwrap, .attwrap * { 343 overflow: none; 344 margin: 0px; 345 padding: 0px; 346 border: 0px; 347 } 303 348 .imagewrap { 304 349 margin-right: 5px; 305 350 height: 96px; 306 351 overflow: hidden; 307 } 308 .imagewrap * { 309 margin: 0px; 310 padding: 0px; 311 border: 0px; 312 } 313 .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 352 float: left; 353 } 354 .otherwrap { 355 margin-right: 5px; 356 height: 90px; 357 overflow: hidden; 358 background-color: #f9fcfe; 359 float: left; 360 padding: 3px; 361 } 362 .otherwrap a { 363 display: block; 364 width: 122px; 365 } 366 .otherwrap a, .otherwrap a:hover, .otherwrap a:active, .otherwrap a:visited { 367 color: blue; 368 } 369 .filetype { 370 font-size: 80%; 371 border-bottom: 3px double #89a 372 } 373 .imagewrap, .imagewrap img, .imagewrap a, .imagewrap a img, .imagewrap a:hover img, .imagewrap a:visited img, .imagewrap a:active img { 314 374 text-decoration: none; 315 float: left;316 text-align: center;317 375 } 318 376 319 377 #upload-menu { 320 378 background: #fff; 321 margin: 0 ;379 margin: 0px; 322 380 padding: 0; 323 381 list-style: none; 324 382 height: 2em; 325 383 border-bottom: 1px solid #448abd; 384 width: 100%; 326 385 } 327 386 328 387 #upload-menu li { 329 388 float: left; 330 margin: 0 0 0 1em;389 margin: 0 0 0 .75em; 331 390 } 332 391 … … 342 401 background: #dfe8f1; 343 402 border-right: 2px solid #448abd; 344 345 403 } 346 404 … … 371 429 margin-left: 40px; 372 430 } 373 374 431 #title, #descr { 375 width: 80%;376 margin-top: 2px;432 width: 100%; 433 margin-top: 1px; 377 434 } 378 435 #descr { 379 height: 3 5px;436 height: 36px; 380 437 } 381 438 #buttons { 382 width: 98%;383 439 margin-top: 2px; 384 440 text-align: right; … … 392 448 display: none; 393 449 background-color: rgb(223, 232, 241); 450 text-align: center; 451 } 452 .imagewrap .popup { 394 453 opacity: .90; 395 454 filter:alpha(opacity=90); 396 text-align: center; 455 } 456 .otherwrap .popup { 457 padding-top: 20px; 397 458 } 398 459 .popup a, .popup a:visited, .popup a:active { … … 411 472 <body onload="init()"> 412 473 <ul id="upload-menu"> 413 <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__); ?>?action=upload&post=<?php echo $post; ?>&all=<?php echo $all; ?>"><?php _e('Upload Image'); ?></a></li>474 <li<?php echo $current_1; ?>><a href="<?php echo basename(__FILE__); ?>?action=upload&post=<?php echo $post; ?>&all=<?php echo $all; ?>"><?php _e('Upload'); ?></a></li> 414 475 <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?> 415 <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>"><?php _e(' Attached Images'); ?></a></li>476 <li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>"><?php _e('Browse'); ?></a></li> 416 477 <?php } ?> 417 <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image'")) { ?>418 <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>&all=true"><?php _e(' All Images'); ?></a></li>478 <?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment'")) { ?> 479 <li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>&all=true"><?php _e('Browse All'); ?></a></li> 419 480 <?php } ?> 420 481 <li> </li> … … 424 485 <li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&post=<?php echo $post; ?>&all=<?php echo $all; ?>&start=<?php echo $back; ?>"">« <?php _e('Back'); ?></a></li> 425 486 <?php else : ?> 426 <li class="inactive spacer">|&l t;</li>427 <li class="inactive">&l t;<</li>487 <li class="inactive spacer">|«</li> 488 <li class="inactive">« <?php _e('Back'); ?></li> 428 489 <?php endif; ?> 429 490 <?php if ( false !== $next ) : ?> … … 431 492 <li><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&post=<?php echo $post; ?>&all=<?php echo $all; ?>&last=true" title="<?php _e('Last'); ?>">»|</a></li> 432 493 <?php else : ?> 433 <li class="inactive"> >></li>434 <li class="inactive">& gt;|</li>494 <li class="inactive"><?php _e('Next'); ?> »</li> 495 <li class="inactive">»|</li> 435 496 <?php endif; ?> 436 497 <?php } // endif not upload?> 437 498 </ul> 438 499 <?php if ( $action == 'view' ) : ?> 439 <span class="left tip"><?php _e('You can drag and drop these photos into your post. Click on the thumbnail for more options.'); ?></span>440 <span class="right tip"></span>441 500 <div id="wrap"> 501 <div class="tip"><?php _e('You can drag and drop these items into your post. Click on one for more options.'); ?></div> 442 502 <div id="images"> 443 <?php echo $ images_html; ?>503 <?php echo $html; ?> 444 504 </div> 445 505 </div> 446 506 <?php elseif ( $action == 'upload' ) : ?> 447 507 <div class="tip"></div> 448 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo basename(__FILE__); ?>" onsubmit="return validateImageName()">449 <table style="width: 100%">508 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo basename(__FILE__); ?>"> 509 <table style="width:99%;"> 450 510 <tr> 451 <th scope="row" style="width: 6em; text-align: right;"><label for="upload"><?php _e('Image:'); ?></label></th>452 <td><input type="file" id="upload" name="image" onchange="validateImageName()"/></td>511 <th scope="row" style="width: 4.5em;text-align: right;"><label for="upload"><?php _e('File:'); ?></label></th> 512 <td><input type="file" id="upload" name="image" /></td> 453 513 </tr> 454 514 <tr> … … 460 520 <td><input type="textarea" name="descr" id="descr" value="" /></td> 461 521 </tr> 462 </table> 463 <p class="submit"> 522 <tr id="buttons"> 523 <th></th> 524 <td> 464 525 <input type="hidden" name="action" value="save" /> 465 526 <input type="hidden" name="post" value="<?php echo $post; ?>" /> … … 467 528 <input type="submit" value="<?php _e('Upload'); ?>" /> 468 529 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 469 </p> 530 </td> 531 </tr> 532 </table> 470 533 </div> 471 534 </form>
Note: See TracChangeset
for help on using the changeset viewer.