Пример #1
0
    ?>
" class="serendipityPrettyButton input_button"></div>
</form>

<?php 
} elseif ($serendipity['GET']['step'] == '2b') {
    ?>
<form action="?" method="post">
    <input type="hidden" name="serendipity[step]" value="<?php 
    echo $serendipity['GET']['step'];
    ?>
">
    <input type="hidden" name="serendipity[getstep]" value="3">
<?php 
    $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
    serendipity_printConfigTemplate($config, $from, true, false, false);
    ?>
    <div align="center"><input name="submit" type="submit" value="<?php 
    echo COMPLETE_INSTALLATION;
    ?>
" class="serendipityPrettyButton input_button"></div>
</form>

<?php 
} elseif ((int) $serendipity['GET']['step'] == 3) {
    $serendipity['dbPrefix'] = $_POST['dbPrefix'];
    echo CHECK_DATABASE_EXISTS . '...';
    $t = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors", false, 'both', false, false, false, true);
    if (is_array($t)) {
        echo ' <strong>' . THEY_DO . '</strong>, ' . WONT_INSTALL_DB_AGAIN;
        echo '<br />';
Пример #2
0
            $permalinkOld = array($oldConfig['serendipityHTTPPath'], $oldConfig['serendipityPath'], $oldConfig['baseURL'], $oldConfig['indexFile'], $oldConfig['rewrite']);
            $permalinkNew = array($serendipity['serendipityHTTPPath'], $serendipity['serendipityPath'], $serendipity['baseURL'], $serendipity['indexFile'], $serendipity['rewrite']);
            // Compare all old permalink section values against new one. A change in any of those
            // will force to update the .htaccess for rewrite rules.
            $permconf = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
            if (is_array($permconf) && is_array($permconf['permalinks']['items'])) {
                foreach ($permconf['permalinks']['items'] as $permitem) {
                    $permalinkOld[] = $oldConfig[$permitem['var']];
                    $permalinkNew[] = $serendipity[$permitem['var']];
                }
            }
            if (serendipity_checkPermission('siteConfiguration') && serialize($permalinkOld) != serialize($permalinkNew)) {
                printf(ATTEMPT_WRITE_FILE, $serendipity['serendipityPath'] . '.htaccess');
                $res = serendipity_installFiles($serendipity['serendipityPath']);
                if (is_array($res)) {
                    echo implode('<br />', $res);
                } else {
                    echo DONE . '<br />';
                }
                serendipity_buildPermalinks();
            }
            echo '<br /><div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . WRITTEN_N_SAVED . '</div>';
        }
        break;
    default:
        $from =& $serendipity;
        $t = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
        serendipity_printConfigTemplate($t, $from, false, true);
        break;
}
/* vim: set sts=4 ts=4 expandtab : */
Пример #3
0
                }
                if (serendipity_checkConfigItemFlags($item, 'configuration')) {
                    serendipity_set_config_var($item['var'], $_POST[$item['var']], $serendipity['authorid']);
                }
            }
            $pl_data = array('id' => $serendipity['POST']['authorid'], 'authorid' => $serendipity['POST']['authorid'], 'username' => $_POST['username'], 'realname' => $_POST['realname'], 'email' => $_POST['email']);
            serendipity_updatePermalink($pl_data, 'author');
            serendipity_plugin_api::hook_event('backend_users_edit', $pl_data);
        }
        if ($serendipity['authorid'] === $_SESSION['serendipityAuthorid']) {
            if (is_null($serendipity['detected_lang'])) {
                $_SESSION['serendipityLanguage'] = $serendipity['lang'];
            }
        }
        $from = $_POST;
    }
}
$data['formToken'] = serendipity_setFormToken();
$template = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
$user = serendipity_fetchUsers($serendipity['authorid']);
$from = $user[0];
$from['groups'] = serendipity_getGroups($serendipity['authorid']);
unset($from['password']);
$data['config'] = serendipity_printConfigTemplate($template, $from, true, false);
$add = array('internal' => true);
serendipity_plugin_api::hook_event('backend_sidebar_entries_event_display_profiles', $from, $add);
if (!is_object($serendipity['smarty'])) {
    serendipity_smarty_init();
}
echo serendipity_smarty_show('admin/personal.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
Пример #4
0
                $data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_SUCCESS, YES);
            } else {
                $data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NO);
            }
        } else {
            $data['installerResultDiagnose_IMB'] = serendipity_installerResultDiagnose(S9Y_I_WARNING, NOT_FOUND);
        }
    }
    $data['showWritableNote'] = $showWritableNote;
    $data['errorCount'] = $errorCount;
} elseif ($serendipity['GET']['step'] == '2a') {
    $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE, null, array('simpleInstall'));
    $data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from, true, false, false);
} elseif ($serendipity['GET']['step'] == '2b') {
    $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
    $data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from, true, false, false);
} elseif ($serendipity['GET']['step'] == '3') {
    $serendipity['dbPrefix'] = $_POST['dbPrefix'];
    $t = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}authors", false, 'both', false, false, false, true);
    $data['authors_query'] = $t;
    if (is_array($t)) {
        // void
    } else {
        serendipity_installDatabase();
        $data['install_DB'] = true;
        $authorid = serendipity_addAuthor($_POST['user'], $_POST['pass'], $_POST['realname'], $_POST['email'], USERLEVEL_ADMIN, 1);
        $mail_comments = serendipity_db_bool($_POST['want_mail']) ? 1 : 0;
        serendipity_set_user_var('mail_comments', $mail_comments, $authorid);
        serendipity_set_user_var('mail_trackbacks', $mail_comments, $authorid);
        serendipity_set_user_var('right_publish', 1, $authorid);
        serendipity_addDefaultGroup('USERLEVEL_EDITOR_DESC', USERLEVEL_EDITOR);
Пример #5
0
    $data['res'] = $res;
    if (is_array($res)) {
        $data['diagnosticError'] = true;
    } else {
        /* If we have new rewrite rules, then install them */
        $permalinkOld = array($oldConfig['serendipityHTTPPath'], $oldConfig['serendipityPath'], $oldConfig['defaultBaseURL'], $oldConfig['indexFile'], $oldConfig['rewrite']);
        $permalinkNew = array($serendipity['serendipityHTTPPath'], $serendipity['serendipityPath'], $serendipity['defaultBaseURL'], $serendipity['indexFile'], $serendipity['rewrite']);
        // Compare all old permalink section values against new one. A change in any of those
        // will force to update the .htaccess for rewrite rules.
        $permconf = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
        if (is_array($permconf) && is_array($permconf['permalinks']['items'])) {
            foreach ($permconf['permalinks']['items'] as $permitem) {
                $permalinkOld[] = $oldConfig[$permitem['var']];
                $permalinkNew[] = $serendipity[$permitem['var']];
            }
        }
        if (serendipity_checkPermission('siteConfiguration') && serialize($permalinkOld) != serialize($permalinkNew)) {
            $data['htaccessRewrite'] = true;
            $data['serendipityPath'] = $serendipity['serendipityPath'];
            $res = serendipity_installFiles($serendipity['serendipityPath']);
            $data['res'] = $res;
            serendipity_buildPermalinks();
        }
    }
}
$data['config'] = serendipity_printConfigTemplate(serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE), $serendipity, false, true);
if (!is_object($serendipity['smarty'])) {
    serendipity_smarty_init();
}
echo serendipity_smarty_show('admin/configuration.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */