Current Path : /var/www/html/social/ |
|
Current File : /var/www/html/social/creat_event2.php |
<?php include_once('__includedFiles/header_top_files.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>365Hops</title>
<?php include_once('__includedFiles/dashboard_header.php');?>
<?php include_once('__includedFiles/dashboard_menu.php');?>
<?php require "__dashboardconfig/session.php"; ?>
<?php $obj1=new Social(); $user_id=$_SESSION['userid'];
if(!isset($_REQUEST['id']))
{
echo '<script>window.location="new_event.php"</script>';
exit;
}
$event_id=base64_decode($_REQUEST['id']);
$eventd=$obj1->select_event_d($event_id);
$nor=count($eventd);
if(isset($_POST['update_event'])){ // print_r($_FILES); print_r($_REQUEST); die;
$msg = $obj1->add_events2($_POST,$_FILES,$event_id);
if($msg!='')
{
// Sharing on destination board
$obj1->share_event_oncreation($event_id);
//
echo '<script>window.location="event_detail.php?eventid='.custome_encoding($event_id).'"</script>';
exit;
}
} ?>
<?php if($eventd['userid']!=$user_id){
echo '<script>window.location="new_event.php"</script>';
exit;
}
if($eventd['type']=='sport event')
{
echo '<script>window.location="creat_turnament.php?id='.$_REQUEST['id'].'"</script>';
exit;
}
// Editor//
/* require_once("../admin/fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('description');
$oFCKeditor->BasePath = '../admin/fckeditor/';
*/ ?>
<script src="ckeditor_4.4.2_full/ckeditor/ckeditor.js"></script>
<!--creat event page html -->
<script type="text/javascript">
$(document).ready(function(e) {
$("#steps_users").EnableMultiField();
$("#multi_img").EnableMultiField();
$("#cost_plans").EnableMultiField();
$('#add_event_btn').click(function(){
//error
if($('#fb_share_review').is(':checked')){
postfbauto_review(); // ASHISH
}
$('#add_event_form').submit();
});
});
// From or On date
function d_rows(dtype)
{
if(dtype=='on')
{
$('#todate_span').hide("fast");
$('#date_icon1').removeClass('caln');
$('#date_icon1').addClass('caln2');
}
else
{
$('#todate_span').show("fast");
$('#date_icon1').removeClass('caln2');
$('#date_icon1').addClass('caln');
}
}
function friend_list(search_txt)
{
var userid=<?php echo $_SESSION['userid'];?>;
// alert(userid);
$('#friend_list_ul').empty();
$.ajax({
url: "main_ajax.php?get_friends=get_friends&search_txt="+search_txt+"&userid="+userid,
type: "GET",
success:(function(msg_ppl){
$('#friend_list_ul').append(msg_ppl);
})
});
}
function add_people()
{
//var len=$('input:checkbox.people:checked').length;
var len=$('input:checkbox:checked.raj_add_peopl').length;
if(len>0)
{
$('#add_imge_icon').remove();
//$('#p_span').empty();
$('.closeBtn014').trigger('click');
$('input:checkbox:checked.raj_add_peopl').each(function()
{
var id=$(this).val();
var img ='ProfileThumb/'+$('#Pimg_'+id).val();
var name = $('#Pname_'+id).val();
var city = $('#Pcity_'+id).val();
var purl=$('#Purl_'+id).val();
var li= '<li id="pe_'+id+'"><a href="javascript:void(0)"><img src="'+img+'" width="41" height="42" alt="'+name+'" /><i class="credel" onclick="return delete_people(\''+id+'\');" ></i></a> <input name="people2[]" type="hidden" value="'+id+'" /></li>';
$('#p_span').append(li);
// alert(li);
$('#people_lis_'+id).remove();
});
$('#p_span').append('<li class="plus" id="add_imge_icon"><a href="#addCurrentTreatment" id="add_mp" role="button" data-toggle="modal" ><img src="images/plus.png"></a></li>');
$('#add_mp').on('click', function (event) {
$('.add_mp').trigger('click');
});
$( "#close_peoples" ).trigger('click');
}
else
{
alert("Please select atleast one checkbox to invite");
return false;
}
//return false;
}
function delete_people(p_id)
{
$("input:checkbox.people:checked").each(function()
{
if($(this).val()==p_id)
{
$(this).prop('checked',false);//.();
}
});
$('#pe_'+p_id).remove();
var delevent_id = <?=$event_id;?>;
$.ajax({
url: "main_ajax.php?reject_request=reject_request&event_id="+delevent_id+"&users_id="+p_id,
type: "GET",
success:(function(){})
});
}
function add_class(liid)
{
$('#'+liid).addClass('seracseclect');
}
function remove_class(liid1)
{
$('#'+liid1).removeClass('seracseclect');
}
</script>
<script type="text/javascript">
$(function(){
var btnUpload = $('#upload');
var status=$('#status');
new AjaxUpload(btnUpload, {
action: 'upload_event_image.php',
name: 'uploadfile',
onSubmit: function(file, ext){
if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
// extension is not allowed
status.text('Only JPG, PNG or GIF files are allowed');
return false;
}
status.text('Uploading...');
},
onComplete: function(file, response){
var description = $("#description").val();
//var descriptionStr = description.substr(0,50).concat('...');
var data = '?image_token='+response+'&description='+description;
//var data = '?image_token='+response;
//On completion clear the status
status.text('');
// Add Image to session
setImageSession(data);
//Add uploaded file to list
var ntimess=response.split('.');
var timsesss=ntimess[0];
$('<li id="'+timsesss+'"></li>').appendTo('#files').html('<a href="javascript:void(0);" onclick="del_pics(\''+timsesss+'\');"><img src="event_gallery/'+response+'" style="width:80px; height:80px;" alt="" /></a><input type="hidden" id="hidnen'+timsesss+'" name="image[]" value="'+response+'">').addClass('success');
}
});
});
function del_pics(del_ids)
{
if(confirm("Are you sure you want to delete this pic?"))
{
$('#'+del_ids).remove();
$('#hidnen'+del_ids).remove();
}
}
// Edit Segment//
function sports_list()
{
var eventss_id=<?php echo $event_id;?>;
var values = $('input:checkbox:checked.raj_check').map(function () {
return this.value;
}).get();
var search_txt='';
$('#segment_ul_id').empty();
$.ajax({
url: "main_ajax.php?search_event_interests=search_interests&search_txt="+search_txt+"&event_id="+eventss_id+"&segmentid="+values,
type: "GET",
success:(function(msg_seg){
$('#segment_ul_id').append(msg_seg);
})
});
}
function update_segmentss()
{
var events_id=<?php echo $event_id;?>;
var interestIDs = $('input:checkbox:checked.raj_add_seg').map(function(){
return $(this).val();
}).get();
$.ajax({
url: "main_ajax.php?upadet_event_segment=update&events_id="+events_id+"&segmentnames="+interestIDs,
type: "GET",
success:(function(segss){
location.reload();
})
});
}
function delete_seg(segid)
{
if(segid!=''){
var event_id=<?php echo $event_id;?>;
$.ajax({
url: "main_ajax.php?delete_event_interests=delete&segid="+segid+"&event_id="+event_id,
type: "GET",
success:(function(del_seg){
if(del_seg==1)
{
$('#interest_name_chek_'+segid).prop( "checked", false );
$('#del_id_'+segid).hide('fast');
}
})
}); }
}
function hide_titl_txt()
{
$('#tile_text').hide('fast');
}
// Edit Upper Section//
</script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>
<script type="text/javascript">
function initialize2(){
var mapOptions = {
center: new google.maps.LatLng(28.635308000000000000, 77.224960000000010000),
zoom: 10,
display:0
};
var map = new google.maps.Map(document.getElementById('map-canvas_popup'),
mapOptions);
var input = /** @type {HTMLInputElement} */(
document.getElementById('pac-input_popup'));
var types ='geocode'; // document.getElementById('type-selector');
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);
var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds', map);
var infowindow = new google.maps.InfoWindow();
var marker = new google.maps.Marker({
map: map
});
google.maps.event.addListener(autocomplete, 'place_changed', function() {
infowindow.close();
marker.setVisible(false);
var place = autocomplete.getPlace();
if (!place.geometry) {
return;
}
var address = '';
if (place.address_components) {
address = [
(place.address_components[0] && place.address_components[0].short_name || ''),
(place.address_components[1] && place.address_components[1].short_name || ''),
(place.address_components[2] && place.address_components[2].short_name || '')
].join(' ');
}
//infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
// infowindow.open(map, marker);
// var defined By Raj
var latitude_value=place.geometry.location.lat();
var longtitude_value=place.geometry.location.lng();
if(place.address_components[0]!='[object Object]'){
var placenames=(place.address_components[0].long_name); //short_name
}else{ var placenames=''; }
if(place.address_components[1]=='[object Object]'){
var districtname=(place.address_components[1].long_name);
} else{ var districtname=''; }
if(place.address_components[2]=='[object Object]'){
var statename=(place.address_components[2].long_name);
} else{ var statename=''; }
//var fulladdr=address;
$('#plc_name_popup').val(place.name);
$('#adress_name_popup').val(address);
$('#plc_name2_popup').val(districtname);
$('#plc_name3_popup').val(statename);
$('#lectitude_popup').val(latitude_value);
$('#longitude_popup').val(longtitude_value);
});
}
google.maps.event.addDomListener(window, 'load', initialize2);
function add_more_plans()
{
var no_rows=$('#number_of_childs').val();
var new_no_row=parseInt(no_rows)+1;
$('#number_of_childs').val(new_no_row);
$('.add_btn_m').remove();
var new_html_c='<div><div class="kafe_prithd" style="margin-right:5px !important; width:100px !important;"><div class="kafe_pep" style="width:auto; "><strong>Plan '+new_no_row+':</strong></div></div><div class="kafe_pritname" ><input name="costs_paln[]" type="text" placeholder="Cost Plan" style="width:80px; margin-top:2px; margin-right:5px;" /><input name="costp_description[]" type="text" style="width:360px; margin-top:2px;" class="required" placeholder="Cost Plan Details" value="" /></div> <div style="float:none; margin-left:15px; " ><a class="addMoreFields add_btn_m" href="javascript:void(0);" onclick="add_more_plans();">Add</a></div></div>';
$('#cost_plans_f').append(new_html_c);
}
</script>
<style type="text/css">
#map-canvas_popup {
height: 100%;
margin: 0px;
padding: 0px
}
#pac-input_popup {background-color: #FFFFFF; border: 1px solid #CCCCCC; font-family: arial; font-size: 12px; font-weight: 300; margin-top: 10px; padding: 5px; text-overflow: ellipsis; width: 200px; transition:all 0.2s; -webkit-transition:all 0.2s;}
#pac-input_popup:focus {box-shadow: 0 0 30px rgba(77, 144, 254, 0.9); width:200px; border: 1px solid rgba(77, 144, 254, 0.9); }
.addMoreFields
{ padding-left:5px;
float:left;
color:green;
}
.removeFields
{ padding-left:5px;
float:right;
color:red;
}
</style>
<?php if($nor>0){?>
<form id="add_event_form" action="" method="post">
<div class="kafe_detail">
<hgroup class="hdall">
<h2>Event properties:</h2>
<p> Complete your event by providing these important things </p>
<div class="clear"></div>
</hgroup>
<!--creat event left html start -->
<aside class="kafeadventure kafeadventurecre2">
<h3><?=$eventd['name'];?></h3>
<ul class="kafe_creatul">
<li>
<b>Where:</b>
<p><?=$eventd['where_area'];?></p>
</li>
<li>
<b>Duration:</b>
<p><?php if($eventd['duration']!=''){ echo $eventd['duration']; }else{ echo 'NA';}?></p>
</li>
<li>
<b>Difficulty Level:</b>
<p><?php if($eventd['difficulty_level']==1){ echo 'Easy'; }
elseif($eventd['difficulty_level']==2){ echo 'Moderate';}
elseif($eventd['difficulty_level']==3){ echo 'Difficult';}
elseif($eventd['difficulty_level']==4){ echo 'Strenuous';}
else{ echo 'NA';}?></p>
</li>
<?php if($eventd['custome_date']!=''){ ?>
<li>
<b>Custome date:</b>
<p><?php if($eventd['custome_date']!=''){ echo $eventd['custome_date']; }else{ echo 'NA';}?></p>
</li>
<? }else{?>
<li>
<b>Date:</b>
<p><?php if(date('d-m-Y',strtotime($eventd['date_to']))!='01-01-1970'){ echo 'From '; echo date('jS M, y',strtotime($eventd['date_from'])); echo' to '; echo date('jS M, y',strtotime($eventd['date_to'])); } else{ echo 'On '; echo date('jS M, y',strtotime($eventd['date_from']));} ?></p>
</li>
<? }?>
<?php if($eventd['timings']!=''){?><li>
<b> Time:</b>
<p> <?=$eventd['timings'];?></p>
</li>
<? }?>
<li>
<b>Cost:</b>
<p> <?php if($eventd['cost']!='NA'){ echo $eventd['cost']; ?> INR (per person)<? }else{ echo 'NA';}?></p>
</li>
</ul>
<div class="clear"></div>
<div class="kafe_editdetail"><!--<a href="popups/edit_event.php?id=<?=$eventd['id']?>" class="iframe edit_event" >Edit Detail</a>-->
<a href="#edit_dteails_event_div" role="button" data-toggle="modal" class="kafe_peop_padd" >Edit Detail</a>
</div>
<div class="clear"></div>
<h3 class="creapadd">Segments</h3>
<ul class="kafe_crat_criing">
<?php $interests_ids_str=$obj1->get_event_segments($eventd['id']);
foreach($interests_ids_str as $interest_str)
{
$inteterest_details=$obj1->get_interest_by_id($interest_str);
?>
<li>
<a href="javascrpt:void(0);">
<span class="lafe_creicon youiconall" style="background:none;"><img src="../admin/segment_pics/<?=$inteterest_details['icon_small']?>" width="40" height="40" /></span>
<span class="yourtxt"><?=ucwords($inteterest_details['name'])?></span>
</a>
</li>
<? }?>
</ul>
<div class="clear"></div>
<div class="kafe_editdetail">
<a href="#addSegment" role="button" data-toggle="modal" class="kafe_peop_padd" >Edit Segments</a></div>
<div class="clear"></div>
</aside>
<!---------- Start Nimit Popup---------->
<div class="modal_interest" id="addSegment" tabindex="-1" role="dialog" style="display:none;" >
<div class="center" style="margin:0px; padding:0px;">
<!-- popup5 form open html -->
<?php $user_interst_arr=array('0');
if(count($interests_ids_str)>0)
{ foreach($interests_ids_str as $userintarr)
{
array_push($user_interst_arr,$userintarr);
}
}
?>
<div class="popupsearch addinterst" style="margin:0px;">
<div class="kaf_p_hd">
<!--<h1 id="tile_text">Update Segment</h1>
<div class="kafe_youbora_search kafe_youbora_searchinter">
<input type="text" name="text_search" onkeyup="return segment_list(this.value);" onclick="return hide_titl_txt();" />
</div> -->
<?php $segment_cats=$obj1->segment_list();
if(count($segment_cats>0))
{ $i=0;
foreach($segment_cats as $segment_cat){
?>
<span style="float:left; padding-left:5px;">
<input type="checkbox" name="segment" id="segment_<?=$i?>" onClick="return sports_list();" class="required raj_check" value="<?=$segment_cat['id'];?>" /> <?=ucwords($segment_cat['name']);?></span>
<? $i++; }}?>
<a title="Close4" data-dismiss="modal" id="close_seglistbtn" class="closeBtn4" href="#"></a>
<div class="clear"></div>
</div>
<div class="clear"></div>
<input type="hidden" id="event_id" value="<?=$event_id?>" />
<ul class="searcuserinvit addinter" id="segment_ul_id">
<?php $segment_lists=$obj1->interest_list();
if(count($segment_lists)>0){
foreach($segment_lists as $segments){
?>
<li id="seg_li_<?=$segments['id'];?>">
<a href="javascript:void(0);">
<img class="frnd" src="../admin/segment_pics/<?=$segments['icon_small']?>" height="29" width="31" alt="image01">
<div class="info_txtpopadd"><?=ucwords($segments['name'])?></div>
</a>
<div class="chrit">
<?php if(in_array($segments['id'],$user_interst_arr))
{ ?>
<div class="kafe_rmo" id="del_id_<?=$segments['id']?>"> <a href="javascript:void(0);" onclick="return delete_seg(<?=$segments['id'];?>);" ><img src="images/pcut.png" width="28" height="29" /></a></div>
<? }?>
<div class="seritpopadd">
<div class="chonpop">
<span class="custom-checkboxpop">
<input name="interest[]" <?php if(in_array($segments['id'],$user_interst_arr))
{ ?> checked="checked" <? }?> id="interest_name_chek_<?=$segments['id'];?>" type="checkbox" class="ckboxpop raj_add_seg required" value="<?=$segments['id']?>" />
<span class="boxpop"><span class="tickpop"></span></span>
</span>
</div>
</div>
<div class="clear"></div>
</div>
</li>
<? }}?>
</ul>
<div class="searchpopupadd">
<a href="javascript:void(0);" id="submit_interest" onclick="return update_segmentss();" ><?php if(count($user_interst_arr)>1){ echo 'Update'; } else{ echo 'Add';} ?></a>
</div>
</div>
<!-- popup5 form closed html -->
</div>
</div>
<!---- End--->
<!--creat event left html end -->
<!--creat event right html start -->
<aside class="kafe_cretpeople kafe_cretpeople2">
<div class="kafe_p" style="padding-top:10px;">
<div class="kafe_prithd">
<div class="kafe_pep2"><strong>People :</strong></div>
</div>
<div class="kafe_prit">
<?php // Checking for Event People //
$peopless=$obj1->event_people_list($eventd['id'],'');
$no_pepples=count($peopless);
$alreadyinevents=array("0");
?>
<ul class="kafe_creatpep" id="p_span">
<?php if($no_pepples>0){
foreach($peopless as $ppppls)
{
$user_info412=$obj1->userinfo($ppppls);
if($ppppls!='0'){
array_push($alreadyinevents,$ppppls);
?>
<li><a id="pe_<?=$ppppls?>" href="javascript:void(0)"><img src="ProfileThumb/<?=$user_info412['user_img']?>" width="41" height="42" alt="<?=$user_info412['user_fullname']?>" /><i class="credel" onclick="return delete_people('<?=$ppppls?>');" ></i></a>
<input name="people2[]" type="hidden" value="<?=$user_info412['user_id']?>" />
</li>
<? }} }?>
<li class="plus bropad" id="add_imge_icon"><a href="#addCurrentTreatment" role="button" data-toggle="modal" ><img src="images/plus.png"></a>
</li>
</ul>
<div class="kafe_invitepep"><a href="#addCurrentTreatment" role="button" data-toggle="modal" >Invite people to this event</a></div>
</div>
<div class="clear"></div>
</div>
<div class="modal" id="addCurrentTreatment" tabindex="-1" role="dialog" style="display:none;" >
<div class="popupsearch popupsearchch" style="margin:0px; padding:0px;">
<div class="kaf_p_hd">
<h1>Peoples</h1>
<div class="kafe_youbora_search">
<!--<input type="text" name="search_txt" id="search_friend" onkeyup="return friend_list(this.value);" />-->
</div>
<a title="Close4" data-dismiss="modal" id="close_peoples" class="closeBtn4" href="#"></a>
<div class="clear"></div>
</div>
<div class="clear"></div>
<ul class="searcuserinvit userinvit" id="friend_list_ul">
<? if($_SESSION['usertype']=='USER'){
$peoples=$obj1->people_list($user_id);
}
else
{
$peoples=$obj1->service_fallowers_people($_SESSION['serviceid'],$_SESSION['usertype']);
}
foreach($peoples as $people){
if(!in_array($people['user_id'],$alreadyinevents)){
$user_link='index.php?f='.$people['user_fullname'].'&m='.base64_encode($people['user_id'].$people['user_fullname']);
// class="seracseclect"
?>
<li id="people_lis_<?=$people['user_id']?>" onmouseover="return add_class(this.id);" onmouseout="return remove_class(this.id);">
<input type="hidden" id="Pimg_<?=$people['user_id']?>" value="<?=$people['user_img']?>" />
<input type="hidden" id="Pname_<?=$people['user_id']?>" value="<?=$people['user_fullname']?>" />
<input type="hidden" id="Pcity_<?=$people['user_id']?>" value="<?=$people['user_city']?>" />
<input type="hidden" id="Purl_<?=$people['user_id']?>" value="<?=$user_link?>" />
<a href="#">
<img class="frnd" src="ProfileThumb/<?=$people['user_img']?>" alt="image01">
<div class="info-txtpop"><?=ucwords(display_name($people['user_fullname'],10))?></div>
</a>
<div class="seritpop">
<div class="chonpop">
<span class="custom-checkboxpop">
<input name="people[]" type="checkbox" class="ckboxpop raj_add_peopl" value="<?=$people['user_id']?>" />
<span class="boxpop"><span class="tickpop"></span></span>
</span>
</div>
</div>
</li>
<? } }?>
</ul>
<div class="searchpopupadd">
<a href="javascript:void(0);" onclick="return add_people();" >Send</a>
</div>
</div>
</div>
<div class="kafe_p kafe_noofsee">
<div class="kafe_prithd">
<strong>Seats availability:</strong><br />
<span>(Optional)</span>
</div>
<div class="kafe_prit">
<div class="kafe_creinpu">
<select name="seats" id="seats" style="width:110px;" >
<option value="1" <?php if($eventd['seats']>0){ echo 'selected="selected"'; }?> >Available</option>
<option value="0" >Not Available</option>
</select>
</div>
<div class="kafe_creinpu">
<div class="kafe_prithd">
<strong>maximum capacity:</strong><br />
<span>(Optional)</span>
</div>
<input type="text" value="<?=$eventd['capacity']?>" name="capacity" id="capacity" placeholder="254" />
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="kafe_craatpeoplist">
<h5>Gallery Event</h5>
<div class="clear"></div>
<?php $arr =$obj1->event_gallery($eventd['id']);
$num_img = count($arr);
?>
<ul id="files" class="kafe_accepimg peopleevtn kafe_creatpep" >
<?php if($num_img>0){ $i=50;
foreach($arr as $gallery){ //print_r($gallery); ?>
<li id="<?=$i?>" class="success"><a href="javascript:void(0);" onclick="del_pics('<?=$i?>');">
<i class="credel" style="right:1px !important;"></i>
<img src="event_gallery/<?=$gallery['img_path']?>" style="width:80px; height:80px;" alt="" />
<input type="hidden" id="hidnen<?=$i?>" name="image[]" value="<?=$gallery['img_path']?>"></a>
</li>
<? $i++; }}?>
</ul>
<div class="kafe_accepimg peopleevtn" >
<span style="float:left;" ><div id="upload" style="background:none !important;"><img src="images/plus.png" /></div><span id="status" class="up_span"></span>
</span><p style="margin-top:11px;"> Add Images to your Event</p>
</div>
<div class="clear"></div>
</div>
<div class="kafe_craatpeoplist" >
<h5>Description: </h5>
<div class="clear"></div><?php /**
$oFCKeditor->ToolbarSet="DPS";
$oFCKeditor->Width =548;
$oFCKeditor->Height =255;
$oFCKeditor->Value=$eventd['description'];
$oFCKeditor->Create();
$output = $oFCKeditor->CreateHtml(); ***/?>
<textarea cols="80" id="editor2" name="description" rows="10"><?=$eventd['description']?></textarea>
<div class="clear"></div>
<script>
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace( 'editor2', {
toolbar: [
['Source','Scayt','Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','-','Subscript','Superscript'],
['NumberedList', 'BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'],
['Image','Flash','Table','Rule','SpecialChar'],
['Style','Format','Font','FontSize']
]
});
</script>
</div>
<div class="kafe_craatpeoplist" >
<h5>Cost Description: </h5>
<div class="clear"></div>
<textarea cols="80" id="cost_description" name="cost_description" rows="10"><?=$eventd['cost_description']?></textarea>
<div class="clear"></div>
<script>
// This call can be placed at any point after the
// <textarea>, or inside a <head><script> in a
// window.onload event handler.
// Replace the <textarea id="editor"> with an CKEditor
// instance, using default configurations.
CKEDITOR.replace( 'cost_description', {
toolbar: [
['Source','Scayt','Undo','Redo','-','Find','Replace'],
['Bold','Italic','Underline','-','Subscript','Superscript'],
['NumberedList', 'BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor','TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'],
['Image','Flash','Table','Rule','SpecialChar'],
['Style','Format','Font','FontSize']
]
});
</script>
</div>
<div class="kafe_creinpu">
<div class="kafe_prithd" style="padding-top:15px;">
<strong>Starting Point:</strong><br>
<input type="hidden" name="fulladress_name" id="adress_name_popup" value="<?=$eventd['fulladress_name']?>" />
<input type="hidden" name="plc_name" id="plc_name_popup" value="<?=$eventd['plc_name']?>" />
<input type="hidden" name="plc_name2" id="plc_name2_popup" value="<?=$eventd['plc_name2']?>" />
<input type="hidden" name="plc_name3" id="plc_name3_popup" value="<?=$eventd['plc_name3']?>" />
<input type="hidden" name="lectitude" id="lectitude_popup" value="<?=$eventd['lectitude']?>" />
<input type="hidden" name="longitude" id="longitude_popup" value="<?=$eventd['longitude']?>" />
</div>
<div style="bottom:100px;left: 21%; padding:0px; width:220px;" >
<input id="pac-input_popup" class="controls_popup" value="<?=$eventd['plc_name2']?>" type="text" placeholder="Enter a location" />
<div id="map-canvas_popup" style=" width:100%; height:65px; overflow:hidden;" ></div>
</div>
</div>
<div class="clear"></div>
<div class="kafe_craatpeoplist">
<h5>Action for you</h5>
<div class="clear"></div>
<div>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Steps :</strong></div>
</div>
<div class="kafe_pritname" >
<?php if($eventd['steps']!=''){
$stepss=explode('##',$eventd['steps']);
if(count($stepss)>0){ foreach($stepss as $step){
?>
<fieldset><input name="steps[]" type="text" style="width:360px; margin-top:2px;" class="required" placeholder="Steps" value="<?=$step?>" />
</fieldset> <? }}}?>
<fieldset id="steps_users">
<input name="steps[]" type="text" style="width:360px; margin-top:2px;" class="required" placeholder="Steps" value="" />
</fieldset>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div class="kafe_craatpeoplist">
<h5>Cost Plans</h5>
<div class="clear"></div>
<?php
$event_costplans=$obj1->get_cost_plans($eventd['id']);
$no_of_planss=count($event_costplans);
?>
<fieldset id="cost_plans_f">
<input type="hidden" id="number_of_childs" value="<?=($no_of_planss+1)?>" />
<?
if($no_of_planss>0){ $pn=1; foreach($event_costplans as $cost_pln){
?>
<div>
<div class="kafe_prithd" style="margin-right:5px !important; width:100px !important;">
<div class="kafe_pep" style="width:auto; "><strong>Plan <?=$pn;?>:</strong></div>
</div>
<div class="kafe_pritname" >
<input name="costs_paln[]" type="text" placeholder="Cost Plan" style="width:80px; margin-top:2px; margin-right:5px;" value="<?=$cost_pln['cost']?>" />
<input name="costp_description[]" type="text" style="width:360px; margin-top:2px;" class="required" placeholder="Cost Plan Details" value="<?=$cost_pln['details']?>" />
</div>
</div>
<? $pn++; } }?>
<div>
<div class="kafe_prithd" style="margin-right:5px !important; width:100px !important;">
<div class="kafe_pep" style="width:auto; "><strong>Plan <?=($no_of_planss+1)?>:</strong></div>
</div>
<div class="kafe_pritname" >
<input name="costs_paln[]" type="text" placeholder="Cost Plan" style="width:80px; margin-top:2px; margin-right:5px;" value="<?php if($no_of_planss==0){ echo $eventd['cost']; }?>" />
<input name="costp_description[]" type="text" style="width:360px; margin-top:2px;" class="required" placeholder="Cost Plan Details" value="" />
</div><div style="float:none; margin-left:15px; " >
<a class="addMoreFields add_btn_m" href="javascript:void(0);" onclick="add_more_plans();">Add</a>
</div>
</div>
</fieldset>
</div> <input name="privacy" type="hidden" value="Public" />
<!--<div class="kafe_publicev">
<div class="kafe_leftnew">
<strong>Public Event:</strong>
<input name="privacy" type="radio" id="privacy0" <?php if($eventd['event_type']=='Public'){ echo 'checked="checked"';}?> class="required" value="Public" />
</div>
<div class="kafe_cretmessa">
<i class="kafearrocre"></i>
<p>You are creating this event to let other people in the network know about this event and join it</p>
</div>
<div class="clear"></div>
</div>-->
<!--<div class="kafe_publicev">
<div class="kafe_leftnew">
<strong>Invitational Event :</strong>
<input name="privacy" type="radio" class="required" id="privacy1" <?php if($eventd['event_type']=='Invitational'){ echo 'checked="checked"';}?> value="Invitational" />
</div>
<div class="kafe_cretmessa">
<i class="kafearrocre"></i>
<p>You are creating this event to invite your friends and followers. But you don’t mind if people want to join this event with your permission</p>
</div>
<div class="clear"></div>
</div>-->
<div class="kafe_creatsub">
<input type="hidden" name="update_event" value="<?=$event_id?>" />
<a href="javascript:void(0);" id="add_event_btn">Save</a>
</div>
<div class="clear"></div>
</aside>
<!--creat event right html start -->
<div class="clear"></div>
</div>
</form>
<? }?>
<!-------- Google API--------------->
<!-- date picker js and css start-->
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/calender_2js.js"></script>
<link href="js/jquery-ui.css" rel="stylesheet" type="text/css" />
<script>
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(28.635308000000000000, 77.224960000000010000),
zoom: 10,
display:0
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var input = /** @type {HTMLInputElement} */(
document.getElementById('pac-input'));
var types ='geocode'; // document.getElementById('type-selector');
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(types);
var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds', map);
var infowindow = new google.maps.InfoWindow();
var marker = new google.maps.Marker({
map: map
});
google.maps.event.addListener(autocomplete, 'place_changed', function() {
infowindow.close();
marker.setVisible(false);
var place = autocomplete.getPlace();
if (!place.geometry) {
return;
}
var address = '';
if (place.address_components) {
address = [
(place.address_components[0] && place.address_components[0].short_name || ''),
(place.address_components[1] && place.address_components[1].short_name || ''),
(place.address_components[2] && place.address_components[2].short_name || '')
].join(' ');
}
//infowindow.setContent('<div><strong>' + place.name + '</strong><br>' + address);
// infowindow.open(map, marker);
// var defined By Raj
var latitude_value=place.geometry.location.lat();
var longtitude_value=place.geometry.location.lng();
if(place.address_components[0]=='[object Object]'){
var placenames=(place.address_components[0].long_name); //short_name
}else{ var placenames=''; }
if(place.address_components[1]=='[object Object]'){
var districtname=(place.address_components[1].long_name);
}else{ var districtname=''; }
if(place.address_components[2]=='[object Object]'){
var statename=(place.address_components[2].long_name);
}else{ var statename=''; }
var fulladdr=address;
$('#place1').val(place.name);
$('#placefull').val(address);
$('#place2').val(districtname);
$('#place3').val(statename);
$('#latitude').val(latitude_value);
$('#longitude').val(longtitude_value);
});
// Sets a listener on a radio button to change the filter type on Places
// Autocomplete.
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<script type="text/javascript">
function save_edit_form2()
{
if($('#cost').val()=='')
{
$('#cost').addClass("error");
$('#cost').focus();
return false;
}
else
{
$('#cost').removeClass("error");
}
if(isNaN($('#cost').val()))
{
if($('#cost').val()!='NA')
{
$('#cost').addClass("error");
$('#cost').focus();
return false;
}
else
{
$('#cost').removeClass("error");
}
}
if($('#duration').val()=='')
{
$('#duration').addClass("error");
$('#duration').focus();
return false;
}
else
{
$('#duration').removeClass("error");
if($('#updat_event_id').val()!=''){
$.ajax({
url:"main_ajax.php",
type:"POST",
data:$("#edit_form_2").serialize(),
success:function() {
window.location.href='';
}
});
}
else
{
alert("Event does not have a valid Id");
return false;
}
}
}
// Add Location Tags
function add_locations()
{
var tagcounter=$('#tagcounter').val();
//alert(tagcounter);
var place1=$('#place1').val();
var place2=$('#place2').val();
var place3=$('#place3').val();
var placefull=$('#placefull').val();
var latitude=$('#latitude').val();
var longitude=$('#longitude').val();
if(latitude!=''){
var loc_tags='<div class="addmewloc" id="Loc_'+tagcounter+'" ><label title="">'+place1+'</label><input name="location_tags1[]" class="required" type="hidden" value="'+place1+'" /><input name="location_tags2[]" class="required" type="hidden" value="'+place2+'" /><input name="location_tags3[]" class="required" type="hidden" value="'+place3+'" /><input name="location_full[]" class="required" type="hidden" value="'+placefull+'" /><input name="location_latitude[]" class="required" type="hidden" value="'+latitude+'" /><input name="location_longitude[]" class="required" type="hidden" value="'+longitude+'" /><a href="javascript:void(0);" onclick="return delete_place(\''+tagcounter+'\');" ></a></div>';
$('#location_span').append(loc_tags);
var newcounter=parseInt(parseInt(tagcounter)+1);
// Removing values//
$('#pac-input').val('');
$('#place1').val('');
$('#place2').val('');
$('#place3').val('');
$('#placefull').val('');
$('#latitude').val('');
$('#longitude').val('');
// Assign new value to counter
$('#tagcounter').val(newcounter);
}
else
{
alert("Please select atleast one location tag to add.");
}
}
// Delete Place Tag
function delete_place(lidss)
{
// alert(lidss);
$('#Loc_'+lidss).remove();
}
///////////////
function custome_date_row()
{
if($('#custom_date_check').is(':checked'))
{
$('#custom_dat_rows').show('fast');
}
else
{
$('#custom_dat_rows').hide('fast');
}
}
function custome_time_row()
{
if($('#custom_time_check').is(':checked'))
{
$('#custom_time_rows').show('fast');
}
else
{
$('#custom_time_rows').hide('fast');
}
}
</script>
<div class="modal" id="edit_dteails_event_div" tabindex="-1" role="dialog" style="display:none; margin-top:-280px !important;" >
<form id="edit_form_2" method="post" >
<div class="Eddetp" style="padding:0px; margin:0px;" >
<div class="pp1" >
<h1>Edit Detail</h1>
<a href="#" class="closeBtn4" id="close_edit_details" data-dismiss="modal" title="Close4"></a>
<div class="clear"></div>
</div>
<div class="addac" style="max-height:500px !important; overflow:auto;">
<table border="0" cellpadding="0" cellspacing="0" >
<tr >
<td ><div class="kafe_addnee">
<div class="kafe_pep"><strong>Type of Event :</strong></div>
</div></td>
<td><div class="radioadd">
<span>
<span id="error_types_event" class="error" style="display:none;" ></span>
<?php $typeoftrips33=$obj1->segment_list();
if(count($typeoftrips33)>0)
{ $i=0;
foreach($typeoftrips33 as $triptype){
if($triptype['id']!=1){ ?>
<span style="float:left; width:30%" >
<span ><input name="event_type" id="type<?=$i?>" class="required" type="radio" <?php if($eventd['type']==$triptype['name']){echo 'checked="checked"';}?> value="<?=$triptype['name']?>" /></span>
<span><span id="error_types_event" class="error" style="display:none;" ></span>
<strong><?=$triptype['name']?></strong><div class="clear"> </div></span>
</span>
<? } }}?>
</span>
</div></td>
</tr>
<tr >
<td ><div class="kafe_addnee">
<div class="kafe_pep"><strong>Name :</strong></div>
</div></td>
<td><div class="radioadd">
<input name="event_name" type="text" id="event_name" class="crewidth required" value="<?=$eventd['name']?>" />
<input type="hidden" id="updat_event_id" name="updat_event_id" value="<?=$eventd['id']?>" />
<input type="hidden" name="edit_event_detail_2" value="update" />
</div></td>
</tr>
<tr style="width:300px;">
<td ><div class="kafe_addnee">
<div class="kafe_pep"><strong>Where :</strong></div>
</div></td>
<td><div class="radioadd">
<input name="where" id="where" type="text" class="required" value="<?=$eventd['where_area']?>" />
</div></td>
</tr>
<tr>
<td>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Location Tags:</strong></div>
</div>
</td>
<td>
<div class="radioadd">
<input id="pac-input" class="controls" type="text" placeholder="Enter a location" />
<div id="map-canvas" style="width:337px; height:55px; " ></div>
</div>
<div class="loadd" style="float:right; position:relative; margin-top:-52px; padding-right:110px;"><a href="javascript:void(0)" onclick="return add_locations();" >Add </a>
<input type="hidden" id="tagcounter" name="tagcounter" value="1" />
<input type="hidden" id="place1" value="" />
<input type="hidden" id="place2" value="" />
<input type="hidden" id="place3" value="" />
<input type="hidden" id="placefull" value="" />
<input type="hidden" id="latitude" value="" />
<input type="hidden" id="longitude" value="" />
</div>
<div class="clear"></div>
<div class="kafeinallin" id="location_span" style="padding-top:10px;" >
<?php $locations=$obj1->events_locations($eventd['id']);
if(count($locations)>0){ $j=500;
foreach($locations as $location){ ?>
<div class="addmewloc" id="Loc_<?=$j?>" >
<label title=""><?=$location['location2']?></label>
<input name="location_tags1[]" class="required" type="hidden" value="<?=$location['location1']?>" />
<input name="location_tags2[]" class="required" type="hidden" value="<?=$location['location2']?>" />
<input name="location_tags3[]" class="required" type="hidden" value="<?=$location['location3']?>" />
<input name="location_full[]" class="required" type="hidden" value="<?=$location['location_full']?>" />
<input name="location_latitude[]" class="required" type="hidden" value="<?=$location['lectitude']?>" />
<input name="location_longitude[]" class="required" type="hidden" value="<?=$location['longitude']?>" />
<a href="javascript:void(0);" onclick="return delete_place(<?=$j?>);" ></a></div>
<? $j++; }} ?>
</div>
</td>
</tr>
<tr>
<td><div class="kafe_addnee">
<div class="kafe_pep"><strong>Date :</strong></div>
</div></td>
<?php if(strtotime($eventd['date_from'])>0){
$dat1=date('m/d/Y',strtotime($eventd['date_from']));
}
else
{
$dat1='';
}
if(strtotime($eventd['date_to'])>0){
$dat2=date('m/d/Y',strtotime($eventd['date_to']));
}
else
{
$dat2='';
}
?>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<div class="kafe_from sepadd">
<div class="fm"><select name="d_type" id="d_type" onchange="return d_rows(this.value);" >
<option value="from" <?php if($dat2!='' and $dat2=='01/01/1970'){?> selected="selected" <? }?> >from</option>
<option value="on" <?php if($dat2=='' or $dat2=='01/01/1970'){?> selected="selected" <? }?> >on</option>
</select></div>
</div>
<style type="text/css">
.ui-datepicker-header{ color:#000 !important;}
</style>
<input type="text" class="kafe_uidate required" name="from_date" id="cretenv" value="<?=$dat1?>" />
<? if($dat2==''){?>
<script type="text/javascript">
$(document).ready(function(e) {
$('#date_icon1').removeClass('caln');
$('#date_icon1').addClass('caln2');
});
</script><? }?>
<i class="caln" id="date_icon1"></i>
<span id="todate_span" <?php if($dat2==''){ echo ' style="display:none;"'; }?> > <div class="kafe_to">To</div>
<input type="text" class="kafe_uidate required" name="to_date" id="cretenv1" value="<?=$dat2?>" />
<i class="caln2" id="calender2btn"></i></span><br/>
</div>
</div></td>
</tr>
<!--------- New Added--------->
<? if($_SESSION['usertype']!='USER'){ ?>
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep"><strong>Custome Dates :</strong></div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<span class="customedate_span">If you want to add custom date</span> <span style="float:left; margin-left:-72px; width: 95px;"><input type="checkbox" onClick="return custome_date_row();" id="custom_date_check" <?php if($eventd['custome_date']!=''){ echo 'checked="checked"'; }?> name="custom_date_check" value="yes" /></span>
<br/>
<?php if($eventd['custome_date']!=''){
$style_customdate='display:block;';
}else{
$style_customdate='display:none;';
}
if($eventd['custome_date']=='Selected Dates'){
$str_departure_rows='display:block;';
}else{ $str_departure_rows='display:none;';}
$departure_dates=array();
if($eventd['departure_date']!=''){
$departure_dates=explode('#', $eventd['departure_date']);
$no_departures=count($departure_dates);
}
else
{
$no_departures=1;
}
?>
<!--<span style="float:left; <?=$$style_customdate?>" id="custom_dat_rows"> <input name="custome_date" style="width:408px !important;" type="text" id="custome_date" placeholder="please add custome date" value="<?=$eventd['custome_date']?>" />
</span>-->
<span style="float:left; <?=$style_customdate?>" id="custom_dat_rows">
<span style="float:left; "><input type="radio" name="custome_date" style="width:25px;" id="custome_date0" onClick="return date_type_c(this.value);" <?php if($eventd['custome_date']=='Everyday'){ echo 'checked="checked"';} ?> value="Everyday" /> Everyday</span>
<span style="float:left">
<input type="radio" name="custome_date" id="custome_date1" <?php if($eventd['custome_date']=='Selected Dates'){ echo 'checked="checked"';} ?> style="width:25px;" onClick="return date_type_c(this.value);" value="Selected Dates" /> Selected Dates </span>
<!--<input name="custome_date" style="width:474px !important;" type="text" id="custome_date" placeholder="please add custome date" value="" />-->
<br/><br/>
<!-------End------->
<div id="departuredate_span" style="width:312px !important; <?=$str_departure_rows;?>">
<?php $no_dta=1; if(count($departure_dates)>0){
foreach($departure_dates as $ddate){
?>
<div id="cal_row_id_<?=$no_dta?>">
<div class="kafe_to">Date <?=$no_dta?>:</div>
<input type="text" class="departurdate_cl required" readonly="readonly" name="departurdate[]" value="<?=date('m/d/Y',strtotime($ddate));?>" id="departurdate<?=$no_dta?>" onClick="newcalsetups(<?=$no_dta?>)" onblur="newcalsetups(<?=$no_dta?>)" />
<span> <a href="javascript:void(0);" class="btn btn-yellow calbtnraj" onClick="return delcal_row_cal(<?=$no_dta?>);" >Remove</a></span>
</div>
<div class="clear" ></div>
<? $no_dta++;}}?>
<input type="hidden" id="no_calls" value="<?=$no_dta?>" />
<div id="cal_row_id_<?=$no_dta?>">
<div class="kafe_to">Date <?=$no_dta?>:</div>
<input type="text" class="departurdate_cl required" name="departurdate[]" readonly="readonly" value="" id="departurdate<?=$no_dta?>" onClick="newcalsetups(<?=$no_dta?>)" onblur="newcalsetups(<?=$no_dta?>)" />
<span> <a href="javascript:void(0);" class="btn btn-yellow calbtnraj" onClick="return add_new_row_cal();" >Addmore</a></span>
</div>
<div class="clear" ></div>
</div>
</span>
</div>
</div>
<script type="text/javascript">
function delcal_row_cal(id_del)
{
$('#cal_row_id_'+id_del).remove();
}
function date_type_c(dtps)
{
if(dtps=='Selected Dates')
{
$('#departuredate_span').show('fast');
}else{ $('#departuredate_span').hide('fast'); }
}
function add_new_row_cal()
{
$('.calbtnraj').hide('fast');
var newnom=parseInt($('#no_calls').val())+1;
var newrrow='<div><div class="kafe_to">Date '+newnom+':</div><input type="text" readonly="readonly" class="departurdate_cl required" name="departurdate[]" value="" id="departurdate'+newnom+'" onClick="newcalsetups('+newnom+')" onblur="newcalsetups('+newnom+')" /><span> <a href="javascript:void(0);" class="btn btn-yellow calbtnraj" onClick="return add_new_row_cal();" >Addmore</a></span> </div> <div class="clear" ></div>';
$('#no_calls').val(newnom);
$('#departuredate_span').append(newrrow);
}
//
function newcalsetups(inputfid){
/*Calendar.setup({
inputField : "departurdate"+inputfid, // id of the input field
ifFormat : "%d-%m-%Y", // format of the input field
button : "departurdate"+inputfid, // trigger for the calendar (button ID)
align : "Bl", // alignment (defaults to "Bl")
singleClick : true,
showsTime : true
});*/
$( "#departurdate"+inputfid).datepicker();
}
</script>
</td>
</tr>
<? }?>
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep"><strong>Timing :</strong></div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<span class="customedate_span">If you want to add timing</span> <span style="float:left; margin-left:-71px; width: 95px;"><input type="checkbox" onClick="return custome_time_row();" id="custom_time_check" <?php if($eventd['timings']!=''){ echo 'checked="checked"'; }?> name="custom_time_check" value="yes" /></span>
<br/>
<?php if($eventd['timings']!=''){
$style_customtime='display:block;';
}else{
$style_customtime='display:none;';
}
?>
<span style="float:left; <?=$style_customtime;?>" id="custom_time_rows">
<input name="timings" type="text" id="timings" class="crewidth1 required" placeholder="please add a time.." value="<?=$eventd['timings']?>" />
<i class="daticn_new"> <img src="images/cl.png" width="15" height="15" /></i>
</span>
</div>
</div></td>
</tr>
<!------- End--------->
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep">
<strong>Cost per person:</strong>
<span>Optional for a Challenge</span>
</div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<input type="text" name="cost" id="cost" class="crewidth" placeholder="Ex: 4000 or NA" value="<?=$eventd['cost']?>" />
<dd>INR</dd>
</div>
</div></td>
</tr>
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep">
<strong>Duration:</strong>
</div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<input type="text" name="duration" id="duration" value="<?=$eventd['duration']?>" placeholder="ex: 2 days or 4 hours" class="crewidth" >
</div>
</div></td>
</tr>
<!---------- Start----------->
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep">
<strong>Duration:</strong>
</div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<span style="float:left; width:60px;"><select name="duration_day" id="duration_day" style="width:55px; float:left" >
<? for($ddays=1;$ddays<=30;$ddays++){?>
<option value="<?=$ddays?>" <? if($ddays==$eventd['duration1']){echo 'selected="selected"'; }?> ><?=$ddays?></option>
<? }?>
</select> </span>
<span style="width:35px; float:left; margin-top:4px;">days</span>
<span style="width:61px; float:left">
<select name="duration_night" id="duration_night" style="width:55px; float:right" >
<? for($nights=0;$nights<30;$nights++){?>
<option value="<?=$nights?>" <? if($nights==$eventd['duration2']){echo 'selected="selected"'; }?> ><?=$nights?></option>
<? }?>
</select> </span>
<span style="width:40px; margin-top:4px; padding-left:5px; float:left;">nights</span>
</div>
</div></td>
</tr>
<!------- End------->
<tr>
<td><div class="kafe_prithd">
<div class="kafe_pep">
<strong>Difficulty Level:</strong>
</div>
</div></td>
<td><div class="kafe_pritname">
<div class="kafe_date_set">
<select name="difficulty_level" id="difficulty_level" class="crewidth" >
<option value="" >Select</option>
<option value="1" <? if($eventd['difficulty_level']==1){ echo 'selected="selected"';}?> >Easy</option>
<option value="2" <? if($eventd['difficulty_level']==2){ echo 'selected="selected"';}?> >Moderate</option>
<option value="3" <? if($eventd['difficulty_level']==3){ echo 'selected="selected"';}?> >Difficult</option>
<option value="4" <? if($eventd['difficulty_level']==4){ echo 'selected="selected"';}?> >Strenuous</option>
</select>
</div>
</div></td>
</tr>
<tr id="cost_includes_tr" >
<td width="90%" colspan="2" >
<div class="kafe_craatpeoplist" style="padding-top:0px; margin:0px !important;">
<div>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Travel :</strong></div>
</div>
<div class="kafe_pritname"><select name="istravel" id="istravel" style="width:55px;" ><option value="0" <? if($eventd['istravel']==0){ echo 'selected="selected"';}?> >No</option><option value="1" <? if($eventd['istravel']==1){ echo 'selected="selected"';}?>>Yes</option></select>
<input name="travel" id="travel" type="text" style="width:340px !important;" class="required" placeholder="Is travel included in this package? If yes then write the mode of transport and start-end points" value="<?=$eventd['travel']?>" />
</div>
</div>
<div>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Accommodation :</strong></div>
</div>
<div class="kafe_pritname"><select name="isaccommodation" id="isaccommodation" style="width:55px;" ><option value="0" <? if($eventd['isaccommodation']==0){ echo 'selected="selected"';}?>>No</option><option value="1" <? if($eventd['isaccommodation']==1){ echo 'selected="selected"';}?>>Yes</option></select>
<input name="accommodation" id="accommodation" style="width:340px !important;" type="text" class="required" placeholder="Please mention the type of accommodation included in the package. eg: Tent, Hut, Dorm, Guest house" value="<?=$eventd['accommodation']?>" />
</div>
</div>
<div>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Food :</strong></div>
</div>
<div class="kafe_pritname"><select name="isfood" id="isfood" style="width:55px;" ><option value="0" <? if($eventd['isfood']==0){ echo 'selected="selected"';}?>>No</option><option value="1" <? if($eventd['isfood']==1){ echo 'selected="selected"';}?>>Yes</option></select>
<input name="food" id="food" type="text" style="width:400px !important;" class="required" placeholder="Is food inculded? Specify the number of meals and type of meal" value="<?=$eventd['food']?>" />
</div>
</div>
<div>
<div class="kafe_prithd">
<div class="kafe_pep"><strong>Other :</strong></div>
</div>
<div class="kafe_pritname">
<input name="other" id="other" style="width:400px !important;" type="text" class="required" placeholder="Mention other facilities like gears etc." value="<?=$eventd['other']?>" />
</div>
</div>
<div class="clear"></div>
</div>
</td>
</tr>
</table>
<div class="clear"></div>
</div>
<div class="ppser">
<div class="rit rit21" style=" width:96px !important;">
<a href="javascript:void(0);" onclick="return save_edit_form2();" >Save </a>
</div>
</div>
</div>
</form>
</div>
<!-- creat event html end -->
<?php include_once('__includedFiles/dashboard_footer.php');?>
,