This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->breadcrumbs=array( | |
'Routes'=>array('index'), | |
$model->title, | |
); | |
$this->menu=array( | |
array('label'=>'List Route', 'url'=>array('index')), | |
array('label'=>'Create Route', 'url'=>array('create')), | |
array('label'=>'Update Route', 'url'=>array('update', 'id'=>$model->id)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$doc = new DOMDocument(); | |
$doc->load('TRKFile.gpx'); | |
/* TRACK POINTS */ | |
$trks = $doc->getElementsByTagName('trk'); | |
foreach($trks as $trk) | |
{ | |
$name = $trk->getElementsByTagName('name')->item(0)->nodeValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: "GET", | |
url: "URL to the GPX file", | |
dataType: "xml", | |
success: function(xml) { | |
var points = []; | |
var bounds = new google.maps.LatLngBounds (); | |
$(xml).find("trkpt").each(function() { | |
var lat = $(this).attr("lat"); | |
var lon = $(this).attr("lon"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function actionFacebook() | |
{ | |
$alias=Yii::getPathOfAlias('custom.components.facebook'); | |
require($alias.DIRECTORY_SEPARATOR.'facebook.php'); | |
$facebook = new Facebook(array( | |
'appId' => Yii::app()->settings->get('facebook','appId'), | |
'secret' => Yii::app()->settings->get('facebook','appSecret'), | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* FacebookConnect class file. | |
* @author Christoffer Niska <ChristofferNiska@gmail.com> | |
* @copyright Copyright © Christoffer Niska 2011- | |
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License | |
*/ | |
/** | |
* Facebook connection application component. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#Facebook component | |
class FBCore extends CApplicationComponent { | |
//we want to use setters and getter for the public vars. | |
protected $_appId; | |
protected $_appSecret; | |
//this won't be set via config properties! | |
protected $_facebook; |