mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-22 18:35:35 +08:00
46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
|
||
class desktop_ctl_certificate extends desktop_controller{
|
||
|
||
function index(){
|
||
|
||
$this->Certi = base_certificate::get('certificate_id');
|
||
$this->Token = base_certificate::get('token');
|
||
if(empty($this->Certi) ||empty($this->Token)){
|
||
$this->pagedata['license']=false;
|
||
}else{
|
||
$this->pagedata['license']=true;
|
||
}
|
||
$this->pagedata['certi_id']=$this->Certi;
|
||
$this->pagedata['debug']=false;
|
||
|
||
$this->page('certificate.html');
|
||
}
|
||
|
||
function download(){
|
||
header("Content-type:application/octet-stream;charset=utf-8");
|
||
header("Content-Type: application/force-download");
|
||
header("Cache-control: private");
|
||
$this->fileName = 'CERTIFICATE.CER';
|
||
header("Content-Disposition:filename=".$this->fileName);
|
||
|
||
$this->Certi = base_certificate::get('certificate_id');
|
||
$this->Token = base_certificate::get('token');
|
||
echo $this->Certi;
|
||
echo '|||';
|
||
echo $this->Token;
|
||
}
|
||
function delete(){
|
||
$this->begin();
|
||
base_certificate::del_certificate();
|
||
$this->end();
|
||
}
|
||
|
||
}
|
||
|