• FICHEIRO: /home2/nsomed/library/Zend/Db/Statement/Pdo.php
  • LINHA:    235
  • MENSAGEM: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND catalogo_tipo_pt.activo = 1 AND catalogo_produto_pt.marca_id != 0 AND (ca...' at line 1, query was: SELECT DISTINCT COUNT(catalogo_produto_pt.id) AS total, catalogo_tipo_pt.id AS idFilter, catalogo_tipo_pt.titulo FROM catalogo_produto_pt INNER JOIN catalogo_tipo_pt ON catalogo_tipo_pt.id = catalogo_produto_pt.tipo_primario_id WHERE catalogo_produto_pt.categoria_id = AND catalogo_tipo_pt.activo = 1 AND catalogo_produto_pt.marca_id != 0 AND (catalogo_produto_pt.tipo_primario_id != 0 OR catalogo_produto_pt.tipo_secundario_id != 0) AND catalogo_produto_pt.cor != "" AND catalogo_produto_pt.tamanho != "" AND catalogo_produto_pt.imagem != "" AND catalogo_produto_pt.activo = 1 GROUP BY catalogo_tipo_pt.titulo ORDER BY catalogo_tipo_pt.titulo ASC
  •  231.             }
  •  232.         } catch (PDOException $e) {
  •  233.             require_once 'Zend/Db/Statement/Exception.php';
  •  234.             $message = sprintf('%s, query was: %s', $e->getMessage(), $this->_stmt->queryString);
  •  235.             throw new Zend_Db_Statement_Exception($message, (int) $e->getCode(), $e);
  •  236.         }
  •  237.     }
  •  238.
  •  239.     /**
  •  240.      * Fetches a row from the result set.

  • FICHEIRO: /home2/nsomed/library/Zend/Db/Statement.php
  • LINHA:    303
  •  299.         /*
  •  300.          * Simple case - no query profiler to manage.
  •  301.          */
  •  302.         if ($this->_queryId === null) {
  •  303.             return $this->_execute($params);
  •  304.         }
  •  305.
  •  306.         /*
  •  307.          * Do the same thing, but with query profiler
  •  308.          * management before and after the execute.

  • FICHEIRO: /home2/nsomed/library/Zend/Db/Adapter/Abstract.php
  • LINHA:    480
  •  476.         }
  •  477.
  •  478.         // prepare and execute the statement with profiling
  •  479.         $stmt = $this->prepare($sql);
  •  480.         $stmt->execute($bind);
  •  481.
  •  482.         // return the results embedded in the prepared statement object
  •  483.         $stmt->setFetchMode($this->_fetchMode);
  •  484.         return $stmt;
  •  485.     }

  • FICHEIRO: /home2/nsomed/library/Zend/Db/Adapter/Pdo/Abstract.php
  • LINHA:    238
  •  234.             }
  •  235.         }
  •  236.
  •  237.         try {
  •  238.             return parent::query($sql, $bind);
  •  239.         } catch (PDOException $e) {
  •  240.             /**
  •  241.              * @see Zend_Db_Statement_Exception
  •  242.              */
  •  243.             require_once 'Zend/Db/Statement/Exception.php';

  • FICHEIRO: /home2/nsomed/library/Zend/Db/Adapter/Abstract.php
  • LINHA:    737
  •  733.     {
  •  734.         if ($fetchMode === null) {
  •  735.             $fetchMode = $this->_fetchMode;
  •  736.         }
  •  737.         $stmt = $this->query($sql, $bind);
  •  738.         $result = $stmt->fetchAll($fetchMode);
  •  739.         return $result;
  •  740.     }
  •  741.
  •  742.     /**

  • FICHEIRO: /home2/nsomed/application/Catalogo/Controller.php
  • LINHA:    749
  •  745.                         $custom_query .= ' ORDER BY ' . $this->_tipoModel->getTableName() . '.titulo ASC';
  •  746.                         
  •  747.                     }
  •  748.
  •  749.                     $this->view->result = json_decode(json_encode($db->fetchAll($custom_query)));
  •  750.                     $this->view->filter = 'tipo';
  •  751.                     $this->view->filterTitle = translate('GĂ©nero');
  •  752.                     //$this->view->filterSelected = $this->_getParam('id');
  •  753.                     $this->view->filterSelected = ($this->_getParam('id')) ? explode('-', $this->_getParam('id')) : null;
  •  754.                     $this->view->buttonDropdown = false;

  • FICHEIRO: /home2/nsomed/library/Goweb/Controller/Action.php
  • LINHA:    276
  •  272.                  */
  •  273.                 /*if ($this->getInvokeArg('useCaseSensitiveActions')) {
  •  274.                     trigger_error('Using case sensitive actions without word separators is deprecated; please do not rely on this "feature"');
  •  275.                 }*/
  •  276.                 $this->$action();
  •  277.             } else {
  •  278.                 $this->__call($action, array());
  •  279.             }
  •  280.             $this->postDispatch();
  •  281.         }

  • FICHEIRO: /home2/nsomed/library/Zend/Controller/Dispatcher/Standard.php
  • LINHA:    308
  •  304.             ob_start();
  •  305.         }
  •  306.
  •  307.         try {
  •  308.             $controller->dispatch($action);
  •  309.         } catch (Exception $e) {
  •  310.             // Clean output buffer on error
  •  311.             $curObLevel = ob_get_level();
  •  312.             if ($curObLevel > $obLevel) {
  •  313.                 do {

  • FICHEIRO: /home2/nsomed/library/Zend/View/Helper/Action.php
  • LINHA:    135
  •  131.                       ->setControllerName($controller)
  •  132.                       ->setActionName($action)
  •  133.                       ->setDispatched(true);
  •  134.
  •  135.         $this->dispatcher->dispatch($this->request, $this->response);
  •  136.
  •  137.         // reset the viewRenderer object to it's original state
  •  138.         Zend_Controller_Action_HelperBroker::addHelper($viewRendererObj);
  •  139.
  •  140.

  • FICHEIRO: /home2/nsomed/library/Goweb/View/Helper/Component.php
  • LINHA:    56
  •  52.         $params['directRequest'] = false;
  •  53.
  •  54.         //$controllerName = $this->_formatControllerName($controller);
  •  55.         //$actionName = $this->_formatActionName($action);
  •  56.         $return = $this->action($action, $controller, null, $params);
  •  57.         //goweb::dump($return);
  •  58.         //exit();
  •  59.         return $return;
  •  60.     }
  •  61. }

  • FICHEIRO: /home2/nsomed/library/Zend/View/Abstract.php
  • LINHA:    350
  •  346.         // call the helper method
  •  347.         return call_user_func_array(
  •  348.             array($helper, $name),
  •  349.             $args
  •  350.         );
  •  351.     }
  •  352.
  •  353.     /**
  •  354.      * Given a base path, sets the script, helper, and filter paths relative to it
  •  355.      *

  • FICHEIRO: /home2/nsomed/views/Catalogo/list.tpl
  • LINHA:    16
  •  12.             <div class="col-xs-12 col-md-3">
  •  13.                 <button type="button" role="button" class="products__sidebar-btn js-products__sidebar-btn"><?php echo translate('Filtrar Produtos'); ?></button>
  •  14.                 <div class="products__sidebar js-products__sidebar">
  •  15.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/vto/id/' . $vtoSelected); ?></div>
  •  16.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/tipo/id/' . $tipoSelected); ?></div>
  •  17.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/marca/id/' . $marcaSelected); ?></div>
  •  18.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/entrega/id/' . $entregaSelected); ?></div>
  •  19.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/condicao/id/' . $condicaoSelected); ?></div>
  •  20.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/forma/id/' . $formaSelected); ?></div>
  •  21.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/material/id/' . $materialSelected); ?></div>

  • FICHEIRO: /home2/nsomed/views/Catalogo/list.tpl
  • LINHA:    16
  •  12.             <div class="col-xs-12 col-md-3">
  •  13.                 <button type="button" role="button" class="products__sidebar-btn js-products__sidebar-btn"><?php echo translate('Filtrar Produtos'); ?></button>
  •  14.                 <div class="products__sidebar js-products__sidebar">
  •  15.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/vto/id/' . $vtoSelected); ?></div>
  •  16.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/tipo/id/' . $tipoSelected); ?></div>
  •  17.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/marca/id/' . $marcaSelected); ?></div>
  •  18.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/entrega/id/' . $entregaSelected); ?></div>
  •  19.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/condicao/id/' . $condicaoSelected); ?></div>
  •  20.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/forma/id/' . $formaSelected); ?></div>
  •  21.                     <div class="products__filters"><?php echo $this->component('/catalogo/productFilter/categoria_id/' . $categoria_id . '/filter/material/id/' . $materialSelected); ?></div>

  • FICHEIRO: /home2/nsomed/library/Goweb/View.php
  • LINHA:    49
  •  45.         extract(get_object_vars($this));
  •  46.         if ($this->_useViewStream && $this->useStreamWrapper()) {
  •  47.             include 'zend.view://' . func_get_arg(0);
  •  48.         } else {
  •  49.             include func_get_arg(0);
  •  50.         }
  •  51.     }
  •  52.
  •  53.     /**
  •  54.      * Escapes a value for output in a view script.

  • FICHEIRO: /home2/nsomed/library/Zend/View/Abstract.php
  • LINHA:    888
  •  884.         $this->_file = $this->_script($name);
  •  885.         unset($name); // remove $name from local scope
  •  886.
  •  887.         ob_start();
  •  888.         $this->_run($this->_file);
  •  889.
  •  890.         return $this->_filter(ob_get_clean()); // filter output
  •  891.     }
  •  892.
  •  893.     /**

  • FICHEIRO: /home2/nsomed/application/Cms/GenericController.php
  • LINHA:    2256
  •  2252.         $session = Goweb::registry('session');
  •  2253.         $view->id = $session->lastId;
  •  2254.         $view->titulo = $titulo;
  •  2255.         $view->extraParams = $extraParams;
  •  2256.         $view->output = $view->render($template);
  •  2257.         $view->setViewsPath(VIEWS_PATH);
  •  2258.         if ($print)
  •  2259.             $canal = 'print.tpl';
  •  2260.         $viewRenderer->setRender(str_replace('.' . $viewRenderer->getViewSuffix(), '', $canal));
  •  2261.     }

  • FICHEIRO: /home2/nsomed/application/Catalogo/Controller.php
  • LINHA:    685
  •  681.                                         'list.tpl',
  •  682.                                         'Catalogo',
  •  683.                                         'catalogo-list',
  •  684.             translate('Produtos'),
  •  685.             $this->_getParam('print'));
  •  686.             $this->_helper->viewRenderer->setRender($this->_canal);
  •  687.         } else {
  •  688.             $this->_helper->viewRenderer->setRender('list');
  •  689.         }
  •  690.     }

  • FICHEIRO: /home2/nsomed/application/Catalogo/Controller.php
  • LINHA:    271
  •  267.             } else {
  •  268.                 return $this->listProdutosAction();
  •  269.             }
  •  270.         } else {
  •  271.             return $this->listProdutosAction();
  •  272.         }
  •  273.     }
  •  274.     
  •  275.     /**
  •  276.      * Listagem das categorias

  • FICHEIRO: /home2/nsomed/library/Goweb/Controller/Action.php
  • LINHA:    276
  •  272.                  */
  •  273.                 /*if ($this->getInvokeArg('useCaseSensitiveActions')) {
  •  274.                     trigger_error('Using case sensitive actions without word separators is deprecated; please do not rely on this "feature"');
  •  275.                 }*/
  •  276.                 $this->$action();
  •  277.             } else {
  •  278.                 $this->__call($action, array());
  •  279.             }
  •  280.             $this->postDispatch();
  •  281.         }

  • FICHEIRO: /home2/nsomed/library/Zend/Controller/Dispatcher/Standard.php
  • LINHA:    308
  •  304.             ob_start();
  •  305.         }
  •  306.
  •  307.         try {
  •  308.             $controller->dispatch($action);
  •  309.         } catch (Exception $e) {
  •  310.             // Clean output buffer on error
  •  311.             $curObLevel = ob_get_level();
  •  312.             if ($curObLevel > $obLevel) {
  •  313.                 do {

  • FICHEIRO: /home2/nsomed/library/Zend/Controller/Front.php
  • LINHA:    954
  •  950.                 /**
  •  951.                  * Dispatch request
  •  952.                  */
  •  953.                 try {
  •  954.                     $dispatcher->dispatch($this->_request, $this->_response);
  •  955.                 } catch (Exception $e) {
  •  956.                     if ($this->throwExceptions()) {
  •  957.                         throw $e;
  •  958.                     }
  •  959.                     $this->_response->setException($e);

  • FICHEIRO: /home2/nsomed/library/Goweb/Application.php
  • LINHA:    449
  •  445.     }
  •  446.
  •  447.     public function runApp(){
  •  448.         $frontController = Zend_Controller_Front::getInstance();
  •  449.         $frontController->dispatch();
  •  450.     }
  •  451. }

  • FICHEIRO: /home2/nsomed/public_html/index.php
  • LINHA:    54
  •  50. $application->initPainel();
  •  51. $lang = isset($_GET['lang']) ? $_GET['lang'] : null;
  •  52. $application->initLanguage($lang, true, false);
  •  53. $application->initLanguageAdmin($lang, true, true);
  •  54. $application->runApp();
  •  55.
  •  56.
  •  57. /**
  •  58.  * Efectua a traducao de uma string.
  •  59.  */