/**
  * Check input, strip slashes etc. set alert, if input is not ok.
  *
  * @return	boolean		Input ok, true/false
  */
 function checkInput()
 {
     global $lng;
     $_POST[$this->getPostVar()] = ilUtil::stripSlashes($_POST[$this->getPostVar()]);
     if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == "") {
         $this->setAlert($lng->txt("msg_input_is_required"));
         return false;
     }
     include_once "./Services/Captcha/classes/class.ilSecurImage.php";
     $si = new ilSecurImage();
     if (!$si->check($_POST[$this->getPostVar()])) {
         $this->setAlert($lng->txt("cptch_wrong_input"));
         return false;
     }
     return true;
 }
Пример #2
0
<?php

/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
chdir('../../../..');
require_once 'include/inc.header.php';
require_once 'Services/Captcha/classes/class.ilSecurImage.php';
$si = new ilSecurImage();
$si->outputAudioFile();
Пример #3
0
 /**
  * Check input, strip slashes etc. set alert, if input is not ok.
  * @return    boolean        Input ok, true/false
  */
 public function checkInput()
 {
     global $lng;
     $_POST[$this->getPostVar()] = ilUtil::stripSlashes($_POST[$this->getPostVar()]);
     if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == '') {
         if ($lng instanceof ilLanguage) {
             $this->setAlert($lng->txt('msg_input_is_required'));
         }
         return false;
     }
     include_once './Services/Captcha/classes/class.ilSecurImage.php';
     $si = new ilSecurImage();
     if (!$si->check($_POST[$this->getPostVar()])) {
         if ($lng instanceof ilLanguage) {
             $this->setAlert($lng->txt('cptch_wrong_input'));
         }
         return false;
     }
     return true;
 }
Пример #4
0
<?php

/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
chdir('../../../..');
require_once 'include/inc.header.php';
require_once 'Services/Captcha/classes/class.ilSecurImage.php';
$si = new ilSecurImage();
$si->setImageHeight((int) $_GET['height']);
$si->setImageWidth((int) $_GET['width']);
$si->showImage();
<?php

/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
chdir("../../../..");
include_once "./include/inc.header.php";
include_once "./Services/Captcha/classes/class.ilSecurImage.php";
$si = new ilSecurImage();
$si->showImage();