<?php $this->load->view('includes/head') ?>
<?php $this->load->view('includes/topbar') ?>
<?php $this->load->view('includes/header') ?>
<link rel="stylesheet" type="text/css" href="<?=base_url('assets/css/calendar.css');?>">
<style type="text/css">
	/* Ensures the modal is centered and responsive */
	.modal-dialog-centered {
		display: flex;
		align-items: center;
		min-height: calc(100% - 1rem);
	}

	.icon-box {
		max-width: 100px;
		max-height: 100px;
	}

	@media (max-width: 767.98px) {
		.modal-lg {
			max-width: 100%;
			margin: 1.75rem auto;
		}
	}

</style>
<main id="main">

	<div class="container py-5">
		<div class="d-flex" style="align-content: stretch;
		justify-content: space-between;">
		<a href="javascript:void(0)" class="btn btn-success" target="_blank" style="margin-bottom: 21px; background: #0c7600; border: 1px solid white; padding: 10px 17px; border-radius: 10px!important; font-size: 17px; box-shadow: 1px 1px 10px #5e5e5e;"><i class="fa fa-download"></i> Yearly Calendar</a>
		<ul id="tabs" class="nav nav-tabs nav-fill" style="border: 0px; box-shadow: 1px -4px 8px grey; margin: 15px; padding: 0px;">
			<li class="nav-item"><a href="javascript:void(0)"  tab-name="calendar" data-toggle="tab" class="calendar-type  nav-link active rounded-0 border-0 m-0">Calender</a></li>
			<li class="nav-item"><a href="javascript:void(0)" tab-name="Religious" data-toggle="tab" class="calendar-type nav-link  rounded-0  border-0 m-0">Religious</a></li>
		</ul>
	</div>
	<?php
	$header_data = getWebSyncsData('Header Settings', 'headerSettings', '');
	?>

	<!-- Modal Event HTML -->
	<div id="modalevent" class="modal modal-lg fade " tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg modal-dialog-centered modal-confirm px-5">


			<div class="modal-content" style="background-image:url('<?= base_url("assets/img/63f8592dd5885.jpg") ?>');position: relative;background-size: contain;">


				<div class="modal-header">
					<img src="<?= $header_data[0]['leftImage'] ? ApiBaseUrl()['url'] . $header_data[0]['leftImage'] :  base_url('assets/img/logo-1.png') ?>" class="icon-box">
					<h4 class="modal-title w-100 btottomborder">Panchangam Details</h4>

				</div>


				<div class="modal-body p-0">
					<table class="table table-responsive table-bordered mt-4" style="background: #ffffff3b;">
						<tbody id="calendarEventDetails">
						</tbody>
					</table>
				</div>


				<div class="modal-footer p-0">
					<button type="button" class="mx-auto d-block btn btn-secondary" data-bs-dismiss="modal">Close</button>
				</div>
			</div>
		</div>
	</div>
	<!-- End Modal HTML -->


	<!-- PANCHANGAM Modal  -->
	<div id="modalpanchangam" class="modal modal-lg fade" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg modal-dialog-centered modal-confirm px-5">


			<div class="modal-content" style="background-image:url('<?= base_url("assets/img/63f8592dd5885.jpg") ?>');position: relative;background-size: contain;">
				

				<div class="modal-header">
					<img src="<?= $header_data[0]['leftImage'] ? ApiBaseUrl()['url'] . $header_data[0]['leftImage'] :  base_url('assets/img/logo-1.png') ?>" class="icon-box">
					<h4 class="modal-title w-100 bottomborder">Panchangam Details</h4>

				</div>


				<div class="modal-body p-0">
					<table class="table table-responsive table-bordered mt-4" style="background: #ffffff3b;;">
						<tbody id="calendarPnachangamDetails" style="text-align: center; text-shadow: 1px 2px 4px #980c3c69;">

						</tbody>
					</table>
				</div>
				<div class="modal-footer p-0">
					<button type="button" class="mx-auto d-block btn btn-secondary" data-bs-dismiss="modal">Close</button>
				</div>
			</div>

		</div>
	</div>
	<!-- End PANCHANGAM modal -->
	<div class="calendar" id="calendar">
	</div>
	<div class="Religiouscalendar" id="Religiouscalendar">
	</div>

</div>
</main>
<?php

$evereyArray = array(
	'EVERY SUNDAY' => 0,
	'EVERY MONDAY' => 1,
	'EVERY TUESDAY' => 2,
	'EVERY WEDNESDAY' => 3,
	'EVERY THURSDAY' => 4,
	'EVERY FRIDAY' => 5,
	'EVERY SATURDAY' => 6,
	'EVERY DAY' => '0, 1, 2, 3, 4, 5, 6',
	'' => '',

);
	///echo  '<pre>'; print_r($calendar_events);
$html = '';
if (!empty($calendar_events)) {
	foreach ($calendar_events as $key => $value) {

		$html .= ' {';
		$html .= 'title:"' . trim($value['refDataName']) . '",';
			// $html .= 'url:"newpage.php/'.trim($value['_id']).'",';
		if (!empty($value['eventDate'])) {
			if (empty($value['startTime'])) {
				$html .= 'start: "' . (date('Y-m-d', strtotime($value['eventDate']))) . '",';
			} else {
				$html .= 'start: "' . (date('Y-m-d', strtotime($value['eventDate'])) . 'T' . date('H:i:s', strtotime($value['startTime']))) . '",';
			}
			if (empty($value['endTime'])) {
				$html .= 'end: "' . (date('Y-m-d', strtotime($value['eventDate']))) . '",';
			} else {
				$html .= 'end: "' . (date('Y-m-d', strtotime($value['eventDate'])) . 'T' . date('H:i:s', strtotime($value['endTime']))) . '",';
			}
		} else {

			$html .= 'start: "' . (date('H:i', strtotime($value['startTime']))) . '",';
			$html .= 'end: "' . (date('H:i', strtotime($value['endTime']))) . '",';
		}
		if (!empty($value['colour'])) {
			$html .= 'backgroundColor:"' . $value['colour'] . '",';
		}

		if (!empty($value['dayTypes'])) {
			$html .= 'dow:"[' . @$evereyArray[$value['dayTypes']] . ']",';
		}

		$html .= 'c_id:"' . @$value['_id'] . '",';
		$html .= 'c_refDataName:"' . camelCase(@$value['refDataName']) . '",';
		$html .= 'c_dayTypes:"' . camelCase(@$value['dayTypes']) . '",';
		$html .= 'c_eventDate:"' . @$value['eventDate'] . '",';
		$html .= 'c_startTime:"' . @$value['startTime'] . '",';
		$html .= 'c_endTime:"' . @$value['endTime'] . '",';
		$html .= 'c_colour:"' . @$value['colour'] . '",';
		$html .= 'c_moduleName:"' . @$value['moduleName'] . '",';
		$html .= 'c_clientID:"' . @$value['clientID'] . '",';
		$html .= 'c_productID:"' . @$value['productID'] . '",';
		$html .= 'c_aspectType:"' . @$value['aspectType'] . '",';
		$html .= 'c_recCreBy:"' . @$value['recCreBy'] . '",';
		$html .= 'c_recCreDate:"' . @$value['recCreDate'] . '",';
		$html .= 'c_recModBy:"' . @$value['recModBy'] . '",';
		$html .= 'c_recModDate:"' . @$value['recModDate'] . '",';


		$html .= ' },';
	}
}

?>

<!-- <script type="text/javascript">
	$(document).ready(function() {
		var d = new Date();
		var strDate = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();

		var activeTabName = $("#AdministratorTab").attr('tab-name');

		if (activeTabName === 'calendar') {
			$('#Religiouscalendar').hide();
			$('#calendar').fullCalendar({
			//locale: 'zh-cn',
				header: {
					left: 'prev,next today',
					center: 'title',
					right: 'month,basicWeek,basicDay,list'
				},
				defaultDate: strDate,
			//defaultDate: '2022-11-12',
			navLinks: true, // can click day/week names to navigate views
			editable: false,
			eventLimit: true, // allow "more" link when too many events


			events: [
				<?= $html; ?>
				],
			displayEventTime: false,

			eventRender: function(event, element, view) {
				element.click(function() {


					var html = '';
					html += '<tr><th>Event</th><td> <span id="event_name">' + event.c_refDataName + '</span></td></tr>';

					if (event.c_dayTypes) {
						html += '<tr><th>Day</th><td> <span id="event_day">' + event.c_dayTypes + '</span></td></tr>';
					}

					if (event.c_eventDate) {
						html += '<tr><th>Date</th><td> <span id="event_date">' + event.c_eventDate + '</span></td></tr>';
					}

					if (event.c_startTime) {
						html += '<tr><th>Start&nbspTime</th><td> <span id="start_time">' + event.c_startTime + '</span></td></tr>';
					}

					if (event.c_endTime) {
						html += '<tr><th>End&nbspTime</th><td> <span id="end_time">' + event.c_endTime + '</span></td></tr>';
					}

					//alert(html);

					$("#calendarEventDetails").html(html);

					$('#modalevent').modal('show');


				})
			}

		});
		} else {
			$('#Religiouscalendar').show();
			alert();
		}

	});
</script> -->

<?php

$html2 = '';
if (!empty($religious_data)) {
	foreach ($religious_data as $key => $value) {

		$html2 .= ' {';
		$html2 .= 'title:"' . trim($value['location']).'",';
		// $html2 .= 'c_colour:"' . @$value['colour'] . '",';
		if (!empty(@$value['colour'])) {
			$html2 .= 'backgroundColor:"' . @$value['colour'] . '",';
		}
		else{
			$html2 .= 'backgroundColor:"#fff",';
		}
		$html2 .= 'PurnimantaMonth:"' . trim($value['PurnimantaMonth']) . '",';
		$html2 .= 'MoonRise:"' . trim($value['MoonRise']) . '",';
		$html2 .= 'MoonSet:"' . trim($value['MoonSet']) . '",';

		$html2 .= 'SunRise:"' . trim($value['SunRise']) . '",';
		$html2 .= 'SunSet:"' . trim($value['SunSet']) . '",';
		$html2 .= 'Tithi:"' . trim($value['Tithi']) . '",';
		$html2 .= 'Paksha:"' . trim($value['Paksha']) . '",';

		$html2 .= 'ShakaSamvat:"' . trim(@$value['ShakaSamvat']) . '",';
		$html2 .= 'VikramSamvat:"' . trim(@$value['VikramSamvat']) . '",';
		$html2 .= 'GujaratiSamvat:"' . trim(@$value['GujaratiSamvat']) . '",';
		$html2 .= 'AmantaMonth:"' . trim(@$value['AmantaMonth']) . '",';

		$html2 .= 'PurnimantaMonth:"' . trim(@$value['PurnimantaMonth']) . '",';
		$html2 .= 'Weekday:"' . trim(@$value['Weekday']) . '",';
		$html2 .= 'Paksha:"' . trim(@$value['Paksha']) . '",';
		$html2 .= 'Tithi:"' . trim(@$value['Tithi']) . '",';

		$html2 .= 'Nakshatra:"' . trim(@$value['Nakshatra']) . '",';
		$html2 .= 'Yoga:"' . trim(@$value['Yoga']) . '",';
		$html2 .= 'Karana:"' . trim(@$value['Karana']) . '",';
		$html2 .= 'Karana2:"' . trim(@$value['Karana2']) . '",';

		$html2 .= 'Sunsign:"' . trim(@$value['Sunsign']) . '",';
		$html2 .= 'RahuKalam:"' . trim(@$value['RahuKalam']) . '",';
		$html2 .= 'GulikaiKalam:"' . trim(@$value['GulikaiKalam']) . '",';
		$html2 .= 'Yamaganda:"' . trim(@$value['Yamaganda']) . '",';

		$html2 .= 'DurMuhurtam:"' . trim(@$value['DurMuhurtam']) . '",';
		$html2 .= 'DurMuhurtam2:"' . trim(@$value['DurMuhurtam2']) . '",';
		$html2 .= 'AmritKalam:"' . trim(@$value['AmritKalam']) . '",';
		$html2 .= 'Varjyam:"' . trim(@$value['Varjyam']) . '",';
		
		$html2 .= 'start: "' . (date('Y-m-d', strtotime(@$value['startDate']))) . '",';
		$html2 .= ' },';
	}
}

?>


<script>


	$(document).ready(function() {

		var d = new Date();
		var strDate = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();

    // Initialize the main calendar
		$('#calendar').fullCalendar({
        //locale: 'zh-cn',
			header: {
				left: 'prev,next today',
				center: 'title',
				right: 'month,basicWeek,basicDay,list'
			},
			defaultDate: strDate,
        //defaultDate: '2022-11-12',
        navLinks: true, // can click day/week names to navigate views
        editable: false,
        eventLimit: true, // allow "more" link when too many events
        events: [
        	<?= $html; ?>
        	],
        displayEventTime: true,
        eventRender: function(event, element, view) {
        	element.click(function() {


        		var html = '';
        		html += '<tr><th>Event</th><td> <span id="event_name">' + event.c_refDataName + '</span></td></tr>';

        		if (event.c_dayTypes) {
        			html += '<tr><th>Day</th><td> <span id="event_day">' + event.c_dayTypes + '</span></td></tr>';
        		}

        		if (event.c_eventDate) {
        			html += '<tr><th>Date</th><td> <span id="event_date">' + event.c_eventDate + '</span></td></tr>';
        		}

        		if (event.c_startTime) {
        			html += '<tr><th>Start&nbspTime</th><td> <span id="start_time">' + event.c_startTime + '</span></td></tr>';
        		}

        		if (event.c_endTime) {
        			html += '<tr><th>End&nbspTime</th><td> <span id="end_time">' + event.c_endTime + '</span></td></tr>';
        		}

					//alert(html);

        		$("#calendarEventDetails").html(html);

        		$('#modalevent').modal('show');


        	})
        }
    });

    // Hide the religious calendar initially
		$('#Religiouscalendar').hide();

    // Event handler for tab clicks
		$('.calendar-type').on('click', function() {
			var activeTabName = $(this).attr('tab-name');

			if (activeTabName === 'calendar') {
				$('#calendar').show();
				$('#Religiouscalendar').hide();
			} else {
				$('#calendar').hide();
				$('#Religiouscalendar').show();

            // Initialize the religious calendar if not already initialized
				if (!$('#Religiouscalendar').hasClass('initialized')) {
					var d1 = new Date();
					var strDate1 = d1.getFullYear() + "/" + (d1.getMonth() + 1) + "/" + d1.getDate();
					$('#Religiouscalendar').fullCalendar({
						header: {
							left: 'prev,next today',
							center: 'title',
							right: 'month,basicWeek,basicDay,list'
						},
						defaultDate: strDate1,
						navLinks: true,
						editable: false,
						eventLimit: true,
						events: [
							<?= $html2; ?>
							],
						displayEventTime: false,
						eventRender: function(event, element) {
							element.find(".fc-title").html('<span class="location"><i style="color:orange;" class="fa fa-sun-o"></i>&nbsp;'+event.SunRise+'</span>&nbsp;<span class="location"><i style="color:orange;" class="fa fa-moon-o"></i>&nbsp;'+event.SunSet+'</span><br/><span class="tithi" style=""><i style="color:green;" class="fa fa-calendar-times-o"></i>&nbsp;'+event.Tithi+'</span><br/><span class="paksha" style="">'+event.Paksha+'</span>');
							element.click(function() {
								var html2 = '';
								html2 += '<tr><th class="fw-bold">Location</th><td> <span id="event_name"> ' + event.title + '</span></td></tr>';
								if (event.SunRise) {
									html2 += '<tr><th class="fw-bold">Sun Rise</th><td> <span id="sun_rise">' + event.SunRise + '</span></td></tr>';
								}

								if (event.SunSet) {
									html2 += '<tr><th class="fw-bold">Sun Set</th><td> <span id="sun_set">' + event.SunSet + '</span></td></tr>';
								}

								if (event.MoonRise) {
									html2 += '<tr><th class="fw-bold">Moon Rise</th><td> <span id="moon_rise">' + event.MoonRise + '</span></td></tr>';
								}


								if (event.MoonSet) {
									html2 += '<tr><th class="fw-bold">Moon Set</th><td> <span id="moon_set">' + event.MoonSet + '</span></td></tr>';
								}

								if (event.ShakaSamvat) {
									html2 += '<tr><th class="fw-bold">Shaka Samvat</th><td> <span id="shaka_samvat">' + event.ShakaSamvat + '</span></td></tr>';
								}

								if (event.VikramSamvat) {
									html2 += '<tr><th class="fw-bold">Vikram Samvat</th><td> <span id="vikram_samvat">' + event.VikramSamvat + '</span></td></tr>';
								}

								if (event.GujaratiSamvat) {
									html2 += '<tr><th class="fw-bold">Gujarati Samvat</th><td> <span id="gujarati_samvat">' + event.GujaratiSamvat + '</span></td></tr>';
								}

								if (event.AmantaMonth) {
									html2 += '<tr><th class="fw-bold">Amanta Month</th><td> <span id="amanta_month">' + event.AmantaMonth + '</span></td></tr>';
								}

								if (event.PurnimantaMonth) {
									html2 += '<tr><th class="fw-bold">Purnimanta Month</th><td> <span id="purnimanta_month">' + event.PurnimantaMonth + '</span></td></tr>';
								}

								if (event.Weekday) {
									html2 += '<tr><th class="fw-bold">Weekday</th><td> <span id="weekday">' + event.Weekday + '</span></td></tr>';
								}

								if (event.Paksha) {
									html2 += '<tr><th class="fw-bold">Paksha</th><td> <span id="paksha">' + event.Paksha + '</span></td></tr>';
								}

								if (event.Tithi) {
									html2 += '<tr><th class="fw-bold">Tithi</th><td> <span id="tithi">' + event.Tithi + '</span></td></tr>';
								}

								if (event.Nakshatra) {
									html2 += '<tr><th class="fw-bold">Nakshatra</th><td> <span id="nakshatra">' + event.Nakshatra + '</span></td></tr>';
								}

								if (event.Yoga) {
									html2 += '<tr><th class="fw-bold">Yoga</th><td> <span id="yoga">' + event.Yoga + '</span></td></tr>';
								}

								if (event.Karana) {
									html2 += '<tr><th class="fw-bold">Karana</th><td> <span id="karana">' + event.Karana + '</span></td></tr>';
								}

								if (event.Karana2) {
									html2 += '<tr><th class="fw-bold">Karana 2</th><td> <span id="karana2">' + event.Karana2 + '</span></td></tr>';
								}

								if (event.Sunsign) {
									html2 += '<tr><th class="fw-bold">Sunsign</th><td> <span id="sunsign">' + event.Sunsign + '</span></td></tr>';
								}

								if (event.RahuKalam) {
									html2 += '<tr><th class="fw-bold">Rahu Kalam</th><td> <span id="rahukalam">' + event.RahuKalam + '</span></td></tr>';
								}

								if (event.GulikaiKalam) {
									html2 += '<tr><th class="fw-bold">Gulikai Kalam</th><td> <span id="gulikaikalam">' + event.GulikaiKalam + '</span></td></tr>';
								}

								if (event.Yamaganda) {
									html2 += '<tr><th class="fw-bold">Yamaganda</th><td> <span id="yamaganda">' + event.Yamaganda + '</span></td></tr>';
								}

								if (event.DurMuhurtam) {
									html2 += '<tr><th class="fw-bold">Dur Muhurtam</th><td> <span id="durmuhurtam">' + event.DurMuhurtam + '</span></td></tr>';
								}

								if (event.DurMuhurtam2) {
									html2 += '<tr><th class="fw-bold">Dur Muhurtam 2</th><td> <span id="durmuhurtam2">' + event.DurMuhurtam2 + '</span></td></tr>';
								}

								if (event.AmritKalam) {
									html2 += '<tr><th class="fw-bold">Amrit Kalam</th><td> <span id="amritkalam">' + event.AmritKalam + '</span></td></tr>';
								}

								if (event.Varjyam) {
									html2 += '<tr><th class="fw-bold">Varjyam</th><td> <span id="varjyam">' + event.Varjyam + '</span></td></tr>';
								}



								$("#calendarPnachangamDetails").html(html2);
								$('#modalpanchangam').modal('show');
							});
}
});
$('#Religiouscalendar').addClass('initialized');
}
}
});
});


// 	$(document).ready(function() {
// 		$('.calendar-type').on('click', function() {
// 			var activeTabName = $(this).attr('tab-name');

// 			if (activeTabName === 'calendar') {
// 				$('#calendar').fullCalendar({
// 			//locale: 'zh-cn',
// 					header: {
// 						left: 'prev,next today',
// 						center: 'title',
// 						right: 'month,basicWeek,basicDay,list'
// 					},
// 					defaultDate: strDate,
// 			//defaultDate: '2022-11-12',
// 			navLinks: true, // can click day/week names to navigate views
// 			editable: false,
// 			eventLimit: true, // allow "more" link when too many events


// 			events: [
// 				<?= $html; ?>
// 				],
// 			displayEventTime: false,

// 			eventRender: function(event, element, view) {
// 				element.click(function() {


// 					var html = '';
// 					html += '<tr><th>Event</th><td> <span id="event_name">' + event.c_refDataName + '</span></td></tr>';

// 					if (event.c_dayTypes) {
// 						html += '<tr><th>Day</th><td> <span id="event_day">' + event.c_dayTypes + '</span></td></tr>';
// 					}

// 					if (event.c_eventDate) {
// 						html += '<tr><th>Date</th><td> <span id="event_date">' + event.c_eventDate + '</span></td></tr>';
// 					}

// 					if (event.c_startTime) {
// 						html += '<tr><th>Start&nbspTime</th><td> <span id="start_time">' + event.c_startTime + '</span></td></tr>';
// 					}

// 					if (event.c_endTime) {
// 						html += '<tr><th>End&nbspTime</th><td> <span id="end_time">' + event.c_endTime + '</span></td></tr>';
// 					}

// 					//alert(html);

// 					$("#calendarEventDetails").html(html);

// 					$('#modalevent').modal('show');


// 				})
// 			}

// 		});
// 				$('#Religiouscalendar').hide();
// 			} else {
// 				$('#calendar').hide();

// 				$(document).ready(function() {
// 					var d1 = new Date();
// 					var strDate1 = d1.getFullYear() + "/" + (d1.getMonth() + 1) + "/" + d1.getDate();

// 					$('#Religiouscalendar').fullCalendar({
// 						header: {
// 							left: 'prev,next today',
// 							center: 'title',
// 							right: 'month,basicWeek,basicDay,list'
// 						},
// 						defaultDate: strDate1,
// 						navLinks: true,
// 						editable: false,
// 						eventLimit: true,
// 						events: [
// 							<?= $html2; ?>
// 							],
// 						displayEventTime: false,

// 						eventRender: function(event, element) {
// 							element.find(".fc-title").html('<span class="location"><i style="color:orange;" class="fa fa-sun-o"></i>&nbsp;'+event.SunRise+'</span>&nbsp;<span class="location"><i style="color:orange;" class="fa fa-moon-o"></i>&nbsp;'+event.SunSet+'</span><br/><spna class="tithi" style=""><i style="color:green;" class="fa fa-calendar-times-o"></i>&nbsp;'+event.Tithi+'</span><br/><spna class="paksha" style="">'+event.Paksha+'</span>');

// 							element.click(function() {
// 								var html2 = '';
// 								html2 += '<tr><th class="fw-bold">Location</th><td> <span id="event_name"> ' + event.title + '</span></td></tr>';
// 								if (event.SunRise) {
// 									html2 += '<tr><th class="fw-bold">Sun Rise</th><td> <span id="sun_rise">' + event.SunRise + '</span></td></tr>';
// 								}

// 								if (event.SunSet) {
// 									html2 += '<tr><th class="fw-bold">Sun Set</th><td> <span id="sun_set">' + event.SunSet + '</span></td></tr>';
// 								}

// 								if (event.MoonRise) {
// 									html2 += '<tr><th class="fw-bold">Moon Rise</th><td> <span id="moon_rise">' + event.MoonRise + '</span></td></tr>';
// 								}


// 								if (event.MoonSet) {
// 									html2 += '<tr><th class="fw-bold">Moon Set</th><td> <span id="moon_set">' + event.MoonSet + '</span></td></tr>';
// 								}

// 								if (event.ShakaSamvat) {
// 									html2 += '<tr><th class="fw-bold">Shaka Samvat</th><td> <span id="shaka_samvat">' + event.ShakaSamvat + '</span></td></tr>';
// 								}

// 								if (event.VikramSamvat) {
// 									html2 += '<tr><th class="fw-bold">Vikram Samvat</th><td> <span id="vikram_samvat">' + event.VikramSamvat + '</span></td></tr>';
// 								}

// 								if (event.GujaratiSamvat) {
// 									html2 += '<tr><th class="fw-bold">Gujarati Samvat</th><td> <span id="gujarati_samvat">' + event.GujaratiSamvat + '</span></td></tr>';
// 								}

// 								if (event.AmantaMonth) {
// 									html2 += '<tr><th class="fw-bold">Amanta Month</th><td> <span id="amanta_month">' + event.AmantaMonth + '</span></td></tr>';
// 								}

// 								if (event.PurnimantaMonth) {
// 									html2 += '<tr><th class="fw-bold">Purnimanta Month</th><td> <span id="purnimanta_month">' + event.PurnimantaMonth + '</span></td></tr>';
// 								}

// 								if (event.Weekday) {
// 									html2 += '<tr><th class="fw-bold">Weekday</th><td> <span id="weekday">' + event.Weekday + '</span></td></tr>';
// 								}

// 								if (event.Paksha) {
// 									html2 += '<tr><th class="fw-bold">Paksha</th><td> <span id="paksha">' + event.Paksha + '</span></td></tr>';
// 								}

// 								if (event.Tithi) {
// 									html2 += '<tr><th class="fw-bold">Tithi</th><td> <span id="tithi">' + event.Tithi + '</span></td></tr>';
// 								}

// 								if (event.Nakshatra) {
// 									html2 += '<tr><th class="fw-bold">Nakshatra</th><td> <span id="nakshatra">' + event.Nakshatra + '</span></td></tr>';
// 								}

// 								if (event.Yoga) {
// 									html2 += '<tr><th class="fw-bold">Yoga</th><td> <span id="yoga">' + event.Yoga + '</span></td></tr>';
// 								}

// 								if (event.Karana) {
// 									html2 += '<tr><th class="fw-bold">Karana</th><td> <span id="karana">' + event.Karana + '</span></td></tr>';
// 								}

// 								if (event.Karana2) {
// 									html2 += '<tr><th class="fw-bold">Karana 2</th><td> <span id="karana2">' + event.Karana2 + '</span></td></tr>';
// 								}

// 								if (event.Sunsign) {
// 									html2 += '<tr><th class="fw-bold">Sunsign</th><td> <span id="sunsign">' + event.Sunsign + '</span></td></tr>';
// 								}

// 								if (event.RahuKalam) {
// 									html2 += '<tr><th class="fw-bold">Rahu Kalam</th><td> <span id="rahukalam">' + event.RahuKalam + '</span></td></tr>';
// 								}

// 								if (event.GulikaiKalam) {
// 									html2 += '<tr><th class="fw-bold">Gulikai Kalam</th><td> <span id="gulikaikalam">' + event.GulikaiKalam + '</span></td></tr>';
// 								}

// 								if (event.Yamaganda) {
// 									html2 += '<tr><th class="fw-bold">Yamaganda</th><td> <span id="yamaganda">' + event.Yamaganda + '</span></td></tr>';
// 								}

// 								if (event.DurMuhurtam) {
// 									html2 += '<tr><th class="fw-bold">Dur Muhurtam</th><td> <span id="durmuhurtam">' + event.DurMuhurtam + '</span></td></tr>';
// 								}

// 								if (event.DurMuhurtam2) {
// 									html2 += '<tr><th class="fw-bold">Dur Muhurtam 2</th><td> <span id="durmuhurtam2">' + event.DurMuhurtam2 + '</span></td></tr>';
// 								}

// 								if (event.AmritKalam) {
// 									html2 += '<tr><th class="fw-bold">Amrit Kalam</th><td> <span id="amritkalam">' + event.AmritKalam + '</span></td></tr>';
// 								}

// 								if (event.Varjyam) {
// 									html2 += '<tr><th class="fw-bold">Varjyam</th><td> <span id="varjyam">' + event.Varjyam + '</span></td></tr>';
// 								}



// 								$("#calendarPnachangamDetails").html(html2);
// 								$('#modalpanchangam').modal('show');
// 							});

// }
// });
// });
// }
// });
// });




</script>



<script type="text/javascript">
	$(document).ready(function() {
		window.scrollTo({
			top: 225,
			behavior: 'smooth'
		});
	});
</script>





<?php $this->load->view('includes/footer.php') ?>
<?php $this->load->view('includes/script.php') ?>
