本文整理汇总了PHP中urr函数的典型用法代码示例。如果您正苦于以下问题:PHP urr函数的具体用法?PHP urr怎么用?PHP urr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urr函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sitemap_tag
function sitemap_tag($str)
{
$str = rawurlencode($str);
$url = base64_encode($_SERVER['QUERY_STRING']);
$rtn = ' <a href="' . urr(ADMINCP, "item=sitemap&action=add_shortcut&title={$str}&url={$url}") . '" title="' . __('add_sitemap_tips') . '">[+]</a>';
echo $rtn;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:7,代码来源:admincp.php
示例2: curr_file
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=" . rawurlencode($file['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'] : "";
$file_extension = $file['file_extension'];
$file_ext = get_real_ext($file_extension);
$file['file_description'] = str_replace('<br>', LF, $file[file_description]);
$file['a_space'] = urr("space", "username=" . rawurlencode($file['username']));
$file['file_name_min'] = filter_word($file['file_name'] . $tmp_ext);
$file['file_name'] = filter_word($file['file_name'] . $tmp_ext);
$file['file_size'] = get_size($file['file_size']);
$file['p_time'] = $file['file_time'];
$file['file_time'] = $file['time_hidden'] ? __('hidden') : date("Y-m-d", $file['file_time']);
$file['credit_down'] = $file['file_credit'] ? (int) $file['file_credit'] : (int) $settings['credit_down'];
$file['username'] = $file[user_hidden] ? __('hidden') : ($file['username'] ? '<a href="' . $file['a_space'] . '">' . $file['username'] . '</a>' : __('hidden'));
$file['file_downs'] = $file['stat_hidden'] ? __('hidden') : get_discount($file[userid], $file['file_downs']);
$file['file_views'] = $file['stat_hidden'] ? __('hidden') : get_discount($file[userid], $file['file_views']);
$file['file_url'] = $settings['phpdisk_url'] . urr("viewfile", "file_id={$file['file_id']}");
if (get_plans(get_profile($file[userid], 'plan_id'), 'open_second_page') == 3) {
$file['a_downfile'] = urr("download", "file_id={$file_id}&key=" . random(32));
$file['a_downfile2'] = urr("download", "file_id={$file_id}&key=" . random(32));
}
}
return $file;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:35,代码来源:download2.php
示例3: get_openid
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');
}
}
开发者ID:saintho,项目名称:phpdisk,代码行数:56,代码来源:qq_callback.php
示例4: uc_upload_public
function uc_upload_public($file_id, $file_key, $file_name, $message = '')
{
global $pd_uid, $pd_gid, $pd_username, $settings;
$feed = array();
$feed['icon'] = 'folder';
$feed['title_template'] = "{$pd_username} " . __('upload_public') . " {$file_name}";
$feed['title_data'] = array('username' => '<a href="' . $settings['phpdisk_url'] . urr("space", "username=" . rawurlencode($pd_username)) . '">' . $pd_username . '</a>', 'file_name' => '<a href="' . $settings['phpdisk_url'] . urr("viewfile", "file_id={$file_id}&file_key={$file_key}") . '">' . $file_name . '</a>');
$feed['body_template'] = '';
$feed['body_data'] = array();
$feed['body_general'] = '';
uc_feed_add($feed['icon'], $pd_uid, $pd_username, $feed['title_template'], $feed['title_data'], $feed['body_template'], $feed['body_data'], $feed['body_general'], '', array());
}
开发者ID:saintho,项目名称:phpdisk,代码行数:12,代码来源:functions.inc.php
示例5: show_comment
function show_comment($file_id)
{
global $db, $tpf, $pg, $start_num, $perpage;
$q = $db->query("select c.*,u.username from {$tpf}comments c,{$tpf}users u where file_id='{$file_id}' and is_checked=1 and c.userid=u.userid order by cmt_id asc limit {$start_num},{$perpage}");
$cmts = array();
while ($rs = $db->fetch_array($q)) {
$rs['content'] = str_replace("\r\n", "<br>", $rs['content']);
$rs['in_time'] = custom_time("Y-m-d H:i:s", $rs['in_time']);
$rs['a_space'] = urr("space", "username=" . rawurlencode($rs['username']));
$cmts[] = $rs;
}
$db->free($q);
unset($rs);
return $cmts;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:15,代码来源:comment.php
示例6: build
static function build()
{
global $charset, $settings, $db, $tpf, $timestamp;
$sitemap_file = PHPDISK_ROOT . 'sitemap.xml';
if (!file_exists($sitemap_file) || $timestamp - @filemtime($sitemap_file) > 86400) {
$arr = array();
$q = $db->query("select file_id,file_time from {$tpf}files where in_share=1 order by file_id desc limit 50");
while ($rs = $db->fetch_array($q)) {
$rs[loc] = $settings[phpdisk_url] . urr("viewfile", "file_id={$rs[file_id]}");
$rs[lastmod] = date('Y-m-d H:i:s', $rs[file_time]);
$rs[changefreq] = 'daily';
$rs[priority] = '0.8';
$arr[] = $rs;
}
$db->free($q);
unset($rs);
// ob_end_clean();
/* header( "Content-type: application/xml; charset=\"".$charset . "\"", true );
header( 'Pragma: no-cache' );*/
$map = '<?xml version="1.0" encoding="' . $charset . '" ?>' . LF;
$map .= '<!-- sitemap-generator-url="' . $settings[phpdisk_url] . '" -->' . LF;
$map .= '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . LF;
$map .= '<url>' . LF;
$map .= "\t<loc>{$settings[phpdisk_url]}</loc>" . LF;
$map .= "\t<lastmod>" . date('Y-m-d H:i:s') . "</lastmod>" . LF;
$map .= "\t<changefreq>daily</changefreq>" . LF;
$map .= "\t<priority>1.0</priority>" . LF;
$map .= '</url>' . LF;
foreach ($arr as $v) {
$map .= '<url>' . LF;
$map .= "\t<loc>{$v[loc]}</loc>" . LF;
$map .= "\t<lastmod>{$v[lastmod]}</lastmod>" . LF;
$map .= "\t<changefreq>{$v[changefreq]}</changefreq>" . LF;
$map .= "\t<priority>{$v[priority]}</priority>" . LF;
$map .= '</url>' . LF;
}
$map .= '</urlset>' . LF;
$map .= '<!-- generated-on="' . date('Y-m-d H:i:s') . '" -->' . LF;
write_file(PHPDISK_ROOT . 'sitemap.xml', $map, 'wb+');
}
}
开发者ID:saintho,项目名称:phpdisk,代码行数:41,代码来源:sitemap.class.php
示例7: get_plugin_info
function get_plugin_info($plugin)
{
global $db, $tpf;
$file = PD_PLUGINS_DIR . "{$plugin}/plugin_info.php";
if (file_exists($file)) {
$_data = read_file($file);
preg_match("/Plugin Name:(.*)/i", $_data, $plugin_name);
preg_match("/Plugin URL:(.*)/i", $_data, $plugin_url);
preg_match("/Description:(.*)/i", $_data, $plugin_desc);
preg_match("/Author:(.*)/i", $_data, $plugin_author);
preg_match("/Author Site:(.*)/i", $_data, $plugin_site);
preg_match("/Version:(.*)/i", $_data, $plugin_version);
preg_match("/PHPDISK Core:(.*)/i", $_data, $phpdisk_core);
}
if (file_exists(PD_PLUGINS_DIR . "{$plugin}/admin.inc.php")) {
$admin_url = urr(ADMINCP, "item=plugins&app={$plugin}");
}
$actived = (int) @$db->result_first("select actived from {$tpf}plugins where plugin_name='{$plugin}' limit 1");
$installed = file_exists(PD_PLUGINS_DIR . "{$plugin}/install.lock") ? 1 : 0;
$arr = array('plugin_name' => trim($plugin_name[1]), 'plugin_url' => trim($plugin_url[1]), 'plugin_desc' => htmlspecialchars(trim($plugin_desc[1])), 'plugin_author' => trim($plugin_author[1]), 'plugin_site' => trim($plugin_site[1]), 'plugin_version' => trim($plugin_version[1]), 'phpdisk_core' => trim($phpdisk_core[1]), 'admin_url' => trim($admin_url), 'plugin_dir' => trim($plugin), 'actived' => $actived, 'installed' => $installed);
return $arr;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:22,代码来源:plugin.func.php
示例8: curr_file
function curr_file($file_id)
{
global $db, $tpf, $settings;
$file = $db->fetch_one_array("select * from {$tpf}files where file_id='{$file_id}' and is_del=0");
if (!$file) {
$file['is_del'] = 1;
$file['file_name'] = __('visited_tips');
} else {
$file[dl] = create_down_url($file);
$file['is_del'] = 0;
$file_key = trim($file['file_key']);
$tmp_ext = $file['file_extension'] ? '.' . $file['file_extension'] : "";
$file_extension = $file['file_extension'];
$file_ext = get_real_ext($file_extension);
$file_description = $file['file_description'];
$file['file_description'] = nl2br($file['file_description']);
$file['a_space'] = urr("space", "username=" . rawurlencode($file['username']));
$file['file_name'] = filter_word($file['file_name'] . $tmp_ext);
$file['file_size'] = get_size($file['file_size']);
$file['file_url'] = $settings['phpdisk_url'] . urr("viewfile", "file_id={$file['file_id']}");
return $file;
}
}
开发者ID:saintho,项目名称:phpdisk,代码行数:23,代码来源:download.php
示例9: write_file
write_file(PHPDISK_ROOT . 'system/b.txt', $sign . LF, 'ab');
$q = $db->query("select file_id from {$tpf}plugin_upload where hash='{$sign}'");
$file_ids = '';
while ($rs = $db->fetch_array($q)) {
$file_ids .= $rs[file_id] . ',';
}
$db->free($q);
unset($rs);
$file_ids = $file_ids ? substr($file_ids, 0, -1) : '';
if ($file_ids) {
$q = $db->query("select file_id,file_name,file_extension,file_time,file_size from {$tpf}files where file_id in ({$file_ids}) order by file_id desc limit 10");
$str = '';
while ($rs = $db->fetch_array($q)) {
$tmp_ext = $rs['file_extension'] ? '.' . $rs['file_extension'] : "";
$rs['file_name_all'] = cutstr($rs['file_name'] . $tmp_ext, 35);
$rs['a_downfile'] = $settings[phpdisk_url] . urr("viewfile", "file_id=" . $rs['file_id']);
$rs['file_time'] = date('Y-m-d', $rs['file_time']);
$rs['file_size'] = get_size($rs['file_size']);
$rs[ctn_2] = str_replace(array('"', "'"), '_', $rs['file_name_all']) . '\\\\r\\\\n下载地址: [url=' . $rs['a_downfile'] . ']' . $rs['a_downfile'] . '[/url]\\\\r\\\\n\\\\r\\\\n';
$rs[ctn] = str_replace(array('"', "'"), '_', $rs['file_name_all']) . '<br>下载地址: [url=' . $rs['a_downfile'] . ']' . $rs['a_downfile'] . '[/url]<br><br>';
$str .= '<div class="fl_list">' . LF;
//$str .= '<div class="f1"><span style="float:right" class="txtgray">'.$rs[file_size].'</span> <a href="javascript:;" title="'.$rs['file_name'].'" onclick="addCodeToEditor(\\\''.$rs['ctn'].'\\\',\\\''.$rs['ctn_2'].'\\\',\\\''.$plugin_type.'\\\');">'.$rs['file_name_all'].'</a></div>'.LF;
$str .= '<div class="f1"><span style="float:right" class="txtgray">' . $rs[file_size] . '</span> <a href="javascript:;" title="' . $rs['file_name'] . '" onclick="addCodeToEditor(\\\'' . $rs['ctn'] . '\\\',\\\'' . $rs['ctn_2'] . '\\\',\\\'' . $plugin_type . '\\\');">' . $rs['file_name_all'] . '</a></div>' . LF;
//$str .= '<div class="f1"><span style="float:right" class="txtgray">'.$rs[file_size].'</span> <a href="###" title="'.$rs['file_name'].'" id="f_'.$rs[file_id].'" onclick="top.test(\''.$rs['a_downfile'].'\');">'.file_icon($rs['file_extension']).$rs['file_name_all'].'</a></div>'.LF;
$str .= '<div class="f2"><span class="txtgray">' . $rs['file_time'] . '</span></div>' . LF;
$str .= '</div>' . LF;
$str .= '<div class="clear"></div>' . LF;
}
$db->free($q);
unset($rs);
//echo 'alert(\''.$str.'\')';
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:callback.php
示例10: form_auth
form_auth(gpc('formhash', 'P', ''), formhash());
if (get_profile($pd_uid, 'wealth') < $money) {
$error = true;
$sysmsg[] = __('mywealth_too_small');
}
if (!$error) {
$my_order = 'm' . get_order_number();
$num = @$db->result_first("select count(*) from {$tpf}vip_orders where order_number='{$my_order}' and pay_method='{$task}' and userid='{$pd_uid}'");
if (!$num) {
$ins = array('pay_method' => $task, 'userid' => $pd_uid, 'vip_id' => $vip_id, 'order_number' => $my_order, 'total_fee' => $money, 'pay_status' => 'pendding', 'in_time' => $timestamp, 'ip' => $onlineip);
$db->query_unbuffered("insert into {$tpf}vip_orders set " . $db->sql_array($ins) . ";");
}
$db->query_unbuffered("update {$tpf}users set wealth=wealth-{$money} where userid='{$pd_uid}'");
$md5_sign = md5($my_order . $money . $pd_uid . $task);
echo '<div align="center">' . __('buy_vip_doing') . '</div>';
echo '<script>document.location="' . urr("payment", "action={$task}&order_number={$my_order}&sign={$md5_sign}") . '";</script>';
} else {
redirect('back', $sysmsg);
}
} elseif ($task == 'alipay') {
form_auth(gpc('formhash', 'P', ''), formhash());
if (!$error) {
require_once PD_PLUGINS_DIR . "payment/alipay/alipay_config.php";
require_once PD_PLUGINS_DIR . "payment/alipay/class/alipay_service.php";
$out_trade_no = date('YmdHis');
$parameter = array("service" => "create_direct_pay_by_user", "payment_type" => "1", "partner" => $partner, "seller_email" => $seller_email, "return_url" => $return_url, "notify_url" => $notify_url, "_input_charset" => $_input_charset, "show_url" => $show_url, "out_trade_no" => $out_trade_no, "subject" => $settings['site_title'] . ' ' . __('ali_subject_pay'), "body" => __('ali_body_pay') . ' ' . $money . ' RMB', "total_fee" => $money, "paymethod" => 'directPay', "defaultbank" => $defaultbank, "anti_phishing_key" => $anti_phishing_key, "exter_invoke_ip" => $exter_invoke_ip, "buyer_email" => $buyer_email, "extra_common_param" => $extra_common_param, "royalty_type" => $royalty_type, "royalty_parameters" => $royalty_parameters);
//
$num = @$db->result_first("select count(*) from {$tpf}vip_orders where order_number='{$out_trade_no}' and pay_method='{$task}' and userid='{$pd_uid}'");
if (!$num) {
$ins = array('pay_method' => $task, 'userid' => $pd_uid, 'vip_id' => $vip_id, 'order_number' => $out_trade_no, 'total_fee' => $money, 'pay_status' => 'pendding', 'in_time' => $timestamp, 'ip' => $onlineip);
$db->query_unbuffered("insert into {$tpf}vip_orders set " . $db->sql_array($ins) . ";");
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:vip.php
示例11: get_size
$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=" . rawurlencode($rs['username']));
//$file_ids .= $rs['file_id'].',';
$files_array[] = $rs;
}
$db->free($q);
unset($rs);
$n_t = $n == 'asc' ? 'desc' : 'asc';
$u_t = $u == 'asc' ? 'desc' : 'asc';
$s_t = $s == 'asc' ? 'desc' : 'asc';
$t_t = $t == 'asc' ? 'desc' : 'asc';
$n_order = $n ? $L['o_' . $n_t] : '';
$u_order = $u ? $L['o_' . $u_t] : '';
$s_order = $s ? $L['o_' . $s_t] : '';
$t_order = $t ? $L['o_' . $t_t] : '';
$n_url = urr("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";
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:search.php
示例12: exit
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¶m={$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();
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:index.php
示例13: redirect
$db->query_unbuffered("update {$tpf}plans set show_order='" . (int) $show_order[$i] . "' where plan_id='" . (int) $plan_ids[$i] . "'");
}
redirect(urr(ADMINCP, "item={$item}&menu=user&action=list"), '', 0);
} else {
redirect('back', $sysmsg);
}
} else {
$q = $db->query("select * from {$tpf}plans order by show_order asc,plan_id asc");
$plans = array();
while ($rs = $db->fetch_array($q)) {
$rs[user_count] = get_plan_users($rs[plan_id]);
$rs[is_default] = $rs[is_default] ? '<span class="txtgreen">' . __('set_default') . '</span>' : '';
$rs['status_text'] = $rs['is_hidden'] ? '<span class="txtred">' . __('hidden') . '</span>' : '<span class="txtblue">' . __('display') . '</span>';
$rs['a_change_status'] = urr(ADMINCP, "item={$item}&menu=user&action=change_status&plan_id={$rs['plan_id']}");
$rs['a_edit_plan'] = urr(ADMINCP, "item={$item}&menu=user&action=edit&plan_id={$rs['plan_id']}");
$rs['a_truncate_plan'] = urr(ADMINCP, "item={$item}&menu=user&action=truncate&plan_id={$rs['plan_id']}");
$rs['a_del_plan'] = urr(ADMINCP, "item={$item}&menu=user&action=del&plan_id={$rs['plan_id']}");
$rs[a_set_plan] = urr(ADMINCP, "item={$item}&menu=user&action=set_plan&plan_id={$rs['plan_id']}");
$plans[] = $rs;
}
$db->free($q);
unset($rs);
$settings[down_active_interval] = $settings[down_active_interval] ? $settings[down_active_interval] : 'day';
require_once template_echo($item, $admin_tpl_dir, '', 1);
}
}
function get_plan_users($plan_id)
{
global $db, $tpf;
return @$db->result_first("select count(*) from {$tpf}users where plan_id='{$plan_id}'");
}
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:plans.inc.php
示例14: unset
unset($rs);
return $file_ids;
}
$file_ids = get_file_ids($tag);
$file_ids = substr($file_ids, -1) == ',' ? substr($file_ids, 0, -1) : $file_ids;
if (!$file_ids) {
header("Location: " . urr("tag", ""));
exit;
}
$sql_do = "{$tpf}files where file_id in ({$file_ids})";
$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 file_id,file_key,file_name,file_extension,file_size,file_time,server_oid,file_store_path,file_real_name,is_image from {$sql_do} order by 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), 35);
$rs['file_size'] = get_size($rs['file_size']);
$rs['file_time'] = custom_time("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, urr("tag", "tag=" . rawurlencode($tag)));
}
require_once template_echo('pd_tag', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:tag.php
示例15: __
?>
</a></div>
<?php
if ($settings['open_comment']) {
?>
<br />
<div class="f14"><img src="images/ico_cmt.gif" align="absmiddle" border="0" /><?php
echo __('add_cmt');
?>
:</div>
<div id="cmt_box">
<?php
if ($pd_uid) {
?>
<form action="<?php
echo urr("comment", "");
?>
" method="post" onsubmit="return docmt(this);">
<input type="hidden" name="action" value="cmt" />
<input type="hidden" name="file_id" value="<?php
echo $file_id;
?>
" />
<input type="hidden" name="formhash" value="<?php
echo $formhash;
?>
" />
<li class="txtgray"><?php
echo __('cmt_content');
?>
:</li>
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:pd_comment.tpl.php
示例16: nav_path
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;
}
开发者ID:saintho,项目名称:phpdisk,代码行数:13,代码来源:global.func.php
示例17: redirect
redirect('back', $sysmsg);
}
} else {
$rs = $db->fetch_one_array("select * from {$tpf}navigations where navid='{$navid}'");
if ($rs) {
$nav_text = $rs['text'];
$nav_title = $rs['title'];
$nav_href = $rs['href'];
$nav_target = $rs['target'];
$nav_position = $rs['position'];
}
unset($rs);
require_once template_echo($item, $admin_tpl_dir, '', 1);
}
break;
case 'delete_nav':
if ($settings['online_demo']) {
$error = true;
$sysmsg[] = __('online_demo_deny');
}
if (!$error) {
$navid = (int) gpc('navid', 'G', 0);
$db->query_unbuffered("delete from {$tpf}navigations where navid='{$navid}' limit 1");
redirect(urr(ADMINCP, "item={$item}&menu=extend&action=index"), '', 0);
} else {
redirect('back', $sysmsg);
}
break;
default:
redirect(urr(ADMINCP, "item={$item}&menu=extend&action=index"), '', 0);
}
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:navigation.inc.php
示例18: urr
?>
<a href="<?php
echo urr(ADMINCP, "item=plugins&menu={$menu}&plugin_name=" . $v['plugin_dir'] . "&action=uninstall");
?>
" class="txtred" onclick="return confirm('<?php
echo __('confirm_uninstall_plugin');
?>
');"><?php
echo __('uninstall');
?>
</a>
<?php
} else {
?>
<a href="<?php
echo urr(ADMINCP, "item=plugins&menu={$menu}&plugin_name=" . $v['plugin_dir'] . "&action=install");
?>
" class="txtgreen" onclick="return confirm('<?php
echo __('confirm_install_plugin');
?>
');"><?php
echo __('install');
?>
</a>
<?php
}
?>
<span class="txtgray"><?php
echo __('plugin_author');
?>
:</span><a href="<?php
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:plugins.tpl.php
示例19: urr
$info['a_restore'] = urr(ADMINCP, "item=database&action=restore&task=restore&pre={$info['pre']}");
$infos[] = $info;
}
}
require_once template_echo($item, $admin_tpl_dir, '', 1);
}
break;
case 'delete':
if ($settings['online_demo']) {
$error = true;
$sysmsg[] = __('online_demo_deny');
}
if (!$error) {
$pre = gpc('pre', 'G', '');
$sqlfiles = glob(PHPDISK_ROOT . 'system/data/*.sql');
if (is_array($sqlfiles)) {
foreach ($sqlfiles as $k => $sqlfile) {
if (preg_match("/({$pre})([0-9]+)\\.sql/i", basename($sqlfile))) {
$sysmsg[] = __('delete') . ' ' . $sqlfile . ' ...... ' . __('success');
@unlink($sqlfile);
}
}
}
redirect(urr(ADMINCP, "item=database&action=restore"), $sysmsg);
} else {
redirect('back', $sysmsg);
}
break;
default:
redirect(urr(ADMINCP, "item=database&action=backup"), $sysmsg);
}
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:database.inc.php
示例20: __
echo __('public_setting');
sitemap_tag(__('public_setting'));
?>
</h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b><?php
echo __('tips');
?>
: </b>
<span class="txtgray"><?php
echo __('public_setting_tips');
?>
</span>
</div>
<form action="<?php
echo urr(ADMINCP, "item={$item}&menu={$menu}");
?>
" method="post">
<input type="hidden" name="action" value="<?php
echo $action;
?>
"/>
<input type="hidden" name="task" value="update"/>
<input type="hidden" name="formhash" value="<?php
echo $formhash;
?>
" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
<td width="40%"><span class="bold"><?php
echo __('check_public_file');
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:public.tpl.php
注:本文中的urr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论