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

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

function checkserv(thisid) {
  document.getElementById("Gamelist").disabled=true;
  document.getElementById("fsos").innerHTML = "<span style='color:red;font-weight:bold'><img src='/img/member/ajax_loader.gif' width='135' height='12'></span>";
  x_checkserv(thisid,checkserv_cb);
  function checkserv_cb(z) {
  if (z=="true"){
  //document.getElementById("Gamelist").disabled=true;
  listfso();
  }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("message").style.display="block";
  document.getElementById("message").innerHTML = "<span class=font06 style='color:green;font-weight:bold'>分区连接成功，请选择角色。</span>";
document.getElementById("fsos").innerHTML = z;
}
}

function doView(value){
var idserver = document.getElementById("Gamelist").value;
document.getElementById("message").style.display="none";
document.getElementById("fsoinfo").style.display="block";
document.getElementById("fsoinfo").innerHTML = '<TABLE class=regform cellSpacing=0 cellPadding=0 width="80%" align=center border=0><TBODY><TR><TH></TH><TD style="color:#f00;font-size:14px;font-weight:bold;padding:20px 0px;text-align:left;"><img src="/img/member/ajax_loader.gif"></TD></TR></TBODY></TABLE>';
x_doView(idserver,value,doView_cb);

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

function doSub(){
var idserver = document.getElementById("Gamelist").value;
var idfso = document.getElementById("idfso").value;
document.getElementById("subok").disabled=true;
document.getElementById("fsoinfo").innerHTML = '<TABLE class=regform cellSpacing=0 cellPadding=0 width="80%" align=center border=0><TBODY><TR><TH></TH><TD style="color:blue;font-size:14px;font-weight:bold;padding:20px 0px;text-align:left;">正在操作，请等待...</TD></TR></TBODY></TABLE>';
x_doSub(idserver,idfso,doSub_cb);

function doSub_cb(z) {
  if (z =="true"){
    window.alert("恭喜你,角色飞升成功！");
window.location.href="<?=HS_PATH?>game/index.php";
  }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>
<OPTION value="<?php echo $rs['id'];?>">-- <?php echo $rs['servername'];?> --</OPTION>
</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>
</TBODY></TABLE>
<div class="tipsboxC">
<span class="fontH" style="font-weight:400;color:red"> 【飞升条件】角色等级150、第3次转职、声望180点、游戏币1.8亿、1天可飞升一次。</span><br>
<span class="fontH" style="font-weight:400;color:darkgreen"> 【飞升待遇】人物等级变为40级、重置人物AP点至40级、额外赠送属性80点、SP无限叠加。</span>
</div>
<div id="fsoinfo" style="display:none">

</div>


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


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