Exemplo n.º 1
0
make_dir($dir);
$upload_max = get_byte_value(ini_get('upload_max_filesize'));
$post_max = get_byte_value(ini_get('post_max_size'));
$max_php_file_size = min($upload_max, $post_max);
$up_size = $max_php_file_size;
if($up_size==$max_php_file_size){
	$str = '您的网盘支持单个文件上传最大 <u style=\"font-size:14px;\">'.str_replace(' ','',get_size($max_php_file_size,'B',0)).'B</u>';
}else{
	$str = '您的网盘支持单个文件上传信息:<br>网盘主站, <u>'.str_replace(' ','',get_size($max_php_file_size,'B',0)).'B</u> ; 子服, <u>'.str_replace(' ','',get_size($up_size,'B',0)).'B</u><br><span <span style=\"color:red\">两个服务配置不一致!请重新配置,否则文件上传将可能会出现异常。</span>';
}

if($code && ($code==$configs['server_key'])){
	settings_cache();
	lang_cache();
	tpl_cache();
	group_settings_cache();
	echo 'var callback="[PHPDisk Tips] <span style=\"color:blue;\">'.__('sub_server_config_update_success').'</span><br><br>'.$str.'";';
}else{
	echo 'var callback="[PHPDisk Tips] <span style=\"color:red\">'.__('sub_server_config_update_fail').'</span><br><br>'.$str.'";';
}

?>
function update_config(){
	document.getElementById('tips').innerHTML = callback;
	document.getElementById('tips').innerHTML += '<br><br><div align="center"><input type="button" class="btn" onclick="javascript:window.close();" value="<?php 
echo __('btn_close');
?>
"></div>';
}
setTimeout('update_config()',1250);
setTimeout(function(){window.close();},8000);
Exemplo n.º 2
0
$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();
list($pd_uid, $pd_gid, $pd_username, $pd_pwd, $pd_email) = gpc('phpdisk_zcore_info', 'C', '') ? explode("\t", pd_encode(gpc('phpdisk_zcore_info', 'C', ''), 'DECODE')) : array('', '', '', '', '');
$pd_uid = (int) $pd_uid;
if (!$pd_uid || !$pd_pwd) {
    $pd_uid = 0;
} else {
    $userinfo = $db->fetch_one_array("select userid,u.gid,username,password,email,group_name from {$tpf}users u,{$tpf}groups g where username='******' and password='******' and u.gid=g.gid limit 1");
    if ($userinfo) {
        $pd_username = $userinfo['username'];
        $pd_email = $userinfo['email'];
        $pd_gid = $userinfo['gid'];
        $pd_group_name = $userinfo['group_name'];
    } else {
        $pd_uid = 0;
        $pd_pwd = '';
        pd_setcookie('phpdisk_zcore_info', '');