<?php
!defined('IN_ONEZ') && exit('Access Denied');
$baseurl=$G['baseurl']=$G['this']->url.'/www';
$G['keywords']='exe在线生成,网页封装,客户端打包,本地客户端,客户端生成,安装包制作,生成exe,生成apk,setup,h5客户端,html5客户端';
!$G['title'] && $G['title']='佳蓝客户端在线封装平台';
$G['description']='exe在线生成,网页封装,客户端打包,本地客户端,客户端生成,安装包制作,生成exe,生成apk,setup,h5客户端,html5客户端';
$content=ob_get_contents();ob_clean();
?>
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="{$G['charset']}">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title><?=$G['title']?> - 在线生成电脑客户端</title>
    <meta name="keywords" content="<?=$G['keywords']?>">
    <meta name="description" content="<?=$G['description']?>">
		<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
		<style>
			html,body{font-size:13px;font-family:"Microsoft YaHei UI", "微软雅黑", "宋体";}
			.pager li.previous a{margin-right:10px;}
			.header a{color:#FFF;}
			.header a:hover{color:#428bca;}
			.footer{padding:10px;}
			.footer a,.footer{color:#eee;font-size:14px;line-height:25px;}
		</style>
		<!--[if lt IE 9]>
		  <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
		  <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
		<![endif]-->
		<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
		<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
	</head>
	<body style="background-color:#28b0e4;">
		<div class="container">
			<div class="header" style="margin:15px auto;">
				<!--<img src="http://cdn.onez.cn/files/2017/0416/2017041603031745300002.png" height="60" />-->
				<div style="text-align: center">
        <img src="http://cdn.onez.cn/2017/0703/2017070316075942240001.png" height="60" />
        </div>
			</div>
			<div class="row well" style="margin:auto 0;">
      <?=$content?>
<?if($G['user']['key1']=='admin'){?>
<div class="panel panel-info" style="margin: 10px 0 0 0;border-radius:0;border:0;">
	<div class="panel-heading">
    系统提示（此栏仅管理员可见）
  </div>
  <div class="panel-body" style="padding: 0">
<table class="table sysinfo">
	<tr>
		<td>
    <span class="name">生成码数量</span>
    <code>
      <?
      echo $n=$G['this']->data()->open('sn')->rows("index2=0");
      ?>
    </code>个
    <a href="<?=onez()->href('/index.php?menu=sn')?>" class="btn btn-xs btn-info">管理</a>
    <a href="<?=onez()->href('/master/sn.buy.php')?>" target="_blank" class="btn btn-xs btn-success">购买</a>
    </td>
	</tr>
</table>
  </div>
</div>
<?}?>
			</div>
			<div class="footer" style="margin:15px auto;">
				<div class="text-center">
				</div>
				<div class="text-center">
          <p>注意事项：请合法使用本平台的打包服务，如果从事非法活动（如博彩、色情、反动、六合彩、诈骗、病毒木马等等一切非法活动），我司将不提供服务并且不退款。
</p>
					<a href="http://build.onez.cn" target="_blank"><b>佳蓝客户端在线封装平台</b></a> v2.0 &copy; 2017
          <script src="https://s22.cnzz.com/z_stat.php?id=1262655885&web_id=1262655885" language="JavaScript"></script>
          <a href="<?=onez()->href('/index.php?menu=recommend')?>" style="color:#ff0;text-decoration: underline;" data-title="推广平台" data-width="1200" class="onez-miniwin hide">推广平台</a>
          QQ交流群:<span style="color:#ff0;text-decoration: underline;">653014532</span>(新) <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=f7aa92689e8ee6ab05667ce7cdc12bfbec096ca45476a0324cf442db3cc9d7b6"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="佳蓝客户端在线封装" title="佳蓝客户端在线封装"></a>
				</div>
			</div>
		</div>
<?

echo onez('ui')->js(onez('admin')->url.'/assets/js/bootbox.js');
echo onez('ui')->js(onez('admin')->url.'/assets/js/onez.js');
?>
<style>
.modal .btn-max{
  display: none;
}
.modal .btn-small{
  display: none;
}
.modal-home .btn-max{
  display: block;
}
.modal-home .modal-header {
  border-bottom: 0;
  padding: 10px;
  background: rgba(255,255,255,0.9)!important;
}
.modal-home #NoPermissioniframe {
  background: transparent;
}
.modal-full,.modal-full .modal-dialog{
  margin: 0;
  padding: 0;
  left: 0!important;
  top: 0!important;
  width: 100%!important;
  height: 100%!important;
  position: fixed;
}
.modal-full .modal-content{
  border: 0!important;
  border-radius: 0!important;
}
.modal-full .btn-max{
  display: none;
}
.modal-full .btn-small{
  display: block;
}
</style>
<div class="modal fade myframe <?=$modalclass?>" id="hide-miniwin" style="display: none">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><i class="glyphicon glyphicon-remove" style="font-size: 28px"></i></button>
        <button type="button" class="close btn-max"><i class="glyphicon glyphicon-resize-full" style="font-size: 20px;margin:3px"></i></button>
        <button type="button" class="close btn-small"><i class="glyphicon glyphicon-resize-small" style="font-size: 20px;margin:3px"></i></button>
        <h4 class="modal-title">系统提示</h4>
      </div>
      <div class="modal-body"><iframe id="NoPermissioniframe" width="100%" height="100%" frameborder="0" allowtransparency="true" style="background-color=transparent"></iframe></div>
    </div>
  </div>
</div>
<!--<script type="text/javascript" charset="UTF-8" src="http://kefu.onez.cn?mod=%2Fapi.php&id=2230"></script>-->
<script type="text/javascript">
function closeWin(){
  $("#NoPermissioniframe").attr("src", 'about:blank');  
  $("#hide-miniwin").modal('hide');
}
function openWin(href,title,maxwidth,maxheight,reload,bgcolor){
  if(href.indexOf('?')==-1){
    href+='?miniwin=1';
  }else{
    href+='&miniwin=1';
  }
  if(typeof bgcolor=='undefined' || bgcolor==''){
    bgcolor='#ffffff';
  }
  $('#hide-miniwin h4').text(title);
  if(isNaN(maxwidth)){
    maxwidth=800;
  }
  var w=$(window).width()-80;
  if(w>maxwidth){
    w=maxwidth;
  }
  if(isNaN(maxheight)){
    maxheight=800;
  }
  var h=$(window).height()-60;
  if(h>maxheight){
    h=maxheight;
  }
  $('#hide-miniwin .modal-dialog').css({width:w+'px',height:h+'px'});
  $('#hide-miniwin .modal-body').css({padding:'0px'});
  $("#NoPermissioniframe").attr("src", href);
  var win=$("#hide-miniwin").modal({backdrop: 'static', keyboard: false});
  if(typeof reload!='undefined' && reload=='1'){
    win.on('hide.bs.modal',function(){
      location.reload();
    })
  }else{
    win.on('hide.bs.modal',function(){
      $('.modal-home').removeClass('modal-full');
    });
  }
  var _scrollHeight = $(document).scrollTop();
  var wHeight = $(window).height();
  var this_height=wHeight-60;
  var this_top=(wHeight-this_height)/2+_scrollHeight+"px";
  var this_top=(wHeight-h)/2+"px";

  
  var myifmcss={height:h-50+'px'};//iframe样式
  $('#hide-miniwin .modal-dialog').find('.modal-content').css({height: '100%',width: '100%','background-color':bgcolor}).find('h4').html(title||"").end().find('.modal-body').find("#NoPermissioniframe").css(myifmcss).attr('data-height',h-50);
}
$(function(){
  $('.btn-max').bind('click',function(){
    $('.modal-home').addClass('modal-full');
    $('.modal-home #NoPermissioniframe').height($(window).height()-$('.modal-header').height()-20);
  });
  $('.btn-small').bind('click',function(){
    $('.modal-home').removeClass('modal-full');
    $('.modal-home #NoPermissioniframe').height(parseInt($('.modal-home #NoPermissioniframe').attr('data-height')));
  });
  $(window).bind('resize',function(){
    $('.modal-full.myframe #NoPermissioniframe').height($(window).height()-$('.modal-header').height()-20);
    $('.modal-full #homeFrame').height($(window).height()-$('.modal-home-group .modal-header').height()-20);
  });
  
  $('a.onez-miniwin').each(function(){
    $(this).attr('data-href',$(this).attr('href'));
    $(this).attr('href','javascript:;');
    $(this).click(function(){
      var href=$(this).attr('data-href');
      var title=$(this).attr('data-title');
      if(typeof title=='undefined' || !title || title.length<1){
        title=$(this).text();
      }
      openWin(href,title,parseInt($(this).attr('data-width')+''),parseInt($(this).attr('data-height')+''),$(this).attr('data-reload'),$(this).attr('data-bgcolor'));
    });
  });
});
function _login(){
  $('#modal-register').modal('hide');
  $('#modal-login').modal('show');
}
function _register(){
  $('#modal-login').modal('hide');
  $('#modal-register').modal('show');
}
</script>
<?
echo onez('ui')->css($G['baseurl'].'/images/login.css?t='.filemtime(__DIR__.'/images/login.css'));
?>
<!-- Modal -->
<div class="modal fade" id="modal-login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 6200103999;">
  <div class="modal-dialog" role="document" style="width:447px;position: absolute;left: 50%;margin-left: -225px;top: 50%;margin-top: -200px;">
    <div class="modal-content">
      <div class="modal-body" style="padding: 0">
        <div class="signin">
        	<div class="signin-head"><img src="<?=$G['baseurl']?>/images/avatar.jpg" alt="" class="img-circle"></div>
        	<form class="form-signin-box form-signin-login" method="post" role="form">
            <p class="form-item">
              <i class="fa fa-user"></i>
              <input type="text" name="username" class="form-control" placeholder="登录账号" required autofocus />
            </p>
            <p class="form-item">
              <i class="fa fa-key"></i>
              <input type="password" name="password" class="form-control" placeholder="登录密码" required />
            </p>
        		<button class="btn btn-lg btn-warning btn-block" type="submit">登录</button>
            <input type="hidden" name="action" value="login" />
            
            <div class="" style="padding-top: 10px">
              <div class="pull-left">
                <a href="javascript:;" data-dismiss="modal">取消</a>
              </div>
              <div class="pull-right">
                <a href="javascript:;" onclick="_register()">免费注册</a>
              </div>
              <div class="clearfix"></div>
            </div>
            <div class="" style="padding-top: 10px;text-align: center;">
              <a href="<?=onez('login.weixin')->link($G['this']->token,'http://www.onez.cn')?>" class="ico-login ico-login-weixin" title="微信登录"></a>
              <a href="<?=onez('login.qq')->link($G['this']->token)?>" class="ico-login ico-login-qq" title="QQ登录"></a>
            </div>
        	</form>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- Modal -->
<div class="modal fade" id="modal-register" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 6200103999">
  <div class="modal-dialog" role="document" style="width:447px;position: absolute;left: 50%;margin-left: -225px;top: 50%;margin-top: -225px;">
    <div class="modal-content">
      <div class="modal-body" style="padding: 0">
        <div class="signin">
        	<div class="signin-head"><img src="<?=$G['baseurl']?>/images/avatar.jpg" alt="" class="img-circle"></div>
        	<form class="form-signin-box form-signin-register" method="post" role="form">
            <p class="form-item">
              <i class="fa fa-user"></i>
              <input type="text" name="username" class="form-control" placeholder="登录账号" required autofocus />
            </p>
            <p class="form-item">
              <i class="fa fa-key"></i>
              <input type="password" name="password" class="form-control" placeholder="登录密码" required />
            </p>
            <p class="form-item">
              <i class="fa fa-key"></i>
              <input type="password" name="password2" class="form-control" placeholder="确认登录密码" required />
            </p>
        		<button class="btn btn-lg btn-warning btn-block" type="submit">立即注册</button>
            <input type="hidden" name="action" value="register" />
            
            <div class="" style="padding-top: 10px">
              <div class="pull-left">
                <a href="javascript:;" data-dismiss="modal">取消</a>
              </div>
              <div class="pull-right">
                <a href="javascript:;" onclick="_login()">返回登录</a>
              </div>
              <div class="clearfix"></div>
            </div>
        	</form>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
<?if(!$G['userid']){?>
$(function(){
  $('.url-build').attr('href','javascript:;').attr('onclick','_login()');
});
<?}?>
$(function(){
  $('.form-signin-login').unbind('submit').bind('submit',function(){
    $.post('<?=onez()->href('/onez.php')?>',$(this).serialize(),function(o){
      if(o.error){
        $('.rndcode-img').trigger('click');
        onez.alert(o.error);
      }else{
        location.reload();
      }
    },'json');
    return false;
  });
  $('.form-signin-register').unbind('submit').bind('submit',function(){
    $.post('<?=onez()->href('/onez.php')?>',$(this).serialize(),function(o){
      if(o.error){
        $('.rndcode-img').trigger('click');
        onez.alert(o.error);
      }else{
        location.reload();
      }
    },'json');
    return false;
  });
});
</script>
<?
if($G['footer']){
  echo $G['footer'];
}
if($G['footer-js']){
  echo '<script type="text/javascript">'.$G['footer-js'].'</script>';
}
?>
	</body>
</html>