break;
                }
            }
            //ajaxrequestHide("'.$arrTag.'", "'.$tagID.'); return false;"
            $count++;
        }
        if (isset($_SESSION['login_user']) and ($tagID == 'max-rec2' or $tagID == 'max-rec4')) {
            $count++;
        }
        while ($count < 10) {
            $preview .= '<svg width="20" height="20" style="padding-top:5px;margin-right:10px"><rect width="20" height="20" style="fill:' . $colors_second[0] . ';stroke-width:none;stroke:rgb(0,0,0)"/></svg><div style="text-align:left; white-space: nowrap; display:inline;">  Empty result</div></br>';
            $count++;
        }
        $finalresult .= $preview . '</div>';
        echo $finalresult;
    } else {
        echo "0 results";
    }
    //Delete the created view
    $queryViewDelete = 'DROP VIEW ' . $viewName;
    $conn->query($queryViewDelete);
}
if (isset($_POST['tagID']) && isset($_POST['tfq']) && isset($_POST['strUser']) && isset($_POST['answer'])) {
    $tagID = strip_tags($_POST['tagID']);
    $tfq = strip_tags($_POST['tfq']);
    $strUser = strip_tags($_POST['strUser']);
    $answer = strip_tags($_POST['answer']);
    recommendation($conn, $strUser, $tagID, $tfq, $answer);
}
//Close connection
$conn->close();
Esempio n. 2
0
}
requirement(function_exists('mb_strlen'), 'Install and enable the <strong>mbstring</strong> extension.');
requirement(function_exists('iconv'), 'Install and enable the <strong>iconv</strong> extension.');
requirement(class_exists('PDO'), 'Install <strong>PDO</strong>.');
if (class_exists('PDO')) {
    $drivers = PDO::getAvailableDrivers();
    requirement(count($drivers), 'Install <strong>PDO drivers</strong>.');
}
/* optional recommendations follow */
requirement(!ini_get('magic_quotes_gpc'), 'Parameter magic_quotes_gpc must be Off in php.ini.');
recommendation(!extension_loaded('xdebug'), 'Disable XDebug on production for performance.');
recommendation(class_exists('Locale'), 'Install and enable the <strong>intl</strong> extension.');
recommendation(version_compare(INSTALLED_PHP_VERSION, '5.4.0', '!='), 'You should not use PHP 5.4.0 due to the PHP bug #61453.');
recommendation(version_compare(INSTALLED_PHP_VERSION, '5.4.11', '>=') || version_compare(INSTALLED_PHP_VERSION, '5.4.0', '<'), 'You should have at least PHP 5.4.11 due to PHP bug #63379.');
$accelerator = extension_loaded('eaccelerator') && ini_get('eaccelerator.enable') || extension_loaded('apc') && ini_get('apc.enabled') || extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable') || extension_loaded('Zend OPcache') && ini_get('opcache.enable') || extension_loaded('xcache') && ini_get('xcache.cacher') || extension_loaded('wincache') && ini_get('wincache.ocenabled');
recommendation($accelerator, 'Install and enable a <strong>PHP accelerator</strong> like APC (highly recommended).');
// Finish
if (Count::$requirements == 0) {
    $configFile = OPEN_DIR . '/config.php';
    if (!file_exists($configFile)) {
        file_put_contents($configFile, '<?php return array();');
    }
    if (Count::$recommendation == 0) {
        echo "<div class='done'>Everything is OK, you can continue with the installation.</div>";
    }
    echo <<<HTML
    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script>
    \$.getJSON("../install/check.js").fail(function () {
        \$('#server_check').show();
    });