示例#1
0
    $endSeason = $currentYear;
} else {
    $endSeason = $currentYear - 1;
}
// The sighting started in 2007-2008 so start from this season
for ($i = 2010; $i <= $endSeason; $i++) {
    $fromTo = "{$i}-" . ($i + 1);
    echo '<option value="' . $fromTo . '"';
    echo $_GET['season'] == $fromTo ? ' selected>' : '>';
    echo $fromTo;
    echo '</option>';
}
?>
           
                    </select>
		    <? $current_season = getCurrentSeason();
                   
                       if( $_GET['season'] != '' && strtolower($_GET['season']) !='all' ) {		       
		    ?>
                     <a title="remove season" href="#" onClick="get_remove('season');">X</a>
                    
                       <? } ?>

                   </td>

<!-- <td  style="width:190px;">
                    
		    
                    <select name="type" style="width:85%">
                            <option value="All">All</option>
                            <option value="first"<?php 
session_start();
include "./db.php";
include "functions.php";
$user_id = $_SESSION['userid'];
// again if we are on php4
if (!function_exists("stripos")) {
    function stripos($str, $needle, $offset = 0)
    {
        return strpos(strtolower($str), strtolower($needle), $offset);
    }
}
$q = strtolower($_GET["q"]);
if (!$q) {
    return;
}
$season = getCurrentSeason();
$season = explode('-', trim($season));
$seasonStart = $season[0];
$seasonEnd = $season[1];
$sql = "SELECT location_id, location_name, city, district,state ";
$sql .= "FROM migwatch_locations l ";
$sql .= "INNER JOIN migwatch_states s ";
$sql .= "ON l.state_id = s.state_id ORDER BY s.state";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
    $location_id = $row['location_id'];
    $sql1 = "SELECT obs_start,frequency FROM migwatch_l1 WHERE location_id='{$location_id}' AND user_id = '{$user_id}'  AND deleted = '0' AND obs_start BETWEEN '{$seasonStart}-07-01' AND '{$seasonEnd}-06-30' ORDER BY sighting_date DESC LIMIT 0,1";
    $data1 = mysql_query($sql1);
    $row1 = mysql_fetch_assoc($data1);
    $obs_start = $row1['obs_start'];
    $frequency = $row1['frequency'];
示例#3
0
    if($_GET['season']){
   $remove_season = $_GET['season'];
    }

?>
var remove_season = '<? echo $remove_season; ?>';
var remove_type = '<? echo $remove_type; ?>';
var remove_species = '<? echo $remove_species; ?>';
var remove_user = '******';
var remove_state = '<? echo $remove_state; ?>';
var remove_location = '<? echo $remove_location; ?>';

  if ( parameter == 'season') {
    
     remove_season = '<? echo getCurrentSeason(); ?>';
     alert(remove_season);
   }


   if ( parameter == 'type') {
      remove_type = 'All';
     }

    if (parameter == 'species') {
       remove_species = 'All'; 
     }

     if (parameter == 'user') {
     remove_user = '******'; 
       
示例#4
0
echo $remove_user;
?>
';
var remove_state = '<?php 
echo $remove_state;
?>
';
var remove_location = '<?php 
echo $remove_location;
?>
';

  if ( parameter == 'season') {
    
     remove_season = '<?php 
echo getCurrentSeason();
?>
';
     alert(remove_season);
   }


   if ( parameter == 'type') {
      remove_type = 'All';
     }

    if (parameter == 'species') {
       remove_species = 'All'; 
     }

     if (parameter == 'user') {