Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/admin/deletenews.php
<?php

/**********************************************************
*  ______   ______   ___      _______  ___ ___  _______   *
* |   _  \ |   _  \ |   |    |   _   ||   Y   ||   _   |  *
* |.  |   \|.  |   \|.  |    |.  1___||.      ||   1___|  *
* |.  |    |.  |    |.  |___ |.  |___ |. \_/  ||____   |  *
* |:  1    |:  1    |:  1   ||:  1   ||:  |   ||:  1   |  *
* |::.. . /|::.. . /|::.. . ||::.. . ||::.|:. ||::.. . |  *
* `------' `------' `-------'`-------'`--- ---'`-------'  *
*                                _______        _______   *
*                    .--.--.    |   _   |      |       |  *
*                    |  |  |    |___|   |  __  |___|   |  *
*                     \___/      _(__   | |__|  /  ___/   *
*                               |:  1   |      |:  1  \   *
*                               |::.. . |      |::.. . |  *
*                               `-------'      `-------'  *
*                                                         *
*                                   Script: DDLCMS v3.2   *
*                                 Author: Little Dragon   *
*                              Email: hide@address.com   *
*                        Website: http://www.ddlcms.com   *
*                                                         *
*    Please direct bug reports, suggestions or feedback   *
*                                 to the DDLCMS forums:   *
*                                                         *
*                          http://www.ddlcms.com/forums   *
*                                                         *
*    DDLCMS is a commercial grade content management      *
*    system for DDL site owners. It is provided free      *
*    of charge, provided:                                 *
*                                                         *
*    1. You keep the linkback to http://www.ddlcms.com    *
*       in the footer.                                    *
*                                                         *
*    2. You keep the sponsored links to Sharingzone.net   *
*       on your site.                                     *
*                                                         *
*    By using this script, you agree that you will not    *
*    modify, remove, or replace any encoded parts of      *
*    this script. All encoded parts MUST remain intact    *
*    for your site to remain in good standing.            *
*                                                         *
**********************************************************/

	session_start();
	if(!isset($_SESSION) || !is_array($_SESSION) || !array_key_exists('authuser', $_SESSION))
	{
		$_SESSION = NULL;
		session_destroy();
		header('Location: ' . $site_url . '/admin/');
	}
	define('ADMINDIR', dirname(__FILE__) . '/');
	define('WWWROOT', substr(ADMINDIR, 0, -6));
	define('BASEDIR', substr(WWWROOT, 0, ##BASEDIR##));
	require(BASEDIR . 'funcs.inc');
	require(BASEDIR . 'config.php');
	if(checkURLQuery('deletenews.php', $_GET) !== TRUE)
	{
		echo 'Invalid page number.';
	}
	else
	{
		$newsid = $_GET['newsid'];
		$getnews = dbcom("SELECT * FROM news WHERE id = $newsid;");
		$content = mysql_fetch_assoc($getnews);
		if(array_key_exists('action', $_GET) && $_GET['action'] == 'delete')
		{
			dbcom("DELETE FROM news WHERE id='$newsid' LIMIT 1;");
			header("Location: $site_url/admin/news.php");
			die();
		}
	}
	require(ADMINDIR . 'adminheader.php');
	$c = new config();
?>
<!-- LEFT side -->
<td class="leftside" valign="top">
	<a href="<?php echo $site_url; ?>/admin/news.php"> &#149; View Pages</a><br />
	<a href="<?php echo $site_url; ?>/admin/addnews.php"> &#149; Add Page</a><br />
	<a href="<?php echo $site_url; ?>/admin/submitfiles.php"> &#149; Submit Pages</a><br />
	<a href="<?php echo $site_url; ?>/admin/submitfiles.php?submit_to=katz"> &#149; Submit to Katz</a><br />
	<a href="<?php echo $site_url; ?>/admin/submitfiles.php?submit_to=phaze"> &#149; Submit to Phaze</a>
</td>
<!-- END LEFT SIDE -->

<!-- BEGIN RIGHT SIDE -->
<td class="rightside" align="left" valign="top">
	<table border="0" cellspacing="0" cellpadding="0" width="790" height="700">
		<tr><td height="10"></td></tr>
		<tr valign="top">
			<td>
				<h2>Confirm Page Delete</h2>
				<p>
<?php
	if(checkURLQuery('deletenews.php', $_GET) !== TRUE)
	{
		echo 'Invalid page number.';
	}
	else
	{
		$newsid = $_GET['newsid'];
		$getnews = dbcom("SELECT * FROM news WHERE id = $newsid;");
		$content = mysql_fetch_assoc($getnews);
		echo "
	Are you sure you want to delete this page?<br><br>
	<a href=\"$site_url/news-".$content[id]."-".$content[title].".html\" target=_blank>$content[title]</a> - ($content[date])<br><br>
	<a href=\"deletenews.php?newsid=".$content[id]."&action=delete\"><img src=\"$site_url/admin/images/delete.png\" alt=\"Delete Page\" height=16 width=16 align=middle border=0> Delete Page </a>
		";
	}
?> 
				</p>
			</td>
		</tr>
		<tr><td height="10"></td></tr>
	</table>
</td>
<!-- END RIGHT SIDE -->
<?php
	require(ADMINDIR . 'adminfooter.php');
?>
Return current item: DDL CMS