Файловый менеджер - Редактировать - /home/flapvehx/streamnexus.online/static/img/logo/functions.php.tar
Ðазад
home/flapvehx/streamnexus.online/includes/functions.php 0000644 00000011520 15000304577 0017501 0 ustar 00 <?php session_start(); require_once 'config.php'; require_once 'function_general.php'; // registration Action if (isset($_POST['signup']) && isset($_POST)) { $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']); $_SESSION['email'] = $email; $_SESSION['name'] = $name; $_SESSION['username'] = $username; $emailValidate = "select * from zon_users where email=$email"; if (ValidateFields('email', $email)) { @header("location: ../register?email_msg=Email Already Exist"); } else if (ValidateFields('username', $username)) { @header("location: ../register?username_msg=Username Already Exist"); } else { $user_pic = "user_pic.png"; $query = "INSERT INTO zon_users (`name`, `email`, `username`, `password`, `user_pic`) VALUES ('$name', '$email', '$username', '$password', '$user_pic') "; if (mysqli_query($con, $query)) { @header("location: ../login"); unset($_SESSION['email']); unset($_SESSION['name']); unset($_SESSION['username']); } } } // login action if (isset($_POST['login'])) { $email_username = mysqli_real_escape_string($con, $_POST['username_email']); $password = mysqli_real_escape_string($con, $_POST['password']); $user_id = mysqli_real_escape_string($con, $_POST['id']); $query = "select * from zon_users where email='$email_username' || username='$email_username' && password='$password'"; $row = mysqli_fetch_assoc(mysqli_query($con, $query)); if (mysqli_num_rows(mysqli_query($con, $query)) !== 0) { if ($row['status'] == 0) { $_SESSION['Loggedin'] = true; $_SESSION['Loggedin_user'] = $email_username; if ($row['is_admin'] == 1) { $_SESSION['is_admin_Loggedin'] = true; } $user_data = mysqli_fetch_assoc(mysqli_query($con, "select * from zon_users where username='$email_username' || email='$email_username'")); $_SESSION['Loggedin_user_id'] = $user_data['id']; @header("Location: ../"); } else { @header("Location: ../login?error=Your account is closed"); } } else { @header("Location: ../login?error=Wrong username or email and password"); } } // comment action if (isset($_POST) && isset($_POST['comment'])) { $subject = Secure_DATA($_POST['subject']); $date = Secure_DATA($_POST['date']); $game_id = Secure_DATA($_POST['game_id']); $user_id = Secure_DATA($_POST['user_id']); $url = Secure_DATA($_POST['url']); $query = "insert into zon_comments (user_id, game_id, subject, date) values ($user_id, $game_id, '$subject', '$date')"; if (!empty($subject)) { if (mysqli_query($con, $query)) { @header("location: $url"); } } else { @header("location: $url"); } } // comment delete action if (isset($_GET['page']) && isset($_GET['id']) && $_GET['page'] == 'comments') { $id = $_GET['id']; $redirect = $_GET['redirect']; $query = "delete from zon_comments where id=$id"; if (mysqli_query($con, $query)) { @header("location: $redirect"); } } // change profile setting action if (isset($_POST['change_settings'])) { $url = Secure_DATA($_GET['url']); $name = Secure_DATA($_POST['name']); $id = Secure_DATA($_POST['id']); $username = Secure_DATA($_POST['username']); $email = Secure_DATA($_POST['email']); $password = Secure_DATA($_POST['new_password']); $user_pic = ''; $query = "UPDATE zon_users set `name`='$name', `email`='$email', `username`='$username' where id=$id"; if ($_FILES['avatar_img']) { $user_pic = rand(111111111, 999999999) . $_FILES['avatar_img']['name']; if (move_uploaded_file($_FILES['avatar_img']['tmp_name'], "../static/img/" . $user_pic)) { } } if (!empty($password)) { $query = "UPDATE zon_users set `name`='$name', `email`='$email', `username`='$username', `password`='$password' where id=$id"; } else { if ($_FILES['avatar_img']['error'] == 0) { $query = "UPDATE zon_users set `name`='$name', `email`='$email', `username`='$username', `user_pic`='$user_pic' where id=$id"; } } if ($_FILES['avatar_img']['error'] == 0 && !empty($password)) { $query = "UPDATE zon_users set `name`='$name', `email`='$email', `username`='$username', `password`='$password', `user_pic`='$user_pic' where id=$id"; } if (mysqli_query($con, $query)) { @header("location: $url"); } } home/flapvehx/streamnexus.online/admin/functions/functions.php 0000644 00000020212 15000645536 0020774 0 ustar 00 <?php require_once 'config.php'; require_once '../../includes/function_general.php'; // Game Adding, Deleting And Updating Action if (isset($_POST['upload_game'])) { $game_name = mysqli_real_escape_string($con, $_POST['game_name']); $game_desc = mysqli_real_escape_string($con, $_POST['game_description']); $game_frame_url = mysqli_real_escape_string($con, $_POST['game_frame_url']); $game_status = mysqli_real_escape_string($con, $_POST['game_status']); $game_category = mysqli_real_escape_string($con, $_POST['game_category']); if (isset($_FILES['game_image'])) { if ($_FILES['game_image']['error'] == 0) { $file_name = rand(111111111, 999999999) . $_FILES['game_image']['name']; if (move_uploaded_file($_FILES['game_image']['tmp_name'], "../../static/uploads/" . $file_name)); { $game_image_url = $site_url . 'static/uploads/' . $file_name; } } else { $game_image_url = mysqli_real_escape_string($con, $_POST['game_image_url']); } } else { $game_image_url = mysqli_real_escape_string($con, $_POST['game_image_url']); } $sql = "INSERT INTO `zon_games`(`game_name`, `game_description`, `game_image_url`, `game_url`, `game_published`, `game_category`) VALUES ('$game_name','$game_desc','$game_image_url','$game_frame_url', '$game_status', '$game_category')"; if (mysqli_query($con, $sql)) { @header("location: ../games.php"); } } if (isset($_POST['update_game'])) { $game_id = mysqli_real_escape_string($con, $_POST['game_id']); $game_name = mysqli_real_escape_string($con, $_POST['game_name']); $game_desc = mysqli_real_escape_string($con, $_POST['game_description']); $game_frame_url = mysqli_real_escape_string($con, $_POST['game_frame_url']); $game_status = mysqli_real_escape_string($con, $_POST['game_status']); $game_category = mysqli_real_escape_string($con, $_POST['game_category']); if (isset($_FILES['game_image'])) { if ($_FILES['game_image']['error'] == 0) { $file_name = rand(111111111, 999999999) . $_FILES['game_image']['name']; if (move_uploaded_file($_FILES['game_image']['tmp_name'], "../../static/uploads/" . $file_name)); { $game_image_url = $site_url . 'static/uploads/' . $file_name; } } else { $game_image_url = mysqli_real_escape_string($con, $_POST['game_image_url']); } } else { $game_image_url = mysqli_real_escape_string($con, $_POST['game_image_url']); } $sql = "UPDATE `zon_games` SET `game_name`='$game_name', `game_description`='$game_desc', `game_image_url`='$game_image_url', `game_url`='$game_frame_url', `game_published`='$game_status', `game_category`='$game_category' WHERE id=$game_id"; if (mysqli_query($con, $sql)) { @header("location: ../games.php"); } } if (isset($_POST['add_category'])) { $category_name = mysqli_real_escape_string($con, $_POST['game_category']); $category_slug = mysqli_real_escape_string($con, $_POST['game_category_slug']); if (mysqli_query($con, "insert into zon_category (`name`, `slug`) values ('$category_name' , '$category_slug') ")) { @header("location: ../categories.php"); } } if (isset($_POST['update_category'])) { $category_name = mysqli_real_escape_string($con, $_POST['game_category']); $category_slug = mysqli_real_escape_string($con, $_POST['game_category_slug']); $category_id = mysqli_real_escape_string($con, $_POST['category_id']); if (mysqli_query($con, "update zon_category set `name`='$category_name', `slug`='$category_slug' where id=$category_id")) { @header("location: ../categories.php"); } } if (isset($_GET) && !empty($_GET['token_id']) && !empty($_GET['action']) && !empty($_GET['content_type'])) { if ($_GET['content_type'] == 'game') { $action = $_GET['action']; $token_id = $_GET['token_id']; if ($action == 'delete') { if (mysqli_query($con, "DELETE FROM zon_games where id=$token_id")) { @header("location: ../games.php"); } } } } if (isset($_GET) && !empty($_GET['token_id']) && !empty($_GET['action']) && !empty($_GET['content_type'])) { if ($_GET['content_type'] == 'category') { $action = $_GET['action']; $token_id = $_GET['token_id']; if ($action == 'delete') { if (mysqli_query($con, "delete from zon_category where id=$token_id")) { @header("location: ../categories.php"); } } else { // return false; echo "Failed"; // @header("location: ../games.php"); } } } if (isset($_GET) && !empty($_GET['token_id']) && !empty($_GET['action']) && !empty($_GET['content_type']) && !empty($_GET['url'])) { if ($_GET['content_type'] == 'game') { $url = $_GET['url']; $action = $_GET['action']; $token_id = $_GET['token_id']; if ($action == 'delete') { if (mysqli_query($con, "delete from zon_games where id=$token_id")) { @header("location: $url"); } } else { // return false; echo "Failed"; // @header("location: ../games.php"); } } } if (isset($_POST) && isset($_POST['ads_up_add'])) { $ad_name = Secure_DATA($_POST['ad_name']); $id = Secure_DATA($_POST['ad_id']); $ad_code = $_POST['ad_code']; $ad_off = $_POST['ad_contr']; $sql = "UPDATE zon_ads set `code`='$ad_code', `ad_name`='$ad_name', `status`= 0 where id=$id"; if (!empty($ad_off)) { $sql = "UPDATE zon_ads set `code`='$ad_code', `ad_name`='$ad_name', `status`=1 where id=$id"; } if (mysqli_query($con, $sql)) { @header("location: ../advertisement"); } } if (isset($_POST) && isset($_POST['add_page'])) { $page_title = mysqli_escape_string($con, $_POST['page_title']); $page_desc = mysqli_escape_string($con, $_POST['page_desc']); $page_content = mysqli_escape_string($con, $_POST['page_content']); $query = "INSERT INTO `zon_pages` (`title`, `desc`, `content`) VALUES ('$page_title', '$page_desc', '$page_content') "; if (mysqli_query($con, $query)) { @header("location: ../pages"); } } if (isset($_GET) && !empty($_GET['token_id']) && !empty($_GET['action']) && !empty($_GET['content_type']) && !empty($_GET['url'])) { if ($_GET['content_type'] == 'page') { $url = $_GET['url']; $action = $_GET['action']; $token_id = $_GET['token_id']; if ($action == 'delete') { if (mysqli_query($con, "delete from zon_pages where id=$token_id")) { @header("location: $url"); } } else { // return false; echo "Failed"; // @header("location: ../games.php"); } } } if (isset($_POST) && isset($_POST['update_page'])) { $page_title = mysqli_escape_string($con, $_POST['page_title']); $page_desc = mysqli_escape_string($con, $_POST['page_desc']); $page_content = mysqli_escape_string($con, $_POST['page_content']); $id = mysqli_escape_string($con, $_POST['id']); $query = "UPDATE `zon_pages` SET `title`='$page_title', `desc`='$page_desc', `content`='$page_content' where id=$id"; if (mysqli_query($con, $query)) { @header("location: ../pages"); } } if (isset($_GET) && !empty($_GET['token_id']) && !empty($_GET['action']) && !empty($_GET['content_type']) && !empty($_GET['url'])) { if ($_GET['content_type'] == 'comment') { $url = $_GET['url']; $action = $_GET['action']; $token_id = $_GET['token_id']; if ($action == 'delete') { if (mysqli_query($con, "delete from zon_comments where id=$token_id")) { @header("location: $url"); } } else { // return false; echo "Failed"; // @header("location: ../games.php"); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.19 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка