Пример #1
0
<?php

////////sweet captcha
require_once 'sweetcaptcha.php';
//////recaptcha stuff
require_once 'recaptchalib.php';
/////playtrecaptcha stuff
require_once "ayah.php";
require_once "DetectDevice.php";
$ayah = new AYAH();
////secure image stuff
require_once 'securimage.php';
if ($_SERVER['REQUEST_METHOD'] == "GET") {
    header('Content - type: application/text');
    $url = $_SERVER['QUERY_STRING'];
    $detect = new DetectDevice();
    $captcha = $detect->getSelctedCaptcha($url);
    if ($captcha == 'sweet') {
        echo $sweetcaptcha->get_html();
    } elseif ($captcha == 're') {
        //recaptcha
        $publickey = "6Lf3kAYTAAAAAGJpD5oRTiwMHDF2Enp5jjDCxOAh";
        $privatekey = "6Lf3kAYTAAAAAEMVCybX4IDJtl_uEpJKuQsPc8Q5";
        $recaptcha = recaptcha_get_html($publickey, null);
        echo '<input type="text" placeholder="Name" value="re" name="Captcha" disabled="" style="display: none;">';
        echo $recaptcha;
    } elseif ($captcha == 'playtrue') {
        ////playtruecaptcha stuff
        //$ayah = new AYAH();
        echo $ayah->getPublisherHTML();
    } elseif ($captcha == 'secureimage') {
Пример #2
0
Database::initialize(DATABASE_NAME);
// Make sure a connection to the database was created
if (!Database::$database) {
    // If we're installing the system, we acknowledge that errors with the database will exist.
    if (!$url[0] == "install") {
        die("There was an issue connecting to the database. Likely issues: wrong user/pass credentials or the table is missing.");
    }
}
/****** Setup Custom Error Handler ******/
require SYS_PATH . "/error-handler.php";
/****** Process Security Functions ******/
Security_Fingerprint::run();
/****** Metadata Handler ******/
Metadata::load();
/****** Identify the Device (1 = mobile, 2 = tablet, 3 = device) ******/
if (!isset($_SESSION['device'])) {
    $device = new DetectDevice();
    if ($device->isMobile()) {
        $_SESSION['device'] = 1;
    } else {
        if ($device->isTablet()) {
            $_SESSION['device'] = 2;
        } else {
            $_SESSION['device'] = 3;
        }
    }
}
// Load the routing system
require SYS_PATH . "/routes.php";
// If the routes.php file or dynamic URLs didn't load a page (and thus exit the scripts), run a 404 page.
require ROUTE_SECOND_PATH . "/404.php";