<?php
if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}
if (!isset($_G['cache']['plugin'])) {
	loadcache('plugin');
}
$server_url = 'action=plugins&operation=config&do=' . $pluginid . '&identifier=csdn123_news&pmod=help';
require './source/plugin/csdn123_news/function_common.php';
if(!empty($_GET['update']) && $_GET['update']=='yes')
{
	$update_auth_ok = lang('plugin/csdn123_news', 'update_auth_ok');
	wwwzhiwu55com_appid(55);
	cpmsg($update_auth_ok,$server_url,"succeed");
}
if(empty($_G['cache']['plugin']['csdn123_news']['zhiwu55_appsecret']))
{

	$hzw_appid=wwwzhiwu55com_appid(55);

} else {

	$hzw_appid=wwwzhiwu55com_appid();

}
$version=$_G['setting']['plugins']['version']['csdn123_news'];
$zhiwu55com_authorization_arr=array();
if (!isset($_G['cache']['zhiwu55com_authorization'])) {
	loadcache('zhiwu55com_authorization');
}
if(!empty($_G['cache']['zhiwu55com_authorization']))
{
	$zhiwu55com_authorization_arr = $_G['cache']['zhiwu55com_authorization'];
}
$nowTime=time();
if(empty($zhiwu55com_authorization_arr['end_time']) || !is_numeric($zhiwu55com_authorization_arr['end_time']))
{
	$version=lang('plugin/csdn123_news', 'version_try').'&nbsp;&nbsp;v'.$version.'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.zhiwu55.com/authorization/buy_end_time.php?hzw_appid='.$hzw_appid.'" target="_blank" style="border:1px solid #E5511D;color:#E5511D;background:#FFE4D0;padding:6px;font-size:12px;">'.lang('plugin/csdn123_news', 'buy_auth').'</a>';

} elseif($zhiwu55com_authorization_arr['end_time']<$nowTime) {

	$version=lang('plugin/csdn123_news', 'version_try').'&nbsp;&nbsp;v'.$version;
	$addLongTime='&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.zhiwu55.com/authorization/buy_end_time.php?hzw_appid='.$hzw_appid.'" target="_blank" style="border:1px solid #E5511D;color:#E5511D;background:#FFE4D0;padding:4px;font-size:12px;">'.lang('plugin/csdn123_news', 'buy_long_time2').'</a>';

} else {

	$version='<span style="color:red;font-weight:bold;">'.lang('plugin/csdn123_news', 'version_realse').'&nbsp;&nbsp;v'.$version.'</span>';
	$addLongTime='&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.zhiwu55.com/authorization/buy_end_time.php?hzw_appid='.$hzw_appid.'" target="_blank" style="border:1px solid #E5511D;color:#E5511D;background:#FFE4D0;padding:4px;font-size:12px;">'.lang('plugin/csdn123_news', 'buy_long_time').'</a>';

}
if(empty($_G['cache']['plugin']['csdn123_news']['zhiwu55_appsecret']))
{
	$zhiwu55_appsecret=$zhiwu55com_authorization_arr['hzw_appsecret'];
} else {
	$zhiwu55_appsecret=$_G['cache']['plugin']['csdn123_news']['zhiwu55_appsecret'];
}
include template('csdn123_news:help');