mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-22 18:35:35 +08:00
41 lines
1.3 KiB
PHP
41 lines
1.3 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
class desktop_ctl_createshortcuts extends base_controller{
|
||
function index(){
|
||
$furl = kernel::base_url(1).kernel::url_prefix().'/shopadmin';
|
||
$content = '[InternetShortcut]
|
||
URL='.$furl.'
|
||
IDList=[{000214A0-0000-0000-C000-000000000046}]
|
||
Prop3=19,2
|
||
';
|
||
|
||
header("Content-type: charset=utf-8");
|
||
header("Content-type: application/octet-stream");
|
||
|
||
/** 兼容各个浏览器 **/
|
||
$filename = app::get('desktop')->getConf('background.title').".url";
|
||
$encoded_filename = urlencode($filename);
|
||
$encoded_filename = str_replace("+", "%20", $encoded_filename);
|
||
|
||
if (preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']) )
|
||
{
|
||
header('Content-Disposition: attachment; filename="' . $encoded_filename . '"');
|
||
}
|
||
elseif (preg_match("/Firefox/", $_SERVER['HTTP_USER_AGENT']))
|
||
{
|
||
header('Content-Disposition: attachment; filename*="utf8' . $filename . '"');
|
||
}
|
||
else
|
||
{
|
||
header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||
}
|
||
/** end **/
|
||
|
||
echo $content;
|
||
}
|
||
}
|