Location: PHPKode > projects > Prsaar Social Networking Platform > PrsaarColour-0.7.alpha.6.3/pr-admin/askme-edit-update.php
<?php
	require_once('./admin.php');
	$Action = $_GET['action'];
	if($Action == 'answer')
	{
		$ID = $_GET['id'];
		if(empty($_POST['askme_answer']))
			die('Please write your answer');
		require_once(PR_PATH.'pr-inside/convert-to-html.php');
		$Answer = ConvertToHTML($_POST['askme_answer']);
		$AnswerTime = date("YmdHis");
		$DC->Result("UPDATE ".PR_DATABASE_PREFIX."askme SET askme_answer = '$Answer', askme_status = 'answered' WHERE askme_id = '$ID'");
		header("Location: ./askme.php?highlight=new_answer_published.");
		exit();
	}
	elseif($Action === 'delete')
	{
		$ID = $_GET['id'];
		die(" Are you sure you want to delete this question <a href='./askme-edit-update.php?action=deletenow&id=$ID' style='color:blue'>Yes delete</a> <a href='./askme.php' style='color:blue'>Cancel</a>");
	}
	elseif($Action === 'deletenow')
	{
		$ID = $_GET['id'];
		$DC->Result('DELETE FROM '.PR_DATABASE_PREFIX."askme WHERE askme_id = '$ID'");
		header("Location: ./askme.php?highlight=Question_deleted");
		exit();
	}
?>
Return current item: Prsaar Social Networking Platform