예제 #1
0
 public function build()
 {
     parent::build();
     header('Content-Type: ' . $this->photo->getMimeType($this->dimension_shortname));
     readfile($this->photo->getFilePath($this->dimension_shortname));
     exit;
 }
예제 #2
0
 /**
  * Creates a new Atom post page
  *
  * @param SiteWebApplication $app the application.
  * @param SiteLayout $layout
  * @param string $dimension_shortname
  */
 public function __construct(SiteWebApplication $app, SiteLayout $layout, array $arguments = array())
 {
     $layout = new SiteLayout($app, 'Site/layouts/xhtml/atom.php');
     parent::__construct($app, $layout, $arguments);
     $tags = SiteApplication::initVar('tags');
     $this->createTagList($tags);
     $this->dimension = $this->initDimension($this->getArgument('dimension_shortname'));
 }
예제 #3
0
    /**
     * Creates a new author index page
     *
     * @param SiteWebApplication $app the application.
     * @param SiteLayout $layout
     */
    public function __construct(SiteWebApplication $app, SiteLayout $layout, array $arguments = array())
    {
        parent::__construct($app, $layout, $arguments);
        $instance_id = $this->app->getInstanceId();
        $sql = sprintf('select * from BlorgAuthor
			where instance %s %s and visible = %s', SwatDB::equalityOperator($instance_id), $this->app->db->quote($instance_id, 'integer'), $this->app->db->quote(true, 'boolean'));
        $this->authors = SwatDB::query($this->app->db, $sql, SwatDBClassMap::get('BlorgAuthorWrapper'));
    }
예제 #4
0
 public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array())
 {
     parent::__construct($app, $layout, $arguments);
     $year = $this->getArgument('year');
     $month_name = $this->getArgument('month_name');
     $this->initPosts($year, $month_name);
     $this->year = intval($year);
     $this->month = BlorgPageFactory::$months_by_name[$month_name];
 }
예제 #5
0
function main()
{
    switch (REDIRECT_URL) {
        case "/initialise/":
            $page = new InitialisationPage();
            break;
        default:
            if (string_startsWith(REDIRECT_URL, "/api/")) {
                $page = new APIPage();
            } else {
                $page = new SitePage();
            }
    }
    if (isset($page)) {
        $page->render();
    }
    return 0;
}
예제 #6
0
 public function build()
 {
     parent::build();
     if (!$this->app->config->pinhole->search_engine_indexable) {
         $this->displayDisallowString();
     } else {
         $this->displayGeneralRules();
     }
     exit;
 }
예제 #7
0
 public function finalize()
 {
     parent::finalize();
     $this->layout->addHtmlHeadEntrySet($this->ui->getRoot()->getHtmlHeadEntrySet());
 }
예제 #8
0
 public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array())
 {
     $layout = new SiteLayout($app, 'Site/layouts/xhtml/fileloader.php');
     parent::__construct($app, $layout, $arguments);
     $this->initFile($this->getArgument('filename'));
 }
예제 #9
0
 public function finalize()
 {
     parent::finalize();
     if ($this->pager !== null) {
         $this->layout->addHtmlHeadEntrySet($this->pager->getHtmlHeadEntrySet());
     }
 }
예제 #10
0
 public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array())
 {
     $layout = new SiteLayout($app, 'Site/layouts/xhtml/atom.php');
     parent::__construct($app, $layout, $arguments);
 }
예제 #11
0
 public function finalize()
 {
     parent::finalize();
     if ($this->author->openid_server != '') {
         $this->layout->addHtmlHeadEntry(new SwatLinkHtmlHeadEntry($this->author->openid_server, 'openid.server'));
     }
     if ($this->author->openid_delegate != '') {
         $this->layout->addHtmlHeadEntry(new SwatLinkHtmlHeadEntry($this->author->openid_delegate, 'openid.delegate'));
     }
     if ($this->pager !== null) {
         $this->layout->addHtmlHeadEntrySet($this->pager->getHtmlHeadEntrySet());
     }
 }
예제 #12
0
 public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array())
 {
     $layout = new SiteLayout($app, 'Blorg/layouts/xhtml/ajax-proxy.php');
     parent::__construct($app, $layout, $arguments);
     $this->initUri($this->getArgument('source'));
 }
예제 #13
0
 public function init()
 {
     parent::init();
     $this->initComments($this->getArgument('page'));
 }
예제 #14
0
 public function finalize()
 {
     parent::finalize();
     $this->layout->addHtmlHeadEntrySet($this->ui->getRoot()->getHtmlHeadEntrySet());
     if (count($this->tag_list) > 0) {
         $this->layout->data->feed_link = 'feed?' . $this->tag_list->__toString();
     }
 }
예제 #15
0
 public function __construct(SiteApplication $app, SiteLayout $layout = null, array $arguments = array())
 {
     parent::__construct($app, $layout, $arguments);
     $this->inityears();
 }
예제 #16
0
 /**
  * Creates a new archive page
  *
  * @param SiteWebApplication $app the application.
  * @param SiteLayout $layout
  */
 public function __construct(SiteWebApplication $app, SiteLayout $layout)
 {
     parent::__construct($app, $layout);
     $this->initTags();
 }