Esempio n. 1
0
?>
about/api/
<?php 
echo $baseurl;
?>
user/login/
<?php 
echo $baseurl;
?>
user/create/account/
<?php 
echo $baseurl;
?>
user/filter/
<?php 
$allTrailObj = new trails();
$allTrails = $allTrailObj->getAll();
$count = $allTrails['totalMatched'];
$trails = $allTrails['trails'];
foreach ($trails as $id => $trail) {
    echo $trail['url'];
    ?>
 
<?php 
}
foreach ($cities as $id => $city) {
    echo $baseurl . "filter/?by=city&city=" . $city;
    ?>
 
<?php 
}
Esempio n. 2
0
        require "../filter/error.php";
        echo "</div>";
        require "/nfs/users/clind/public_html/prescriptiontrails.org/src/drawer.php";
        require "/nfs/users/clind/public_html/prescriptiontrails.org/src/js_base.php";
        exit;
    }
    $coords = array("lat" => $_GET['lat'], "lng" => $_GET['lng']);
    $filterObj = new trails();
    $filterResult = $filterObj->filterByLocation("coord", $coords, 0, 24, "Array");
    $filterCount = $filterResult['countReturned'];
    $totalMatched = $filterResult['totalMatched'];
    $trails = $filterResult['trails'];
    $showLocaiton = true;
} else {
    $allTrails = new trails();
    $result = $allTrails->getAll();
    $count = $result['totalMatched'];
    $trails = $result['trails'];
    $showLocaiton = false;
}
function limit_text($text, $limit)
{
    if (str_word_count($text, 0) > $limit) {
        $words = str_word_count($text, 2);
        $pos = array_keys($words);
        $text = substr($text, 0, $pos[$limit]) . '...';
    }
    return $text;
}
?>
<!DOCTYPE html>
Esempio n. 3
0
<?php

require "../../../admin/db.php";
require "../../../src/secure.php";
header('Content-Type: application/javascript');
?>
var SearchTrails = [
<?php 
$all = new trails();
$result = $all->getAll();
$count = $result['totalMatched'];
$trails = $result['trails'];
$return = array();
foreach ($trails as $id => $trail) {
    ?>
      {
        value: "<?php 
    echo $trail['name'];
    ?>
",
        label: "<?php 
    echo $trail['name'];
    ?>
",
        id: <?php 
    echo $trail['id'];
    ?>
,
      },
<?php 
}
Esempio n. 4
0
    echo '/* cached page - ' . date('l jS \\of F Y h:i:s A', filemtime($cache_file)) . ', Page : ' . $dynamic_url . ' */';
    readfile($cache_file);
    //read Cache file
    $output = ob_get_contents();
    ob_end_clean();
    header('Content-Type: application/javascript');
    echo $output;
    exit;
    //no need to proceed further, exit the flow.
}
//Turn on output buffering with gzip compression.
ob_start();
######## Your Website Content Starts Below #########
require "/nfs/users/clind/public_html/prescriptiontrails.org/admin/db.php";
$randomtrailObj = new trails();
$navTrails = $randomtrailObj->getAll();
$navTrails = $navTrails['trails'];
header('Content-Type: application/javascript');
ob_start();
?>
  map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: 35.104912, lng: -106.629581},
    scrollwheel: false,
    zoom: 11
  });
  var infowindow = new google.maps.InfoWindow({
    content: "placeholder"
  });

<?php 
foreach ($navTrails as $id => $trail) {