有個(gè)別同學(xué)會(huì)需要怎么在下載附件的時(shí)候 跳轉(zhuǎn)到確認(rèn)頁,小秋今天抽空修改下內(nèi)置源碼。并將方法做了分享和記錄,當(dāng)然是否更新到版本當(dāng)中,取決于需求量,由于目前只是個(gè)人需求,暫時(shí)不做考慮嵌入在內(nèi)置里面(所以只是粗粗的寫下代碼,請(qǐng)老師勿見笑),有需要的朋友自行修改。
PS:開啟前端點(diǎn)擊下載后,可跳轉(zhuǎn)確認(rèn)頁再下載的目的功能。
其二 增加后臺(tái)開關(guān),實(shí)現(xiàn)如果不需要關(guān)閉即可,前端點(diǎn)擊下載按鈕則恢復(fù)系統(tǒng)直接下載模式無需再進(jìn)確認(rèn)頁!
開關(guān)控制在:功能地圖-頻道模型-下載模型-點(diǎn)編輯里面
效果圖:

首先打開:\application\home\controller\View.php
找到488行上面這段:【 public function downfile() 函數(shù)里】
if ($users['level_value'] < $file_level['level_value']) {
$msg = '文件為【' . $file_level['level_name'] . '】可下載,您當(dāng)前為【' . $users['level_name'] . '】,請(qǐng)先升級(jí)!';
$this->error($msg, null, ['url' => url('user/Level/level_centre')]);
exit;
}
/*--end*/
}
}
}
在下面添加以下代碼:
if (!empty($channelData['is_download_cofirm'])){
// 下載次數(shù)限制
!empty($result['arc_level_id']) && $this->down_num_access($result['aid']);
//判斷外部鏈接的拓展名是否是圖片或者txt
if (is_http_url($result['file_url'])){
$url_arr = explode('.',$result['file_url']);
$count = count($url_arr);
$ext = $url_arr[$count - 1];
$image_ext_arr = explode(',', config('global.image_ext'));
$image_ext_arr = array_merge($image_ext_arr, ['txt']);
if (in_array($ext, $image_ext_arr)){
//保存到本地
$result['file_url'] = remote_file_to_local($result['file_url']);
$result['is_remote'] = 0;
$result['remote_to_local'] = 1;
}
}
// 記錄下載次數(shù)
$this->download_log($result['file_id'], $result['aid']);
$uhash_mch = mchStrCode($uhash);
// 跳轉(zhuǎn)到確認(rèn)頁面
$confirm_url = url('home/View/download_confirm', ['file_id' => $file_id, 'uhash' => $uhash_mch]);
if (IS_AJAX) {
$this->success('請(qǐng)確認(rèn)下載……', $confirm_url);
} else {
$this->redirect($confirm_url);
exit;
}
}else{
繼續(xù)找到 :
/**
* 本地附件下載
*/
public function download_file()
上面添加一個(gè)
}
符號(hào)即可 【public function downfile()函數(shù)的結(jié)尾】。
完整的public function downfile()代碼如下:
/**
* 下載文件
*/
public function downfile()
{
$file_id = input('param.id/d', 0);
$uhash = input('param.uhash/s', '');
if (empty($file_id) || empty($uhash)) {
$this->error('下載地址出錯(cuò)!');
exit;
}
clearstatcache();
// 查詢信息
$map = array(
'a.file_id' => $file_id,
'a.uhash' => $uhash,
);
$result = Db::name('download_file')
->alias('a')
->field('a.*,b.arc_level_id,b.restric_type,b.users_price,b.no_vip_pay')
->join('__ARCHIVES__ b', 'a.aid = b.aid', 'LEFT')
->where($map)
->find();
$file_url_gbk = iconv("utf-8", "gb2312//IGNORE", $result['file_url']);
$file_url_gbk = preg_replace('#^(/[/\w\-]+)?(/public/upload/soft/|/uploads/soft/)#i', '$2', $file_url_gbk);
if (empty($result) || (!is_http_url($result['file_url']) && !file_exists('.' . $file_url_gbk))) {
$this->error('下載文件不存在!');
exit;
}
//安裝下載模型付費(fèi)插件 走新邏輯 大黃
$channelData = Db::name('channeltype')->where(['nid'=>'download','status'=>1])->value('data');
if (!empty($channelData)) $channelData = json_decode($channelData,true);
if (!empty($channelData['is_download_pay'])){
if ($result['restric_type'] > 0) {
$UsersData = session('users');
if (empty($UsersData['users_id'])) {
$this->error('請(qǐng)登錄后下載!', null, ['is_login' => 0, 'url' => url('user/Users/login')]);
exit;
}
}
if ($result['restric_type'] == 1) {// 付費(fèi)
$order = Db::name('download_order')->where(['users_id' => $UsersData['users_id'], 'order_status' => 1, 'product_id' => $result['aid']])->find();
if (empty($order)) {
$msg = '文件購(gòu)買后可下載,請(qǐng)先購(gòu)買!';
$this->error($msg, null, ['url' => url('user/Download/buy'), 'need_buy' => 1, 'aid' => $result['aid']]);
exit;
}
} elseif ($result['restric_type'] == 2) {//會(huì)員專享
// 查詢會(huì)員信息
$users = Db::name('users')
->alias('a')
->field('a.users_id,b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.level = b.level_id', 'LEFT')
->where(['a.users_id' => $UsersData['users_id']])
->find();
// 查詢下載所需等級(jí)值
$file_level = Db::name('archives')
->alias('a')
->field('b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.arc_level_id = b.level_id', 'LEFT')
->where(['a.aid' => $result['aid']])
->find();
if ($users['level_value'] < $file_level['level_value']) {//未達(dá)到會(huì)員級(jí)別
if ($result['no_vip_pay'] == 1){ //會(huì)員專享 開啟 非會(huì)員付費(fèi)下載
$order = Db::name('download_order')->where(['users_id' => $UsersData['users_id'], 'order_status' => 1, 'product_id' => $result['aid']])->find();
if (empty($order)) {
$msg = '文件為【' . $file_level['level_name'] . '】免費(fèi)下載,您當(dāng)前為【' . $users['level_name'] . '】,可付費(fèi)購(gòu)買!';
$this->error($msg, null, ['url' => url('user/Download/buy'), 'need_buy' => 1, 'aid' => $result['aid']]);
exit;
}
}else{
$msg = '文件為【' . $file_level['level_name'] . '】可下載,您當(dāng)前為【' . $users['level_name'] . '】,請(qǐng)先升級(jí)!';
$this->error($msg, null, ['url' => url('user/Level/level_centre')]);
exit;
}
}
} elseif ($result['restric_type'] == 3) {//會(huì)員付費(fèi)
// 查詢會(huì)員信息
$users = Db::name('users')
->alias('a')
->field('a.users_id,b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.level = b.level_id', 'LEFT')
->where(['a.users_id' => $UsersData['users_id']])
->find();
// 查詢下載所需等級(jí)值
$file_level = Db::name('archives')
->alias('a')
->field('b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.arc_level_id = b.level_id', 'LEFT')
->where(['a.aid' => $result['aid']])
->find();
if ($users['level_value'] < $file_level['level_value']) {
$msg = '文件為【' . $file_level['level_name'] . '】購(gòu)買可下載,您當(dāng)前為【' . $users['level_name'] . '】,請(qǐng)先升級(jí)后購(gòu)買!';
$this->error($msg, null, ['url' => url('user/Level/level_centre')]);
exit;
}
$order = Db::name('download_order')->where(['users_id' => $UsersData['users_id'], 'order_status' => 1, 'product_id' => $result['aid']])->find();
if (empty($order)) {
$msg = '文件為【' . $file_level['level_name'] . '】購(gòu)買可下載,您當(dāng)前為【' . $users['level_name'] . '】,請(qǐng)先購(gòu)買!';
$this->error($msg, null, ['url' => url('user/Level/level_centre'), 'need_buy' => 1, 'aid' => $result['aid']]);
exit;
}
}
}else{
// 判斷會(huì)員信息
if (0 < intval($result['arc_level_id'])) {
//走下載模型會(huì)員限制下載舊版邏輯
$UsersData = session('users');
if (empty($UsersData['users_id'])) {
$this->error('請(qǐng)登錄后下載!', null, ['is_login' => 0, 'url' => url('user/Users/login')]);
exit;
} else {
/*判斷會(huì)員是否可下載該文件--2019-06-21 陳風(fēng)任添加*/
// 查詢會(huì)員信息
$users = Db::name('users')
->alias('a')
->field('a.users_id,b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.level = b.level_id', 'LEFT')
->where(['a.users_id' => $UsersData['users_id']])
->find();
// 查詢下載所需等級(jí)值
$file_level = Db::name('archives')
->alias('a')
->field('b.level_value,b.level_name')
->join('__USERS_LEVEL__ b', 'a.arc_level_id = b.level_id', 'LEFT')
->where(['a.aid' => $result['aid']])
->find();
if ($users['level_value'] < $file_level['level_value']) {
$msg = '文件為【' . $file_level['level_name'] . '】可下載,您當(dāng)前為【' . $users['level_name'] . '】,請(qǐng)先升級(jí)!';
$this->error($msg, null, ['url' => url('user/Level/level_centre')]);
exit;
}
/*--end*/
}
}
}
if (!empty($channelData['is_download_cofirm'])){
// 下載次數(shù)限制
!empty($result['arc_level_id']) && $this->down_num_access($result['aid']);
//判斷外部鏈接的拓展名是否是圖片或者txt
if (is_http_url($result['file_url'])){
$url_arr = explode('.',$result['file_url']);
$count = count($url_arr);
$ext = $url_arr[$count - 1];
$image_ext_arr = explode(',', config('global.image_ext'));
$image_ext_arr = array_merge($image_ext_arr, ['txt']);
if (in_array($ext, $image_ext_arr)){
//保存到本地
$result['file_url'] = remote_file_to_local($result['file_url']);
$result['is_remote'] = 0;
$result['remote_to_local'] = 1;
}
}
// 記錄下載次數(shù)
$this->download_log($result['file_id'], $result['aid']);
$uhash_mch = mchStrCode($uhash);
// 跳轉(zhuǎn)到確認(rèn)頁面
$confirm_url = url('home/View/download_confirm', ['file_id' => $file_id, 'uhash' => $uhash_mch]);
if (IS_AJAX) {
$this->success('請(qǐng)確認(rèn)下載……', $confirm_url);
} else {
$this->redirect($confirm_url);
exit;
}
}else{
// 下載次數(shù)限制
!empty($result['arc_level_id']) && $this->down_num_access($result['aid']);
//判斷外部鏈接的拓展名是否是圖片或者txt
if (is_http_url($result['file_url'])){
$url_arr = explode('.',$result['file_url']);
$count = count($url_arr);
$ext = $url_arr[$count - 1];
$image_ext_arr = explode(',', config('global.image_ext'));
$image_ext_arr = array_merge($image_ext_arr, ['txt']);
if (in_array($ext, $image_ext_arr)){
//保存到本地
$result['file_url'] = remote_file_to_local($result['file_url']);
$result['is_remote'] = 0;
$result['remote_to_local'] = 1;
}
}
// 外部下載鏈接
if (is_http_url($result['file_url']) || !empty($result['is_remote'])) {
if ($result['uhash'] != md5($result['file_url'])) {
$this->error('下載地址出錯(cuò)!');
}
// 記錄下載次數(shù)(限制會(huì)員級(jí)別下載的文件才記錄下載次數(shù))
// if (0 < intval($result['arc_level_id'])) {
// $this->download_log($result['file_id'], $result['aid']);
// }
//20220816修改為不限級(jí)別都更新次數(shù)
$this->download_log($result['file_id'], $result['aid']);
$result['file_url'] = htmlspecialchars_decode($result['file_url']);
$result['file_url'] = handle_subdir_pic($result['file_url'], 'soft');
if (IS_AJAX) {
$this->success('正在跳轉(zhuǎn)中……', $result['file_url'], $result);
} else {
$this->redirect($result['file_url']);
exit;
}
}
// 本站鏈接
else
{
//如果是遠(yuǎn)程轉(zhuǎn)換到本地的不做這個(gè)判斷
if (md5_file('.' . $file_url_gbk) != $result['md5file'] && empty($result['remote_to_local'])) {
$this->error('下載文件包已損壞!');
}
// 記錄下載次數(shù)(限制會(huì)員級(jí)別下載的文件才記錄下載次數(shù))
// if (0 < intval($result['arc_level_id'])) {
// $this->download_log($result['file_id'], $result['aid']);
// }
// 記錄下載次數(shù)
$this->download_log($result['file_id'], $result['aid']);
$uhash_mch = mchStrCode($uhash);
$url = $this->root_dir . "/index.php?m=home&c=View&a=download_file&file_id={$file_id}&uhash={$uhash_mch}";
cookie($file_id.$uhash_mch, 1);
if (IS_AJAX) {
$this->success('開始下載中……', $url);
} else {
$url = $this->request->domain() . $url;
$this->redirect($url);
exit;
}
}
}
}
第二步:
繼續(xù)找到:
/**
* 本地附件下載
*/
public function download_file()
這代碼上面添加以下代碼:
/**
* 確認(rèn)下載頁面
*/
public function download_confirm()
{
$file_id = input('param.file_id/d', 0);
$uhash_mch = input('param.uhash/s', '');
if (empty($file_id) || empty($uhash_mch)) {
$this->error('下載地址出錯(cuò)!');
exit;
}
// 查詢文件信息
$result = Db::name('download_file')
->alias('a')
->field('a.*,b.arc_level_id,b.restric_type,b.users_price,b.no_vip_pay')
->join('__ARCHIVES__ b', 'a.aid = b.aid', 'LEFT')
->where(['a.file_id' => $file_id, 'a.uhash' => mchStrCode($uhash_mch, 'DECODE')])
->find();
if (empty($result)) {
$this->error('下載文件不存在!');
exit;
}
// 顯示確認(rèn)頁面
$this->assign('file_info', $result);
return $this->fetch('system/download_confirm');
}
/**
* 執(zhí)行下載
*/
public function do_download()
{
// 獲取文件 ID 和哈希值
$file_id = input('param.file_id/d', 0);
$uhash_mch = input('param.uhash/s', '');
// 檢查文件 ID 和哈希值是否為空
if (empty($file_id) || empty($uhash_mch)) {
$this->error('下載地址出錯(cuò)!');
exit;
}
// 查詢文件信息
$result = Db::name('download_file')
->alias('a')
->field('a.*,b.arc_level_id,b.restric_type,b.users_price,b.no_vip_pay')
->join('__ARCHIVES__ b', 'a.aid = b.aid', 'LEFT')
->where(['a.file_id' => $file_id, 'a.uhash' => mchStrCode($uhash_mch, 'DECODE')])
->find();
// 檢查查詢結(jié)果是否為空
if (empty($result)) {
$this->error('下載文件不存在!');
exit;
}
// 將文件 URL 轉(zhuǎn)換為 GB2312 編碼并處理路徑
$file_url_gbk = iconv("utf-8", "gb2312//IGNORE", $result['file_url']);
$file_url_gbk = preg_replace('#^(/[/\w\-]+)?(/public/upload/soft/|/uploads/soft/)#i', '$2', $file_url_gbk);
// 處理外部下載鏈接
if (is_http_url($result['file_url']) || !empty($result['is_remote'])) {
// 檢查哈希值是否匹配
if ($result['uhash'] != md5($result['file_url'])) {
$this->error('下載地址出錯(cuò)!');
exit;
}
// 記錄下載次數(shù)
$this->download_log($result['file_id'], $result['aid']);
// 解碼并處理文件 URL
$result['file_url'] = htmlspecialchars_decode($result['file_url']);
$result['file_url'] = handle_subdir_pic($result['file_url'], 'soft');
// 根據(jù)請(qǐng)求類型進(jìn)行處理
if (IS_AJAX) {
$this->success('正在跳轉(zhuǎn)中……', $result['file_url'], $result);
} else {
$this->redirect($result['file_url']);
exit;
}
}
// 處理本站鏈接
else {
// 檢查文件是否損壞(非遠(yuǎn)程轉(zhuǎn)換到本地的情況)
if (md5_file('.' . $file_url_gbk) != $result['md5file'] && empty($result['remote_to_local'])) {
$this->error('下載文件包已損壞!');
exit;
}
// 記錄下載次數(shù)
$this->download_log($result['file_id'], $result['aid']);
// 生成下載鏈接
$url = $this->root_dir . "/index.php?m=home&c=View&a=download_file&file_id={$file_id}&uhash={$uhash_mch}";
// 設(shè)置 cookie
cookie($file_id.$uhash_mch, 1);
// 根據(jù)請(qǐng)求類型進(jìn)行處理
if (IS_AJAX) {
$this->success('開始下載中……', $url);
} else {
$url = $this->request->domain() . $url;
$this->redirect($url);
exit;
}
}
}
本頁P(yáng)HP完成
第三步:
打開\application\admin\controller
Channeltype.php文件;
找到以下代碼:
if ($post['nid'] == 'download'){
Db::name('arctype')->where([
'channeltype' => $post['id'],
])->update([
'is_release' => !empty($post['is_release']) ? $post['is_release'] : 0,
'update_time' => getTime(),
]);
if (!empty($post['data']['is_download_pay'])){
//開啟下載付費(fèi)兼容舊數(shù)據(jù) 舊數(shù)據(jù)開始了會(huì)員限制的restric_type改為2
Db::name('archives')->where(['channel'=>$post['id'],'restric_type'=>0])->where('arc_level_id','>',0)->update(['restric_type'=>2,'update_time'=>getTime()]);
}
大概在284行左右。
在下面添加以下代碼:
// 設(shè)置下載確認(rèn)相關(guān)的配置參數(shù)
if (isset($post['is_download_cofirm'])) {
$paramData = [
'is_download_cofirm' => intval($post['is_download_cofirm'])
];
tpSetting('download_cofirm', $paramData);
}
再次打開:\application\admin\template\channeltype
edit.htm文件:
找到:
{eq name="$field.nid" value="download"}
<dl class="row">
<dt class="tit">
<label>開啟下載付費(fèi)</label>
</dt>
<dd class="opt">
<label class="curpoin"><input id="is_download_pay1" name="data[is_download_pay]" value="1" type="radio" on-click="article_pay(this,'download');" {if condition="!empty($field.data.is_download_pay)"} checked="checked"{/if}>是</label>
<label class="curpoin"><input id="is_download_pay0" name="data[is_download_pay]" value="0" type="radio" on-click="article_pay(this,'download');" {if condition="empty($field.data.is_download_pay)"} checked="checked"{/if}>否</label>
<a href="javascript:void(0);" class="{if condition='empty($field.data.is_download_pay)'}none{/if}" id="a_downloadpay" on-click="click_to_eyou_1575506523('http://m.u-renovate.com/plus/view.php?aid=28561&origin_eycms=1','downloadpay 下載模型付費(fèi)標(biāo)簽')" style="font-size: 12px;padding-top: 3px;position: absolute;margin-left: 10px;">標(biāo)簽教程</a>
<p class="notic"></p>
</dd>
</dl>
{/eq}
大概186行:
添加以下代碼:
{eq name="$field.nid" value="download"}
<dl class="row">
<dt class="tit">
<label>開啟下載確認(rèn)頁</label>
</dt>
<dd class="opt">
<label class="curpoin"><input id="is_download_cofirm1" name="data[is_download_cofirm]" value="1" type="radio" on-click="download_cofirm(this,'download');" {if condition="!empty($field.data.is_download_cofirm)"} checked="checked"{/if}>是</label>
<label class="curpoin"><input id="is_download_cofirm0" name="data[is_download_cofirm]" value="0" type="radio" on-click="download_cofirm(this,'download');" {if condition="empty($field.data.is_download_cofirm)"} checked="checked"{/if}>否</label>
<p class="notic"></p>
</dd>
</dl>
{/eq}
繼續(xù)查找 JS部分
找到下面代碼
<script type="text/javascript">
function article_pay(obj,nid)
{
var value = $(obj).val();
if (1 == value) {
$('#a_'+nid+'pay').removeClass('none');
if ('article' == nid) {
var php_servicemeal = {$php_servicemeal|default=0};
var system_is_article_pay = {$system_is_article_pay|default=0};
if (php_servicemeal < 2 && system_is_article_pay == 0) {
$('input[name="data[is_article_pay]"]').eq(1).prop('checked', true);
var alert1 = layer.alert('付'+'費(fèi)'+'功'+'能'+'只'+'限'+'于'+'專'+'業(yè)'+'授'+'權(quán)'+'域'+'名'+'!', {
icon: 4,
shade: layer_shade,
title:false,
btn: ['購(gòu)買授權(quán)']
}, function(){
window.open('http://m.u-renovate.com/buy');
layer.close(alert1);
});
return false;
}
var a = '<a href="javascript:void(0);" on-click="openPage(this);" data-url="http://m.u-renovate.com/index.php?m=home&c=View&a=index&aid=11810&origin_eycms=1" data-title="articlepay 文章模型付費(fèi)閱讀標(biāo)簽">標(biāo)簽教程</a>';
layer.alert('開啟文章付費(fèi)需添加相關(guān)標(biāo)簽,請(qǐng)查看'+ a +'修改', {
shade: layer_shade,
move: false,
title: '提示',
btnAlign:'r',
closeBtn: 3,
success: function () {
$(".layui-layer-content").css('text-align', 'left');
}
});
} else if ('download' == nid) {
var a = '<a href="javascript:void(0);" on-click="openPage(this);" data-url="http://m.u-renovate.com/index.php?m=home&c=View&a=index&aid=28561&origin_eycms=1" data-title="downloadpay 下載模型付費(fèi)標(biāo)簽">標(biāo)簽教程</a>';
layer.alert('開啟下載付費(fèi)需添加相關(guān)標(biāo)簽,請(qǐng)查看'+ a +'修改', {
shade: layer_shade,
move: false,
title: '提示',
btnAlign:'r',
closeBtn: 3,
success: function () {
$(".layui-layer-content").css('text-align', 'left');
}
});
}
} else {
$('#a_'+nid+'pay').addClass('none');
}
}
下面添加以下代碼:
function download_cofirm(obj, nid) {
var value = $(obj).val();
if (1 == value) {
$('#a_' + nid + 'cofirm').removeClass('none');
if ('download' == nid) {
}
} else {
$('#a_' + nid + 'cofirm').addClass('none');
}
}
做到這里核心部分就已經(jīng)完成。
剩下的是模板文件和代碼添加:
新建download_confirm.htm模板文件 放在:\template\pc\system目錄里面
代碼如下:
<style>
.downlf {
width: 400px; /* 假設(shè)寬度為 400px,你可以根據(jù)實(shí)際情況調(diào)整 */
margin: 0 auto; /* 上下 margin 為 0,左右 margin 為 auto 實(shí)現(xiàn)水平居中 */
}
</style>
<div class="downlf">
<h1>確認(rèn)下載</h1>
<p>文件名稱:{$file_info.file_name}</p>
<p>文件大?。簕$file_info.file_size}</p>
<p>文件描述:{$file_info.file_des}</p>
<form action="{:url('home/View/do_download')}" method="post">
<input type="hidden" name="file_id" value="{$file_info.file_id}">
<input type="hidden" name="uhash" value="{:input('param.uhash/s')}">
<button type="submit">確認(rèn)下載</button>
</form>
樣式這里將不在介紹 自己套用自己現(xiàn)有的模板即可!
舉例:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{$eyou.field.seo_title}</title>
<meta name="keywords" content="{$eyou.field.seo_keywords}" />
<meta name="description" content="{$eyou.field.seo_description}" />
<link href="{eyou:global name='web_ico' /}" rel="shortcut icon" type="image/x-icon" />
{eyou:static file="skin/style/pintuer.css" /}
{eyou:static file="skin/style/header.css" /}
{eyou:static file="skin/style/style.css" /}
{eyou:static file="skin/style/iconfont.css" /}
<!--[if lt IE 9]>{eyou:static file="skin/js/respond.js" /} <![endif]-->
</head>
<body>
<!--公用頭部 begin -->
{eyou:include file="header.htm" /}
<div class="layout bg-gray">
<div class="container">
<div class="line">
<div class="nav-bread">
<i class="iconfont icon-home margin-small-right" aria-hidden="true"></i>{eyou:position/}
</div>
</div>
</div>
<div class="blank"></div>
<div class="container">
<style>
.downlf {
width: 400px; /* 假設(shè)寬度為 400px,你可以根據(jù)實(shí)際情況調(diào)整 */
margin: 0 auto; /* 上下 margin 為 0,左右 margin 為 auto 實(shí)現(xiàn)水平居中 */
}
</style>
<div class="downlf">
<h1>確認(rèn)下載</h1>
<p>文件名稱:{$file_info.file_name}</p>
<p>文件大?。簕$file_info.file_size}</p>
<p>文件描述:{$file_info.file_des}</p>
<form action="{:url('home/View/do_download')}" method="post">
<input type="hidden" name="file_id" value="{$file_info.file_id}">
<input type="hidden" name="uhash" value="{:input('param.uhash/s')}">
<button type="submit">確認(rèn)下載</button>
</form>
<!-- 分頁 end -->
</div>
<div class="blank-large"></div>
</div>
<!--網(wǎng)站公用底部 begin -->
{eyou:include file="footer.htm" /}
<!--網(wǎng)站公用底部 end -->
{eyou:static file="skin/js/pintuer.js" /}
{eyou:static file="skin/js/common.js" /}
</body>
</html>
標(biāo)簽說明:
與下載標(biāo)簽字典一樣,只不過標(biāo)簽ID頭要以:file_info 為準(zhǔn)【ID="file_info】"。
例子:文件名稱:{$file_info.file_name} 【非field】
