AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/lemans/components/com_mymaplocations/views/form/tmpl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/lemans/components/com_mymaplocations/views/form/tmpl/edit.php
<?php

/**
 * @version    4.6.2
 * @package     com_mymaplocations
 * @copyright   JoomUnited (C) 2011. All rights reserved.
 * @license     http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * ****@author      joomunited - contact@joomunited.com
 */
defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidator');

// Create shortcut to parameters.
$params = $this->state->get('params');
$extlink=$this->form->getValue('extlink');
// Import CSS
$document = JFactory::getDocument();
$lang = JFactory::getLanguage();
$this->form->setValue('language',null,$lang->getTag());
$document->addStyleSheet(JURI::base().'administrator/components/com_mymaplocations/assets/css/mymaplocations.css');
$document->addStyleSheet(JURI::root() . '/components/com_mymaplocations/assets/css/materialize.css');
?>
<script type="text/javascript">
       <?php if (!version_compare(JVERSION, '4.0', 'ge')) {?>
    Joomla.submitbutton = function(task)
    {
        if (task == 'location.cancel' || document.formvalidator.isValid(document.getElementById('location-form'))) {
<?php echo $this->form->getField('description')->save(); ?>
                                    Joomla.submitform(task, document.getElementById('location-form'));
                                }
                                else {
                                    alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED')); ?>');
                                }
                            }
                            <?php } ?>
							function toggleIcon(data)
                           {
	var value=(jQuery(data).val());
	if (value==1) {
                                   document.getElementById("file_icon_view").style.display="none";
								   document.getElementById("file_list_view").style.display="block";
                               }else
   				{
   												
   					 document.getElementById("file_icon_view").style.display="block";
					 document.getElementById("file_list_view").style.display="none";
   				}
               
	
                           }
						   function changeIcon()
						   {
									var value=(jQuery("#jform_icon_list option:selected").val());
									jQuery("#imagedata").html('<img src="<?php echo JURI::base()?>images/icons/'+value+'" style="max-height:200px"/>');
									
						   }
		
</script>
<style type="text/css">
	#cmsmenu_chzn,#cmsmenuext_chzn
	{
		display:none;
	}
	.container12
	{
		width:100%;
		position:relative;
		float:left;
	}
	.container8
	{
		width:60%;
		float:left;
		position:relative;
        padding:20px;
	}
	.container4
	{
		width:40%;
		float:left;
		position:relative;
	    padding:20px;
	
    }
	@media screen and (max-width: 768px) {
		.container8,.container4
		{
			width:100%;
		}
	}
	<?php if(!$extlink) {?>
	#extlinkdata
	{
		display:none;														
	}
	<?php } ?>
</style>
<div class="edit item-page<?php echo $this->pageclass_sfx; ?> container12" id="ju-form">
	<?php if ($params->get('show_page_heading')) : ?>
	<div class="page-header">
		<h1>
			<?php echo $this->escape($params->get('page_heading')); ?>
		</h1>
	</div>
	<?php endif; ?>

	<form action="<?php echo JRoute::_('index.php?option=com_mymaplocations&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="location-form" class="form-validate form-vertical"  enctype="multipart/form-data">
		<div class="btn-toolbar">
			<div class="btn-group">
				<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('location.save')">
					<span class="icon-ok"></span><?php echo JText::_('JSAVE') ?>
				</button>
			</div>
			<div class="btn-group">
				<button type="button" class="btn" onclick="Joomla.submitbutton('location.cancel')">
					<span class="icon-cancel"></span><?php echo JText::_('JCANCEL') ?>
				</button>
			</div>
		</div>
        <div class="container8 form-horizontal">
                <h2><?php echo JText::_('COM_MYMAPLOCATIONS_LEGEND_STORE'); ?></h2>
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('name'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('name'); ?></div>
                        </div>
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('alias'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('alias'); ?></div>
                        </div>

                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('catid'); ?>
                            </div>
                            <div class="controls">
                                <?php echo str_replace('onchange="categoryHasChanged(this);"','',$this->form->getInput('catid')); ?></div>
                        </div>
						

                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('file_logo'); ?></div>
                            <div class="controls">
                                <?php echo $this->form->getInput('file_logo'); ?><?php
								if($this->item->logo){ echo '<br><img src="'.JURI::base().$this->item->logo.'" style="max-height:200px"/>';} 
								echo $this->form->getInput('logo'); ?></div>
                        </div>
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('use_category_image'); ?>
                            </div>
                            <div class="controls">
                                <?php echo $this->form->getInput('use_category_image'); ?></div>
                        </div>
			
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('markercolor'); ?>
                            </div>
                            <div class="controls">
                                <?php echo $this->form->getInput('markercolor'); ?></div>
                        </div>
                        
                        <div class="control-group">
                            <div class="control-label"><?php
                                echo $this->form->getLabel('file_icon');
                                $icon = ($this->form->getValue('file_icon'));
                                ?>

                            </div>
                            <div class="controls">
								 <?php echo str_replace('<input','<input onchange="toggleIcon(this)" ',$this->form->getInput('use_icon_image')); ?>
								
								<span id="file_icon_view">
                                <?php echo "<br/>".$this->form->getInput('file_icon'); ?>
								</span><span id="file_list_view" style="display:none;">
								<?php echo "<br/>".str_replace('<select','<select onchange="changeIcon()" ',$this->form->getInput('icon_list')); ?>
								</span>
								<?php echo $this->form->getInput('icon');
								if($this->item->icon){ echo '<br><span id="imagedata"><img src="'.JURI::base().$this->item->icon.'" style="max-height:200px"/></span>';} 
								?></div>
                        </div>
						
						
                       <span style="display:none"> <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('language'); ?></div>
                            <div class="controls">
                                <?php echo $this->form->getInput('language'); ?></div>
                        </div>	
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('state'); ?>

                            </div>
                            <div class="controls">
                                <?php echo $this->form->getInput('state'); ?></div> 				</div>
						
						</span>
						<div class="control-group"> 					<div class="control-label"><?php echo $this->form->getLabel('checked_out'); ?>

                                <?php echo $this->form->getInput('checked_out'); ?></div> 				</div><div class="control-group"> 					<div class="control-label"><?php echo $this->form->getLabel('checked_out_time'); ?>

                                <?php echo $this->form->getInput('checked_out_time'); ?>
                            </div>
                        </div>

                        <div class="control-group editor-panel">
                            <div class="control-label"><?php echo $this->form->getLabel('description'); ?>


                            </div>
                            <div class="controls">
                                <?php echo $this->form->getInput('description'); ?>
                            </div>
                        </div>
						   <div class="control-group">
            <div class="control-label"><?php echo $this->form->getLabel('tags'); ?></div>
            <div class="controls"><?php echo $this->form->getInput('tags'); ?></div>
         </div>
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('metakey'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('metakey'); ?></div>
                        </div>
			
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('metadesc'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('metadesc'); ?></div>
                        </div>
    
                        <div class="control-group">
                            <div class="control-label"><?php echo $this->form->getLabel('place_id'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('place_id'); ?></div>
                        </div>
                        <div class="control-group" style="display:none;">
                            <div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('id'); ?></div>
                        </div>
                        <div class="control-group" style="display:none;">
                            <div class="control-label"><?php echo $this->form->getLabel('created_by'); ?></div>
                            <div class="controls"><?php echo $this->form->getInput('created_by'); ?></div>
                        </div>
						<?php
				if(file_exists( JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'))
				{

				$fieldSets = $this->form->getFieldsets();
				$displayData=$this;
				foreach($fieldSets as $fieldSet)
				{
				$key=$fieldSet->name;
				$displayData->fieldset = $key;
				echo JLayoutHelper::render('joomla.edit.fieldset', $displayData);
				}
				}
				?>
                    </div>

                    <input type="hidden" name="task" value="" />
                    <?php echo JHtml::_('form.token'); ?>

                    <style type="text/css">
                        /* Temporary fix for drifting editor fields */
                        .adminformlist li {
                            clear: both;
                        }
                    </style>



                    <div class="container4 form-horizontal">
                            <h2><?php echo JText::_('COM_MYMAPLOCATIONS_LEGEND_STORE_MAPHELP'); ?></h2>
                            <div class="control-group">
                                <div class="control-label">
                                    <?php echo JText::_('COM_MYMAPLOCATIONS_LEGEND_STORE_MAPHELPTEXT'); ?>

                                </div></div>
	<div>
		<div class="alert alert-success"  id="place_id_data" style="display:none;">
         <button type="button" class="close" data-dismiss="alert">&times;</button>
		 <div id="place_id"></div>
		</div>
		</div>
                           <div id="container_mml"> <input id="postcode" type="text" class="search-query" autocomplete="off"/><input type="button" onclick="Geocode()" value="<?php echo JTEXT::_('COM_MYMAPLOCATIONS_FORM_LBL_STORE_SEARCH'); ?>"  class="btn"/>
						   </div>
                                <div class="control-group">
                                    <div class="navbar-form pull-left">
                                        <span class="label"> <?php echo $this->form->getLabel('latitude'); ?></span><?php echo $this->form->getInput('latitude'); ?>	</div>
                                    <div class="navbar-form pull-left" style="paddint-bottom:10px;margin-bottom:10px;">
                                        <span class="label"> <?php echo $this->form->getLabel('longitude'); ?></span><?php echo $this->form->getInput('longitude'); ?>
                                    </div>

                                    <div id="map" style="width: 80%; height: 300px"></div>
									</div>
                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('address'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('address'); ?></div>
                                            </div>


                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('town'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('town'); ?></div>
                                            </div>


                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('locationstate'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('locationstate'); ?></div>
                                            </div>


                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('country'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('country'); ?></div>
                                            </div>

                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('postal'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('postal'); ?></div>
                                            </div>
                                            <?php if ($this->showcontact == 1) { ?>
                                                <div class="control-group">
                                                    <div class="control-label"><?php echo $this->form->getLabel('contactlink'); ?></div>
                                                    <div class="controls">
                                                        <?php echo $this->form->getInput('contactlink'); ?>
													</div>
                                                </div>
												
                                            <?php } ?>
                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('phone'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('phone'); ?></div>
                                            </div>

                                            <div class="control-group">
                                                <div class="control-label"><?php echo $this->form->getLabel('hours'); ?></div>
                                                <div class="controls">
                                                    <?php echo $this->form->getInput('hours'); ?></div>
                                            </div>
                                   </div>
<?php
            require_once  (JPATH_SITE.'/components/com_mymaplocations/helpers/mymaplocations.php'); 
            if(method_exists('MyMapLocationsHelper','getBackEndJs'))
               {
                  if ($this->item->id != 0) { 
                 MyMaplocationsHelper::getBackEndJs(true,$this->form->getValue('latitude'),$this->form->getValue('longitude'));
                } else {
                 MyMaplocationsHelper::getBackEndJs();
                              }
               }else {?>
			   
                            <script src="//maps.google.com/maps/api/js?libraries=places<?php if($googleapi){ echo '&key='.$googleapi;}?>" type="text/javascript"></script>
                            <?php JHtml::_('jquery.framework'); ?>
                            <script src="<?php echo JURI::base();?>administrator/components/com_mymaplocations/assets/site.js" type="text/javascript"></script>
								
                                    <script type="text/javascript">
                                        /* <![CDATA[ */
    
<?php if ($this->item->id != 0) { ?>
                                            var latlng = new google.maps.LatLng(<?php echo $this->form->getValue('latitude'); ?>, <?php echo $this->form->getValue('longitude'); ?>);
<?php } else { ?>
                                                var latlng = new google.maps.LatLng(44.824708,-0.615234);
<?php } ?>
                                            var options = {
                                                zoom: 5,
                                                center: latlng,
                                                mapTypeId: google.maps.MapTypeId.ROADMAP,
                                                draggableCursor: "crosshair",
                                                streetViewControl: false
                                            };
					    var map = new google.maps.Map(document.getElementById("map"), options);
					    var marker = new google.maps.Marker({
					    position: latlng,
					    map: map
					    });

                                            
                                            jQuery("#zoom").html(5);
                                            google.maps.event.addListener(map,"click", function(location)
                                            {
                                                GetlocationInfo(location.latLng);
                                            });
                                            google.maps.event.addListener(map,'zoom_changed', function(oldLevel, newLevel)
                                            {
                                                jQuery("#zoom").html(map.getZoom());
                                            });
                                            var myPano = new google.maps.StreetViewPanorama(document.getElementById("pano"),
                                            { visible:false});
                                            myPano.setPov({
                                                heading: 265,
                                                zoom:1,
                                                pitch:0});
                                            jQuery('#pano').hide();
                                            google.maps.event.trigger(myPano, 'resize');

                                            // autocomplete
                                            var autocomplete = new google.maps.places.Autocomplete(document.getElementById('postcode'), {});
                                            google.maps.event.addListener(autocomplete, 'place_changed', function() {
                                                jQuery("#locations").html("");
                                                jQuery("#error").html("");
                                                var place = autocomplete.getPlace();
												if (place.place_id ) {
                                                jQuery("#place_id_data").show();
											jQuery("#place_id").html("We have found Google Place <a href='"+place.url+"' class='btn btn-primary' target='_blank'>"+place.name+"</a> linked with data.Click here to copy data directly to our fields from Google places API  <input type='button' class='btn btn-inverse' value='insert' onclick='insertGooglePlaces()'/>");
												}
                                                Gotolocation(place.geometry.location);
                                            });
			
                                            var initListener;
                                            var marker;
                                            function StartStreetView() {
                                                // street view
                                                if (jQuery("#streetViewBtn").val() == "Start StreetView") {
                                                    initListener = google.maps.event.addListener(myPano, "position_changed", handlePanoMove);
                                                    jQuery('#pano').show();
                                                    myPano.setVisible(true);
                                                    jQuery("#streetViewBtn").val("End StreetView");
                                                    google.maps.event.trigger(myPano, 'resize');
                                                    GotoLatLong();
                                                }
                                                else {
                                                    google.maps.event.removeListener(initListener);
                                                    myPano.setVisible(false);
                                                    jQuery('#pano').hide();
                                                    jQuery("#streetViewBtn").val("Start StreetView");
                                                    google.maps.event.trigger(myPano, 'resize');
                                                }
                                            }

                                            function Geocode()
                                            {
                                                jQuery("#locations").html("");
                                                jQuery("#error").html("");
                                                var place = autocomplete.getPlace();
												if(typeof place === 'undefined'){
															var localSearch = new google.maps.Geocoder();
                                                var postcode = jQuery("#postcode").val();
                                                localSearch.geocode({ 'address': postcode },
                                                function(results, status) {
                                                    if (results.length == 1) {
                                                        var result = results[0];
                                                        var location = result.geometry.location;
                                                        Gotolocation(location);
                                                    }
                                                    else if (results.length > 1) {
                                                        jQuery("#error").html("Multiple addresses found");
                                                        // build a list of possible addresses
                                                        var html = "";
                                                        for (var i=0; i<results.length; i++) {
                                                            html += '<a href="javascript:Gotolocation(new google.maps.LatLng(' + 
                                                                results[i].geometry.location.lat() + ', ' + results[i].geometry.location.lng() + '))">' + 
                                                                results[i].formatted_address + "</a><br/>";
                                                        }
                                                        jQuery("#locations").html(html);
                                                    }
                                                    else {
                                                        jQuery("#error").html("Address not found");
                                                    }
                                                });	
																}
																else
																{
												if (place.place_id ) {
																
                                                jQuery("#place_id_data").show();
												jQuery("#place_id").html("We have found Google Place <a href='"+place.url+"' class='btn btn-primary' target='_blank'>"+place.name+"</a> linked with data.Click here to copy data directly to our fields from Google placs API  <input type='button' class='btn btn-inverse' value='insert' onclick='insertGooglePlaces()'/>");
																}
																Gotolocation(place.geometry.location);
												}
                                                
                                            }
                                            function useGeocode()
                                            {
                                                if (navigator.geolocation)
                                                {
                                                    navigator.geolocation.getCurrentPosition(showPosition);
                                                }
                                                else
                                                {
                                                    x.innerHTML="Geolocation is not supported by this browser.";
                                                }
                                            }
                                            function showPosition(position)
                                            {
                                                document.getElementById('jform_latitude').value= position.coords.latitude;
                                                document.getElementById('jform_longitude').value=position.coords.longitude;
                                                ReverseGeocode(position.coords.latitude, position.coords.longitude, '#address');
                                                Gotolocation(new google.maps.LatLng( position.coords.latitude, position.coords.longitude));
                                            }
			
                                            function Gotolocation(location) {
                                                GetlocationInfo(location);
                                                map.setCenter(location);
                                            }
			
                                            function GetlocationInfo(latlng)
                                            {
                                                if (latlng != null)
                                                {
                                                    ShowLatLong(latlng);
                                                    UpdateStreetView(latlng);
                                                }
                                            }

                                            function GotoLatLong()
                                            {
                                                if (jQuery("#jform_latitude").val() != "" && jQuery("#jform_longitude").val() != "") {
                                                    var lat = jQuery("#jform_latitude").val();
                                                    var long = jQuery("#jform_longitude").val();
                                                    var latLong = new google.maps.LatLng(lat, long);
                                                    ShowLatLong(latLong);
                                                    map.setCenter(latLong);
                                                    UpdateStreetView(latLong);
                                                }
                                            }

                                            function ShowLink(){
                                                jQuery("#mapLink").html('<a href="https://maps.google.com/?ll=' + jQuery("#jform_latitude").val() +
                                                    ',' + jQuery("#jform_longitude").val() + '&z=' + jQuery("#zoom").html() + '">Link for this map</a>');
                                            }

                                            function toDMS(latOrLng) {
                                                var d = parseInt(latOrLng);
                                                var md = Math.abs(latOrLng - d) * 60;
                                                var m = Math.floor(md);
                                                var sd = (md - m) * 60;
                                                return Math.abs(d) + "\u00B0 " + m + "' " + roundNumber(sd, 4) + '"';
                                            }
			
                                            function latToDMS(lat) {
                                                var dms = toDMS(lat);
                                                if (lat > 0)
                                                    return dms + "N";
                                                else
                                                    return dms + "S";
                                            }
			
                                            function lngToDMS(lng) {
                                                var dms = toDMS(lng);
                                                if (lng > 0)
                                                    return dms + "E";
                                                else
                                                    return dms + "W";
                                            }
			
                                            function ShowLatLong(latLong)
                                            {
                                                // show the lat/long
                                                if (marker != null) {
                                                    marker.setMap(null);
                                                }
                                                marker = new google.maps.Marker({
                                                    position: latLong,
                                                    map: map});
                                                jQuery("#jform_latitude").val(roundNumber(latLong.lat(), 6));
                                                jQuery("#jform_longitude").val(roundNumber(latLong.lng(), 6));
                                                jQuery("#latDMS").html(latToDMS(latLong.lat()));
                                                jQuery("#lngDMS").html(lngToDMS(latLong.lng()));
                                                ShowLink();
                                                GetElevation(latLong.lat(), latLong.lng(), '#elevation');
                                                ReverseGeocode(latLong.lat(), latLong.lng(), '#address');
				
                                            }

                                            function UpdateStreetView(latLong)
                                            {
                                                // street view
                                                if (jQuery("#streetViewBtn").val() == "End StreetView") {
                                                    jQuery("#panoError").html("");
                                                    myPano.setVisible(true);
                                                    myPano.setPosition(latLong);
                                                    // also set via the service API so we know if there is a view available
                                                    var service = new google.maps.StreetViewService();
                                                    service.getPanoramaBylocation(latLong, 50,
                                                    function(result, status) {
                                                        if (status != google.maps.StreetViewStatus.OK) {
                                                            jQuery("#panoError").html("No street view available");
                                                            myPano.setVisible(false);
                                                        }
                                                    }
                                                );
                                                }
                                            }

                                            function handlePanoMove(location)
                                            {
                                                ShowLatLong(myPano.getPosition());
                                            }
                                            function copyData()
                                            {
                                                var lat=document.getElementById('lat').value;
                                                var long=document.getElementById('long').value;
                                                document.getElementById('jform_latitude').value=lat;
                                                document.getElementById('jform_longitude').value=long;
                                            }
											function insertGooglePlaces() {
                                                //code
												   var place = autocomplete.getPlace();
												   document.getElementById('jform_place_id').value=place.place_id;
												   document.getElementById('jform_name').value=place.name;
													 document.getElementById('jform_alias').value="";
												if (typeof place.international_phone_number !== 'undefined') {
												   document.getElementById('jform_phone').value=place.international_phone_number;
												}else
												{
																document.getElementById('jform_phone').value="";
												}
												if (typeof place.website !== 'undefined') {
												   document.getElementById('jform_contactlink').value=place.website;
												}else
												{
																document.getElementById('jform_contactlink').value="";
												}
												
												if (typeof place.opening_hours !== 'undefined') {
												 document.getElementById('jform_hours').value=place.opening_hours.weekday_text;
												}else
												{
																document.getElementById('jform_hours').value="";
												}
												if (typeof place.types !== 'undefined') {
												    document.getElementById('jform_metakey').value=place.types;
												}else
												{
																 document.getElementById('jform_metakey').value="";
												}
													
		
                                            }
                                            /* ]]> */
                                    </script>
									<?php } ?>
    
	</form>

								</div>	

Anon7 - 2022
AnonSec Team