<?php
require(dirname(__FILE__) .'/check.php');
$skin->CheckIframe();


/* **** 版权所有 ****

 程序开发：网钛科技
 网钛CMS官网：http://otcms.com
 网钛IDC官网：http://idccms.com
 ＱＱ：877873666
 微信：QQ877873666
 邮箱：877873666@qq.com

 **** 版权所有 **** */



//打开用户表，并检测用户是否登录
$MB->Open(',MB_foreUsername','login');

$skin->WebTop();


echo('
<script language="javascript" type="text/javascript" src="js/inc/calc.js?v='. OT_VERSION .'"></script>
<script language="javascript" type="text/javascript" src="js/inc/list.js?v='. OT_VERSION .'"></script>
<script language="javascript" type="text/javascript" src="js/share.js?v='. OT_VERSION .'"></script>
');


switch ($mudi){
	case 'manage':
		$MB->IsSecMenuRight('alertBack',336,$dataType);
		manage();
		break;

	case 'show':
		$MB->IsSecMenuRight('alertClose',339,$dataType);
		show();
		break;

	default:
		die('err');
}

$skin->WebBottom();

$MB->Close();
$DB->Close();





function manage(){
	global $DB,$MB,$skin,$mudi,$dataType,$dataTypeCN,$pageCount,$recordCount;

	$todayDate = TimeDate::Get('date');

	$dataMode		= OT::GetStr('dataMode');
	$dataModeStr	= OT::GetStr('dataModeStr');

	$refProName		= OT::GetRegExpStr('refProName','sql');
	$refUsername	= OT::GetRegExpStr('refUsername','sql');
	$refQQ			= OT::GetRegExpStr('refQQ','sql');
	$refVpsName		= OT::GetRegExpStr('refVpsName','sql');
	$refState		= OT::GetInt('refState',-1);
	$refIpStr		= OT::GetRegExpStr('refIpStr','sql+.');
	$refAdminNote	= OT::GetRegExpStr('refAdminNote','sql');
	$refAdminName	= OT::GetRegExpStr('refAdminName','sql');
	$refDel			= OT::GetInt('refDel');
	$refMorePro		= OT::GetInt('refMorePro');
	$judOverDay		= OT::GetInt('judOverDay');
	$judLessDay		= OT::GetInt('judLessDay');
	$refMark		= OT::GetInt('refMark');
	$refNoMail		= OT::GetInt('refNoMail');
	$refNoPhone		= OT::GetInt('refNoPhone');
	$refNoWeixin	= OT::GetInt('refNoWeixin');
	$refDate1		= OT::GetStr('refDate1');
		if (! strtotime($refDate1)){ $refDate1=''; }
	$refDate2		= OT::GetStr('refDate2');
		if (! strtotime($refDate2)){ $refDate2=''; }
	$refEndDate1		= OT::GetStr('refEndDate1');
		if (strtotime($refEndDate1)==false){$refEndDate1='';}
	$refEndDate2		= OT::GetStr('refEndDate2');
		if (strtotime($refEndDate2)==false){$refEndDate2='';}
	$refVpsEndDate1		= OT::GetStr('refVpsEndDate1');
		if (strtotime($refVpsEndDate1)==false){$refVpsEndDate1='';}
	$refVpsEndDate2		= OT::GetStr('refVpsEndDate2');
		if (strtotime($refVpsEndDate2)==false){$refVpsEndDate2='';}

	$sqlFieldStr = 'VDU_ID,VDU_companyID,VDU_proType,VDU_proDataID,VDU_proDataName,VDU_userID,VDU_username,VDU_vpsName,VDU_vpsEndTime,VDU_ipStr,VDU_payMode,VDU_price,VDU_cost,VDU_time,VDU_startTime,VDU_endTime,VDU_state,VDU_adminNote,UE_realname,UE_qq,UE_ww,VDU_event,VDU_adminID,VDU_adminName';
	$SQLstr='select '. $sqlFieldStr .' from '. OT_dbPref .'vpsDelUsers as VPU left join '. OT_dbPref .'users as UE on VPU.VDU_userID=UE.UE_ID where 1=1';

	if ($refProName!=''){ $SQLstr .= " and VDU_proDataName like '%". $DB->ForStr($refProName,false) ."%'"; }
	if ($refUsername!=''){ $SQLstr .= " and VDU_username like '%". $DB->ForStr($refUsername,false) ."%'"; }
	if ($refQQ!=''){ $SQLstr .= " and (UE_realname like '%". $DB->ForStr($refQQ,false) ."%' or UE_qq like '%". $DB->ForStr($refQQ,false) ."%' or UE_ww like '%". $DB->ForStr($refQQ,false) ."%')"; }
	if ($refVpsName!=''){ $SQLstr .= " and VDU_vpsName like '%". $DB->ForStr($refVpsName,false) ."%'"; }
	if ($refState>-1){ $SQLstr .= ' and VDU_state='. $refState .''; }
	if ($refIpStr!=''){ $SQLstr .= " and VDU_ipStr like '%". $DB->ForStr($refIpStr,false) ."%'"; }
	if ($refAdminNote!=''){ $SQLstr .= " and VDU_adminNote like '%". $DB->ForStr($refAdminNote,false) ."%'"; }
	if ($refAdminName!=''){ $SQLstr .= " and VDU_adminName like '%". $DB->ForStr($refAdminName,false) ."%'"; }
	if ($refDate1!=''){ $SQLstr .= ' and VDU_time>='. $DB->ForTime($refDate1); }
	if ($refDate2!=''){ $SQLstr .= ' and VDU_time<'. $DB->ForTime(TimeDate::Add('d',1,$refDate2)); }
	if ($refEndDate1!=''){ $SQLstr .= ' and VDU_endTime>='. $DB->ForTime($refEndDate1); }
	if ($refEndDate2!=''){ $SQLstr .= ' and VDU_endTime<'. $DB->ForTime(TimeDate::Add('d',1,$refEndDate2)); }
	if ($refVpsEndDate1!=''){ $SQLstr .= ' and VDU_vpsEndTime>='. $DB->ForTime($refVpsEndDate1); }
	if ($refVpsEndDate2!=''){ $SQLstr .= ' and VDU_vpsEndTime<'. $DB->ForTime(TimeDate::Add('d',1,$refVpsEndDate2)); }
	if ($refDel == 1){ $SQLstr .= ' and (VDU_endTime<='. $DB->ForTime(TimeDate::Add('d', -8, $todayDate)) .' or VDU_state in (0,3,6,9))'; }
	if ($judOverDay == 1){
		$vpsSysArr = Cache::PhpFile('vpsSys');
		$SQLstr .= ' and to_days(VDU_endTime) - to_days(VDU_vpsEndTime) > '. $vpsSysArr['VS_overApiDay'];
	}elseif ($judLessDay == 1){
		$vpsSysArr = Cache::PhpFile('vpsSys');
		$SQLstr .= ' and to_days(VDU_vpsEndTime) - to_days(VDU_endTime) > '. $vpsSysArr['VS_lessApiDay'];
	}
	if ($refMark == 1){ $SQLstr .= ' and VDU_event like "%|mark|%"'; }
	if ($refNoMail == 1){ $SQLstr .= ' and VDU_event like "%|noMail|%"'; }
	if ($refNoPhone == 1){ $SQLstr .= ' and VDU_event like "%|noPhone|%"'; }
	if ($refNoWeixin == 1){ $SQLstr .= ' and VDU_event like "%|noWeixin|%"'; }

	$orderName = OT::ListDefVal(OT::GetStr('orderName'), 'VDU_proType|VDU_proDataName|VDU_username|VDU_vpsName|UE_realname|UE_qq|UE_ww|VDU_state|VDU_adminID|VDU_ipStr|VDU_price|VDU_endTime|VDU_time', 'VDU_ID');
	$orderSort = OT::ListDefVal(OT::GetStr('orderSort'), 'ASC', 'DESC');

	$todayDate			= TimeDate::Get('date');
	$prev1DayDate		= TimeDate::Add("d",-1,$todayDate);
	$prev3DayDate		= TimeDate::Add("d",-3,$todayDate);
	$prev7DayDate		= TimeDate::Add("d",-7,$todayDate);
	$currMonthDate		= TimeDate::Get('Y-m-1');
	$prevWeekDate		= TimeDate::Add("d",-7,$currMonthDate);
	$prevMonthDate		= TimeDate::Add("m",-1,$currMonthDate);
	$prevMonthDateEnd	= TimeDate::Add("d",-1,$currMonthDate);
	$next3DayDate		= TimeDate::Add("d",3,$todayDate);
	$nextWeekDate		= TimeDate::Add("d",7,$todayDate);
	$nextMonthDate		= TimeDate::Add("d",30,$todayDate);

	$skin->TableTop('share_refer.gif','',$dataTypeCN .'查询');
		echo('
		<form id="refForm" name="refForm" method="get" action="">
		<input type="hidden" name="mudi" value="'. $mudi .'" />
		<input type="hidden" name="dataType" value="'. $dataType .'" />
		<input type="hidden" name="dataTypeCN" value="'. $dataTypeCN .'" />

		<table width="99%" align="center" border="0" cellSpacing="0" cellPadding="0" summary="" class="padd5td">
		<tr>
			<td style="width:22%;">
				&ensp;&ensp;产品名称：<input type="text" name="refProName" size="20" value="'. $refProName .'" style="width:120px;" />
			</td>
			<td style="width:22%;">
				&ensp;&ensp;用户名：<input type="text" name="refUsername" size="20" value="'. $refUsername .'" style="width:120px;" />
			</td>
			<td style="width:28%;">
				昵称/QQ/旺旺：<input type="text" name="refQQ" size="20" value="'. $refQQ .'" style="width:120px;" />
			</td>
			<td style="width:28%;">
				&ensp;&ensp;开通日期：<input type="text" name="refDate1" size="10" value="'. $refDate1 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />&ensp;至&ensp;<input type="text" name="refDate2" size="10" value="'. $refDate2 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />
			</td>
		</tr>
		<tr>
			<td>
				&ensp;&ensp;机器编码：<input type="text" name="refVpsName" size="20" value="'. $refVpsName .'" style="width:120px;" />
			</td>
			<td>
				&ensp;&ensp;IP地址：<input type="text" name="refIpStr" size="20" value="'. $refIpStr .'" style="width:120px;" />
			</td>
			<td>
				&ensp;&ensp;&ensp;&ensp;内部备注：<input type="text" name="refAdminNote" size="20" value="'. $refAdminNote .'" style="width:120px;" />
			</td>
			<td>
				&ensp;&ensp;到期日期：<input type="text" name="refEndDate1" size="10" value="'. $refEndDate1 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />&ensp;至&ensp;<input type="text" name="refEndDate2" size="10" value="'. $refEndDate2 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />
			</td>
		</tr>
		<tr>
			<td>
				&ensp;&ensp;&ensp;&ensp;操作员：<input type="text" name="refAdminName" size="20" value="'. $refAdminName .'" style="width:120px;" />
			</td>
			<td colspan="2">
				&ensp;&ensp;&ensp;&ensp;状态：<select name="refState">
					<option value="">&ensp;</option>
					<option value="15" '. Is::Selected($refState,15) .'>续费中</option>
					<option value="12" '. Is::Selected($refState,12) .'>试用中</option>
					<option value="10" '. Is::Selected($refState,10) .'>正常</option>
					<option value="9" '. Is::Selected($refState,9) .'>已退款</option>
					<option value="6" '. Is::Selected($refState,6) .'>开通失败</option>
					<option value="5" '. Is::Selected($refState,5) .'>开通中</option>
					<option value="3" '. Is::Selected($refState,3) .'>待开通</option>
					<option value="0" '. Is::Selected($refState,0) .'>停止</option>
					</select>&ensp;&ensp;
			</td>
			<td>
				&ensp;&ensp;&ensp;API到期：<input type="text" name="refVpsEndDate1" size="10" value="'. $refVpsEndDate1 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />&ensp;至&ensp;<input type="text" name="refVpsEndDate2" size="10" value="'. $refVpsEndDate2 .'" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />
			</td>
		</tr>
		<tr>
			<td align="center" style="padding:5px;padding-top:20px" colspan="4">
				<input type="image" src="'. AdmTpl::ImgSrc('button_refer') .'" />
				&ensp;&ensp;&ensp;&ensp;
				<img src="'. AdmTpl::ImgSrc('button_reset') .'" onclick=\'document.location.href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'"\' style="cursor:pointer" alt="" />
				'. AdmIdc::MoreProInfo($refMorePro, 'vpsDel', str_replace(array($sqlFieldStr, 'VDU_','vpsDelUsers'), array('count([OT_pref]ID)','[OT_pref]','[OT_tab]'), $SQLstr)) .'

				<div style="margin-top:15px;">
					<div class="right">
						<input type="button" value="已付未续" onclick=\'document.location.href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&judOverDay=1"\' />
						<input type="button" value="未付已续" onclick=\'document.location.href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&judLessDay=1"\' />
					</div>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refDate1='. $todayDate .'&refDate2='. $todayDate .'" style="color:red;">[今日新开通]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refDate1='. $prevWeekDate .'&refDate2='. $todayDate .'" style="color:red;">[一周新开通]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refDate1='. $currMonthDate .'&refDate2='. $todayDate .'" style="color:red;">[本月新开通]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refDate1='. $prevMonthDate .'&refDate2='. $prevMonthDateEnd .'" style="color:red;">[上月新开通]</a>
					&ensp;&ensp;&ensp;
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1='. $todayDate .'&refEndDate2='. $todayDate .'" style="color:red;">[今天到期]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1='. $todayDate .'&refEndDate2='. $next3DayDate .'" style="color:red;">[三天到期]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1='. $todayDate .'&refEndDate2='. $nextWeekDate .'" style="color:red;">[一周到期]</a>
					&ensp;&ensp;&ensp;
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1='. $prev3DayDate .'&refEndDate2='. $prev1DayDate .'" style="color:red;">[过期3天]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1='. $prev7DayDate .'&refEndDate2='. $prev1DayDate .'" style="color:red;">[过期7天]</a>
					<a href="?mudi='. $mudi .'&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&refEndDate1=2016-01-01&refEndDate2='. $prev7DayDate .'" style="color:red;">[过期7天以上]</a>
				</div>
			</td>
		</tr>
		</table>
		</form>
		');

	$skin->TableBottom();

	echo('
	<form id="listForm" name="listForm" method="post" action="vpsDelUsers_deal.php?mudi=moreDel" onsubmit="return CheckListForm()">
	<script language="javascript" type="text/javascript">document.write (\'<input type="hidden" name="backURL" value="\'+ document.location.href +\'" />\')</script>
	<input type="hidden" name="dataMode" value="'. $dataMode .'" />
	<input type="hidden" name="dataModeStr" value="'. $dataModeStr .'" />
	<input type="hidden" name="dataType" value="'. $dataType .'" />
	<input type="hidden" name="dataTypeCN" value="'. $dataTypeCN .'" />
	');

	$skin->TableTop2('share_list.gif','',''. $dataTypeCN .'管理');
	$skin->TableItemTitle('3%,4%,5%,12%,9%,10%,10%,9%,11%,12%,5%,6%,4%','<input type="checkbox" id="selAll" name="selAll" onclick="CheckBoxAll()" />,序号,'. $skin->ShowArrow('类型','VDU_proType',$orderName,$orderSort) .','. $skin->ShowArrow('产品名称','VDU_proDataName',$orderName,$orderSort) .','. $skin->ShowArrow('用户名','VDU_username',$orderName,$orderSort) .'/'. $skin->ShowArrow('机器编码','VDU_vpsName',$orderName,$orderSort) .','. $skin->ShowArrow('昵称','UE_realname',$orderName,$orderSort) .'/'. $skin->ShowArrow('QQ','UE_qq',$orderName,$orderSort) .'/'. $skin->ShowArrow('旺旺','UE_ww',$orderName,$orderSort) .','. $skin->ShowArrow('已分配IP地址','VDU_ipStr',$orderName,$orderSort) .','. $skin->ShowArrow('价格','VDU_price',$orderName,$orderSort) .','. $skin->ShowArrow('开通','VDU_time',$orderName,$orderSort) .'/'. $skin->ShowArrow('到期时间','VDU_endTime',$orderName,$orderSort) .',删除/备注/API到期,'. $skin->ShowArrow('状态','VDU_state',$orderName,$orderSort) .','. $skin->ShowArrow('操作员','VDU_adminID',$orderName,$orderSort) .',详情');

	$pageSize	= $MB->mMbRow['MB_itemNum'];		//每页条数
	$page		= OT::GetInt('page');
	$showRow=$DB->GetLimit($SQLstr .' order by '. $orderName .' '. $orderSort,$pageSize,$page);
	if (! $showRow){
		$skin->TableNoData();
	}else{
		$recordCount=$DB->GetRowCount();
		$pageCount=ceil($recordCount/$pageSize);
		if ($page < 1 || $page > $pageCount){$page=1;}

		echo('
		<tbody class="tabBody padd3td">
		');
		$number=1+($page-1)*$pageSize;
		$rowCount = count($showRow);
		for ($i=0; $i<$rowCount; $i++){
			if ($i % 2 == 1){ $bgcolor='class="tabColorTr"'; }else{ $bgcolor=''; }

			$proName = $showRow[$i]['VDU_proDataName'];
			$priceStr = IdcInfo::PayMode($showRow[$i]['VDU_payMode']) .'：'. $showRow[$i]['VDU_price'];
			$endTimeStr = TimeDate::Get('date2',$showRow[$i]['VDU_endTime']) .'&ensp;<span style="color:red;">['. TimeDate::DiffDayCN($showRow[$i]['VDU_endTime']) .']</span>';

			$noteAddi = '<span style="color:'. (strtotime($showRow[$i]['VDU_endTime'])>strtotime($showRow[$i]['VDU_vpsEndTime'])?'red':'#000') .';" title="上级API到期时间：'. $showRow[$i]['VDU_vpsEndTime'] .'">API:'. TimeDate::Get('date2',$showRow[$i]['VDU_vpsEndTime']) .'&ensp;<span style="color:red;">['. TimeDate::DiffDayCN($showRow[$i]['VDU_vpsEndTime']) .']</span></span>';

			echo('
			<tr id="data'. $showRow[$i]['VDU_ID'] .'" '. $bgcolor .'>
				<td align="center" class="selCheckbox"><input type="checkbox" name="selDataID[]" value="'. $showRow[$i]['VDU_ID'] .'" /></td>
				<td align="center" title="ID:'. $showRow[$i]['VDU_ID'] .'">'. $number .'</td>
				<td align="center">'. IdcInfo::TypeCN($showRow[$i]['VDU_proType']) .'</td>
				<td align="center">'. $proName . AdmIdc::CompanyInfoImg($showRow[$i]['VDU_companyID']) .'</td>
				<td align="center"><div style="color:blue;">'. $showRow[$i]['VDU_username'] . AdmArea::UserInfoImg($showRow[$i]['VDU_userID']) .'</div>'. $showRow[$i]['VDU_vpsName'] .'</td>
				<td align="center">'. $showRow[$i]['UE_realname'] . AdmArea::UserQQ($showRow[$i]['UE_qq']) .'<div>'. AdmArea::UserWw($showRow[$i]['UE_ww']) .'</div></td>
				<td align="center" style="word-break:break-all;">'. IdcArea::IpStr($showRow[$i]['VDU_ipStr']) .'</td>
				<td align="center" title="成本：'. $showRow[$i]['VDU_cost'] .'">
					'. $priceStr .'
					<div style="color:#c9c9c9;cursor:pointer;margin-top:5px;" onclick=\'OT_OpenMoneyRecord("&refVpsName='. $showRow[$i]['VDU_vpsName'] .'&refUsername='. $showRow[$i]['VDU_username'] .'")\'>[此产品财务]</div>
				</td>
				<td align="left" style="padding-left:8px;"><div>'. TimeDate::Get('datetime2',$showRow[$i]['VDU_startTime']) .'</div>'. $endTimeStr .'</td>
				<td align="center">'. $showRow[$i]['VDU_time'] .'<div style="color:blue;">'. $showRow[$i]['VDU_adminNote'] .'</div>'. $noteAddi .'</td>
				<td align="center">'. IdcInfo::State($showRow[$i]['VDU_state']) .'</td>
				<td align="center" title="操作员ID：'. $showRow[$i]['VDU_adminID'] .'">'. $showRow[$i]['VDU_adminName'] .'</td>
				<td align="center">
					<img src="images/img_det.gif" style="cursor:pointer" onclick=\'var a=window.open("?mudi=show&nohrefStr=close&dataMode='. $dataMode .'&dataModeStr='. $dataModeStr .'&dataType='. $dataType .'&dataTypeCN='. urlencode($dataTypeCN) .'&dataID='. $showRow[$i]['VDU_ID'] .'")\' alt="" />
				</td>
			</tr>
			');
			$number ++;
		}
		echo('
		</tbody>
		<tr class="tabColorB padd5">
			<td align="left" colspan="20">
				<input type="button" value="全选" onclick="AllSelBox()" class="form_button1" />
				<input type="button" value="反选" onclick="RevSelBox()" class="form_button1" />
				&ensp;
				<input type="submit" value="批量删除" />
			</td>
		</tr>
		');
	}
	unset($showRow);

	echo('</form>');

	$skin->TableBottom2($pageCount, $pageSize, $recordCount);
}



function show(){
	global $DB,$skin,$mudi,$dataType,$dataTypeCN,$pageCount,$recordCount,$dbPathPart;

	$dataMode	= OT::GetStr('dataMode');
	$dataModeStr= OT::GetStr('dataModeStr');
	$dataType	= OT::GetStr('dataType');
	$dataTypeCN	= OT::GetStr('dataTypeCN');
	$dataID		= OT::GetInt('dataID');
	
	$showexe=$DB->query('select * from '. OT_dbPref .'vpsDelUsers where VDU_ID='. $dataID);
	if (! $row = $showexe->fetch()){ JS::AlertCloseEnd('指定ID错误'); }

	$payModeCN = IdcInfo::PayMode($row['VDU_payMode']);

	echo('
	<script language="javascript" type="text/javascript">
	document.title="'. $dataTypeCN .'（名称：'. $row['VDU_proDataName'] .'，机器编码：'. $row['VDU_vpsName'] .'）详细信息";
	</script>

	<input type="hidden" id="payModeCN" name="payModeCN" value="'. $payModeCN .'" />
	<table width="1150" align="center" cellpadding="0" cellspacing="0" border="0" summary=""><tr><td>
	');

	// 会员信息
	list($userRemMoney, $userGroupID) = AdmIdc::UserInfoTab($row['VDU_userID']);

	$skin->TableTop('share_list.gif','',''. $dataTypeCN .'详细信息');
	echo('
	<table style="width:100%" align="center" cellpadding="0" cellspacing="0" border="0" class="padd3">
	<tr>
		<td style="width:25%;"></td>
		<td style="width:25%;"></td>
		<td style="width:25%;"></td>
		<td style="width:25%;"></td>
	</tr>
	<tr>
		<td><span class="font3_2">机器类型：</span>'. IdcInfo::TypeCN($row['VDU_proType']) .'</td>
		<td><span class="font3_2">机器编码：</span>'. $row['VDU_vpsName'] .'</td>
		<td><span class="font3_2">产品名称：</span>'. $row['VDU_proDataName'] .'&ensp;（产品ID：'. $row['VDU_proDataID'] .'）</td>
		<td><span class="font3_2">用户名：</span>'. $row['VDU_username'] .'&ensp;（用户ID：'. $row['VDU_userID'] .'）</td>
		<td></td>
	</tr>
	<tr>
		<td><span class="font3_2">机器ID：</span>'. $row['VDU_proID'] .'</td>
		<td><span class="font3_2">机器用户名：</span>'. $row['VDU_vpsUser'] .'</td>
		<td><span class="font3_2">机器密码：</span>'. Encrypt::SyEnDe('de',$row['VDU_vpsPwd']) .'</td>
		<td><span class="font3_2">机器端口：</span>'. $row['VDU_vpsPort'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">IP地址：</span>'. IdcArea::IpStr($row['VDU_ipStr']) .'</td>
		<td><span class="font3_2">付款方式：</span>'. $row['VDU_payMode'] .'</td>
		<td><span class="font3_2">价格：</span>'. $row['VDU_price'] .'</td>
		<td><span class="font3_2">成本：</span>'. $row['VDU_cost'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">开通时间：</span>'. $row['VDU_time'] .'</td>
		<td><span class="font3_2">到期时间：</span>'. $row['VDU_endTime'] .'</td>
		<td><span class="font3_2">API到期：</span>'. $row['VDU_vpsEndTime'] .'</td>
		<td><span class="font3_2">续费次数：</span>'. $row['VDU_xufeiNum'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">操作系统：</span>'. $row['VDU_system'] .'</td>
		<td><span class="font3_2">订单号：</span>'. $row['VDU_orderId'] .'</td>
		<td><span class="font3_2">交易ID：</span>'. $row['VDU_workId'] .'</td>
		<td><span class="font3_2">业务标识：</span>'. $row['VDU_workSign'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">状态：</span>'. IdcInfo::State($row['VDU_state']) .'</td>
		<td><span class="font3_2">管理员备注：</span>'. $row['VDU_note'] .'</td>
		<td><span class="font3_2">用户备注：</span>'. $row['VDU_userNote'] .'</td>
		<td><span class="font3_2">内部备注：</span>'. $row['VDU_adminNote'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">上级渠道商：</span>'. $row['VDU_companyID'] .'</td>
		<td><span class="font3_2">推荐人ID：</span>'. $row['VDU_agentUserID'] .'</td>
		<td><span class="font3_2">API ID：</span>'. $row['VDU_apiID'] .'</td>
		<td><span class="font3_2">星外类服务器id：</span>'. $row['VDU_comServID'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">空间容量：</span>'. $row['VDU_spaceSize'] .'</td>
		<td><span class="font3_2">机房：</span>'. $row['VDU_room'] .'</td>
		<td><span class="font3_2">是否用户付款：</span>'. $row['VDU_isUserPay'] .'</td>
		<td><span class="font3_2">是否定制价格：</span>'. $row['VDU_isNewPrice'] .'</td>
	</tr>
	<tr>
		<td><span class="font3_2">微信时间：</span>'. $row['VDU_weixinTime'] .'</td>
		<td><span class="font3_2">操作员：</span>'. $row['VDU_adminName'] .'&ensp;（用户ID：'. $row['VDU_adminID'] .'）</td>
		<td><span class="font3_2">事件：</span>'. $row['VDU_event'] .'</td>
	</tr>
	<tr>
	</tr>
	</table>

	</td></tr></table>
	');

}
/*		$record['VDU_isNewPrice']	= $row[$tabArr['part'] .'isNewPrice'];
		$record['VDU_priceMonth']	= $row[$tabArr['part'] .'priceMonth'];
		$record['VDU_price3Month']	= $row[$tabArr['part'] .'price3Month'];
		$record['VDU_price6Month']	= $row[$tabArr['part'] .'price6Month'];
		$record['VDU_priceYear']	= $row[$tabArr['part'] .'priceYear'];
		$record['VDU_costMonth']	= $row[$tabArr['part'] .'costMonth'];
		$record['VDU_cost3Month']	= $row[$tabArr['part'] .'cost3Month'];
		$record['VDU_cost6Month']	= $row[$tabArr['part'] .'cost6Month'];
		$record['VDU_costYear']		= $row[$tabArr['part'] .'costYear'];

		$record['VDU_serverCode']	= $row[$tabArr['part'] .'serverCode'];
		$record['VDU_serverPwd']	= $row[$tabArr['part'] .'serverPwd'];  */
?>