Example #1
0
    $sql .= " and (`group` = '2' OR `group`='0' OR (" . $l . "))";
} else {
    //普通成员
    $l = " (`group` = '1')";
    if ($notappids = C::t('app_organization')->fetch_notin_appids_by_uid($_G['uid'])) {
        $l .= " and appid  NOT IN (" . dimplode($notappids) . ") ";
    }
    $sql .= " and (`group`='0' OR (" . $l . "))";
}
if ($count = DB::result_first("SELECT COUNT(*) FROM " . DB::table('app_market') . " WHERE  {$sql} ")) {
    $apps = DB::fetch_all("SELECT * FROM " . DB::table('app_market') . " WHERE  {$sql}  {$order} limit {$start},{$perpage}");
    $multi = multi($count, $perpage, $page, $theurl, 'pull-right');
}
$list = array();
//$grouptitle=array('0'=>'全部','-1'=>'仅游客可用','1'=>'成员可用','2'=>'部门管理员可用','3'=>'仅系统管理员可用');
foreach ($apps as $value) {
    if ($value['isshow'] < 1) {
        continue;
    }
    $value['tags'] = C::t('app_relative')->fetch_all_by_appid($value['appid']);
    if ($value['appico'] != 'dzz/images/default/icodefault.png' && !preg_match("/^(http|ftp|https|mms)\\:\\/\\/(.+?)/i", $value['appico'])) {
        $value['appico'] = $_G['setting']['attachurl'] . $value['appico'];
    }
    $value['url'] = replace_canshu($value['appurl']);
    if (in_array($value['appid'], $applist)) {
        $value['isinstall'] = true;
    }
    $list[$value['appid']] = $value;
}
$jsondata = json_encode_gbk($list);
include template('market');
Example #2
0
<?php

/*
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if (!defined('IN_DZZ') || !defined('IN_ADMIN')) {
    exit('Access Denied');
}
$clouds = DB::fetch_all("select * from " . DB::table('connect') . " where 1 order by disp", array(), 'bz');
$bz = $_GET['bz'];
if ($_GET['do'] == 'getBucket') {
    $id = $_GET['id'];
    $key = $_GET['key'];
    $bz = empty($_GET['bz']) ? 'ALIOSS' : $_GET['bz'];
    $class = 'io_' . $bz;
    $p = new $class($bz);
    $re = $p->getBucketList($id, $key);
    if ($re) {
        echo json_encode_gbk($re);
    } else {
        echo json_encode_gbk(array());
    }
    exit;
} else {
    IO::authorize($bz);
    exit;
}
Example #3
0
        }
    }
    C::t('user_field')->update($_G['uid'], array('screenlist' => implode(',', $data['screenlist']), 'docklist' => implode(',', $data['docklist'])));
    //目录数据
    $folderdata = array();
    //默认目录全部调用
    foreach ($space['typefid'] as $fid) {
        $folderids[] = $fid;
    }
    $folderids = array_unique($folderids);
    if ($folderids) {
        $folderdata = C::t('folder')->fetch_all_by_fid($folderids);
    }
    //获取云盘目录数据
    $pandata = C::t('connect')->fetch_all_folderdata($_G['uid']);
    foreach ($pandata as $key => $value) {
        $folderdata[$key] = $value;
    }
    foreach ($shortcutFolderdata as $key => $value1) {
        $folderdata[$key] = $value1;
    }
    $data['formhash'] = $_G['formhash'];
    //$data['navids']=array_merge($navids_0,$navids_u);
    $data['sourceids'] = array('icos' => $icoids);
    $data['sourcedata'] = array('icos' => $icosdata ? $icosdata : array(), 'folder' => $folderdata ? $folderdata : array(), 'app' => $appdata ? $appdata : array());
    $space['attachextensions'] = $space['attachextensions'] ? explode(',', $space['attachextensions']) : array();
    $data['myspace'] = $data['space'] = $space;
    //print_r($data);
    echo json_encode_gbk($data);
    exit;
}
Example #4
0
                $ismoderator = 1;
                $permtitle = perm_binPerm::getGroupTitleByPower($folder['perm1']);
                $permarr = perm_binPerm::groupPowerPack();
            }
        }
        $foldername = IO::getFolderName(lang('template', 'newfolder', null, 'dzz'), $path);
    } else {
        $perm = intval($_GET['perm']);
        $fname = io_dzz::name_filter(getstr($_GET['name'], 80));
        $path = trim($_GET['path']);
        if ($arr = IO::CreateFolder($path, $fname, $perm)) {
            if ($arr['error']) {
                showmessage($arr['error']);
            } else {
                $arr['msg'] = 'success';
                showmessage('do_success', dreferer(), array('data' => rawurlencode(json_encode_gbk($arr))));
            }
        } else {
            $arr = array();
            $arr['msg'] = lang('template', 'failure_newfolder');
            showmessage($arr['msg']);
        }
    }
} elseif ($do == 'share') {
    $sharestatus = array('-4' => '已屏蔽', '-3' => '分享文件删除', '-2' => '次数用尽', '-1' => '已过期', '0' => '正常');
    if (!submitcheck('sharesubmit')) {
        $path = dzzdecode($_GET['path']);
        $icoarr = IO::getMeta($path);
        if ($icoarr['type'] == 'shortcut') {
            $icoarr['type'] = $icoarr['ttype'];
            $icoarr['size'] = $icoarr['tdate']['size'];
Example #5
0
<?php

/*
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if (!defined('IN_DZZ')) {
    exit('Access Denied');
}
$uid = $_G['uid'];
$space = getuserbyuid($_G['uid']);
$space['self'] = intval($space['self']);
$thame = getThames();
$thamejson = json_encode_gbk($thame['data']);
$space['thame'] = $thame['thame'];
if (isset($_G['setting']['dzz_iconview']) && $_G['setting']['dzz_iconview']) {
    $iconview = $_G['setting']['iconview'];
} else {
    $iconview = C::t('iconview')->fetch_all();
}
$sitename = addslashes($_G['setting']['sitename']);
include DZZ_ROOT . './core/core_version.php';
include template('dzz_index');
Example #6
0
 $winid = $_GET['winid'];
 $sid = empty($_GET['id']) ? 0 : $_GET['id'];
 $marker = empty($_GET['marker']) ? '' : trim($_GET['marker']);
 $bz = empty($_GET['bz']) ? '' : urldecode($_GET['bz']);
 $path = rawurldecode($_GET['path']);
 $arr = array();
 $icoid = intval($_GET['icoid']);
 $uid = empty($_GET['uid']) ? 0 : intval($_GET['uid']);
 if ($icoid && ($icoarr = DB::fetch_first("select * from " . DB::table('icos') . " where icoid='{$icoid}'"))) {
     $icoarr = replace_remote($icoarr);
     $icoarr['url'] = replace_canshu($icoarr['url']);
     $icoarr['fsize'] = formatsize($icoarr['size']);
     $icoarr['ftype'] = getFileTypeName($icoarr['type'], $icoarr['ext']);
     $icoarr['fdateline'] = dgmdate($icoarr['dateline']);
     $data1[$icoarr['icoid']] = $icoarr;
     $json_data1 = json_encode_gbk($data1);
 }
 $data = array();
 $userdata = array();
 $folderids = $folderdata = $baiduids = $storageids = array();
 $force = intval($_GET['force']);
 if ($bz) {
     $keyword = urldecode($_GET['keyword']);
     $asc = intval($_GET['asc']);
     list($prex, $id) = explode('-', $sid);
     $container = 'icosContainer_folder_' . $id;
     $order = $asc > 0 ? 'asc' : "desc";
     switch ($_GET['disp']) {
         case 0:
             $by = 'name';
             //$order='';