<div class="wrap <?php if( !current_user_can('manage_options') ){ echo " fg-disable-links"; } ?>">
  <div class="icon32" id="icon-tools"><br/></div>
  <h2>Manage Galleries</h2>
  <?php 
  
  if(SAFE_MODE) {
		echo "<div class='warning-box'><h3>Warning:</h3>The server setting Safe-Mode is on! This could cause that you can not create a gallery. Turn if off when you can not create a gallery!<br /> You can turn it off in your php.ini or ask your provider how to do that.</div>";	
	}
  
  ?>
  <br />
  <h3>Add new gallery</h3>
  <form action="" method="post">
    <p class="description">Enter a gallery title:</p>
    <input type="text" name="gallery_title" style="width: 300px;" />
    <a href="#" id="addNewGallery" class="button-secondary">Add gallery</a>
    <br />
    <br />
    <h3 style="float: left;">My galleries</h3>
    <a href="#" id="deleteGalleries" class="button-secondary" style="margin-left: 220px; margin-top: 12px; float: left;">Delete all galleries</a> 
    <ol id="galleryList">
    <?php 
	
	$results = $this->wpdb->get_results("SELECT * FROM " . $this->gallery_table_name . "");
			
	foreach($results as $result) {
		echo '<li><input value="' . stripslashes($result->title) . '" type="text" name="galleryTitles[]" readonly="readonly" /><a class="delete" href="#" title="Delete gallery"></a></li>';
	}
	
	?>
    </ol>    
  </form>
</div>