本文整理汇总了PHP中template_echo函数的典型用法代码示例。如果您正苦于以下问题:PHP template_echo函数的具体用法?PHP template_echo怎么用?PHP template_echo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了template_echo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cutstr
$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=" . rawurlencode($username) . "&folder_id={$folder_id}");
require_once template_echo('pd_space', $user_tpl_dir);
include PHPDISK_ROOT . "./includes/footer.inc.php";
示例2: write_file
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='{$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);
示例3: redirect
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" />' : ' ';
$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";
示例4: redirect
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;
}
}
示例5: 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();
示例6: template_echo
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;
?>
© All Rights Reserved.<?php
require_once template_echo('sub/block_license', 'templates/default/');
?>
</div>
</div>
</body>
</html>
示例7: __
<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'];
示例8: get_table_day_down
$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=" . rawurlencode($rs[username]));
$files_array[] = $rs;
}
$db->free($q);
unset($rs);
$page_nav = multi($total_num, $perpage, $pg, "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";
示例9: elseif
<?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> </p></div>
<?php
require_once template_echo('circle_box_footer', $user_tpl_dir);
?>
<?php
} else {
require_once PHPDISK_ROOT . "modules/front_msg.inc.php";
}
示例10: template_echo
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 = ' <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;
示例11: gpc
#
# 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";
示例12: 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');
}
}
示例13: exit
##
# 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) {
示例14: urr
$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);
}
}
示例15: urr
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
}
?>