日期:2014-05-16 浏览次数:20807 次
?<?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 ".dbprefix."system_options");
foreach($arrOptions as $item){
$arrOption[$item['optionname']] = $item['optionvalue'];
}
fileWrite('system_options.php','data',$arrOption);
qiMsg("Gope.Cn提示恭喜您,授权成功:www.Gope.cn^_^",'<a href="index.php?app=system&ac=login">进入后台</a>');
}else{
qiMsg(