
<!-- END Main Container -->

<!-- Main Container -->
<main id="main-container">
    <!-- Hero -->
    <div class="bg-body-light">
        <div class="content content-full">
            <div class="d-flex flex-column flex-sm-row justify-content-sm-between align-items-sm-center py-2">
                <div class="flex-grow-1">
                    <h1 class="h3 fw-bold mb-1">通道管理</h1>                                            <p><{SimpWords()}></p>

                    <h2 class="fs-base lh-base fw-medium text-muted mb-0">
                 			          <!-- www.9yzy.com qq 81368028-->

				  </h2>
                </div>
                <nav class="flex-shrink-0 mt-3 mt-sm-0 ms-sm-3" aria-label="breadcrumb">
                    <ol class="breadcrumb breadcrumb-alt">
                        <li class="breadcrumb-item">
                            <a class="link-fx" href="index.php">总览</a>
                        </li>
                        <li class="breadcrumb-item" aria-current="page">
                            通道管理
                        </li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
    <!-- END Hero -->
    <!-- Page Content -->
    <div class="content">

       <div class="row justify-content-center py-sm-3 py-md-6">
            <div class="col-md-8">
                <div class="block block-rounded">
                    <div class="block-header block-header-default">
                        <h3 class="block-title">通道管理</h3>
                    </div>
                    <div class="block-content"><div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header">
<h5>温馨提示</h5>
<div class="card-header-right">
<div class="btn-group card-option">




<div class="card-body">
<b><center>回调有时候可能需要几秒(1-6秒左右)这么做是为了 <code class="highlighter-rouge">预防支付宝或微信频繁访问导致限制查单或者限制账号一些功能</code> 而设定的时间,所以不是回调快就厉害,而是不掉单!</center></b>
</div>
</div>
</div></div>

							
					<div class="row">
						<div class="col-md-12">
							<div class="card">
								<div class="card-header">
									<h4 class="card-title">Channel List</h4>
								<div class="card-body">
								<button class="btn btn-outline-success" style="float:right;" data-toggle="modal" data-target="#modal_AddChannel" data-id="modalHeaderColorInfo">
											<span class="btn-label">
												<i class="fa fa-plus"></i>
											</span>
											新增通道
										</button>
								<br>
											点击右边添加新通道
								</div>

										<div class="row">
											<{foreach $findall as $v}>
									<?php
									$Order = new Order();
									$today=date("Y-m-d").' 00:00:00';
									$lastday=date("Y-m-d",strtotime("-1 day")).' 00:00:00';
									$data = array(
												"`pid` = :pid AND `channel_id` = :channel_id AND `status` = :status AND `addtime` > :addtime",
												"pid"=>$userrow['id'],
												"channel_id"=>$v['id'],
												"status"=>1,
												"addtime"=>$today,
									);
									$findCount_Today = $Order->findCount($data);//今日订单数量
									$findMoney_Today = $Order->findCount($data,'sum(money)');//今日收入金额

									$data = array(
													"`pid` = :pid AND `channel_id` = :channel_id AND `status` = :status AND `addtime` > :addtime AND `addtime` < :today",
												"pid"=>$userrow['id'],
												"channel_id"=>$v['id'],
												"status"=>1,
												"addtime"=>$lastday,
												"today"=>$today,
									);
									$findCount_Lastday = $Order->findCount($data);//昨日订单数量
									$findMoney_Lastday = $Order->findCount($data,'sum(money)');//昨日收入金额

									//总收入金额
									$findMoney_All = $Order->findCount(array("pid"=>$userrow['id'],"channel_id"=>$v['id'],"status"=>1),'sum(money)');

									?>
												
<div class="col-md-6 col-xl-4">
<div class="card" >
<div class="card-body p-0">
<div class="blur-user-card" >

														<{if $v.logoimg}>
															<img src="<{$v.logoimg}>" alt="..." class="avatar-img rounded-circle" style="width:80px; height:80px;">
														<{else}>
						        <!-- www.9yzy.com qq 81368028-->
									<!--img src="/Assets/Assets_User_1/img/profile.jpg" alt="..." class="avatar-img rounded-circle"-->
															<img src="/Assets/Icon/<{$v.type}>.jpeg" alt="..." class="avatar-img rounded-circle" style="width:80px; height:80px;">
														<{/if}>
<p>ID:<{$v.id}> - 
													<{if $v.c_type=='alipay_scan_bill' or $v.c_type=='alipay_upck_clouds' or $v.c_type=='alipay_scan_no_docking' or $v.c_type=='alipay_nock_auto'}>	
															<font style="color:#9F79EE"><{$v.nickname}></font>
													<{elseif $v.c_type=='wxpay_uos_clouds' or $v.c_type=='wxpay_scan_no_docking'}>
														<font style="color:#9F79EE"><{$v.nickname}></font>
													<{elseif $v.c_type=='qqpay_scan_no' or $v.c_type=='qqpay_scan_no_docking'}>
														<font style="color:#9F79EE"><{getQQNick($v.aliuid)}></font>
													<{else}>
														<font style="color:#9F79EE"><{$v.notes}></font>
													<{/if}>
<a class="switch d-inline m-r-10">
<input type="checkbox" class="form-check-input input-success custom-control-input" onclick="SubmitTt_Switch('<{$v.id}>');" name="web_mail_cout_switch" id="tt_switch_<{$v.id}>" <{if $v.tt_switch=='true'}>checked<{/if}> >
<label for="tt_switch_<{$v.id}>" class="cr"></label>
<label><font style="color:green;">启用</font></label>
</a>

</p>
												<div class="card-footer" style="height: 150px;overflow-y: auto;">
													<div class="row user-stats text-center">
														<div class="col">
															<div class="username" style="overflow: auto;"><{pay_c_type_pc($v.c_type,$v.id,1)}></div>
														</div>
														<div class="col">
															<div class="status"><{channel_zt($v.status,$v.addtime,$v.endtime)}><br><font style="color: 1874CD; font-size: 8px;">备注：<{$v.notes}></font></div>
														</div>
													</div>
												</div>
<div class="mt-4 card-footer">
<div class="row text-center">
<div class="col">
<h4 class="text-white">															<font style="color: red; font-size: 8px;">
+¥<{$findMoney_Today}></h4>
<span>今日收款</span> 															</font> 
</div>
<div class="col">
<h4 class="text-white">															<font style="color: red; font-size: 8px;">
+¥<{$findMoney_Lastday}></h4>
<span>昨日收款</span>															</font>
</div>
<div class="col">
<h4 class="text-white">															<font style="color: red; font-size: 8px;">
+¥<{$findMoney_All}></h4>
<span>总共收款</span>															</font>
</div>
</div>
									<!--a class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input" onclick="SubmitTt_Switch('<{$v.id}>');" name="web_mail_cout_switch" id="tt_switch_<{$v.id}>"<{if $v.tt_switch=='true'}>checked<{/if}> ><label class="custom-control-label" for="tt_switch_<{$v.id}>"> <font style="color:green;">开启收款</font></label></a-->
									

			        <!-- www.9yzy.com qq 81368028-->
						
									
									<{if $v.c_type=='alipay_nock_auto' and $v.status!='1'}>
										<{if $v.nockauto_status=='1'}>
											<font style="color:green; float:right;">已登录成功,开始配置吧</font><p class="badge bg-success copy-btn"><code onclick="Deploy_Nock('<{$v.id}>');">未配置,点此进入自助配置</p></code>
										<{else}>
											<p class="badge"><font style="color:#FF0000; float:right;"> 请先点击更新登录支付宝</font></p>
										<{/if}>
									<{/if}>
									<div class="card-footer">
												<div class="row user-stats text-center">
													<div class="col">
							<button type="button" class="btn btn-outline-warning btn-xs" onclick="Channel_test('<{$v.id}>');"><span class="btn-label"><i class="fas fa-spinner"></i></span>测试</button>
													</div>
													<div class="col">
							<button class="btn btn-outline-success btn-xs" onclick="modal_UpChannel('<{$v.id}>');"><span class="btn-label"><i class="fas fa-arrow-alt-circle-up"></i></span>更新</button>
													</div>
													<div class="col">
							<button class="btn btn-outline-danger btn-xs" onclick="SubmitDelChannel('<{$v.id}>');"><span class="btn-label"><i class="far fa-trash-alt"></i></span>删除</button>
													</div>
												</div>
</div>
</div>
</div>
</div>
</div>
</div>
									<{/foreach}>
</div>
</div>
</div>
                                       
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Page Content -->        <!-- www.9yzy.com qq 81368028-->
