Subversion Repositories LCARS

Rev

Rev 186 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 186 Rev 193
Line 1... Line 1...
1
<?php
1
<?php
2
2
3
require_once 'application/views/IndexView.php';
3
require_once 'application/views/IndexView.php';
4
// require_once 'application/models/mappers/SeriesMapper.php';
4
require_once 'application/models/mappers/SeriesMapper.php';
5
5
6
class IndexController extends \PointedEars\PHPX\Controller
6
class IndexController extends \PointedEars\PHPX\Controller
7
{
7
{
8
  /**
8
  /**
9
   * Creates a new controller for the index view
9
   * Creates a new controller for the index view
Line 19... Line 19...
19
  {
19
  {
20
    require_once 'data.inc';
20
    require_once 'data.inc';
21
21
22
    $min_percentage = 100;
22
    $min_percentage = 100;
23
    $min_series = null;
23
    $min_series = null;
-
 
24
-
 
25
    $data = array(
-
 
26
        'urns' => array(
-
 
27
            'wiki' => 'http://de.wikipedia.org/wiki/'
-
 
28
        )
-
 
29
    );
-
 
30
-
 
31
    $serien = SeriesMapper::getInstance()->getList($serien);
-
 
32
-
 
33
    foreach ($serien as $key => &$serie)
-
 
34
    {
-
 
35
      if ($serie->total > 0)
-
 
36
      {
-
 
37
        if (!$serie->ignore && $serie->percentage < $min_percentage)
-
 
38
        {
-
 
39
          $min_percentage = $serie->percentage;
-
 
40
          $min_series = $key;
-
 
41
        }
-
 
42
      }
-
 
43
    }
-
 
44
-
 
45
    $this->assign('serien', $serien);
-
 
46
    $this->assign('min_series', $min_series);
-
 
47
    $this->render();
-
 
48
  }
-
 
49
-
 
50
  private function oldIndexAction ()
-
 
51
  {
-
 
52
    require_once 'data.inc';
-
 
53
-
 
54
    $min_percentage = 100;
-
 
55
    $min_series = null;
24
56
25
    $data = array(
57
    $data = array(
26
      'urns' => array(
58
      'urns' => array(
27
        'wiki' => 'http://de.wikipedia.org/wiki/'
59
        'wiki' => 'http://de.wikipedia.org/wiki/'
28
      ),
60
      ),