Exemplo n.º 1
0
 public function build()
 {
     parent::build();
     header('Content-Type: ' . $this->photo->getMimeType($this->dimension_shortname));
     readfile($this->photo->getFilePath($this->dimension_shortname));
     exit;
 }
Exemplo n.º 2
0
 public function build()
 {
     parent::build();
     $config = $this->app->config;
     $this->layout->startCapture('content');
     if ($config->pinhole->google_maps_api_key === null) {
         echo Pinhole::_('You must specify a google maps api key ' . 'to use geo-tagging features.');
     } elseif ($config->pinhole->google_maps_admin_api_key === null) {
         echo Pinhole::_('You must specify an admin google maps api key ' . 'to use geo-tagging features.');
     } else {
         printf('<iframe src="%s/Search" frameborder="0" ' . 'id="search_iframe"></iframe>', $this->getComponentName());
         echo '<div id="map_frame">';
         echo '<form method="post" action="#">';
         printf('<input type="submit" id="set_gps" value="%s" />', Pinhole::_('Geo-Tag Photo(s)'));
         printf(' <input type="checkbox" id="auto_next" /> ' . '<label for="auto_next">%s</label>', Pinhole::_('Automatically proceed to next photo'));
         echo '</form>';
         echo '<div id="map"></div>';
         echo '</div>';
         echo Swat::displayInlineJavaScript($this->getInlineJavaScript());
     }
     $this->layout->endCapture();
 }