<?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');
?>
<!-- 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">
<h2>Auto-Submit Your Pages</h2>
<br />
<?php
if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('files', $_GET) && ctype_digit($_GET['files']))
{
$files = $_GET['files'];
}
else
{
$files = 0; # start at first line, or last 10 files created
}
$count = dbcom('SELECT COUNT(id) AS num_rows FROM news;');
$rows = mysql_fetch_object($count);
$totalrecs = $rows->num_rows;
$currentdate = date('F j Y - G:i a');
?>
<table border="0" width="100%" cellpadding="0">
<tr valign="top">
<td width="50%">
<h2>Instructions:</h2>
<ol>
<li>Select the <b>10 pages</b> you want to submit.</li>
<li>Click on the Submit button below.</li>
</ol>
</td>
<td style="font-size: xx-small;">
Legend:<br />
<ul style="list-style-type: none;">
<li>• Newest (or newly updated) pages are listed first.</li>
<li>• <span style="color: #ff0000;">Red dates:</span> submitted within the last 7 days.</li>
<li>• <span style="color: #008000;">Green dates:</span> safe to submit.</li>
<li>• <b>Current Date</b>: <?php echo $currentdate; ?></li>
</ul>
</td>
</tr>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="1">
<tr height="25">
<td width="15"></td>
<td width="*"><b><u>Download Name</u></b></td>
<td width="30"></td>
<td width="30"></td>
<td width="30"></td>
<td width="200")><b><u>Submitted</u></b></td>
<td width="200")><b><u>Updated</u></b></td>
</tr>
<form name="add" action="../autosubmitter/index.php" method="post">
<?php
$now = date('Y-m-d G:i:s');
require(ADMINDIR . 'datediff.php');
if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('submit_to', $_GET) === TRUE && ($_GET['submit_to'] == 'katz' || $_GET['submit_to'] == 'phaze'))
{
if($_GET['submit_to'] == 'katz')
{
$urls = array
(
'http://katz.cd/submit.php',
'http://katzporn.com/submit.php'
);
}
elseif($_GET['submit_to'] == 'phaze')
{
$urls = array
(
'http://phazeddl.com/submit.php',
'http://phazeporn.com/submit.php',
'http://phazemp3.com/submit.php'
);
}
}
else
{
$get = dbcom('SELECT url FROM urls;');
if(mysql_num_rows($get))
{
while($row = mysql_fetch_assoc($get))
{
$urls[] = $row['url'];
}
}
}
if($files < 0)
{
$files = 0;
}
$getnews = dbcom("SELECT * FROM news ORDER BY date DESC LIMIT 10 OFFSET $files;");
# list the last 10 pages created
$count = 0;
while($r=mysql_fetch_array($getnews))
{
extract($r);
$count++;
echo"<input type=\"hidden\" name=\"title[]\" value=\"$title\">";
if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('submit_to', $_GET) === TRUE && ($_GET['submit_to'] == 'katz' || $_GET['submit_to'] == 'phaze'))
{
if($_GET['submit_to'] == 'katz')
{
echo"<input type=\"hidden\" name=\"url[]\" value=\"$site_url/news_katz-".$id."-".dot($title).".html\">";
}
elseif($_GET['submit_to'] == 'phaze')
{
echo"<input type=\"hidden\" name=\"url[]\" value=\"$site_url/news_phaze-".$id."-".dot($title).".html\">";
}
else
{
echo"<input type=\"hidden\" name=\"url[]\" value=\"$site_url/news-".$id."-".dot($title).".html\">";
}
}
else
{
echo"<input type=\"hidden\" name=\"url[]\" value=\"$site_url/news-".$id."-".dot($title).".html\">";
}
echo"<input type=\"hidden\" name=\"atype[]\" value=\"$type\">";
echo"<input type=\"hidden\" name=\"id[]\" value=\"$id\">";
echo"<tr onmouseover=\"this.style.backgroundColor='$hovercolor'; return true;\" onmouseout=\"this.style.backgroundColor=''\">
<td>".$count.".</td><td><a title=\"$type\">".shortentext($title)."</a></td>
<td align=center>";
if($_GET['submit_to'] == 'katz')
{
echo "<a href=\"$site_url/news_katz-".$id."-".dot($title).".html\" target=\"_blank\"><img src=\"$site_url/admin/images/view.png\" height=\"16 width=\"16\" border=\"0\" align=\"middle\" alt=\"View Page\"></a>";
}
elseif($_GET['submit_to'] == 'phaze')
{
echo "<a href=\"$site_url/news_phaze-".$id."-".dot($title).".html\" target=\"_blank\"><img src=\"$site_url/admin/images/view.png\" height=\"16 width=\"16\" border=\"0\" align=\"middle\" alt=\"View Page\"></a>";
}
else
{
echo "<a href=\"$site_url/news-".$id."-".dot($title).".html\" target=_blank><img src=\"$site_url/admin/images/view.png\" height=16 width=16 border=0 align=middle alt=\"View Page\"></a>";
}
echo "</td>
<td align=center>
<a href=\"$site_url/admin/editnews.php?id=$id&action=edit\"><img src=\"$site_url/admin/images/edit.png\" height=16 width=16 border=0 align=middle alt=\"Edit Page\"></a>
</td>
<td align=center>
<a href=\"$site_url/admin/deletenews.php?newsid=$id\"><img src=\"$site_url/admin/images/delete.png\" height=16 width=16 border=0 align=middle alt=\"Delete Page\"></a>
</td>
<td style=\"color:";
if((datediff('y', $submitted, $now, false) > 6) || ($submitted == '0000-00-00 00:00:00'))
{
echo 'green';
}
else
{
echo 'red';
}
if($submitted == '0000-00-00 00:00:00')
{
echo '">Never</td>';
}
else
{
echo "\">".date("F j Y - G:i a",strtotime($submitted))."</td>";
}
echo "<td>".date("F j Y - G:i a",strtotime($date))."</td></tr>";
if($count == 10)
{
break;
}
}
$domain = $_SERVER['SERVER_NAME'];
if(stristr($domain, 'www'))
{
$domain = substr($domain, 4);
}
$sname = capitalize($domain);
$sname = str_replace('ddl', 'DDL', $sname);
$surl = 'http://' . $_SERVER['SERVER_NAME'];
$smail = 'admin@' . $domain;
echo '<tr height=40><td colspan=3>';
if(($totalrecs - $files) < 11)
{
echo '<font color=gray><< Previous 10</font> - ';
}
else
{
echo '<a href=submitfiles.php?files=' . ($files+10) . '><< Previous 10</a> - ';
}
if($files > 9)
{
echo '<a href=submitfiles.php?files=' . ($files-10) . '>Next 10 >></a>';
}
else
{
echo '<font color=gray>Next 10 >></font>';
}
?>
</td></tr>
</table>
<input type="hidden" name="sname" value="<?php echo $sname; ?>" />
<input type="hidden" name="surl" value="<?php echo $surl; ?>" />
<input type="hidden" name="email" value="<?php echo $smail; ?>" />
<p>
<b>The pages above will be submitted to the following <?php echo count($urls); ?> URLs<?php if(!(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('submit_to', $_GET) === TRUE)){ ?> <a href="<?php echo $site_url; ?>/admin/autosubmitter.php?go=urls" title="Edit Submit Page URLs" style=font-size:9px>[Edit URLs]</a><?php } ?>:</b>
<p>
<table border=0 width=750><tr>
<?php
foreach($urls as $id => $url)
{
if(!$url)
{
continue;
}
echo "<td width=\"50%\">$row<input type=\"checkbox\" name=\"submit_to[". ($id) ."]\" value=\"$id\" checked=\"yes\" id=\"list\"/>".$url." </td>";
if(is_int(($id + 1) / 2))
{
echo '</tr><tr>';
}
}
if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('submit_to', $_GET) === TRUE && ($_GET['submit_to'] == 'katz' || $_GET['submit_to'] == 'phaze'))
{
echo '<input type="hidden" name="submit_to_site" value="' . $_GET['submit_to'] . '" />' . "\n";
}
?>
</tr></table>
<script type="text/javascript">
<!-- Begin
var checkflag = "true";
// End -->
</script>
<P><input type=button value="Uncheck All" class="form" onClick="this.value=check(this.form.list)">
<p><input type="Submit" value="Multi-Autosubmit!" class="formbuttonwide">
</form>
</td>
</tr>
<!-- END RIGHT SIDE -->
<?php
require(ADMINDIR . 'adminfooter.php');
?>