xxb/module/setting/ext/control/downloadxxd.php
2023-10-23 15:51:36 +08:00

28 lines
710 B
PHP
Executable File

<?php
class setting extends control
{
/**
* Download xxd.
*
* @param string $type
* @param string $os
* @access public
* @return void
*/
public function downloadXXD($type = '', $os = '')
{
if(in_array($type, array('config', 'package')))
{
$server = $this->loadModel('im')->getServer();
if(strpos($server, '127.0.0.1') !== false) die(js::alert($this->lang->im->xxdServerError));
$setting = $this->config->xuanxuan;
$setting->os = $os;
$result = $this->im->downloadXXD($setting, $type);
return $this->send($result);
}
die("Params error.");
}
}