Exemplo n.º 1
0
        $dirperms = 0777;
        $fileperms = 0666;
        @unlink($ERROR_PATH . 'FILE_LOCK');
        $FUD_OPT_2 ^= 8388608;
    } else {
        if (!strncmp(PHP_SAPI, 'apache', 6)) {
            $dirperms = 0700;
            $fileperms = 0600;
        } else {
            $dirperms = 0711;
            $fileperms = 0644;
        }
    }
    chmoddir(realpath($WWW_ROOT_DISK), $dirperms, $fileperms, true);
    chmoddir(realpath($DATA_DIR), $dirperms, $fileperms, true);
    change_global_settings(array('FUD_OPT_2' => $FUD_OPT_2));
}
$status = $FUD_OPT_2 & 8388608 ? 'LOCKED' : 'UNLOCKED';
require $WWW_ROOT_DISK . 'adm/admpanel.php';
?>
<div align="center" style="font-size: xx-large; color: #ff0000;">
	The forum's files appear to be: <b><?php 
echo $status;
?>
</b>.<br>
	<font size="-1">If this test claims that the forum is unlocked, but you still cannot modify your files click on the "Unlock Files" button.</font><br>
	For security reasons remember to lock your forum's files after you are done editing them.
</div>
<form method="post">
<table border=0 cellspacing=0 cellpadding=3>
<tr><td>Login:</td><td><input type="text" name="usr_login" value="<?php 
Exemplo n.º 2
0
     } else {
         if (!strncmp($k, 'FUD_OPT_', 8)) {
             $GLOBALS['NEW_' . substr($k, 0, 9)] |= (int) $v;
         }
     }
 }
 for ($i = 1; $i < 10; $i++) {
     if (!isset($GLOBALS['FUD_OPT_' . $i])) {
         break;
     }
     if ($GLOBALS['FUD_OPT_' . $i] != $GLOBALS['NEW_FUD_OPT_' . $i]) {
         $ch_list['FUD_OPT_' . $i] = $GLOBALS['NEW_FUD_OPT_' . $i];
     }
 }
 if (isset($ch_list)) {
     change_global_settings($ch_list);
     /* some fields require us to make special changes */
     if (isset($ch_list['SHOW_N_MODS'])) {
         $GLOBALS['SHOW_N_MODS'] = $ch_list['SHOW_N_MODS'];
         fud_use('users_reg.inc');
         rebuildmodlist();
     }
     /* Handle disabling of aliases */
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 128 && !($NEW_FUD_OPT_2 & 128)) {
         q('UPDATE ' . $DBHOST_TBL_PREFIX . 'users SET alias=login');
         rebuildmodlist();
     }
     /* Topic/Message tree view disabling code */
     $o = 0;
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 512 && !($NEW_FUD_OPT_2 & 512)) {
         $o |= 128;
Exemplo n.º 3
0
    @unlink("{$WWW_ROOT_DISK}GLOBALS.php");
    @unlink("{$WWW_ROOT_DISK}adm/GLOBALS.php");
    symlink("{$INCLUDE}GLOBALS.php", "{$WWW_ROOT_DISK}GLOBALS.php");
    symlink("{$INCLUDE}GLOBALS.php", "{$WWW_ROOT_DISK}adm/GLOBALS.php");
} else {
    $fp = fopen("{$WWW_ROOT_DISK}GLOBALS.php", "w");
    fwrite($fp, '<?php require "' . $INCLUDE . 'GLOBALS.php"; ?>');
    fclose($fp);
    $fp = fopen("{$WWW_ROOT_DISK}adm/GLOBALS.php", "w");
    fwrite($fp, '<?php require "' . $INCLUDE . 'GLOBALS.php"; ?>');
    fclose($fp);
}
/* Modify FUDforum Configuration Parameters options */
$fud_set = array('INCLUDE' => $INCLUDE, 'WWW_ROOT' => $WWW_ROOT, 'WWW_ROOT_DISK' => $WWW_ROOT_DISK, 'DATA_DIR' => $DATA_DIR, 'ERROR_PATH' => $ERROR_PATH, 'MSG_STORE_DIR' => $MSG_STORE_DIR, 'TMP' => $TMP, 'FILE_STORE' => $FILE_STORE, 'FORUM_SETTINGS_PATH' => $FORUM_SETTINGS_PATH);
require "{$INCLUDE}glob.inc";
change_global_settings($fud_set);
/* create default theme */
$langl = array('bg' => 'bulgarian', 'zt' => 'chinese_utf8', 'zh' => 'chinese', 'cs' => 'czech', 'nl' => 'dutch', 'fr' => 'french', 'de' => 'german', 'it' => 'italian', 'lv' => 'latvian', 'no' => 'norwegian', 'pl' => 'polish', 'pt' => 'portuguese', 'ro' => 'romanian', 'ru' => 'russian', 'sk' => 'slovak', 'es' => 'spanish', 'sv' => 'swedish', 'tr' => 'turkish');
if (isset($langl[$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']])) {
    $lang = $langl[$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']];
} else {
    $lang = 'english';
}
$locale = trim(fread(fopen("{$DATA_DIR}/thm/default/i18n/{$lang}/locale", "r"), 1024));
$pspell_lang = trim(fread(fopen("{$DATA_DIR}/thm/default/i18n/{$lang}/pspell_lang", "r"), 1024));
$GLOBALS['phpgw']->db->query("DELETE FROM phpgw_fud_themes");
$GLOBALS['phpgw']->db->query("INSERT INTO phpgw_fud_themes(name, theme, lang, locale, theme_opt, pspell_lang) VALUES('default', 'default', '{$lang}', '{$locale}', 3, '{$pspell_lang}')");
$theme = $GLOBALS['phpgw']->db->get_last_insert_id('phpgw_fud_themes', 'id');
/* this is a little tricky, basically it makes sure that any users created before the forum
 * was activated with the default theme of 1, have the correct theme, in case the primary theme
 * id != 1