コード例 #1
0
ファイル: types.inc.php プロジェクト: hky/bytehoard
function savetypes($types)
{
    global $bhconfig;
    $str = "";
    foreach ($types as $name => $type) {
        $str .= $name . "@@@" . $type . ";;;";
    }
    $str = substr($str, 0, -3);
    bh_changeconfig("types", $str);
}
コード例 #2
0
ファイル: settings.inc.php プロジェクト: hky/bytehoard
#iscore 1
if (!empty($_POST['bhconfig'])) {
    $newbhconfig = $_POST['bhconfig'];
    foreach ($newbhconfig as $newvar => $newval) {
        if ($newvar == "fileroot") {
            if (substr($newval, -1) == "/") {
                $newval = substr($newval, 0, -1);
            }
        }
        bh_changeconfig($newvar, $newval);
    }
    bh_loadconfig();
    bh_log($bhlang['notice:settings_saved'], "BH_NOTICE");
}
if (!empty($_GET['bhconfig'])) {
    $newbhconfig = $_GET['bhconfig'];
    foreach ($newbhconfig as $newvar => $newval) {
        if ($newvar == "fileroot") {
            if (substr($newval, -1) == "/") {
                $newval = substr($newval, 0, -1);
            }
        }
        bh_changeconfig($newvar, $newval);
    }
    bh_loadconfig();
    bh_log($bhlang['notice:settings_saved'], "BH_NOTICE");
}
$layoutobj = new bhadminlayout("settings");
$layoutobj->content1 = $bhconfig;
$layoutobj->title = $bhlang['title:settings'];
$layoutobj->display();
コード例 #3
0
ファイル: appearance.inc.php プロジェクト: hky/bytehoard
<?php

/*
 * ByteHoard 2.1
 * Copyright (c) Andrew Godwin & contributors 2004
 *
 *   Module
 *   $Id: appearance.inc.php,v 1.1 2005/06/17 18:52:00 andrewgodwin Exp $
 *
 */
#name Appearance Module
#author Andrew Godwin
#description Lets you choose between skins.
#iscore 1
if (!empty($_GET['setskin'])) {
    bh_changeconfig("skin", $_GET['setskin']);
    bh_changeconfig("layout", $_GET['setlayout']);
    bh_log($bhlang['notice:skin_changed'], "BH_NOTICE");
    $bhconfig['skin'] = $_GET['setskin'];
    $bhconfig['layout'] = $_GET['setlayout'];
}
$layoutobj = new bhadminlayout("skinslist");
$skins = bh_getskins();
$layoutobj->content1 = $skins;
$layoutobj->content2 = $bhconfig['layout'] . "." . $bhconfig['skin'];
$layoutobj->title = $bhlang['title:appearance'];
$layoutobj->display();
コード例 #4
0
ファイル: savepaths.inc.php プロジェクト: hky/bytehoard
<?php

/*
 * ByteHoard 2.1
 * Copyright (c) Andrew Godwin & contributors 2004
 *
 *   Installer2 - Page File
 *   $Id$
 *
 */
$pagearray = array();
$pagearray['title'] = $bhlang['install:title:bytehoard_installation'] . " :: " . $bhlang['install:title:save_paths'];
require_once "../config.inc.php";
require_once "../includes/db/" . $dbconfig['dbmod'];
$fileroot = $_POST['install']['fileroot'];
$baseuri = $_POST['install']['baseuri'];
if (empty($baseuri) || strpos($baseuri, "://") === FALSE || substr($baseuri, -1) != "/") {
    $pagearray['content'] = $bhlang['install:savepaths:error_baseuri'];
} elseif (empty($fileroot)) {
    $pagearray['content'] = $bhlang['install:savepaths:error_fileroot'];
} else {
    bh_changeconfig("fileroot", $fileroot);
    bh_changeconfig("baseuri", $baseuri);
    $pagearray['content'] = $bhlang['install:savepaths:message'];
    $pagearray['continue'] = 1;
}
return $pagearray;
コード例 #5
0
ファイル: fresh_2.1.g.inc.php プロジェクト: hky/bytehoard
bh_changeconfig("siteslogan", "");
bh_changeconfig("signupmoderation", "1");
bh_changeconfig("profileoptions", "fullname,email");
bh_changeconfig("maxexpires", "60");
bh_changeconfig("lang", "en");
bh_changeconfig("authmodule", "bytehoard.inc.php");
bh_changeconfig("filesystemmodule", "filesystem");
bh_changeconfig("signupdisabled", "0");
bh_changeconfig("fromemail", 'do_not_reply@' . $_SERVER['SERVER_NAME']);
if (bhi_check_imagemagick() == TRUE) {
    bh_changeconfig("imageprog", "imagemagick");
    bh_changeconfig("syspath_convert", "convert");
} elseif (bhi_check_gd() == TRUE) {
    bh_changeconfig("imageprog", "gd");
}
bh_changeconfig("bhfilepath", realpath("../"));
# LOGACTIONS
insert_bhdb("logactions", array("type" => "BH_ERROR", "action" => "onscreen", "parameters" => "error"));
insert_bhdb("logactions", array("type" => "BH_WARNING", "action" => "onscreen", "parameters" => "warning"));
insert_bhdb("logactions", array("type" => "BH_NOTICE", "action" => "onscreen", "parameters" => "notice"));
insert_bhdb("logactions", array("type" => "BH_ONSCREEN", "action" => "onscreen", "parameters" => "warning"));
insert_bhdb("logactions", array("type" => "BH_LOGOUT", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_LOGIN_SUCCESS", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_LOGIN_FAILURE", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_FILE_UPLOAD", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_ACCESS_DENIED", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_FOLDER_CREATED", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_FILE_COPIED", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_FILE_MODIFIED", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_FILE_MOVED", "action" => "logtofile"));
insert_bhdb("logactions", array("type" => "BH_SIGNUP", "action" => "logtofile"));
コード例 #6
0
ファイル: 2.1.a_to_2.1.b.inc.php プロジェクト: hky/bytehoard
insert_bhdb("modulesdirectory", array("module" => "sharingfolder", "status" => "1"));
insert_bhdb("adminmodulesmenu", array("module" => "registrations", "menu" => "page", "status" => "1", "menuorder" => "4"));
insert_bhdb("adminmodulesmenu", array("module" => "appearance", "menu" => "page", "status" => "1", "menuorder" => "5"));
insert_bhdb("modulesmenu", array("module" => "passreset", "menu" => "page", "status" => "1", "menuorder" => "8"));
insert_bhdb("modulesmenu", array("module" => "options", "menu" => "page", "status" => "1", "menuorder" => "50"));
insert_bhdb("modulesusertype", array("module" => "passreset", "usertype" => "guest", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "options", "usertype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "options", "usertype" => "-guest", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "deletefolder", "usertype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "copyfolder", "usertype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "sharingfolder", "usertype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "returntofolder", "usertype" => "*", "status" => "1"));
insert_bhdb("aclpublic", array("filepath" => "/", "status" => "1"));
# 27/7/05: filelink
insert_bhdb("modulesaccesslevel", array("module" => "filelink", "accesslevel" => "3", "status" => "1"));
insert_bhdb("modulesfiletype", array("module" => "filelink", "filetype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "filelink", "usertype" => "*", "status" => "1"));
insert_bhdb("modulesusertype", array("module" => "filelink", "usertype" => "-guest", "status" => "1"));
insert_bhdb("adminmodulesmenu", array("module" => "filelinks", "menu" => "page", "status" => "1", "menuorder" => "6"));
bh_changeconfig("signupmoderation", "1");
bh_changeconfig("profileoptions", "fullname,email");
bh_changeconfig("maxexpires", "60");
bh_changeconfig("lang", "en");
bh_changeconfig("authmodule", "bytehoard.inc.php");
bh_changeconfig("filesystemmodule", "filesystem");
# Correct them & add
foreach ($filecoderows as $key => $filecoderow) {
    $filecoderow['username'] = "******";
    $filecoderow['email'] = "(none - from 2.1.a)";
    insert_bhdb("filecodes", $filecoderow);
}