<?php
/**
* [Dzz!] (C)2001-2099 dzz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: function_dzz_core.php 1000 2011-5-31 15:41:43Z angel rain $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
define('SYSICON_FOLDER','dzz/images/sysicon/foldericon/');
define('SYSICON_URL','dzz/images/sysicon/urlicon/');
if (!function_exists('json_decode') ){
function json_decode($content, $assoc=false){
require_once DISCUZ_ROOT.'/dzz/class/class_json.php';
if ( $assoc ){
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
} else {
$json = new Services_JSON;
}
return $json->decode($content);
}
}
if ( !function_exists('json_encode') ){
function json_encode($content){
require_once DISCUZ_ROOT.'/dzz/class/class_json.php';
$json = new Services_JSON;
return $json->encode($content);
}
}
function arr_encode(&$array){
foreach($array as $key => $value){
if(is_array($value)){
arr_encode($array[$key]);
}else{
$array[$key] = (diconv(stripslashes($value),CHARSET,'UTF-8'));
}
}
}
function json_encode_gbk($array){
global $_G;
arr_encode($array);
$json = json_encode($array);
return ($json);
}
function getBuySize($uid){
global $_G;
$buysize=0;
$query=DB::query("select `spacesize`,`num` from ".DB::table('dzz_space_record')." where uid='{$uid}' AND `endtime`>'{$_G[timestamp]}'");
while($value=DB::fetch($query)){
$buysize+=($value['spacesize']*$value['num']);
}
if(DB::result_first("select COUNT(*) from ".DB::table('dzz_userconfig_field')." where uid='{$uid}'")){
DB::update('dzz_userconfig_field',array('buysize'=>$buysize),"uid='{$uid}'");
}else{
DB::insert('dzz_userconfig_field',array('buysize'=>$value,'uid'=>$uid),1,1);
}
return $buysize;
}
function replace_canshu($str){
global $_G,$space;
$replacearr=array('{DZZSCRIPT}'=>DZZSCRIPT,'{uid}'=>$space['uid']);
$search=array();
$replace=array();
foreach($replacearr as $key=>$value){
$search[]=$key;
$replace[]=$value;
}
return str_replace($search,$replace,$str);
}
function dzz_libfile($libname, $folder = '') {
$libpath = DISCUZ_ROOT.'/dzz/'.$folder;
if(strstr($libname, '/')) {
list($pre, $name) = explode('/', $libname);
return realpath("{$libpath}/{$pre}/{$pre}_{$name}.php");
} else {
return realpath("{$libpath}/{$libname}.php");
}
}
function dzzlang($file, $langvar = null, $vars = array(), $default = null) {
global $_G;
list($path, $file) = explode('/', $file);
if(!$file) {
$file = $path;
$path = '';
}
if($path==''){
$vars=explode(':',$file);
if(count($vars)==2){
list($plugfolder,$file)=explode(':',$file);
$key = 'plugin_'. $plugfolder.'_'.$file;
if(!isset($_G['dzzlang'][$key])) {
include DISCUZ_ROOT.'./dzz/plugin/'.$plugfolder.'/lang/'.'lang_'.$file.'.php';
$_G['dzzlang'][$key] = $lang;
}
}else{
$key = $file;
if(!isset($_G['dzzlang'][$key])) {
include DISCUZ_ROOT.'./dzz/lang/'.($path == '' ? '' : $path.'/').'lang_'.$file.'.php';
$_G['dzzlang'][$key] = $lang;
}
}
$returnvalue = &$_G['dzzlang'];
}else{
$key = $path == '' ? $file : $path.'_'.$file;
if(!isset($_G['dzzlang'][$key])) {
include DISCUZ_ROOT.'./dzz/'.$path.'/lang/lang_'.$file.'.php';
$_G['dzzlang'][$key] = $lang;
}
$returnvalue = &$_G['dzzlang'];
}
$return = $langvar !== null ? (isset($returnvalue[$key][$langvar]) ? $returnvalue[$key][$langvar] : null) : $returnvalue[$key];
$return = $return === null ? ($default !== null ? $default : $langvar) : $return;
$searchs = $replaces = array();
if($vars && is_array($vars)) {
foreach($vars as $k => $v) {
$searchs[] = '{'.$k.'}';
$replaces[] = $v;
}
}
if(is_string($return) && strpos($return, '{_G/') !== false) {
preg_match_all('/\{_G\/(.+?)\}/', $return, $gvar);
foreach($gvar[0] as $k => $v) {
$searchs[] = $v;
$replaces[] = getglobal($gvar[1][$k]);
}
}
$return = str_replace($searchs, $replaces, $return);
return $return;
}
function getFileTypeName($type,$ext){
$typename='';
switch($type){
case 'image':
$typename=dzzlang('message','typename_image');
break;
case 'video':
$typename=dzzlang('message','typename_video');
break;
case 'music':
$typename=dzzlang('message','typename_music');
break;
case 'attach':
$typename=dzzlang('message','typename_attach');
break;
case 'app':
$typename=dzzlang('message','typename_app');
break;
case 'link':
$typename=dzzlang('message','typename_link');
break;
case 'folder':
$typename=dzzlang('message','typename_folder');
break;
}
$name='';
if($ext =='dzzdoc'){
$name=dzzlang('message','extname_dzzdoc');
}elseif($ext=='txt'){
$name=dzzlang('message','extname_txt');
}else{
$name=strtoupper($ext).' '.$typename;
}
return $name;
}
function getmyappid(){
global $_G;
if(!$_G['uid']) return array();
$var="dzz_myicos_".$_G['uid'];
if($_G[$var]) return $_G[$var];
else{
$arr=array('0'=>'');
$query=DB::query("select oid,icoid from ".DB::table('dzz_icos')." where type='app' and (uid='{$_G[uid]}' OR (uid='-1' and notdelete='1'))");
while($value=DB::fetch($query)){
$arr[$value['oid']]=$value['icoid'];
}
$_G[$var]=$arr;
}
return $_G[$var];
}
function dzzgetspace($uid){
global $_G;
$space=array();
if($uid==0){
if($_G['adminid']==1){
$space=array( 'uid' => 0,'self'=>2, 'username' => '', 'adminid' => 1, 'groupid' => 1, 'credits' => 0, 'timeoffset' => 9999);
}else{
$space=array( 'uid' => 0,'self'=>0, 'username' => '', 'adminid' => 0, 'groupid' => 7, 'credits' => 0, 'timeoffset' => 9999);
}
}else{
$space=getspace($uid);
}
require_once libfile('function/friend');
$space['isfriend']=friend_check($uid);
//用户组信息
if(!$usergroup=DB::fetch_first("select * from ".DB::table('dzz_usergroup')." where groupid='{$space[groupid]}'")){
$usergroup=array();
}
$space['groupsize']=$usergroup['maxspacesize']*1024*1024;
if($uid>0 && $config=DB::fetch_first("select u.thame,u.custom_filemanage,u.custom_dock,u.custom_backimg,custom_window,u.custom_topbar,u.spacename,u.metakeyword,u.metadescription,u.friend,u.status as dzzstatus,u.dateline,u.updatetime,u.usesize,f.allownewfolder,f.allowupload,f.allownewlink,f.attachextensions,f.maxattachsize,f.addsize,f.buysize from ".DB::table('dzz_userconfig')." u
LEFT JOIN ".DB::table('dzz_userconfig_field')." f ON u.uid=f.uid
where u.uid='$uid'")){
$arr=DB::fetch_first("select * from ".DB::table('dzz_thame')." where id='{$config[thame]}'");
if(!$arr){
$arr=DB::fetch_first("select * from ".DB::table('dzz_thame')." where `default`='1'");
}
unset($config['thame']);
$space['thame']=array(
'folder'=>$arr['folder'],
'backimg'=>$config['custom_backimg']?$config['custom_backimg']:$arr['backimg'],
'dock'=>$config['custom_dock']?$config['custom_dock']:$arr['dock'],
'window'=>$config['custom_window']?$config['custom_window']:$arr['window'],
'browser'=>$config['custom_browser']?$config['custom_browser']:$arr['browser'],
'topbar'=>$config['custom_topbar']?$config['custom_topbar']:$arr['topbar'],
'filemanage'=>$config['custom_filemanage']?$config['custom_filemanage']:$arr['filemanage'],
);
$config['allownewfolder']=(!isset($config['allownewfolder']) || $config['allownewfolder']<0)?$usergroup['allownewfolder']:$config['allownewfolder'];
$config['allownewlink']=(!isset($config['allownewlink']) || $config['allownewlink']<0)?$usergroup['allownewlink']:$config['allownewlink'];
$config['allowupload']=(!isset($config['allowupload']) || $config['allowupload']<0)?$usergroup['allowupload']:$config['allowupload'];
$config['attachextensions']=(!isset($config['attachextensions']) || $config['
没有合适的资源?快使用搜索试试~ 我知道了~
Web 云桌面 平台
共2000个文件
png:1558个
gif:641个
jpg:106个
3星 · 超过75%的资源 需积分: 50 24 下载量 15 浏览量
2012-09-03
15:14:06
上传
评论
收藏 19.34MB ZIP 举报
温馨提示
主要包含 云桌面平台 并提供数据库设计 请大家尊重开发人员的劳动成果
资源推荐
资源详情
资源评论
收起资源包目录
Web 云桌面 平台 (2000个子文件)
getRemoteImage.ashx 4KB
snapImgUp.ashx 3KB
fileUp.ashx 3KB
imageUp.ashx 3KB
imageManager.ashx 1KB
getMovie.ashx 1KB
getContent.ashx 1KB
imageUp.asp 2KB
webim.css 90KB
appmarket.css 45KB
admincp.css 30KB
ueditor.css 28KB
_filemanage.css 22KB
_filemanage.css 22KB
_file.css 21KB
_filemanage.css 20KB
jplayer.pink.flag.css 14KB
index.css 12KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_navbar.css 11KB
_Window.css 11KB
_Browser.css 11KB
main.css 11KB
_Window.css 10KB
_navbar.css 10KB
_widget.css 10KB
shCoreDefault.css 9KB
_Window.css 9KB
_navbar.css 8KB
detail.css 8KB
qqgroup.css 8KB
detail.css 8KB
style.css 6KB
app.css 6KB
style.css 5KB
weather.css 5KB
_menu.css 5KB
space.css 5KB
style.css 5KB
widget.css 4KB
style.css 4KB
style.css 4KB
message.css 3KB
note.css 3KB
image.css 3KB
codemirror.css 3KB
emotion.css 3KB
attachment.css 3KB
video.css 2KB
_menu.css 2KB
dock.css 2KB
dock.css 2KB
dock.css 2KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
cloud.css 809B
style.css 411B
style.css 411B
style.css 410B
iframe.css 40B
style.css 2B
style.css 2B
style.css 2B
aero_nwse.cur 4KB
aero_arrow.cur 4KB
aero_link.cur 4KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- qqqq1549552092012-12-14官网上有下载的
zqcmjnj
- 粉丝: 11
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功