<?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');
require(ADMINDIR . 'adminheader.php');
$c = new config();
?>
<!-- LEFT side -->
<tr>
<td width="180" style="padding: 0;">
<div class='sidebartitle'>
Maintenance
</div>
<a href="<?php echo $site_url; ?>/admin/news.php"> • View Pages</a><br />
<a href="<?php echo $site_url; ?>/admin/addnews.php"> • Add Page</a><br />
<a href="<?php echo $site_url; ?>/admin/submitfiles.php"> • Submit Pages</a><br />
<a href="<?php echo $site_url; ?>/admin/submitfiles.php?submit_to=katz"> • Submit to Katz</a><br />
<a href="<?php echo $site_url; ?>/admin/submitfiles.php?submit_to=phaze"> • Submit to Phaze</a><br />
</td>
<!-- END LEFT SIDE -->
<!-- BEGIN RIGHT SIDE -->
<td width="*" align="left" valign="top" class="mainbox">
<?php
$news = $_POST['news'];
$title = $_POST['title'];
$type = $_POST['atype'];
# escape single quotes
$title = rtrim($title);
$title = preg_replace("/[^a-zA-Z0-9-_\s.()+:]/", '', $title);
$title = str_replace(array("'", '"'), '`', $title);
$title = Capitalize($title);
#$news = str_replace ('"', "'", $news);
if(get_magic_quotes_gpc() === 1)
{
$news = stripslashes($news);
}
$news = mysql_escape_string($news);
if(!$title)
{
echo '<p>Page not added, You must enter a title!<br><br><a href="javascript:history.go(-1)">Go back</a> and try again.</p>';
require(ADMINDIR . 'adminfooter.php');
die();
}
else
{
dbcom("INSERT INTO news (title, date, news, type) VALUES ('$title', CURRENT_TIMESTAMP, '$news', '$type');");
}
echo '<p>Your download was added!</p>';
$newid = dbcom('SELECT id FROM news ORDER BY date DESC LIMIT 1;');
$id = mysql_fetch_array($newid);
echo '<p><a href="' . $site_url . '/news-' . $id['id'] . '-' . dot($title) . '.html" target="_blank"><img src="' . $site_url . '/admin/images/view.png" alt="View Page" height="16" width="16" align="middle" border="0"> [View] </a> ' . $title . ' (' . $type . ')</p>';
echo '<p><a href="' . $site_url . '/news_katz-' . $id['id'] . '-' . dot($title) . '.html" target="_blank"><img src="' . $site_url . '/admin/images/view.png" alt="View Page" height="16" width="16" align="middle" border="0"> [View Katz] </a> ' . $title . ' (' . $type . ')</p>';
echo '<p><a href="' . $site_url . '/news_phaze-' . $id['id'] . '-' . dot($title) . '.html" target="_blank"><img src="' . $site_url . '/admin/images/view.png" alt="View Page" height="16" width="16" align="middle" border="0"> [View Phaze] </a> ' . $title . ' (' . $type . ')</p>';
echo '<p><a href="' . $site_url . '/admin/editnews.php?id=' . $id['id'] . '&action=edit" target="_top"><img src="' . $site_url . '/admin/images/edit.png" alt="Edit Page" height="16" width="16" align="middle" border="0"> [Edit] </a> ' . $title . ' (' . $type . ')</p>';
require(ADMINDIR . 'rss.php');
echo '<p><a href="' . $site_url . '/rss.xml" target="_blank"><img src="' . $site_url . '/admin/images/view.png" alt="View RSS Feed" height="16" width="16" align="middle" border="0"> See the updated RSS feed</a><br></p>';
?>
</td>
</tr>
<!-- END RIGHT SIDE -->
<?php
require(ADMINDIR . 'adminfooter.php');
?>