# Site: http://www.google.com # # $Id: profile.inc.php 126 2014-03-17 07:51:04Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ if (!defined('IN_PHPDISK') || !defined('IN_MYDISK')) { exit('[PHPDisk] Access Denied'); } $myinfo = get_profile($pd_uid); $curr_downline_rate = $myinfo[downline_income] ? $myinfo[downline_income] . '%' : ($settings[downline_income] ? $settings[downline_income] . '%' : 0); switch ($action) { case 'files': $folder_id = (int) gpc('folder_id', 'GP', 0); $nav_path = '<a href="' . urr("mydisk", "item=profile&action=files") . '">文件管理</a>» ' . nav_path($folder_id, $pd_uid, 0, 1); if ($task == 'search') { $word = trim(gpc('word', 'G', '')); $sql_tmp = $word ? " and (file_name like '%{$word}%' or file_extension like '%{$word}%')" : ''; if ($folder_id) { $sql_do = "{$tpf}files where userid='{$pd_uid}' and is_del=0 and folder_id='{$folder_id}' {$sql_tmp}"; } else { $sql_do = "{$tpf}files where userid='{$pd_uid}' and is_del=0 and folder_id='0' {$sql_tmp}"; } } else { if ($folder_id) { $sql_do = "{$tpf}files where userid='{$pd_uid}' and is_del=0 and folder_id='{$folder_id}'"; } else { $sql_do = "{$tpf}files where userid='{$pd_uid}' and is_del=0 and folder_id='0'"; } }
function nav_path($folder_id, $uid) { global $db, $tpf; $username = $db->result_first("select username from {$tpf}users where userid='{$uid}' limit 1"); $rs = $db->fetch_one_array("select parent_id,folder_name,folder_id from {$tpf}folders where folder_id='{$folder_id}' and userid='{$uid}'"); $str = ''; if ($rs['parent_id'] != 0) { $str .= nav_path($rs['parent_id'], $uid); } $str .= $rs['folder_name'] ? '<a href="' . urr("space", "username={$username}&folder_id={$rs['folder_id']}") . '">' . $rs['folder_name'] . '</a>» ' : ''; unset($rs); return $str; }
if ($seo_a[title]) { eval("\$title = \"{$seo['title']} {$seo_a['title']}\";"); } eval("\$keywords = \"{$seo['keywords']} {$seo_a['keywords']}\";"); eval("\$description = \"{$seo['description']} {$seo_a['description']}\";"); } include PHPDISK_ROOT . "./includes/header.inc.php"; $my_announce = get_profile($userid, 'my_announce') ? get_profile($userid, 'my_announce') : '...此用户暂无公告...'; if ($need_pwd) { $arr = explode('space.php', $_SERVER['SCRIPT_NAME']); $ajax_url = 'http://' . $_SERVER['HTTP_HOST'] . $arr[0]; require_once template_echo('pd_space_pwd', $user_tpl_dir); include PHPDISK_ROOT . "./includes/footer.inc.php"; exit; } $nav_path = '<a href="' . urr("space", "username="******">' . __('home') . '</a>» ' . nav_path($folder_id, $userid); if ($auth[is_fms]) { if ($pg <= 1) { $q = $db->query("select * from {$tpf}folders where parent_id='{$folder_id}' and userid='{$userid}'"); $sub_folders = array(); while ($rs = $db->fetch_array($q)) { $rs[a_href] = urr("space", "username="******"&folder_id={$rs[folder_id]}"); $rs[folder_size] = get_size($rs[folder_size]); $rs[in_time] = date('Y-m-d', $rs[in_time]); $sub_folders[] = $rs; } $db->free($q); unset($rs); } } else { // root my folders