├── extensions ├── EGMap │ ├── EGMapKeyDragZoom.php │ ├── EGMapMarkerImage.php │ ├── assets │ │ ├── markers │ │ │ ├── m1.png │ │ │ ├── m2.png │ │ │ ├── m3.png │ │ │ ├── m4.png │ │ │ └── m5.png │ │ ├── latloncontrol.js │ │ ├── markerwithlabel_packed.js │ │ ├── infobox_packed.js │ │ └── markerclusterer_packed.js │ ├── EGMapKMLService.php │ ├── EGMapControlPosition.php │ ├── EGMapLatLonControl.php │ ├── kml │ │ ├── EGMapKMLIconStyle.php │ │ ├── EGMapKMLPlacemark.php │ │ ├── EGMapKMLPolyStyle.php │ │ ├── EGMapKMLLineStyle.php │ │ ├── EGMapKMLLineString.php │ │ ├── EGMapKMLPoint.php │ │ ├── EGMapKMLNode.php │ │ └── EGMapKMLPolygon.php │ ├── EGMapPoint.php │ ├── EGMapSize.php │ ├── EGMapApiKeyList.php │ ├── EGMapDirectionWayPoint.php │ ├── EGMapBase.php │ ├── EGMapMarkerClusterer.php │ ├── EGMapDirectionRenderer.php │ ├── EGMapInfoBox.php │ ├── EGMapEvent.php │ └── EGMapMarkerWithLabel.php ├── EHttpClient │ ├── adapter │ │ ├── EHttpClientException.php │ │ ├── EHttpClientAdapterStream.php │ │ └── EHttpClientAdapterInterface.php │ └── EUri.php ├── EFeed │ ├── EFeedTag.php │ ├── EFeedItemRSS1.php │ ├── EFeedItemRSS2.php │ ├── EFeedItemAtom.php │ └── EFeedItemAbstract.php ├── EScriptBoost │ ├── EClientScriptBoost.php │ ├── EScriptBoost.php │ └── assets │ │ └── css │ │ └── CssMinify.php └── EGeoIp │ └── EGeoIP.php ├── widgets ├── EProjekktor │ ├── assets │ │ ├── jarisplayer.swf │ │ ├── maccaco │ │ │ ├── noise.gif │ │ │ ├── start.png │ │ │ ├── maccaco.png │ │ │ ├── player.png │ │ │ ├── buffering.gif │ │ │ ├── maccaco-load.gif │ │ │ ├── theme_preview.jpg │ │ │ ├── default-poster.jpg │ │ │ └── theme_id.diz │ │ ├── minimum │ │ │ ├── next.png │ │ │ ├── pause.png │ │ │ ├── play.png │ │ │ ├── start.png │ │ │ ├── previous.png │ │ │ ├── sound_on.png │ │ │ ├── testcard.gif │ │ │ ├── buffering.gif │ │ │ ├── sound_off.png │ │ │ ├── fullscreen_on.png │ │ │ ├── theme_preview.png │ │ │ ├── fullscreen_off.png │ │ │ ├── theme_id.diz │ │ │ └── style.css │ │ ├── applicious │ │ │ ├── start.png │ │ │ ├── loaded.png │ │ │ ├── buffering.gif │ │ │ ├── eklektik.png │ │ │ ├── testcard.jpg │ │ │ ├── theme_preview.png │ │ │ └── theme_id.diz │ │ └── cybergraf │ │ │ ├── loaded.png │ │ │ ├── mxskin.png │ │ │ ├── start.png │ │ │ ├── testcard.jpg │ │ │ ├── buffering.gif │ │ │ ├── theme_preview.jpg │ │ │ ├── theme_preview.png │ │ │ ├── enter_fullscreen.png │ │ │ └── theme_id.diz │ └── EProjekktor.php ├── jqPrettyPhoto │ ├── prettyPhoto │ │ └── css │ │ │ └── images │ │ │ ├── facebook │ │ │ ├── loader.gif │ │ │ ├── sprite.png │ │ │ ├── btnNext.png │ │ │ ├── btnPrevious.png │ │ │ ├── contentPatternLeft.png │ │ │ ├── contentPatternRight.png │ │ │ ├── contentPatternTop.png │ │ │ ├── default_thumbnail.gif │ │ │ └── contentPatternBottom.png │ │ │ ├── dark_square │ │ │ ├── loader.gif │ │ │ ├── sprite.png │ │ │ ├── btnNext.png │ │ │ ├── btnPrevious.png │ │ │ ├── contentPattern.png │ │ │ └── default_thumbnail.gif │ │ │ ├── dark_rounded │ │ │ ├── btnNext.png │ │ │ ├── loader.gif │ │ │ ├── sprite.png │ │ │ ├── btnPrevious.png │ │ │ ├── contentPattern.png │ │ │ └── default_thumbnail.gif │ │ │ ├── light_rounded │ │ │ ├── loader.gif │ │ │ ├── sprite.png │ │ │ ├── btnNext.png │ │ │ ├── btnPrevious.png │ │ │ └── default_thumbnail.gif │ │ │ └── light_square │ │ │ ├── btnNext.png │ │ │ ├── loader.gif │ │ │ ├── sprite.png │ │ │ ├── btnPrevious.png │ │ │ └── default_thumbnail.gif │ └── jqPrettyPhoto.php └── EDateRangePicker │ ├── assets │ └── daterange │ │ └── ui.daterangepicker.css │ └── EDateRangePicker.php ├── .gitignore ├── helpers ├── EIniHelper │ ├── settings.ini │ └── EIniHelper.php └── EDownloadHelper │ └── EDownloadHelper.php ├── behaviors ├── EJsonBehavior │ └── EJsonBehavior.php └── EDateFormatBehavior │ └── EDateFormatBehavior.php ├── README ├── README.md └── validators ├── EABARoutingNumberValidator └── EABARoutingNumberValidator.php └── EConditionalValidator └── EConditionalValidator.php /extensions/EGMap/EGMapKeyDragZoom.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/EGMapKeyDragZoom.php -------------------------------------------------------------------------------- /extensions/EGMap/EGMapMarkerImage.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/EGMapMarkerImage.php -------------------------------------------------------------------------------- /extensions/EGMap/assets/markers/m1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/assets/markers/m1.png -------------------------------------------------------------------------------- /extensions/EGMap/assets/markers/m2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/assets/markers/m2.png -------------------------------------------------------------------------------- /extensions/EGMap/assets/markers/m3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/assets/markers/m3.png -------------------------------------------------------------------------------- /extensions/EGMap/assets/markers/m4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/assets/markers/m4.png -------------------------------------------------------------------------------- /extensions/EGMap/assets/markers/m5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/extensions/EGMap/assets/markers/m5.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/jarisplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/jarisplayer.swf -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/noise.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/noise.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/start.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/next.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/pause.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/play.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/start.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | old/* 3 | 4 | # Netbeans projects files 5 | nbproject 6 | .settings 7 | .buildpath 8 | .project 9 | 10 | phperrors.log -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/start.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/loaded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/loaded.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/mxskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/mxskin.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/start.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/maccaco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/maccaco.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/player.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/previous.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/sound_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/sound_on.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/testcard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/testcard.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/loaded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/loaded.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/testcard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/testcard.jpg -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/buffering.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/buffering.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/buffering.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/buffering.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/sound_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/sound_off.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/buffering.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/buffering.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/eklektik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/eklektik.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/testcard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/testcard.jpg -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/buffering.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/buffering.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/maccaco-load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/maccaco-load.gif -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/theme_preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/theme_preview.jpg -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/fullscreen_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/fullscreen_on.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/theme_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/theme_preview.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/theme_preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/theme_preview.jpg -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/theme_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/theme_preview.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/maccaco/default-poster.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/maccaco/default-poster.jpg -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/fullscreen_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/minimum/fullscreen_off.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/applicious/theme_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/applicious/theme_preview.png -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/cybergraf/enter_fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/EProjekktor/assets/cybergraf/enter_fullscreen.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/loader.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/sprite.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/loader.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/sprite.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/btnNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/btnNext.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/btnNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/btnNext.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/loader.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/sprite.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/btnNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/btnNext.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/btnPrevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/btnPrevious.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/loader.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/sprite.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/btnNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/btnNext.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/loader.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/sprite.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/btnPrevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/btnPrevious.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/btnNext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/btnNext.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/btnPrevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/btnPrevious.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/btnPrevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/btnPrevious.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/btnPrevious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/btnPrevious.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/contentPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/contentPattern.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/contentPattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/contentPattern.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternLeft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternLeft.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternRight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternRight.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternTop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternTop.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/default_thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/default_thumbnail.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/default_thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_rounded/default_thumbnail.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/default_thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/dark_square/default_thumbnail.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternBottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/facebook/contentPatternBottom.png -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/default_thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_square/default_thumbnail.gif -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/default_thumbnail.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonydspaniard/Yii-extensions/HEAD/widgets/jqPrettyPhoto/prettyPhoto/css/images/light_rounded/default_thumbnail.gif -------------------------------------------------------------------------------- /helpers/EIniHelper/settings.ini: -------------------------------------------------------------------------------- 1 | ; This is a test ini file. You can create as many sections as you wish 2 | 3 | [Database] 4 | dbtype = mysql 5 | host = localhost 6 | username = root 7 | password = testpassword 8 | database = testdatabase 9 | 10 | [Parameters] 11 | webmaster = test@test.com 12 | -------------------------------------------------------------------------------- /extensions/EHttpClient/adapter/EHttpClientException.php: -------------------------------------------------------------------------------- 1 | class="projekktor plastic" 10 | -------------------------------------------------------------------------------- /widgets/EProjekktor/assets/minimum/theme_id.diz: -------------------------------------------------------------------------------- 1 | Theme Name: minimum 2 | Theme URI: http://themes.projekktor.com/minimum 3 | Preview Image: http://themes.projekktor.com/minimum/theme_preview.png 4 | Description: This is the minimum … 5 | Supported Plugins: Controlbar, Display 6 | Author: Lionel Loeb 7 | Author URI: http://www.pix-l.com 8 | License: http://www.projekktor.com/license/ 9 | config.controlsTemplate: '
{min_dur}:{sec_dur} | {min_rem}:{sec_rem}
10 | config.controlsTemplateFull: null 11 | -------------------------------------------------------------------------------- /behaviors/EJsonBehavior/EJsonBehavior.php: -------------------------------------------------------------------------------- 1 | owner = $this->getOwner(); 9 | 10 | if (is_subclass_of($this->owner,'CActiveRecord')){ 11 | 12 | $attributes = $this->owner->getAttributes(); 13 | $this->relations = $this->getRelated(); 14 | 15 | $jsonDataSource = array('jsonDataSource'=>array('attributes'=>$attributes,'relations'=>$this->relations)); 16 | 17 | return CJSON::encode($jsonDataSource); 18 | } 19 | return false; 20 | } 21 | private function getRelated() 22 | { 23 | $related = array(); 24 | 25 | $obj = null; 26 | 27 | $md=$this->owner->getMetaData(); 28 | 29 | foreach($md->relations as $name=>$relation){ 30 | 31 | $obj = $this->owner->getRelated($name); 32 | 33 | $related[$name] = $obj instanceof CActiveRecord ? $obj->getAttributes() : $obj; 34 | } 35 | 36 | return $related; 37 | } 38 | } -------------------------------------------------------------------------------- /widgets/jqPrettyPhoto/jqPrettyPhoto.php: -------------------------------------------------------------------------------- 1 | clientScript; 21 | $cs->registerCoreScript('jquery'); 22 | $assets = Yii::app()->extensionPath. DIRECTORY_SEPARATOR.'prettyPhoto'.DIRECTORY_SEPARATOR; 23 | $aUrl = Yii::app()->getAssetManager()->publish($assets); 24 | $cs->registerScriptFile($aUrl.'/'.self::scriptName()); 25 | $cs->registerCssFile($aUrl .self::scriptName(true)); 26 | } 27 | 28 | public static function addPretty($jsSelector=".gallery a", $gallery=self::PRETTY_GALLERY, $theme=self::THEME_FACEBOOK, $opts=array()){ 29 | 30 | self::registerScript(); 31 | 32 | $opts['theme']=$theme; 33 | 34 | 35 | Yii::app()->clientScript->registerScript(__CLASS__,' 36 | $("'.$jsSelector.'").attr("rel","prettyPhoto'.($gallery==self::PRETTY_GALLERY?'['.time().']':'').'"); 37 | $("a[rel^=\'prettyPhoto\']").prettyPhoto('.CJavaScript::encode($opts).'); 38 | ',CClientScript::POS_READY); 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /behaviors/EDateFormatBehavior/EDateFormatBehavior.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | class EDateFormatBehavior extends CActiveRecordBehavior 8 | { 9 | //.. array of columns that have dates to be converted 10 | public $dateColumns = array(); 11 | public $dateTimeColumns = array(); 12 | 13 | public $dateFormat = 'm/d/Y'; 14 | public $dateTimeFormat = 'm/d/Y H:i'; 15 | /** 16 | * Convert from $dateFormat to UNIX timestamp dates before saving 17 | */ 18 | public function beforeSave($event) 19 | { 20 | $this->format($this->dateColumns, $this->dateFormat); 21 | $this->format($this->dateTimeColumns, $this->dateTimeFormat); 22 | return parent::beforeSave($event); 23 | } 24 | /** 25 | * Converts UNIX timestamp dates to $dateFormat after read from database 26 | */ 27 | public function afterFind($event) 28 | { 29 | $this->format($this->dateColumns, $this->dateFormat, false); 30 | $this->format($this->dateTimeColumns, $this->dateTimeFormat, false); 31 | return parent::afterFind($event); 32 | } 33 | /** 34 | * 35 | * Formats to UNIX timestamp or $dateFormat as specified. Note that 36 | * if using $dateFormat then assumed timestamp value 37 | * @param array $columns the columns attributes to format 38 | * @param string $format the format to convert the date to 39 | * @param boolean $strtotime if boolean, will convert to UNIX timestamp 40 | * @return void 41 | */ 42 | protected function format($columns, $format, $strtotime=true) 43 | { 44 | if(empty($columns)) return; 45 | 46 | foreach($this->getOwner()->getAttributes() as $key=>$value) 47 | { 48 | if(in_array($key, $columns) && !empty($value)) 49 | { 50 | $dt = $this->getOwner()->{$key}; 51 | $this->getOwner()->{$key} = $strtotime ? strtotime($dt) : date($format,$dt); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /extensions/EFeed/EFeedTag.php: -------------------------------------------------------------------------------- 1 | 5 | * @link http://www.ramirezcobos.com/ 6 | * 7 | * 8 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND 9 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 10 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 11 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 12 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 13 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 14 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 15 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 17 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 18 | */ 19 | 20 | /** 21 | * EFeedTag is the class for the Feed Items 22 | * 23 | * 24 | * @author Antonio Ramirez Cobos 25 | * @version $Id: EFeedTag.php 1 2010-12-31 Antonio Ramirez Cobos $ 26 | * @package rss 27 | */ 28 | class EFeedTag{ 29 | /** 30 | * Tag name 31 | * @var string name 32 | */ 33 | public $name; 34 | /** 35 | * 36 | * Tag content 37 | * @var string content 38 | */ 39 | public $content; 40 | /** 41 | * 42 | * Tag attributes array 43 | * @var array attributes 44 | */ 45 | public $attributes = array(); 46 | /** 47 | * 48 | * EFeedTag constructor 49 | * @param string $name 50 | * @param string $content 51 | * @param array $attributes 52 | */ 53 | function __construct($name, $content, $attributes = array() ){ 54 | $this->name = $name; 55 | $this->content = $content; 56 | $this->attributes = is_array($attributes)? $attributes: array(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /extensions/EGMap/EGMapKMLService.php: -------------------------------------------------------------------------------- 1 | validateValue($url)) 38 | $this->url = $url; 39 | else 40 | throw new CException( Yii::t('EGMap','EGMapKMLService.url must be a valid URL address') ); 41 | } 42 | 43 | /** 44 | * @return string Create new control to display latlng and coordinates under mouse. 45 | */ 46 | public function toJs( $map_js_name = 'map' ) 47 | { 48 | $return = 'var '.$this->getJsName().'= new google.maps.KmlLayer(\''.$this->url.'\');'.PHP_EOL; 49 | $return .= $this->getJsName().'.setMap('.$map_js_name.');'.PHP_EOL; 50 | return $return; 51 | } 52 | } -------------------------------------------------------------------------------- /extensions/EGMap/EGMapControlPosition.php: -------------------------------------------------------------------------------- 1 | getJsName().'= new LatLngControl('.$map_js_name.');'.PHP_EOL; 38 | $return .= 'google.maps.event.addListener('.$map_js_name.', "mouseover", function(e) {'.$this->getJsName().'.set("visible", true);});'.PHP_EOL; 39 | $return .= 'google.maps.event.addListener('.$map_js_name.', "mouseout", function(e) {'.$this->getJsName().'.set("visible", true);});'.PHP_EOL; 40 | $return .= 'google.maps.event.addListener('.$map_js_name.', "mousemove", function(e) {'.$this->getJsName().'.updatePosition(e.latLng);});'.PHP_EOL; 41 | return $return; 42 | } 43 | } -------------------------------------------------------------------------------- /extensions/EHttpClient/adapter/EHttpClientAdapterStream.php: -------------------------------------------------------------------------------- 1 | tag = 'IconStyle'; 54 | $this->id = $id; 55 | $this->tagId = $iconId; 56 | $this->href = $href; 57 | } 58 | /** 59 | * (non-PHPdoc) 60 | * @see EGMapKMLNode::toXML() 61 | */ 62 | public function toXML(){ 63 | 64 | $icon = new EGMapKMLNode('Icon'); 65 | if(!is_null($this->href)) 66 | $icon->addChild( new EGMapKMLNode('href', $this->href ) ); 67 | $this->addChild($icon); 68 | $result = CHtml::openTag( 'Style', array( 'id'=>$this->id ) ); 69 | $result .= parent::toXML(); 70 | $result .= CHtml::closeTag('Style'); 71 | 72 | return $result; 73 | } 74 | } -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLPlacemark.php: -------------------------------------------------------------------------------- 1 | tag = 'Placemark'; 59 | $this->name = $name; 60 | $this->description = $description; 61 | $this->styleUrl = $styleUrl; 62 | $this->nodes = is_array($nodes)?$nodes:array(); 63 | } 64 | /** 65 | * (non-PHPdoc) 66 | * @see EGMapKMLNode::toXML() 67 | */ 68 | public function toXML(){ 69 | 70 | $this->checkNode( 'name' ); 71 | $this->checkNode( 'description' ); 72 | $this->checkNode( 'styleUrl' ); 73 | 74 | return parent::toXML(); 75 | } 76 | } -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Yii Framework Extensions 2 | ============================= 3 | 4 | The following is my small contribution for the amazing Yii community. 5 | 6 | IMPORTANT NOTICE 7 | ================ 8 | This repository will soon be refactored to a list of sub-modules pointing to isolated extensions / widgets / helpers 9 | in order to help you and the libraries to be improved independently. Was a mistake on the first place to create one 10 | single and huge repository to publish all my extensions. 11 | 12 | Hope with this change things will be better for all of us to maintain/improve :) 13 | 14 | 15 | EXTENSIONS LIBRARY 16 | ------------------ 17 | 18 | This repository has the following structure and extensions: 19 | 20 | behaviors/ 21 | EDateFormatBehavior/ 22 | EJsonBehavior/ http://www.yiiframework.com/extension/ejsonbehavior/ 23 | 24 | extensions/ 25 | EFeed/ http://www.yiiframework.com/extension/efeed/ 26 | EGMap/ http://www.yiiframework.com/extension/egmap/ 27 | EGeoIp/ http://www.yiiframework.com/extension/egeoip/ 28 | EGeoNameService/ http://www.yiiframework.com/extension/egeonameservice/ 29 | EHttpClient/ http://www.yiiframework.com/extension/ehttpclient/ 30 | EWebBrowser/ http://www.yiiframework.com/extension/ewebbrowser/ 31 | EScriptBoost/ http://www.yiiframework.com/extension/escriptboost/ 32 | 33 | helpers/ 34 | ECurrencyHelper/ http://www.yiiframework.com/extension/ecurrencyhelper/ 35 | EDownloadHelper/ http://www.yiiframework.com/extension/edownloadhelper/ 36 | EIniHelper/ http://www.yiiframework.com/extension/einihelper/ 37 | 38 | validators/ 39 | EABARoutingNumberValidator/ http://www.yiiframework.com/extension/eabavalidator/ 40 | ECCValidator/ http://www.yiiframework.com/extension/eccvalidator/ 41 | EConditionalValidator/ http://www.yiiframework.com/extension/econditionalvalidator/ 42 | EIBANValidator/ http://www.yiiframework.com/extension/eibanvalidator/ 43 | 44 | widgets/ 45 | EDateRangePicker/ http://www.yiiframework.com/extension/edaterangepicker/ 46 | EProjekktor/ http://www.yiiframework.com/extension/jqprettyphoto/ 47 | jqPrettyPhoto/ http://www.yiiframework.com/extension/jqprettyphoto/ 48 | 49 | 50 | README this file 51 | 52 | 53 | EXTENSIONS WIKI 54 | ------------------ 55 | 56 | Please, follow any of the links of each extension to further know its use. 57 | 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Yii Framework Extensions 2 | ============================= 3 | 4 | The following is my small contribution for the amazing Yii community. 5 | 6 | IMPORTANT NOTICE 7 | ================ 8 | This repository will soon be refactored to a list of sub-modules pointing to isolated extensions / widgets / helpers 9 | in order to help you and the libraries to be improved independently. Was a mistake on the first place to create one 10 | single and huge repository to publish all my extensions. 11 | 12 | Hope with this change things will be better for all of us to maintain/improve :) 13 | 14 | 15 | EXTENSIONS LIBRARY 16 | ------------------ 17 | 18 | This repository has the following structure and extensions: 19 | 20 | behaviors/ 21 | EDateFormatBehavior/ 22 | EJsonBehavior/ http://www.yiiframework.com/extension/ejsonbehavior/ 23 | 24 | extensions/ 25 | EFeed/ http://www.yiiframework.com/extension/efeed/ 26 | EGMap/ http://www.yiiframework.com/extension/egmap/ 27 | EGeoIp/ http://www.yiiframework.com/extension/egeoip/ 28 | EGeoNameService/ http://www.yiiframework.com/extension/egeonameservice/ 29 | EHttpClient/ http://www.yiiframework.com/extension/ehttpclient/ 30 | EWebBrowser/ http://www.yiiframework.com/extension/ewebbrowser/ 31 | EScriptBoost/ http://www.yiiframework.com/extension/escriptboost/ 32 | 33 | helpers/ 34 | ECurrencyHelper/ http://www.yiiframework.com/extension/ecurrencyhelper/ 35 | EDownloadHelper/ http://www.yiiframework.com/extension/edownloadhelper/ 36 | EIniHelper/ http://www.yiiframework.com/extension/einihelper/ 37 | 38 | validators/ 39 | EABARoutingNumberValidator/ http://www.yiiframework.com/extension/eabavalidator/ 40 | ECCValidator/ http://www.yiiframework.com/extension/eccvalidator/ 41 | EConditionalValidator/ http://www.yiiframework.com/extension/econditionalvalidator/ 42 | EIBANValidator/ http://www.yiiframework.com/extension/eibanvalidator/ 43 | 44 | widgets/ 45 | EDateRangePicker/ http://www.yiiframework.com/extension/edaterangepicker/ 46 | EProjekktor/ http://www.yiiframework.com/extension/jqprettyphoto/ 47 | jqPrettyPhoto/ http://www.yiiframework.com/extension/jqprettyphoto/ 48 | 49 | 50 | README this file 51 | 52 | 53 | EXTENSIONS WIKI 54 | ------------------ 55 | 56 | Please, follow any of the links of each extension to further know its use. 57 | 58 | -------------------------------------------------------------------------------- /extensions/EGMap/EGMapPoint.php: -------------------------------------------------------------------------------- 1 | setCoordX($x); 51 | $this->setCoordY($y); 52 | } 53 | /** 54 | * 55 | * Sets X coordenate of the point 56 | * @param integer $x 57 | */ 58 | public function setCoordX( $x ){ 59 | if( !is_numeric($x) ) 60 | throw new CException(Yii::t('EGMap','X Coordenate must be a numeric string or a number!')); 61 | 62 | $this->_x = $x; 63 | } 64 | /** 65 | * 66 | * Sets Y coordenate of the point 67 | * @param integer $y 68 | */ 69 | public function setCoordY( $y ){ 70 | if( !is_numeric($y) ) 71 | throw new CException(Yii::t('EGMap','Y Coordenate must be a numeric string or a number!')); 72 | 73 | $this->_y = $y; 74 | } 75 | /** 76 | * 77 | * returns array representation of the coords 78 | */ 79 | public function toArray(){ 80 | return array('x'=>$this->_x, 'y'=>$this->_y); 81 | } 82 | /** 83 | * @return string Javascript code to return the Point 84 | */ 85 | public function toJs() 86 | { 87 | return ' new google.maps.Point('.$this->_x.','.$this->_y.')'; 88 | } 89 | } -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLPolyStyle.php: -------------------------------------------------------------------------------- 1 | are normal (no effect) and random. A value of random applies a random linear scale to the base as follows. 36 | * To achieve a truly random selection of colors, specify a base of white (ffffffff). 37 | * If you specify a single color component (for example, a value of ff0000ff for red), 38 | * random color values for that one component (red) will be selected. In this case, 39 | * the values would range from 00 (black) to ff (full red). If you specify values for two or 40 | * for all three color components, a random linear scale is applied to each color component, 41 | * with results ranging from black to the maximum values specified for each component. 42 | * The opacity of a color comes from the alpha component of and is never randomized. 43 | * @var string color Mode 44 | */ 45 | public $colorMode; 46 | /** 47 | * 48 | * Class Constructor 49 | * @param string $id 50 | * @param string $polyId 51 | * @param string $color 52 | * @param string $colorMode 53 | */ 54 | public function __construct($id, $polyId = null, $color = null, $colorMode = null){ 55 | $this->tag = 'PolyStyle'; 56 | $this->id = $id; 57 | $this->tagId = $polyId; 58 | $this->color = $color; 59 | $this->colorMode = $colorMode; 60 | } 61 | } -------------------------------------------------------------------------------- /widgets/EDateRangePicker/assets/daterange/ui.daterangepicker.css: -------------------------------------------------------------------------------- 1 | /*styles for jquery ui daterangepicker plugin */ 2 | 3 | .ui-daterangepickercontain { 4 | position: absolute; 5 | z-index: 999; 6 | } 7 | .ui-daterangepickercontain .ui-daterangepicker { 8 | float: left; 9 | padding: 5px !important; 10 | width: auto; 11 | display: inline; 12 | background-image: none !important; 13 | clear: left; 14 | } 15 | .ui-daterangepicker ul, .ui-daterangepicker .ranges, .ui-daterangepicker .range-start, .ui-daterangepicker .range-end { 16 | float: left; 17 | padding: 0; 18 | margin: 0; 19 | } 20 | .ui-daterangepicker .ranges { 21 | width: auto; 22 | position: relative; 23 | padding: 5px 5px 40px 0; 24 | margin-left: 10px; 25 | } 26 | .ui-daterangepicker .range-start, .ui-daterangepicker .range-end { 27 | margin-left: 5px; 28 | } 29 | .ui-daterangepicker button.btnDone { 30 | margin: 0 5px 5px 0; 31 | position: absolute; 32 | bottom: 0; 33 | right: 0; 34 | clear: both; 35 | cursor: pointer; 36 | font-size: 1.1em; 37 | } 38 | .ui-daterangepicker ul { 39 | width: 17.6em; 40 | background: none; 41 | border: 0; 42 | } 43 | .ui-daterangepicker li { 44 | list-style: none; 45 | padding: 1px; 46 | cursor: pointer; 47 | margin: 1px 0; 48 | } 49 | .ui-daterangepicker li.ui-state-hover, .ui-daterangepicker li.ui-state-active { 50 | padding: 0; 51 | } 52 | .ui-daterangepicker li.preset_0 { 53 | margin-top: 1.5em !important; 54 | } 55 | .ui-daterangepicker .ui-widget-content a { 56 | text-decoration: none !important; 57 | } 58 | .ui-daterangepicker li a { 59 | font-weight: normal; 60 | margin: .3em .5em; 61 | display: block; 62 | } 63 | .ui-daterangepicker li span { 64 | float: right; 65 | margin: .3em .2em; 66 | } 67 | .ui-daterangepicker .title-start, .ui-daterangepicker .title-end { 68 | display: block; 69 | margin: 0 0 .2em; 70 | font-size: 1em; 71 | padding: 0 4px 2px; 72 | } 73 | .ui-daterangepicker .ui-datepicker-inline { 74 | font-size: 1em; 75 | } 76 | .ui-daterangepicker-arrows { 77 | padding: 2px; 78 | width: 204px; 79 | position: relative; 80 | } 81 | .ui-daterangepicker-arrows input.ui-rangepicker-input { 82 | width: 158px; 83 | margin: 0 2px 0 20px; 84 | padding: 2px; 85 | height: 1.1em; 86 | } 87 | .ui-daterangepicker-arrows .ui-daterangepicker-prev, .ui-daterangepicker-arrows .ui-daterangepicker-next { 88 | position: absolute; 89 | top: 2px; 90 | padding: 1px; 91 | } 92 | .ui-daterangepicker-arrows .ui-daterangepicker-prev { 93 | left: 2px; 94 | } 95 | .ui-daterangepicker-arrows .ui-daterangepicker-next { 96 | right: 2px; 97 | } 98 | .ui-daterangepicker-arrows .ui-daterangepicker-prev:hover, 99 | .ui-daterangepicker-arrows .ui-daterangepicker-next:hover, 100 | .ui-daterangepicker-arrows .ui-daterangepicker-prev:focus, 101 | .ui-daterangepicker-arrows .ui-daterangepicker-next:focus { 102 | padding: 0; 103 | } 104 | -------------------------------------------------------------------------------- /extensions/EGMap/EGMapSize.php: -------------------------------------------------------------------------------- 1 | setHeight($height); 53 | $this->setWidth($width); 54 | } 55 | /** 56 | * 57 | * Sets Height of the Size 58 | * @param integer $height 59 | */ 60 | public function setHeight( $height ){ 61 | if( !is_numeric($height) ) 62 | throw new CException(Yii::t('EGMap','Height must be a numeric string or a number!')); 63 | 64 | $this->_height = $height; 65 | } 66 | /** 67 | * 68 | * Sets the Width of the Size 69 | * @param integer $width 70 | */ 71 | public function setWidth( $width ){ 72 | if( !is_numeric($width) ) 73 | throw new CException(Yii::t('EGMap','Width must be a numeric string or a number!')); 74 | 75 | $this->_width = $width; 76 | } 77 | /** 78 | * 79 | * returns array representation of the size 80 | */ 81 | public function toArray(){ 82 | return array('width'=>$this->_width, 'height'=>$this->_height); 83 | } 84 | /** 85 | * @return string Javascript code to return the Size 86 | */ 87 | public function toJs() 88 | { 89 | return ' new google.maps.Size('.$this->_width.','.$this->_height.')'; 90 | } 91 | } -------------------------------------------------------------------------------- /extensions/EGMap/assets/latloncontrol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * LatLngControl class displays the LatLng and pixel coordinates 3 | * underneath the mouse within a container anchored to it. 4 | * @param {google.maps.Map} map Map to add custom control to. 5 | */ 6 | function LatLngControl(map) { 7 | /** 8 | * Offset the control container from the mouse by this amount. 9 | */ 10 | this.ANCHOR_OFFSET_ = new google.maps.Point(8, 8); 11 | 12 | /** 13 | * Pointer to the HTML container. 14 | */ 15 | this.node_ = this.createHtmlNode_(); 16 | 17 | // Add control to the map. Position is irrelevant. 18 | map.controls[google.maps.ControlPosition.TOP].push(this.node_); 19 | 20 | // Bind this OverlayView to the map so we can access MapCanvasProjection 21 | // to convert LatLng to Point coordinates. 22 | this.setMap(map); 23 | 24 | // Register an MVC property to indicate whether this custom control 25 | // is visible or hidden. Initially hide control until mouse is over map. 26 | this.set('visible', false); 27 | } 28 | 29 | // Extend OverlayView so we can access MapCanvasProjection. 30 | LatLngControl.prototype = new google.maps.OverlayView(); 31 | LatLngControl.prototype.draw = function() {}; 32 | 33 | /** 34 | * @private 35 | * Helper function creates the HTML node which is the control container. 36 | * @return {HTMLDivElement} 37 | */ 38 | LatLngControl.prototype.createHtmlNode_ = function() { 39 | var divNode = document.createElement('div'); 40 | divNode.id = 'latlng-control'; 41 | divNode.index = 100; 42 | divNode.style.backgroundColor = "#ffc"; 43 | divNode.style.border = "1px solid #676767"; 44 | divNode.style.fontFamily = "arial, helvetica, sans-serif"; 45 | divNode.style.fontSize = "0.7em"; 46 | divNode.style.padding = "2px 4px"; 47 | divNode.style.position = "absolute"; 48 | return divNode; 49 | }; 50 | 51 | /** 52 | * MVC property's state change handler function to show/hide the 53 | * control container. 54 | */ 55 | LatLngControl.prototype.visible_changed = function() { 56 | this.node_.style.display = this.get('visible') ? '' : 'none'; 57 | }; 58 | 59 | /** 60 | * Specified LatLng value is used to calculate pixel coordinates and 61 | * update the control display. Container is also repositioned. 62 | * @param {google.maps.LatLng} latLng Position to display 63 | */ 64 | LatLngControl.prototype.updatePosition = function(latLng) { 65 | var projection = this.getProjection(); 66 | var point = projection.fromLatLngToContainerPixel(latLng); 67 | 68 | // Update control position to be anchored next to mouse position. 69 | this.node_.style.left = point.x + this.ANCHOR_OFFSET_.x + 'px'; 70 | this.node_.style.top = point.y + this.ANCHOR_OFFSET_.y + 'px'; 71 | 72 | // Update control to display latlng and coordinates. 73 | this.node_.innerHTML = [ 74 | latLng.toUrlValue(4), 75 | '
', 76 | point.x, 77 | 'px, ', 78 | point.y, 79 | 'px' 80 | ].join(''); 81 | }; -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLLineStyle.php: -------------------------------------------------------------------------------- 1 | 7fff0000
, 44 | * where alpha=0x7f, blue=0xff, green=0x00, and red=0x00. 45 | * 46 | * @var string color 47 | */ 48 | public $color; 49 | /** 50 | * 51 | * Width of the line, in pixels. 52 | * @var numeric string 53 | */ 54 | public $width; 55 | /** 56 | * 57 | * Class constructor 58 | * @param string $id 59 | * @param string $lineId 60 | * @param string $color 61 | * @param string $width 62 | */ 63 | public function __construct($id, $lineId = null, $color = null, $width = null){ 64 | 65 | $this->tag = 'LineStyle'; 66 | $this->id = $id; 67 | $this->tagId = $lineId; 68 | $this->color = $color; 69 | $this->width = $width; 70 | } 71 | /** 72 | * (non-PHPdoc) 73 | * @see EGMapKMLNode::toXML() 74 | */ 75 | public function toXML(){ 76 | 77 | $this->checkNode( 'color' ); 78 | $this->checkNode( 'width' ); 79 | 80 | $result = CHtml::openTag( 'Style', array( 'id'=>$this->id ) ); 81 | $result .= parent::toXML(); 82 | $result .= CHtml::closeTag('Style'); 83 | 84 | return $result; 85 | } 86 | } -------------------------------------------------------------------------------- /extensions/EGMap/EGMapApiKeyList.php: -------------------------------------------------------------------------------- 1 | addAPIKey( 'localhost', $this->_default ); 54 | 55 | if( $domain != null && $key != null ) 56 | $this->add( $domain, $key ); 57 | } 58 | /** 59 | * 60 | * Adds a Google API key to collection 61 | * @param string $domain 62 | * @param string $key 63 | */ 64 | public function addAPIKey( $domain , $key ){ 65 | if( null === $this->_keys ) 66 | $this->_keys = new CMap(); 67 | 68 | $this->_keys->add( $domain, $key ); 69 | } 70 | /** 71 | * 72 | * Returns Google API key if found in collection 73 | * @param string $domain 74 | * @return string Google API key 75 | */ 76 | public function getAPIKeyByDomain( $domain ) 77 | { 78 | if( !$this->_keys->contains( $domain ) ) 79 | return false; 80 | return $this->_keys->itemAt( $domain ); 81 | } 82 | /** 83 | * Returns and google api key by domain name discovery 84 | * @return Google API key 85 | */ 86 | public function guessAPIKey( ) 87 | { 88 | if (isset($_SERVER['SERVER_NAME'])) 89 | { 90 | return $this->getAPIKeyByDomain( $_SERVER['SERVER_NAME'] ); 91 | } 92 | else if (isset($_SERVER['HTTP_HOST'])) 93 | { 94 | return $this->getAPIKeyByDomain( $_SERVER['HTTP_HOST'] ); 95 | } 96 | return $this->getAPIKeyByDomain('localhost'); 97 | } 98 | } -------------------------------------------------------------------------------- /validators/EABARoutingNumberValidator/EABARoutingNumberValidator.php: -------------------------------------------------------------------------------- 1 | $attribute; 50 | if($this->allowEmpty && $this->isEmpty($value)) 51 | return; 52 | 53 | $return = $this->validateABARoutingNumber($value); 54 | 55 | if( true !== $return ) 56 | { 57 | $message=$this->message!==null? $this->message:Yii::t('EABAValidator',"'{value}' has failed the ABA Routine Number check", array('{value}'=>$value)); 58 | $this->addError($object,$attribute,$message); 59 | } 60 | } 61 | /** 62 | * 63 | * The check-digit Routing Number function 64 | * @param string $routingNumber 65 | * @see http://www.brainjar.com/js/validation/ 66 | */ 67 | function validateABARoutingNumber( $routingNumber ) { 68 | $routingNumber = preg_replace('[\D]', '', $routingNumber); 69 | 70 | $len = strlen($routingNumber); 71 | 72 | if( $len !== 9 ) return false; 73 | 74 | $checkSum = 0; 75 | 76 | for ($i = 0; $i < $len; $i+= 3 ) { 77 | $checkSum += ($routingNumber[$i] * 3) 78 | + ($routingNumber[$i+1] * 7) 79 | + ($routingNumber[$i+2]); 80 | } 81 | 82 | return ($checkSum !== 0 && ($checkSum % 10) === 0); 83 | } 84 | } -------------------------------------------------------------------------------- /extensions/EHttpClient/adapter/EHttpClientAdapterInterface.php: -------------------------------------------------------------------------------- 1 | to specify the color, color mode, and width 9 | * of the line. When a LineString is extruded, the line is extended to the ground, forming a polygon that 10 | * looks somewhat like a wall or fence. For extruded LineStrings, the line itself uses the current LineStyle, 11 | * and the extrusion uses the current PolyStyle. 12 | * 13 | * @author Antonio Ramirez Cobos 14 | * @link www.ramirezcobos.com 15 | * 16 | * 17 | * @copyright 18 | * 19 | * Copyright (c) 2010 Antonio Ramirez Cobos 20 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 21 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 22 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 23 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 24 | * subject to the following conditions: 25 | * The above copyright notice and this permission notice shall be included in all copies or substantial 26 | * portions of the Software. 27 | * 28 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 29 | * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 30 | * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 31 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 32 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | * 34 | */ 35 | class EGMapKMLLineString extends EGMapKMLNode{ 36 | /** 37 | * 38 | * Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and 39 | * altitude. The altitude component is optional. Insert a space between tuples. 40 | * Do not include spaces within a tuple. 41 | * @var array 42 | */ 43 | protected $coordinates = array(); 44 | /** 45 | * 46 | * Class constructor 47 | * @param array $coordinates 48 | */ 49 | public function __construct( $coordinates = array() ){ 50 | $this->tag = 'LineString'; 51 | if(is_array($coordinates)) $this->coordinates = $coordinates; 52 | } 53 | /** 54 | * 55 | * Adds a coordenate to the array 56 | * @param float | numeric string $latitude 57 | * @param float | numeric string $longitude 58 | * @param float | numeric string $elevation 59 | */ 60 | public function addCoordenate( $latitude, $longitude, $elevation ){ 61 | $this->coordinates[] = $longitude.','.$latitude.','.$elevation; 62 | } 63 | /** 64 | * 65 | * Adds array of coordenates 66 | * @param array $coords 67 | * @throws CException 68 | */ 69 | public function addCoordenates( $coords ){ 70 | if(!is_array( $coords) ) 71 | throw new CException( Yii::t('EGMap','Coordinates parameter must be of type array and are required')); 72 | foreach($coords as $coord){ 73 | $this->coordinates[] = $coord; 74 | } 75 | } 76 | /** 77 | * (non-PHPdoc) 78 | * @see EGMapKMLNode::toXML() 79 | */ 80 | public function toXML(){ 81 | $this->addChild(new EGMapKMLNode('altitudeMode','relative')); 82 | $this->addChild( new EGMapKMLNode('coordinates', $this->coordinates) ); 83 | return parent::toXML(); 84 | } 85 | 86 | } -------------------------------------------------------------------------------- /extensions/EFeed/EFeedItemRSS1.php: -------------------------------------------------------------------------------- 1 | 23 | * @package rss 24 | * @uses CUrlValidator 25 | * @throws CException 26 | */ 27 | class EFeedItemRSS1 extends EFeedItemAbstract{ 28 | /** 29 | * (non-PHPdoc) 30 | * @see EFeedItemAbstract::setDate() 31 | */ 32 | public function setDate( $date ){ 33 | if(!is_numeric($date)) $date = strtotime( $date ); 34 | 35 | $date = date("Y-m-d", $date); 36 | 37 | $this->addTag( 'dc:date', $date ); 38 | } 39 | /** 40 | * 41 | * Property getter date 42 | * @return date element | null 43 | */ 44 | public function getDate(){ 45 | return $this->tags->itemAt('dc:date'); 46 | } 47 | /** 48 | * (non-PHPdoc) 49 | * @see EFeedItemAbstract::getNode() 50 | */ 51 | public function getNode(){ 52 | 53 | if( null === $this->link || null === $this->link->content) 54 | throw new CException( Yii::t('EFeed', 'Link Element is not set and it is required for RSS 1.0 to be used as about attribute of item') ); 55 | 56 | $node = CHtml::openTag('item', array('rdf:about'=>$this->link->content)).PHP_EOL; 57 | 58 | foreach( $this->tags as $tag ){ 59 | $node .= $this->getElement($tag); 60 | } 61 | 62 | $node .= CHtml::closeTag('item'); 63 | 64 | return $node.PHP_EOL; 65 | } 66 | /** 67 | * 68 | * @returns well formatted xml element 69 | * @param EFeedTag $tag 70 | */ 71 | private function getElement( EFeedTag $tag ){ 72 | 73 | $element = ''; 74 | 75 | if(is_array($tag->content)) $tag->attributes['rdf:parseType']="Resource"; 76 | 77 | if(in_array($tag->name,$this->CDATAEncoded)) 78 | { 79 | $element .= CHtml::openTag($tag->name,$tag->attributes); 80 | $element .= 'name,$tag->attributes); 85 | } 86 | $element .= PHP_EOL; 87 | 88 | if(is_array($tag->content)) 89 | { 90 | foreach ($tag->content as $tag => $content) 91 | { 92 | $tmpTag = new EFeedTag($tag, $content); 93 | 94 | $element .= $this->getElement( $tmpTag ); 95 | } 96 | } 97 | else 98 | { 99 | $element .= (in_array($tag->name, $this->CDATAEncoded))? $tag->content : CHtml::encode($tag->content); 100 | } 101 | 102 | $element .= (in_array($tag->name, $this->CDATAEncoded))? PHP_EOL.']]>':""; 103 | 104 | $element .= CHtml::closeTag($tag->name).PHP_EOL; 105 | 106 | return $element; 107 | } 108 | } -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLPoint.php: -------------------------------------------------------------------------------- 1 | must be either relativeToGround, relativeToSeaFloor, or absolute. 58 | * The point is extruded toward the center of the Earth's sphere. 59 | * Enter description here ... 60 | * @var boolean 61 | */ 62 | public $extrude; 63 | /** 64 | * 65 | * Enter description here ... 66 | * @param string $latitude 67 | * @param string $longitude 68 | * @param string $elevation 69 | */ 70 | public function __construct($latitude, $longitude, $elevation = 0){ 71 | $this->tag = 'Point'; 72 | $this->latitude = $latitude; 73 | $this->longitude = $longitude; 74 | $this->elevation = $elevation; 75 | } 76 | /** 77 | * (non-PHPdoc) 78 | * @see EGMapKMLNode::toXML() 79 | */ 80 | public function toXML(){ 81 | $this->checkNode('extrude'); 82 | /** 83 | * coordinate 84 | * A single tuple consisting of floating point values for longitude, latitude, and altitude (in that order). 85 | * Longitude and latitude values are in degrees 86 | * altitude values (optional) are in meters above sea level 87 | * Do not include spaces between the three values that describe a coordinate. 88 | */ 89 | if(!is_null($this->latitude) && !is_null($this->longitude)) 90 | $this->addChild(new EGMapKMLNode('coordinates', $this->longitude.','.$this->latitude.','.$this->elevation)); 91 | 92 | 93 | return parent::toXML(); 94 | } 95 | } -------------------------------------------------------------------------------- /extensions/EScriptBoost/EClientScriptBoost.php: -------------------------------------------------------------------------------- 1 | skipList as $s) { 48 | $skip|=strpos($id, $s) === 0; 49 | if($skip) break; 50 | } 51 | 52 | $compressed = !$debug ? false : Yii::app()->cache->get($id); 53 | 54 | if($skip) { // Skipping scripts that should not be cached. 55 | $compressed= EScriptBoost::minifyJs($script); 56 | } elseif($debug&& 57 | $compressed!==false) { 58 | // During debug check that the newly minified script is not different from the cached one. 59 | // If so, log the difference so that it can be fixed. 60 | $c = EScriptBoost::minifyJs($script); 61 | if($c!==$compressed) { 62 | Yii::log("Issue with caching of compressed script '$id'\n".CVarDumper::dumpAsString($c)."\nXXX\n".CVarDumper::dumpAsString($compressed),CLogger::LEVEL_ERROR); 63 | 64 | } 65 | } elseif ($compressed === false) 66 | { 67 | $compressed = EScriptBoost::minifyJs($script); 68 | Yii::app()->cache->set($id, $compressed, $this->cacheDuration); 69 | } 70 | parent::registerScript($id, $compressed, $position, $htmlOptions); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /extensions/EFeed/EFeedItemRSS2.php: -------------------------------------------------------------------------------- 1 | 23 | * @package rss 24 | * @uses CUrlValidator 25 | * @throws CException 26 | */ 27 | class EFeedItemRSS2 extends EFeedItemAbstract{ 28 | /** 29 | * (non-PHPdoc) 30 | * @see EFeedItemAbstract::setDate() 31 | */ 32 | public function setDate( $date ){ 33 | if(!is_numeric( $date )) $date = strtotime( $date ); 34 | 35 | $date = date( DATE_RSS, $date ); 36 | 37 | $this->addTag( 'pubDate', $date ); 38 | } 39 | /** 40 | * 41 | * Property getter date 42 | * @return value of date | null 43 | */ 44 | public function getDate(){ 45 | return $this->tags->itemAt('pubDate'); 46 | } 47 | /** 48 | * (non-PHPdoc) 49 | * @see EFeedItemAbstract::getNode() 50 | */ 51 | public function getNode(){ 52 | 53 | 54 | $node = CHtml::openTag('item').PHP_EOL; 55 | 56 | foreach( $this->tags as $tag ){ 57 | $node .= $this->getElement($tag); 58 | } 59 | 60 | $node .= CHtml::closeTag('item'); 61 | 62 | return $node.PHP_EOL; 63 | } 64 | /** 65 | * 66 | * @returns well formatted xml element 67 | * @param EFeedTag $tag 68 | */ 69 | private function getElement( EFeedTag $tag ){ 70 | 71 | $element = ''; 72 | 73 | if(in_array($tag->name,$this->CDATAEncoded)) 74 | { 75 | $element .= CHtml::openTag($tag->name,$tag->attributes); 76 | $element .= 'name,$tag->attributes); 81 | } 82 | $element .= PHP_EOL; 83 | 84 | if(is_array($tag->content)) 85 | { 86 | foreach ($tag->content as $tag => $content) 87 | { 88 | $tmpTag = new EFeedTag($tag, $content); 89 | 90 | $element .= $this->getElement( $tmpTag ); 91 | } 92 | } 93 | else 94 | { 95 | $element .= (in_array($tag->name, $this->CDATAEncoded))? $tag->content : CHtml::encode($tag->content); 96 | } 97 | 98 | $element .= (in_array($tag->name, $this->CDATAEncoded))? PHP_EOL.']]>':""; 99 | 100 | $element .= CHtml::closeTag($tag->name).PHP_EOL; 101 | 102 | return $element; 103 | } 104 | /** 105 | * 106 | * Set the 'encloser' element of feed item 107 | * 108 | * @param string The url attribute of encloser tag 109 | * @param string The length attribute of encloser tag 110 | * @param string The type attribute of encloser tag 111 | */ 112 | public function setEncloser($url, $length, $type) 113 | { 114 | $attributes = array('url'=>$url, 'length'=>$length, 'type'=>$type); 115 | 116 | $this->addTag('enclosure','',$attributes); 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /extensions/EFeed/EFeedItemAtom.php: -------------------------------------------------------------------------------- 1 | 23 | * @package rss 24 | * @uses CUrlValidator 25 | * @throws CException 26 | */ 27 | class EFeedItemAtom extends EFeedItemAbstract { 28 | /** 29 | * (non-PHPdoc) 30 | * @see EFeedItemAbstract::setDescription() 31 | */ 32 | public function setDescription( $description ){ 33 | $this->addTag('summary', $description ); 34 | } 35 | /** 36 | * (non-PHPdoc) 37 | * @see EFeedItemAbstract::setDate() 38 | */ 39 | public function setDate( $date ){ 40 | if(!is_numeric($date)) 41 | $date = strtotime($date); 42 | $date = date(DATE_ATOM,$date); 43 | 44 | $this->addTag('updated', $date); 45 | } 46 | /** 47 | * 48 | * Property getter date 49 | */ 50 | public function getDate(){ 51 | return $this->tags->itemAt('updated'); 52 | } 53 | /** 54 | * (non-PHPdoc) 55 | * @see EFeedItemAbstract::setLink() 56 | */ 57 | public function setLink( $link ){ 58 | $validator = new CUrlValidator(); 59 | if(!$validator->validateValue($link)) 60 | throw new CException( Yii::t('EFeed', $link. ' does not seem to be a valid URL') ); 61 | 62 | $this->addTag('link','',array('href'=>$link)); 63 | $this->addTag('id', EFeed::uuid($link,'urn:uuid:')); 64 | } 65 | /** 66 | * (non-PHPdoc) 67 | * @see EFeedItemAbstract::getNode() 68 | */ 69 | public function getNode(){ 70 | 71 | $node = CHtml::openTag('entry').PHP_EOL; 72 | 73 | foreach( $this->tags as $tag ){ 74 | $node .= $this->getElement($tag); 75 | } 76 | 77 | $node .= CHtml::closeTag('entry').PHP_EOL; 78 | 79 | return $node; 80 | } 81 | /** 82 | * 83 | * @return a well formatted XML element 84 | * @param EFeedTag $tag 85 | */ 86 | private function getElement( EFeedTag $tag ){ 87 | 88 | $element = ''; 89 | 90 | if(in_array($tag->name,$this->CDATAEncoded)) 91 | { 92 | $tag->attributes['type']="html"; 93 | $element .= CHtml::openTag($tag->name,$tag->attributes); 94 | $element .= 'name,$tag->attributes); 99 | } 100 | 101 | if(is_array($tag->content)) 102 | { 103 | foreach ($tag->content as $tag => $content) 104 | { 105 | $tmpTag = new EFeedTag($tag, $content); 106 | 107 | $element .= $this->getElement( $tmpTag ); 108 | } 109 | } 110 | else 111 | { 112 | $element .= (in_array($tag->name, $this->CDATAEncoded))? $tag->content : CHtml::encode($tag->content); 113 | } 114 | 115 | $element .= (in_array($tag->name, $this->CDATAEncoded))? "]]>":""; 116 | 117 | $element .= CHtml::closeTag($tag->name).PHP_EOL; 118 | 119 | return $element; 120 | } 121 | } -------------------------------------------------------------------------------- /widgets/EDateRangePicker/EDateRangePicker.php: -------------------------------------------------------------------------------- 1 | 13 | * $this->widget('EDateRangePicker', array( 14 | * 'name'=>'publishDate', 15 | * // additional javascript options for the date picker plugin 16 | * 'options'=>array( 17 | * 'arrows'=>true, 18 | * ), 19 | * 'htmlOptions'=>array( 20 | * 'style'=>'height:20px;' 21 | * ), 22 | * )); 23 | * 24 | * 25 | * By configuring the {@link options} property, you may specify the options 26 | * that need to be passed to the daterangepicker plugin. Please refer to 27 | * the {@link http://www.filamentgroup.com/lab/date_range_picker_using_jquery_ui_16_and_jquery_ui_css_framework/ 28 | * Date Range Picker} documentation 29 | * for possible options (name-value pairs). 30 | * 31 | * @author Antonio Ramirez 32 | * 33 | */ 34 | class EDateRangePicker extends CJuiInputWidget { 35 | 36 | /** 37 | * @var string the locale ID (eg 'fr', 'de') for the language to be used by the date picker. 38 | * If this property is not set, I18N will not be involved. That is, the date picker will show in English. 39 | * You can force English language by setting the language attribute as '' (empty string) 40 | */ 41 | public $language; 42 | 43 | /** 44 | * @var string The i18n Jquery UI script file. It uses scriptUrl property as base url. 45 | */ 46 | public $i18nScriptFile = 'jquery-ui-i18n.min.js'; 47 | 48 | public function init() 49 | { 50 | parent::init(); 51 | $this->registerScripts(); 52 | } 53 | 54 | /** 55 | * Run this widget. 56 | * This method registers necessary javascript and renders the needed HTML code. 57 | */ 58 | public function run() 59 | { 60 | 61 | list($name, $id) = $this->resolveNameID(); 62 | 63 | if (isset($this->htmlOptions['id'])) 64 | $id = $this->htmlOptions['id']; 65 | else 66 | $this->htmlOptions['id'] = $id; 67 | if (isset($this->htmlOptions['name'])) 68 | $name = $this->htmlOptions['name']; 69 | else 70 | $this->htmlOptions['name'] = $name; 71 | 72 | if ($this->hasModel()) 73 | echo CHtml::activeTextField($this->model, $this->attribute, $this->htmlOptions); 74 | else 75 | echo CHtml::textField($name, $this->value, $this->htmlOptions); 76 | 77 | 78 | $options = CJavaScript::encode($this->options); 79 | $js = "jQuery('#{$id}').daterangepicker($options);"; 80 | 81 | 82 | $cs = Yii::app()->getClientScript(); 83 | if ($this->language != '' && $this->language != 'en') 84 | { 85 | $this->registerScriptFile($this->i18nScriptFile); 86 | $js .= "setTimeout(function(){jQuery('.range-start, .range-end').datepicker('option', jQuery.datepicker.regional['{$this->language}']);},500);"; 87 | } 88 | $cs->registerScript(__CLASS__ . '#' . $id, $js, CClientScript::POS_READY); 89 | } 90 | 91 | /** 92 | * Registers required scripts 93 | */ 94 | protected function registerScripts() 95 | { 96 | $basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 97 | 'assets' . DIRECTORY_SEPARATOR . 98 | 'daterange' . DIRECTORY_SEPARATOR; 99 | $baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 0, YII_DEBUG); 100 | 101 | $scriptFile = '/jquery.daterangepicker.js'; 102 | $cssFile = '/ui.daterangepicker.css'; 103 | 104 | $cs = Yii::app()->clientScript; 105 | $cs->registerScriptFile($baseUrl . $scriptFile); 106 | $cs->registerCssFile($baseUrl . $cssFile); 107 | } 108 | 109 | 110 | } 111 | 112 | ?> 113 | -------------------------------------------------------------------------------- /helpers/EIniHelper/EIniHelper.php: -------------------------------------------------------------------------------- 1 | Get('Database'); 32 | * $username = $helper->Get('Database','username'); 33 | * 34 | * $dataConf = EIniHelper::Load('pathtoInifile')->Get("Database"); 35 | * 36 | * $language = EIniHelper::Load('pathtoInifile')->Get("Parameters","language"); 37 | * 38 | * @copyright 39 | * 40 | * Copyright (c) 2011 Antonio Ramirez Cobos 41 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 42 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 43 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 44 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 45 | * subject to the following conditions: 46 | * The above copyright notice and this permission notice shall be included in all copies or substantial 47 | * portions of the Software. 48 | * 49 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 50 | * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 51 | * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 52 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 53 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 54 | * 55 | */ 56 | class EIniHelper { 57 | 58 | private $settingsfile, $settings; 59 | 60 | /** 61 | * Constructor. 62 | * Loads the settings by parsing the ini file passed 63 | * in the constructor parameter. 64 | * @param string $settingsfile 65 | */ 66 | function __construct($settingsfile) 67 | { 68 | if(!file_exists($settingsfile)) 69 | throw new CException(Yii::t('EIniHelper','INI file not found')); 70 | 71 | $this->settingsfile = $settingsfile; 72 | $this->settings = parse_ini_file($this->settingsfile, true); 73 | 74 | } 75 | 76 | /** 77 | * Settings::Load 78 | * 79 | * Singleton functionality that creates one instance per loaded settings 80 | * file so that ini parsing needs to happen only once. 81 | * @param string $settingsfile file to read for settings 82 | */ 83 | public static function Load($settingsfile= 'settings.ini') 84 | { 85 | static $instances = array(); 86 | if(!array_key_exists($settingsfile, $instances)) { 87 | $instances[$settingsfile] = new EIniHelper($settingsfile); 88 | } 89 | return($instances[$settingsfile]); 90 | } 91 | 92 | /** 93 | * Settings::Get 94 | * 95 | * Gets an array of parameters for a key of settings file or 96 | * gets one specific setting under a key. 97 | * @param string $param 98 | * @return string subsection | array ini section 99 | */ 100 | function Get($section, $subsection = false) 101 | { 102 | if($this->settings === false) throw new CException(Yii::t('EIniHelper','error reading INI file')); 103 | return ($subsection) ? $this->settings[$section][$subsection] : $this->settings[$section]; 104 | } 105 | 106 | } 107 | 108 | ?> -------------------------------------------------------------------------------- /extensions/EGMap/EGMapDirectionWayPoint.php: -------------------------------------------------------------------------------- 1 | 11 | * @since 2009-11-20 16:14:23 12 | * 13 | * @copyright 14 | * info as this library is a modified version of Fabrice Bernhard 15 | * 16 | * Copyright (c) 2008 Fabrice Bernhard 17 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 18 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 19 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 20 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 21 | * subject to the following conditions: 22 | * The above copyright notice and this permission notice shall be included in all copies or substantial 23 | * portions of the Software. 24 | * 25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 26 | * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 27 | * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 28 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 29 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | * 31 | */ 32 | class EGMapDirectionWayPoint 33 | { 34 | protected $location; 35 | protected $stopover; 36 | 37 | /** 38 | * Construct EGMapDirection object 39 | * 40 | * @param EGMapCoord $origin The coordinates of origin 41 | * @param EGMapCoord $destination The coordinates of destination 42 | * @param string $js_name The js var name 43 | * @param array $options Array of options 44 | * @author Vincent Guillon 45 | * @since 2009-10-30 17:20:47 46 | */ 47 | public function __construct($location = null, $stopover = true) 48 | { 49 | $this->setLocation($location); 50 | $this->setStopOver($stopover); 51 | } 52 | 53 | /** 54 | * $location getter 55 | * 56 | * @return EGMapCoord $this->location 57 | * @author Vincent Guillon 58 | * @since 2009-11-20 16:16:55 59 | */ 60 | public function getLocation() 61 | { 62 | 63 | return $this->location; 64 | } 65 | 66 | /** 67 | * $stopover getter 68 | * 69 | * @return boolen $this->stopover 70 | * @author Vincent Guillon 71 | * @since 2009-11-20 16:17:14 72 | */ 73 | public function getStopOver() 74 | { 75 | 76 | return $this->stopover; 77 | } 78 | 79 | /** 80 | * $location setter 81 | * 82 | * @param EGMapCoord $location 83 | * @author Vincent Guillon 84 | * @since 2009-11-20 16:17:42 85 | * @since 2010-12-22 Modified for Yii Antonio Ramirez 86 | */ 87 | public function setLocation(EGMapCoord $location = null) 88 | { 89 | $this->location = $location; 90 | } 91 | 92 | /** 93 | * $stopover setter 94 | * 95 | * @param boolean $stopover 96 | * @author Vincent Guillon 97 | * @since 2009-11-20 16:19:37 98 | */ 99 | public function setStopOver($stopover = true) 100 | { 101 | $this->stopover = $stopover; 102 | } 103 | 104 | /** 105 | * Generate javascript code fo GMapDirection waypoints option 106 | * 107 | * @return string 108 | * @author Vincent Guillon 109 | * @since 2009-11-20 16:31:42 110 | */ 111 | public function toJs() 112 | { 113 | $stopover = $this->getStopOver() ? 'true' : 'false'; 114 | 115 | return '{location : '.$this->getLocation()->toJs().', stopover: '.$stopover.'}'; 116 | } 117 | } -------------------------------------------------------------------------------- /extensions/EFeed/EFeedItemAbstract.php: -------------------------------------------------------------------------------- 1 | 25 | * @package rss 26 | */ 27 | abstract class EFeedItemAbstract extends CComponent { 28 | /** 29 | * 30 | * All element tags of this item collection 31 | * @var CTypedMap('EFeedTag') 32 | */ 33 | protected $tags; 34 | /** 35 | * 36 | * CDATAEncoded items for all different adapters 37 | * @var array 38 | */ 39 | protected $CDATAEncoded = array('description', 'content:encoded', 'summary'); 40 | /** 41 | * 42 | * Class constructor 43 | */ 44 | function __construct() 45 | { 46 | $this->tags = new CTypedMap('EFeedTag'); 47 | } 48 | /** 49 | * 50 | * Adds a tag to collection 51 | * @param string $tag name of the element 52 | * @param string $content of the element 53 | * @param array $attributes of the tag 54 | */ 55 | public function addTag($tag, $content, $attributes = array()) 56 | { 57 | $this->tags->add($tag, new EFeedTag($tag, $content,(!is_array($attributes)? array() : $attributes))); 58 | } 59 | /** 60 | * 61 | * Returns specific tag by name 62 | * @param string $name of the tag 63 | * @return EFeedTag $tag 64 | */ 65 | public function getTag( $name ) 66 | { 67 | return $this->tags->itemAt( $name ); 68 | } 69 | /** 70 | * 71 | * Property title setter (thanks to CComponent) 72 | *
 73 | 	 *    $feed->title = 'mytitle';
 74 | 	 * 
75 | * @param string $title 76 | */ 77 | public function setTitle($title) { 78 | $this->addTag('title', $title); 79 | } 80 | /** 81 | * 82 | * @return string title tag 83 | */ 84 | public function getTitle(){ 85 | 86 | return $this->tags->itemAt('title'); 87 | } 88 | /** 89 | * 90 | * Property description setter 91 | * @param string $description 92 | */ 93 | public function setDescription( $description ){ 94 | $this->addTag('description', $description); 95 | } 96 | /** 97 | * 98 | * @return string description tag 99 | */ 100 | public function getDescription( ){ 101 | return $this->tags->itemAt('description'); 102 | } 103 | /** 104 | * 105 | * Property link setter 106 | * @param string URI $link 107 | */ 108 | public function setLink($link) { 109 | $validator = new CUrlValidator(); 110 | $validator->pattern = '/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i'; 111 | 112 | if(!$validator->validateValue($link)) 113 | throw new CException( Yii::t('EFeed', $link. ' does not seem to be a valid URL') ); 114 | $this->addTag('link', $link); 115 | } 116 | /** 117 | * 118 | * @return link tag 119 | */ 120 | public function getLink(){ 121 | return $this->tags->itemAt('link'); 122 | } 123 | /** 124 | * 125 | * Abstract property setter Ddte 126 | * @param time() integer|string $date 127 | */ 128 | public abstract function setDate( $date ); 129 | 130 | /** 131 | * 132 | * Creates a single node as xml format 133 | * @return string formatted xml tag 134 | */ 135 | public abstract function getNode(); 136 | 137 | } -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLNode.php: -------------------------------------------------------------------------------- 1 | tag = $tag; 69 | $this->content = $content; 70 | } 71 | /** 72 | * 73 | * Adds a child node to the tag 74 | * @param EGMapKMLNode $node 75 | */ 76 | public function addChild( EGMapKMLNode $node ){ 77 | $this->nodes[] = $node; 78 | } 79 | /** 80 | * 81 | * Clears all added children 82 | */ 83 | public function clearChildren(){ 84 | $this->nodes = array(); 85 | } 86 | /** 87 | * 88 | * @return well formatted XML KML tags 89 | */ 90 | public function toXML(){ 91 | $result = ''; 92 | 93 | if (is_array($this->attributes)) 94 | $this->attributes['id'] = $this->tagId; 95 | else $this->attributes = array(); 96 | 97 | $result .= CHtml::openTag($this->tag, (is_array($this->attributes)? $this->attributes:array())); 98 | if(null !== $this->content && !empty($this->content)) 99 | { 100 | if($this->tag === 'description'){ 101 | $result .= 'content.']]>'; 102 | } 103 | else if(is_array($this->content)){ 104 | // arrays are separated by carriage return 105 | // they can also be separated by spaces 106 | $result .= implode(PHP_EOL, $this->content); 107 | } 108 | else 109 | $result .= $this->content; 110 | } 111 | $result .= $this->renderChildren(); 112 | $result .= CHtml::closeTag($this->tag); 113 | 114 | return $result; 115 | } 116 | /** 117 | * 118 | * Renders children tags 119 | */ 120 | protected function renderChildren() 121 | { 122 | $children = ''; 123 | if( isset($this->nodes) && is_array($this->nodes) ){ 124 | foreach( $this->nodes as $node ) 125 | $children .= $node->toXML(); 126 | } 127 | return $children; 128 | } 129 | /** 130 | * 131 | * Checks if a node name property has null value 132 | * if not then create a node 133 | * @param string $node 134 | */ 135 | protected function checkNode( $node ){ 136 | if(!is_null($this->$node)) 137 | $this->nodes[] = new EGMapKMLNode($node, $this->$node); 138 | } 139 | } -------------------------------------------------------------------------------- /extensions/EGMap/EGMapBase.php: -------------------------------------------------------------------------------- 1 | 16 | * $this->propertyName=$value; 17 | * $this->setName($value) 18 | * 19 | * @param string $name the property name 20 | * @param mixed $value 21 | */ 22 | public function __set($name, $value) 23 | { 24 | $setter = 'set' . $name; 25 | if (method_exists($this, $setter)) 26 | return $this->$setter($value); 27 | elseif (array_key_exists($name, $this->options)) 28 | { 29 | return $this->options[$name] = $value; 30 | } 31 | if (method_exists($this, 'get' . $name)) 32 | throw new CException(Yii::t('EGMap', 'Property "{class}.{property}" is read only.', array('{class}' => get_class($this), '{property}' => $name))); 33 | else 34 | throw new CException(Yii::t('EGMap', 'Property "{class}.{property}" is not defined.', array('{class}' => get_class($this), '{property}' => $name))); 35 | } 36 | 37 | /** 38 | * 39 | * Returns a property value, an event handler list or a behavior based on its name. 40 | * Do not call this method. This is a PHP magic method that we override 41 | * to allow using the following syntax to read a property 42 | *
 43 | 	 * $value=$component->propertyName;
 44 | 	 * $value=$component->getPropertyName;
 45 | 	 * 
46 | * @param string $name 47 | * @throws CException 48 | */ 49 | public function __get($name) 50 | { 51 | $getter = 'get' . ucfirst($name); 52 | 53 | if (method_exists($this, $getter)) 54 | return $this->$getter(); 55 | if (array_key_exists($name, $this->options)) 56 | { 57 | return $this->options[$name]; 58 | } 59 | 60 | throw new CException(Yii::t('EGMap', 'Property "{class}.{property}" is not defined.', array('{class}' => get_class($this), '{property}' => $name))); 61 | } 62 | 63 | /** 64 | * Checks if a property value is null. 65 | * Do not call this method. This is a PHP magic method that we override 66 | * to allow using isset() to detect if a component property is set or not. 67 | * 68 | * @param string $name name of the property 69 | */ 70 | public function __isset($name) 71 | { 72 | $getter = 'get' . ucfirst($name); 73 | if (method_exists($this, $getter)) 74 | return $this->$getter() !== null; 75 | 76 | return isset($this->options[$name]); 77 | } 78 | 79 | /** 80 | * Sets a component property to be null. 81 | * Do not call this method. This is a PHP magic method that we override 82 | * to allow using unset() to set a component property to be null. 83 | * @param string $name the property name or the event name 84 | * @throws CException if the property is read only or not exists. 85 | */ 86 | public function __unset($name) 87 | { 88 | $setter = 'set' . $name; 89 | if (method_exists($this, $setter)) 90 | return $this->$setter(null); 91 | else if (isset($this->option[$name])) 92 | return $this->option[$name] = null; 93 | else if (method_exists($this, 'get' . $name)) 94 | throw new CException(Yii::t('EGMap', 'Property "{class}.{property}" is read only.', array('{class}' => get_class($this), '{property}' => $name))); 95 | else 96 | throw new CException(Yii::t('EGMap', 'Property "{class}.{property}" is not defined.', array('{class}' => get_class($this), '{property}' => $name))); 97 | } 98 | 99 | /** 100 | * @return string Javascript name of the renderer service 101 | * @author Antonio Ramirez 102 | * @since 2011-01-24 103 | */ 104 | public function getJsName($autoGenerate=true) 105 | { 106 | if ($this->js_name !== null) 107 | return $this->js_name; 108 | else if ($autoGenerate) 109 | return $this->js_name = get_class($this) . self::$_counter++; 110 | } 111 | 112 | /** 113 | * 114 | * Sets the Javascript name of the renderer service 115 | * @param string $name 116 | */ 117 | public function setJsName($name) 118 | { 119 | 120 | $this->js_name = $name; 121 | } 122 | 123 | /** 124 | * @return array $options 125 | * @author Antonio Ramirez 126 | * @since 2011-01-25 127 | */ 128 | public function getOptions() 129 | { 130 | return $this->options; 131 | } 132 | 133 | } 134 | 135 | -------------------------------------------------------------------------------- /extensions/EGMap/assets/markerwithlabel_packed.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8 t(a){2.3=a;2.6=X.1v("1V");2.6.4.L="R: 1g; 15: 1A;";2.p=X.1v("1V");2.p.4.L=2.6.4.L;2.p.23("2L","1Q w;");2.p.23("2w","1Q w;");2.v=X.1v("2o");2.v.4.L="R: 1g; z-2l: 2g; I: 16;";2.v.4.1b="-2a";2.v.4.1w="-2Y";2.v.2V="22://5.1X.1T/1R/1P/1M/2x.2v"}t.s=W 7.5.2n();t.s.2m=8(){r g=2;r l=w;r c=w;r o;r f;r i,12;r n;r d;r m=20;r h="29(22://5.1X.1T/1R/1P/1M/28.27)";r j=8(e){9(e.24){e.24()}e.2R=G;9(e.1Z){e.1Z()}};r k=8(){g.3.1W(2J)};2.1n().1S.S(2.6);2.1n().2D.S(2.p);2.1n().1S.S(2.v);2.1p=[7.5.q.M(2.p,"1N",8(e){9(g.3.N()||g.3.U()){2.4.19="1Y";7.5.q.B(g.3,"1N",e)}}),7.5.q.M(2.p,"1U",8(e){9((g.3.N()||g.3.U())&&!c){2.4.19=g.3.2r();7.5.q.B(g.3,"1U",e)}}),7.5.q.M(2.p,"1J",8(e){i=0;12=0;c=w;9(g.3.N()){l=G;2.4.19=h}9(g.3.N()||g.3.U()){7.5.q.B(g.3,"1J",e)}j(e)}),7.5.q.M(X,"1G",8(a){r b;9(l){l=w;g.p.4.19="1Y";7.5.q.B(g.3,"1G",a)}9(c){a.E=o;n=G;9(d){b=g.Q().1i(g.3.11());b.y+=m;g.3.J(g.Q().1E(b));2k{g.3.1W(7.5.2j.2i);2h(k,2f)}2e(e){}g.v.4.I="16"}g.3.T(f);c=w;7.5.q.B(g.3,"1D",a)}}),7.5.q.u(g.3.2d(),"2c",8(a){r b;9(l){a.E=W 7.5.2b(a.E.1d()-i,a.E.1c()-12);9(c){o=a.E;b=g.Q().1i(a.E);9(d){g.v.4.Y=b.x+"A";g.v.4.P=b.y+"A";g.v.4.I="";b.y-=m}g.3.J(g.Q().1E(b));9(d){g.p.4.P=(b.y+m)+"A"}7.5.q.B(g.3,"1C",a)}V{i=a.E.1d()-g.3.11().1d();12=a.E.1c()-g.3.11().1c();f=g.3.1a();g.3.T(1B);d=g.3.D("14");c=G;7.5.q.B(g.3,"1z",a)}}}),7.5.q.M(2.p,"1y",8(e){9(g.3.N()||g.3.U()){9(n){n=w}V{7.5.q.B(g.3,"1y",e);j(e)}}}),7.5.q.M(2.p,"1x",8(e){9(g.3.N()||g.3.U()){7.5.q.B(g.3,"1x",e);j(e)}}),7.5.q.u(2.3,"1z",8(a){9(!c){d=2.D("14")}}),7.5.q.u(2.3,"1C",8(a){9(!c){9(d){g.J(m);g.6.4.K=1B+(2.D("18")?-1:+1)}}}),7.5.q.u(2.3,"1D",8(a){9(!c){9(d){g.J(0)}}}),7.5.q.u(2.3,"2X",8(){g.J()}),7.5.q.u(2.3,"2W",8(){g.T()}),7.5.q.u(2.3,"2U",8(){g.17()}),7.5.q.u(2.3,"2T",8(){g.17()}),7.5.q.u(2.3,"2S",8(){g.1t()}),7.5.q.u(2.3,"2Q",8(){g.1f()}),7.5.q.u(2.3,"2P",8(){g.1e()}),7.5.q.u(2.3,"2O",8(){g.Z()}),7.5.q.u(2.3,"2M",8(){g.Z()})]};t.s.2K=8(){r i;2.6.1r.1h(2.6);2.p.1r.1h(2.p);2.v.1r.1h(2.v);26(i=0;i<2.1p.2I;i++){7.5.q.2G(2.1p[i])}};t.s.2F=8(){2.1f();2.1t();2.Z()};t.s.1f=8(){r a=2.3.D("1j");9(F a.2E==="H"){2.6.13=a;2.p.13=2.6.13}V{2.6.13="";2.6.S(a);a=a.2C(G);2.p.S(a)}};t.s.1t=8(){2.p.2B=2.3.2A()||""};t.s.Z=8(){r i,C;2.6.1o=2.3.D("1m");2.p.1o=2.6.1o;2.6.4.L="";2.p.4.L="";C=2.3.D("C");26(i 2z C){9(C.2y(i)){2.6.4[i]=C[i];2.p.4[i]=C[i]}}2.1L()};t.s.1L=8(){2.6.4.R="1g";2.6.4.15="1A";9(F 2.6.4.O!=="H"&&2.6.4.O!==""){2.6.4.1K="1O(O="+(2.6.4.O*2u)+")"}2.p.4.R=2.6.4.R;2.p.4.15=2.6.4.15;2.p.4.O=0.2H;2.p.4.1K="1O(O=1)";2.1e();2.J();2.17()};t.s.1e=8(){r a=2.3.D("1q");2.6.4.1b=-a.x+"A";2.6.4.1w=-a.y+"A";2.p.4.1b=-a.x+"A";2.p.4.1w=-a.y+"A"};t.s.J=8(a){r b=2.Q().1i(2.3.11());9(F a==="H"){a=0}2.6.4.Y=b.x+"A";2.6.4.P=(b.y-a)+"A";2.p.4.Y=2.6.4.Y;2.p.4.P=2.6.4.P;2.T()};t.s.T=8(){r a=(2.3.D("18")?-1:+1);9(F 2.3.1a()==="H"){2.6.4.K=2t(2.6.4.P,10)+a;2.p.4.K=2.6.4.K}V{2.6.4.K=2.3.1a()+a;2.p.4.K=2.6.4.K}};t.s.17=8(){9(2.3.D("1l")){2.6.4.I=2.3.2s()?"2N":"16"}V{2.6.4.I="16"}2.p.4.I=2.6.4.I};8 1k(a){a=a||{};a.1j=a.1j||"";a.1q=a.1q||W 7.5.2q(0,0);a.1m=a.1m||"2p";a.C=a.C||{};a.18=a.18||w;9(F a.1l==="H"){a.1l=G}9(F a.14==="H"){a.14=G}9(F a.21==="H"){a.21=G}9(F a.1I==="H"){a.1I=w}2.1H=W t(2);7.5.1s.25(2,1F)}1k.s=W 7.5.1s();1k.s.1u=8(a){7.5.1s.s.1u.25(2,1F);2.1H.1u(a)};',62,185,'||this|marker_|style|maps|labelDiv_|google|function|if||||||||||||||||eventDiv_|event|var|prototype|MarkerLabel_|addListener|crossDiv_|false||||px|trigger|labelStyle|get|latLng|typeof|true|undefined|display|setPosition|zIndex|cssText|addDomListener|getDraggable|opacity|top|getProjection|position|appendChild|setZIndex|getClickable|else|new|document|left|setStyles||getPosition|cLngOffset|innerHTML|raiseOnDrag|overflow|none|setVisible|labelInBackground|cursor|getZIndex|marginLeft|lng|lat|setAnchor|setContent|absolute|removeChild|fromLatLngToDivPixel|labelContent|MarkerWithLabel|labelVisible|labelClass|getPanes|className|listeners_|labelAnchor|parentNode|Marker|setTitle|setMap|createElement|marginTop|dblclick|click|dragstart|hidden|1000000|drag|dragend|fromDivPixelToLatLng|arguments|mouseup|label|draggable|mousedown|filter|setMandatoryStyles|mapfiles|mouseover|alpha|en_us|return|intl|overlayImage|com|mouseout|div|setAnimation|gstatic|pointer|stopPropagation||clickable|http|setAttribute|preventDefault|apply|for|cur|closedhand_8_8|url|8px|LatLng|mousemove|getMap|catch|1406|1000002|setTimeout|BOUNCE|Animation|try|index|onAdd|OverlayView|img|markerLabels|Point|getCursor|getVisible|parseInt|100|png|ondragstart|drag_cross_67_16|hasOwnProperty|in|getTitle|title|cloneNode|overlayMouseTarget|nodeType|draw|removeListener|01|length|null|onRemove|onselectstart|labelstyle_changed|block|labelclass_changed|labelanchor_changed|labelcontent_changed|cancelBubble|title_changed|labelvisible_changed|visible_changed|src|zindex_changed|position_changed|9px'.split('|'),0,{})) -------------------------------------------------------------------------------- /extensions/EGMap/EGMapMarkerClusterer.php: -------------------------------------------------------------------------------- 1 | null, 36 | // Wether the center of each cluster should be the average of all markers in the cluster 37 | 'averageCenetr' => null, 38 | // Whether the default behaviour of clicking on cluster is to zoom into it. 39 | 'zoomOnClick' => null, 40 | // The grid size of a cluster in pixel. Each cluster will be a square. If you want the algorithm to run faster, you can 41 | // set this value larger. The default value is 60. 42 | 'gridSize' => null, 43 | // The max zoom level monitored by a marker cluster. If not given, the marker cluster assumes the maximum map zoom level. 44 | // When maxZoom is reached or exceeded all markers will be shown without cluster. 45 | 'maxZoom' => null, 46 | // Custom styles for the cluster markers. The array should be ordered according to increasing cluster size, with the style 47 | // for the smallest clusters first, and the style for the largest clusters last. 48 | // must be an array with any of the following options: 49 | // 50 | // height Number Image height. 51 | // width Number Image width. 52 | // anchor Array of Number Anchor for label text, like [24, 12]. If not set, the text will align center and middle. 53 | // textColor String Text color. The default value is "black". 54 | // textSize Number Text size. 55 | // url String Image url. 56 | // backgroundPosition String The position of the background x, y 57 | // 58 | 'styles' => null 59 | ); 60 | /** 61 | * 62 | * Collection of EGMapMarkers markers 63 | * @var array 64 | */ 65 | protected $markers; 66 | 67 | /** 68 | * 69 | * Class constructor 70 | * @param array options 71 | */ 72 | public function __construct( $options = array() ) 73 | { 74 | $this->markers = new CTypedMap('EGMapMarker'); 75 | 76 | $this->setOptions($options); 77 | } 78 | 79 | /** 80 | * 81 | * Sets plugin options 82 | * @param array $options 83 | * @throws CException 84 | */ 85 | public function setOptions( $options ){ 86 | if(!is_array( $options )) 87 | throw new CException( Yii::t('EGMap', 'EGMapMarkerClusterer options must be of type array!')); 88 | if(isset($options['styles'])){ 89 | $this->setStyles($options['styles']); 90 | unset($options['styles']); 91 | } 92 | $this->options = array_merge($this->options, $options); 93 | } 94 | /** 95 | * 96 | * Sets a plugin option 97 | * @param string $name option 98 | * @param mixed $value 99 | */ 100 | public function setStyles( $value ){ 101 | $this->options['styles'] = CJavaScript::encode($value); 102 | } 103 | /** 104 | * 105 | * Adds a marker to its internal collection 106 | * @param EGMapMarker $marker 107 | */ 108 | public function addMarker( EGMapMarker $marker){ 109 | 110 | $this->markers->add($marker->getJsName(), $marker); 111 | } 112 | 113 | /** 114 | * @return string Javascript code to return the Point 115 | */ 116 | public function toJs( $map_js_name = 'map' ) 117 | { 118 | $markers = array(); 119 | if(count($this->markers)){ 120 | foreach($this->markers as $m) 121 | $markers[] = $m->getJsName(); 122 | } 123 | $return = 'var '.$this->getJsName().'= new MarkerClusterer('.$map_js_name.','.EGMap::encode($markers).','.EGMap::encode($this->options).');'; 124 | 125 | return $return; 126 | } 127 | } -------------------------------------------------------------------------------- /extensions/EGMap/kml/EGMapKMLPolygon.php: -------------------------------------------------------------------------------- 1 | for their color, color mode, and fill. 11 | * The for polygons must be specified in counterclockwise order. Polygons follow the "right-hand rule," 12 | * which states that if you place the fingers of your right hand in the direction in which the coordinates are specified, 13 | * your thumb points in the general direction of the geometric normal for the polygon. 14 | * 15 | * 16 | * @author Antonio Ramirez Cobos 17 | * @link www.ramirezcobos.com 18 | * 19 | * 20 | * @copyright 21 | * 22 | * Copyright (c) 2010 Antonio Ramirez Cobos 23 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 24 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 25 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 26 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 27 | * subject to the following conditions: 28 | * The above copyright notice and this permission notice shall be included in all copies or substantial 29 | * portions of the Software. 30 | * 31 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 32 | * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 33 | * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 34 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 35 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 36 | * 37 | */ 38 | class EGMapKMLPolygon extends EGMapKMLNode{ 39 | /** 40 | * 41 | * // only supported here 42 | * 43 | * 44 | * -122.366212,37.818977,30 45 | * -122.365424,37.819294,30 46 | * 47 | * 48 | * 49 | * 50 | * Another way 51 | * 52 | * 53 | * 54 | * 55 | * -122.1,37.4,0 -122.0,37.4,0 -122.0,37.5,0 -122.1,37.5,0 -122.1,37.4,0 56 | * 57 | * 58 | * 59 | * 60 | * 61 | * (required) 62 | * Contains a element. 63 | * 64 | * Contains a element. 65 | * A Polygon can contain multiple elements, 66 | * which create multiple cut-outs inside the Polygon. 67 | */ 68 | /** 69 | * 70 | * Coordinates array 71 | * @var array 72 | */ 73 | protected $coordinates = array(); 74 | /** 75 | * 76 | * outerBoundaryIs = true 77 | * innerBoundaryIs = false 78 | * @var boolean 79 | */ 80 | protected $boundary; 81 | 82 | /** 83 | * 84 | * Enter description here ... 85 | * @param boolean $outerBoundaryIs 86 | * @param array $coordinates 87 | */ 88 | public function __construct( $outerBoundaryIs = false, $coordinates = array() ){ 89 | 90 | $this->tag = 'Polygon'; 91 | $this->boundary = $outerBoundaryIs; 92 | if(is_array($coordinates)) $this->coordinates = $coordinates; 93 | } 94 | /** 95 | * 96 | * Adds a coordenate to the array 97 | * @param float | numeric string $latitude 98 | * @param float | numeric string $longitude 99 | * @param float | numeric string $elevation 100 | */ 101 | public function addCoordenate( $latitude, $longitude, $elevation ){ 102 | $this->coordinates[] = $longitude.','.$latitude.','.$elevation; 103 | } 104 | /** 105 | * 106 | * Adds array of coordenates 107 | * @param array $coords 108 | * @throws CException 109 | */ 110 | public function addCoordenates( $coords ){ 111 | if(!is_array( $coords) ) 112 | throw new CException( Yii::t('EGMap','Coordinates parameter must be of type array')); 113 | foreach($coords as $coord){ 114 | $this->coordinates[] = $coord; 115 | } 116 | } 117 | /** 118 | * (non-PHPdoc) 119 | * @see EGMapKMLNode::toXML() 120 | */ 121 | public function toXML(){ 122 | $node = new EGMapKMLNode('LinearRing'); 123 | $node->addChild(new EGMapKMLNode('coordinates', $this->coordinates )); 124 | $parentNode = new EGMapKMLNode(($this->boundary?'outerBoundaryIs':'innerBoundaryIs')); 125 | $parentNode->addChild( $node ); 126 | $this->addChild( $parentNode ); 127 | 128 | return parent::toXML(); 129 | } 130 | 131 | } -------------------------------------------------------------------------------- /extensions/EGMap/assets/infobox_packed.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 p(a){a=a||{};5.8.1N.2h(2,32);2.L=a.1u||"";2.1D=a.1q||H;2.P=a.1H||0;2.E=a.1B||1f 5.8.1U(0,0);2.B=a.W||1f 5.8.2t(0,0);2.S=a.11||q;2.1n=a.1l||"28";2.1k=a.D||{};2.1G=a.1E||"34";2.M=a.19||"2W://2Q.5.2L/2I/2G/2F/1v.2z";3(a.19===""){2.M=""}2.1i=a.1r||1f 5.8.1U(1,1);2.Y=a.1s||H;2.1a=a.1p||H;2.1K=a.2k||"2g";2.17=a.1m||H;2.4=q;2.w=q;2.X=q;2.16=q;2.15=q;2.13=q;2.12=q;2.O=q}p.r=1f 5.8.1N();p.r.22=7(){6 a;6 d=2;6 c=7(e){e.1Z=U;3(e.18){e.18()}};6 b=7(e){e.2S=H;3(e.1Y){e.1Y()}3(!d.17){c(e)}};3(!2.4){2.4=1g.2K("2J");2.1d();3(t 2.L.1w==="u"){2.4.J=2.F()+2.L}v{2.4.J=2.F();2.4.1b(2.L)}2.2y()[2.1K].1b(2.4);2.1F();3(2.4.9.A){2.O=U}v{3(2.P!==0&&2.4.Z>2.P){2.4.9.A=2.P;2.4.9.2u="2s";2.O=U}v{a=2.24();2.4.9.A=(2.4.Z-a.14-a.T)+"R";2.O=H}}2.1t(2.1D);3(!2.17){2.X=5.8.s.I(2.4,"2n",c);2.16=5.8.s.I(2.4,"1L",c);2.15=5.8.s.I(2.4,"2m",c);2.1o=5.8.s.I(2.4,"2l",7(e){2.9.1J="2j"})}2.12=5.8.s.I(2.4,"2i",b);5.8.s.Q(2,"2f")}};p.r.F=7(){6 a="";3(2.M!==""){a="<2e";a+=" 2d=\'"+2.M+"\'";a+=" 2c=T";a+=" 9=\'";a+=" W: 2b;";a+=" 1J: 2a;";a+=" 29: "+2.1G+";";a+="\'>"}N a};p.r.1F=7(){6 a;3(2.M!==""){a=2.4.27;2.w=5.8.s.I(a,\'1L\',2.1I())}v{2.w=q}};p.r.1I=7(){6 a=2;N 7(e){e.1Z=U;3(e.18){e.18()}a.1v();5.8.s.Q(a,"26")}};p.r.1t=7(d){6 m;6 n;6 e=0,G=0;3(!d){m=2.25();3(m 39 5.8.38){3(!m.23().37(2.B)){m.36(2.B)}n=m.23();6 a=m.35();6 h=a.Z;6 f=a.21;6 k=2.E.A;6 l=2.E.1j;6 g=2.4.Z;6 b=2.4.21;6 i=2.1i.A;6 j=2.1i.1j;6 o=2.20().31(2.B);3(o.x<(-k+i)){e=o.x+k-i}v 3((o.x+g+k+i)>h){e=o.x+g+k+i-h}3(2.1a){3(o.y<(-l+j+b)){G=o.y+l-j-b}v 3((o.y+l+j)>f){G=o.y+l+j-f}}v{3(o.y<(-l+j)){G=o.y+l-j}v 3((o.y+b+l+j)>f){G=o.y+b+l+j-f}}3(!(e===0&&G===0)){6 c=m.30();m.2Z(e,G)}}}};p.r.1d=7(){6 i,D;3(2.4){2.4.2Y=2.1n;2.4.9.2X="";D=2.1k;2V(i 2U D){3(D.2R(i)){2.4.9[i]=D[i]}}3(t 2.4.9.1h!=="u"&&2.4.9.1h!==""){2.4.9.2P="2O(1h="+(2.4.9.1h*2N)+")"}2.4.9.W="2M";2.4.9.V=\'1y\';3(2.S!==q){2.4.9.11=2.S}}};p.r.24=7(){6 c;6 a={1e:0,1c:0,14:0,T:0};6 b=2.4;3(1g.1x&&1g.1x.1V){c=b.2H.1x.1V(b,"");3(c){a.1e=C(c.1T,10)||0;a.1c=C(c.1S,10)||0;a.14=C(c.1R,10)||0;a.T=C(c.1W,10)||0}}v 3(1g.2E.K){3(b.K){a.1e=C(b.K.1T,10)||0;a.1c=C(b.K.1S,10)||0;a.14=C(b.K.1R,10)||0;a.T=C(b.K.1W,10)||0}}N a};p.r.2D=7(){3(2.4){2.4.2C.2B(2.4);2.4=q}};p.r.1A=7(){2.22();6 a=2.20().2A(2.B);2.4.9.14=(a.x+2.E.A)+"R";3(2.1a){2.4.9.1c=-(a.y+2.E.1j)+"R"}v{2.4.9.1e=(a.y+2.E.1j)+"R"}3(2.Y){2.4.9.V=\'1y\'}v{2.4.9.V="1X"}};p.r.2T=7(a){3(t a.1l!=="u"){2.1n=a.1l;2.1d()}3(t a.D!=="u"){2.1k=a.D;2.1d()}3(t a.1u!=="u"){2.1Q(a.1u)}3(t a.1q!=="u"){2.1D=a.1q}3(t a.1H!=="u"){2.P=a.1H}3(t a.1B!=="u"){2.E=a.1B}3(t a.1p!=="u"){2.1a=a.1p}3(t a.W!=="u"){2.1z(a.W)}3(t a.11!=="u"){2.1P(a.11)}3(t a.1E!=="u"){2.1G=a.1E}3(t a.19!=="u"){2.M=a.19}3(t a.1r!=="u"){2.1i=a.1r}3(t a.1s!=="u"){2.Y=a.1s}3(t a.1m!=="u"){2.17=a.1m}3(2.4){2.1A()}};p.r.1Q=7(a){2.L=a;3(2.4){3(2.w){5.8.s.z(2.w);2.w=q}3(!2.O){2.4.9.A=""}3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}3(!2.O){2.4.9.A=2.4.Z+"R";3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}}2.1F()}5.8.s.Q(2,"2x")};p.r.1z=7(a){2.B=a;3(2.4){2.1A()}5.8.s.Q(2,"1O")};p.r.1P=7(a){2.S=a;3(2.4){2.4.9.11=a}5.8.s.Q(2,"2w")};p.r.2v=7(){N 2.L};p.r.1C=7(){N 2.B};p.r.33=7(){N 2.S};p.r.2r=7(){2.Y=H;3(2.4){2.4.9.V="1X"}};p.r.2q=7(){2.Y=U;3(2.4){2.4.9.V="1y"}};p.r.2p=7(c,b){6 a=2;3(b){2.B=b.1C();2.13=5.8.s.2o(b,"1O",7(){a.1z(2.1C())})}2.1M(c);3(2.4){2.1t()}};p.r.1v=7(){3(2.w){5.8.s.z(2.w);2.w=q}3(2.X){5.8.s.z(2.X);5.8.s.z(2.16);5.8.s.z(2.15);5.8.s.z(2.1o);2.X=q;2.16=q;2.15=q;2.1o=q}3(2.13){5.8.s.z(2.13);2.13=q}3(2.12){5.8.s.z(2.12);2.12=q}2.1M(q)};',62,196,'||this|if|div_|google|var|function|maps|style||||||||||||||||InfoBox|null|prototype|event|typeof|undefined|else|closeListener_|||removeListener|width|position_|parseInt|boxStyle|pixelOffset_|getCloseBoxImg_|yOffset|false|addDomListener|innerHTML|currentStyle|content_|closeBoxURL_|return|fixedWidthSet_|maxWidth_|trigger|px|zIndex_|right|true|visibility|position|eventListener1_|isHidden_|offsetWidth||zIndex|contextListener_|moveListener_|left|eventListener3_|eventListener2_|enableEventPropagation_|stopPropagation|closeBoxURL|alignBottom_|appendChild|bottom|setBoxStyle_|top|new|document|opacity|infoBoxClearance_|height|boxStyle_|boxClass|enableEventPropagation|boxClass_|eventListener4_|alignBottom|disableAutoPan|infoBoxClearance|isHidden|panBox_|content|close|nodeType|defaultView|hidden|setPosition|draw|pixelOffset|getPosition|disableAutoPan_|closeBoxMargin|addClickHandler_|closeBoxMargin_|maxWidth|getCloseClickHandler_|cursor|pane_|click|setMap|OverlayView|position_changed|setZIndex|setContent|borderLeftWidth|borderBottomWidth|borderTopWidth|Size|getComputedStyle|borderRightWidth|visible|preventDefault|cancelBubble|getProjection|offsetHeight|createInfoBoxDiv_|getBounds|getBoxWidths_|getMap|closeclick|firstChild|infoBox|margin|pointer|relative|align|src|img|domready|floatPane|apply|contextmenu|default|pane|mouseover|dblclick|mousedown|addListener|open|hide|show|auto|LatLng|overflow|getContent|zindex_changed|content_changed|getPanes|gif|fromLatLngToDivPixel|removeChild|parentNode|onRemove|documentElement|mapfiles|en_us|ownerDocument|intl|div|createElement|com|absolute|100|alpha|filter|www|hasOwnProperty|returnValue|setOptions|in|for|http|cssText|className|panBy|getCenter|fromLatLngToContainerPixel|arguments|getZIndex|2px|getDiv|setCenter|contains|Map|instanceof'.split('|'),0,{})) -------------------------------------------------------------------------------- /helpers/EDownloadHelper/EDownloadHelper.php: -------------------------------------------------------------------------------- 1 | 0) 78 | $seek_start = intval($range[0]); 79 | if($range[1] > 0) 80 | $seek_end = intval($range[1]); 81 | 82 | $data_section = true; 83 | } 84 | // do some cleaning before we start 85 | ob_end_clean(); 86 | $old_status = ignore_user_abort(true); 87 | set_time_limit(0); 88 | 89 | $size = filesize( $filepath ); 90 | 91 | if($seek_start > ($size -1)) $seek_start = 0; 92 | 93 | // open the file and move pointer 94 | // to started chunk 95 | $res = fopen( $filepath , 'rb'); 96 | if($seek_start) fseek($res, $seek_start); 97 | if($seek_end < $seek_start) $seek_end = $size -1; 98 | 99 | 100 | header('Content-Type: '.$mimeType); 101 | 102 | $contentDisposition = 'attachment'; 103 | if($doStream == true){ 104 | if(in_array( $extension,self::$stream_types )){ 105 | $contentDisposition = 'inline'; 106 | } 107 | } 108 | if (strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) { 109 | $fileName= preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1); 110 | } 111 | header('Content-Disposition: '.$contentDisposition.'; filename="'.$filename.'"'); 112 | header('Last-Modified: ' . date('D, d M Y H:i:s \G\M\T', filemtime( $filepath ))); 113 | 114 | // flushing a data section? 115 | if( $data_section ) 116 | { 117 | header("HTTP/1.0 206 Partial Content"); 118 | header("Status: 206 Partial Content"); 119 | header('Accept-Ranges: bytes'); 120 | header("Content-Range: bytes $seek_start-$seek_end/$size"); 121 | header("Content-Length: " . ($seek_end - $seek_start + 1)); 122 | 123 | }else // nope, just 124 | header('Content-Length: '.$size); 125 | 126 | $size = $seek_end - $seek_start + 1; 127 | 128 | while(!( connection_aborted() || connection_status() == 1) && !feof($res)) 129 | { 130 | print(fread($res, $buffsize*$maxSpeed)); 131 | 132 | flush(); 133 | @ob_flush(); 134 | sleep(1); 135 | } 136 | // close file 137 | fclose($res); 138 | // restore defaults 139 | ignore_user_abort($old_status); 140 | set_time_limit(ini_get('max_execution_time')); 141 | 142 | } 143 | } -------------------------------------------------------------------------------- /validators/EConditionalValidator/EConditionalValidator.php: -------------------------------------------------------------------------------- 1 | 35 | * array('attribute','required', 'on'=>'create') 36 | * 37 | * or 38 | * array( 39 | * 'group'=>array( 40 | * array('attribute','required'), 41 | * array('attribute','email') 42 | * ) 43 | * ) 44 | * 45 | * @var array $conditionalRules 46 | * own rule 47 | */ 48 | public $conditionalRules = array(); 49 | /** 50 | * @var array $rule the rule 51 | */ 52 | public $rule = array(); 53 | /** 54 | * @var boolean $skipConditional whether to skip conditional validations 55 | */ 56 | public $skipConditional = false; 57 | /** 58 | * 59 | * Allows the insertion of the JS code that will be executed for 60 | * client validation 61 | * @var string $clientValidationJS 62 | */ 63 | public $clientValidationJS; 64 | 65 | /** 66 | * Validates the attribute of the object. 67 | * If there is any error, the error message is added to the object. 68 | * @param CModel $object the object being validated 69 | * @param string $attribute the attribute being validated 70 | */ 71 | protected function validateAttribute($object, $attribute) 72 | { 73 | $obj = clone $object; 74 | 75 | if (!$this->skipConditional && !$this->validateConditional($obj, $this->conditionalRules)) 76 | return false; 77 | 78 | $validator = CValidator::createValidator($this->rule[0], $object, $attribute, array_slice($this->rule, 1, null, true)); 79 | $validator->validate($object); 80 | $obj = null; 81 | } 82 | /** 83 | * 84 | * @param CModel $object the object to be validated 85 | * @param mixed $rule the rules to validate the object against 86 | * @return boolean false if it has errors, true otherwise 87 | */ 88 | protected function validateConditional(&$object, $rule) 89 | { 90 | if (isset($rule['group'])) 91 | { 92 | if(is_array($rule['group'])) 93 | { 94 | foreach ($rule['group'] as $r) 95 | { 96 | if (is_array($r)) 97 | { 98 | $val = $this->validateConditional($object, $r); 99 | if (!$val) 100 | return false; 101 | } 102 | else continue; 103 | } 104 | }else 105 | throw new CException (Yii::t('EConditionalValidator','Group must be an array of rules')); 106 | } 107 | else 108 | { 109 | list($attributes, $conditionalValidator) = $rule; 110 | 111 | $parameters = array_splice($rule, 2); 112 | 113 | $validator = CValidator::createValidator($conditionalValidator, $object, $attributes, $parameters); 114 | 115 | # Backup and clear original errors 116 | $errors = $object->getErrors(); 117 | $object->clearErrors(); 118 | 119 | # Execute conditionalValidator 120 | $validator->validate($object); 121 | $invalid = $object->hasErrors(); 122 | 123 | # Restore original errors 124 | $object->clearErrors(); 125 | $object->addErrors($errors); 126 | 127 | if ($invalid) 128 | { 129 | return false; 130 | } 131 | } 132 | return true; 133 | } 134 | /** 135 | * Returns the JavaScript needed for performing client-side validation. 136 | * Do not override this method if the validator does not support client-side validation. 137 | * Two predefined JavaScript variables can be used: 138 | *
    139 | *
  • value: the value to be validated
  • 140 | *
  • messages: an array used to hold the validation error messages for the value
  • 141 | *
142 | * @param CModel $object the data object being validated 143 | * @param string $attribute the name of the attribute to be validated. 144 | * @return string the client-side validation script. Null if the validator does not support client-side validation. 145 | * @see CActiveForm::enableClientValidation 146 | */ 147 | public function clientValidateAttribute($object, $attribute) 148 | { 149 | return $this->clientValidationJS ? $this->clientValidationJS : null; 150 | } 151 | 152 | } 153 | -------------------------------------------------------------------------------- /extensions/EGMap/EGMapDirectionRenderer.php: -------------------------------------------------------------------------------- 1 | false, 35 | // This property indicates whether the renderer should provide 36 | // UI to select amongst alternative routes. By default, this flag 37 | // is false and a user-selectable list of routes will be shown in 38 | // the directions' associated panel. To hide that list, set 39 | // hideRouteList to true. 40 | 'hideRouteList' => null, 41 | // The InfoWindow in which to render text information when a marker 42 | // is clicked. Existing info window content will be overwritten and 43 | // its position moved. If no info window is specified, the DirectionsRenderer 44 | // will create and use its own info window. This property will be ignored 45 | // if suppressInfoWindows is set to true. 46 | 'infoWindow' => null, 47 | // Map on which to display the directions. 48 | // Will be overriden when enabled to a EGMapDirection 49 | 'map' => null, 50 | // review marker options 51 | 'markerOptions'=>null, 52 | // The element (node getElementById().) 53 | 'panel' => null, 54 | // Options for the polylines. All polylines rendered by the DirectionsRenderer 55 | // will use these options. 56 | // Full reference on http://code.google.com/intl/en-EN/apis/maps/documentation/javascript/reference.html#PolylineOptions 57 | 'polylineOptions' => 58 | array( 59 | 'clickable'=>null, 60 | 'strokeColor'=>null, 61 | 'strokeOpacity'=>null, 62 | 'strokeWeight'=>null, 63 | 'zIndex'=>null), 64 | // By default, the input map is centered and zoomed to the bounding box of 65 | // this set of directions. If this option is set to true, the viewport is left 66 | //unchanged, unless the map's center and zoom were never set. 67 | 'preserveViewPort' => null, 68 | // The index of the route within the DirectionsResult object. The default value is 0. 69 | 'routeIndex'=>null, 70 | // Suppress the rendering of the BicyclingLayer when bicycling directions are requested. 71 | 'suppressBicyclingLayer' => null, 72 | // Suppress the rendering of the BicyclingLayer when bicycling directions are requested. 73 | 'suppressInfoWindows' => null, 74 | // Suppress the rendering of markers. 75 | 'suppressMarkers' => null, 76 | // Suppress the rendering of polylines 77 | 'suppressPolylines' => null 78 | ); 79 | 80 | /** 81 | * Construct GMapDirectionRenderer object 82 | * 83 | * @param string $js_name The js var name 84 | * @param array $options Array of options 85 | * @author Antonio Ramirez 86 | * @since 2011-01-24 87 | */ 88 | public function __construct( $js_name = 'gmap_direction', $options = array()) 89 | { 90 | $this->setOptions($options); 91 | if( $js_name !=='gmap_direction' ) 92 | $this->setJsName($js_name); 93 | } 94 | 95 | public function setOptions( $options ){ 96 | if(isset($options['polylineOptions'])){ 97 | $this->setPolylineOptions($options['polylineOptions']); 98 | unset($options['polylineOptions']); 99 | } 100 | $this->options = array_merge( $this->options, $options ); 101 | } 102 | 103 | public function setPolylineOptions( $value ) 104 | { 105 | if(!is_array($value)) 106 | { 107 | throw new CException(Yii::t('EGMap','Property "{class}.{property}" must be of type array.', 108 | array('{class}'=>get_class($this), '{property}'=>'polylineOptions'))); 109 | } 110 | $this->options['polylineOptions'] = array_merge($this->options['polylineOptions'],$value); 111 | } 112 | 113 | public function toJs(){ 114 | if( null !== $this->panel ) 115 | $this->panel = "document.getElementById('".$this->panel."')"; 116 | 117 | if(count($this->options['polylineOptions'])) $this->options['polylineOptions'] = CJavaScript::encode($this->options['polylineOptions']); 118 | 119 | return 'var '.$this->getJsName().' = new google.maps.DirectionsRenderer('.EGMap::encode($this->options).');'."\n"; 120 | } 121 | 122 | 123 | } -------------------------------------------------------------------------------- /extensions/EGMap/EGMapInfoBox.php: -------------------------------------------------------------------------------- 1 | null, 61 | // The name of the CSS class defining the styles for the InfoBox container. 62 | // The default name is infoBox. 63 | 'boxClass' => null, 64 | // An object literal whose properties define specific CSS style 65 | // values to be applied to the InfoBox. Style values defined 66 | // here override those that may be defined in the boxClass style 67 | // sheet. If this property is changed after the InfoBox has been 68 | // created, all previously set styles (except those defined in 69 | // the style sheet) are removed from the InfoBox before the new 70 | // style values are applied. 71 | 'boxStyle' => null, 72 | // The CSS margin style value for the close box. The default is 73 | // "2px" (a 2-pixel margin on all sides). 74 | 'closeBoxMargin' => '"2px"', 75 | // The URL of the image representing the close box. Note: The 76 | // default is the URL for Google's standard close box. Set this 77 | // property to "" if no close box is required. 78 | 'closeBoxUrl'=>null, 79 | // Propagate mousedown, click, dblclick, and contextmenu events 80 | // in the InfoBox (default is false to mimic the behavior of a 81 | // google.maps.InfoWindow). Set this property to true if the InfoBox 82 | // is being used as a map label. iPhone note: This property setting 83 | // has no effect; events are always propagated. 84 | 'enableEventPropagation'=>null, 85 | // Minimum offset (in pixels) from the InfoBox to the map edge 86 | // after an auto-pan. 87 | 'infoBoxClearance'=>null, 88 | // Hide the InfoBox on open (default is false). 89 | 'isHidden'=>null, 90 | // The pane where the InfoBox is to appear (default is "floatPane"). 91 | // Set the pane to "mapPane" if the InfoBox is being used as a map 92 | // label. Valid pane names are the property names for the google.maps.MapPanes object. 93 | 'pane'=>null, 94 | ); 95 | 96 | /** 97 | * @param string content 98 | * @param array $options 99 | * @param string $js_name 100 | * @param array $events 101 | * @author Maxime Picaud 102 | * @since 7 sept. 2009 103 | */ 104 | public function __construct($content, $js_name='info_box', $options = array(), $events=array()) 105 | { 106 | $this->options = CMap::mergeArray($this->options, $this->box_options); 107 | 108 | if ($js_name !== 'info_box') 109 | $this->setJsName($js_name); 110 | 111 | $this->setContent($content); 112 | 113 | $this->setOptions($options); 114 | $this->events = $events; 115 | } 116 | 117 | /** 118 | * @param string $map_js_name 119 | * @return string Javascript code to create the infoBox 120 | * @author Fabrice Bernhard 121 | * @since 2011-10-12 by Antonio Ramirez 122 | */ 123 | public function toJs($map_js_name = 'map') 124 | { 125 | 126 | $return = ''; 127 | $return .= $this->getJsName() . ' = new InfoBox(' . EGMap::encode($this->options) . ');' . PHP_EOL; 128 | 129 | foreach ($this->custom_properties as $attribute => $value) 130 | { 131 | $return .= 'var ' . $this->getJsName() . "." . $attribute . " = '" . $value . "';" . PHP_EOL; 132 | } 133 | foreach ($this->events as $event) 134 | { 135 | $return .= $event->getEventJs($this->getJsName()); 136 | } 137 | return $return; 138 | } 139 | 140 | public function getEncodedOptions() 141 | { 142 | return EGMap::encode(parent::getOptions()); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /extensions/EHttpClient/EUri.php: -------------------------------------------------------------------------------- 1 | getUri(); 60 | } 61 | 62 | /** 63 | * Convenience function, checks that a $uri string is well-formed 64 | * by validating it but not returning an object. Returns TRUE if 65 | * $uri is a well-formed URI, or FALSE otherwise. 66 | * 67 | * @param string $uri The URI to check 68 | * @return boolean 69 | */ 70 | public static function check($uri) 71 | { 72 | try 73 | { 74 | $uri = self::factory($uri); 75 | } catch (Exception $e) 76 | { 77 | return false; 78 | } 79 | 80 | return $uri->valid(); 81 | } 82 | 83 | /** 84 | * Create a new EUri object for a URI. If building a new URI, then $uri should contain 85 | * only the scheme (http, ftp, etc). Otherwise, supply $uri with the complete URI. 86 | * 87 | * @param string $uri The URI form which a EUri instance is created 88 | * @throws CException When an empty string was supplied for the scheme 89 | * @throws CException When an illegal scheme is supplied 90 | * @throws CException When the scheme is not supported 91 | * @return EUri 92 | * @link http://www.faqs.org/rfcs/rfc2396.html 93 | */ 94 | public static function factory($uri = 'http') 95 | { 96 | // Separate the scheme from the scheme-specific parts 97 | $uri = explode(':', $uri, 2); 98 | $scheme = strtolower($uri[0]); 99 | $schemeSpecific = isset($uri[1]) === true ? $uri[1] : ''; 100 | 101 | if (strlen($scheme) === 0) 102 | { 103 | throw new CException('An empty string was supplied for the scheme'); 104 | } 105 | 106 | // Security check: $scheme is used to load a class file, so only alphanumerics are allowed. 107 | if (ctype_alnum($scheme) === false) 108 | { 109 | throw new CException('Illegal scheme supplied, only alphanumeric characters are permitted'); 110 | } 111 | 112 | /** 113 | * Create a new EUri object for the $uri. If a subclass of EUri exists for the 114 | * scheme, return an instance of that class. Otherwise, a CException is thrown. 115 | */ 116 | switch ($scheme) 117 | { 118 | case 'http': 119 | // Break intentionally omitted 120 | case 'https': 121 | $className = 'EUriHttp'; 122 | break; 123 | 124 | case 'mailto': 125 | // TODO 126 | 127 | default: 128 | 129 | throw new CException("Scheme \"$scheme\" is not supported"); 130 | break; 131 | } 132 | 133 | $schemeHandler = new $className($scheme, $schemeSpecific); 134 | 135 | return $schemeHandler; 136 | } 137 | 138 | /** 139 | * Get the URI's scheme 140 | * 141 | * @return string|false Scheme or false if no scheme is set. 142 | */ 143 | public function getScheme() 144 | { 145 | if (empty($this->_scheme) === false) 146 | { 147 | return $this->_scheme; 148 | } else 149 | { 150 | return false; 151 | } 152 | } 153 | 154 | /** 155 | * EUri and its subclasses cannot be instantiated directly. 156 | * Use EUri::factory() to return a new EUri object. 157 | * 158 | * @param string $scheme The scheme of the URI 159 | * @param string $schemeSpecific The scheme-specific part of the URI 160 | */ 161 | abstract protected function __construct($scheme, $schemeSpecific = ''); 162 | 163 | /** 164 | * Return a string representation of this URI. 165 | * 166 | * @return string 167 | */ 168 | abstract public function getUri(); 169 | 170 | /** 171 | * Returns TRUE if this URI is valid, or FALSE otherwise. 172 | * 173 | * @return boolean 174 | */ 175 | abstract public function valid(); 176 | } 177 | -------------------------------------------------------------------------------- /extensions/EGMap/EGMapEvent.php: -------------------------------------------------------------------------------- 1 | trigger = $trigger; 61 | $this->function = $function; 62 | $this->encapsulate_function = $encapsulate_function; 63 | $this->setType($type); 64 | } 65 | /** 66 | * 67 | * Sets the type of event, by default Google Event 68 | * @param string $type 69 | * @throws CException 70 | */ 71 | public function setType( $type ){ 72 | if( $type !== self::TYPE_EVENT_DEFAULT && $type !== self::TYPE_EVENT_DEFAULT_ONCE && 73 | $type !== self::TYPE_EVENT_DOM && $type !== self::TYPE_EVENT_DOM_ONCE ) 74 | throw new CException( Yii::t('EGMap', 'Unrecognized Event type') ); 75 | $this->type = $type; 76 | } 77 | /** 78 | * 79 | * Returns type of event 80 | * @return string 81 | */ 82 | public function getType( ){ 83 | return $this->type; 84 | } 85 | 86 | /** 87 | * @return string $trigger action that will trigger the event 88 | */ 89 | public function getTrigger() 90 | { 91 | 92 | return $this->trigger; 93 | } 94 | /** 95 | * @return string $function the javascript function to be executed 96 | */ 97 | public function getFunction() 98 | { 99 | if (!$this->encapsulate_function) 100 | return $this->function; 101 | else 102 | return 'function() {'.$this->function.'}'; 103 | } 104 | 105 | /** 106 | * returns the javascript code for attaching a Google event to a javascript_object 107 | * 108 | * @param string $js_object_name 109 | * @return string 110 | * @author Fabrice Bernhard 111 | * @since 2011-07-02 Johnatan added Once support 112 | */ 113 | public function getEventJs($js_object_name, $once=false) 114 | { 115 | $once = ($once)?'Once':''; 116 | return 'google.maps.event.addListener'.$once.'('.$js_object_name.', "'.$this->getTrigger().'", '.$this->getFunction().');'.PHP_EOL; 117 | } 118 | 119 | /** 120 | * returns the javascript code for attaching a dom event to a javascript_object 121 | * 122 | * @param string $js_object_name 123 | * @return string 124 | * @author Fabrice Bernhard 125 | * @since 2011-07-02 Johnatan 126 | */ 127 | public function getDomEventJs($js_object_name, $once=false) 128 | { 129 | $once = ($once)?'Once':''; 130 | return 'google.maps.event.addDomListener'.$once.'('.$js_object_name.', "'.$this->getTrigger().'", '.$this->getFunction().');'.PHP_EOL; 131 | } 132 | /** 133 | * returns the javascript code for attaching a Google event or a dom event to a javascript_object 134 | * 135 | * @param string $js_object_name 136 | * @return string of event type 137 | * @author Antonio Ramirez 138 | * @since 2011-07-02 Johnatan added Once Support 139 | */ 140 | public function toJs( $js_object_name ){ 141 | switch ($this->type) { 142 | case self::TYPE_EVENT_DEFAULT_ONCE: 143 | return $this->getEventJs($js_object_name, true); 144 | case self::TYPE_EVENT_DOM: 145 | return $this->getDomEventJs($js_object_name); 146 | case self::TYPE_EVENT_DOM_ONCE: 147 | return $this->getDomEventJs($js_object_name, true); 148 | case self::TYPE_EVENT_DEFAULT: 149 | default: 150 | return $this->getEventJs($js_object_name); 151 | } 152 | } 153 | 154 | } -------------------------------------------------------------------------------- /widgets/EProjekktor/EProjekktor.php: -------------------------------------------------------------------------------- 1 | htmlOptions['id'])) 103 | $this->setId($this->htmlOptions['id']); 104 | else 105 | $this->htmlOptions['id'] = $this->getId(); 106 | 107 | if (!isset($this->htmlOptions['src']) && !isset($this->options['playlists'])) 108 | throw new CException('You must set the "src" attribute on "htmlOptions" or "playlists" in the options configuration.'); 109 | 110 | 111 | $this->defaultHtmlOptions = array('class' => 'projekktor', 'width' => '480', 'height' => '270'); 112 | 113 | if (is_string($this->options)) 114 | { 115 | $this->options = function_exists('json_decode') ? json_decode($this->options) : CJSON::decode($this->options); 116 | if (!$this->options) 117 | throw new CException(Yii::t('EProjekktor', 'The options parameter is not valid JSON.')); 118 | } 119 | 120 | $this->defaultJsOptions = array('debug' => false, 'controls' => true, 'autoplay' => false); 121 | 122 | if ($this->isYoutubeVideo) 123 | { 124 | $this->defaultHtmlOptions['type'] = 'video/youtube'; 125 | $this->defaultJsOptions['useYTIframeAPI'] = true; 126 | 127 | } 128 | 129 | if (null !== $this->logoImage) 130 | { 131 | $this->defaultJsOptions['plugin_display'] = array( 132 | 'logoPosition' => $this->logoPosition, 133 | 'logoImage' => $this->logoImage, 134 | 'logoDelay' => $this->logoDelay 135 | ); 136 | } 137 | 138 | $this->htmlOptions = CMap::mergeArray($this->defaultHtmlOptions, $this->htmlOptions); 139 | 140 | $this->options = CMap::mergeArray($this->defaultJsOptions, $this->options); 141 | } 142 | 143 | /** 144 | * Renders the widget. 145 | */ 146 | public function run() 147 | { 148 | $this->renderContent(); 149 | $this->registerScripts(); 150 | } 151 | 152 | /** 153 | * Renders the video tag 154 | */ 155 | protected function renderContent() 156 | { 157 | echo CHtml::openTag('video', $this->htmlOptions); 158 | echo CHtml::closeTag('video'); 159 | } 160 | 161 | /** 162 | * Publishes and registers the necessary script files. 163 | */ 164 | protected function registerScripts() 165 | { 166 | $cs = Yii::app()->clientScript; 167 | 168 | $jsOptions = CJavaScript::encode($this->options); 169 | 170 | $basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 171 | 'assets' . DIRECTORY_SEPARATOR; 172 | 173 | $baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1); 174 | 175 | $cs->registerCssFile($baseUrl . '/' . $this->style . '/style.css'); 176 | 177 | $cs = Yii::app()->clientScript; 178 | $cs->registerCoreScript('jquery'); 179 | $cs->registerScriptFile($baseUrl . '/projekktor.min.js', CClientScript::POS_END); 180 | 181 | $cs->registerScript(__CLASS__ . '#' . $this->getId(), " 182 | projekktor('#{$this->getId()}',{$jsOptions}); 183 | ", CClientScript::POS_READY); 184 | } 185 | 186 | } -------------------------------------------------------------------------------- /extensions/EGMap/assets/markerclusterer_packed.js: -------------------------------------------------------------------------------- 1 | eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5(){7 d=32,f=33,g=34;5 j(a){8 5(b){3[a]=b}}5 k(a){8 5(){8 3[a]}}7 l;5 m(a,b,c){3.1f(m,13.12.22);3.b=a;3.a=[];3.m=[];3.$=[31,2X,2Y,35,3c];3.i=[];3.z=g;c=c||{};3.f=c.3b||37;3.V=c.1A||f;3.i=c.39||[];3.U=c.2V||3.O;3.T=c.2K||3.N;3.M=d;6(c.23!=25)3.M=c.23;3.p=g;6(c.21!=25)3.p=c.21;n(3);3.18(a);3.I=3.b.1t();7 e=3;13.12.1m.1x(3.b,"2M",5(){7 h=e.b.1P[e.b.1R()].1A,o=e.b.1t();6(!(o<0||o>h))6(e.I!=o){e.I=e.b.1t();e.k()}});13.12.1m.1x(3.b,"2U",5(){e.h()});b&&b.14&&3.B(b,g)}l=m.4;l.O="3E://13-12-3C-3B-3G.3M.3H/3I/3x/3l/3m/m";l.N="3k";l.1f=5(a,b){8 5(c){15(7 e 3g c.4)3.4[e]=c.4[e];8 3}.2D(a,[b])};l.1j=5(){6(!3.z){3.z=d;q(3)}};l.1k=5(){};5 n(a){6(!a.i.14)15(7 b=0,c;c=a.$[b];b++)a.i.16({1B:a.U+(b+1)+"."+a.T,1c:c,1l:c})}l.w=k("i");l.q=k("a");l.S=5(){8 3.a.14};l.H=5(){8 3.V||3.b.1P[3.b.1R()].1A};l.F=5(a,b){15(7 c=0,e=a.14,h=e;h!==0;){h=1y(h/10,10);c++}c=9.24(c,b);8{1e:e,1C:c}};l.Y=j("F");l.G=k("F");l.B=5(a,b){15(7 c=0,e;e=a[c];c++)t(3,e);b||3.h()};5 t(a,b){b.1g(g);b.18(f);b.r=g;b.2s&&13.12.1m.1x(b,"2t",5(){b.r=g;a.k();a.h()});a.a.16(b)}l.o=5(a,b){t(3,a);b||3.h()};5 u(a,b){7 c=-1;6(a.a.1n)c=a.a.1n(b);17 15(7 e=0,h;h=a.a[e];e++)6(h==b){c=e;27}6(c==-1)8 g;a.a.2z(c,1);b.1g(g);b.18(f);8 d}l.W=5(a,b){7 c=u(3,a);6(!b&&c){3.k();3.h();8 d}17 8 g};l.X=5(a,b){15(7 c=g,e=0,h;h=a[e];e++){h=u(3,h);c=c||h}6(!b&&c){3.k();3.h();8 d}};l.R=5(){8 3.m.14};l.1d=k("b");l.18=j("b");l.v=k("f");l.Z=j("f");l.u=5(a){7 b=3.1X(),c=1a 13.12.1F(a.1I().19(),a.1I().1i()),e=1a 13.12.1F(a.1J().19(),a.1J().1i());c=b.1v(c);c.x+=3.f;c.y-=3.f;e=b.1v(e);e.x-=3.f;e.y+=3.f;c=b.1Z(c);b=b.1Z(e);a.1f(c);a.1f(b);8 a};l.P=5(){3.k();3.a=[]};l.k=5(){15(7 a=0,b;b=3.m[a];a++)b.1p();15(a=0;b=3.a[a];a++){b.r=g;b.18(f);b.1g(g)}3.m=[]};l.h=5(){q(3)};5 q(a){6(a.z)15(7 b=a.u(1a 13.12.1z(a.b.1r().1J(),a.b.1r().1I())),c=0,e;e=a.a[c];c++)6(!e.r&&b.26(e.1b())){7 h=a;e=e;15(7 o=3h,r=f,x=0,p=2c 0;p=h.m[x];x++){7 i=p.1u();6(i){i=i;7 s=e.1b();6(!i||!s)i=0;17{7 y=(s.19()-i.19())*9.1q/1o,z=(s.1i()-i.1i())*9.1q/1o;i=9.1s(y/2)*9.1s(y/2)+9.2b(i.19()*9.1q/1o)*9.2b(s.19()*9.1q/1o)*9.1s(z/2)*9.1s(z/2);i=2h*2*9.2g(9.2a(i),9.2a(1-i))}6(i3.j.H())15(a=0;b=3.a[a];a++){b.18(3.b);b.1g(d)}17 6(3.a.14<2)B(3.l);17{b=3.j.G()(3.a,3.j.w().14);3.l.20(3.d);a=3.l;a.A=b;a.2i=b.1e;a.2e=b.1C;6(a.c)a.c.1Y=b.1e;b=9.2j(0,a.A.1C-1);b=9.24(a.i.14-1,b);b=a.i[b];a.L=b.1B;a.g=b.1c;a.n=b.1l;a.J=b.2d;a.e=b.2x;a.K=b.2k;a.C=b.2v;3.l.1W()}8 d};l.1r=5(){15(7 a=1a 13.12.1z(3.d,3.d),b=3.q(),c=0,e;e=b[c];c++)a.1f(e.1b());8 a};l.1p=5(){3.l.1p();3.a.14=0;2y 3.a};l.Q=5(){8 3.a.14};l.q=k("a");l.1u=k("d");5 A(a){a.D=a.j.u(1a 13.12.1z(a.d,a.d))}l.1d=k("b");5 w(a,b,c){a.j.1f(w,13.12.22);3.i=b;3.2B=c||0;3.t=a;3.d=f;3.b=a.1d();3.A=3.c=f;3.s=g;3.18(3.b)}l=w.4;l.1j=5(){3.c=1Q.2A("2u");6(3.s){3.c.1h.1M=C(3,D(3,3.d));3.c.1Y=3.A.1e}3.2n().2m.2l(3.c);7 a=3;13.12.1m.2o(3.c,"2p",5(){7 b=a.t.j;13.12.1m.2q(b,"2w",a.t);b.M&&a.b.2r(a.t.1r())})};5 D(a,b){7 c=a.1X().1v(b);c.x-=1y(a.n/2,10);c.y-=1y(a.g/2,10);8 c}l.1k=5(){6(3.s){7 a=D(3,3.d);3.c.1h.1D=a.y+"E";3.c.1h.1G=a.x+"E"}};5 B(a){6(a.c)a.c.1h.1N="2C";a.s=g}l.1W=5(){6(3.c){3.c.1h.1M=C(3,D(3,3.d));3.c.1h.1N=""}3.s=d};l.1p=5(){3.18(f)};l.1E=5(){6(3.c&&3.c.1O){B(3);3.c.1O.2f(3.c);3.c=f}};l.20=j("d");5 C(a,b){7 c=[];6(1Q.3r)c.16(\'3q:3p:3s.3t.3v(3u=3o,3n="\'+a.L+\'");\');17{c.16("1S-3i:1B("+a.L+");");c.16("1S-28:"+(a.C?a.C:"0 0")+";")}6(1H a.e==="3j"){1H a.e[0]==="1V"&&a.e[0]>0&&a.e[0]0&&a.e[1] false, 53 | 'RemoveComments' => true, 54 | 'RemoveEmptyRulesets' => true, 55 | 'RemoveEmptyAtBlocks' => true, 56 | 'ConvertLevel3AtKeyframes' => false, 57 | 'ConvertLevel3Properties' => false, 58 | 'RemoveLastDelarationSemiColon' => true 59 | ); 60 | 61 | /** 62 | * CssMin plugin options. Maximum compression and conversion. 63 | */ 64 | protected static $cssMinPlugins = array 65 | ( 66 | 'Variables' => true, 67 | 'ConvertFontWeight' => false, 68 | 'ConvertHslColors' => false, 69 | 'ConvertRgbColors' => false, 70 | 'ConvertNamedColors' => false, 71 | 'CompressColorValues' => false, 72 | 'CompressUnitValues' => true, 73 | 'CompressExpressionValues' => false, 74 | ); 75 | 76 | /** 77 | * 78 | * @param string $content the content to compres 79 | * @param string $adapter the adapter to use to minify 80 | * @param array $options the options for the adapter 81 | * @return compressed content if successful | false otherwise 82 | */ 83 | public static function minifyCss($content, $adapter = self::CSS_MIN, $options = array()) 84 | { 85 | if(is_string($adapter)) 86 | { 87 | switch($adapter) 88 | { 89 | case self::CSS_COMPRESSOR: 90 | return call_user_func_array(array($adapter,'process'), array($content, $options)); 91 | break; 92 | case self::CSS_MIN: 93 | // check css/CssMin class for options 94 | $filters = isset($options['filters']) ? array_merge(self::$cssMinFilters, $options['filters']) : self::$cssMinFilters; 95 | $plugins = isset($options['plugins']) ? array_merge(self::$cssMinPlugins, $options['plugins']) : self::$cssMinPlugins; 96 | return call_user_func_array(array($adapter, 'minify'), array($content, $filters, $plugins)); 97 | break; 98 | case self::CSS_MINIFIER: 99 | // check css/CssMinifier for options 100 | return call_user_func_array(array($adapter, 'minify'), array($content, $options)); 101 | break; 102 | } 103 | } 104 | return false; 105 | } 106 | 107 | /** 108 | * 109 | * @param string $content the content to minify 110 | * @param string $adapter the adapter to use to minify 111 | * @param array $options the options to the adapter 112 | * @return compressed code if successful | false otherwise 113 | */ 114 | public static function minifyJs($content, $adapter = self::JS_MIN, $options = array()) 115 | { 116 | if(is_string($adapter) && ($adapter == self::JS_MIN || $adapter == self::JS_MIN_PLUS)) 117 | { 118 | return call_user_func_array(array($adapter, 'minify'), array($content)); 119 | } 120 | return false; 121 | } 122 | 123 | /** 124 | * 125 | * @param string $content the content to parse 126 | * @param array $options 127 | * @see HTMLMin class to check the options 128 | * @return minified content 129 | */ 130 | public static function minifyHTML($content, $options = array()) 131 | { 132 | return HTMLMin::minify($content, $options); 133 | } 134 | 135 | /** 136 | * 137 | * @param string $content the content to pack 138 | * @param string | integer $encoding the compression type 139 | * @see JavaScriptPacker class 140 | * @param boolean $fastDecode 141 | * @param boolean $specialChars 142 | * @return packed content 143 | */ 144 | public static function packJs($content, $encoding = 'Normal', $fastDecode = true, $specialChars = false) 145 | { 146 | $jsSize = strlen($content); 147 | if ($jsSize > 256 && $jsSize < 1048576) 148 | { // prevent memory error 149 | $packer = new JavaScriptPacker($content, $encoding, $fastDecode, $specialChars); 150 | return $packer->pack(); 151 | } 152 | return $content; 153 | } 154 | 155 | /** 156 | * Helper function to register compressed script to CClientScript 157 | * @param string $id the id of the script 158 | * @param script code $script 159 | * @param integer $cacheDuration 160 | * @param integer $position the position where to register the script 161 | */ 162 | public static function registerScript($id, $script, $cacheDuration=0, $position=CClientScript::POS_READY) 163 | { 164 | $js = Yii::app()->cache->get($id); 165 | if(!$js) 166 | { 167 | $js = self::minifyJs($script); 168 | Yii::app()->cache->set($id, $js, $cacheDuration); 169 | } 170 | Yii::app()->clientScript->registerScript($id, $js, $position); 171 | } 172 | } -------------------------------------------------------------------------------- /extensions/EGMap/EGMapMarkerWithLabel.php: -------------------------------------------------------------------------------- 1 | null, 41 | // The name of the CSS class defining the styles for the label. Note 42 | // that style values for position, overflow, top, left, zIndex, display, 43 | // marginLeft, and marginTop are ignored; these styles are for internal use only. 44 | 'labelClass'=> null, 45 | // The content of the label (plain text or an HTML DOM node). 46 | 'labelContent'=> null, 47 | // A flag indicating whether a label that overlaps its associated marker 48 | // should appear in the background (i.e., in a plane below the marker). 49 | // The default is false, which causes the label to appear in the foreground. 50 | 'labelInBackGround' => null, 51 | // An object literal whose properties define specific CSS style values to be 52 | // applied to the label. Style values defined here override those that may be 53 | // defined in the labelClass style sheet. If this property is changed after the 54 | // label has been created, all previously set styles (except those defined in 55 | // the style sheet) are removed from the label before the new style values are 56 | // applied. Note that style values for position, overflow, top, left, zIndex, 57 | // display, marginLeft, and marginTop are ignored; these styles are for internal use only. 58 | 'labelStyle'=> null, 59 | // A flag indicating whether the label is to be visible. The default is true. 60 | // Note that even if labelVisible is true, the label will not be visible unless the 61 | // associated marker is also visible (i.e., unless the marker's visible property is true). 62 | 'labelVisible'=> null, 63 | // A flag indicating whether the label and marker are to be raised when the marker is dragged. 64 | // The default is true. If a draggable marker is being created and a version of Google 65 | // Maps API earlier than V3.3 is being used, this property must be set to false. 66 | 'raiseOnDrag'=>null 67 | 68 | ); 69 | /** 70 | * @param string $js_name Javascript name of the marker 71 | * @param float $lat Latitude 72 | * @param float $lng Longitude 73 | * @param EGMapIcon $icon 74 | * @param EGmapEvent[] array of GoogleMap Events linked to the marker 75 | * @author Antonio Ramirez 76 | */ 77 | public function __construct( $lat, $lng, $options = array(), $js_name='marker',$events=array() ) 78 | { 79 | $this->marker_object = 'MarkerWithLabel'; 80 | 81 | $options = array_merge($this->label_options, $this->encodeOptions($options)); 82 | 83 | parent::__construct( $lat, $lng, $options, $js_name, $events ); 84 | 85 | } 86 | /** 87 | * 88 | * Sets the anchor of the label 89 | * @param EGMapPoint $anchor 90 | */ 91 | public function setLabelAnchor( EGMapPoint $anchor ){ 92 | 93 | $this->options['labelAnchor'] = $anchor; 94 | } 95 | /** 96 | * 97 | * Sets the label HTML content 98 | * @param string $content 99 | */ 100 | public function setLabelContent( $content ){ 101 | 102 | $this->options['labelContent']='"'.$content.'"'; 103 | } 104 | /** 105 | * 106 | * Set the style class name for the label 107 | * @param unknown_type $class 108 | */ 109 | public function setLabelClass( $class ){ 110 | 111 | $this->options['labelClass'] = '"'.$class.'"'; 112 | 113 | } 114 | /** 115 | * 116 | * Sets label style 117 | * position, overflow, top, left, zIndex, 118 | * display, marginLeft, and marginTop are ignored 119 | * @param array $styleOptions 120 | * @throws CException 121 | */ 122 | public function setLabelStyle( $styleOptions ){ 123 | if(!is_array( $styleOptions )) 124 | throw new CException( Yii::t('EGMap', 'EGMapMarkerWithLabel label style options must be of type array!')); 125 | $this->options['labelStyle'] = CJavaScript::encode($styleOptions); 126 | } 127 | /** 128 | * (non-PHPdoc) 129 | * @see EGMapMarker::setOptions() 130 | */ 131 | public function setOptions( $options ){ 132 | parent::setOptions( $this->encodeOptions($options) ); 133 | } 134 | /** 135 | * 136 | * Encodes options appropiatelly 137 | * @param array $options 138 | */ 139 | private function encodeOptions( $options ){ 140 | if(!is_array( $options )) 141 | throw new CException( Yii::t('EGMap', 'EGMapMarkerWithLabel.encodeOptions parameter must be of type array!')); 142 | foreach(array('labelContent', 'labelClass', 'labelStyle') as $key ) 143 | if(isset($options[$key])) $options[$key] = CJavaScript::encode($options[$key]); 144 | 145 | return $options; 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /extensions/EScriptBoost/assets/css/CssMinify.php: -------------------------------------------------------------------------------- 1 | 14 | * @author http://code.google.com/u/1stvamp/ (Issue 64 patch) 15 | */ 16 | class CssMinify { 17 | 18 | /** 19 | * Minify a CSS string 20 | * 21 | * @param string $css 22 | * 23 | * @param array $options available options: 24 | * 25 | * 'preserveComments': (default true) multi-line comments that begin 26 | * with "/*!" will be preserved with newlines before and after to 27 | * enhance readability. 28 | * 29 | * 'removeCharsets': (default true) remove all @charset at-rules 30 | * 31 | * 'prependRelativePath': (default null) if given, this string will be 32 | * prepended to all relative URIs in import/url declarations 33 | * 34 | * 'currentDir': (default null) if given, this is assumed to be the 35 | * directory of the current CSS file. Using this, minify will rewrite 36 | * all relative URIs in import/url declarations to correctly point to 37 | * the desired files. For this to work, the files *must* exist and be 38 | * visible by the PHP process. 39 | * 40 | * 'symlinks': (default = array()) If the CSS file is stored in 41 | * a symlink-ed directory, provide an array of link paths to 42 | * target paths, where the link paths are within the document root. Because 43 | * paths need to be normalized for this to work, use "//" to substitute 44 | * the doc root in the link paths (the array keys). E.g.: 45 | * 46 | * array('//symlink' => '/real/target/path') // unix 47 | * array('//static' => 'D:\\staticStorage') // Windows 48 | * 49 | * 50 | * 'docRoot': (default = $_SERVER['DOCUMENT_ROOT']) 51 | * see CssUriRewriter::rewrite 52 | * 53 | * @return string 54 | */ 55 | public static function minify($css, $options = array()) 56 | { 57 | $options = array_merge(array( 58 | 'removeCharsets' => true, 59 | 'preserveComments' => true, 60 | 'currentDir' => null, 61 | 'docRoot' => $_SERVER['DOCUMENT_ROOT'], 62 | 'prependRelativePath' => null, 63 | 'symlinks' => array(), 64 | ), $options); 65 | 66 | if ($options['removeCharsets']) { 67 | $css = preg_replace('/@charset[^;]+;\\s*/', '', $css); 68 | } 69 | if (! $options['preserveComments']) { 70 | $css = CssCompressor::process($css, $options); 71 | } else { 72 | $css = CommentPreserver::process( 73 | $css 74 | ,array('CssCompressor', 'process') 75 | ,array($options) 76 | ); 77 | } 78 | if (! $options['currentDir'] && ! $options['prependRelativePath']) { 79 | return $css; 80 | } 81 | if ($options['currentDir']) { 82 | return CssUriRewriter::rewrite( 83 | $css 84 | ,$options['currentDir'] 85 | ,$options['docRoot'] 86 | ,$options['symlinks'] 87 | ); 88 | } else { 89 | return CssUriRewriter::prepend( 90 | $css 91 | ,$options['prependRelativePath'] 92 | ); 93 | } 94 | } 95 | } 96 | 97 | /** 98 | * Class CommentPreserver 99 | * @package Minify 100 | */ 101 | 102 | /** 103 | * Process a string in pieces preserving C-style comments that begin with "/*!" 104 | * 105 | * @package Minify 106 | * @author Stephen Clay 107 | */ 108 | class CommentPreserver { 109 | 110 | /** 111 | * String to be prepended to each preserved comment 112 | * 113 | * @var string 114 | */ 115 | public static $prepend = "\n"; 116 | 117 | /** 118 | * String to be appended to each preserved comment 119 | * 120 | * @var string 121 | */ 122 | public static $append = "\n"; 123 | 124 | /** 125 | * Process a string outside of C-style comments that begin with "/*!" 126 | * 127 | * On each non-empty string outside these comments, the given processor 128 | * function will be called. The comments will be surrounded by 129 | * Minify_CommentPreserver::$preprend and Minify_CommentPreserver::$append. 130 | * 131 | * @param string $content 132 | * @param callback $processor function 133 | * @param array $args array of extra arguments to pass to the processor 134 | * function (default = array()) 135 | * @return string 136 | */ 137 | public static function process($content, $processor, $args = array()) 138 | { 139 | $ret = ''; 140 | while (true) { 141 | list($beforeComment, $comment, $afterComment) = self::_nextComment($content); 142 | if ('' !== $beforeComment) { 143 | $callArgs = $args; 144 | array_unshift($callArgs, $beforeComment); 145 | $ret .= call_user_func_array($processor, $callArgs); 146 | } 147 | if (false === $comment) { 148 | break; 149 | } 150 | $ret .= $comment; 151 | $content = $afterComment; 152 | } 153 | return $ret; 154 | } 155 | 156 | /** 157 | * Extract comments that YUI Compressor preserves. 158 | * 159 | * @param string $in input 160 | * 161 | * @return array 3 elements are returned. If a YUI comment is found, the 162 | * 2nd element is the comment and the 1st and 3rd are the surrounding 163 | * strings. If no comment is found, the entire string is returned as the 164 | * 1st element and the other two are false. 165 | */ 166 | private static function _nextComment($in) 167 | { 168 | if ( 169 | false === ($start = strpos($in, '/*!')) 170 | || false === ($end = strpos($in, '*/', $start + 3)) 171 | ) { 172 | return array($in, false, false); 173 | } 174 | $ret = array( 175 | substr($in, 0, $start) 176 | ,self::$prepend . '/*!' . substr($in, $start + 3, $end - $start - 1) . self::$append 177 | ); 178 | $endChars = (strlen($in) - $end - 2); 179 | $ret[] = (0 === $endChars) 180 | ? '' 181 | : substr($in, -$endChars); 182 | return $ret; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /extensions/EGeoIp/EGeoIP.php: -------------------------------------------------------------------------------- 1 | _data = new CMap(); 51 | } 52 | /** 53 | * 54 | * Locates IP information 55 | * @param string $ip address. If null, it will locate the IP of request 56 | */ 57 | public function locate( $ip = null ){ 58 | if( null === $ip ) $ip = $_SERVER['REMOTE_ADDR']; 59 | 60 | $host = str_replace('{IP}',$ip, $this->_service); 61 | $host = str_replace('{CURRENCY}', $this->_currency, $host ); 62 | 63 | $response = $this->fetch($host); 64 | 65 | if(!is_null( $response) && is_array($response)) 66 | { 67 | $this->_data->mergeWith($response); 68 | $this->_data->add('ip',$ip); 69 | return true; 70 | } 71 | return true; 72 | } 73 | /** 74 | * 75 | * Converts an amount to the located currency by using the 76 | * located currency converter value. This function can only be 77 | * used after a call to locate function has been executed. 78 | * @param float | integer $amount 79 | * @param integer $float number of decimals 80 | * @param boolean $symbol to display the currency symbol or not (true by default) 81 | */ 82 | public function currencyConvert($amount, $float=2, $symbol=true) { 83 | 84 | if( null === $this->getCurrencyConverter() || !is_numeric($amount) ) 85 | return false; 86 | 87 | $converted = round( ($amount * $this->getCurrencyConverter()), $float ); 88 | if ( $symbol === true ) { 89 | if($this->getCurrencySymbol() === 'USD') 90 | $converted = $this->getCurrencySymbol().$converted; 91 | else $converted .= $this->getCurrencySymbol(); 92 | } 93 | 94 | return $converted; 95 | } 96 | /** 97 | * 98 | * Set base property 99 | * @param string $currency 100 | * @link http://www.geoplugin.com/iso4217 101 | */ 102 | public function setBaseCurrency( $currency = 'USD' ){ 103 | $this->_currency = $currency; 104 | } 105 | /** 106 | * 107 | * Returns base currency 108 | */ 109 | public function getBaseCurrency(){ 110 | return $this->_currency; 111 | } 112 | /** 113 | * 114 | * Returns located IP 115 | */ 116 | public function getIp(){ 117 | return $this->_data->itemAt('ip'); 118 | } 119 | /** 120 | * 121 | * Returns located City 122 | */ 123 | public function getCity(){ 124 | return $this->_data->itemAt('geoplugin_city'); 125 | } 126 | /** 127 | * 128 | * Returns located region 129 | */ 130 | public function getRegion(){ 131 | return $this->_data->itemAt('geoplugin_region'); 132 | } 133 | /** 134 | * 135 | * Returns located area code 136 | */ 137 | public function getAreaCode(){ 138 | return $this->_data->itemAt('geoplugin_areaCode'); 139 | } 140 | /** 141 | * 142 | * Returns located DMA code 143 | */ 144 | public function getDma(){ 145 | return $this->_data->itemAt('geoplugin_dmaCode'); 146 | } 147 | /** 148 | * 149 | * Returns located area code 150 | */ 151 | public function getCountryCode(){ 152 | return $this->_data->itemAt('geoplugin_countryCode'); 153 | } 154 | /** 155 | * 156 | * Returns located country name 157 | */ 158 | public function getCountryName(){ 159 | return $this->_data->itemAt('geoplugin_countryName'); 160 | } 161 | /** 162 | * 163 | * Returns located continent code 164 | */ 165 | public function getContinentCode(){ 166 | return $this->_data->itemAt('geoplugin_continentCode'); 167 | } 168 | /** 169 | * 170 | * Returns located latitude 171 | */ 172 | public function getLatitude(){ 173 | return $this->_data->itemAt('geoplugin_latitude'); 174 | } 175 | /** 176 | * 177 | * Returns located longitude 178 | */ 179 | public function getLongitude(){ 180 | return $this->_data->itemAt('geoplugin_longitude'); 181 | } 182 | /** 183 | * 184 | * Returns located currency code 185 | */ 186 | public function getCurrencyCode(){ 187 | return $this->_data->itemAt('geoplugin_currencyCode'); 188 | } 189 | /** 190 | * 191 | * Returns located currency symbol 192 | */ 193 | public function getCurrencySymbol(){ 194 | return $this->_data->itemAt('geoplugin_currencySymbol'); 195 | } 196 | /** 197 | * 198 | * Returns located currency converter 199 | */ 200 | public function getCurrencyConverter(){ 201 | return $this->_data->itemAt('geoplugin_currencyConverter'); 202 | } 203 | /** 204 | * 205 | * Fetches a URI and returns the contents of the call 206 | * EHttpClient could also be used 207 | * 208 | * @param string $host 209 | * @see http://www.yiiframework.com/extension/ehttpclient/ 210 | */ 211 | protected function fetch($host){ 212 | 213 | $response = null; 214 | 215 | if ( function_exists('curl_init') ) { 216 | 217 | $ch = curl_init(); 218 | curl_setopt($ch, CURLOPT_URL, $host); 219 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 220 | curl_setopt($ch, CURLOPT_USERAGENT, 'EGeoIP Yii Extension Class v1.0'); 221 | $response = curl_exec($ch); 222 | curl_close ($ch); 223 | 224 | } else if ( ini_get('allow_url_fopen') ) { 225 | 226 | $response = file_get_contents($host, 'r'); 227 | } 228 | 229 | return unserialize($response); 230 | } 231 | 232 | } --------------------------------------------------------------------------------