fork download
  1. <?php
  2. require_once('config.php');
  3.  
  4. $html = '';
  5. $page = $_GET['page'];
  6. $rowsPerPage = NUM_ITEMS_BY_PAGE;
  7. $offset = ($page - 1) * $rowsPerPage;
  8. sleep(1);
  9.  
  10. $result = $connexion->query(
  11. 'SELECT * FROM ps_product p
  12. LEFT JOIN ps_product_lang pl ON (pl.id_product = p.id_product AND pl.id_lang = 1)
  13. LEFT JOIN `ps_image` i ON (i.id_product = p.id_product AND cover = 1)
  14. WHERE active = 1
  15. ORDER BY date_upd DESC LIMIT '.$offset.', '.$rowsPerPage
  16. );
  17. if ($result->num_rows > 0) {
  18. while ($row = $result->fetch_assoc()) {
  19. $html .= '<li class="col-lg-4">';
  20. $html .= '<div class="item">';
  21. $html .= '<img class="img-fluid mx-auto d-block" src="https://w...content-available-to-author-only...r.com/modulos-prestashop/'.$row['id_image'].'-home_default/'.$row['link_rewrite'].'.jpg" width="100" height="100" />';
  22. $html .= '<h3>'.utf8_encode($row['name']).'</h3>';
  23. $html .= '<p class="description_short">'.strip_tags(utf8_encode($row['description_short'])).'</p>';
  24. $html .= '<p class="price">'.round($row['price'], 2).' EUR</p>';
  25. $html .= '<p><a class="btn btn-primary link_rewrite mx-auto d-block" href="https://w...content-available-to-author-only...r.com/modulos-prestashop/es/'.$row['id_product'].'-'.$row['link_rewrite'].'.html" target="_blank"><i class="fa fa-eye"></i> Ver</a></p>';
  26. $html .= '</div>';
  27. $html .= '</li>';
  28. }
  29. }
  30.  
  31. echo $html;
  32. ?>
Runtime error #stdin #stdout #stderr 0.01s 82560KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  require_once(config.php): failed to open stream: No such file or directory in /home/wxQnfR/prog.php on line 2
PHP Fatal error:  require_once(): Failed opening required 'config.php' (include_path='.:/usr/share/php') in /home/wxQnfR/prog.php on line 2