forked from osolgithub/OSOLCaptcha4Joomla3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaptchaPreview.php
24 lines (22 loc) · 975 Bytes
/
captchaPreview.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
//http://osol1/pjtg/joomla25rets/public_html/plugins/system/osolcaptcha/captchaPreview.php?osolcaptcha_imageFunction=Adv&osolcaptcha_font_ttf=BookmanOldStyle.TTF&osolcaptcha_font_size=48&osolcaptcha_bgColor=%232c8007&osolcaptcha_textColor=%23ffffff&white_noise_density=.2&black_noise_density=.2&osolcaptcha_symbolsToUse=ABCDEFGHJKLMNPQRSTWXYZ23456789
$adminIndexRelativePath = "/../../../administrator/index.php";
$adminIndexpath = realpath(dirname(__FILE__)).$adminIndexRelativePath;
//die($adminIndexpath);
ob_start();
require_once($adminIndexpath);
$user = JFactory::getUser();
$isAdmin = $user->get('isRoot');
ob_end_clean();
if ($isAdmin) {
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'OSOLmulticaptcha.php');
$captcha = new OSOLmulticaptcha();
$captcha->displayCaptcha();
}
else
{
//die(JURI::base()."/..".$adminIndexRelativePath);
header("location:".JURI::base()."/..".$adminIndexRelativePath);
}
//ob_end_flush();
?>