Ejemplo n.º 1
0
 function offline()
 {
     $contacts = new Statique('contacts');
     $legal = new Statique('legal');
     $legal->write($legal->read() . "\n\n" . $contacts->read() . "\n");
     $contacts->delete();
 }
Ejemplo n.º 2
0
 function editerAction()
 {
     $page = $this->_getParam('page');
     if (!$page) {
         throw new Strass_Controller_Action_Exception("Aucune page à éditer");
     }
     $this->view->statique = $page = new Statique($page);
     $this->metas(array('DC.Title' => "Éditer " . $page->getTitle()));
     $this->branche->append($page->getTitle(), array('action' => 'index'));
     $this->branche->append('Éditer');
     $this->assert(null, $page, 'editer', "Vous n'avez pas le droit d'éditer cette page");
     $this->view->model = $m = new Wtk_Form_Model('editer');
     $m->addNewSubmission('enregistrer', 'Enregistrer');
     $m->addString('wiki', 'Texte', $page->read());
     if ($m->validate()) {
         $page->write($m->get('wiki'));
         $this->redirectSimple('index');
     }
 }
Ejemplo n.º 3
0
<?php

require_once 'Strass/Statique.php';
$s = $this->document->getFooter()->current()->addSection('about', "À propos");
$created = $this->document->metas->get('DC.Date.created');
$l = $s->addList();
$l->addItem('© ' . $created . ($created == date('Y') ? '' : '-' . date('Y')) . " " . $this->document->metas->get('DC.Creator'))->addFlags('copyright');
$page = new Statique('legal');
if ($page->readable() || $this->assert(null, $page, 'editer')) {
    $l->addItem()->addFlags('legal')->addLink($this->url(array('controller' => 'statiques', 'action' => 'index', 'page' => 'legal'), true), 'Mentions légales');
}
$l->addItem($this->page->metas->get('DC.Title'))->addFlags('title');
$l->addItem($this->page->metas->get('DC.Creator'))->addFlags('author');
$l->addItem(strftime('%x', strtotime($this->page->metas->get('DC.Date.available'))))->addFlags('date');
$l->addItem()->addFlags('strass')->addLink('https://github.com/bersace/strass', 'Propulsé par Strass');