Location: PHPKode > projects > Kwalbum > kwalbum/pages/AdminDeleteItemsPage.html.php
<?php
/**
 * @version 2.1.1
 * @package kwalbum
 * @since 2.0 2008-08-23
 */
require_once 'include/funcGetImageCode.php';
?>
<big><b><a href='<?=$URLP->GetExtendedURL()?>p=Admin'>Admin Options:</a> Permanently Delete Items</b></big>
<p>
<?php
if (!$this->items)
{
	echo 'No items waiting for final deletion at this time.';
	return;
}
?>
<form action='<?=$URLP->GetExtendedURL()?>&amp;p=AdminDeleteItems' method='post'>
<table border='0'>
<?php
$i = 0;
foreach ($this->items as $id => $item)
{
	$highlight = ++$i % 2;
	$msg = '';
	switch (@$_POST['act'][$id])
	{
		case 'rest':
			$msg = $this->RestoreItem($id);
			break;
		case 'file':
			$msg = $this->DeleteFile($id, $item['ItemPath'], $item['ItemFilename'], $item['ItemTypeId']);
		case 'data':
			$msg .= $this->DeleteData($id, $item['ItemPath'], $item['ItemFilename'], $item['ItemTypeId']);
			break;
		default:
			$msg = "<tr><td ".($highlight ? "class='cell'" : "align='center'").">" .
				"Nothing<input type='radio' name='act[$id]' value='' checked/><br/>" .
				"Restore<input type='radio' name='act[$id]' value='rest'/><br/>" .
				"Delete Data<input type='radio' name='act[$id]' value='data'/><br/>" .
				"Delete Data+File<input type='radio' name='act[$id]' value='file'/></td>" .
				"<td ".($highlight ? "class='cell'" : "align='center'").">".GetImageCode($item['ItemPath'], $item['ItemFilename'], $item['ItemTypeId'], $id)."</td>" .
				"<td ".($highlight ? "class='cell'" : "align='center'").">$item[ItemDate]<br/>$item[ItemTime]</td>" .
				"<td ".($highlight ? "class='cell'" : "align='center'").">$item[Location]</td>" .
				"<td ".($highlight ? "class='cell'" : "align='center'").">$item[ItemPath]$item[ItemFilename]<br>$item[ItemDescription]";
	}
	echo "<tr><td colspan='4' ".($highlight ? "class='cell'" : "align='center'")." >$msg</td></tr>";
}
?>
</table>
<input type='submit' value='Delete or Restore Selected Items'/>
</form>
</p>
Return current item: Kwalbum