Location: PHPKode > projects > BugIn and Ticketing System > bugin-0.65/inc/admin/cdelete.inc.php
<?php
echo <<<EOT
<table border="0">
	<tr align="center">
		<td><img src="gfx/cedit.png" border="0"><br>[{$verbage['adm_cat_delete']}]</td>
	</tr>
</table>
<hr>

<script language="JavaScript">
<!--
function checkSubmit() {
	if (document.list['newCategory'].options[document.list['newCategory'].selectedIndex].value == -1) {
		alert("You must enter a new Category");
	}
	else {
		document.list.submit();
	}
}
-->
</script>

EOT;

if (isset($selectedCategory)) {

	if (isset($_REQUEST['confirm'])) {
		echo <<<EOT
			<a href="{$options['baseURL']}?area=admin&action=cedit">{$verbage['continue']}</a>

EOT;
	}
	else {

		echo <<<EOT
			<form action="{$options['baseURL']}{$options['formSubmitTo']}" method="{$options['formMethod']}" name="list">
			<input type="hidden" name="area" value="admin" />
			<input type="hidden" name="action" value="cdelete" />
			<input type="hidden" name="confirm" value="1" />
			<input type="hidden" name="selectedCategory" value="{$selectedCategory}" />
			{$verbage['adm_cat_ask_rep']} &quot;{$bugDatabase->lists['category'][$selectedCategory]['name']}&quot;?<br><br>
			<select name="newCategory">
			<option value="-1">{$verbage['new']} {$verbage['category']}</option>
EOT;
			while (list($key, $value) = each ($bugDatabase->lists[category])) {
				if ($value[id] != $selectedCategory) {
					$name = stripslashes($value[name]);
					echo <<<EOT
			<option value="{$value[id]}">{$name}</option>
EOT;
				}
			}
echo <<<EOT
			</select><br>
			<input type="button" value="{$verbage['adm_cat_delete']}" onClick="checkSubmit()" />
			</form>
			[<a href="{$options[baseURL]}?area=admin&action=cedit">{$verbage[cancel]}</a>]

EOT;
		}
	}

?>
Return current item: BugIn and Ticketing System