Fatal Error
EXCEPTION_OTHER : 0
{main}
open/var/www/eveplanets/data/www/eveplanets.com/code/application/modules/eve/controllers/ComponentsController.php
1     <?php                                                       
2    
class Eve_ComponentsController extends Zend_Controller_Action
3    
{
4        function 
indexAction(){
5            
$show $this->_getParam('show');
6            
$modelComp = new Eve_Model_Components();
7            
$modelMat = new Eve_Model_Materials();
8            
$modelPlanets = new Eve_Model_Planets();
9    
10           
//Check if component exists
11           
$component $modelComp->fetchRow('name = "'.$show.'" and parent=0');
12           if (
is_null($component)) {
13               throw new 
MKLib_HttpException();
14           }
15   
16           
$this->view->headTitle('Eve - '.$component->name);
17           
$this->view->headTitle('Planetary interaction (PI)');
18           
$this->view->headMeta('Eve '.$component->name.' schema description. Resources and commodities involved in it\'s production''description');
19           
$this->view->headMeta('Eve online, '.$component->name.', planetary interaction, pi''keywords');
20   
21           
//Get components, needed for scheme
22           
$components $modelComp->getNeededComponents($component->id);
23           foreach (
$components as $comp) {
24               
$ids[] = $comp['name'];
25               
$idsStr[] = '"'.$comp['name'].'"';
26           }
27   
28           
//Get all available planetary materials
29           
$materialsRes $modelMat->getMaterials();
30           
$allMaterials = array();
31           foreach (
$materialsRes as $material) {
32               
$materials[$material['name']] = array();
33           }
34   
35           
//Get list of planets, needed to extract materials for selected scheme
36           
$planets $modelMat->fetchAll('name IN ('.implode(','$idsStr).')');
37           
$allPlanets $modelPlanets->fetchAll()->toArray();
38   
39           foreach (
$planets as $planet) {
40               
$materials[$planet['name']][] = $planet['planet'];
41           }
42   
43           
$this->view->componet $show;
44           
$this->view->allPlanets $allPlanets;
45           
$this->view->materialsWithPlanets $materials;
46       }
47   
48       
/**
49        * Show price history for single component
50        *
51        */
52       
public function priceAction()
53       {
54           
$show $this->_getParam('show');
55           
$modelComp = new Eve_Model_Components();
56           
$modelPrices = new Eve_Model_Prices();
57   
58           
$hubs $modelPrices->getTradeHubs();
59           
$hubsString '';
60           foreach (
$hubs as $hub) {
61               
$hubsString .= ' '.$hub['solarSystemName'];
62           }
63           
$component $modelComp->fetchRow('name = "'.$show.'" and parent=0');
64   
65           
$this->view->headTitle($component->name);
66           
$this->view->headTitle('Eve online - Prices on '.$component->name.' in '.$hubsString);
67   
68           
$this->view->component $component;
69       }
70   }
Stack trace
  1. 513/var/www/eveplanets/data/www/eveplanets.com/code/library/Zend/Controller/Action.php
    Eve_ComponentsController->indexAction()
  2. 295/var/www/eveplanets/data/www/eveplanets.com/code/library/Zend/Controller/Dispatcher/Standard.php
    Zend_Controller_Action->dispatch('indexAction')
  3. 954/var/www/eveplanets/data/www/eveplanets.com/code/library/Zend/Controller/Front.php
    Zend_Controller_Dispatcher_Standard->dispatch(Zend_Controller_Request_Http, Zend_Controller_Response_Http)
  4. 97/var/www/eveplanets/data/www/eveplanets.com/code/library/Zend/Application/Bootstrap/Bootstrap.php
    Zend_Controller_Front->dispatch()
  5. 366/var/www/eveplanets/data/www/eveplanets.com/code/library/Zend/Application.php
    Zend_Application_Bootstrap_Bootstrap->run()
  6. 36/var/www/eveplanets/data/www/eveplanets.com/index.php
    Zend_Application->run()