<?php if($_SESSION['user'] == sha1($administrator_name)) { ?>
	<?php if(isset($message)) { ?>
		<p class="error"><?php echo $message; ?></p>
	<?php } ?>

    <table class="list">
    	<tr>
    		<th><?php echo txt('settings', 'Aktiviert'); ?></th>
    		<th><?php echo txt('settings', 'Beschreibung'); ?></th>
    		<th><?php echo txt('settings', 'Version'); ?></th>
    		<th><?php echo txt('settings', 'Größe'); ?></th>
    		<!-- <th><?php echo txt('settings', 'Autor'); ?></th> -->
    		<!-- <th><?php echo txt('settings', 'Hilfe'); ?></th> -->
    		<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
    	</tr>
    	
    	<?php foreach($widgets as $widget) { ?>
    		<tr class="data">
    			<td><input type="checkbox" name="active" onclick="toggleWMEPstatus('widgets', '<?php echo $widget['name']; ?>', this.checked)" <?php if($widget['active'] == 1) echo 'checked="checked"'; ?>></td>
    			<td>
    				<strong><?php echo txt($widget['name'], 'name: ' . $widget['name']); ?></strong> &nbsp;
    				<?php if($widget['writeable'] == 0) { ?><span class="wmep-not-writeable" title="<?php echo txt('settings', 'Das Verzeichnis dieses Pakets ist schreibgeschützt.'); ?>">&nbsp;</span><?php } ?>
    				<div class="small description"><?php echo txt($widget['name'], 'description: ' . $widget['name']); ?></div>
    			</td>
    			<td><?php echo $widget['version']; ?></td>
    			<td class="nowrap"><?php echo format_filesize($widget['size']); ?></td>
    			<!-- <td><?php echo $widget['author']; ?></td> -->
    			<!-- <td><a href="<?php echo $widget['support']; ?>"><?php echo txt('settings', $widget['support type']); ?></a></td> -->
    			<td>
    				<?php if($widget['writeable'] == 1) { ?><a class="delete" title="<?php echo txt('settings', 'Löschen'); ?>" href="index.php?backend=settings&amp;area=<?php echo $_GET['area']; ?>&amp;delete-wmep=<?php echo $widget['name']; ?>" onclick="return window.confirm('<?php echo txt('settings', 'Wollen Sie das Paket wirklich löschen?'); ?>')">&nbsp;</a><?php } ?>
    			</td>
    		</tr>
    	<?php } ?>
	</table>
<?php } ?>