<?php
define('SCRIPT_VERSION', '3.2');
/**********************************************************
* ______ ______ ___ _______ ___ ___ _______ *
* | _ \ | _ \ | | | _ || 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. *
* *
**********************************************************/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DDLCMS Installation Script</title>
<style>
body {
background: #aaaaaa;
color: #000000;
font-family: verdana, arial, serif;
font-size: 1em;
/*font-size: 11px;*/
}
h2, h3, .center {
text-align: center;
}
table {
background: #ffffff;
border: 1px #000000 solid;
border-spacing: 0;
margin: 15px;
width: 700px;
align: center;
}
td {
background: inherit;
color: #000000;
font-family: verdana, arial, serif;
font-size: 11px;
padding: 5px;
}
table.form {
background: dddddd;
}
form.td {
color: #444444;
font-family: verdana, arial, serif;
font-size: 13px;
padding: 2px;
}
.right {
text-align: right;
}
.checked {
background: inherit;
color: #008800;
margin: 10px;
}
.warning {
background: inherit;
color: #ff0000;
margin: 10px;
}
.indent {
margin: 10px;
}
.red {
background: inherit;
color: #ff0000;
}
.green {
background: inherit;
color: #008000;
}
div.scroll {
width:450px;
height:250px;
overflow:auto;
}
a {
font-family: verdana;
}
a:link {
background: inherit;
color: #3333dd;
text-decoration: none;
}
a:visited {
background: inherit;
color: #3333dd;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h2>DDLCMS Installation Script</h2>
<table align="center">
<tr>
<td>
<P>
Be sure to CHMOD the following folders back to 755:
<P>
<ul>
<?
$perms = "GOOD";
$pathtodocroot = explode("/",$_SERVER['DOCUMENT_ROOT']);
$docroot_folder = $pathtodocroot[count($pathtodocroot) - 1];
if (file_exists($_SERVER['DOCUMENT_ROOT'])) {
echo "<li> <span style=\"color:";
if (substr(sprintf('%o', fileperms($_SERVER['DOCUMENT_ROOT'])), -4) != "0755")
{
echo "red";
$perms = "WRONG";
} else {
echo "green";
}
echo "\">";
echo $docroot_folder;
echo " (" . substr(sprintf('%o', fileperms($_SERVER['DOCUMENT_ROOT'])), -3);
echo ")</span></li>";
}
echo "<ul>";
$chmod755 = array
(
'admin',
'autosubmitter',
'bookmarks',
'edit',
'images',
'instantle',
'letters',
'news',
'skins',
'topsites',
);
for($i = 0; $i < count($chmod755); $i++)
{
if (file_exists($chmod755[$i])) {
echo "<li> <span style=\"color:";
if (substr(sprintf('%o', fileperms($chmod755[$i])), -4) != "0755")
{
echo "red";
$perms = "WRONG";
} else {
echo "green";
}
echo "\">";
echo $chmod755[$i];
echo " (" . substr(sprintf('%o', fileperms($chmod755[$i])), -3);
echo ")</span></li>";
} else {
$perms = "WRONG";
echo "<li><span style=\"color:red\">Warning! The directory \"" . $chmod755[$i] . "\" doesn't exist. Make sure you uploaded it.</span></li>";
}
}
?>
</ul>
</ul>
<P>
Be sure to CHMOD the following files back to 644:
<P>
<ul>
<div class="scroll">
<?
$chmod644 = array
(
'.htaccess',
'aboutus.php',
'blacklist.php',
'button.php',
'bookmark_small.php',
'contact.php',
'ddlcms.js',
'dmca.php',
'faq.php',
'favicon.ico',
'frame.php',
'fwd.php',
'go.php',
'index.php',
'killthreat.php',
'linktous.php',
'main.php',
'robots.txt',
'seoreport.php',
'submit.php',
'submitted.php',
'text2image.php',
'thanks.php',
'tools.php',
'top.php',
'top5.php',
'tos.php',
'usersonline.php',
'whitelist.php',
'wrong.php',
'autosubmitter/ban.php',
'autosubmitter/index.php',
'autosubmitter/urls.php',
'instantle/addlink.php',
'instantle/form.php',
'instantle/links.inc',
'instantle/links2.inc',
'instantle/links3.inc',
'news/page.php',
'admin/accesslog.inc',
'admin/addnews.php',
'admin/adminbannedips.inc',
'admin/adminfooter.php',
'admin/adminfuncs.inc',
'admin/adminheader.php',
'admin/adminpass.inc',
'admin/autosubmitter.php',
'admin/backupdb.inc',
'admin/datediff.php',
'admin/ddl.php',
'admin/deletenews.php',
'admin/edit.php',
'admin/editnews.php',
'admin/editpages.inc',
'admin/editplinks.inc',
'admin/editrecents.inc',
'admin/editsearches.inc',
'admin/editsuff.inc',
'admin/email.php',
'admin/iAdminFuncs.inc',
'admin/index.php',
'admin/instantLEadmin.php',
'admin/login.php',
'admin/news.php',
'admin/optimtables.inc',
'admin/restoredb.inc',
'admin/rss.php',
'admin/submit.php',
'admin/submitfiles.php',
'admin/submitnews.php',
'admin/updatedic.inc',
'admin/wysiwyg.js',
'admin/tsadmin/admin.php',
'admin/tsadmin/iframe.php',
'admin/tsadmin/main.php',
'admin/tsadmin/menu.php',
'admin/tsadmin/newwin.php',
'topsites/accounts.php',
'topsites/common.php',
'topsites/compiler.php',
'topsites/cron.php',
'topsites/http.php',
'topsites/image.php',
'topsites/in.php',
'topsites/index.php',
'topsites/mysql.php',
'topsites/new.php',
'topsites/out.php',
'topsites/random.php',
'topsites/tsphp.php',
);
for($i = 0; $i < count($chmod644); $i++)
{
if (file_exists($chmod644[$i])) {
echo "<li> <span style=\"color:";
if (substr(sprintf('%o', fileperms($chmod644[$i])), -4) != "0644")
{
echo "red";
$perms = "WRONG";
} else {
echo "green";
}
echo "\">";
echo $chmod644[$i];
echo " (" . substr(sprintf('%o', fileperms($chmod644[$i])), -3);
echo ")</span></li>";
} else {
$perms = "WRONG";
echo "<li><span style=\"color:red\">Warning! The file \"" . $chmod644[$i] . "\" doesn't exist. Make sure you uploaded it.</span></li>";
}
}
?>
</div>
</ul>
<P>
Done fixing? Refresh this page.
<P>
<?php
if ($perms == "GOOD")
{
echo '<span style="color:green">Your permissions are safe now!<br><br><span style="font-size:16px"><b>Be sure to DELETE this file (perms.php) now!</b></span></span>';
}
else
{
echo '<span style="color:red">Fix the permissions for the above folders and files, then Refresh this page, until all the lines are GREEN in color!<br><br>Make sure you delete this file when you\'re done!!!</span>';
}
?>
<br>
<br>
</td>
</tr>
</table>
</body>
</html>