You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1SELECT id_image as id, iw as "width", ih as "height" FROM `ps_image` WHERE id_image = default
at line 791 in file classes/db/Db.php
786. if ($webservice_call && $errno) {
787. $dbg = debug_backtrace();
788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790. if ($sql) {
791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792. }
793.
794. throw new PrestaShopDatabaseException($this->getMsgError());
795. }
796. }
420. $this->result = $this->_query($sql);
421. }
422. }
423.
424. if (_PS_DEBUG_SQL_) {
425. $this->displayError($sql);
426. }
427.
428. return $this->result;
429. }
430.
Argument [0] SELECT id_image as id, iw as "width", ih as "height" FROM `ps_image` WHERE id_image = default
638. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
639. }
640. return $this->execute($sql, $use_cache);
641. }
642.
643. $this->result = $this->query($sql);
644.
645. if (!$this->result) {
646. $result = false;
647. } else {
648. if (!$array) {
Argument [0] SELECT id_image as id, iw as "width", ih as "height" FROM `ps_image` WHERE id_image = default
768. return true;
769. }
770.
771. public static function getRealSize($val) {
772. $id_image = explode('-', $val);
773. $res = Db::getInstance()->executeS('SELECT id_image as id, iw as "width", ih as "height" FROM `'._DB_PREFIX_.'image` WHERE id_image = '.$id_image[1]);
774. return ($res && isset($res[0]) ? $res[0] : '');
775. }
776.
777. /**
778. * Try to create and delete some folders to check if moving images to new file system will be possible
Argument [0] SELECT id_image as id, iw as "width", ih as "height" FROM `ps_image` WHERE id_image = default
100. $_from = $_smarty_tpl->tpl_vars['category']->value['products']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
101. foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value) {
102. $_smarty_tpl->tpl_vars['product']->_loop = true;
103. ?>
104. <?php ob_start();?><?php echo $_smarty_tpl->tpl_vars['product']->value['id_image'];?>
105. <?php $_tmp4=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['img'] = new Smarty_variable(Image::getRealSize($_tmp4), null, 0);?>
106. <a rel="nofollow" class="item withImage" data-aspect-ratio="<?php echo $_smarty_tpl->tpl_vars['img']->value['width']/$_smarty_tpl->tpl_vars['img']->value['height'];?>
107. " href="<?php echo $_smarty_tpl->tpl_vars['link']->value->getProductLink($_smarty_tpl->tpl_vars['product']->value['id_product'],$_smarty_tpl->tpl_vars['product']->value['link_rewrite'],$_smarty_tpl->tpl_vars['product']->value['category'],$_smarty_tpl->tpl_vars['product']->value['ean13']);?>
108. " width="<?php echo $_smarty_tpl->tpl_vars['img']->value['width'];?>
109. " height="<?php echo $_smarty_tpl->tpl_vars['img']->value['height'];?>
110. " style="background-color: rgb(240, 157, 91); background-image: url(<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getImageLink($_smarty_tpl->tpl_vars['product']->value['link_rewrite'],$_smarty_tpl->tpl_vars['product']->value['id_image'],'right_col_300'), ENT_QUOTES, 'UTF-8', true);?>
Argument [0] ru-default
183. }
184. array_unshift($_template->_capture_stack, array());
185. //
186. // render compiled template
187. //
188. $_template->properties['unifunc']($_template);
189. // any unclosed {capture} tags ?
190. if (isset($_template->_capture_stack[0][0])) {
191. $_template->capture_error();
192. }
193. array_shift($_template->_capture_stack);
Argument [0]
312. $this->smarty->update_filepath($filepath, $this->template_resource, $this->cache_id, $this->compile_id);
313. }
314. }
315. return $tpl;
316. } else {
317. return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
318. }
319. }
320. }
Argument [0] Argument [1] Argument [2] Argument [3] Argument [4] Argument [5] 1 Argument [6]
2304.
2305. if ($cache_id !== null) {
2306. Tools::enableCache();
2307. }
2308.
2309. $result = $this->getCurrentSubTemplate($template, $cache_id, $compile_id)->fetch();
2310.
2311. if ($cache_id !== null) {
2312. Tools::restoreCacheSettings();
2313. }
2314.
216. 'ProdDisplayPrice' => Configuration::get('PRODUCTSCATEGORY_DISPLAY_PRICE')
217. )
218. );
219. }
220.
221. return $this->display(__FILE__, 'productscategory.tpl', $this->getCacheId($cache_id));
222. }
223.
224. public function hookHeader($params)
225. {
226. if (!isset($this->context->controller->php_self) || $this->context->controller->php_self != 'product')
Argument [0] /var/www/www-root/data/www/minecrafter.top/modules/productscategory/productscategory.php Argument [1] productscategory.tpl Argument [2] productscategory|1361|455|1|1|1|177
586. }
587. }
588.
589. // Immediately return the result if we do not log performances
590. if (!Module::$_log_modules_perfs) {
591. return $module->{$method}($params);
592. }
593.
594. // Store time and memory before and after hook call and save the result in the database
595. $time_start = microtime(true);
596. $memory_start = memory_get_usage(true);
Argument [0]
543.
544. // Call hook method
545. if ($hook_callable) {
546. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);
547. } elseif ($hook_retro_callable) {
548. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);
549. }
550.
551. // Live edit
552. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
553. && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'
Argument [0] Argument [1] hookproductfooter Argument [2]
722. 'id_category_parent' => (int)$this->category->id_parent,
723. 'return_category_name' => Tools::safeOutput($this->category->getFieldByLang('name')),
724. 'categories' => Category::getHomeCategories($this->context->language->id, true, (int)$this->context->shop->id)
725. ));
726. }
727. $this->context->smarty->assign(array('HOOK_PRODUCT_FOOTER' => Hook::exec('displayFooterProduct', array('product' => $this->product, 'category' => $this->category))));
728. }
729.
730. protected function transformDescriptionWithImg($desc)
731. {
732. $reg = '/\[img\-([0-9]+)\-(left|right)\-([a-zA-Z0-9-_]+)\]/';
Argument [0] displayFooterProduct Argument [1]
225. }
226. }
227. }
228.
229. // Assign template vars related to the category + execute hooks related to the category
230. $this->assignCategory();
231. // Assign template vars related to the price and tax
232. $this->assignPriceAndTax();
233.
234. // Assign template vars related to the images
235. $this->assignImages();
8.
9. $this->context->smarty->assign(array(
10. 'prev_product'=> $adjacent_products['previous'],
11. 'next_product'=> $adjacent_products['next']
12. ));
13. parent::initContent();
14. }
15. }
16. ?>
184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
185. $this->initHeader();
186. }
187.
188. if ($this->viewAccess()) {
189. $this->initContent();
190. } else {
191. $this->errors[] = Tools::displayError('Access denied.');
192. }
193.
194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();