Exemplo n.º 1
0
        $folder_list .= "tr.add({$v['folder_id']},{$v['parent_id']},'" . cutstr($v['folder_name'], 15, '') . "','" . urr("space", "username={$username}&folder_id={$v['folder_id']}") . "','{$v['folder_name']}');" . LF;
    }
}
$sql_tmp = " and in_share=1 ";
if ($folder_id) {
    $sql_do = "{$tpf}files where userid='{$userid}' and is_del=0 and folder_id='{$folder_id}' {$sql_tmp}";
} else {
    $sql_do = "{$tpf}files where userid='{$userid}' and is_del=0 and folder_id='0' {$sql_tmp}";
}
$rs = $db->fetch_one_array("select count(*) as total_num from {$sql_do}");
$total_num = $rs['total_num'];
$start_num = ($pg - 1) * $perpage;
$q = $db->query("select * from {$sql_do} order by show_order asc, file_id desc limit {$start_num},{$perpage}");
$files_array = array();
while ($rs = $db->fetch_array($q)) {
    $tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
    $rs['file_thumb'] = get_file_thumb($rs);
    $rs['file_name_all'] = filter_word($rs['file_name'] . $tmp_ext);
    $rs['file_name'] = cutstr(filter_word($rs['file_name'] . $tmp_ext), 80);
    $rs['file_new'] = $timestamp - $rs['file_time'] < 86400 ? '<img src="images/new.png" align="absmiddle" border="0"/>' : '';
    $rs['file_size'] = get_size($rs['file_size']);
    $rs[file_description] = clear_html(filter_word($rs['file_description']), 80);
    $rs['file_time'] = date("Y-m-d", $rs['file_time']);
    $rs['a_viewfile'] = urr("viewfile", "file_id={$rs['file_id']}");
    $files_array[] = $rs;
}
$db->free($q);
unset($rs);
$page_nav = multi($total_num, $perpage, $pg, "space.php?username="******"&folder_id={$folder_id}");
require_once template_echo('pd_space', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 2
0
                write_file(PD_PLUGINS_DIR . 'api/uc_configs.inc.php', $str);
                if ($settings['connect_uc'] && $username) {
                    $db->query_unbuffered("update `{$configs['dbname']}`.{$tpf}users set username='******' where userid=1 and gid=1;");
                }
                $sysmsg[] = __('uc_update_success');
                redirect(urr(ADMINCP, "item=plugins&app={$app}&action={$action}"), $sysmsg);
            } else {
                redirect('back', $sysmsg);
            }
        } else {
            $setting['connect_uc'] = $settings['connect_uc'] ? 1 : 0;
            $setting['connect_uc_type'] = $settings['connect_uc_type'] ? $settings['connect_uc_type'] : 'discuz';
            $setting['uc_charset'] = $settings['uc_charset'] ? $settings['uc_charset'] : $configs['charset'];
            $setting['uc_admin'] = $settings['uc_admin'] ? $settings['uc_admin'] : '';
            $setting['uc_dbhost'] = $settings['uc_dbhost'] ? $settings['uc_dbhost'] : '';
            $setting['uc_dbuser'] = $settings['uc_dbuser'] ? $settings['uc_dbuser'] : '';
            $setting['uc_dbpwd'] = $settings['uc_dbpwd'] ? encode_pwd($settings['uc_dbpwd']) : '';
            $setting['uc_dbname'] = $settings['uc_dbname'] ? $settings['uc_dbname'] : '';
            $setting['uc_dbtablepre'] = $settings['uc_dbtablepre'] ? $settings['uc_dbtablepre'] : "uc_";
            $setting['uc_key'] = $settings['uc_key'] ? $settings['uc_key'] : random(16);
            $setting['uc_api'] = $settings['uc_api'] ? $settings['uc_api'] : 'http://';
            $setting['uc_appid'] = $settings['uc_appid'] ? $settings['uc_appid'] : 0;
            $setting['uc_feed'] = $settings['uc_feed'] ? 1 : 0;
            $setting['uc_credit_exchange'] = $settings['uc_credit_exchange'] ? 1 : 0;
            require_once template_echo('admin', '', $app);
        }
        break;
    default:
        redirect(urr(ADMINCP, "item=plugins&app={$app}&action=uc"), '', 0);
}
update_action_time($app);
Exemplo n.º 3
0
            if (!$error) {
                $go_url = "plugins/payment/chinabank/Send.php?v_amount={$money}&vip_id={$vip_id}";
                echo "<script>window.location =\"{$go_url}\";</script>";
            } else {
                redirect('back', $sysmsg);
            }
        } elseif ($task == 'yeepay') {
            form_auth(gpc('formhash', 'P', ''), formhash());
            if (!$error) {
                $go_url = "plugins/payment/yeepay/req.php?p3_Amt={$money}&vip_id={$vip_id}";
                echo "<script>window.location =\"{$go_url}\";</script>";
            } else {
                redirect('back', $sysmsg);
            }
        }
        break;
    default:
        $q = $db->query("select * from {$tpf}vips where is_hidden=0 order by show_order asc,vip_id asc");
        $vips = array();
        while ($rs = $db->fetch_array($q)) {
            $rs['status_text'] = $rs['is_hidden'] ? '<span class="txtred">' . __('hidden') . '</span>' : '<span class="txtblue">' . __('display') . '</span>';
            $rs[img] = $rs[img] ? '<img src="{$rs[img]}" border="0" />' : '&nbsp;';
            $rs[pop_ads] = $rs[pop_ads] ? __('yes') : __('no');
            $rs[search_down] = $rs[search_down] ? __('only_search_public') : __('search_and_down');
            $vips[] = $rs;
        }
        $db->free($q);
        unset($rs);
        require_once template_echo('pd_vip', $user_tpl_dir);
}
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 4
0
function redirect($url, $str, $timeout = 2000, $target = '')
{
    global $user_tpl_dir;
    if ($timeout == 0) {
        header("Location:{$url}");
        exit;
    } else {
        $msg = '';
        if (is_array($str)) {
            for ($i = 0; $i < count($str); $i++) {
                $msg .= "<li>·" . $str[$i] . "</li>" . LF;
            }
        } else {
            $msg = $str;
        }
        $go_url = $url == 'back' ? $url = 'javascript:history.back();' : $url;
        require_once template_echo('information', $user_tpl_dir);
        $rtn = "<script>" . LF;
        $rtn .= "<!--" . LF;
        $rtn .= "function redirect() {" . LF;
        if ($target == 'top') {
            $rtn .= "\tself.parent.location.href = '{$url}';" . LF;
        } else {
            $rtn .= "\tdocument.location.href = '{$go_url}';" . LF;
        }
        $rtn .= "}" . LF;
        $rtn .= "setTimeout('redirect();', {$timeout});" . LF;
        $rtn .= "-->" . LF;
        $rtn .= "</script>" . LF;
        echo $rtn;
    }
}
Exemplo n.º 5
0
exit('[PHPDisk] Access Deny!');
}
}
*/
$str = $_SERVER['QUERY_STRING'];
if (!$str) {
    exit('[PHPDisk] Access Denied');
}
$title = $settings['site_title'];
//include PHPDISK_ROOT."./includes/header.inc.php";
if ($action == 'upload') {
    include PHPDISK_ROOT . "./includes/header.inc.php";
    require_once template_echo('upload', $user_tpl_dir);
    include PHPDISK_ROOT . "./includes/footer.inc.php";
} else {
    if ($settings['close_guest_upload'] && !$pd_uid) {
        die(__('close_guest_upload_tips'));
    } else {
        $max_user_file_size = str_replace(' ', '', get_user_file_size($pd_gid));
        $rand = random($settings[encrypt_key] ? strlen($settings[encrypt_key]) : 9);
        $guest_upload_url = urr("mydisk", "item=upload&param={$rand}" . base64_encode("ts={$timestamp}&uid={$pd_uid}&folder_id={$folder_id}&sess_id={$sess_id}"));
        require_once template_echo('guest_upload', $user_tpl_dir);
    }
}
//include PHPDISK_ROOT."./includes/footer.inc.php";
if ($q) {
    $db->free($q);
}
$db->close();
unset($C, $L, $tpf, $configs, $rs);
ob_end_flush();
Exemplo n.º 6
0
echo $site_stat;
require_once template_echo('sub/block_lang_tpl_switch', 'templates/default/');
?>
</div>
<br>
<div class="debug_info" style="display:none"><?php 
echo $pageinfo;
?>
</div>
<div class="clear"></div>

<div class="foot_info" align="center">
Powered by <a href="http://www.google.com/" target="_blank">google.com</a>
<?php 
echo PHPDISK_EDITION;
?>
 v<?php 
echo PHPDISK_VERSION;
?>
 2008-<?php 
echo NOW_YEAR;
?>
 &copy; All Rights Reserved.<?php 
require_once template_echo('sub/block_license', 'templates/default/');
?>
</div>
</div>

</body>
</html>
Exemplo n.º 7
0
	<div class="tit"><?php 
        echo __('file_description');
        ?>
:</div>
	<div class="ctn"><?php 
        echo $file[file_description];
        ?>
</div>
</div>

</div>
<Br />

<div>
<?php 
        require_once template_echo('sub/block_viewfile_bottom', 'templates/fms_blue/');
        if ($auth[is_fms]) {
            ?>
<br />
	<div class="cmt_u_box">
	<div class="cmt_title"><img src="images/ico_cmt.gif" align="absmiddle" border="0" /><?php 
            echo __('user_cmts');
            ?>
:</div>
	<?php 
            if (count($cmts)) {
                foreach ($cmts as $v) {
                    ?>
	<div class="cmt_cts">
		<div class="cmt_name"><a href="<?php 
                    echo $v['a_space'];
Exemplo n.º 8
0
        $sql_do = " {$tpf}files fl," . get_table_day_down() . " dd,{$tpf}users u where fl.file_id=dd.file_id and fl.userid=u.userid {$cate_sql} and dd.d_week='{$d_val}' and fl.is_del=0";
    } else {
        $sql_do = " {$tpf}files fl," . get_table_day_down() . " dd,{$tpf}users u where fl.file_id=dd.file_id and fl.userid=u.userid {$cate_sql} and dd.{$o_type}='{$d_val}' and fl.is_del=0";
    }
}
$rs = $db->fetch_one_array("select count(*) as total_num from {$sql_do}");
$total_num = $rs['total_num'];
$start_num = ($pg - 1) * $perpage;
if ($o_type == 'd_all') {
    $q = $db->query("select fl.*,u.username from {$sql_do} group by file_id order by fl.file_downs desc,file_id desc limit {$start_num},{$perpage}");
} else {
    $q = $db->query("select fl.*,u.username from {$sql_do} group by file_id order by fl.file_downs desc,fl.file_id desc limit {$start_num},{$perpage}");
}
$files_array = array();
while ($rs = $db->fetch_array($q)) {
    $tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
    $rs['file_thumb'] = get_file_thumb($rs);
    $rs['file_name_all'] = filter_word($rs['file_name'] . $tmp_ext);
    $rs['file_name'] = cutstr(filter_word($rs['file_name'] . $tmp_ext), 80);
    $rs['file_size'] = get_size($rs['file_size']);
    $rs[file_description] = clear_html(filter_word($rs['file_description']), 80);
    $rs['file_time'] = date("Y-m-d", $rs['file_time']);
    $rs['a_viewfile'] = urr("viewfile", "file_id={$rs['file_id']}");
    $rs[a_space] = urr("space", "username="******"hotfile.php?o_type={$o_type}&cate_id=" . $cate_id);
require_once template_echo('pd_hotfile', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 9
0
<?php 
} elseif ($action == 'demologin' && !$settings['open_demo_login']) {
    require_once template_echo('circle_box_header', $user_tpl_dir);
    ?>
<div class="cboxcontent">
<h1><?php 
    echo __('system_message');
    ?>
</h1>
<?php 
    if (count($sysmsg)) {
        for ($i = 0; $i < count($sysmsg); $i++) {
            ?>
<li><span>*</span> <?php 
            echo $sysmsg[$i];
            ?>
</li>
<?php 
        }
    }
    unset($sysmsg);
    ?>
<p>&nbsp;</p></div>
<?php 
    require_once template_echo('circle_box_footer', $user_tpl_dir);
    ?>

<?php 
} else {
    require_once PHPDISK_ROOT . "modules/front_msg.inc.php";
}
Exemplo n.º 10
0
require_once template_echo('sub/block_lang_tpl_switch', 'templates/fms_blue/');
?>

</div>
<br>
<div class="debug_info" align="center" style="display:none"><?php 
echo $pageinfo;
?>
</div>
<div class="clear"></div>

<div class="foot_info" align="center">
Powered by <a href="http://www.google.com/" target="_blank">google.com</a>
<?php 
echo PHPDISK_EDITION;
?>
 v<?php 
echo PHPDISK_VERSION;
?>
 2008-<?php 
echo NOW_YEAR;
?>
 &copy; All Rights Reserved.<?php 
require_once template_echo('sub/block_license', 'templates/fms_blue/');
?>
</div>
</div>
<br />
</body>
</html>
Exemplo n.º 11
0
require_once template_echo('adm_header', $admin_tpl_dir, '', 1);
if ($app && $item == 'plugins') {
    $action_module = PHPDISK_ROOT . "plugins/" . $app . "/admin.inc.php";
} else {
    $items = array('templates', 'database', 'main', 'settings', 'groups', 'users', 'files', 'course', 'cache', 'lang', 'plugins', 'email', 'advertisement', 'link', 'announce', 'navigation', 'seo', 'comment', 'report', 'verycode', 'union', 'sitemap', 'plans', 'nodes', 'domain', 'public', 'vip', 'tag', 'credit');
    if (in_array($item, $items)) {
        $action_module = PHPDISK_ROOT . 'admin/' . $item . '.inc.php';
    } else {
        echo "Error operation, system halt!";
        exit;
    }
}
admin_log();
require_once template_echo('admincp', $admin_tpl_dir, '', 1);
$pageinfo = page_end_time();
require_once template_echo('adm_footer', $admin_tpl_dir, '', 1);
include PHPDISK_ROOT . "./includes/footer.inc.php";
function sitemap_tag($str)
{
    $str = rawurlencode($str);
    $url = base64_encode($_SERVER['QUERY_STRING']);
    $rtn = '&nbsp;<a href="' . urr(ADMINCP, "item=sitemap&action=add_shortcut&title={$str}&url={$url}") . '" title="' . __('add_sitemap_tips') . '">[+]</a>';
    echo $rtn;
}
function admin_log()
{
    global $onlineip, $pd_username, $timestamp;
    $str = "<? exit; ?>{$onlineip}\t{$pd_username}\t" . date('Y-m-d H:i:s') . LF;
    $str .= "USER_AGENT:" . $_SERVER['HTTP_USER_AGENT'] . LF;
    $str .= "URI:" . $_SERVER['REQUEST_URI'] . LF;
    $str .= "POST:" . LF;
Exemplo n.º 12
0
#
#	Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
*/
include "includes/commons.inc.php";
$in_front = true;
$aid = (int) gpc('aid', 'G', 0);
$nav_title = @$db->result_first("select subject from {$tpf}announces where annid='{$aid}'");
$nav_title = $nav_title ? $nav_title : __('all_ann_list');
$title = $nav_title . ' - ' . $settings['site_title'];
$file_keywords = $nav_title . ',';
include PHPDISK_ROOT . "./includes/header.inc.php";
$ann_list_sub = get_announces(10);
$perpage = 5;
$sql_ext = $aid ? " and annid='{$aid}'" : '';
$sql_do = "{$tpf}announces where is_hidden=0 {$sql_ext}";
$rs = $db->fetch_one_array("select count(*) as total_num from {$sql_do}");
$total_num = $rs['total_num'];
$start_num = ($pg - 1) * $perpage;
$q = $db->query("select * from {$sql_do} order by show_order asc,annid desc limit {$start_num},{$perpage}");
$ann_list = array();
while ($rs = $db->fetch_array($q)) {
    $rs[a_ann_href] = urr("ann_list", "aid={$rs[annid]}");
    $rs[in_time] = date('Y-m-d H:i', $rs[in_time]);
    $ann_list[] = $rs;
}
$db->free($q);
unset($rs);
$page_nav = multi($total_num, $perpage, $pg, "ann_list.php?aid={$aid}");
require_once template_echo('pd_ann_list', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 13
0
function get_openid()
{
    global $db, $tpf, $settings, $timestamp, $onlineip, $user_tpl_dir;
    $graph_url = "https://graph.qq.com/oauth2.0/me?access_token=" . $_SESSION['access_token'];
    $str = get_url_contents($graph_url);
    if (strpos($str, "callback") !== false) {
        $lpos = strpos($str, "(");
        $rpos = strrpos($str, ")");
        $str = substr($str, $lpos + 1, $rpos - $lpos - 1);
    }
    $user = json_decode($str);
    if (isset($user->error)) {
        echo "<h3>error:</h3>" . $user->error;
        echo "<h3>msg  :</h3>" . $user->error_description;
        exit;
    }
    //debug
    //echo("Hello " . $user->openid);
    //set openid to session
    $_SESSION["openid"] = $user->openid;
    if ($_SESSION["openid"]) {
        $arr = get_user_info();
        $nickname = $arr["nickname"];
        $abs_path = '../../../';
        $flid = @$db->result_first("select flid from {$tpf}fastlogin where auth_type='qq' and auth_name='{$_SESSION["openid"]}'");
        if ($flid) {
            $userid = @$db->result_first("select userid from {$tpf}fastlogin where flid='{$flid}'");
            if ($userid) {
                $rs = $db->fetch_one_array("select userid,gid,username,password,email from {$tpf}users where userid='{$userid}'");
                if ($rs) {
                    pd_setcookie('phpdisk_zcore_info', pd_encode("{$rs[userid]}\t{$rs[gid]}\t{$rs[username]}\t{$rs[password]}\t{$rs[email]}"));
                    //login
                    $ins = array('last_login_time' => $timestamp, 'last_login_ip' => $onlineip);
                    $db->query_unbuffered("update {$tpf}users set " . $db->sql_array($ins) . " where userid='{$userid}'");
                    $db->query_unbuffered("update {$tpf}fastlogin set " . $db->sql_array($ins) . " where flid='{$flid}'");
                    //echo 'Login Success';
                    redirect($settings[phpdisk_url] . urr("mydisk", ""), '', 0);
                }
                unset($rs);
            } else {
                // to bind username
                $title = __('bind_disk_name');
                require_once template_echo('pd_fastlogin', $user_tpl_dir);
            }
        } else {
            $ins = array('nickname' => $nickname, 'auth_type' => 'qq', 'auth_name' => $_SESSION["openid"], 'last_login_time' => $timestamp, 'last_login_ip' => $onlineip);
            $db->query_unbuffered("insert into {$tpf}fastlogin set " . $db->sql_array($ins) . "");
            $flid = $db->insert_id();
            //echo 'Login Success';
            $title = __('bind_disk_name');
            require_once template_echo('pd_fastlogin', $user_tpl_dir);
        }
    } else {
        exit('QQ Login Error');
    }
}
Exemplo n.º 14
0
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.google.com
#
#	$Id: pd_search.tpl.php 121 2014-03-04 12:38:05Z along $
#
#	Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
##
!defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!');
?>
<div id="container">
<?php 
require_once template_echo('sub/block_adv_middle', 'templates/fms_blue/');
?>
<div class="tit"><?php 
echo __('search_title');
?>
</div>
<div class="layout_box2">
<div class="m" <?php 
if ($action == 'search') {
    ?>
style="padding:10px"<?php 
}
?>
>
<?php 
if (!$error) {
Exemplo n.º 15
0
                    $user_file_types = '*.*';
                }
            }
            $rs = $db->fetch_one_array("select folder_name,folder_node,parent_id from {$tpf}folders where folder_id='{$folder_id}' and userid='{$pd_uid}'");
            if ($rs) {
                $folder_name = $rs['folder_name'];
                $folder_node = $rs['folder_node'];
                $rs2 = $db->fetch_one_array("select folder_id,folder_name,folder_node from {$tpf}folders where folder_id='{$rs['parent_id']}' and userid='{$pd_uid}'");
                $parent_folder = $rs2['folder_name'];
                if ($folder_node == 4) {
                    $rs3 = $db->fetch_one_array("select folder_id,folder_name,folder_node,parent_id from {$tpf}folders where folder_id=(select parent_id from {$tpf}folders where folder_id='{$rs['parent_id']}' and userid='{$pd_uid}') and userid='{$pd_uid}'");
                    $parent_folder2 = $rs3['folder_name'];
                    $parent_href2 = urr("mydisk", "item=files&action=index&folder_node=2&folder_id={$rs3['folder_id']}");
                    $rs4 = $db->fetch_one_array("select folder_id,folder_name,folder_node from {$tpf}folders where folder_id='{$rs3['parent_id']}' and userid='{$pd_uid}'");
                    $disk_name = $rs4['folder_name'];
                    $disk_href = urr("mydisk", "item=files&action=index&folder_node=1&folder_id={$rs3['parent_id']}");
                    $parent_href = urr("mydisk", "item=files&action=index&folder_node=3&folder_id={$rs['parent_id']}");
                } elseif ($folder_node == 3) {
                    $rs3 = $db->fetch_one_array("select folder_id,folder_name,folder_node from {$tpf}folders where folder_id=(select parent_id from {$tpf}folders where folder_id='{$rs['parent_id']}' and userid='{$pd_uid}') and userid='{$pd_uid}'");
                    $disk_name = $rs3['folder_name'];
                    $disk_href = urr("mydisk", "item=files&action=index&folder_node=1&folder_id={$rs3['folder_id']}");
                    $parent_href = urr("mydisk", "item=files&action=index&folder_node=2&folder_id={$rs['parent_id']}");
                } else {
                    $rs2 = $db->fetch_one_array("select folder_id,folder_name,folder_node from {$tpf}folders where folder_id='{$rs['parent_id']}' and userid='{$pd_uid}'");
                    $parent_href = urr("mydisk", "item=files&action=index&folder_node={$rs2['folder_node']}&folder_id={$rs2['folder_id']}");
                }
                unset($rs2, $rs3, $rs4);
            }
            require_once template_echo('plugin_upload', $user_tpl_dir);
        }
}
Exemplo n.º 16
0
        echo urr("account", "action=register");
        ?>
"><?php 
        echo __('register');
        ?>
</a>
<a href="<?php 
        echo urr("search", "");
        ?>
"><?php 
        echo __('search_file');
        ?>
</a>
<?php 
    }
    require_once template_echo('sub/block_navigation_top', 'templates/default/');
    if ($pd_uid) {
        ?>
<a href="<?php 
        echo urr("account", "action=logout");
        ?>
" onclick="return confirm('<?php 
        echo __('confirm_logout');
        ?>
');"><?php 
        echo __('logout');
        ?>
</a>
<?php 
    }
    ?>
Exemplo n.º 17
0
<div class="layout_box">
<?php 
require_once template_echo('sub/block_adv_middle', 'templates/fms_blue/');
?>
<div class="l">
<?php 
require_once template_echo('sub/block_hot_cate_list', 'templates/fms_blue/');
?>
<br />
<?php 
show_adv_data('adv_right');
require_once template_echo('sub/block_cate_last_file', 'templates/fms_blue/');
?>
<br />
<?php 
require_once template_echo('sub/block_yesterday_down_file', 'templates/fms_blue/');
?>
</div>
<div class="r">
<div class="file_box">
	<h2 class="file_tit"><?php 
echo $nav_title;
?>
</h2>
	<div class="dl_nav">
	<ul>
		<li><a href="<?php 
echo urr("hotfile", "o_type=d_all&cate_id=0");
?>
" id="a_dlnv_"><span class="txtred"><?php 
echo __('all_site_download');
Exemplo n.º 18
0
if (!defined('IN_PHPDISK')) {
    exit('[PHPDisk] Access Denied');
}
$folder_id = (int) gpc('folder_id', 'G', 0);
$a_index_share = urr("space", "username="******"mydisk", "item=upload&folder_id={$folder_id}&uid={$pd_uid}");
$a_income = urr("income", "");
$a_search = urr("search", "");
$a_profile = urr("mydisk", "item=profile");
//$upload_url = urr("mydisk","item=upload");
$a_profile_guest = urr("mydisk", "item=profile&action=guest");
$can_edit = $myinfo[can_edit];
// nav
$tit_arr = array('default' => __('myinfo'), 'chg_logo' => __('space_setting'), 'multi_upload' => __('multi_upload'), 'income_plans' => __('income_plans'), 'income_set' => __('income_set'), 'income' => __('to_income'), 'income_log' => __('income_log'), 'credit_log' => __('credit_log'), 'invite' => __('invite_user'), 'mod_stat' => __('stat_code'), 'forum_upload' => __('forum_upload'), 'mod_pwd' => __('mod_pwd'), 'dl_users' => __('downline_user'), 'dl_users2' => __('dl_users2'), 'myannounce' => __('myannounce'), 'files' => '文件管理');
if ($item == 'profile') {
    $action = $action ? $action : 'default';
    $title = $tit_arr[$action] . ' - ' . $settings['site_title'];
}
if ($curr_script != ADMINCP) {
    $C[navi_top_link] = get_navigation_link('top');
}
if ($auth[is_fms]) {
    $C['sub_nav'] = get_sub_nav();
    if (in_array($curr_script, array('hotfile', 'tag', 'viewfile'))) {
        $C[yesterday_down_file] = super_cache::get('get_day_down_file|' . date('Ymd', strtotime('-1 day')), 'file', 0, 86400);
        $C[last_week_down_file] = super_cache::get('get_day_down_file|' . date('YW', strtotime('-1 week')) . '|d_week', 'file', 0, 4 * 86400);
        $C[now_week_down_file] = super_cache::get('get_day_down_file|' . date('YW') . '|d_week', 'file', 0, 3 * 86400);
    }
}
require_once template_echo('pd_header', $user_tpl_dir);
Exemplo n.º 19
0
<?php

/**
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: front_msg.inc.php 14 2013-03-18 03:02:57Z along $
#
#	Copyright (C) 2008-2013 PHPDisk Team. All Rights Reserved.
#
*/
if (!defined('IN_PHPDISK')) {
    exit('[PHPDisk] Access Denied');
}
require_once template_echo('front_msg', $user_tpl_dir);
Exemplo n.º 20
0
        require_once PHPDISK_ROOT . 'modules/' . $item . '.inc.php';
        require_once template_echo('my_footer', $user_tpl_dir);
    } else {
        echo "Error operation, system halt,inner_box!";
    }
} else {
    $in_front = true;
    $num = @$db->result_first("select count(*) from {$tpf}users where userid='{$pd_uid}' and is_locked=1 limit 1");
    if ($num) {
        include PHPDISK_ROOT . "./includes/header.inc.php";
        require_once template_echo("pd_mydisk_locked", $user_tpl_dir);
    } else {
        if ($item) {
            include PHPDISK_ROOT . "./includes/header.inc.php";
            $items = array('files', 'profile');
            if (in_array($item, $items)) {
                $action_module = PHPDISK_ROOT . 'modules/' . $item . '.inc.php';
            } else {
                echo "Error operation, system halt!";
            }
            require_once template_echo("mydisk", $user_tpl_dir);
        } else {
            echo "Error operation, system halt!";
        }
    }
}
include PHPDISK_ROOT . "./includes/footer.inc.php";
?>


Exemplo n.º 21
0
<div class="layout_box">
	<div class="l col-md-3">
	<?php 
    require_once template_echo('sub/block_public_cate_list', 'templates/fms_blue/');
    ?>

	<?php 
    show_adv_data('adv_right');
    ?>

	<?php 
    require_once template_echo('sub/block_cate_hot_file', 'templates/fms_blue/');
    ?>

	<?php 
    require_once template_echo('sub/block_now_week_down_file', 'templates/fms_blue/');
    ?>
	</div>
	<div class="r col-md-9">
		<div>
			<?php 
    if (count($course_data)) {
        foreach ($course_data as $k => $v) {
            $rowH = $k % 3 == 0 ? '<div class="row">' : '';
            $rowF = $k % 3 == 2 ? '</div>' : '';
            ?>
				<?php 
            echo $rowH;
            ?>
					<div class="col-sm-6 col-md-4">
						<div class="thumbnail">
Exemplo n.º 22
0
$in_front = true;
$title = __('extract_file') . ' - ' . $settings['site_title'];
include PHPDISK_ROOT . "./includes/header.inc.php";
switch ($action) {
    case 'file_extract':
        form_auth(gpc('formhash', 'P', ''), formhash());
        $extract_code = trim(gpc('extract_code', 'P', ''));
        if (strlen($extract_code) == 8) {
            $rs = $db->fetch_one_array("select fl.*,u.username from {$tpf}files fl,{$tpf}users u where u.userid=fl.userid and file_key='{$extract_code}'");
            if ($rs) {
                $tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
                $rs[a_space] = urr("space", "username="******"Y-m-d H:i", $rs['file_time']);
                $rs['a_viewfile'] = urr("viewfile", "file_id={$rs[file_id]}");
                $rs[file_description] = clear_html(filter_word($rs[file_description]), 50);
                $files_array[] = $rs;
            } else {
                $sysmsg[] = __('extract_code_not_found');
            }
            unset($rs);
        }
        require_once template_echo('pd_extract', $user_tpl_dir);
        break;
    default:
        require_once template_echo('pd_extract', $user_tpl_dir);
}
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 23
0
    $seo = get_seo('public', $cate_id);
    if ($seo[title]) {
        eval("\$title = \"{$seo['title']}\";");
    }
    eval("\$keywords = \"{$seo['keywords']}\";");
    eval("\$description = \"{$seo['description']}\";");
}
include PHPDISK_ROOT . "./includes/header.inc.php";
if ($cate_id) {
    //面包屑
    $cur_cate = $cate_obj->getNodeById($cate_id);
    $breadcrumb = array();
    get_cate_breakcrumb($cur_cate, $breadcrumb);
    //分类数据
    $C[cate_list] = get_all_relate_cate_from_cateid($cate_id);
    //课程数据
    $course_array = get_course_from_cate($cate_id, '', $perpage);
    $course_data = $course_array['data'];
    //分页
    $page_nav = multi($course_array['total_num'], $perpage, $pg, "public.php?cate_id=" . $cate_id);
} else {
    $q = $db->query("select * from {$tpf}categories where share_index=1 order by show_order asc,cate_id asc");
    $cate_list = array();
    while ($rs = $db->fetch_array($q)) {
        $cate_list[] = $rs;
    }
    $db->free($q);
    unset($rs);
}
require_once template_echo('pd_public', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 24
0
                $cmts[] = $rs;
            }
            $db->free($q);
            unset($rs);
            return $cmts;
        }
        $cmts = course_last_comment($course_id);
        $a_comment = urr("comment", "file_id={$course_id}");
    }
} else {
    $C[you_like_file] = super_cache::get('get_rand_file|5');
    $C[user_other_file] = get_user_other_file($course_id, $course[user_id]);
}
$report_url = urr("mydisk", "item=files&action=post_report&course_id={$course_id}");
$comment_url = urr("mydisk", "item=files&action=post_comment&course_id={$course_id}");
require_once template_echo('pd_viewcourse', $user_tpl_dir);
add_credit_log($course_id, 0, 'ref', $course[user_id], $_SERVER['HTTP_REFERER']);
views_stat($course_id);
include PHPDISK_ROOT . "./includes/footer.inc.php";
function views_stat($file_id)
{
    global $db, $tpf, $file, $settings, $auth;
    $view_stat = gpc('view_stat', 'C', '');
    if (!$view_stat) {
        pd_setcookie('view_stat', 1, 3600 * 3);
        $db->query_unbuffered("update {$tpf}files set file_views=file_views+1 where file_id='{$file_id}'");
        if ($auth[view_credit] && $settings[how_view_credit_views] && $settings[how_view_credit_credit]) {
            $add_credit = @round((int) $settings[how_view_credit_credit] / (int) $settings[how_view_credit_views], 4);
            add_credit_log($file_id, $add_credit, 'view', $file[userid]);
            $db->query_unbuffered("update {$tpf}users set credit=credit+{$add_credit} where userid='{$file[userid]}'");
        }
Exemplo n.º 25
0
<?php

/**
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: mydisk.php 25 2011-03-04 07:36:51Z along $
#
#	Copyright (C) 2008-2013 PHPDisk Team. All Rights Reserved.
#
*/
include "includes/commons.inc.php";
define('IN_MYDISK', true);
$inner_box = true;
$uid = (int) gpc('uid', 'G', 0);
$folder_id = (int) gpc('folder_id', 'G', 0);
$plugin_type = trim(gpc('plugin_type', 'G', ''));
$hash = trim(gpc('hash', 'G', ''));
$md5_sign = md5($uid . $folder_id . $plugin_type . $settings[phpdisk_url]);
if ($md5_sign != $hash) {
    exit('[PHPDisk] Error Params!');
}
require_once template_echo('my_header', $user_tpl_dir);
require_once PHPDISK_ROOT . "modules/plugin_upload.inc.php";
require_once template_echo('pd_footer', $user_tpl_dir);
?>


Exemplo n.º 26
0
                    @make_thumb($file['tmp_name'], $file_real_path . $file_store_path . $file_real_name_store . '_thumb.' . $file_extension, $settings['thumb_width'], $settings['thumb_height']);
                } else {
                    $is_image = 0;
                }
            } else {
                $is_image = 0;
            }
            $rs = $db->fetch_one_array("select file_name,file_extension,file_store_path,file_real_name from {$tpf}files where file_id='{$file_id}' and userid='{$pd_uid}' limit 1");
            if ($rs) {
                $file_ext = $rs[file_extension] ? '.' . $rs[file_extension] : '';
                @unlink(PHPDISK_ROOT . $settings[file_path] . '/' . $rs[file_store_path] . '/' . $rs[file_real_name] . $file_ext);
                @unlink(PHPDISK_ROOT . $settings[file_path] . '/' . $rs[file_store_path] . '/' . $rs[file_real_name] . '_thumb' . $file_ext);
            }
            unset($rs);
            $server_oid = @$db->result_first("select server_oid from {$tpf}servers where server_id>1 order by is_default desc limit 1");
            if (!$error && upload_file($file['tmp_name'], $dest_file)) {
                $ins = array('file_name' => $file_name, 'file_key' => $file_key, 'file_extension' => $file_extension, 'is_image' => $is_image, 'file_mime' => $file_mime, 'file_store_path' => $file_store_path, 'file_real_name' => $file_real_name, 'file_size' => $file['size'], 'file_time' => $timestamp, 'server_oid' => (int) $server_oid, 'is_checked' => 1, 'in_share' => 1, 'userid' => $pd_uid, 'ip' => $onlineip, 'folder_id' => $folder_id);
                $db->query_unbuffered("update {$tpf}files set " . $db->sql_array($ins) . " where file_id='{$file_id}' and userid='{$pd_uid}' limit 1");
                $sysmsg[] = '替换文件上传成功';
                tb_redirect($settings[phpdisk_url] . urr("space", "username="******"select folder_id from {$tpf}files where file_id='{$file_id}' limit 1");
            $ref = $_SERVER['HTTP_REFERER'];
            require_once template_echo($item, $user_tpl_dir);
        }
        break;
}
Exemplo n.º 27
0
            $rs['file_size'] = get_size($rs['file_size']);
            $rs['file_time'] = date("Y-m-d", $rs['file_time']);
            $rs['a_downfile'] = urr("downfile", "file_id={$rs['file_id']}&file_key={$rs['file_key']}");
            $rs['a_viewfile'] = urr("viewfile", "file_id={$rs['file_id']}");
            $rs[file_description] = clear_html($rs[file_description], 50);
            $rs['a_space'] = urr("space", "username="******"search", "action=search&word=" . rawurlencode($word) . "&scope={$scope}&n={$n_t}");
        $u_url = urr("search", "action=search&word=" . rawurlencode($word) . "&scope={$scope}&u={$u_t}");
        $s_url = urr("search", "action=search&word=" . rawurlencode($word) . "&scope={$scope}&s={$s_t}");
        $t_url = urr("search", "action=search&word=" . rawurlencode($word) . "&scope={$scope}&t={$t_t}");
        $arr = explode('&', $_SERVER['QUERY_STRING']);
        $page_nav = multi($total_num, $perpage, $pg, urr("search", "action=search&word=" . rawurlencode($word) . "&scope={$scope}&{$arr[3]}"));
        require_once template_echo('pd_search', $user_tpl_dir);
        break;
    default:
        require_once template_echo('pd_search', $user_tpl_dir);
}
include PHPDISK_ROOT . "./includes/footer.inc.php";
Exemplo n.º 28
0
#	Site: http://www.google.com
#
#	$Id: pd_ann_list.tpl.php 121 2014-03-04 12:38:05Z along $
#
#	Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved.
#
##
!defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!');
?>
<div class="layout_box">
<?php 
require_once template_echo('sub/block_adv_middle', 'templates/fms_blue/');
?>
<div class="l">
<?php 
require_once template_echo('sub/block_ann_list', 'templates/fms_blue/');
?>
</div>
<div class="r">
<div class="file_box">
	<h2 class="file_tit"><?php 
echo $nav_title;
?>
</h2>
<div class="ann_box">
<?php 
if (count($ann_list)) {
    foreach ($ann_list as $k => $v) {
        $color = $k % 2 == 0 ? 'color1' : 'color4';
        ?>
<div class="tit2"><img src="images/icon_nav.gif" align="absmiddle" border="0" /><?php 
Exemplo n.º 29
0
            $meta_description_d = trim(gpc('meta_description_d', 'P', ''));
            $setting = array('open_rewrite' => 0);
            $settings = gpc('setting', 'P', $setting);
            if (!$error) {
                update_seo('index', 0, $meta_title, $meta_keywords, $meta_description);
                if ($auth[pd_a]) {
                    update_seo('public', 0, $meta_title2, $meta_keywords2, $meta_description2);
                    update_seo('hotfile', 0, $meta_title3, $meta_keywords3, $meta_description3);
                    update_seo('space', 0, $meta_title_s, $meta_keywords_s, $meta_description_s);
                    update_seo('viewfile', 0, $meta_title_v, $meta_keywords_v, $meta_description_v);
                    update_seo('download', 0, $meta_title_d, $meta_keywords_d, $meta_description_d);
                }
                settings_cache($settings);
                $sysmsg[] = __('seo_update_success');
                redirect(urr(ADMINCP, "item={$item}&menu={$menu}"), $sysmsg);
            } else {
                redirect('back', $sysmsg);
            }
        } else {
            $s = get_seo('index', 0);
            if ($auth[pd_a]) {
                $s2 = get_seo('public', 0);
                $s3 = get_seo('hotfile', 0);
                $ss = get_seo('space', 0);
                $sv = get_seo('viewfile', 0);
                $sd = get_seo('download', 0);
            }
            $setting = $settings;
            require_once template_echo($item, $admin_tpl_dir, '', 1);
        }
}
Exemplo n.º 30
0
}
if ($auth[pd_a]) {
    $seo = get_seo('viewfile', $file_id);
    $seo_a = get_seo('viewfile', 0);
    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']}\";");
}
$logo = $user_tpl_dir . 'images/logo.png';
$logo_url = $settings[phpdisk_url];
include PHPDISK_ROOT . "./includes/header.inc.php";
$report_url = urr("mydisk", "item=files&action=post_report&file_id={$file_id}");
$comment_url = urr("mydisk", "item=files&action=post_comment&file_id={$file_id}");
require_once template_echo('pd_download2', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
function curr_file($file_id)
{
    global $db, $tpf, $settings, $code;
    $file = $db->fetch_one_array("select * from {$tpf}files where file_id='{$file_id}'");
    if (!$file) {
        $file['is_del'] = 1;
    } else {
        $file['dl'] = create_down_url($file);
        $in_extract = $code == md5($file['file_key']) ? 1 : 0;
        $file['username'] = $file['p_name'] = @$db->result_first("select username from {$tpf}users where userid='{$file['userid']}' limit 1");
        $rs = $db->fetch_one_array("select folder_id,folder_name from {$tpf}folders where userid='{$file['userid']}' and folder_id='{$file['folder_id']}'");
        $file['file_category'] = $rs['folder_name'] ? '<a href="' . urr("space", "username="******"&folder_id=" . $rs['folder_id']) . '" target="_blank">' . $rs['folder_name'] . '</a>' : '- ' . __('uncategory') . ' -';
        $file_key = trim($file['file_key']);
        $tmp_ext = $file['file_extension'] ? '.' . $file['file_extension'] : "";