<div id="wjson" class="dn"></div>
<div class="inner-wrapper">
	<section role="main" class="content-body">
		<header class="page-header">
			<h2>
				<?php if((((in_array("1", $module["db_news"]) and $mobile=="") or (in_array("2", $module["db_news"]) and $mobile<>"")))){?>
					<div class="owl-carousel owl-theme cnews" style="margin-bottom: 0px; display:block; max-height:38px; overflow:hidden;" data-plugin-carousel="" data-plugin-options='{ "dots": false, "autoplay": true, "autoplayTimeout": 4000, "loop": true, "margin": 10, "nav": true, "items": 1 }'>
						<?php echo file_get_contents('https://cdn.'.$cdnurl.'/media/news/');?>
					</div>
				<?php }else{?>
					<span class="mfrm cp" data-toggle="modal" data-target="#myModal" data-width="50%" data-title="Updater" data-url="fonksiyon.php?islem=update" data-ref="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&id=<?php echo $_GET["id"]?>">CRM+Plus <?php echo $pow2;?></span>
				<?php }?>
			</h2>
			<div class="right-wrapper text-right">
				<ol class="breadcrumbs" id="v-genel">
					<li>
						<a href=".">
							<i class="fa fa-home"></i>
						</a>
					</li>
					<li><span>Crm+</span></li>
					<li><span><a class="mfrm cp" data-toggle="modal" data-target="#myModal" data-width="90%" data-title="Dashboard" data-url="modules/public/settings_modal.php??ne=ayarlar&islem=ayarlar#&tab-dashboard">Dashboard</a></span></li>
				</ol>
				<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
			</div>
		</header>
		<!-- start: page -->
		<div class="row" id="dashboard">
			<div class="col-md-12 db_shorts mmt15" style="">
				<section class="card card-featured-left card-featured-warning mb-3 bgt" style="" id="kur">
					<header class="card-header v3-bg-info">
						<div class="card-actions"></div>
						<h2 class="card-title"><?php echo ctranslate("Dashboard")?> <a href="?ne=ayarlar&islem=menu&status=short" style="font-size: 14px; margin-top: 0px; position: absolute; margin-left: 110px;" class="e fas fa-edit v3-text-warning"></a></h2>
						<div style="position: absolute; right: 5px; top: 5px; width: 100px;" class="owl-carousel owl-theme" data-plugin-carousel="" data-plugin-options='{ "dots": false, "autoplay": true, "autoplayTimeout": 3000, "loop": true, "margin": 10, "nav": false, "responsive": {"0":{"items":1 }, "600":{"items":1 }, "1000":{"items":1 } }  }'>
						<?php if((((in_array("1", $module["db_dt"]) and $mobile=="") or (in_array("2", $module["db_dt"]) and $mobile<>"")))){?>
							<div class="item hweather"></div>
							<div class="item hdate">
								<div class="digi fs30"><?php echo date("d-m-y");?></div><span><?php echo gunler(date('w'));?></span>
							</div>
						<?php }?>
						</div>
					</header>
					<div id="db_shorts" class="card-body">
						<?php include('modules/dashboard/db_shorts.php');?>
						<?php if(file_exists("../view/dashboard.php")){include("../view/dashboard.php");}else{echo '<span class="msa">view/dashboard</span>';} ?>
						<?php if((((in_array("1", $module["db_keep"]) and $mobile=="") or (in_array("2", $module["db_keep"]) and $mobile<>"")))){?>
							<?php include('modules/dashboard/db_keep.php');?>
						<?php }?>
					</div>
					</section>
				</div>
				
				<?php if((((in_array("1", $module["db_req"]) and $mobile=="") or (in_array("2", $module["db_req"]) and $mobile<>""))) and $module["request"]==1 and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y17"]<>0))){?>
					<div class="col-md-12 mdn" style="">
						<section class="card card-featured-left card-featured-warning mb-3 bgt" style="" id="kur">
							<header class="card-header">
								<div class="card-actions"></div>
								<h2 class="card-title"><i class="fa-solid fa-receipt"></i> <?php echo ctranslate(telefon($module["requests"]));?></h2>
							</header>
							<div id="db_todays" class="card-body">
								<?php include('modules/dashboard/db_counts.php');?>
							</div>
						</section>
					</div>
				<?php }?>
				<?php if(($m16==1 and (((in_array("1", $module["db_m16"]) and $mobile=="") or (in_array("2", $module["db_m16"]) and $mobile<>"")))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y2_siparis"]<>0))){?>
					<div class="col-md-12" style="">
						<section class="card card-featured-left card-featured-warning mb-3 bgt" style="" id="kur">
							<header class="card-header v3-bg-warning">
								<div class="card-actions"></div>
								<h2 class="card-title"><i class="fas fa-store"></i> <?php echo ctranslate("Bugün")?></h2>
							</header>
							<div id="db_todays" class="card-body">
								<?php include('modules/dashboard/db_today.php');?>
							</div>
						</section>
					</div>
				<?php }?>
				<?php
				$data = file_get_contents('https://cdn.'.$cdnurl.'/data'); $ws = json_decode($data); foreach ($ws->data as $model){if($model->type=="ads"){$a++;}}?>
				<?php if($a>0){?>
					<div class="col-md-6" style="">
						<section class="card card-featured-left card-featured-warning mb-3 bgt" style="" id="kur">
							<header class="card-header v3-bg-warning">
								<div class="card-actions"></div>
								<h2 class="card-title"><img src="https://cdn.crmplus.com.tr/images/crm.png" style="height:24px;"> CrmPlus+</h2>
							</header>
							<div id="db_" class="card-body" style="height: 275px; overflow: auto;">
							<div class="owl-carousel owl-theme" style="margin-top: -15px;" data-plugin-carousel="" data-plugin-options='{ "dots": true, "autoplay": true, "autoplayTimeout": 8000, "loop": true, "margin": 10, "nav": false, "responsive": {"0":{"items":1 }, "600":{"items":1 }, "1000":{"items":1 } }  }'>
							<?php
								foreach ($ws->data as $model){
								if($model->type=="ads"){
							?>
								<div class="item">
									<a href="<?php echo $model->url;?>" target="<?php echo $model->target;?>">
										<img src="<?php echo $model->image;?>">
									</a>
								</div>
							<?php }}?>
							</div>
							</div>
						</section>
					</div>
				<?php }?>
				<?php if((((in_array("1", $module["db_kur"]) and $mobile=="") or (in_array("2", $module["db_kur"]) and $mobile<>""))) or (((in_array("1", $module["db_wt"]) and $mobile=="") or (in_array("2", $module["db_wt"]) and $mobile<>"")))){?>
					<?php include('modules/dashboard/db_exchange.php');?>	
				<?php }?>
				<?php if((((in_array("1", $module["db_weather"]) and $mobile=="") or (in_array("2", $module["db_weather"]) and $mobile<>"")))){?>
					<?php include('modules/dashboard/db_weathers.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_m17"]) and $mobile=="") or (in_array("2", $module["db_m17"]) and $mobile<>"")))){?>
					<?php include('modules/dashboard/db_events.php');?>
				<?php }?>
				<?php if(($e8<>0 and in_array("1", $module["db_e8"])) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y8"]<>0))){?>
					<?php include('modules/dashboard/db_client_current.php');?>
				<?php }?>
				<?php if($module["muhasebe_ekstre"]=="1" and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y24"]<>0))){?>
					<?php //include('modules/dashboard/db_banks.php');?>
				<?php }?>
				<?php if($g9<>0 and (((in_array("1", $module["db_g9"]) and $mobile=="") or (in_array("2", $module["db_g9"]) and $mobile<>""))) and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y10"]<>0))){?>
					<?php include('modules/dashboard/db_bids.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_g3"]) and $mobile=="") or (in_array("2", $module["db_g3"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y12"]<>0))){?>
					<?php include('modules/dashboard/db_pay_counts.php');?>
				<?php }?>
				<?php if(($m16==1 and (((in_array("1", $module["db_m16"]) and $mobile=="") or (in_array("2", $module["db_m16"]) and $mobile<>"")))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y2_siparis"]<>0))){?>
					<?php include('modules/dashboard/db_order_counts.php');?>
				<?php }?>
				<?php if(($m16==1 and (((in_array("1", $module["db_m16"]) and $mobile=="") or (in_array("2", $module["db_m16"]) and $mobile<>"")))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y2_siparis"]<>0))){?>
					<?php include('modules/dashboard/db_orders.php');?>
				<?php }?>
				<?php if($g9==3 or $g9==4){?>
					<?php include('modules/dashboard/db_seans.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_m15"]) and $mobile=="") or (in_array("2", $module["db_m15"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y1"]<>0))){?>
					<?php include('modules/dashboard/db_clients.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_relations"]) and $mobile=="") or (in_array("2", $module["db_relations"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y16"]<>0))){?>
					<?php include('modules/dashboard/db_client_relations.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_fis"]) and $mobile=="") or (in_array("2", $module["db_fis"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y23"]<>0))){?>
					<?php include('modules/dashboard/db_vouchers.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_req"]) and $mobile=="") or (in_array("2", $module["db_req"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y17"]<>0))){?>
					<?php include('modules/dashboard/db_requests.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_m14"]) and $mobile=="") or (in_array("2", $module["db_m14"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y0"]<>0))){?>
					<?php include('modules/dashboard/db_products.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_rproduct"]) and $mobile=="") or (in_array("2", $module["db_rproduct"]) and $mobile<>""))) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y0"]<>0))){?>
					<?php include('modules/dashboard/db_product_reports.php');?>
				<?php }?>
				<?php if(((((in_array("1", $module["db_g5"]) and $mobile=="") or (in_array("2", $module["db_g5"]) and $mobile<>""))) and $g5<>0) and ($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["y14"]<>0))){?>
					<?php include('modules/dashboard/db_services.php');?>
				<?php }?>
				<?php if($s20<>0 and (((in_array("1", $module["db_s20"]) and $mobile=="") or (in_array("2", $module["db_s20"]) and $mobile<>""))) and (($_SESSION["kim"]=="Admin") or ($_SESSION["kim"]=="yonetici" and $_SESSION["y20"]<>0)) ){?>
					<?php include('modules/dashboard/db_tasks.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_report"]) and $mobile=="") or (in_array("2", $module["db_report"]) and $mobile<>"")))){?>
					<?php include('modules/dashboard/db_report.php');?>
				<?php }?>
				<?php if((((in_array("1", $module["db_server"]) and $mobile=="") or (in_array("2", $module["db_server"]) and $mobile<>"")))){?>
					<?php include('modules/dashboard/db_server.php');?>
				<?php }?>
				<?php
				if($_SESSION["kim"]<>"yonetici"){
					if((((in_array("1", $module["db_logs"]) and $mobile=="") or (in_array("2", $module["db_logs"]) and $mobile<>"")))){
						?>
						<?php include('modules/dashboard/db_logs.php');?>
					<?php }}?>
					<?php if((((in_array("1", $module["db_cl"]) and $mobile=="") or (in_array("2", $module["db_cl"]) and $mobile<>"")))){?>
						<?php include('modules/dashboard/db_clogs.php');?>
					<?php }?>
				</div>
			</div>
			<!-- end: page -->
		</section>
	</div>
	<aside id="sidebar-right" class="sidebar-right">
		<div class="nano">
			<div class="nano-content">
				<a href="#" class="mobile-close d-md-none">
					Collapse <i class="fa fa-chevron-right"></i>
				</a>
				<div class="sidebar-right-wrapper">
					<div class="sidebar-widget widget-calendar dn">
						<h6><?php echo ctranslate("Takvim")?></h6>
						<div data-plugin-datepicker="" data-plugin-skin="dark"></div>
					</div>
					<div class="sidebar-widget">
						<h6><?php echo ctranslate("Teklifler")?></h6>
						<div class="timeline timeline-simple mt-3">
							<div class="tm-body" style="padding: 0px 0;">
								<ol class="tm-items" style="">
									<?php
									$sqlf = mysqli_query($conn, "select * from t4 where ne='service' order by id desc"); while($rsf=mysqli_fetch_assoc($sqlf)){
										if($rsf["t10"] <= date('Y-m-d', strtotime(date("Y-m-d"). ' 15 days'))){
											?>
											<li class="<?php if(tfark2(date('Y-m-d'),$rsf["t10"])>0){echo "text-success";}else{echo "text-danger";}?>">
												<?php echo tfark2(date('Y-m-d'),$rsf["t10"])?> <?php if(tfark2(date('Y-m-d'),$rsf["t10"])>0){echo ctranslate("Gün Kaldı");}else{echo ctranslate("Gün Geçti");}?><br><?php echo ctranslate("Teklif")?> {<?php echo $rsf["t1"]?>}
											</li>
										<?php }}?>
									</ol>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</aside>
	</section>