source: cpc/trunk/project/apps/frontend/modules/plot/actions/actions.class.php @ 1463

Last change on this file since 1463 was 1463, checked in by roux, 10 years ago

débuts pas finis pour graphes d'accueil

File size: 1.6 KB
Line 
1<?php
2
3/**
4 * plot actions.
5 *
6 * @package    cpc
7 * @subpackage plot
8 * @author     roux
9 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
10 */
11class plotActions extends sfActions {
12
13  public function executeGeneratePlotParlementaire(sfWebRequest $request) {
14    $this->type = $request->getParameter('type');
15    $this->time = $request->getParameter('time');
16    $this->forward404Unless(preg_match('/^(total|hemicycle|commission)$/', $this->type));
17    $this->forward404Unless(preg_match('/^(lastyear|20\d{2}20\d{2})$/', $this->time));
18    $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));
19    $this->forward404Unless($this->parlementaire);
20    $this->questions = $request->getParameter('questions');
21    if (!$this->questions)
22      $this->questions = 'false';
23    $this->link = $request->getParameter('link');
24    if (!$this->link)
25      $this->link = 'false';
26    $this->drawAction = $request->getParameter('drawAction');
27    if (!$this->drawAction)
28      $this->drawAction = "draw";
29    $this->mapId = $request->getParameter('mapId');
30    $this->forward404Unless($this->mapId);
31    $this->getResponse()->setHttpHeader('content-type', 'image/png');
32    $this->setLayout(false);
33  }
34
35  public function executeGeneratePlotGroupes(sfWebRequest $request) {
36    $this->drawAction = $request->getParameter('drawAction');
37    if (!$this->drawAction)
38      $this->drawAction = "draw";
39    $this->mapId = $request->getParameter('mapId');
40    $this->forward404Unless($this->mapId);
41    $this->getResponse()->setHttpHeader('content-type', 'image/png');
42    $this->setLayout(false);
43  }
44 
45}
Note: See TracBrowser for help on using the repository browser.