Location: PHPKode > projects > Protoforge > protoforge_v1.2/protoforge/user_resources/delete_User_Resource.php
<?php $deb = false;
require_once('../config.inc.php');
require(PF_INCLUDE.'verifyUserID.inc.php');

if (isset($_POST['redirect'])) { $redirect = $_POST['redirect']; }
else if (isset($_GET['redirect'])) { $redirect = $_GET['redirect']; }

if (isset($_GET['id']) && (trim($_GET['id']) != "")) {
	$User_Resource = new User_Resource();
	if (require_once(PF_BASE.'connect.php'))
		$link = connect();
	$User_Resource->dbPopulate($_GET['id'],$link);
	$_SESSION['User_Resource'] = $User_Resource;
}
if (!isset($_SESSION['User_Resource'])) {
	$pfutil = new PFUtil();
	$pfutil->error_page( 'No User_Resource selected.<br/><a href="index.php">Search User_Resources</a>' );
}
if ($uid != $_SESSION['User_Resource']->get_user_id()) {
	$pfutil = new PFUtil();
	$pfutil->error_page( 'You do not have permission to delete this User_Resource.' );
}
    $pageTitle=PF_SITENAME.' Delete Personal Resource';
    require(PF_BASE.'Header.php');
?>
	<?php $titl = 'Delete Personal Resource'; require(PF_BASE.'titl.php'); ?>

	<form name="info" method="post" action="delete_User_Resource_submit.php">
		<?php if (isset($redirect)) { ?>
			<input type="hidden" name="redirect" value="<?php echo $redirect; ?>"/>
		<?php } ?>
		<br/>
		<table border="0" width="65%" cellspacing="1" cellpadding="5">
			<tr class="form" align="center">
				<td class="form" align="center" colspan="2">
				 	Are you sure you want to delete <?php echo $User_Resource->get_title(); ?> from your resources.
				</td>
			</tr>
			<tr>
				<td class="form" align="center">
					<input type="submit" name="Submit" value="Delete It Forever"/>
				</td>
				<td class="form" align="center">
					<input type="button" value=" Cancel " onClick="history.back()"/>
				</td>
			</tr>
		</table>
	</form>
<?
	include(PF_BASE.'Footer.php');
?>
Return current item: Protoforge