| Current Path : /home/sunflowe/www2/j15/components/com_easycaptcha/captchas/Dpaulus-Captcha/ |
| Current File : /home/sunflowe/www2/j15/components/com_easycaptcha/captchas/Dpaulus-Captcha/reload.php |
<?php
/**
* EasyCaptcha
* @version $Id: reload.php 545 2008-02-15 15:16:12Z snipersister $
* @package EasyCaptcha
* @license Released under the terms of the GNU General Public License (see LICENSE.php in the Joomla! root directory)
* @author EasyJoomla.org - Project
**/
defined('_JEXEC') or die('Restricted access');
function reloadCode($captcha)
{
$code = "<script type=\"text/javascript\">";
$code .= "function spamfixreload (id) {";
$code .= "var a= Math.floor(Math.random()*1000); ";
$code .= "var neuesbild = document.getElementById(id);";
$code .= "neuesbild.src = \"".JURI::base()."components/com_easycaptcha/captchas/$captcha->captcha_name/captcha.php?captcha_id=".$captcha->captcha_id."&reload=\"+a;}";
$code .= "</script>";
return $code;
}
function reloadButton($id, $image=null)
{
if($image)
{
$button = "<a href=\"javascript:spamfixreload('$id')\"><img src=\"$image\" title=\"".JTEXT::_('Regenerate Code')."\" alt=\"".JTEXT::_('Regenerate Code')."\" border=\"0\" /></a>";
}
else
{
$button = "<a href=\"javascript:spamfixreload('$id')\"><img src=\"".JURI::base()."components/com_easycaptcha/images/reload.gif\" title=\"".JTEXT::_('Regenerate Code')."\" alt=\"".JTEXT::_('Regenerate Code')."\" border=\"0\" /></a>";
}
return $button;
}
?>