-
Notifications
You must be signed in to change notification settings - Fork 1
/
license.php
executable file
·31 lines (31 loc) · 1.04 KB
/
license.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
if(!defined('CORE_ROOT')) exit();
require CORE_ROOT.'include/admin.inc.php';
$action = httpget('action');
if($action == '') {
$variables = array(
'domain' => $_SERVER['HTTP_HOST']
);
displaytemplate('license.htm', $variables);
} elseif($action == 'checklicense') {
if($licensesuccess === 'ad') {
aexit('2');
}
$url = 'http://www.akhtm.com/akcms_license.php?action=checklicense&key='.$_SERVER['HTTP_HOST'];
$licenseonline = readfromurl($url);
if($licenseonline == '1') {
$url = 'http://www.akhtm.com/akcms_license.php?action=download&version='.$sysedition.'&key='.$_SERVER['HTTP_HOST'];
$_tmp = readfromurl($url);
writetofile($_tmp, AK_ROOT.'configs/license.php');
}
aexit($licenseonline);
} elseif($action == 'applyad') {
writetofile('ad', AK_ROOT.'configs/license.php');
adminmsg($lan['adlicenseapplymessage'], 'index.php?file=license');
} elseif($action == 'abandonad') {
@unlink(AK_ROOT.'configs/license.php');
adminmsg($lan['adlicenseabandonmessage'], 'index.php?file=license');
}
runinfo();
aexit();
?>