• Dastur kodi
  • Foydalanilgan adabiyotlar




    Download 0,89 Mb.
    bet10/11
    Sana11.01.2024
    Hajmi0,89 Mb.
    #134583
    1   2   3   4   5   6   7   8   9   10   11
    Bog'liq
    loyiha ishi Mingboyev Adhamjon

    Foydalanilgan adabiyotlar


    1. Chen, S.K; Chang, Y.H (2014).2014 International Conference on Artificial Intelligence and Software Engineering (AISE2014). DEStech Publications,

    2. Malay K. Kundu; Sushmita Mitra; Debasis Mazumdar; Sankar K. Pal, eds.

    3. Li, Stan Z.; Jain, Anil K. (2005).Handbook of Face Recognition. Springer Science & Business Media. pp.14–15.

    4. Bryus Shnayer tomonidan "Amaliy kriptografiya: C tilidagi protokollar, algoritmlar va manba kodi".

    5. Erik Reskorla tomonidan "SSL va TLS: Xavfsiz tizimlarni loyihalash va qurish".

    6. Jonatan Katz va Yehuda Lindellning "Zamonaviy kriptografiyaga kirish".

    7. https://en.wikipedia.org/

    8. https://core.ac.uk

    9. https://developer.android.com

    10. www.innefu.com

    11. https://firebase.google.com

    12. http://hozir.org


    Dastur kodi:



    $username = filter_input(INPUT_POST, 'username');
    $password = filter_input(INPUT_POST, 'password');
    $email = filter_input(INPUT_POST,'email');
    $mobile = filter_input(INPUT_POST,'mobile');
    if (!empty($username)){
    if (!empty($password)){
    if (!empty($email)){
    $host = "localhost";
    $dbusername = "root";
    $dbpassword = "";
    $dbname = "prasun";
    // Create connection
    $conn = new mysqli ($host, $dbusername, $dbpassword, $dbname);

    if (mysqli_connect_error())


    {
    die('Connect Error ('. mysqli_connect_errno() .') '. mysqli_connect_error());
    }
    else
    {
    if($email != "")
    {
    $res = mysqli_query($conn, "SELECT * from `registration` where email='".$email."'");
    $num_rows= mysqli_num_rows($res);
    if($num_rows>0)
    {
    echo "Email Exists";
    die();
    }
    }
    if($mobile !="")
    {
    $res = mysqli_query($conn,"SELECT * FROM `registration` where mob='".$mobile."'");
    $num_rows= mysqli_num_rows($res);
    if($num_rows>1)
    {
    echo "You cannot register the same mobile number thrice";
    die();
    }
    }
    $sql = "INSERT INTO registration (name, password, email, mob) values ('$username','$password','$email','$mobile')";
    if ($conn->query($sql))
    {
    echo "New record is inserted sucessfully";
    }
    else
    {
    echo "Error: ". $sql ."
    ". $conn->error;
    }
    $conn->close();
    }
    }

    else
    {


    echo "Email should not be empty";
    die();
    }
    }
    else
    {
    echo "Password should not be empty";
    die();
    }
    }
    else
    {
    echo "Username should not be empty";
    die();
    }
    ?>
    $roll = $_POST['roll'];
    $name = $_POST['name'];
    $password = $_POST['password'];
    $email = $_POST['email'];
    $country = $_POST['country'];
    $lan = $_POST['lan'];
    $gen = $_POST['gen'];
    $add = $_POST['add'];
    $date = $_POST['date'];
    $phonecode = $_POST['phonecode'];

    if (!empty($roll) || !empty($name) || !empty($password) || !empty($email) || !empty($country) || !empty($country) ||


    !empty($lan) || !empty($gen) || !empty($add) || !empty($date) || !empty($phonecode))
    {
    $host = "localhost";
    $dbUsername = "root";
    $dbPassword = "";
    $dbname = "prasun";
    // create connection
    $conn = new mysqli($host, $dbUsername, $dbPassword, $dbname);
    if (mysqli_connect_error())
    {
    die('Connection Error ('.mysqli_connect_error().')'.mysqli_connect_error());
    }
    else
    {
    $SELECT = "SELECT email From registration Where email = ? Limit 1";
    $INSERT = "INSERT into registration (roll,name,password,email,country,language,gender,address,dob,mob) values (?,?,?,?,?,?,?,?,?,?)";
    //prepare statement
    $stmt = $conn->prepare($SELECT);
    $stmt->bind_param("s",$email);
    $stmt->execute();
    $stmt->bind_result($email);
    $stmt->store_result();
    $rnum = $stmt->num_rows;

    if ($rnum==0)


    {
    $stmt->close();
    $stmt = $conn->prepare($INSERT);
    $stmt->bind_param("ssssii", $roll,$name,$password,$email,$country,$language,$gender,$address,$dob,$mob);
    $stmt->execute();
    echo "New Record inserted successfully";
    }
    else
    {
    echo "Someone already registered usingthis email.";
    }
    $stmt->close();
    $conn->close();
    }
    }
    else
    {
    echo "All field are required";
    die();
    }
    ?>
    session_start();
    if(isset($_POST['save']))
    {
    $rno=$_SESSION['otp'];
    $urno=$_POST['otpvalue'];
    if(!strcmp($rno,$urno))
    {
    $name=$_SESSION['name'];
    $email=$_SESSION['email'];
    $phone=$_SESSION['phone'];
    //For admin if he want to know who is register
    $to="example@gmail.com";
    $subject = "Thank you!";
    $txt = "Some one show your demo Email id: ".$email." Mobile number : ".$phone."";
    $headers = "From: studentstutorial@gmail.com" . "\r\n" .
    "CC: divyasundarsahu@gmail.com";
    mail($to,$subject,$txt,$headers);
    echo "
    Thank you for show our Demo.
    ";
    //For admin if he want to know who is register
    }
    else{
    echo "
    Invalid OTP
    ";
    }
    }
    //resend OTP
    if(isset($_POST['resend']))
    {
    $message="
    Sucessfully send OTP to your mail.
    ";
    $rno=$_SESSION['otp'];
    $to=$_SESSION['email'];
    $subject = "OTP";
    $txt = "OTP: ".$rno."";
    $headers = "From: otp@studentstutorial.com" . "\r\n" .
    "CC: divyasundarsahu@gmail.com";
    mail($to,$subject,$txt,$headers);
    $message="

    Download 0,89 Mb.
    1   2   3   4   5   6   7   8   9   10   11




    Download 0,89 Mb.