<?php defined('IN_HS') or exit('Access Denied'); ?>
<?php include template('member','header'); ?>

<script language="javascript">
<?php
sajax_show_javascript();
?>
function changeone(){
 document.getElementById("Gamelist").disabled=false;
 //document.getElementById("subok").disabled=true;
 document.getElementById("change").innerHTML = "";
 document.getElementById("fsos").innerHTML = "请先选择游戏分区";
 document.getElementById("fsoinfo").style.display="none";
}
function changeone1(){
 document.getElementById("Gamelist1").disabled=false;
 //document.getElementById("subok").disabled=true;
 document.getElementById("change1").innerHTML = "";
 document.getElementById("fsos1").innerHTML = "请选择转入分区";
 document.getElementById("fsoinfo").style.display="none";
}

function checkserv(thisid) {
  x_checkserv(thisid,checkserv_cb);
  function checkserv_cb(z) {
  if (z=="true"){
  document.getElementById("message").style.display="block"
  document.getElementById("message").innerHTML = "<span class=font06 style='color:green;font-weight:bold'>转出分区连接成功，请选择转入角色</span>";
  document.getElementById("Gamelist").disabled=true;
  document.getElementById("change").innerHTML = "<a href='javascript:void(0);' onclick='changeone()'>重新选择</a>";
  listfso();
  }else{
  document.getElementById("message").style.display="block"
  document.getElementById("message").innerHTML = z;
  }
}
}
function checkserv1() {
  var idserver=document.getElementById("Gamelist1").value;
  var idfso = document.getElementById("idfso").value; 
  x_checkserv1(idserver,idfso,checkserv1_cb);
  function checkserv1_cb(z) {
  if (z=="true"){
  document.getElementById("message").style.display="block"
  document.getElementById("message").innerHTML = "<span class=font06 style='color:green;font-weight:bold'>转入分区连接成功，请选择将要覆盖的角色！请谨慎选择，此操作不可逆！</span>";
  document.getElementById("Gamelist1").disabled=true;
  document.getElementById("change1").innerHTML = "<a href='javascript:void(1);' onclick='changeone1()'>重新选择</a>";
  listfso1();
  }else{
  document.getElementById("message").style.display="block"
  document.getElementById("message").innerHTML = z;
  }
}
}
function listfso(){
var serverid = document.getElementById("Gamelist").value;
x_listfso(serverid,listfso_cb);

function listfso_cb(z) {
document.getElementById("fsos").innerHTML = z;
}
}

function listfso1(){
var serverid1 = document.getElementById("Gamelist1").value;
x_listfso1(serverid1,listfso1_cb);

function listfso1_cb(z) {
document.getElementById("fsos1").innerHTML = z;
}
}
function doView(value){
var idserver = document.getElementById("Gamelist").value;
x_doView(idserver,value,doView_cb);

function doView_cb(z) {
document.getElementById("fsoinfo").innerHTML = z;
document.getElementById("fsoinfo").style.display="block";
}
}

function doView1(value){
var idserver1 = document.getElementById("Gamelist1").value;
x_doView1(idserver1,value,doView1_cb);

function doView1_cb(z) {
document.getElementById("fsoinfo1").innerHTML = z;
document.getElementById("fsoinfo1").style.display="block";
}
}



function doSub(){
var idserver = document.getElementById("Gamelist").value;
var idfso = document.getElementById("idfso").value;
var idserver1 = document.getElementById("Gamelist1").value;
var idfso1 = document.getElementById("idfso1").value;

x_doSub(idserver,idfso,idserver1,idfso1,doSub_cb);

function doSub_cb(z) {
  if (z =="true"){   
//window.location.href="?mod=<?=$mod?>&file=mfso&idserver=<?=$idserver?>&idx=<?=id?>&action=editacc";
//window.location.href='"??mod="+mod+"&file="+id+"'	;

    

window.location.href="/game/mfsosave.php?mod=<?=$mod?>&idserver="+idserver+"&idfso="+idfso+"&idserver1="+idserver1+"&idfso1="+idfso1+"&action=visa";

//OpenDiv();
document.getElementById("idserver").value=id;
//?UN="+document.getElementById("idserver").value+"&SID="+id+"'
//document.getElementById("fsoinfo1").value=fsoinfo1;
  }else{
document.getElementById("message").innerHTML = z;
}





}
}
//-->
</script>

<DIV class=main>
<DIV class=main>

<?php include template('game','left'); ?>

<DIV class="ad_rbarB boxC">
<DIV class=columnC><SPAN class="l_tit f_l">角色转移(自助合区)</SPAN></DIV>
<DIV class=mainboxD>
<div class="tipsboxC" id="message" style="display:none"></div>
<TABLE class=regform cellSpacing=0 cellPadding=0 width="80%" align=center border=0>
  <TBODY>
  <TR>
    <TH style="font-weight:bold;font-size:14px">转出分区：</TH>
    <TD colSpan=2>
<select id="Gamelist" onchange="checkserv(this.value)">
<option>-- 选择转出服务器 --</option>

<?php if(is_array($gamelists)) foreach($gamelists AS $k => $games) { ?>
<option value="<?php echo $games['id'];?>">-- <?php echo $games['servername'];?> --</option>

<?php } ?>

</select> 
<span id=change></span>
<TR>
    <TH style="font-weight:bold;font-size:14px;">转出角色： </TH>
    <TD colSpan=2 id=fsos style="color:#ccc;font-size:14px;font-weight:bold">请先选择转出角色</TD></TR>
 </TD></TR>

<TR><TH colspan="3" height="15px";></TH><TR>

<TR>
<TH style="font-weight:bold;font-size:14px;color:#FF0000">转入分区： </TH>

    <TD colSpan=2  >
<select id="Gamelist1" onchange="checkserv1(this.value)">
<option>-- 选择转入服务器 --</option>

<?php if(is_array($gamelists)) foreach($gamelists AS $k => $games) { ?>
<option value="<?php echo $games['id'];?>">-- <?php echo $games['servername'];?> --</option>

<?php } ?>

</select>
<span id=change1></span>
<TR>
    <TH style="font-weight:bold;font-size:14px;color:#FF0000">覆盖角色： </TH>
    <TD colSpan=2 id=fsos1 style="color:#ccc;font-size:14px;font-weight:bold">请选择覆盖角色</TD></TR>
</TD>

</TR>
 </TD></TR>
</TBODY></TABLE>
<div class="tipsboxC"><span class="fontH" style="font-weight:bold">
当前开放的是<span style="font-weight:bold;color:#f00">【<?= $MOD[enablemfsoset1]?>】</span>转入<span style="font-weight:bold;color:#f00">【<?= $MOD[enablemfsoset2]?>】</span>。转区时间：<em style="font-weight:bold;color:#f00"><?= $MOD[enablemfsoset3]?></em>。<br/>
1、转入分区必须有角色，没有请建立，特别提醒：角色阵营在转出转入分区要相同。<br/>
2、只提供一个角色转入<span style="font-weight:bold;color:#f00"><?= $MOD[enablemfsoset2]?></span>。请将仓库里的东西换成游戏币或放在背包里。<br/>
3、转区会自动丢弃<span style="font-weight:bold;color:#f00">好友信息、工会信息、仓库信息、点数信息</span>等其它无用信息。<br />
4、请谨慎选择，此操作是不可逆的。转入成功后原分区该帐号的转出角色将删除。<br /> 
</span></div>
<div id="fsoinfo" style="display:none">

</div>


  </DIV></DIV>
  </DIV></DIV></DIV>


<?php include template('member','footer'); ?>
