File manager - Edit - /home/u970520068/domains/kbhcrazygames.com/public_html/static/img/logo/functions.tar
Back
login.php 0000666 00000002144 15027250605 0006374 0 ustar 00 <?php session_start(); include "config.php"; // include '../../config.php'; include '../../app/includes/constant.php'; include "../../app/includes/app_start.php"; // Login Actions For Admin Panel if (isset($_POST['login'])) { $email_username = mysqli_real_escape_string($con, $_POST['username_email']); $password = mysqli_real_escape_string($con, $_POST['password']); $query = "select * from zon_users where username='$email_username' && password='$password'"; $row = mysqli_fetch_assoc(mysqli_query($con, $query)); if (mysqli_num_rows(mysqli_query($con, $query)) !== 0) { if ($row['is_admin'] == 1) { if ($row['status'] == 0) { $_SESSION['admin-Loggedin'] = true; @header("Location: ../"); } else { @header("Location: ../login.php?error=Your account is closed"); } } else { @header("Location: ../login.php?error=Wrong username and password"); } } else { @header("Location: ../login.php?error=Wrong username and password"); } } api.php 0000666 00000021402 15027250605 0006033 0 ustar 00 <?php // session_start(); require_once 'config.php'; require_once '../../app/includes/constant.php'; require_once '../../app/includes/app_start.php'; // Game Adding From Api's if (isset($_POST) && isset($_POST['add_games_from_api']) && isset($_POST['platform'])) { $platform = $_POST['platform']; if ($platform == "gamemonetize") { $category = $_POST['category']; $type = $_POST['type']; $popularity = $_POST['popularity']; $company = $_POST['company']; $amount = $_POST['amount']; $url = "https://gamemonetize.com/rssfeed.php?format=json&category=$category&type=$type&popularity=$popularity$company$amount"; $json_data = file_get_contents($url); // Decode JSON into PHP array $response_data = json_decode($json_data, true); // All user data exists in 'data' object $game_data = $response_data; foreach ($game_data as $game) { $game_name = mysqli_real_escape_string($con, trim($game['title'])); $game_desc = mysqli_real_escape_string($con, $game['description']); $game_image_url = mysqli_real_escape_string($con, $game['thumb']); $game_frame_url = mysqli_real_escape_string($con, $game['url']); $game_category = mysqli_real_escape_string($con, $game['category']); $game_status = 0; $cate_slug = strtolower(makeSlug($game_category)); $game_slug = makeSlug($game_name); $sql = "INSERT INTO `zon_games`(`game_name`, `game_description`, `game_image_url`, `game_url`, `game_published`, `game_category`, `game_status`, `game_played`, `game_banner_url`, `game_slug`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0, '', '$game_slug')"; $cate_sql = "INSERT INTO `zon_category`(`name`, `slug`) VALUES ('$game_category', '$cate_slug')"; $check_game_name = "select * from zon_games where game_name='$game_name'"; if (!empty($game_image_url)) { if (mysqli_num_rows(mysqli_query($con, $check_game_name)) !== 0) { } else { if (mysqli_query($con, $sql)) { } } $check_category_name = "select * from zon_category where name='$game_category'"; if (mysqli_num_rows(mysqli_query($con, $check_category_name)) !== 0) { } else { if (mysqli_query($con, $cate_sql)) { $query_run = true; } } } } @header("location: ../"); } } if (isset($_POST) && isset($_POST['add_games_from_api']) && isset($_POST['platform'])) { $platform = $_POST['platform']; if ($platform == "gamedistribution") { $category = $_POST['categories']; $collection = $_POST['collection']; $tags = $_POST['tags']; $type = $_POST['type']; $subType = $_POST['subType']; $mobile = $_POST['mobile']; $rewarded = $_POST['rewarded']; $page = $_POST['page']; $amount = $_POST['amount']; $url = "https://catalog.api.gamedistribution.com/api/v2.0/rss/All/?collection=$collection&categories=$category&tags=$tags&subType=$subType&type=$type&mobile=$mobile&rewarded=$rewarded&amount=$amount&page=$page&format=json"; $json_data = file_get_contents($url); // Decode JSON into PHP array $response_data = json_decode($json_data, true); // All user data exists in 'data' object $game_data = $response_data; foreach ($game_data as $game) { $game_name = mysqli_real_escape_string($con, trim($game['Title'])); $game_desc = mysqli_real_escape_string($con, $game['Description']); $game_image_url = mysqli_real_escape_string($con, $game['Asset'][0]); $game_frame_url = mysqli_real_escape_string($con, $game['Url']); $game_category = mysqli_real_escape_string($con, $game['Category'][0]); $game_banner_url = ''; if (isset($game['Asset'][3])) { $game_banner_url = $game['Asset'][3]; } if (isset($game['Asset'][4])) { $game_banner_url = $game['Asset'][4]; } $game_status = 0; $cate_slug = strtolower(makeSlug($game_category)); $game_slug = makeSlug($game_name); $sql = "INSERT INTO `zon_games`(`game_name`, `game_description`, `game_image_url`, `game_url`, `game_published`, `game_category`, `game_status`, `game_played`, `game_banner_url`, `game_slug`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0, '$game_banner_url', '$game_slug')"; $cate_sql = "INSERT INTO `zon_category`(`name`, `slug`) VALUES ('$game_category', '$cate_slug')"; $check_game_name = "select * from zon_games where game_name='$game_name'"; if (!empty($game_image_url)) { if (mysqli_num_rows(mysqli_query($con, $check_game_name)) !== 0) { } else { if (mysqli_query($con, $sql)) { } } $check_category_name = "select * from zon_category where name='$game_category'"; if (mysqli_num_rows(mysqli_query($con, $check_category_name)) !== 0) { } else { if ($game_category !== '') { if (mysqli_query($con, $cate_sql)) { $query_run = true; } } } } } @header("location: ../"); } } if (isset($_POST) && isset($_POST['add_games_from_api']) && isset($_POST['platform'])) { $platform = $_POST['platform']; if ($platform == "gamepix") { $category = $_POST['category']; $order = $_POST['order']; $amount = $_POST['items']; $page = $_POST['page']; // Initiate curl session in a variable (resource) // $curl_handle = curl_init(); $url = "https://feeds.gamepix.com/v1/json?sid=" . $zon['config']['gamepix_sid'] . "&page=$page&pagination=$amount&category=$category"; if (!empty($order)) { $url = "https://feeds.gamepix.com/v1/json?sid=" . $zon['config']['gamepix_sid'] . "&page=$page&pagination=$amount&category=$category&order=$order"; } $json_data = file_get_contents($url); // Decode JSON into PHP array $response_data = json_decode($json_data, true); // All user data exists in 'data' object $game_data = $response_data['items']; foreach ($game_data as $game) { $game_name = mysqli_real_escape_string($con, trim($game['title'])); $game_desc = mysqli_real_escape_string($con, $game['description']); $game_image_url = mysqli_real_escape_string($con, $game['image']); $game_frame_url = mysqli_real_escape_string($con, $game['url']); $game_category = mysqli_real_escape_string($con, $game['category']); $game_banner_url = mysqli_real_escape_string($con, $game['banner_image']); $game_status = 0; $cate_slug = strtolower(makeSlug($game_category)); $game_slug = makeSlug($game_name); $sql = "INSERT INTO `zon_games`(`game_name`, `game_description`, `game_image_url`, `game_url`, `game_published`, `game_category`, `game_status`, `game_played`, `game_banner_url`, `game_slug`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0, '$game_banner_url', '$game_slug')"; $cate_sql = "INSERT INTO `zon_category`(`name`, `slug`) VALUES ('$game_category', '$cate_slug')"; $check_game_name = "select * from zon_games where game_name='$game_name'"; if (!empty($game_image_url)) { if (mysqli_num_rows(mysqli_query($con, $check_game_name)) !== 0) { } else { if (mysqli_query($con, $sql)) { } } $check_category_name = "select * from zon_category where name='$game_category'"; if (mysqli_num_rows(mysqli_query($con, $check_category_name)) !== 0) { } else { if ($game_category !== '') { if (mysqli_query($con, $cate_sql)) { $query_run = true; } } } } } @header("location: ../"); } } configuration.php 0000666 00000007716 15027250605 0010145 0 ustar 00 <?php // require_once '../../app/includes/function_general.php'; require_once '../../config.php'; require_once '../../app/includes/constant.php'; require_once '../../app/includes/app_start.php'; // $demo = "demo"; // if ($demo === $demo) { // header("Location: ../index.php"); // die(); // } // Secure Data function Secure_DATA($d) { global $socket; return htmlspecialchars(mysqli_real_escape_string($socket, $d)); } // Site Configuration Actions if (isset($_POST) && isset($_POST['site_info'])) { $site_name = Secure_DATA($_POST['site_name']); $profile_tagline = Secure_DATA($_POST['profile_tagline']); $head_code = mysqli_real_escape_string($con, $_POST['head_code']); $footer_content = mysqli_real_escape_string($con, $_POST['footer_content']); $site_title = Secure_DATA($_POST['site_title']); $site_desc = Secure_DATA($_POST['site_desc']); $site_keywords = Secure_DATA($_POST['site_keywords']); $games_title = Secure_DATA($_POST['games_title']); $games_desc = Secure_DATA($_POST['games_desc']); $play_title = Secure_DATA($_POST['play_title']); $play_desc = Secure_DATA($_POST['play_desc']); $profile_title = Secure_DATA($_POST['profile_title']); $profile_desc = Secure_DATA($_POST['profile_desc']); $category_title = Secure_DATA($_POST['category_title']); $category_desc = Secure_DATA($_POST['category_desc']); $u = ",`games_title`='$games_title',`games_desc`='$games_desc',`play_title`='$play_title',`play_desc`='$play_desc',`profile_title`='$profile_title',`profile_desc`='$profile_desc',`category_title`='$category_title',`category_desc`='$category_desc'"; $sql = "UPDATE zon_config set `site_name`='$site_name', `profile_tagline`='$profile_tagline', `head_code`='$head_code', `footer_content`='$footer_content', `site_title`='$site_title', `site_desc`='$site_desc', `site_keywords`='$site_keywords'"; if (isset($_FILES['logo']) && isset($_FILES) && $_FILES['logo']['error'] == 0) { $logo_name = rand(111111111, 999999999) . $_FILES['logo']['name']; $logo_tmp_name = $_FILES['logo']['tmp_name']; if (move_uploaded_file($logo_tmp_name, "../../static/img/logo/" . $logo_name)) { $logo_name = $logo_name; $sql = "UPDATE zon_config set `site_name`='$site_name', `profile_tagline`='$profile_tagline', `site_logo_light`='$logo_name', `head_code`='$head_code', `site_title`='$site_title', `site_desc`='$site_desc', `site_keywords`='$site_keywords'"; } } if (isset($_FILES['dark_logo']) && isset($_FILES) && $_FILES['dark_logo']['error'] == 0) { $dark_logo_name = rand(111111111, 999999999) . $_FILES['dark_logo']['name']; $dark_logo_tmp_name = $_FILES['dark_logo']['tmp_name']; if (move_uploaded_file($dark_logo_tmp_name, "../../static/img/logo/" . $dark_logo_name)) { $dark_logo_name = $dark_logo_name; $sql = "UPDATE zon_config set `site_name`='$site_name', `profile_tagline`='$profile_tagline', `site_logo_dark`='$dark_logo_name', `head_code`='$head_code', `site_title`='$site_title', `site_desc`='$site_desc', `site_keywords`='$site_keywords'"; } } if (isset($_FILES['favicon']) && isset($_FILES) && $_FILES['favicon']['error'] == 0) { $favicon_logo_name = rand(111111111, 999999999) . $_FILES['favicon']['name']; $favicon_logo_tmp_name = $_FILES['favicon']['tmp_name']; if (move_uploaded_file($favicon_logo_tmp_name, "../../static/img/logo/" . $favicon_logo_name)) { $favicon_logo_name = $favicon_logo_name; $sql = "UPDATE zon_config set `site_name`='$site_name', `profile_tagline`='$profile_tagline', `site_favicon`='$favicon_logo_name', `head_code`='$head_code', `site_title`='$site_title', `site_desc`='$site_desc', `site_keywords`='$site_keywords'"; } } $sql .= $u; if (mysqli_query($con, $sql)) { @header("location: ../settings.php"); } } config.php 0000666 00000000054 15027250605 0006527 0 ustar 00 <?php require_once('../../config.php'); ?>