PageRenderTime 55ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/campsite/src/get_img.php

https://github.com/joechrysler/Campsite
PHP | 28 lines | 11 code | 4 blank | 13 comment | 0 complexity | 68db438130287085c009043db1a4ccf5 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, LGPL-2.1, Apache-2.0
  1. <?php
  2. /**
  3. * @package Campsite
  4. *
  5. * @author Holman Romero <holman.romero@gmail.com>
  6. * @copyright 2007 MDLF, Inc.
  7. * @license http://www.gnu.org/licenses/gpl.txt
  8. * @version $Revision$
  9. * @link http://www.sourcefabric.org
  10. */
  11. /**
  12. * Includes
  13. */
  14. $GLOBALS['g_campsiteDir'] = dirname(__FILE__);
  15. require_once($GLOBALS['g_campsiteDir'].'/template_engine/classes/CampRequest.php');
  16. require_once($GLOBALS['g_campsiteDir'].'/template_engine/classes/CampGetImage.php');
  17. // reads parameters from image link URI
  18. $articleNr = (int) CampRequest::GetVar('NrArticle', null, 'get');
  19. $imageNr = (int) CampRequest::GetVar('NrImage', null, 'get');
  20. $imageRatio = (int) CampRequest::GetVar('ImageRatio', null, 'get');
  21. $imageResizeWidth = (int) CampRequest::GetVar('ImageWidth', null, 'get');
  22. $imageResizeHeight = (int) CampRequest::GetVar('ImageHeight', null, 'get');
  23. $showImage = new CampGetImage($imageNr, $articleNr, $imageRatio, $imageResizeWidth, $imageResizeHeight);
  24. ?>