示例#1
0
文件: core.php 项目: Oros42/BoZoN
    mkdir($_SESSION['upload_path']);
}
if (!is_file($_SESSION['upload_path'] . 'index.html')) {
    file_put_contents($_SESSION['upload_path'] . 'index.html', ' ');
}
if (!is_dir('private')) {
    mkdir('private', 0744);
}
if (!is_writable('private')) {
    echo '<p class="error">auto_restrict error: token folder is not writeable</p>';
}
if (!is_file('private/.htaccess')) {
    file_put_contents('private/.htaccess', 'deny from all');
}
if (!is_file('private/salt.php')) {
    file_put_contents('private/salt.php', '<?php define("BOZON_SALT",' . var_export(generate_bozon_salt(), true) . '); ?>');
} else {
    include 'private/salt.php';
}
if (!is_dir('thumbs/')) {
    mkdir('thumbs/');
}
if (!is_file('thumbs/.htaccess')) {
    file_put_contents('thumbs/.htaccess', 'deny from all');
}
if (!is_file('thumbs/index.html')) {
    file_put_contents('thumbs/index.html', ' ');
}
if (!file_exists($_SESSION['id_file'])) {
    $ids = array();
    store();
示例#2
0
文件: core.php 项目: Pluxopolis/BoZoN
    file_put_contents('thumbs/index.html', ' ');
}
if (!empty($_SESSION['upload_user_path']) && !is_file('thumbs/' . $_SESSION['upload_root_path'] . $_SESSION['upload_user_path'] . '.htaccess')) {
    file_put_contents('thumbs/' . $_SESSION['upload_root_path'] . $_SESSION['upload_user_path'] . '.htaccess', 'deny from all');
}
if (!empty($_SESSION['upload_user_path']) && !is_file('thumbs/' . $_SESSION['upload_root_path'] . $_SESSION['upload_user_path'] . 'index.html')) {
    file_put_contents('thumbs/' . $_SESSION['upload_root_path'] . $_SESSION['upload_user_path'] . 'index.html', ' ');
}
if (!is_file($_SESSION['private_folder'] . '.htaccess')) {
    file_put_contents($_SESSION['private_folder'] . '.htaccess', 'deny from all');
}
if (!is_file($_SESSION['folder_share_file'])) {
    save_folder_share(array());
}
if (!is_file($_SESSION['private_folder'] . 'salt.php')) {
    file_put_contents($_SESSION['private_folder'] . 'salt.php', '<?php define("BOZON_SALT",' . var_export(generate_bozon_salt(), true) . '); ?>');
} else {
    include $_SESSION['private_folder'] . 'salt.php';
}
if (!is_file($_SESSION['id_file'])) {
    $ids = array();
    store($ids);
}
if (!is_file($_SESSION['stats_file'])) {
    save($_SESSION['stats_file'], array());
}
if (!is_file($_SESSION['upload_root_path'] . '.htaccess')) {
    file_put_contents($_SESSION['upload_root_path'] . '.htaccess', 'deny from all');
}
if (!is_file($_SESSION['users_rights_file'])) {
    save_users_rights(array());