<?php
$path="../../";
include("../../map.php");
include("func.php");
echo "<script src=\"".$srvpath."/deppo/tools/jquery.js?sayfa=".$sayfa."&sayfa3=".$sayfa3."&id=".$id."&cpath=".v3e($cpath)."&crmpath=".v3e($crmpath)."&weburl=".v3e($weburl)."\"></script>";
?>
<div class="v3-col-md-<?php if($_GET["type"]==""){echo "6";}else{echo "12";}?>">
	<?php
	date_default_timezone_set('Europe/Istanbul');
	if($_GET["month"]<>""){
		$dates=explode(",",$_GET["month"]);
		$cgun=date("d"); $cay = date("n"); $cyil = date("Y");
		$ay = $dates[0];
		$yil = $dates[1];
	}elseif($_GET["date"]<>""){
		$dates=explode(",",$_GET["date"]);
		$cgun=$dates[0]; $cay = $dates[1]; $cyil = $dates[2];
		$ay = $dates[1];
		$yil = $dates[2];
	}else{
		$cgun=date("d"); $cay = date("n"); $cyil = date("Y");
		$ay = date("n");
		$yil = date("Y");
	}
	$users = json_decode(GetArr("","users",""), true);
	$notes = events("note", "".$cgun.",".$cay.",".$cyil."");
	$news = events("news", "".$cgun.",".$cay.",".$cyil."");
	$accounting = events("accounting", "".$cgun.",".$cay.",".$cyil."");
	$tasks = events("tasks", "".$cgun.",".$cay.",".$cyil."");
	$services = events("service", "".$cgun.",".$cay.",".$cyil."");
	$bids = events("bids", "".$cgun.",".$cay.",".$cyil."");
	$relations = events("relations", "".$cgun.",".$cay.",".$cyil."");
	$requests = events("reqs", "".$cgun.",".$cay.",".$cyil."");
	$rstatus = [0 => translate("#request_statu0"),1 => translate("#request_statu1"),2 => translate("#request_statu2"),3 => translate("#request_statu3"),4 => translate("#request_statu4")];
	$onceki_yil = $yil;
	$sonraki_yil = $yil;
	$onceki_ay = $ay-1;
	$sonraki_ay = $ay+1;
	if ($onceki_ay 	== 0  ) {$onceki_ay = 12; $onceki_yil = $yil - 1;}
	if ($sonraki_ay == 13 ) {$sonraki_ay = 1; $sonraki_yil = $yil + 1;}
	$zaman	= mktime(0,0,0,$ay,0,$yil);
	$maxgun = cal_days_in_month(CAL_GREGORIAN, $ay, $yil);
	$buay 	= getdate ($zaman);
	$ilkgun = $buay['wday'];
	?>
	<table style="width:100%;" class="v3_calendar noshadow">
		<tr align="center" class="ittr <?php if($_GET["type"]<>""){echo "dn";}?>">
			<th colspan="7">
				<table style="width:100%; border:0px; text-align:center;">
					<tr class="ittr">
						<th style="text-align:left;"> 
							<a onclick="jQuery('#events').load('modules/events/calendar_events.php?month=<?php echo $onceki_ay;?>,<?php echo $onceki_yil;?>')" class="oncekiay">
								&nbsp;&nbsp;<i class="fa fa-angle-double-left" aria-hidden="true"></i>&nbsp;&nbsp;<?php echo $aylar[$onceki_ay-1]?>
							</a>
						</th>
						<th colspan="5" style="text-align:center;"><?php echo $aylar[$ay-1]?> <?php echo $yil?></th>
						<th style="text-align:right;">
							<a onclick="jQuery('#events').load('modules/events/calendar_events.php?month=<?php echo $sonraki_ay;?>,<?php echo $sonraki_yil;?>')" class="sonrakiay">
								<?php echo $aylar[$sonraki_ay-1]?>&nbsp;&nbsp;<i class="fa fa-angle-double-right" aria-hidden="true"></i>
							</a> 
						</th>
					</tr>
				</table>
			</th>
		</tr>
		<tr class="ittr">
			<th scope="col" class="gbaslik week-end w14">Pt</th>
			<th scope="col" class="gbaslik w14">Sa</th>
			<th scope="col" class="gbaslik w14">Ça</th>
			<th scope="col" class="gbaslik w14">Pe</th>
			<th scope="col" class="gbaslik w14">Cu</th>
			<th scope="col" class="gbaslik w14">Ct</th>
			<th scope="col" class="gbaslik week-end w14">Pa</th>
		</tr>
		<tbody>
			<?php
			for ($d = 0; $d < ($maxgun + $ilkgun); $d++) {
				if (($d % 7) == 0) echo "<tr>\n";
				if ($d < $ilkgun) echo "<td class=\"unavailable\"></td>\n";
				else {
					$bugun = $d - $ilkgun + 1;
					$bay = !empty($ay) ? $ay : date("n");
					$gun = ($bugun == date("d") && $bay == date("n")) ? "bugun" : "";
					$style = "";
					if ($bugun == date("d") && $bay == date("m")) {
						$style = "style='background-color:#337ab7; color:#fff; font-weight:bold; font-size:20px'";
					} elseif ($d - $ilkgun + 1 >= date("d") && $bay == date("m")) {
						$style = "style='background-color:#fff; color:#999;'";
					} else {
						$style = "style='background-color:#fff; color:#999;'";
					}
					?>
					<td class="other-month td<?php echo $bugun?> cp" onclick="<?php if($_GET["ne"]==""){?>location.href='?ne=notlar&islem=notlar&date=<?php echo $bugun?>,<?php echo $ay?>,<?php echo $yil?>'<?php }else{?>jQuery('#events').load('modules/events/calendar_events.php?ne=notlar&islem=events&date=<?php echo $bugun?>,<?php echo $ay?>,<?php echo $yil?>');<?php }?>" <?php echo $style ?>>
						<?php echo $bugun; ?>
						<?php
						// Veritabanı sorgularını başlatıyoruz
						$cnews = 0; $cdots = 0; $cmoneys = 0; $cnotes = 0; $cservices = 0; $creqs=0;
						// Çek, senet ve notları kontrol et
						$sql = mysqli_query($conn, "SELECT * FROM t4 WHERE (ne='senet' OR ne='cek') $luye ORDER BY t2 ASC"); while ($rs = mysqli_fetch_assoc($sql)) {
							$tarih = DateTime::createFromFormat('Y-m-d', $rs["t4"]);
							if ($tarih !== false) {
								$gun  = $tarih->format("d");
								$ayy  = $tarih->format("m");
								$yill = $tarih->format("Y");
								if (($gun == $bugun && $ayy == $ay && $yill == $yil) || ($gun == $bugun && $rs["s3"] == 1)) {
									$cmoneys++;
								}
							}
						}
						// Haberleri kontrol et
						$sqlh = mysqli_query($conn, "SELECT * FROM ".$_SESSION["lang"]." WHERE ne='haber' $luye"); while ($rsh = mysqli_fetch_assoc($sqlh)) {
							if(empty($rsh["t9"])) continue; // T9 yoksa direk geç
							$start = $rsh["t4"]; $end   = $rsh["t9"] ?: $start;
							$startDate = new DateTime($start);
							$endDate   = new DateTime($end);
							while ($startDate <= $endDate) {
								$gun  = $startDate->format("d");
								$ayy  = $startDate->format("m");
								$yill = $startDate->format("Y");
								if (($gun == $bugun && $ayy == $ay && $yill == $yil) || ($gun == $bugun && $rsh["s3"] == 1)) {
									$cnews++;
								}
								$startDate->modify('+1 day');
							}
						}
						// Notlar
						$sqlc = mysqli_query($conn, "SELECT * FROM genel WHERE ne='not' $luye"); while ($events = mysqli_fetch_assoc($sqlc)) {
							$t5s = explode(",", $events["t5"]);
							if (in_array($_SESSION["user_id"], $t5s) || $_SESSION["user_id"] == $events["s19"]) {
								$start = $events["t4"];
								$end   = $events["t9"] ?: $start; // Eğer t9 boşsa t4 kullan
								// Tarih aralığında dön
								$startDate = new DateTime($start);
								$endDate   = new DateTime($end);
								while ($startDate <= $endDate) {
									$gun  = $startDate->format("d");
									$ayy  = $startDate->format("m");
									$yill = $startDate->format("Y");
									if (($gun == $bugun && $ayy == $ay && $yill == $yil) || ($gun == $bugun && $events["s3"] == 1)) {
										$cnotes++;
									}
									$startDate->modify('+1 day');
								}
							}
						}
						// Teklifler
						$sql = mysqli_query($conn, "select * from t4 where ne='service' $luye order by t2 asc");while ($rs = mysqli_fetch_assoc($sql)) {
							$dates = explode('-', $rs["t10"]);
							if ($dates[2] == $bugun && $dates[1] == $ay && $dates[0] == $yil) {
								$cservices++;
							}
						}
						// hizmetler
						$sql = mysqli_query($conn, "select * from t4 where ne='hizmet' $luye order by t2 asc");while ($rs = mysqli_fetch_assoc($sql)) {
							$dates = explode('-', $rs["t4"]);
							if (($dates[2] == $bugun && $dates[1] == $ay && $dates[0] == $yil) || ($dates[2] == $bugun && $rs["s3"] == 1)) {
								$cdots++;
							}
						}
						// Talepler
						$sql = mysqli_query($conn, "select * from t2 where ne='request' $luye order by id desc");while ($rs = mysqli_fetch_assoc($sql)) {
							$dates = explode('-', date('Y-m-d', strtotime($rs["ts2"])));
							if ($dates[2] == $bugun && $dates[1] == $ay && $dates[0] == $yil) {
								$creqs++;
							}
						}
						?>
						<div class="dot">
							<?php if ($cnews > 0) { echo "<div class='icon-container'><i class=\"far fa-calendar-check\" title=\"Etkinlik\"><span>" . $cnews . "</span></i></div>"; } ?>
							<?php if ($cdots > 0) { echo "<div class='icon-container'><i class=\"fas fa-bell\" title=\"Not, Hizmet, Görev vb\"><span>" . $cdots . "</span></i></div>"; } ?>
							<?php if ($cmoneys > 0) { echo "<div class='icon-container'><i class=\"fas fa-money-check\" title=\"Çek Senet\"><span>" . $cmoneys . "</span></i></div>"; } ?>
							<?php if ($cnotes > 0) { echo "<div class='icon-container'><i class=\"fas fa-sticky-note\" title=\"Not\"><span>" . $cnotes . "</span></i></div>"; } ?>
							<?php if ($cservices > 0) { echo "<div class='icon-container'><i class=\"fas fa-magic\" title=\"Teklif\"><span>" . $cservices . "</span></i></div>"; } ?>
							<?php if ($creqs > 0) { echo "<div class='icon-container'><i class=\"fa-solid fa-receipt\" title=\"Talep\"><span>" . $creqs . "</span></i></div>"; } ?>
						</div>
					</td>
					<?php
					if (($d % 7) == 6) echo "</tr>\n";
				}
			}
			?>
		</tbody>
	</table>
</div>
<div class="v3-col-md-6 mmt15 <?php if($_GET["type"]<>""){echo "dn";}?>">
	<div class="v3-list-group">
		<div href="#" class="v3-list-group-item v3-active">
			<?php echo $cgun?> <?php echo $aylar[$cay-1]?> <?php echo $cyil?>
			<a class="mfrm cp v3-btn-sm v3-btn-warning fr" style="margin-top: -5px;" data-toggle="modal" data-width="60%" data-target="#myModal" data-title="<?php echo $sdil[48]; //E-Ajanda?>" data-ref="?ne=<?php echo $_GET["ne"];?>&islem=<?php echo $_GET["islem"];?>&c=<?php echo $_GET["c"];?>&nedir=<?php echo $_GET["nedir"];?>" data-url="modules/events/note.php?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=nekle&gun=<?php echo $cgun;?>&ay=<?php echo $cay;?>&yil=<?php echo $cyil;?>"><i class="fas fa-plus"></i> <?php echo translate("Ekle")?></a>
		</div>
		<ul class="events event<?php echo $i-$ilkgun+1;?> e<?php echo $i-$ilkgun+1;?>" style="<?php //if($i-$ilkgun+1 < date("d")){echo "text-decoration: line-through;";}?>">
			<?php
			foreach($notes as $key=>$value){
				$t5s=""; $t5s .= ($value["t5"] == '0' || in_array('0', multivalues($value["t5"]))) ? '<span class="badge badge-warning">Admin</span>' : '';
				foreach($users as $key=>$val){ $t5s .= ($val["id"] == $value["t5"] || in_array($val["id"], multivalues($value["t5"]))) ? "<span class='badge badge-info'>".$val["item"]."</span>" : ''; }
			?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-target="#myModal" data-title="<?php echo $sdil[48]; //E-Ajanda?>" data-ref="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&gun=<?php echo $i-$ilkgun+1;?>&ay=<?php echo $bay;?>&yil=<?php echo $yil;?>" data-width="60%" data-url="modules/events/note.php?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&durum=noku&gun=<?php echo $cgun;?>&ay=<?php echo $bay;?>&yil=<?php echo $yil;?>&id=<?php echo $value["id"];?>" style="position: relative; padding: 5px; display: flow-root; <?php if((date("H:i") > $value["t2"] and ($value["t2"]<>"00:00")) and date("d") > $ddates[2]){echo "text-decoration: line-through;"; }?><?php if(date("d") >= $ddates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl"><?php echo $sdil[48]; //E-Ajanda?> > <i class="fa fa-<?php if($value["s3"]<>0){echo "refresh";}else{echo "sticky-note";}?>"></i> <?php echo $value["t1"] <> "" ? kisalt($value["t1"],99) : kisalt($value["n1"],99);?></div><div  class="w50 fr tar mw50 mfr mtar"><?= $value["pb2"] > 0 ? wprice($value["pb2"]).' '.$ikpb : '' ?></div>
					<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo empty(rtrim($t5s, ', ')) ? "..." : rtrim($t5s, ', ');?></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo !empty($value["t9"]) ? dtarih($value["t4"], "gg ka yy") . " - " . dtarih($value["t9"], "gg ka yy") : dtarih($value["t4"], "gg ka yy"); ?></div>
					<?php if($_SESSION["kim"]=="Admin" or ($_SESSION["kim"]=="yonetici" and $_SESSION["user_id"]==$value["s19"])){?><a class=" fas fa-times btn-delete-div" data-href="modules/events/note.php?ne=notlar&islem=notlar&id=<?php echo $value["id"];?>&durum=snot" style="padding: 1px; border: 0px;"></a><?php }?>
				</li>
			<?php }?>
			<?php foreach($news as $key=>$value){?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/pages/page.php?ne=haber&islem=dhaber&gun=<?php echo $cgun;?>&ay=<?php echo $bay;?>&yil=<?php echo $yil;?>&id=<?php echo $value["id"];?>" style="position: relative; padding: 5px; display: flow-root; margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl">Etkinlik > <i class="fa fa-<?php if($value["s3"]<>0){echo "refresh";}else{echo "map-pin";}?>"></i> <?php echo $value["t1"]?></div><div  class="w50 fr tar mw50 mfr mtar"></div>
					<div class="w70 fl mw70 mfl"></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo !empty($value["t9"]) ? dtarih($value["t4"], "gg ka yy") . " - " . dtarih($value["t9"], "gg ka yy") : dtarih($value["t4"], "gg ka yy"); ?></div>
					<a class=" fas fa-times btn-delete-div" data-href="#" style="padding: 1px; border: 0px;"></a>
				</li>
			<?php }?>
			<?php foreach($accounting as $key=>$value){?>
				<?php if($value["ne"]=="service"){?>
					<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/accounting/accounting_bill.php?ne=muhasebe&islem=senet&durum=filtre&s3=&s13=&id=&key=&ts1=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>&ts2=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>" style="position: relative; padding: 5px; display: flow-root; margin-top: 2px; border: 1px solid silver; border-radius:5px;">
						<div class="w50 fl mw50 mfl">Teklif > <i class="fas fa-money-check"></i> <?php echo $value["n1"]?></div><div  class="w50 fr tar mw50 mfr mtar"></div>
						<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div>  <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["t4"], "gg ka yy"); ?></div>
					</li>
				<?php }elseif($value["ne"]=="senet"){?>
					<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/accounting/accounting_bill.php?ne=muhasebe&islem=senet&durum=filtre&s3=&s13=&id=&key=&ts1=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>&ts2=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>" style="position: relative; padding: 5px; display: flow-root; margin-top: 2px; border: 1px solid silver; border-radius:5px;">
						<div class="w50 fl mw50 mfl">Senet > <i class="fas fa-money-check"></i> <?php echo $value["n1"]?></div><div  class="w50 fr tar mw50 mfr mtar"></div>
						<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div>  <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["t4"], "gg ka yy"); ?></div>
					</li>
				<?php }elseif($value["ne"]=="cek"){?>
					<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/accounting/accounting_bank_cheque.php?ne=muhasebe&islem=cek&durum=filtre&s3=&s13=&id=&key=&ts1=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>&ts2=<?php echo $cyil?>-<?php echo $cay?>-<?php echo $cgun?>" style="position: relative; padding: 5px; display: flow-root; margin-top: 2px; border: 1px solid silver; border-radius:5px;">
						<div class="w50 fl mw50 mfl">Çek > <i class="fas fa-money-check"></i> <?php echo $value["n1"]?></div><div  class="w50 fr tar mw50 mfr mtar"></div>
						<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div>  <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["t4"], "gg ka yy"); ?></div>
					</li>
				<?php }?>
			<?php }?>
			<?php foreach($tasks as $key=>$value){?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-success" style="position: relative; <?php if((date("H:i") > $value["t2"] and ($value["t2"]<>"00:00")) and date("d") > $dates[2] ){echo "text-decoration: line-through;"; }?><?php if(date("d") >= $dates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<a class="mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/tasks/task.php?ne=gorev&islem=dgorev&id=<?php echo $value["id"];?>" style="cursor:pointer; color:#999 !important;"><b style="color:#999 !important; width:auto;">__:__</b> <i class="fa fa-<?php if($value["s3"]<>0){echo "refresh";}else{echo "map-pin";}?>" style="float: left; margin-top: 0px; margin-left: -10px; margin-right: 5px; font-size: 10px; color: orange;"></i> <?php echo $value["t1"];?></a>
				</li>
			<?php }?>
			<?php foreach($bids as $key=>$value){?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning mfrm cp" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/services/service.php?ne=service&islem=dservice&id=<?php echo $value["id"];?>" style="position: relative; padding: 5px; display: flow-root; <?php if((date("H:i") > $value["t2"] and ($value["t2"]<>"00:00")) and date("d") > $dates[2] ){echo "text-decoration: line-through;"; }?><?php if(date("d") >= $dates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl"><?php echo $t36; //Servis?> > <?php if($value["s13"]==0){?><i class="fa fa-clock-o text-warning"></i><?php }elseif($value["s13"]==1){?><i class="fa fa-paper-plane text-warning"></i><?php }elseif($value["s13"]==2){?><i class="fa fa-envelope-open-o text-info"></i><?php }elseif($value["s13"]==3){?><i class="fa fa-check text-success"></i><?php }elseif($value["s13"]==4){?><i class="fa fa-ban text-danger"></i><?php }?> <?php echo $value["n2"]?></div><div  class="w50 fr tar mw50 mfr mtar"><?= $value["pb2"] > 0 ? wprice($value["pb2"]).' '.$ikpb : '' ?></div>
					<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["t9"],"gg ka yy")?></div>			
				</li>
			<?php }?>
			<?php foreach($requests as $key=>$value){ $rjsi = json_decode($value["n2"],true);?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning mfrm cp" data-toggle="modal" data-width="99%" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/requests/request.php?ne=request&islem=request&id=<?php echo $value["id"];?>" style="position: relative; padding: 5px; display: flow-root; <?php if((date("H:i") > $value["t2"] and ($value["t2"]<>"00:00")) and date("d") > $dates[2] ){echo "text-decoration: line-through;"; }?><?php if(date("d") >= $dates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl">Talep > <i class="fa-solid fa-receipt"></i> <?php echo $rjsi["Konu"]?></div><div  class="w50 fr tar mw50 mfr mtar"><?php echo $rstatus[$value["s4"]]?></div>
					<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["ts2"],"gg ka yy")?></div>			
				</li>
			<?php }?>
			<?php foreach($services as $key=>$value){?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning mfrm cp" data-toggle="modal" data-target="#myModal" data-title="#<?php echo $value["id"]?>" data-url="modules/clients/client.php?islem=duye&ne=uye&id=<?php echo $value["s1"];?>#&tab-hizmet" style="position: relative;padding: 5px; display: flow-root; <?php if((date("H:i") > $value["t2"] and ($value["t2"]<>"00:00")) and date("d") > $dates[2] ){echo "text-decoration: line-through;"; }?><?php if(date("d") >= $dates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl"><?php echo $sdil[167]; //Hizmet?> > <i class="fa fa-clock-o"></i> <?php echo $value["n1"]?></div><div  class="w50 fr tar mw50 mfr mtar"></div>
					<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div> <div  class="w30 fr mw30 mfr tar mtar"><?php echo dtarih($value["t4"],"gg ka yy")?></div>
				</li>
			<?php }?>
			<?php foreach($relations as $key=>$value){?>
				<li data-id="<?php echo $value["id"];?>" class="cparent bg-warning cp mfrm" data-toggle="modal" data-width="99%" data-target="#myModal" data-ref="?ne=<?php echo $_GET["ne"]?>&islem=<?php echo $_GET["islem"]?>&gun=<?php echo $i-$ilkgun+1;?>&ay=<?php echo $bay;?>&yil=<?php echo $yil;?>" data-url="fonksiyon.php?islem=relations&id=<?php echo $value["id"]?>" data-title="<?php echo $t25s[0];?> <?php echo translate("İlişkileri")?>; <?php echo $valuec["t1"]?>" style="position: relative; padding: 5px; display: flow-root; <?php if(date("d") >= $dates[2] and $_GET["ay"]==""){?>color: #ccc;<?php }?>margin-top: 2px; border: 1px solid silver; border-radius:5px;">
					<div class="w50 fl mw50 mfl"><?php echo $t25s[0];?> <?php echo translate("İlişkileri")?> > <i class="fa fa-bell"></i> <?php echo $value["t1"]?></div><div  class="w50 fr tar mw50 mfr mtar"><?php echo $value["t4"]?></div>
					<div class="w70 fl mw70 mfl"><i class="fa fa-user"></i> <?php echo $value["uname"];?></div> <div  class="w30 fr mw30 mfr tar mtar"></div>
				</li>
			<?php }?>
		</ul>
	</div>
</div>