function remote_server_url() { global $db, $tpf, $configs, $settings; if (display_plugin('multi_server', 'open_multi_server_plugin', $settings['open_multi_server'], 0)) { $rs = $db->fetch_one_array("select server_host,server_store_path,server_key from {$tpf}servers where server_id>1 order by is_default desc limit 1"); if ($rs) { $remote_server_url = $rs['server_host'] . 'update_configs.php?code=' . $rs[server_key]; } unset($rs); } else { $remote_server_url = ''; } return $remote_server_url; }
function get_file_thumb($rs) { global $db, $tpf, $settings; if (display_plugin('multi_server', 'open_multi_server_plugin', $settings['open_multi_server'], 0) && $rs['server_oid'] > 1) { $rs2 = $db->fetch_one_array("select * from {$tpf}servers where server_oid='{$rs['server_oid']}' limit 1"); if ($rs2) { if ($rs['is_image']) { $file_thumb = $rs2['server_host'] . $rs2['server_store_path'] . '/' . $rs['file_store_path'] . $rs['file_real_name'] . '_thumb.' . $rs['file_extension']; } } unset($rs2); } else { if ($rs['is_image']) { $file_thumb = $settings['file_path'] . '/' . $username . $rs['file_store_path'] . $rs['file_real_name'] . '_thumb.' . $rs['file_extension']; } } return $file_thumb; }
$sysmsg[] = __('invalid_email'); } else { $rs = $db->fetch_one_array("select email from {$tpf}users where email='{$email}' and userid<>'{$uid}'"); if ($rs) { if (strcasecmp($email, $rs['email']) == 0) { $error = true; $sysmsg[] = __('email_already_exists'); } unset($rs); } } $user_store_space = $user_store_space ? $user_store_space : 0; if ($user_file_types && substr($user_file_types, strlen($user_file_types) - 1, 1) == ',') { $user_file_types = substr($user_file_types, 0, -1); } if (display_plugin('api', 'open_uc_plugin', $settings['connect_uc'], 0)) { $old_pwd = $db->result_first("select password from {$tpf}users where userid='{$uid}'"); if ($settings['connect_uc_type'] == 'phpwind') { uc_user_edit($pd_uid, $pd_username, $pd_username, $password, $email); } else { $ucresult = uc_user_edit($username, $old_pwd, $password, $email, 1); if ($ucresult < 0) { $error = true; $sysmsg[] = 'UC:' . __('update_password_error'); } } } if (!$error) { if ($auth[pd_a]) { update_seo('space', $uid, $meta_title, $meta_keywords, $meta_description); }
$db->query("delete from {$tpf}groups where gid='{$gid}' and group_type<>1"); $sysmsg[] = __('group_delete_success'); } unset($rs); group_settings_cache(); redirect(urr(ADMINCP, "item=groups&menu=user&action=index"), $sysmsg); } else { redirect('back', $sysmsg); } break; case 'index': $q = $db->query("select gid,group_name,group_type,host_id from {$tpf}groups order by gid asc"); $groups = array(); while ($rs = $db->fetch_array($q)) { $rs['user_count'] = (int) @$db->result_first("select count(*) as user_count from {$tpf}users where gid='" . $rs['gid'] . "'"); if (display_plugin('multi_server', 'open_multi_server_plugin', $settings['open_multi_server'], 0)) { if (strpos($rs['server_ids'], ',')) { $group_server = __('random_server'); } else { $group_server = @$db->result_first("select server_name from {$tpf}servers where server_oid='{$rs['server_ids']}'"); } } $rs['group_server'] = $group_server ? trim($group_server) : ' '; $rs['group_type_txt'] = $rs['group_type'] ? __('group_type_inner') : __('group_type_custom'); $rs['is_admin'] = $rs['gid'] == 1 ? 1 : 0; $rs['a_view'] = urr(ADMINCP, "item=users&action=index&gid={$rs['gid']}"); $rs['a_group_setting'] = urr(ADMINCP, "item=groups&menu=user&action=group_setting&gid={$rs['gid']}"); $rs['a_group_modify'] = urr(ADMINCP, "item=groups&menu=user&action=group_modify&gid={$rs['gid']}"); $rs['a_group_delete'] = urr(ADMINCP, "item=groups&menu=user&action=group_delete&gid={$rs['gid']}"); $groups[] = $rs; }
<?php /** # Project: PHPDISK File Storage Solution # This is NOT a freeware, use is subject to license terms. # # Site: http://www.google.com # # $Id: payment.php 121 2014-03-04 12:38:05Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ include "includes/commons.inc.php"; $in_front = true; if (!display_plugin('payment', 'open_payment_plugin', $settings['open_payment'], 0)) { exit('ERROR: payment ' . __('plugin_not_install')); } phpdisk_core::user_login(); $title = __('pay_result') . ' - ' . $settings[site_title]; include PHPDISK_ROOT . "./includes/header.inc.php"; $back_money = 0; switch ($action) { case 'mywealth': $order_number = trim(gpc('order_number', 'G', '')); $sign = trim(gpc('sign', 'G', '')); $rs = $db->fetch_one_array("select order_id,total_fee,vip_id,pay_status from {$tpf}vip_orders where order_number='{$order_number}' and pay_method='{$action}' and userid='{$pd_uid}'"); if ($rs) { $total_fee = $rs[total_fee]; $vip_id = $rs[vip_id]; $order_id = (int) $rs['order_id'];
function auth_task($task) { global $db, $tpf, $pd_uid, $settings; switch ($task) { case 'mod_stat': form_auth(gpc('formhash', 'P', ''), formhash()); $stat_code = trim(gpc('stat_code', 'P', '', 0)); if ($stat_code) { $c*k = $cf = 0; $arr = array('cnzz.com', 'baidu.com', 'linezing.com', '51.la', 'qq.com', '51yes.com'); for ($i = 0; $i < count($arr) - 1; $i++) { if (strpos($stat_code, $arr[$i]) === false) { $cf++; } else { $c*k++; } } } if (!$c*k) { $error = true; $sysmsg[] = __('stat_code_domain_error'); } if (!$error) { $stat_code = $stat_code ? base64_encode($stat_code) : ''; $db->query_unbuffered("update {$tpf}users set stat_code='{$stat_code}' where userid='{$pd_uid}' limit 1"); $sysmsg[] = __('add_stat_code_success'); redirect('back', $sysmsg); } else { redirect('back', $sysmsg); } break; case 'forum_upload_super': case 'forum_upload_min': form_auth(gpc('formhash', 'P', ''), formhash()); $plugin_type = trim(gpc('plugin_type', 'P', '')); $folder_id = (int) gpc('folder_id', 'P', 0); $hash = md5($pd_uid . $folder_id . $plugin_type . $settings[phpdisk_url]); if (display_plugin('multi_server', 'open_multi_server_plugin', $settings['open_multi_server'], 0)) { $server_host = @$db->result_first("select server_host from {$tpf}servers where server_id>1 order by is_default desc limit 1"); } switch ($plugin_type) { case 'dx2': $insert_code = 'insertBefore(\'#attachnotice_attach\')'; break; case 'pw87': $insert_code = 'insertBefore(\'#textarea\')'; break; } $param = 'uid=' . $pd_uid . '&folder_id=' . $folder_id . '&plugin_type=' . $plugin_type . '&hash=' . $hash; $code_arr['forum_upload_super'] = $code = '<!-- phpdisk upload plugin --> <script type="text/javascript" src="phpdisk_plugin/js/jquery.js"></script> <script type="text/javascript">var jq = jQuery.noConflict();</script> <script type="text/javascript" src="phpdisk_plugin/js/jquery.mybox2.js" charset="utf-8"></script> <link rel="stylesheet" type="text/css" href="phpdisk_plugin/images/mybox.css" /> <script type="text/javascript"> var upload_url = \'' . $server_host . 'plugin_upload.php?' . $param . '\'; function get_my_last(){ if(document.getElementById(\'pd_fl_box\').style.display==\'\'){ document.getElementById(\'pd_fl_box\').style.display=\'none\'; }else{ jQuery.getScript(\'' . $server_host . 'callback.php?' . $param . '&t=\'+ Math.random(), function(){ document.getElementById(\'pd_fl_box\').innerHTML = lang_upload_tips; document.getElementById(\'pd_fl_box\').innerHTML += callback; document.getElementById(\'pd_fl_box\').style.display = \'\'; } ); } } jq(document).ready(function(){ jq(\'<div class="pd_b_box"><a href="\'+upload_url+\'" id="a_phpdisk_upload" onclick="document.getElementById(\\\'pd_fl_box\\\').style.display=\\\'none\\\'"></a> <a href="javascript:;" id="a_phpdisk_fl" onclick="get_my_last()"></a></div><div class="clear"></div><div id=\\\'pd_fl_box\\\' style="display:none"></div><br>\').' . $insert_code . '; show_box(\'a_phpdisk_upload\',lang_btn_txt,upload_url,500,350); }); </script> <!-- end --> '; $code_arr['forum_upload_min'] = $code = '<!-- phpdisk upload plugin --> <script type="text/javascript" src="' . $settings[phpdisk_url] . 'includes/js/jquery.js"></script> <script type="text/javascript">var jq = jQuery.noConflict();</script> <script type="text/javascript" src="' . $settings[phpdisk_url] . 'includes/js/jquery.mybox2.js" charset="utf-8"></script> <link rel="stylesheet" type="text/css" href="' . $settings[phpdisk_url] . 'images/mybox.css" /> <script type="text/javascript"> var upload_url = \'' . $server_host . 'plugin_upload.php?' . $param . '\'; function get_my_last(){ if(document.getElementById(\'pd_fl_box\').style.display==\'\'){ document.getElementById(\'pd_fl_box\').style.display=\'none\'; }else{ jQuery.getScript(\'' . $server_host . 'callback.php?' . $param . '&t=\'+ Math.random(), function(){ document.getElementById(\'pd_fl_box\').innerHTML = lang_upload_tips; document.getElementById(\'pd_fl_box\').innerHTML += callback; document.getElementById(\'pd_fl_box\').style.display = \'\'; } ); } } jq(document).ready(function(){ jq(\'<div class="pd_b_box"><a href="\'+upload_url+\'" id="a_phpdisk_upload" onclick="document.getElementById(\\\'pd_fl_box\\\').style.display=\\\'none\\\'"></a> <a href="javascript:;" id="a_phpdisk_fl" onclick="get_my_last()"></a></div><div class="clear"></div><div id=\\\'pd_fl_box\\\' style="display:none"></div><br>\').' . $insert_code . '; show_box(\'a_phpdisk_upload\',lang_btn_txt,upload_url,500,350); }); </script> <!-- end --> '; return $code_arr; break; default: return ''; } }