<?php

if(! defined('OT_ROOT')) {
	exit('Access Denied');
}



class SysDiff{
	// 软件名称
	public static function SoftName($type=''){
		if ($type == 'full'){
			return '网钛IDC财务管理系统(idcCMS)';
		}elseif ($type == 'simple'){
			return '网钛IDC';
		}else{
			return '网钛IDC财务管理系统';
		}
	}

	// 软件名称英文名
	public static function SoftEN(){
		return 'idcCMS';
	}

	// 插件ID  IdNameArr
	public static function PluginId($str=''){
		switch ($str){
			case 'base':	return 48;		// IDC商业版基础包
			case 'money':	return 134;		// IDC财务基础包
			case 'gain':	return 132;		// IDC推广提现
			default:		return 0;
		}
	}

	// 插件名称
	public static function PluginName($str=''){
		switch ($str){
			case 'base':	return 'IDC商业版基础包';
			case 'money':	return 'IDC财务基础包';
			case 'gain':	return 'IDC推广提现';
			default:		return '['. $str .']';
		}
	}


	// 插件文件数组
	public static function PluFileArr(){
		return array(
			2	=> array('classAppRss.php'),
			4	=> array('classAppBase.php'),
			5	=> array('classAppColl.php'),
			6	=> array('classAppWap.php'),
			7	=> array('classAppLogin.php'),
			9	=> array('classAppBbs.php', 'classAppBbsDeal.php', 'classAppBbsTpl.php', 'classAppBbsTplWap.php'),
			10	=> array('classAppTaobaoke.php', 'classAppTaobaokeWap.php', 'classAppTaobaokeDeal.php'),
			12	=> array('classAppTplInfo.php'),
			13	=> array('classAppTplBlog.php'),
			14	=> array('classAppTplBlue.php'),
			15	=> array('classAppWeixin.php'),
			17	=> array('classAppMapBaidu.php'),
			18	=> array('classAppUpload.php'),
			19	=> array('classAppForm.php'),
			21	=> array('classAppTopic.php'),
			22	=> array('classAppLogoAdd.php'),
			23	=> array('classAppMoneyPay.php', 'classAppMoneyPayDeal.php', 'classAppMoneyRecord.php'),
			26	=> array('classAppUserScore.php'),
			27	=> array('classAppTaokeOrder.php'),
			28	=> array('classAppGift.php'),
			29	=> array('classAppMoneyAlipay.php'),
			31	=> array('classAppDashang.php'),
			33	=> array('classAppNewsEnc.php'),
			39	=> array('classAppVideo.php'),
			41	=> array('classAppChangyan.php'),
			42	=> array('classAppBuyOrders.php'),
			43	=> array('classAppNewsPwd.php'),
			46	=> array('classAppRecom.php'),
			47	=> array('classAppQiandao.php'),
			48	=> array('classAppBase.php'),
			49	=> array('classAppHost.php', 'classAppHostDeal.php', 'classAppHostUc.php', 'classAppHostUc2.php', 'classAppHostWap.php', 'classAppIdcHost.php'),
			52	=> array('classAppServ.php', 'classAppServDeal.php', 'classAppServWap.php', 'classAppServUc2.php'),
			53	=> array('classAppDomain.php', 'classAppDomainTpl.php', 'classAppDomainUc.php', 'classAppDomainUc2.php', 'classAppDomainWap.php', 'classAppIdcDomain.php'),
			54	=> array('classAppQuan.php'),
			55	=> array('classAppMail.php'),
			56	=> array('classAppPhone.php'),
			57	=> array('classAppGain.php'),
			58	=> array('classAppNewsGain.php'),
			59	=> array('classAppMoneyWeixin.php'),
			61	=> array('classAppDialing.php', 'classAppDialingDeal.php', 'classAppDialingUc.php', 'classAppDialingUc2.php', 'classAppDialingWap.php', 'classAppIdcDialing.php'),
			62	=> array('classAppWeixinJs.php'),
			63	=> array('classAppToTop.php'),
			64	=> array('classAppTplQiyeBlue.php'),
			65	=> array('classAppIdcPro.php'),
			66	=> array('classAppAutoHtml.php'),
			67	=> array('classAppAutoColl.php'),
			68	=> array('classAppAdminRightNews.php'),
			69	=> array('classAppSsl.php', 'classAppSslDeal.php', 'classAppSslWap.php', 'classAppSslUc2.php'),
			70	=> array('classAppTplYule.php'),
			71	=> array('classAppTplBlack.php'),
			72	=> array('classAppOssQiniu.php', 'classAppOssQiniuDeal.php'),
			73	=> array('classAppOssAliyun.php', 'classAppOssAliyunDeal.php'),
			75	=> array('classAppOssUpyun.php', 'classAppOssUpyunDeal.php'),
			76	=> array('classAppUserState1.php'),
			77	=> array('classAppUserGroup.php'),
			78	=> array('classAppUserGroupWork.php'),
			79	=> array('classAppSiteMessage.php'),
			80	=> array('classAppWorkCenter.php'),
			81	=> array('classAppTplWhite.php'),
			82	=> array('classAppWapTplWhite.php'),
			83	=> array('classAppMoneyGive.php'),
			84	=> array('classAppLoginPhone.php'),
			85	=> array('classAppLoginMail.php'),
			86	=> array('classAppOssFtp.php', 'classAppOssFtpDeal.php'),
			87	=> array('classAppCopyKouling.php'),
			89	=> array('classAppTplXiaodao.php'),
			90	=> array('classAppWapTplXiaodao.php'),
			91	=> array('classAppTplMedia.php'),
			92	=> array('classAppWapTplMedia.php'),
			97	=> array('classAppResBaidu.php'),
			98	=> array('classAppRes360.php'),
			99	=> array('classAppResSogou.php'),
			100	=> array('classAppResShenma.php'),
			101	=> array('classAppUserExport.php'),
			102	=> array('classAppFans.php'),
			104	=> array('classAppMoneyCodepay.php'),
			105	=> array('classAppDiyPay.php'),
			106	=> array('classAppMoneyF2fpay.php'),
			108	=> array('classAppChinaz.php'),
			110	=> array('classAppUserView.php'),
			111	=> array('classAppUserMark.php'),
			112	=> array('classAppInfoDown.php'),
			113	=> array('classAppReport.php'),
			115	=> array('classAppMoneyQuick.php'),
			117	=> array('classAppTag.php'),
			118	=> array('classAppSiteApi.php'),
			119	=> array('classAppIdcServ.php'),
			120	=> array('classAppNameWeixin.php'),
			121	=> array('classAppNameAlipay.php'),
			122	=> array('classAppTplDayNight.php'),
			123	=> array('classAppWapTplDayNight.php'),
			124	=> array('classApiJingan.php', 'classAppJingan.php'),
			125	=> array('classApiXingwai.php', 'classAppXingwai.php'),
			127	=> array('classAppWorkOrder.php', 'classAppWorkOrderUc2.php'),
			128	=> array('classAppAgent.php', 'classAppAgentUsers.php', 'classAppAgentUc2.php'),
			129	=> array('classAppIdcApi.php'),
			130	=> array('classAppNamePhone.php'),
			131	=> array('classAppIdcServAdream.php'),
			132	=> array('classAppGain.php', 'classAppIdcGain.php'),
			133	=> array('classAppSiteIpDomain.php'),
			134	=> array('classAppMoneyPay.php', 'classAppMoneyPayDeal.php'),
			135	=> array('classApiWest.php', 'classApiWest2.php', 'classAppWest.php'),
			137	=> array('classAppJinganDomain.php'),
			141	=> array('classAppPptp.php', 'classAppPptpDeal.php', 'classAppPptpWap.php', 'classAppIdcPptp.php', 'classApiPptp.php'),
			142	=> array('classAppAizhan.php'),
			143	=> array('classAppMoneyHpjpay.php'),
			144	=> array('classAppIdcServXingwai.php'),
			145	=> array('classAppDingding.php'),
			149	=> array('classAppMoneyEpay.php'),
			155	=> array('classAppCa.php'),
			156	=> array('classAppApiItem.php'),
			158	=> array('classAppOnePage.php'),
			160	=> array('classAppAutoApiItem.php'),
			162	=> array('classAppInfoImport.php'),
			163	=> array('classAppWeixinWork.php'),
			164	=> array('classAppUpKeepBigFile.php'),
			165	=> array('classAppAutoImg.php'),
			166	=> array('classAppResBing.php'),
			167	=> array('classAppScoreTo.php'),
			170	=> array('classAppRobot.php'),
			172	=> array('classAppGetGift.php'),
			174	=> array('classAppJieri.php'),
			175	=> array('classApiXcx.php','classAppXcx.php','classAppXcxDingyue.php','classAppXcxFamily.php','classAppXcxTixing.php','classAppXcxYaopin.php','classAppXcxStati.php'),
			176	=> array('classAppXcxBaby.php','classAppXcxBabyDeve.php','classAppXcxBabyFeed.php','classAppXcxBabyNote.php'),
			178	=> array('classAppPayCode.php'),
			179	=> array('classAppXcxAd.php'),
			180	=> array('classAppXcxLifeDay.php','classAppXcxLifeMember.php','classAppXcxLifeRecord.php'),
			//	=> array('classAppMoneyRecord.php'),	// 财务管理
			);
	}


	// 后台主菜单名称简化
	public static function AdminMenu($menuName, $newName = ''){
		if (strlen($newName) > 0){ return $newName; }
		switch ($menuName){
			case '服务器租用':		return '物理机';
			case '静态HTML管理':	return '静态页';

			case '文章管理':
			case '采集管理':
			case '会员管理':
			case '淘宝客管理':			
			case '公众号管理':			
			case '财务管理':			
			case '移动端管理':			
				return str_replace(array('管理'), '', $menuName);

			case '企业站功能':
			case '模板功能':
				return str_replace(array('功能'), '', $menuName);

			default :
				return $menuName;
				// return str_replace(array('管理'), '', $menuName);
		}
	}


	// 远程授权网址
	public static function AuthUrl($mode = 0, $sel = 0){
		$retArr = array();
		if ($mode == 1){
			$retArr[0] = 'http://otcms2.otcms.cn/';
			$retArr[1] = 'http://otcms2.oneti.cn/';
			$retArr[2] = 'http://otcms2.otcms.net/';
			$retArr[3] = 'http://check.idccms.com/';
		}elseif ($mode == 2){
			$retArr[0] = 'http://otcms2.otcms.net/';
			$retArr[1] = 'http://check.idccms.com/';
			$retArr[2] = 'http://otcms2.oneti.cn/';
			$retArr[3] = 'http://otcms2.otcms.cn/';
		}elseif ($mode == 3){
			$retArr[0] = 'http://check.idccms.com/';
			$retArr[1] = 'http://otcms2.otcms.cn/';
			$retArr[2] = 'http://otcms2.oneti.cn/';
			$retArr[3] = 'http://otcms2.otcms.net/';
		}else{
			$retArr[0] = 'http://otcms2.oneti.cn/';
			$retArr[1] = 'http://otcms2.otcms.cn/';
			$retArr[2] = 'http://otcms2.otcms.net/';
			$retArr[3] = 'http://check.idccms.com/';
		}
		
		if (OT_ceshi){
			$retArr[0] = GetUrl::CurrDir();	// 调用本地
			// $retArr[0] = 'http://1.otcms.com:8888/OTCMS_PHP_user_3.x_2019.02.08_15/';	// 调用本地
		}

		if ($sel > 0){
			return $retArr[$sel];
		}else{
			return $retArr;
		}
	}


	// 远程升级网址
	public static function UpdateUrl($sel = -1){
		if (OT_ceshi){
			return 'http://1.otcms.com:8888/OTCMS_PHP_user_7.x_2024.09.05_15/';
		}else{
			$retArr = array();
			$retArr[0] = 'http://update2.oneti.cn/';	// 主线路
			$retArr[1] = 'http://update2.otcms.cn/';	// 国内备用
			$retArr[2] = 'http://update2.otcms.net/';	// 香港备用
			$retArr[3] = 'http://update2.otcms.com/';	// 国外备用
			if ($sel >= 0){
				if ( isset($retArr[$sel]) ){
					return $retArr[$sel];
				}else{
					return $retArr[0];
				}
			}else{
				return $retArr;
			}
		}
	}

}
?>