2017-09-15 14:44:40 +03:00
|
|
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
2015-10-22 00:29:20 +03:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2020-03-11 12:10:59 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2020, Alex Tselegidis
|
2015-10-22 00:29:20 +03:00
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.0.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Captcha Controller
|
|
|
|
*
|
|
|
|
* @package Controllers
|
|
|
|
*/
|
|
|
|
class Captcha extends CI_Controller {
|
|
|
|
/**
|
|
|
|
* Class Constructor
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
public function __construct()
|
|
|
|
{
|
2015-10-22 00:29:20 +03:00
|
|
|
parent::__construct();
|
|
|
|
$this->load->library('session');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make a request to this method to get a captcha image.
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
public function index()
|
|
|
|
{
|
2015-10-22 00:29:20 +03:00
|
|
|
header('Content-type: image/jpeg');
|
|
|
|
$builder = new Gregwar\Captcha\CaptchaBuilder;
|
2016-01-01 21:34:42 +02:00
|
|
|
$builder->build();
|
2015-10-22 00:29:20 +03:00
|
|
|
$this->session->set_userdata('captcha_phrase', $builder->getPhrase());
|
2016-01-01 21:34:42 +02:00
|
|
|
$builder->output();
|
2015-10-22 00:29:20 +03:00
|
|
|
}
|
|
|
|
}
|