Skip to content

Commit

Permalink
Merge pull request #46 from BioKIC/master
Browse files Browse the repository at this point in the history
Bring master into KDP_dev
  • Loading branch information
themerekat authored Aug 2, 2021
2 parents 73fb963 + 5fa5d18 commit 250c6cc
Show file tree
Hide file tree
Showing 17 changed files with 217 additions and 376 deletions.
2 changes: 1 addition & 1 deletion checklists/checklistadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function validateAddProjectForm(f){
<ul>
<li><a href="#admintab"><span><?php echo $LANG['ADMIN'];?></span></a></li>
<li><a href="checklistadminmeta.php?clid=<?php echo $clid.'&pid='.$pid; ?>"><span><?php echo $LANG['DESCRIPTION'];?></span></a></li>
<!-- <li><a href="#pointtab"><span>Non-vouchered Points</span></a></li> -->
<!-- <li><a href="#pointtab"><span>Non-vouchered Points</span></a></li> -->
<li><a href="checklistadminchildren.php?clid=<?php echo $clid.'&pid='.$pid; ?>"><span><?php echo $LANG['RELATEDCHECK'];?></span></a></li>
<?php
if($clManager->hasVoucherProjects()) echo '<li><a href="imgvouchertab.php?clid='.$clid.'">'.(isset($LANG['ADDIMGVOUCHER'])?$LANG['ADDIMGVOUCHER']:'Add Image Voucher').'</a></li>';
Expand Down
8 changes: 4 additions & 4 deletions checklists/clsppeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ function removeTaxon(){
<div id="gendiv">
<form name='editcl' action="clsppeditor.php" method='post' >
<fieldset style='margin:5px;padding:15px'>
<legend><b><?php echo (isset($LANG['EDIT_CHECKLIST'])?$LANG['EDIT_CHECKLIST']:'Edit Checklist Information'); ?></b></legend>
<div style="clear:both;margin:3px;">
<legend><b><?php echo (isset($LANG['EDIT_CHECKLIST'])?$LANG['EDIT_CHECKLIST']:'Edit Checklist Information'); ?></b></legend>
<div style="clear:both;margin:3px;">
<div style='width:100px;font-weight:bold;float:left;'>
<?php echo (isset($LANG['HABITAT'])?$LANG['HABITAT']:'Habitat'); ?>:
</div>
Expand Down Expand Up @@ -251,7 +251,7 @@ function removeTaxon(){
<hr />
<form action="clsppeditor.php" method="post" name="deletetaxon" onsubmit="return window.confirm('<?php echo (isset($LANG['ARE_YOU_SURE'])?$LANG['ARE_YOU_SURE']:'Are you sure you want to delete this taxon from checklist?'); ?>');">
<fieldset style='margin:5px;padding:15px;'>
<legend><b><?php echo (isset($LANG['DELETE'])?$LANG['DELETE']:'Delete'); ?></b></legend>
<legend><b><?php echo (isset($LANG['DELETE'])?$LANG['DELETE']:'Delete'); ?></b></legend>
<input type='hidden' name='tid' value="<?php echo $vManager->getTid(); ?>" />
<input type='hidden' name='clid' value="<?php echo $vManager->getClid(); ?>" />
<input type='hidden' name='cltype' value="<?php echo $clArray['cltype']; ?>" />
Expand Down Expand Up @@ -333,7 +333,7 @@ function removeTaxon(){

</div>
-->
</div>
</div>
<?php
}
else{
Expand Down
87 changes: 43 additions & 44 deletions checklists/dynamicmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,64 +55,63 @@
<script src="//maps.googleapis.com/maps/api/js?<?php echo (isset($GOOGLE_MAP_KEY) && $GOOGLE_MAP_KEY?'key='.$GOOGLE_MAP_KEY:''); ?>"></script>

<script type="text/javascript">
var map;
var currentMarker;
var zoomLevel = 5;
var submitCoord = false;
var map;
var currentMarker;
var zoomLevel = 5;
var submitCoord = false;

$(document).ready(function() {
$( "#taxa" ).autocomplete({
source: function( request, response ) {
$.getJSON( "rpc/uppertaxasuggest.php", { term: request.term }, response );
},
minLength: 2,
autoFocus: true,
select: function( event, ui ) {
if(ui.item){
$( "#tid" ).val(ui.item.id);
}
}
});
$(document).ready(function() {
$( "#taxa" ).autocomplete({
source: function( request, response ) {
$.getJSON( "rpc/uppertaxasuggest.php", { term: request.term }, response );
},
minLength: 2,
autoFocus: true,
select: function( event, ui ) {
if(ui.item){
$( "#tid" ).val(ui.item.id);
}
}
});
});

});

function initialize(){
var dmLatLng = new google.maps.LatLng(<?php echo $latCen.",".$longCen; ?>);
var dmOptions = {
function initialize(){
var dmLatLng = new google.maps.LatLng(<?php echo $latCen.",".$longCen; ?>);
var dmOptions = {
zoom: <?php echo $zoomInt; ?>,
center: dmLatLng,
mapTypeId: google.maps.MapTypeId.TERRAIN
};

map = new google.maps.Map(document.getElementById("map_canvas"), dmOptions);
map = new google.maps.Map(document.getElementById("map_canvas"), dmOptions);

google.maps.event.addListener(map, 'click', function(event) {
mapZoom = map.getZoom();
startLocation = event.latLng;
setTimeout("placeMarker()", 500);
});
}
mapZoom = map.getZoom();
startLocation = event.latLng;
setTimeout("placeMarker()", 500);
});
}

function placeMarker() {
function placeMarker() {
if(currentMarker) currentMarker.setMap();
if(mapZoom == map.getZoom()){
var marker = new google.maps.Marker({
position: startLocation,
map: map
});
if(mapZoom == map.getZoom()){
var marker = new google.maps.Marker({
position: startLocation,
map: map
});
currentMarker = marker;

var latValue = startLocation.lat();
var lonValue = startLocation.lng();
latValue = latValue.toFixed(5);;
lonValue = lonValue.toFixed(5);
var latValue = startLocation.lat();
var lonValue = startLocation.lng();
latValue = latValue.toFixed(5);;
lonValue = lonValue.toFixed(5);
document.getElementById("latbox").value = latValue;
document.getElementById("lngbox").value = lonValue;
document.getElementById("latlngspan").innerHTML = latValue + ", " + lonValue;
document.mapForm.buildchecklistbutton.disabled = false;
submitCoord = true;
document.getElementById("lngbox").value = lonValue;
document.getElementById("latlngspan").innerHTML = latValue + ", " + lonValue;
document.mapForm.buildchecklistbutton.disabled = false;
submitCoord = true;
}
}
}

function checkForm(){
if(submitCoord) return true;
Expand Down Expand Up @@ -194,7 +193,7 @@ function checkForm(){
<div id='map_canvas' style='width:95%; height:650px; clear:both;'></div>
</div>
<?php
include_once($SERVER_ROOT.'/includes/footer.php');
include_once($SERVER_ROOT.'/includes/footer.php');
?>
</body>
</html>
4 changes: 2 additions & 2 deletions checklists/rpc/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//error_reporting(E_ALL);
include_once('../../config/symbini.php');
header("Content-Type: text/html; charset=".$CHARSET);

?>
<html>
<head>
<title>Page</title>
<?php
<?php
$activateJQuery = true;
if(file_exists($SERVER_ROOT.'/includes/head.php')){
include_once($SERVER_ROOT.'/includes/head.php');
Expand Down
17 changes: 5 additions & 12 deletions checklists/tools/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
//error_reporting(E_ALL);
include_once('../../config/symbini.php');
header("Content-Type: text/html; charset=".$CHARSET);

?>
<html>
<head>
<title>Page</title>
<?php
$activateJQuery = true;
if(file_exists($SERVER_ROOT.'/includes/head.php')){
include_once($SERVER_ROOT.'/includes/head.php');
}
else{
echo '<link href="'.$CLIENT_ROOT.'/css/jquery-ui.css" type="text/css" rel="stylesheet" />';
echo '<link href="'.$CLIENT_ROOT.'/css/base.css?ver=1" type="text/css" rel="stylesheet" />';
echo '<link href="'.$CLIENT_ROOT.'/css/main.css?ver=1" type="text/css" rel="stylesheet" />';
}
?>
<?php
$activateJQuery = true;
include_once($SERVER_ROOT.'/includes/head.php');
?>
</head>
<body>
<?php
Expand Down
59 changes: 29 additions & 30 deletions checklists/tools/mappointaid.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
include_once('../../config/symbini.php');
header("Content-Type: text/html; charset=".$CHARSET);


$formName = array_key_exists("formname",$_REQUEST)?$_REQUEST["formname"]:"";
$latName = array_key_exists("latname",$_REQUEST)?$_REQUEST["latname"]:"";
$longName = array_key_exists("longname",$_REQUEST)?$_REQUEST["longname"]:"";
Expand Down Expand Up @@ -34,9 +33,9 @@
<title><?php echo $DEFAULT_TITLE; ?> - Coordinate Aid</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script src="//maps.googleapis.com/maps/api/js?<?php echo (isset($GOOGLE_MAP_KEY) && $GOOGLE_MAP_KEY?'key='.$GOOGLE_MAP_KEY:''); ?>"></script>
<script type="text/javascript">
var map;
var currentMarker;
<script type="text/javascript">
var map;
var currentMarker;

function initialize(){
var latCenter = <?php echo $lat; ?>;
Expand All @@ -49,13 +48,13 @@ function initialize(){
document.getElementById("latbox").value = latValue;
document.getElementById("lngbox").value = lngValue;
}
var dmLatLng = new google.maps.LatLng(latCenter,lngCenter);
var dmOptions = {
var dmLatLng = new google.maps.LatLng(latCenter,lngCenter);
var dmOptions = {
zoom: <?php echo $zoom; ?>,
center: dmLatLng,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
map = new google.maps.Map(document.getElementById("map_canvas"), dmOptions);
map = new google.maps.Map(document.getElementById("map_canvas"), dmOptions);
if(latValue && lngValue){
var mLatLng = new google.maps.LatLng(latValue,lngValue);
var marker = new google.maps.Marker({
Expand All @@ -66,31 +65,31 @@ function initialize(){
}

google.maps.event.addListener(map, 'click', function(event) {
mapZoom = map.getZoom();
startLocation = event.latLng;
setTimeout("placeMarker()", 500);
});
}
mapZoom = map.getZoom();
startLocation = event.latLng;
setTimeout("placeMarker()", 500);
});
}

function placeMarker() {
if(currentMarker) currentMarker.setMap();
if(mapZoom == map.getZoom()){
var marker = new google.maps.Marker({
position: startLocation,
map: map
});
currentMarker = marker;
function placeMarker() {
if(currentMarker) currentMarker.setMap();
if(mapZoom == map.getZoom()){
var marker = new google.maps.Marker({
position: startLocation,
map: map
});
currentMarker = marker;

var latValue = startLocation.lat();
var lonValue = startLocation.lng();
latValue = latValue.toFixed(5);;
var latValue = startLocation.lat();
var lonValue = startLocation.lng();
latValue = latValue.toFixed(5);
lonValue = lonValue.toFixed(5);
document.getElementById("latbox").value = latValue;
document.getElementById("lngbox").value = lonValue;
}
}
}
}

function updateParentForm() {
function updateParentForm() {
try{
var latObj = opener.document.<?php echo $formName.'.'.$latName; ?>;
var lngObj = opener.document.<?php echo $formName.'.'.$longName; ?>;
Expand All @@ -101,10 +100,10 @@ function updateParentForm() {
catch(myErr){
//alert("Unable to transfer data. Please let an administrator know.");
}
self.close();
return false;
}
</script>
self.close();
return false;
}
</script>

</head>
<body style="background-color:#ffffff;" onload="initialize()">
Expand Down
8 changes: 4 additions & 4 deletions checklists/tools/mappolyaid.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ function toggle(target){
if(ele){
if(ele.style.display=="none"){
ele.style.display="";
}
else{
ele.style.display="none";
}
}
else{
ele.style.display="none";
}
}
}
</script>
Expand Down
Loading

0 comments on commit 250c6cc

Please sign in to comment.