日期:2014-05-16 浏览次数:20754 次
?<?php
defined('IN_TS') or die('Access Denied.');
$options_lic = fileRead('options.php','data','system');
$arrhttphost = explode('.',$_SERVER['HTTP_HOST']);
$site_url = str_replace('http://','',$options_lic['site_url']);
$site_url_arr = explode('/',$site_url);
if(count($arrhttphost)<4){
if(count($arrhttphost)<3){
$SERVER = $arrhttphost[0].'.'.$arrhttphost[1];
}else{
$SERVER = $arrhttphost[1].'.'.$arrhttphost[2];
}
}else{
$SERVER = $arrhttphost[0].'.'.$arrhttphost[1].'.'.$arrhttphost[2].'.'.$arrhttphost[3];
}
$loch_url=base64_encode($_SERVER['HTTP_HOST']);
//$isurlcode = application($options_lic['site_lication'],$options_lic['lic_username']);;
if($le=='do'){
$letutaocode = trim($_POST['letutaocode']);
$lic_username = trim($_POST['lic_username']);
if($letutaocode && $lic_username){
$return_data = aac("system")->license->isCode($lic_username,$letutaocode);
if($return_data!=='10001'
------解决方案--------------------
$return_data!=='10002'){
$arrData = array(
'site_lication' => $letutaocode,
'lic_username' => $lic_username,
);
foreach ($arrData as $key => $val){
$db->query("UPDATE ".dbprefix."system_options SET optionvalue='$val' where optionname='$key'");
}
$arrOptions = $db->fetch_all_assoc("select optionname,optionvalue from&n