Commit 30b46044 authored by root's avatar root Committed by lechuck
Browse files

added nextgen gallery plugin

parent 42029a40
<?php
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
function nggallery_admin_about() {
?>
<div class="wrap">
<?php screen_icon( 'nextgen-gallery' ); ?>
<h2><?php _e('Copyright notes / Credits', 'nggallery') ;?></h2>
<div id="poststuff">
<div class="postbox">
<h3 class="hndle"><span><?php _e('NextGEN DEV Team', 'nggallery'); ?></span></h3>
<div class="inside">
<p><?php _e('This plugin is primarily developed, maintained, supported, documented by', 'nggallery'); ?> <a href="http://alexrabe.de" target="_blank">Alex Rabe</a>. <?php _e('There are many other folks who have made contributions to this project :', 'nggallery') ;?></p>
<p><?php ngg_list_contributors(); ?></p>
</div>
</div>
<div class="postbox">
<h3 class="hndle"><span><?php _e('Contributors / Tribute to', 'nggallery'); ?></span></h3>
<div class="inside">
<p><?php _e('If you study the code of this plugin, you will find out that we mixed a lot of good already existing code and ideas together.', 'nggallery') ;?>
<?php _e('So, we would like to thank the following people for their pioneer work (without this work it\'s impossible to create such a plugin so fast)', 'nggallery') ;?></p>
<ul class="ngg-list">
<li><a href="http://wordpress.org" target="_blank">The WordPress Team</a> <?php _e('for their great documented code', 'nggallery') ;?></li>
<li><a href="http://jquery.com" target="_blank">The jQuery Team</a> <?php _e('for jQuery, which is the best Web2.0 framework', 'nggallery') ;?></li>
<li><a href="http://www.gen-x-design.com" target="_blank">Ian Selby</a> <?php _e('for the fantastic PHP Thumbnail Class', 'nggallery') ;?></li>
<li><a href="http://www.lesterchan.net/" target="_blank">GaMerZ</a> <?php _e('for a lot of very useful plugins and ideas', 'nggallery') ;?></li>
<li><a href="http://www.laptoptips.ca/" target="_blank">Andrew Ozz</a> <?php _e('for Shutter Reloaded, a real lightweight image effect', 'nggallery') ;?></li>
<li><a href="http://www.jeroenwijering.com/" target="_blank">Jeroen Wijering</a> <?php _e('for the best Media Flash Scripts on earth', 'nggallery') ;?></li>
<li><a href="http://field2.com" target="_blank">Ben Dunkle</a> <?php _e('for the Gallery Icon', 'nggallery') ;?></li>
<li><a href="http://watermark.malcherek.com/" target="_blank">Marek Malcherek</a> <?php _e('for the Watermark plugin', 'nggallery') ;?></li>
</ul>
<p><?php _e('If you didn\'t find your name on this list and there is some code which I integrate in my plugin, don\'t hesitate to send me a mail.', 'nggallery') ;?></p>
</div>
</div>
<div class="postbox">
<h3 class="hndle"><span><?php _e('How to support ?', 'nggallery'); ?></span></h3>
<div class="inside">
<p><?php _e('There exist several ways to contribute, help or support us in this work. Non of them are mandatory.', 'nggallery') ;?></p>
<ul class="ngg-list">
<li><strong><?php _e('Send us bugfixes / code changes', 'nggallery') ;?></strong><br /><?php _e('The most motivated support for this plugin are your ideas and brain work', 'nggallery') ;?></li>
<li><strong><?php _e('Translate the plugin', 'nggallery') ;?></strong><br /><?php _e('To help people to work with this plugin, I would like to have it in all available languages', 'nggallery') ;?></li>
<li><strong><?php _e('Donate the work via paypal', 'nggallery') ;?></strong><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="alter.ego@boelinger.com"/>
<input type="hidden" name="item_name" value="NextGEN Gallery plugin"/>
<input type="hidden" name="no_shipping" value="1"/>
<input type="hidden" name="return" value="http://alexrabe.de/" />
<input type="hidden" name="cancel_return" value="http://alexrabe.de/"/>
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="currency_code" value="EUR"/>
<input type="hidden" name="tax" value="0"/>
<input type="hidden" name="bn" value="PP-DonationsBF"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="border: none;"/>
</form><?php _e('No doubt a very useful and easy motivation :-)', 'nggallery') ;?>
</li>
<li><strong><?php _e('Place a link to the plugin in your blog/webpage', 'nggallery') ;?></strong><br /><?php _e('Yes, share and trackback is also a good support for this work ', 'nggallery') ;?></li>
</ul>
</div>
</div>
<div class="postbox" id="donators">
<h3 class="hndle"><span><?php _e('Thanks!', 'nggallery'); ?></span></h3>
<div class="inside">
<p><?php _e('We would like to thank this people which support us in the work :', 'nggallery'); ?></p>
<p><a href="http://www.boelinger.com/heike/" target="_blank">HEIKE</a>, <?php ngg_list_support(); ?></p>
</div>
</div>
</div>
</div>
<?php
}
function ngg_list_contributors() {
/* The list of my contributors. Thanks to all of them !*/
$contributors = array(
'Anty (Code contributor)' => 'http://www.anty.at/',
'Bjoern von Prollius (Code contributor)' => 'http://www.prollius.de/',
'Simone Fumagalli (Code contributor)' => 'http://www.iliveinperego.com/',
'Vincent Prat (Code contributor)' => 'http://www.vincentprat.info',
'Frederic De Ranter (AJAX code contributor)' => 'http://li.deranter.com/',
'Christian Arnold (Code contributor)' => 'http://blog.arctic-media.de/',
'Thomas Matzke (Album code contributor)' => 'http://mufuschnu.mu.funpic.de/',
'KeViN (Sidebar Widget developer)' => 'http://www.kev.hu/',
'Lazy (German Translation)' => 'http://www.lazychris.de/',
'Lise (French Translation)' => 'http://liseweb.fr/',
'Anja (Dutch Translation)' => 'http://www.werkgroepen.net/wordpress',
'Adrian (Indonesian Translation)' => 'http://adrian.web.id/',
'Gaspard Tseng / SillyCCSmile (Chinese Translation)' => '',
'Mika Pennanen (Finnish Translation)' => 'http://kapsi.fi/~penni',
'Wojciech Owczarek (Polish Translation)' => 'http://www.owczi.net',
'Dilip Ramirez (Spanish Translation)' => 'http://jmtd.110mb.com/blog',
'Oleinikov Vedmak Evgeny (Russian Translation)' => 'http://ka-2-03.mirea.org/',
'Sebastien MALHERBE (Logo design)' => 'http://www.7vision.com/',
'Claudia (German documentation)' => 'http://www.blog-werkstatt.de/',
'Robert (German documentation)' => 'http://www.curlyrob.de/',
'Pierpaolo Mannone (Italian Translation)' => 'http://www.interscambiocasa.com/',
'Mattias Tengblad (Swedish Translation)' => 'http://wp-support.se/',
'M&uuml;fit Kiper (Swedish Translation)' => 'http://www.kiper.se/',
'Gil Yaker (Documentation)' => 'http://bamboosoup.com/',
'Morten Johansen (Danish Translation)' => 'http://www.fr3ak.dk/',
'Vidar Seland (Norwegian Translation)' => 'http://www.viidar.net/',
'Emre G&uuml;ler (Turkish Translation)' => 'http://www.emreguler.com/',
'Emilio Lauretti (Italian Translation)' => '',
'Jan Angelovic (Czech Translation)' => 'http://www.angelovic.cz/',
'Laki (Slovak Translation)' => 'http://www.laki.sk/',
'Rowan Crane (WPMU support)' => 'http://blog.rowancrane.com/',
'Kuba Zwolinski (Polish Translation)' => 'http://kubazwolinski.com/',
'Rina Jiang (Chinese Translation)' => 'http://http://mysticecho.net/',
'Anthony (Chinese Translation)' => 'http://www.angryouth.com/',
'Milan Vasicek (Czech Translation)' => 'http://www.NoWorkTeam.cz/',
'Joo Gi-young (Korean Translation)' => 'http://lombric.linuxstudy.pe.kr/wp/',
'Oleg A. Safonov (Russian Translation)' => 'http://blog.olart.ru',
'AleXander Kirichev (Bulgarian Translation)' => 'http://xsakex.art-bg.org/',
'Richer Yang (Chinese Translation)' => 'http://fantasyworld.idv.tw/',
'Bill Jones (Forums contributor)' => 'http://jonesphoto.bluehorizoninternet.com/',
'TheDonSansone (Forums contributor)' => 'http://abseiling.200blogs.co.uk/',
'Komyshov (Russian Translation)' => 'http://kf-web.ru/',
'aleX Zhang (Chinese Translation)' => 'http://zhangfei.info/',
'TheSoloist (Chinese Translation)' => 'http://www.soloist-ic.cn/',
'Nica Luigi Cristian (Romanian Translation)' => 'http://www.cristiannica.com/',
'Zdenek Hatas (Czech Translation)' => '',
'David Potter (Documentation and Help)' => 'http://dpotter.net/',
'Carlale Chen (Chinese Translation)' => 'http://0-o-0.cc/',
'Nica Luigi Cristian (Romanian Translation)' => 'http://www.cristiannica.com/',
'Igor Shevkoplyas (Russian Translation)' => 'http://www.russian-translation-matters.com',
'Alexandr Kindras (Code contributor)' => 'http://www.fixdev.com',
'Manabu Togawa (Japanese Translation)' => 'http://www.churadesign.com/',
'Serhiy Tretyak (Ukrainian Translation)' => 'http://designpoint.com.ua/',
'Janis Grinvalds (Latvian Translation)' => 'http://riga.bmxrace.lv/',
'Kristoffer Th&oslash;ring (Norwegian Translation)' => '',
'Flactarus (Italian Translation)' => 'http://www.giroevago.it',
'Felip Alfred Galit&oacute; i Trilla (Catalan Translation)' => 'http://www.bratac.cat',
'Luka Komac (Slovenian Translation)' => 'http://www.komac.biz',
'Dimitris Ikonomou / Nikos Mouratidis (Greek Translation)' => 'http://www.kepik.gr'
);
ksort($contributors);
$i = count($contributors);
foreach ($contributors as $name => $url)
{
if ($url)
echo "<a href=\"$url\">$name</a>";
else
echo $name;
$i--;
if ($i == 1)
echo " & ";
elseif ($i)
echo ", ";
}
}
function ngg_list_support() {
/* The list of my supporters. Thanks to all of them !*/
global $ngg;
$supporter = nggAdminPanel::get_remote_array($ngg->donators);
// Ensure that this is a array
if ( !is_array($supporter) )
return _e('and all donators...', 'nggallery');
ksort($supporter);
$i = count($supporter);
foreach ($supporter as $name => $url)
{
if ($url)
echo "<a href=\"$url\">$name</a>";
else
echo $name;
$i--;
if ($i == 1)
echo " & ";
elseif ($i)
echo ", ";
}
}
?>
\ No newline at end of file
<?php
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
// sometimes a error feedback is better than a white screen
@ini_set('error_reporting', E_ALL ^ E_NOTICE);
class nggAddGallery {
/**
* PHP4 compatibility layer for calling the PHP5 constructor.
*
*/
function nggAddGallery() {
return $this->__construct();
}
/**
* nggOptions::__construct()
*
* @return void
*/
function __construct() {
// same as $_SERVER['REQUEST_URI'], but should work under IIS 6.0
$this->filepath = admin_url() . 'admin.php?page=' . $_GET['page'];
//Look for POST updates
if ( !empty($_POST) )
$this->processor();
}
/**
* Perform the upload and add a new hook for plugins
*
* @return void
*/
function processor() {
global $wpdb, $ngg;
$defaultpath = $ngg->options['gallerypath'];
if ($_POST['addgallery']){
check_admin_referer('ngg_addgallery');
if ( !nggGallery::current_user_can( 'NextGEN Add new gallery' ))
wp_die(__('Cheatin&#8217; uh?'));
$newgallery = esc_attr( $_POST['galleryname']);
if ( !empty($newgallery) )
nggAdmin::create_gallery($newgallery, $defaultpath);
}
if ($_POST['zipupload']){
check_admin_referer('ngg_addgallery');
if ( !nggGallery::current_user_can( 'NextGEN Upload a zip' ))
wp_die(__('Cheatin&#8217; uh?'));
if ($_FILES['zipfile']['error'] == 0 || (!empty($_POST['zipurl'])))
nggAdmin::import_zipfile( intval( $_POST['zipgalselect'] ) );
else
nggGallery::show_error( __('Upload failed!','nggallery') );
}
if ($_POST['importfolder']){
check_admin_referer('ngg_addgallery');
if ( !nggGallery::current_user_can( 'NextGEN Import image folder' ))
wp_die(__('Cheatin&#8217; uh?'));
$galleryfolder = $_POST['galleryfolder'];
if ( ( !empty($galleryfolder) ) AND ($defaultpath != $galleryfolder) )
nggAdmin::import_gallery($galleryfolder);
}
if ($_POST['uploadimage']){
check_admin_referer('ngg_addgallery');
if ( !nggGallery::current_user_can( 'NextGEN Upload in all galleries' ))
wp_die(__('Cheatin&#8217; uh?'));
if ( $_FILES['imagefiles']['error'][0] == 0 )
$messagetext = nggAdmin::upload_images();
else
nggGallery::show_error( __('Upload failed! ' . nggAdmin::decode_upload_error( $_FILES['imagefiles']['error'][0]),'nggallery') );
}
if (isset($_POST['swf_callback'])){
if ($_POST['galleryselect'] == '0' )
nggGallery::show_error(__('No gallery selected !','nggallery'));
else {
// get the path to the gallery
$galleryID = (int) $_POST['galleryselect'];
$gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
nggAdmin::import_gallery($gallerypath);
}
}
if ( isset($_POST['disable_flash']) ){
check_admin_referer('ngg_addgallery');
$ngg->options['swfUpload'] = false;
update_option('ngg_options', $ngg->options);
}
if ( isset($_POST['enable_flash']) ){
check_admin_referer('ngg_addgallery');
$ngg->options['swfUpload'] = true;
update_option('ngg_options', $ngg->options);
}
do_action( 'ngg_update_addgallery_page' );
}
/**
* Render the page content
*
* @return void
*/
function controller() {
global $ngg, $nggdb;
// check for the max image size
$this->maxsize = nggGallery::check_memory_limit();
//get all galleries (after we added new ones)
$this->gallerylist = $nggdb->find_all_galleries('gid', 'DESC');
$this->defaultpath = $ngg->options['gallerypath'];
// link for the flash file
$swf_upload_link = NGGALLERY_URLPATH . 'admin/upload.php';
// get list of tabs
$tabs = $this->tabs_order();
?>
<?php if($ngg->options['swfUpload'] && !empty ($this->gallerylist) ) { ?>
<!-- SWFUpload script -->
<script type="text/javascript">
var ngg_swf_upload;
window.onload = function () {
ngg_swf_upload = new SWFUpload({
// Backend settings
upload_url : "<?php echo esc_attr( $swf_upload_link ); ?>",
flash_url : "<?php echo NGGALLERY_URLPATH; ?>admin/js/swfupload.swf",
// Button Settings
button_placeholder_id : "spanButtonPlaceholder",
button_width: 300,
button_height: 27,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
// File Upload Settings
file_size_limit : "<?php echo wp_max_upload_size(); ?>b",
file_types : "*.jpg;*.jpeg;*.gif;*.png;*.JPG;*.JPEG;*.GIF;*.PNG",
file_types_description : "<?php _e('Image Files', 'nggallery') ;?>",
// Queue handler
file_queued_handler : fileQueued,
// Upload handler
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
post_params : {
"auth_cookie" : "<?php echo (is_ssl() ? $_COOKIE[SECURE_AUTH_COOKIE] : $_COOKIE[AUTH_COOKIE]); ?>",
"logged_in_cookie": "<?php echo $_COOKIE[LOGGED_IN_COOKIE]; ?>",
"_wpnonce" : "<?php echo wp_create_nonce('ngg_swfupload'); ?>",
"galleryselect" : "0"
},
// i18names
custom_settings : {
"remove" : "<?php _e('remove', 'nggallery') ;?>",
"browse" : "<?php _e('Browse...', 'nggallery') ;?>",
"upload" : "<?php _e('Upload images', 'nggallery') ;?>"
},
// Debug settings
debug: false
});
// on load change the upload to swfupload
initSWFUpload();
nggAjaxOptions = {
header: "<?php _e('Upload images', 'nggallery') ;?>",
maxStep: 100
};
};
</script>
<?php } else { ?>
<!-- MultiFile script -->
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery('#imagefiles').MultiFile({
STRING: {
remove:'[<?php _e('remove', 'nggallery') ;?>]'
}
});
});
/* ]]> */
</script>
<?php } ?>
<!-- jQuery Tabs script -->
<script type="text/javascript">
/* <![CDATA[ */
jQuery(document).ready(function(){
jQuery('html,body').scrollTop(0);
jQuery('#slider').tabs({ fxFade: true, fxSpeed: 'fast' });
});
// File Tree implementation
jQuery(function() {
jQuery("span.browsefiles").show().click(function(){
jQuery("#file_browser").fileTree({
script: "admin-ajax.php?action=ngg_file_browser&nonce=<?php echo wp_create_nonce( 'ngg-ajax' ) ;?>",
root: jQuery("#galleryfolder").val(),
}, function(folder) {
jQuery("#galleryfolder").val( folder );
});
jQuery("#file_browser").show('slide');
});
});
/* ]]> */
</script>
<div id="slider" class="wrap">
<ul id="tabs">
<?php
foreach($tabs as $tab_key => $tab_name) {
echo "\n\t\t<li><a href='#$tab_key'>$tab_name</a></li>";
}
?>
</ul>
<?php
foreach($tabs as $tab_key => $tab_name) {
echo "\n\t<div id='$tab_key'>\n";
// Looks for the internal class function, otherwise enable a hook for plugins
if ( method_exists( $this, "tab_$tab_key" ))
call_user_func( array( &$this , "tab_$tab_key") );
else
do_action( 'ngg_tab_content_' . $tab_key );
echo "\n\t</div>";
}
?>
</div>
<?php
}
/**
* Create array for tabs and add a filter for other plugins to inject more tabs
*
* @return array $tabs
*/
function tabs_order() {
$tabs = array();
if ( !empty ($this->gallerylist) )
$tabs['uploadimage'] = __( 'Upload Images', 'nggallery' );
if ( nggGallery::current_user_can( 'NextGEN Add new gallery' ))
$tabs['addgallery'] = __('Add new gallery', 'nggallery');
if ( wpmu_enable_function('wpmuZipUpload') && nggGallery::current_user_can( 'NextGEN Upload a zip' ) )
$tabs['zipupload'] = __('Upload a Zip-File', 'nggallery');
if ( wpmu_enable_function('wpmuImportFolder') && nggGallery::current_user_can( 'NextGEN Import image folder' ) )
$tabs['importfolder'] = __('Import image folder', 'nggallery');
$tabs = apply_filters('ngg_addgallery_tabs', $tabs);
return $tabs;
}
function tab_addgallery() {
?>
<!-- create gallery -->
<h2><?php _e('Add new gallery', 'nggallery') ;?></h2>
<form name="addgallery" id="addgallery_form" method="POST" action="<?php echo $this->filepath; ?>" accept-charset="utf-8" >
<?php wp_nonce_field('ngg_addgallery') ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('New Gallery', 'nggallery') ;?>:</th>
<td><input type="text" size="35" name="galleryname" value="" /><br />
<?php if(!is_multisite()) { ?>
<?php _e('Create a new , empty gallery below the folder', 'nggallery') ;?> <strong><?php echo $this->defaultpath ?></strong><br />
<?php } ?>
<i>( <?php _e('Allowed characters for file and folder names are', 'nggallery') ;?>: a-z, A-Z, 0-9, -, _ )</i></td>
</tr>
<?php do_action('ngg_add_new_gallery_form'); ?>
</table>
<div class="submit"><input class="button-primary" type="submit" name= "addgallery" value="<?php _e('Add gallery', 'nggallery') ;?>"/></div>
</form>
<?php
}
function tab_zipupload() {
?>
<!-- zip-file operation -->
<h2><?php _e('Upload a Zip-File', 'nggallery') ;?></h2>
<form name="zipupload" id="zipupload_form" method="POST" enctype="multipart/form-data" action="<?php echo $this->filepath.'#zipupload'; ?>" accept-charset="utf-8" >
<?php wp_nonce_field('ngg_addgallery') ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Select Zip-File', 'nggallery') ;?>:</th>
<td><input type="file" name="zipfile" id="zipfile" size="35" class="uploadform"/><br />
<?php _e('Upload a zip file with images', 'nggallery') ;?></td>
</tr>
<?php if (function_exists('curl_init')) : ?>
<tr valign="top">
<th scope="row"><?php _e('or enter a Zip-File URL', 'nggallery') ;?>:</th>
<td><input type="text" name="zipurl" id="zipurl" size="35" class="uploadform"/><br />
<?php _e('Import a zip file with images from a url', 'nggallery') ;?></td>
</tr>
<?php endif; ?>
<tr valign="top">
<th scope="row"><?php _e('in to', 'nggallery') ;?></th>
<td><select name="zipgalselect">
<option value="0" ><?php _e('a new gallery', 'nggallery') ?></option>
<?php
foreach($this->gallerylist as $gallery) {
if ( !nggAdmin::can_manage_this_gallery($gallery->author) )
continue;
$name = ( empty($gallery->title) ) ? $gallery->name : $gallery->title;
echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
}
?>
</select>
<br /><?php echo $this->maxsize; ?>
<br /><?php echo _e('Note : The upload limit on your server is ','nggallery') . "<strong>" . ini_get('upload_max_filesize') . "Byte</strong>\n"; ?>
<br /><?php if ( (is_multisite()) && wpmu_enable_function('wpmuQuotaCheck') ) display_space_usage(); ?></td>
</tr>
</table>
<div class="submit"><input class="button-primary" type="submit" name= "zipupload" value="<?php _e('Start upload', 'nggallery') ;?>"/></div>
</form>
<?php
}
function tab_importfolder() {
?>
<!-- import folder -->
<h2><?php _e('Import image folder', 'nggallery') ;?></h2>
<form name="importfolder" id="importfolder_form" method="POST" action="<?php echo $this->filepath.'#importfolder'; ?>" accept-charset="utf-8" >
<?php wp_nonce_field('ngg_addgallery') ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Import from Server path:', 'nggallery') ;?></th>
<td><input type="text" size="35" id="galleryfolder" name="galleryfolder" value="<?php echo $this->defaultpath; ?>" /><span class="browsefiles button" style="display:none"><?php _e('Browse...', 'nggallery'); ?></span><br />
<div id="file_browser"></div>
<br /><i>( <?php _e('Note : Change the default path in the gallery settings', 'nggallery') ;?> )</i>
<br /><?php echo $this->maxsize; ?>
<?php if (SAFE_MODE) {?><br /><?php _e(' Please note : For safe-mode = ON you need to add the subfolder thumbs manually', 'nggallery') ;?><?php }; ?></td>
</tr>
</table>
<div class="submit"><input class="button-primary" type="submit" name= "importfolder" value="<?php _e('Import folder', 'nggallery') ;?>"/></div>
</form>
<?php
}
function tab_uploadimage() {
global $ngg;
?>
<!-- upload images -->
<h2><?php _e('Upload Images', 'nggallery') ;?></h2>
<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php echo $this->filepath.'#uploadimage'; ?>" accept-charset="utf-8" >
<?php wp_nonce_field('ngg_addgallery') ?>
<table class="form-table">
<tr valign="top">
<th scope="row"><?php _e('Upload image', 'nggallery') ;?></th>
<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
</tr>
<tr valign="top">
<th scope="row"><?php _e('in to', 'nggallery') ;?></th>
<td><select name="galleryselect" id="galleryselect">
<option value="0" ><?php _e('Choose gallery', 'nggallery') ?></option>
<?php
foreach($this->gallerylist as $gallery) {
//special case : we check if a user has this cap, then we override the second cap check
if ( !</