File manager - Edit - /home/u774251322/domains/quickyums.com/public_html/static/img/logo/admin.zip
Back
PK ��[b)��W W includes/sidebar.phpnu W+A�� <?php // session_start(); if (!isset($_SESSION['admin-Loggedin']) && !isset($_SESSION['is_admin_Loggedin'])) { @header("location: ../login"); // echo "<script>window.location.href='./login.php';</script>"; } ///include("config.php"); ?> <div class="sidebar sticky w-[350px] h-[100vh]"> <style> .sidebar { position: sticky; top: 0; } .colorpick-eyedropper-input-trigger { display: none; } /* .main { max-width: 400px !important; } */ body { max-width: 1000px; margin: auto; } .container { max-width: 1000px; margin: auto; } .sidebar a { white-space: nowrap; } </style> <!-- <div class="logo px-4 py-6"> --> <!-- <a href="<?php echo $site_url ?>"> <h3 class="fw-bold text-2xl dark:text-gray-100 text-center uppercase text-gray-600 "><?php echo Zon_Config('site_name') ?></h3> </a> --> <!-- </div> --> <?php $zon['page'][0] = explode("/", $_SERVER['PHP_SELF'])[2] ?? 'index.php'; ?> <ul class="list px-4 mt-2"> <li class=" <?php if($zon['page'][0] === 'index.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="index.php"><span class="bi-speedometer2 mr-2"></span> Dashboard</a></li> <li class=" <?php if($zon['page'][0] === 'games.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="games.php"><span class="bi-controller mr-2"></span> Games</a></li> <li class=" <?php if($zon['page'][0] === 'featured_games.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="featured_games.php"><span class="bi-stickies mr-2"></span> Featured Games</a></li> <li class=" <?php if($zon['page'][0] === 'categories.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="categories.php"><span class="bi-columns-gap mr-2"></span> Categories</a></li> <li class=" <?php if($zon['page'][0] === 'users.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="users.php"><span class="bi-person mr-2"></span> Users</a></li> <li class=" <?php if($zon['page'][0] === 'comments.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="comments.php"><span class="bi-chat-square-text mr-2"></span> Comments</a></li> <li class=" <?php if($zon['page'][0] === 'pages.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="pages.php"><span class="bi-collection mr-2"></span> Pages</a></li> <li class=" <?php if($zon['page'][0] === 'blog.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="blog.php"><span class="bi-clipboard mr-2"></span> Blog</a></li> <li class=" <?php if($zon['page'][0] === 'reports.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="reports.php"><span class="bi-bug mr-2"></span> Reports</a></li> <li class=" <?php if($zon['page'][0] === 'auto-fetch.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="auto-fetch.php"><span class="bi-arrow-repeat mr-2"></span> Auto Fetching</a></li> <li class=" <?php if($zon['page'][0] === 'section.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="section.php"><span class="bi-grip-horizontal mr-2"></span> Sections</a></li> <li class=" <?php if($zon['page'][0] === 'themes.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="themes.php"><span class="bi-palette mr-2"></span> Themes</a></li> <li class=" <?php if($zon['page'][0] === 'customize.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="customize.php"><span class="bi-palette2 mr-2"></span> Customize</a></li> <li class=" <?php if($zon['page'][0] === 'tools.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="tools.php"><span class="bi-tools mr-2"></span> Tools</a></li> <li class=" <?php if($zon['page'][0] === 'advertisement.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="advertisement.php"><span class="bi-tv mr-2"></span> Advertisement</a></li> <li class=" <?php if($zon['page'][0] === 'settings.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="settings.php"><span class="bi-gear mr-2"></span> Settings</a></li> <li class=" <?php if($zon['page'][0] === 'update-script.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="update-script.php"><span class="bi-pause-fill mr-2"></span> Update</a></li> <li class=" <?php if($zon['page'][0] === 'delete-games.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="delete-games.php"><span class="bi-trash mr-2"></span> Delete All Games</a></li> <li class=" <?php if($zon['page'][0] === 'logout.php') { echo "bg-blue-600 text-white hover:text-white"; } else { ?> bg-white text-gray-500 hover:text-gray-700 <?php } ?> my-1 px-3 list-style-none"><a class="text-docoration-none py-2 block text-[13px]" href="logout.php"><span class="bi-door-open mr-2"></span> logout</a></li> </ul> </div>PK ��[+�K�B B includes/ajax/gamesbyquery.phpnu W+A�� <?php include('../../../config.php'); include('../../../app/includes/constant.php'); include('../../../app/includes/app_start.php'); $message = ''; if (isset($_POST) && !empty($_POST)) { $query = $_POST['query']; $sql = "SELECT * FROM zon_games WHERE game_name LIKE '%$query%' LIMIT 20 "; $run = mysqli_query($socket, $sql); while ($row = mysqli_fetch_assoc($run)) { if ($row) { if ($row['game_banner_url'] !== '') { ?> <div class="game-box"> <div class="flex items-center justify-between"> <div class="flex items-center gap-3"> <img class="h-10 w-10 rounded-md" src="<?= $row['game_image_url'] ?>" /> <div class="details"> <span class="text-lg font-bold "> <?= $row['game_name'] ?> </span> <br> <span class="text-gray-400 text-sm "> <?= $row['game_category'] ?> </span> </div> </div> <input type="checkbox" value="<?= $row['id'] ?>" class="h-7 outline-auto focus:outline-blue-500 rounded-lg w-7" name="game_id[]" /> </div> </div> <?php } else { $message = 'game not able to add in featured game.'; } } else { echo 'game not found'; } } } else { echo "Search your game"; } echo $message; ?>PK ��[6s^�, , includes/config.phpnu W+A�� <?php require '../config.php'; // $host_name = 'localhost'; // $sql_db_user = 'root'; // $sql_db_pass = ''; // $sql_db_name = 'zontal'; // $con = mysqli_connect($host_name, $sql_db_user, $sql_db_pass, $sql_db_name); // $site_url = "http://localhost/Zontal/"; ?>PK ��[��y[� � includes/footer.phpnu W+A�� <script src="<?php echo $site_url?>admin/assets/js/main.js"></script> <script> const DROP_BUTTON=document.querySelectorAll(".drop_btn");null!==DROP_BUTTON&&DROP_BUTTON.forEach(e=>{e.addEventListener("click",()=>{let t=e.getAttribute("data-target");document.querySelector(t).classList.toggle("show")})});const TAB_BUTTON=document.querySelectorAll(".tab-button"),TAB=document.querySelectorAll(".tab");function ActiveButton(){TAB_BUTTON.forEach(e=>{e.classList.remove("bg-blue-500"),e.classList.remove("text-gray-100"),e.classList.add("text-gray-500")}),this.classList.add("bg-blue-500"),this.classList.replace("text-gray-500","text-gray-100")}null!==TAB_BUTTON&&TAB_BUTTON.forEach(e=>{e.addEventListener("click",t=>{TAB.forEach(e=>{e.classList.add("hidden"),e.classList.remove("show")});let l=e.getAttribute("data-target");document.querySelector(l).classList.remove("hidden"),document.querySelector(l).classList.toggle("block")})}),null!==TAB_BUTTON&&TAB_BUTTON.forEach(e=>{e.addEventListener("click",ActiveButton)});const USER_PROFILE_UPLOAD_IMAGE_BUTTON=document.getElementById("pic_upload_button");null!==USER_PROFILE_UPLOAD_IMAGE_BUTTON&&USER_PROFILE_UPLOAD_IMAGE_BUTTON.addEventListener("click",()=>{document.getElementById("user_profile_pic").click()});const FILE_TYPE=document.getElementById("File_Type");null!==FILE_TYPE&&(FILE_TYPE.addEventListener("change",()=>{("File"===FILE_TYPE.value||"URL"===FILE_TYPE.value)&&"null"!==FILE_TYPE.value&&(console.warn(FILE_TYPE.value),"File"===FILE_TYPE.value?document.getElementById("FILE_IMAGE").classList.remove("hidden"):document.getElementById("FILE_IMAGE").classList.add("hidden"),"URL"===FILE_TYPE.value?document.getElementById("URL_IMAGE").classList.remove("hidden"):document.getElementById("URL_IMAGE").classList.add("hidden"))}),window.addEventListener("load",()=>{null!==FILE_TYPE&&("File"===FILE_TYPE.value||"URL"===FILE_TYPE.value)&&"null"!==FILE_TYPE.value&&(console.warn(FILE_TYPE.value),"File"===FILE_TYPE.value?document.getElementById("FILE_IMAGE").classList.remove("hidden"):document.getElementById("FILE_IMAGE").classList.add("hidden"),"URL"===FILE_TYPE.value?document.getElementById("URL_IMAGE").classList.remove("hidden"):document.getElementById("URL_IMAGE").classList.add("hidden"))}));const CATEGORY_INPUT=document.getElementById("category_name");null!==CATEGORY_INPUT&&CATEGORY_INPUT.addEventListener("keyup",e=>{var t=e.target.value;document.getElementById("category_slug").innerHTML=t}); console.log(CATEGORY_INPUT) </script> <script> document.querySelectorAll("body").forEach((e) => { e.classList.add("dark:bg-[#121317]"); }); document.querySelectorAll("input, select").forEach((e) => { e.classList.add("dark:bg-zinc-900"); }); </script>PK ��[��{�, , includes/header.phpnu W+A�� <?php // session_start(); ?> <!DOCTYPE html> <html lang="en" class="dark:bg-zinc-800"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex, nofollow"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php if (!empty($page)) { ?> <title> <?php echo $page ?> </title> <?php } else { ?> <title> <?php echo Zon_Config('site_name') ?> </title> <?php } ?> <link rel="stylesheet" href="<?php echo $site_url ?>admin/assets/css/bootstrap.min.css"> <link rel="stylesheet" href="<?php echo $site_url ?>admin/assets/css/style.css"> <link rel="stylesheet" href="<?php echo $site_url ?>admin/assets/css/rte_theme_default.css"> <link rel="stylesheet" href="<?php echo $site_url ?>admin/assets/vendor/bootstrap-icons/bootstrap-icons.css"> <link rel="shortcut icon" href="<?php echo $site_url ?>static/img/logo/<?php echo Zon_Config('site_favicon') ?>" type="image/x-icon"> <script src="<?php echo $site_url ?>js/tailwind.js"></script> <script src="https://cdn.ckeditor.com/ckeditor5/37.0.1/classic/ckeditor.js"></script> <script src="<?php echo $site_url ?>admin/assets/js/rte.js"></script> </head> <div class="mx-2"> <div class="container"> <?php if (Zon_Config('auto_fetch_all_games_fetched') == 1) { ?> <div id="fetched_alert" class="bg-blue-200 relative text-xs capitalize flex gap-4 rounded-md text-blue-400 font-bold py-2.5 px-4 mt-2"> <i class="bi bi-info-circle-fill"></i> All games have been fetched from your ( <?php echo Zon_Config('auto_fetch_game_publisher') ?> ) <button onclick="this.parentNode.classList.add('hidden'), localStorage.setItem('fetched_alert', 1)" class="close-button font-bold text-lg top-[4px] absolute px-1 right-[20px]">×</button> </div> <?php } ?> <?php if (is_dir("../install")) { ?> <div class="bg-red-200 text-xs capitalize flex gap-4 rounded-md text-red-500 font-bold py-2.5 px-4 mt-2"> <i class="bi bi-info-circle-fill"></i> Please delete (./install) folder for security reason. </div> <?php } ?> </div> <script> if (localStorage.getItem('fetched_alert') == 1) { document.getElementById("fetched_alert").classList.add("hidden"); } </script> </div>PK ��[�lŰ\ \ add-category.phpnu W+A�� <?php require "../app/includes/function_general.php"; ?> <?php include "includes/header.php"; ?> <?php // include "includes/config.php"; ?> <?php if (!empty($_GET['token_id']) && isset($_GET['action'])) { $token_id = $_GET['token_id']; $action_type = $_GET['action']; } if (isset($token_id) && isset($action_type) && !empty($token_id)) { $sql = "select * from zon_category where id=$token_id"; $run = mysqli_query($con, $sql); $data = mysqli_fetch_assoc($run); } ?> <body class="dark:bg-[#121317]"> <main class="d-flex"> <?php include "includes/sidebar.php"; ?> <div class="main w-full px-12 py-6"> <div class="games-list mt-6"> <form action="functions/functions.php" method="POST" enctype="multipart/form-data" id="add-page" class="tab"> <?php if(!empty($token_id)) { ?> <input hidden type="text" name="category_id" value="<?php echo $data['id']; ?>"> <?php } ?> <div class="flex gap-6"> <div class="input-form w-full"> <div class="input-group flex flex-column"> <label class="text-gray-500 uppercase text-[10px] mb-2">Name</label> <input id="category_name" value="<?php if(!empty($token_id)) { echo $data['name']; } ?>" required name="game_category" class="py-[15px] text-gray-500 outline-none focus:outline focus:outline-blue-500 transition-sm px-3 text-xs" type="text" placeholder="Category Name"> </div> <div class="input-group flex flex-column mt-6"> <label class="text-gray-500 uppercase text-[10px] mb-2">Slug</label> <input required id="category_slug" value="<?php if(!empty($token_id)) { echo $data['slug']; } ?>" required name="game_category_slug" class="py-[15px] text-gray-500 outline-none focus:outline focus:outline-blue-500 transition-sm px-3 text-xs" type="text" placeholder="Category Slug"> </div> </div> <div class="other-inputs w-80"></div> </div> <button name="<?php if(!empty($token_id)) { echo 'update_category'; } else{ echo 'add_category'; } ?>" class="bg-blue-600 text-white uppercase mt-4 text-sm rounded-sm py-2 px-3 "><?php if(!empty($token_id)) { echo 'update'; } else{ echo 'Add'; } ?></button> </form> </div> </main> <?php include "includes/footer.php"; ?> </body> </html>PK ��[���� � functions/configuration.phpnu W+A�� <?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"); } } PK ��[?��! �! functions/api.phpnu W+A�� <?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, $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($game_category); $sql = "INSERT INTO `zon_games`(`game_name`, `game_description`, `game_image_url`, `game_url`, `game_published`, `game_category`, `game_status`, `game_played`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0)"; $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, $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($game_category); $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`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0, '$game_banner_url')"; $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, $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($game_category); $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`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', $game_status, '$game_category', 0, 0, '$game_banner_url')"; $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: ../"); } }PK ��[��� functions/add-user.phpnu W+A�� <?php session_start(); require_once '../../config.php'; require_once '../../app/includes/constant.php'; require_once '../../app/includes/app_start.php'; function ValidateFields($field, $var) { global $socket; $Validate = "select * from zon_users where $field='$var'"; return mysqli_num_rows(mysqli_query($socket, $Validate)); } // User Adding, Updating And Deleteing Action if (isset($_POST['add_user']) && isset($_POST)) { // $id = mysqli_real_escape_string($con, $_POST['id']); $name = mysqli_real_escape_string($con, $_POST['name']); $email = mysqli_real_escape_string($con, $_POST['email']); $username = mysqli_real_escape_string($con, $_POST['username']); $password = mysqli_real_escape_string($con, $_POST['password']); $user_status = mysqli_real_escape_string($con, $_POST['user_status']); $_SESSION['name'] = $name; $_SESSION['email'] = $email; $_SESSION['username'] = $username; $_SESSION['password'] = $password; $user_pic = "user_pic.png"; if ($_FILES['user_pic']['error'] == 0) { $file_name = rand(111111111, 99999999) . $_FILES['user_pic']['name']; $file_tmp = $_FILES['user_pic']['tmp_name']; if (move_uploaded_file($file_tmp, "../../static/img/" . $file_name)) { $user_pic = $file_name; } } if (ValidateFields('email', $email)) { @header("location: ../add-users.php?emailError=Email Already Exist"); // $bool = true; $emil = false; } else { $emil = true; } if (ValidateFields('username', $username)) { @header("location: ../add-users.php?usernameError=Username Already Exist"); $usern = false; } else { $usern = true; } $query = "INSERT INTO zon_users (`name`, `email`, `username`, `password`, `user_pic`, `status`, `is_admin`) VALUES ('$name', '$email', '$username', '$password', '$user_pic', $user_status, 0) "; if ($usern == true && $emil == true) { if (mysqli_query($con, $query)) { unset($_SESSION['name']); unset($_SESSION['email']); unset($_SESSION['username']); unset($_SESSION['password']); @header("location: ../users.php"); } } } if (isset($_POST['update_user']) && isset($_POST)) { $id = mysqli_real_escape_string($con, $_POST['user_id']); $name = mysqli_real_escape_string($con, $_POST['name']); $email = mysqli_real_escape_string($con, $_POST['email']); $username = mysqli_real_escape_string($con, $_POST['username']); $password = mysqli_real_escape_string($con, $_POST['password']); $user_status = mysqli_real_escape_string($con, $_POST['user_status']); // $user_pic = "user_pic.png"; if (ValidateFields('email', $email) == 2 && ValidateFields('username', $username) == 2) { @header("location: ../add-users.php?action=update&token_id=$id&emailError=Email Already Exist&usernameError=Username Already Exist"); $user = false; } else { $user = true; } if (ValidateFields('email', $email) == 2) { @header("location: ../add-users.php?action=update&token_id=$id&emailError=Email Already Exist"); $emil = false; } else { $emil = true; } if (ValidateFields('username', $username) == 2) { @header("location: ../add-users.php?action=update&token_id=$id&usernameError=Username Already Exist"); $usern = false; } else { $usern = true; } $query = "UPDATE zon_users SET `name`='$name', `email`='$email', `username`='$username', `password`='$password', `status`=$user_status where id=$id "; if ($_FILES['user_pic']['error'] == 0) { $file_name = rand(111111111, 99999999) . $_FILES['user_pic']['name']; $file_tmp = $_FILES['user_pic']['tmp_name']; if (move_uploaded_file($file_tmp, "../../static/img/" . $file_name)) { $user_pic = $file_name; $query = "UPDATE zon_users SET `name`='$name', `email`='$email', `username`='$username', `password`='$password', `user_pic`='$user_pic', `status`=$user_status where id=$id "; } } if ($usern == true && $emil == true && $user == true) { if (mysqli_query($con, $query)) { unset($_SESSION['name']); unset($_SESSION['email']); unset($_SESSION['username']); unset($_SESSION['password']); @header("location: ../users.php"); } } }PK ��[�)���&