summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]admin/index.php2
-rwxr-xr-x[-rw-r--r--]admin/subscriptions.php8
-rwxr-xr-x[-rw-r--r--]install.php44
3 files changed, 25 insertions, 29 deletions
diff --git a/admin/index.php b/admin/index.php
index b075206..1a43020 100644..100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,7 +1,7 @@
<?php
require_once dirname(__FILE__) . '/inc/auth.inc.php';
-require_once(dirname(__FILE__) . '/../app/classes/Planet.class.php');
+require_once dirname(__FILE__) . '/../app/app.php';
//Load configuration
$config_file = dirname(__FILE__) . '/../custom/config.yml';
diff --git a/admin/subscriptions.php b/admin/subscriptions.php
index 0b25bde..ea2f113 100644..100755
--- a/admin/subscriptions.php
+++ b/admin/subscriptions.php
@@ -1,10 +1,6 @@
<?php
-require_once dirname(__FILE__).'/inc/auth.inc.php';
-
-include_once(dirname(__FILE__).'/../app/classes/Planet.class.php');
-include_once(dirname(__FILE__).'/../app/lib/spyc-0.5/spyc.php');
-require_once dirname(__FILE__).'/../app/lib/lib.opml.php';
-require_once dirname(__FILE__).'/../app/lib/simplepie/simplepie.inc';
+require_once dirname(__FILE__) . '/inc/auth.inc.php';
+require_once dirname(__FILE__) . '/../app/app.php';
function removeSlashes(&$item, $key){
$item = stripslashes($item);
diff --git a/install.php b/install.php
index 06ffc5c..eaf736a 100644..100755
--- a/install.php
+++ b/install.php
@@ -1,5 +1,5 @@
<?php
-include (dirname(__FILE__).'/app/classes/Planet.class.php');
+require_once dirname(__FILE__) . '/app/app.php';
define('CONFIG_FILE', dirname(__FILE__).'/custom/config.yml');
define('PWD_FILE', dirname(__FILE__).'/admin/inc/pwd.inc.php');
@@ -12,7 +12,7 @@ if (file_exists(CONFIG_FILE) && file_exists(PWD_FILE)) {
$status = 'installed';
} elseif (isset($_REQUEST['url'])) {
$save = Array();
-
+
//Save config file
$config = Array(
'url' => $_REQUEST['url'],
@@ -25,12 +25,12 @@ if (file_exists(CONFIG_FILE) && file_exists(PWD_FILE)) {
'postmaxlength' => 0,
'cachedir' => './cache'
);
- $planet_config = new PlanetConfig($config);
- $save['config'] = file_put_contents(dirname(__FILE__).'/custom/config.yml', $planet_config->toYaml());
-
+ $CreatePlanetConfig = new PlanetConfig($config);
+ $save['config'] = file_put_contents(dirname(__FILE__).'/custom/config.yml', $CreatePlanetConfig->toYaml());
+
//Save password
$save['password'] = file_put_contents(dirname(__FILE__).'/admin/inc/pwd.inc.php', '<?php $login="admin"; $password="'.md5($_REQUEST['password']).'"; ?>');
-
+
if (0 != ($save['config'] + $save['password'])) {
$status = 'installed';
}
@@ -64,8 +64,8 @@ if (file_exists(CONFIG_FILE) && file_exists(PWD_FILE)) {
'label' => '<code>./cache</code> is writable',
'solution' => 'Make <code>./cache</code> writable with CHMOD'
),
- );
-
+ );
+
foreach ($tests as $k => $v) {
// test file requirements, exclude php5 test
if ($tests[$k]['file']) {
@@ -91,7 +91,7 @@ if (file_exists(CONFIG_FILE) && file_exists(PWD_FILE)) {
$strRecommendation .= '<li>'.$test['solution'].'</li>';
}
}
-
+
if ($bInstallOk) {
$status = 'install';
} else {
@@ -113,12 +113,12 @@ header('Content-type: text/html; charset=UTF-8');
body {
font: normal 1em sans-serif;
}
-
+
.section {
width: 500px;
margin: 0 auto;
}
-
+
/* Error */
span.ok {
color: #090;
@@ -130,16 +130,16 @@ header('Content-type: text/html; charset=UTF-8');
th {
text-align: left;
}
-
+
/* Install */
.field label {
display: block;
}
-
+
.submit {
font-size: 2em;
}
-
+
/* Installed */
</style>
</head>
@@ -147,11 +147,11 @@ header('Content-type: text/html; charset=UTF-8');
<body>
<div class="section">
<h1>moonmoon installation</h1>
-
+
<?php if ('error' == $status) : ?>
<div id="compatibility">
<h2>Sorry, your server is not compatible with moonmoon.</h2>
-
+
<h3>Your server does not fulfill the requirements</h3>
<table>
<thead>
@@ -164,14 +164,14 @@ header('Content-type: text/html; charset=UTF-8');
<?php echo $strInstall ?>
</tbody>
</table>
-
+
<h3>Troubleshooting</h3>
<p>To install moonmoon, try the following changes:</p>
<ul>
<ul><?php echo $strRecommendation; ?></ul>
</ul>
</div>
-
+
<?php elseif ('install' == $status) : ?>
<div>
<form method="post" action="">
@@ -182,7 +182,7 @@ header('Content-type: text/html; charset=UTF-8');
document.forms[0].elements[1].value = document.URL.replace('install.php','');
-->
</script>
-
+
<p class="field">
<label for="title">Title:</label>
<input type="text" id="title" name="title" value="My website"/>
@@ -202,9 +202,9 @@ header('Content-type: text/html; charset=UTF-8');
</fieldset>
</form>
</div>
-
+
<?php elseif ('installed' == $status): ?>
-
+
<p>Congratulations! Your moonmoon is ready.</p>
<h3>What's next?</h3>
<ol>
@@ -212,7 +212,7 @@ header('Content-type: text/html; charset=UTF-8');
<strong>Delete</strong> <code>install.php</code> with your FTP software.
</li>
<li>
- Use your password to go to the
+ Use your password to go to the
<a href="./admin/">administration panel</a>
</li>
</ol>