print_sec_img.php 726 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /*
  3. * This file is part of GBook - PHP Guestbook.
  4. *
  5. * (c) Copyright 2016 by Klemen Stirn. All rights reserved.
  6. * http://www.phpjunkyard.com
  7. * http://www.phpjunkyard.com/php-guestbook-script.php
  8. *
  9. * For the full copyright and license agreement information, please view
  10. * the docs/index.html file that was distributed with this source code.
  11. */
  12. session_name('GBOOK');
  13. session_start();
  14. define('IN_SCRIPT',true);
  15. if (empty($_SESSION['secnum']) || strlen($_SESSION['secnum']) != 5) {
  16. die('Invalid or missing security number');
  17. }
  18. require('settings.php');
  19. require('secimg.inc.php');
  20. $sc=new PJ_SecurityImage($settings['filter_sum']);
  21. $sc->printImage(intval($_SESSION['secnum']));
  22. exit;