Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function getsettings()
- {
- $db = new DBDS(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
- $query = $db->query("SELECT t1.value\n\t\t\t\t\t\tFROM `" . DB_PREFIX . "setting` t1\n\t\t\t\t\t\tWHERE t1.group = 'dsfirewall'\n\t\t\t\t\t\tAND t1.key = 'dsfirewall_module'\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t");
- if (isset($query->rows[0])) {
- $setting_ = unserialize($query->row["value"]);
- }
- if (isset($setting_[1])) {
- $setting = $setting_[1];
- }
- else {
- echo "</br></br><center><p>Module <b>DS firewall </b> - not installed but still connected!</p>";
- echo "</br></br><center><p>Module <b>DS firewall </b> - not installed but still connected!</p><p>Please comment out or remove the line in <b>.htaccess</b> or in <b>PHP.INI</b> code:</p><p>Модуль<b>DS firewall</b> - не установлен но подключен!</p><p>Пожалуйста закомментируйте или удалите строки в файле <b>.htaccess</b> или в <b>PHP.INI</b> код:</p> </br>
- <p>##DS Firewall##</p>
- <p>php_value auto_prepend_file .....</p>
- <p>##DS Firewall##</p></center>
- ";
- return "exit";
- }
- return $setting;
- }
- function setlog($type, $ip, $log)
- {
- $db = new DBDS(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
- $query = $db->query("INSERT IGNORE INTO `" . DB_PREFIX . "ds_firewire_incidents_log` (`idsecurity`,`ip`,`security_info`)\n\t\t\t\t\t\t\t\t\t\t VALUES (" . $type . ",'$ip','$log')");
- }
- function firewall_unset_globals()
- {
- if (ini_get("register_globals")) {
- $allow = array("_ENV" => 1, "_GET" => 1, "_POST" => 1, "_COOKIE" => 1, "_FILES" => 1, "_SERVER" => 1, "_REQUEST" => 1, "GLOBALS" => 1);
- foreach ($GLOBALS as $key => $value ) {
- if (!isset($allow[$key])) {
- unset($GLOBALS[$key]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement