<?php if (!defined('ROOT')){ echo 'Deny ...'; exit; } extract($data); ?>
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php echo $sitename;?></title>
    <link rel="stylesheet" href="http://7xj2f4.com1.z0.glb.clouddn.com/onsen/css/onsenui.css"/>
    <link rel="stylesheet" href="http://7xj2f4.com1.z0.glb.clouddn.com/onsen/css/onsen-css-components.css"/>
    <script src="http://7xj2f4.com1.z0.glb.clouddn.com/onsen/js/angular/angular.js"></script>
    <script src="http://7xj2f4.com1.z0.glb.clouddn.com/onsen/js/onsenui.js"></script>
    <link rel="stylesheet" href="<?php echo $app_url;?>static/css/app.css"/>
    <script>
        var base = '<?php echo $base->url(array('c' => 'welcome'));?>';
        var userType = '<?php echo $user->type;?>';
        var joinNums = <?php echo $joins;?>;
        var cachOutMinPrice = <?php echo $cachOutMinPrice;?>;
        var ios = <?php echo $ios;?>;
        var qun = <?php echo $qun;?>;
    </script>
  </head>
  <body>
    <ons-tabbar style="margin-bottom: -1px;" var="tabbar">
        <ons-tab page="<?php echo $base->url(array('c' => 'welcome', 'm' => 'lists'));?>" label="加好友" icon="ion-person-add" <?php if ($view == 'lists'){?>active="true"<?php }?> onclick="listShow();"></ons-tab>
        <ons-tab page="<?php echo $base->url(array('c' => 'welcome', 'm' => 'search'));?>" label="搜索" icon="ion-search" <?php if ($view == 'search'){?>active="true"<?php }?> onclick="modal.show();"></ons-tab>
        <ons-tab label="置顶" icon="ion-magnet" <?php if ($view == 'topped'){?>active="true"<?php }?> onclick="topped();"></ons-tab>
        <ons-tab page="<?php echo $base->url(array('c' => 'welcome', 'm' => 'post'));?>" label="发布" icon="ion-paper-airplane" <?php if ($view == 'post'){?>active="true"<?php }?> onclick="modal.show();"></ons-tab>        
        <ons-tab page="<?php echo $base->url(array('c' => 'welcome', 'm' => 'user', 'pay' => $pay));?>" label="会员" icon="ion-heart" <?php if ($view == 'user'){?>active="true"<?php }?> onclick="modal.show();"></ons-tab>
    </ons-tabbar>
  
    <!-- user.php -->
    <ons-template id="MyCommissions">
        <ons-dialog var="dialog" cancelable>
            <ons-list>
                <ons-list-item>一度人脉佣金<span class="list-item-note-no-chevron lucent">{{a}} 元</span></ons-list-item>
                <ons-list-item>二度人脉佣金<span class="list-item-note-no-chevron lucent">{{b}} 元</span></ons-list-item>
                <ons-list-item>三度人脉佣金<span class="list-item-note-no-chevron lucent">{{c}} 元</span></ons-list-item>
            </ons-list>
        </ons-dialog> 
    </ons-template>

    <ons-template id="MyContacts">
        <ons-dialog var="dialog" cancelable>
            <ons-list>
                <ons-list-item>一度人脉<span class="list-item-note-no-chevron lucent">{{a}} 人</span></ons-list-item>
                <ons-list-item>二度人脉<span class="list-item-note-no-chevron lucent">{{b}} 人</span></ons-list-item>
                <ons-list-item>三度人脉<span class="list-item-note-no-chevron lucent">{{c}} 人</span></ons-list-item>
            </ons-list>
        </ons-dialog> 
    </ons-template>
    
    <ons-template id="EditMyNickname">
        <ons-dialog var="dialog" cancelable>
            <ons-toolbar inline>
                <div class="center">修改昵称</div>
            </ons-toolbar>
            <p style="margin-left: 10px;margin-right: 10px;">
                <input placeholder="昵称" id="mynickname" class="text-input" style="width: 100%;">
            </p>
            <p style="margin-left: 10px;margin-right: 10px;">
              <ons-button modifier="large" onclick="saveMyNickname();">保 存</ons-button>
            </p>
        </ons-dialog> 
    </ons-template>
    <!-- user.php end -->
    
    <!-- loading -->
    <ons-modal var="modal">
        <ons-icon icon="ion-load-c" spin="true"></ons-icon>
        <br><br>
        请稍后<br>数据加载中
    </ons-modal>
    
    <!-- qrcode -->
    <ons-modal var="qrcodeModal">
        <div id="qrcodeImg" style="width: 90%; margin: 0 auto; position: relative;">
            <span style="position: absolute; width: 40px; height: 40px; top: 0; right: 0; background: #000; color: white; opacity: 0.5; line-height: 40px;" onclick="qrcodeModalClose();">X</span>
            <div></div>
            <span style="font-size: 12px;">长按识别二维码<br/>添加时请注明来自：<?php echo $sitename;?></span>
        </div>
    </ons-modal>
    
    <!-- 置顶提示 -->
    <ons-modal var="toppedModal">
        <div style="width: 86%; text-align: left; line-height: 22px; margin: 0 auto;">
            置顶服务说明:
            <br><br>
            1、置顶刷新可以将您上传的个人二维码刷新到列表的最顶端让更多人主动中您。
            <br/><br/>
            2、只有VIP会员才可以使用。
            <br/><br/>
            3、每10分钟可以使用一次。
            <br/><br/>
            <button class="button button--large" style="width: 85%; margin: 0 auto;" onclick="topped_hide();">隐 藏</button>
        </div>
    </ons-modal>
    
    <script src="http://cdn.bootcss.com/jquery/2.1.4/jquery.js"></script>
    <script src='<?php echo $app_url;?>static/js/app.js?time=<?php echo $time;?>'></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
        wx.config({
            debug: false,
            appId: '<?php echo $sdk["appId"];?>',
            timestamp: <?php echo $sdk["timestamp"];?>,
            nonceStr: '<?php echo $sdk["nonceStr"];?>',
            signature: '<?php echo $sdk["signature"];?>',
            jsApiList: [                
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'onMenuShareQQ',
                'onMenuShareWeibo',
                'onMenuShareQZone',
                'chooseImage',
                'uploadImage'
            ]
        });
        wx.ready(function () {            
            wx.onMenuShareTimeline({
                title: '<?php echo $sitename;?>',
                link: '<?php echo $app_url;?>?shareid=<?php echo $user->id;?>',
                imgUrl: '<?php echo $app_url;?>wx.jpg',
                success: function () { 

                },
                cancel: function () { 

                }
            });
            wx.onMenuShareAppMessage({
                title: '<?php echo $sitename;?>',
                desc: '即刻上传自己的微信二维码，结识更多的新朋友吧！', 
                link: '<?php echo $app_url;?>?shareid=<?php echo $user->id;?>',
                imgUrl: '<?php echo $app_url;?>wx.jpg', 
                success: function () { 
                    
                },
                cancel: function () { 
                    
                }
            });
        });
    </script>
  </body>
</html>