コード例 #1
0
ファイル: 6.php プロジェクト: BackupTheBerlios/viscacha-svn
<?php

include 'data/config.inc.php';
if (isset($_REQUEST['save']) && $_REQUEST['save'] == 1) {
    require_once 'install/classes/class.filesystem.php';
    $filesystem = new filesystem($config['ftp_server'], $config['ftp_user'], $config['ftp_pw'], $config['ftp_port']);
    $filesystem->set_wd($config['ftp_path'], $config['fpath']);
    include 'install/classes/class.phpconfig.php';
    $c = new manageconfig();
    $c->getdata('data/config.inc.php');
    $c->updateconfig('fname', html_enc);
    $c->updateconfig('fdesc', html_enc);
    $_REQUEST['furl'] = empty($_REQUEST['furl']) ? getFUrl() : $_REQUEST['furl'];
    if (strtolower(substr($_REQUEST['furl'], 0, 4)) == 'www.') {
        $https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
        $_REQUEST['furl'] = $https . $_REQUEST['furl'];
    }
    $c->updateconfig('furl', str);
    $_REQUEST['fpath'] = !empty($_REQUEST['fpath']) ? $_REQUEST['fpath'] : str_replace('\\', '/', realpath('./'));
    $c->updateconfig('fpath', str);
    $c->updateconfig('forenmail', str);
    $c->updateconfig('cookie_prefix', str);
    $c->updateconfig('langdir', int);
    $langdir = $c->data['langdir'];
    if (empty($c->data['cryptkey']) == true) {
        $c->updateconfig('cryptkey', str, md5(microtime()));
    }
    $c->updateconfig('foffline', int, 1);
    $c->updateconfig('version', str, VISCACHA_VERSION);
    if (!empty($c->data['forenmail']) && empty($c->data['pccron_sendlog_email'])) {
        $c->updateconfig('pccron_sendlog_email', str, $c->data['forenmail']);
コード例 #2
0
ファイル: 5.php プロジェクト: BackupTheBerlios/viscacha-svn
include 'data/config.inc.php';
function getLangNameByPath($dir)
{
    $file = realpath($dir) . DIRECTORY_SEPARATOR . 'settings.lng.php';
    if (file_exists($file)) {
        include $file;
        if (!empty($lang['lang_name'])) {
            return $lang['lang_name'];
        }
    }
    return null;
}
if (empty($config['furl']) == false) {
    $furl = $config['furl'];
} else {
    $furl = getFUrl();
}
if (empty($config['forenmail']) == false) {
    $email = $config['forenmail'];
} elseif (isset($_SERVER['SERVER_ADMIN'])) {
    $email = $_SERVER['SERVER_ADMIN'];
} else {
    $email = '';
}
// Determine path to script
$fpath = !empty($config['fpath']) ? $config['fpath'] : str_replace('\\', '/', realpath('./'));
$langarr = array();
$d = dir('language/');
while (false !== ($entry = $d->read())) {
    $dir = $d->path . DIRECTORY_SEPARATOR . $entry;
    if (is_id($entry) && is_dir($dir)) {