if (!defined('IN_BTSUE')) {
    exit('CK Faild!');
}
if (!isset($syncid)) {
    $syncid = 2;
} else {
    $syncid = intval($syncid);
}
if (!isset($syncusername)) {
    $syncusername = $username;
}
$sqlsync = mysql_query("SELECT wdomain FROM `" . $mysql_head . "w_friend` WHERE `Sync`='" . $syncid . "' ", $linka);
while ($info = mysql_fetch_object($sqlsync)) {
    $syncudm = $info->wdomain;
    $syncumap = 'http://' . $syncudm . '/btsuser/map/';
    $syncadd = BCurlKey($syncumap);
    $syncaddx = json_decode($syncadd);
    if (!isset($syncaddx->dourl)) {
        continue;
    }
    $syncudourl = $syncaddx->dourl;
    if (!isset($syncaddx->URLrep)) {
        $SyncUURLrep = 'http://';
    } else {
        $SyncUURLrep = $syncaddx->URLrep;
    }
    $syncurl = $SyncUURLrep . $syncudm . $syncudourl . '?doid=1&BTSnowBallUsername='******'@@' . $SDomain;
    ?>
	<script type="text/javascript" src="<?php 
    echo $syncurl;
    ?>
?>
<div class="container-fluid" id="adminindex">
 <div class="row">
  <div class="col-md-1">&nbsp;</div>
  <div class="col-md-10 aibg"><img src="img/ADMBC.PNG" class="img-responsive"></img></div>
  <div class="col-md-1">&nbsp;</div>
 </div>
 </div>
 <div class="container-fluid" >
 <div class="row">
  <div class="col-md-1">&nbsp;</div>
  <div class="col-md-10"><br />
  最新官方消息:
  <?php 
$Wapiurl = 'http://ServerA.PublicApi.BTSnowball.Org/?do=germsg';
$datemsg = BCurlKey($Wapiurl);
$datearr = json_decode($datemsg, true);
if (!is_array($datearr)) {
    echo '<br />官方服务器可能过载了!稍后重新拉取.';
}
if ($datearr[0] >= 1) {
    $numover = intval($datearr[0]);
} else {
    $numover = 0;
}
$numbegin = 0;
while ($numbegin < $numover) {
    $numbegin = $numbegin + 1;
    ?>
	 <br /><a href="<?php 
    echo $datearr["{$numbegin}"];
  <div class="container-fluid text-center" id="lgjcfoot">
  本站执行<a href="http://www.btsnowball.org">BTSnowBall_Users协议</a>协议版本<a href="http://www.btsnowball.org"><?php 
echo $BTSUVersion;
?>
</a>引擎版本<a href="http://www.btsnowball.org"><?php 
echo $devv;
?>
</a>
  </div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
	<script src="js/btsu_js.js"></script>
		<?php 
if (isset($helpbtsu)) {
    if ($helpbtsu == '1') {
        $Wapiurl = 'http://ServerA.PublicApi.BTSnowball.Org/?do=helpbtsu';
        $datemsg = BCurlKey($Wapiurl);
        $datearr = json_decode($datemsg, true);
        if (!is_array($datearr)) {
        } else {
            $Wapiurlb = $datearr[0];
            $helpmsg = BCurlKey($Wapiurlb);
            echo $helpmsg;
        }
    }
}
?>
  </body>
</html>
 $yzjg = BCurlKey($Acurl);
 if ($yzjg != $kla) {
     echo '#0000A002';
     exit;
 }
 $Ibh = Cbh($Udm, $Uuser);
 SURIbh($Uaddra, $Uaddrb, $Ibh, $Udm, $UURLrep);
 $Iyzma = Cyzm($Udm, $Ibh);
 $Iyzmb = Cyzm($Udm, $Ibh);
 $Iyzmc = Cyzm($Udm, $Ibh);
 $Iyzmd = Cyzm($Udm, $Ibh);
 $ToKen = sha1(md5($Uyzma . $Uyzmb) . md5($Uyzmc . $Uyzmd . $Ubh));
 $kla = intval(rand(9999, 999999999));
 $Bcurl = $UURLrep . $Udm . $Uaddrb . '?doid=0&bh=' . $Ubh . '&dm=' . $WDomain . '&ToKen=' . $ToKen . '&user='******'&Ibh=' . $Ibh . '&Iyzma=' . $Iyzma . '&Iyzmb=' . $Iyzmb . '&Iyzmc=' . $Iyzmc . '&Iyzmd=' . $Iyzmd . '&kla=' . $kla;
 //校验并交换验证信息
 $yzjgB = BCurlKey($Bcurl);
 if ($yzjgB != $kla) {
     echo 'BTSuser:'******'Error-#000A0010' . ':BTsuserover';
     DELbh($Ibh, $Udm);
     DELIyzm($Ibh, $Iyzma);
     DELIyzm($Ibh, $Iyzmb);
     DELIyzm($Ibh, $Iyzmc);
     DELIyzm($Ibh, $Iyzmd);
     exit;
 }
 UPbh($Ibh, $Ubh, $Udm);
 SZIbh(2, $Ibh, $Udm);
 WUyzm(1, $Ibh, $Uyzma, $Udm);
 WUyzm(2, $Ibh, $Uyzmb, $Udm);
 WUyzm(3, $Ibh, $Uyzmc, $Udm);
 WUyzm(4, $Ibh, $Uyzmd, $Udm);
         }
         exit;
     }
 }
 SETuzt($Iusername, $Uusername, $Udm, 2, 1, $Iuid, 1, $email, 1);
 $wisbelive = $_SESSION['wisbelive'];
 if ($wisbelive == '1') {
     $_SESSION['wisbelive'] = 2;
     $wisbelive = 2;
     SetBelive($email, $Udm, 1, 1, 1);
 }
 if ($WDomain != $Udm && $SDomain != $Udm) {
     $iffriend = IINFSet($Udm, '2');
     if ($iffriend['in'] == '1') {
         $Ncurl = 'http://' . $Udm . $bhmsg['apiurl'] . '?doid=5';
         $Uwname = BCurlKey($Ncurl);
         $Uwname = trim($Uwname);
         SETfriend($Uwname, $Udm, 2);
     }
 }
 if ($tgreg != '1') {
     echo 'Username & Password of [' . $SDomain . '] has been send to your emailaddress!';
     $mailto = $email;
     $mailtitle = '您在' . $Wname . '[' . $SDomain . ']的独立用户名和密码';
     $mailtxt = 'You have successfully logged in ' . $Wname . '[' . $SDomain . ']with the BTSnowBall_Users protocol.Here you except you can continue to use BTSnowBall_Users users landing outside the' . $Wname . '[' . $SDomain . ']we also as you create a separate login user name and password for a rainy day.<br />Your Username is :<strong>' . $Iusername . '</strong><br />Your Password is:<strong>' . $password . '</strong><br />Thanks<br />' . $Wname . '[' . $SDomain . ']&BTSnowBall_Org[BTSnowBall.Org]';
     include 'dorun/Run_Mail.php';
 }
 $password = '******';
 $fs = "2";
 $username = $Iusername;
 include "{$WHandlogin}";