Ejemplo n.º 1
0
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.google.com
#
#	$Id: admin.inc.php 121 2014-03-04 12:38:05Z along $
#
#	Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
##
if (!defined('IN_PHPDISK') || !defined('IN_ADMINCP')) {
    exit('[PHPDisk] Access Denied');
}
phpdisk_core::admin_login();
switch ($action) {
    case 'uc':
        require PHPDISK_ROOT . 'system/configs.inc.php';
        if ($task == 'update') {
            form_auth(gpc('formhash', 'P', ''), formhash());
            $setting = array('connect_uc' => 0, 'uc_charset' => '', 'uc_dbcharset' => '', 'uc_admin' => '', 'uc_dbhost' => '', 'uc_dbuser' => '', 'uc_dbpwd' => '', 'uc_dbname' => '', 'uc_dbtablepre' => '', 'uc_key' => '', 'uc_api' => '', 'uc_appid' => 0);
            $tmp_uc_dbpwd = $settings['uc_dbpwd'];
            $online_demo = $settings['online_demo'];
            $settings = gpc('setting', 'P', $setting);
            if ($online_demo) {
                $error = true;
                $sysmsg[] = __('online_demo_deny');
            }
            if (!trim($settings['uc_dbhost'])) {
                $error = true;
Ejemplo n.º 2
0
<?php

/**
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.google.com
#
#	$Id: mydisk.php 121 2014-03-04 12:38:05Z along $
#
#	Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
*/
include "includes/commons.inc.php";
phpdisk_core::user_login();
define('IN_MYDISK', true);
$item = $item ? $item : 'profile';
if ($item == 'files' && in_array($action, array('modify_file', 'post_report', 'post_comment'))) {
    $inner_box = true;
}
if ($item == 'folders' && in_array($action, array('add_folder', 'modify_folder', 'folder_delete'))) {
    $inner_box = true;
}
if ($item == 'course' && in_array($action, array('add_course', 'modify_course', 'course_delete', 'add_chapter_section', 'chapter_section_delete', 'modify_chapter_section', 'add_file_cs_relation', 'file_cs_relation_delete', 'course_review', 'course_review_cancel'))) {
    $inner_box = true;
}
if ($item == 'profile' && in_array($action, array('conv_income', 'guest'))) {
    $inner_box = true;
}
if ($item == 'upload') {
    $inner_box = true;
Ejemplo n.º 3
0
 public static function init_core()
 {
     phpdisk_core::__init_env();
 }
Ejemplo n.º 4
0
header("Content-Type: text/html; charset={$charset}");
$arr = array('global', 'plugin', 'cache', 'image', 'core');
for ($i = 0; $i < count($arr); $i++) {
    require PHPDISK_ROOT . 'includes/function/' . $arr[$i] . '.func.php';
}
$arr = array('core', 'mysql');
for ($i = 0; $i < count($arr); $i++) {
    require PHPDISK_ROOT . 'includes/class/' . $arr[$i] . '.class.php';
}
require PHPDISK_ROOT . 'includes/phpdisk_version.inc.php';
$C['gz']['open'] = $settings['gzipcompress'];
phpdisk_core::gzcompress_open();
$db = phpdisk_core::init_db_connect();
$setting_file = PHPDISK_ROOT . 'system/settings.inc.php';
file_exists($setting_file) ? require_once $setting_file : settings_cache();
$arr = phpdisk_core::init_lang_tpl();
$user_tpl_dir = 'templates/default/';
$admin_tpl_dir = $arr['admin_tpl_dir'];
$C['lang_type'] = $arr['lang_name'];
require PHPDISK_ROOT . 'includes/lib/php-gettext/gettext.inc.php';
_setlocale(LC_MESSAGES, $C['lang_type']);
_bindtextdomain('phpdisk', 'languages');
_bind_textdomain_codeset('phpdisk', $charset);
_textdomain('phpdisk');
if (!@get_magic_quotes_gpc()) {
    $_GET = addslashes_array($_GET);
    $_POST = addslashes_array($_POST);
    $_COOKIE = addslashes_array($_COOKIE);
}
$group_settings_file = PHPDISK_ROOT . 'system/global/group_settings.inc.php';
file_exists($group_settings_file) ? require_once $group_settings_file : group_settings_cache();
Ejemplo n.º 5
0
} else {
    define('OS_WIN', false);
    define('LF', "\n");
}
$arr = array('global');
for ($i = 0; $i < count($arr); $i++) {
    require PHPDISK_ROOT . 'includes/function/' . $arr[$i] . '.func.php';
}
$arr = array('core', 'mysql');
for ($i = 0; $i < count($arr); $i++) {
    require PHPDISK_ROOT . 'includes/class/' . $arr[$i] . '.class.php';
}
require_once PHPDISK_ROOT . 'system/configs.inc.php';
require_once PHPDISK_ROOT . 'system/settings.inc.php';
phpdisk_core::init_core();
$db = phpdisk_core::init_db_connect();
$charset = $configs['charset'];
$tpf = $configs[tpf];
$arr = array();
$q = $db->query("select file_id,file_name,file_extension,file_time,file_description,folder_id,u.username from {$tpf}files f,{$tpf}users u where f.userid=u.userid and in_share=1 order by file_id desc limit 30");
while ($rs = $db->fetch_array($q)) {
    $tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
    $rs[title] = $rs['file_name'] . $tmp_ext;
    $rs[link] = $settings[phpdisk_url] . urr("viewfile", "file_id={$rs[file_id]}");
    $rs[file_description] = $rs[file_description] ? cutstr($rs[file_description], 150) : $rs[title];
    $rs[pubDate] = date('Y-m-d H:i:s', $rs[file_time]);
    if ($rs[folder_id]) {
        $rs[folder_name] = @$db->result_first("select folder_name from {$tpf}folders where folder_id='{$rs[folder_id]}' limit 1");
    } else {
        $rs[folder_name] = '';
    }