<?php
session_start();
ob_start();
if($_REQUEST['backandedit'])
{
}else
{
	$_SESSION['property_info'] = array();
	$_SESSION['userinset_error'] = '';
}
if(!is_user_can_add_event())
{
	wp_redirect(get_option('siteurl'));
}
if($_REQUEST['pid'])
{
	if(!$current_user->data->ID)
	{
		wp_redirect(get_settings('home').'/index.php?ptype=login');
		exit;
	}
	$pid = $_REQUEST['pid'];
	$proprty_type = $catid_info_arr['type']['id'];
	$post_info = get_post_info($_REQUEST['pid']);
	$proprty_name = $post_info['post_title'];
	$proprty_desc = $post_info['post_content'];
	$post_meta = get_post_meta($_REQUEST['pid'], '',false);
	$address = stripslashes($post_meta['address'][0]);
	$geo_latitude = $post_meta['geo_latitude'][0];
	$geo_longitude = $post_meta['geo_longitude'][0];
	$map_view = $post_meta['map_view'][0];	
	$video = $post_meta['video'][0];
	$st_date = $post_meta['st_date'][0];
	$st_date_arr = explode(' ',$st_date);
	$st_date = $st_date_arr[0];
	$st_time = $post_meta['st_time'][0];
	$end_date = $post_meta['end_date'][0];
	$end_date_arr = explode(' ',$end_date);
	$end_date = $end_date_arr[0];
	$end_time = $post_meta['end_time'][0];
	$phone = $post_meta['phone'][0];
	$email = $post_meta['email'][0];
	$website = $post_meta['website'][0];
	$twitter = $post_meta['twitter'][0];
	$facebook = $post_meta['facebook'][0];
	$reg_desc = stripslashes($post_meta['reg_desc'][0]);
	
	$organizer_name = stripslashes($post_meta['organizer_name'][0]);
	$organizer_email = $post_meta['organizer_email'][0];
	$organizer_logo = $post_meta['organizer_logo'][0];
	$organizer_address = stripslashes($post_meta['organizer_address'][0]);
	$organizer_contact = $post_meta['organizer_contact'][0];
	$organizer_website = $post_meta['organizer_website'][0];
	$organizer_mobile = $post_meta['organizer_mobile'][0];
	$organizer_desc = stripslashes($post_meta['organizer_desc'][0]);
	
	$proprty_feature = $post_meta['proprty_feature'][0];
	$post_city_id =$post_meta['post_city_id'][0];
	$cat_array = array();
	if($pid)
	{
		global $wpdb;
		$cat_array = $wpdb->get_col("select t.name from $wpdb->terms t join $wpdb->term_taxonomy tt on tt.term_id=t.term_id join $wpdb->term_relationships tr on tr.term_taxonomy_id=tt.term_taxonomy_id where tr.object_id=\"$pid\" and tt.taxonomy='".CUSTOM_CATEGORY_TYPE1."'");
	}
	$thumb_img_arr = bdw_get_images_with_info($_REQUEST['pid'],'thumb');
}

if($_SESSION['property_info'] && $_REQUEST['backandedit'])
{
	$proprty_name = $_SESSION['property_info']['proprty_name'];
	$proprty_desc = $_SESSION['property_info']['proprty_desc'];
	$proprty_feature = $_SESSION['property_info']['proprty_feature'];
	$address = $_SESSION['property_info']['address'];
	$geo_latitude = $_SESSION['property_info']['geo_latitude'];
	$geo_longitude = $_SESSION['property_info']['geo_longitude'];
	$map_view = $_SESSION['property_info']['map_view'];	
	$st_date = $_SESSION['property_info']['stdate'];
	$st_time = $_SESSION['property_info']['sttime'];
	$end_date = $_SESSION['property_info']['enddate'];
	$end_time = $_SESSION['property_info']['endtime'];
	$reg_desc = $_SESSION['property_info']['reg_desc'];
	$post_city_id = $_SESSION['property_info']['post_city_id'];
	
	$organizer_name = $_SESSION['property_info']['organizer_name'];
	$organizer_email = $_SESSION['property_info']['organizer_email'];
	$organizer_logo = $_SESSION['property_info']['organizer_logo'];
	$organizer_address = $_SESSION['property_info']['organizer_address'];
	$organizer_contact = $_SESSION['property_info']['organizer_contact'];
	$organizer_website = $_SESSION['property_info']['organizer_website'];
	$organizer_mobile = $_SESSION['property_info']['organizer_mobile'];
	$organizer_desc = $_SESSION['property_info']['organizer_desc'];
	
	$phone = $_SESSION['property_info']['phone'];
	$email = $_SESSION['property_info']['email'];
	$website = $_SESSION['property_info']['website'];
	$twitter = $_SESSION['property_info']['twitter'];
	$facebook = $_SESSION['property_info']['facebook'];
	
	$user_fname = $_SESSION['property_info']['user_fname'];
	$user_phone = $_SESSION['property_info']['user_phone'];
	$user_email = $_SESSION['property_info']['user_email'];
	$user_login_or_not = $_SESSION['property_info']['user_login_or_not'];
	$cat_array = $_SESSION['property_info']['category'];
	$proprty_add_coupon = $_SESSION['property_info']['proprty_add_coupon'];
	$price_select = $_SESSION['property_info']['price_select'];
}else
{
	$reg_desc = HOW_TO_APPLY_DESC_TEXT;	
}
if($proprty_desc=='')
{
	$proprty_desc = __("You should enter description content for your listing.");
}
if($_REQUEST['renew'])
{
	$property_list_type = get_post_meta($_REQUEST['pid'],'list_type',true);
}
if($_REQUEST['ptype']=='post_event')
{
	if($_REQUEST['pid'])
	{
		if($_REQUEST['renew'])
		{
			$page_title = RENEW_EVENT_TEXT;
		}else
		{
			$page_title = EDIT_EVENT_TEXT;
		}
	}else
	{
		$page_title = POST_EVENT_TITLE;
	}
}else
{
	if($_REQUEST['pid'])
	{
		if($_REQUEST['renew'])
		{
			$page_title = RENEW_LISING_TEXT;
		}else
		{
			$page_title = EDIT_LISING_TEXT;
		}
	}else
	{
		$page_title = POST_PLACE_TITLE;
	}
}
?>
<?php get_header(); ?>
<script type="text/javascript" language="javascript" >var rootfolderpath = '<?php echo bloginfo('template_directory');?>/images/';</script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/dhtmlgoodies_calendar.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		plugins :"advimage,advlink,emotions,iespell,",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist,blockquote,|,link,unlink,anchor,image,code",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example word content CSS (should be your site CSS) this one removes paragraph margins
		content_css : "css/word.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->
<div id="wrapper" class="clearfix">
 <div id="content" class="clearfix" >
 	
    <?php if ( get_option( 'ptthemes_breadcrumbs' )) {  ?>
    <div class="breadcrumb clearfix">
        <div class="breadcrumb_in"><?php yoast_breadcrumb('',' &raquo; '.$page_title);  ?></div>
    </div>
<?php } ?>
    <h1><?php echo $page_title;?></h1>   
    


 <?php if(is_allow_user_register()){?>
			 <p class="note "> <span class="required">*</span> <?php _e(INDICATES_MANDATORY_FIELDS_TEXT);?> </p>
             <?php
			if($_REQUEST['emsg']==1)
			{
			?>
			<div class="error_msg"><?php echo INVALID_USER_PW_MSG;?></div>
			<?php
			}
			if($_SESSION['userinset_error'])
			{
			?>
			<div class="error_msg"><?php echo $_SESSION['userinset_error'];?></div>
			<?php
			}
			if($_SESSION['error'])
			{
			?>
			<div class="error_msg"><?php echo $_SESSION['error'];?></div>
			<?php
			}
			global $current_user;
			if($current_user->ID=='')
			 {
			 ?>
              <div class="form_row clearfix">
             	<label><?php _e(IAM_TEXT);?> </label>
             	 <span class=" user_define"> <input name="user_login_or_not" type="radio" value="existing_user" <?php if($user_login_or_not=='existing_user'){ echo 'checked="checked"';}?> onclick="set_login_registration_frm(this.value);" /> <?php _e(EXISTING_USER_TEXT);?> </span>  
				 <span class="user_define"> <input name="user_login_or_not" type="radio" value="new_user" <?php if($user_login_or_not=='new_user'){ echo 'checked="checked"';}?> onclick="set_login_registration_frm(this.value);" /> <?php _e(NEW_USER_TEXT);?> </span>
              </div>
              <div class="login_submit clearfix" id="login_user_frm_id">
              <form name="loginform" id="loginform" action="<?php echo get_ssl_normal_url(get_settings('home').'/index.php?ptype=login'); ?>" method="post" >
              <div class="form_row clearfix">
             	<label><?php _e(LOGIN_TEXT);?>  <span>*</span> </label>
             	<input type="text" class="textfield " id="user_login" name="log" />
              </div>
              
               <div class="form_row clearfix">
             	<label><?php _e(PASSWORD_TEXT);?>  <span>*</span> </label>
             	<input type="password" class="textfield " id="user_pass" name="pwd" />
              </div>
              
              <div class="form_row clearfix">
              <input name="submit" type="submit" value="<?php _e(SUBMIT_BUTTON);?>" class="b_submit" />
			  
			   </div>
			  
			  <?php	$login_redirect_link = get_settings('home').'/?ptype=post_listing';?>
			  <input type="hidden" name="redirect_to" value="<?php echo $login_redirect_link; ?>" />
			  <input type="hidden" name="testcookie" value="1" />
			  <input type="hidden" name="pagetype" value="<?php echo $login_redirect_link; ?>" />
			  </form>
              </div>
             <?php }?>
             <?php }?>
			 <?php
			 if($_REQUEST['pid'] || $_POST['renew']){
				$form_action_url = get_option( 'siteurl' ).'/?ptype=preview';
			 }else
			 {
				 $form_action_url = get_ssl_normal_url(get_option( 'siteurl' ).'/?ptype=preview',$_REQUEST['pid']);
			 }
			 ?>
              <form name="propertyform" id="propertyform" action="<?php echo $form_action_url; ?>" method="post" enctype="multipart/form-data">
            <input type="hidden" name="user_login_or_not" id="user_login_or_not" value="<?php echo $user_login_or_not;?>" />
            <input type="hidden" name="pid" value="<?php echo $_REQUEST['pid'];?>" />
            <input type="hidden" name="renew" value="<?php echo $_REQUEST['renew'];?>" />
              
            <h5 class="form_title "> <?php _e(EVENT_DETAILS_TEXT);?> </h5>
			 
             <div class="form_row clearfix">
             	<label><?php echo EVENT_TITLE;?> <span>*</span> </label>
             	<input type="text" name="proprty_name" id="proprty_name" class="textfield" value="<?php echo esc_attr(stripslashes($proprty_name)); ?>" size="25"  />
		        <span class="message_error2" id="proprty_name_span"></span>
             </div>
             
             
             
             
             <div class="form_row clearfix">
             	<label><?php echo EVENT_ADDRESS;?> </label>
             	<input type="text" name="address" id="address" class="textfield" value="<?php echo esc_attr(stripslashes($address)); ?>" size="25"  />
		       <span class="message_note"><?php echo ADDREDD_MSG;?></span>
                <span class="message_error2" id="address_span"></span>
             </div>
			 
			 <div class="form_row clearfix">
             <?php include_once(TEMPLATEPATH . "/library/map/location_add_map.php");?>
			  <span class="message_note"><?php echo GET_MAP_MSG;?></span></div>
			  
              			  
             <div class="form_row clearfix">
             	<label><?php echo EVENT_ADDRESS_LAT;?> </label>
             	<input type="text" name="geo_latitude" id="geo_latitude" class="textfield" value="<?php echo esc_attr(stripslashes($geo_latitude)); ?>" size="25"  />
		        <span class="message_note"><?php echo GET_LATITUDE_MSG;?></span>
             </div>
             <div class="form_row clearfix">
             	<label><?php echo EVENT_ADDRESS_LNG;?> </label>
             	<input type="text" name="geo_longitude" id="geo_longitude" class="textfield" value="<?php echo esc_attr(stripslashes($geo_longitude)); ?>" size="25"  />
		       <span class="message_note"><?php echo GET_LOGNGITUDE_MSG;?></span>
             </div>
              <div class="form_row clearfix">
             	<label><?php echo EVENT_MAP_VIEW_LNG;?> </label>
               <div class="category_label2">
             	                <?php
                if($map_view=='')
				{
					$map_view = 'ROADMAP';	
				}
				?>
             	<div class="form_cat2">
                <input type="radio" class="checkbox" name="map_view" id="map_view1" <?php if($map_view=='ROADMAP' ){echo 'checked="checked"';}?>  value="ROADMAP" size="25"  /> <?php _e('Road Map');?></div>
               <div class="form_cat2"> <input type="radio"  class="checkbox" name="map_view" id="map_view2" <?php if($map_view=='TERRAIN'){echo 'checked="checked"';}?> value="TERRAIN" size="25"  /> <?php _e('Terrain Map');?></div>
                <div class="form_cat2"><input type="radio" class="checkbox"  name="map_view" id="map_view3" <?php if($map_view=='SATELLITE'){echo 'checked="checked"';}?>  value="SATELLITE" size="25"  /> <?php _e('Satellite Map');?></div>
                
                </div>

             </div>
			 
           
              <div class="form_row clearfix">
             	<label><?php echo EVENT_ST_DATE;?> </label>
             	<input type="text" name="stdate" id="stdate" class="textfield_m" value="<?php echo esc_attr(stripslashes($st_date)); ?>" size="25"  />
			    &nbsp;<img src="<?php echo bloginfo('template_directory');?>/images/cal.gif" alt="Calendar" onclick="displayCalendar(document.propertyform.stdate,'yyyy-mm-dd',this)" class="calendar_link"  />
		         <span class="message_note"><?php echo EVENT_ST_DATE_MSG;?></span>
             </div>
             <div class="form_row clearfix">
             	<label><?php echo EVENT_ST_TIME;?> </label>
             	<input type="text" name="sttime" id="sttime" class="textfield" value="<?php echo esc_attr(stripslashes($st_time)); ?>" size="25"  />
		         <span class="message_note"><?php echo EVENT_ST_TIME_MSG;?></span>
             </div>
              <div class="form_row clearfix">
             	<label><?php echo EVENT_END_DATE;?> </label>
             	<input type="text" name="enddate" id="enddate" class="textfield_m" value="<?php echo esc_attr(stripslashes($end_date)); ?>" size="25"  />
                &nbsp;<img src="<?php echo bloginfo('template_directory');?>/images/cal.gif" alt="Calendar" onclick="displayCalendar(document.propertyform.enddate,'yyyy-mm-dd',this)"  class="calendar_link" />
		         <span class="message_note"><?php echo EVENT_END_DATE_MSG;?></span>
             </div>
             <div class="form_row clearfix">
             	<label><?php echo EVENT_END_TIME;?> </label>
             	<input type="text" name="endtime" id="endtime" class="textfield" value="<?php echo esc_attr(stripslashes($end_time)); ?>" size="25"  />
		         <span class="message_note"><?php echo EVENT_END_TIME_MSG;?></span>
             </div>
             
			 
			  <div class="form_row clearfix">
             	<label><?php echo EVENT_DESCRIPTION_TEXT;?> <span>*</span> </label>
				<textarea  name="proprty_desc" id="proprty_desc" rows=""  cols="" class="textarea" ><?php echo esc_attr(stripslashes($proprty_desc)); ?></textarea> 
				<span class="message_note"><?php _e(HTML_TAGS_ALLOW_MSG);?></span>
				<span class="message_error2" id="proprty_desc_span"></span>
             </div>
			 
			 
			 <div class="form_row clearfix">
             	<label><?php echo EVENT_REGISTRATION_DESC;?> </label>
                <textarea  name="reg_desc" id="reg_desc" rows=""  cols="" class="textarea"  ><?php echo esc_attr(stripslashes($reg_desc)); ?></textarea> 
		         <span class="message_note"><?php echo EVENT_REGISTRATION_DESC_MSG;?></span>
             </div>
            
             <div class="form_row clearfix">
             	<label><?php echo EVENT_CONTACT_INFO;?> </label>
             	<input type="text" name="phone" id="phone" class="textfield" value="<?php echo esc_attr(stripslashes($phone)); ?>" size="25"  />
		        <span class="message_error2" id="phone_span"></span>
                <span class="message_note"><?php echo CONTACT_MSG;?></span>
             </div>
             <div class="form_row clearfix">
             	<label><?php echo EVENT_CONTACT_EMAIL;?> </label>
             	<input type="text" name="email" id="email" class="textfield" value="<?php echo esc_attr(stripslashes($email)); ?>" size="25"  />
		        <span class="message_error2" id="email_span"></span>
             </div>
              <div class="form_row clearfix">
             	<label><?php echo EVENT_WEBSITE;?> </label>
             	<input type="text" name="website" id="website" class="textfield" value="<?php echo esc_attr(stripslashes($website)); ?>" size="25"  />
		         <span class="message_note"><?php echo WEBSITE_MSG;?></span>
             </div>
              <div class="form_row clearfix">
             	<label><?php echo TWITTER_TEXT; ?></label>
             	 <input name="twitter" id="twitter" value="<?php echo $twitter;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo TWITTER_MSG;?></span>
              </div>
              <div class="form_row clearfix">
             	<label><?php echo FACEBOOK_TEXT; ?></label>
             	 <input name="facebook" id="facebook" value="<?php echo $facebook;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo FACEBOOK_MSG;?></span>
              </div>
             <div class="form_row clearfix">
             	<label><?php echo EVENT_CATETORY_TEXT;?> <span>*</span> </label>
            	<div class="category_label"><?php require_once (TEMPLATEPATH . '/library/includes/event_category.php');?></div>
                <span class="message_note"><?php echo EVENT_MSG;?></span>
                <span id="category_span" class="message_error2"></span>
            </div>
            
             <h5 class="form_title"> <?php _e(PRO_PHOTO_TEXT);?></h5>
             <div class="form_row clearfix">
             	<label><?php echo PHOTOES_BUTTON;?></label>
				<?php include (TEMPLATEPATH . "/library/includes/image_uploader.php"); ?>
             </div>
             
             <h5 class="form_title"><?php echo ORGANIZER_INFO_TITLE_TEXT;?></h5> 
              <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_NAME_TEXT; ?></label>
             	 <input name="organizer_name" id="organizer_name" value="<?php echo $organizer_name;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_NAME_MSG;?></span>
              </div>
              <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_EMAIL_TEXT; ?></label>
             	 <input name="organizer_email" id="organizer_email" value="<?php echo $organizer_email;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_EMAIL_MSG;?></span>
              </div>
              <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_LOGO_TEXT; ?></label>
             	 <input name="organizer_logo" id="organizer_logo" value="<?php echo $organizer_logo;?>" type="file" class="textfield" />
                 <?php if($organizer_logo){?>
               <?php
				global $thumb_url;	 
				$thumb_url1 = $thumb_url.get_image_cutting_edge($args);
				?>
                <img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo $organizer_logo;?>&amp;w=105&amp;h=105&amp;zc=1&amp;q=80<?php echo $thumb_url1;?>" alt="" class="organized_logo"  title=""  />
                 <?php }?>
                 <span class="message_note"><?php echo ORGANIZER_LOGO_MSG;?></span>
              </div>
               <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_ADDRESS_TEXT; ?></label>
             	 <input name="organizer_address" id="organizer_address" value="<?php echo $organizer_address;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_ADDRESS_MSG;?></span>
              </div>
               <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_CONTACT_TEXT; ?></label>
             	 <input name="organizer_contact" id="organizer_contact" value="<?php echo $organizer_contact;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_CONTACT_MSG;?></span>
              </div>
               <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_WEBSITE_TEXT; ?></label>
             	 <input name="organizer_website" id="organizer_website" value="<?php echo $organizer_website;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_WEBSITE_MSG;?></span>
              </div>
              <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_MOBILE_TEXT; ?></label>
             	 <input name="organizer_mobile" id="organizer_mobile" value="<?php echo $organizer_mobile;?>" type="text" class="textfield" />
                 <span class="message_note"><?php echo ORGANIZER_MOBILE_MSG;?></span>
              </div>
              <div class="form_row clearfix">
             	<label><?php echo ORGANIZER_DESC_TEXT; ?></label>
                 <textarea  name="organizer_desc" id="organizer_desc" class="textarea" rows=""  cols="" ><?php echo esc_attr(stripslashes($organizer_desc)); ?></textarea> 
                 <span class="message_note"><?php echo ORGANIZER_DESC_MSG;?></span>
              </div>
             <?php if($_REQUEST['pid']==''){?>
                   
              <?php
			  	 $property_price_info = get_property_price_info();
				 if($property_price_info)
				 {
				 ?>
			  <h5 class="form_title"> <?php echo GENERAL_PROPERTY_INFO_TEXT;?></h5> 
			  <div class="form_row clearfix">
             	<label><?php echo SELECT_TYPE_TEXT;?> </label>
                <?php get_price_info($price_select);?> 
             	                
             </div>
			 
			 <?php if(get_option('is_allow_coupon_code')){?>
			 <h5 class="form_title"><?php echo COUPON_CODE_TITLE_TEXT;?></h5>
              <div class="form_row clearfix">
             	<label><?php echo PRO_ADD_COUPON_TEXT;?> </label>
				<input type="text" name="proprty_add_coupon" id="proprty_add_coupon" class="textfield" value="<?php echo esc_attr(stripslashes($proprty_add_coupon)); ?>" />
				<span class="message_note"><?php echo COUPON_NOTE_TEXT; ?></span>
             </div>
			 <?php }?>
			 <?php }?>
             <?php }?>
			 <script type="text/javascript">
			 function show_value_hide(val)
			 {
			 	document.getElementById('property_submit_price_id').innerHTML = document.getElementById('span_'+val).innerHTML;
			 }
			 </script>
         <?php
		if($current_user->ID=='')
		 {
		 ?>
		<div id="phone_detail_id" style="display:none;"> 
            <h5 class="form_title"><?php echo CONTACT_DETAIL_TITLE; ?></h5>
             
               <div class="form_row clearfix">
             	<label><?php echo CONTACT_NAME_TEXT; ?></label>
             	 <input name="user_fname" id="user_fname" value="<?php echo $user_fname;?>" type="text" class="textfield" />
              </div>
              <div class="form_row clearfix">
             	<label><?php echo CONTACT_TEXT; ?></label>
             	 <input  name="user_phone" id="user_phone" value="<?php echo $user_phone;?>" type="text" class="textfield" />
              </div>
              <div class="form_row clearfix">
             	<label><?php echo EMAIL_TEXT; ?></label>
             	 <input name="user_email" id="user_email" value="<?php echo $user_email;?>" type="text" class="textfield" />
              </div>
		</div>
		<?php }?>  
		
		
		    
        <?php 
		if(function_exists('pt_get_captch') && $_REQUEST['pid']==''){pt_get_captch(); }?>       
			  <input type="submit" name="Update" value="<?php echo PRO_PREVIEW_BUTTON;?>" class="b_review" />
			  
			  
              
           </form>  
		
		    <div class="form_row clearfix"> 
			  	 <span class="message_note"> <?php _e('Note: You will be able to see a preview in the next page');?>  </span>
			  </div>
		   
</div> <!-- content #end -->

<?php get_sidebar(); ?>



<script language="javascript" type="text/javascript">
function set_login_registration_frm(val)
{
	if(val=='existing_user')
	{
		document.getElementById('phone_detail_id').style.display = 'none';
		document.getElementById('login_user_frm_id').style.display = '';
		document.getElementById('user_login_or_not').value = val;
	}else  //new_user
	{
		document.getElementById('phone_detail_id').style.display = '';
		document.getElementById('login_user_frm_id').style.display = 'none';
		document.getElementById('user_login_or_not').value = val;
	}
}
<?php if($user_login_or_not)
{
?>
set_login_registration_frm('<?php echo $user_login_or_not;?>');
<?php
}
?>
</script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/js/place_validation.js"></script>

</div> <!-- wrapper #end -->
<div id="bottom"></div> 
 <?php get_footer(); ?>
 