What is this JavaScript trying to do?

Stupidly, I clicked on an email attachment with an htlm extension to see what the scam was. I think I was expecting it to open in a text editor, but it ran. (Dumb, dumb, dumb!) Anyway, I've paid my dues by restoring over a terabyte of backup onto two disks. My question is, can someone far more expert than I am in javascript interpret what the embedded script does, in general terms. (Not what the embedded malware does.) Before anyone panics, I've cut some 600,000 characters out of the text variable so it isn't a danger. (I've also changed the extension from html to txt.)

I think the text var in the script is a representation of the contents of a zip file, and the script changes the text to an actual file and saves it. I'm bit unclear whether the script also tries to run the zipped file. I'd like to remove any lingering doubts as to anything bad that might have happened before I unplugged the ethernet cable. I never saw any evidence of a file being unzipped, or indeed of the zip file itself.

Any information on what the script was doing would be most welcome. Thanks!

How to output nested class objects ?

Hi,
I'm new here and pretty new to c++ and programming in general.
During one of my first excercises I tried to work with classes but I don't know how to output an class object in another class.

Here is my Code with the text in [] (Circle.cpp) where I'm stuck.
Would be great if anyone could help.
Thanks

Point.h

#pragma once
#include <iostream>
#include <string>

using namespace std;

class Point 
{
private:            

    int X;
    int Y;


public:             

    Point(); 
    Point(int, int); 
    ~Point(); 

    int getX();
    int getY();

    void setX(int);
    void setY(int);

    void Print();
};

Shapes.h (BASE)

#pragma once
#include <iostream>
#include <string>

using namespace std;

class Shapes
{
    protected:           

        string name;

    public:             

        Shapes(); 
        Shapes(string);
        ~Shapes(); 

        string getName();

        void setName(string);

        void Print();
    };

Circle.h

#pragma once
#include <iostream>
#include <string>
#include "Point.h"

using namespace std;

class Circle: public Shape
{
private:             

    Circle Middle;
    double Radius;


public:             

    Circle();  
    Circle(string); 
    ~Circle(); 

    void Print();
    void SetPointRadius(Circle,double);
};

Point.cpp

#include <iostream>
#include <string>
#include "Shapes.h"


using namespace std;

Point::Point() {
    X = 0;
    Y = 0;
}
Point::Point(int X_, int Y_) {
    X = X_;
    Y = Y_;
}
Point::~Point() {
}

int Point::getX() {
    return X;
}

int Point::getY() {
    return Y_;
}

void Point::setX(int X_) {
    X = X_;
}

void Point::setY(int Y_) {
    Y = Y_;
}

void Point::Print() {
    cout << "X: " << X << endl;
    cout << "Y: " << Y << endl;
}

Circle.cpp

#include <iostream>
#include <string>
#include "Shapes.h"
#include "Circle.h"


using namespace std;

Circle::Circle() {
    Radius = 0;
} 

Circle::Circle(string name_) {
    name = name_;
}

Circle::~Circle() {
}

void Circle::Print() {


        [ Output: Shapes::Print() ]     // void Shapes::Print() {cout << "Name is: " << name << endl;}

    cout << "Point: " << endl;  

    [ Output: Point::getX() ]       // int Point::getX() {return X;}
    [ Output: Point::getY() ]       // int Point::getY() {return Y;}

    cout << endl;
    cout << "Radius: " << Radius << endl;


}

void CKreis::SetPointRadius(CPunkt Mitte, double Radius) {
    PMitte = Mitte;
    myRadius = Radius;
}

Main.cpp

#include <iostream>
#include "Shapes.h"
#include "Circle.h"
#include "Point.h"

using namespace std;

int main() {

    Circle C ("Circle 1");
    Point P1(1, 3);
    double Radius = 2.5;
    P1.SetPointRadius(P1, Radius);

    P1.Print();
    cout << endl;
}

update data and image in php

hey I'm beginner learning php have hard time to Insert data to product in database with image because the category I did make it work but now I need to update data the same style that I add it with

the Insert Code:

<?php
include('./pro_crud/config.php');

$sql_cat = "SELECT * FROM category";
$result = $con->query($sql_cat);

if(isset($_POST['btn_insert'])) {
    $name = $_POST["pdct_name"];
    $price = $_POST["pdct_price"];
    $qty = $_POST["pdct_qty"];
  //  $filename = $_FILES["pdct_img"];
    $co = $_POST["pdct_code"];
    $cat = $_POST["pdct_cat"];
    $cat_name = "";
    $sql_query2 = "SELECT * FROM category where cat_id =$cat;";
    $result2 = $con->query($sql_query2);
    if($result2->num_rows > 0)
    {
        while($row = $result2->fetch_assoc()) 
        {
          $cat_name = $row['cat_name'];
        }
      }
    $target_dir = "../images/".$cat_name."/";
    $target_file = $target_dir.basename($_FILES["pdct_img"]["name"]);

    $uploadok = 1;
    $imagFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION));

    //check if this file is image or not
    $check= getimagesize($_FILES["pdct_img"]["tmp_name"]);
    if($check !== false)
    {
      echo "File is an image";
      $uploadok = 1;
    }
    else {
      echo "File is not image";
      $uploadok = 0;
    }
    // already exists
    if(file_exists($target_file))
    {
      echo "file already exists";
      $uploadok = 0;
    }

    // if($_FILES["pdct_img"]["size"] > 900000)
    // {
    //   echo "sorry, image size is too large ";
    //   $uploadok = 0;
    // }

    if($imagFileType !='jpg' && $imagFileType !='png' && $imagFileType !='jpeg') 
    {
      echo "Sorry your image not jpg or png";
      $uploadok = 0;
    }
    if($uploadok == 0)
    {
      echo '   ';
    }
    else 
    {
      if(move_uploaded_file($_FILES["pdct_img"]["tmp_name"],$target_file))
      {
        $target_d = "images/".$cat_name."/";
        $target_f = $target_d.basename($_FILES["pdct_img"]["name"]);

        $sql = "insert into product values(0,'$name','$price','$qty','$target_f','$co','$cat')";
        if($con->query($sql)){
            echo '<script>alert("  ");</script>';
            header("location:viewProducts.php");
        }
        else{
            echo $con->error;
        }
      }
    }


} 
?>
<!DOCTYPE html>
<html>
  <head>
    <title> </title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  </head>
  <body class="bg-dark"> 
    <div class=" card text-center" style="padding:15px;" >
      <h4>  </h4>
    </div><br><br> <br><br> <br>
    <div class="container ">
      <form method="POST"  enctype="multipart/form-data">
        <div class="form-group text-right text-light">
          <label for="name">: </label>
          <input type="text" class="form-control text-right" name="pdct_name" placeholder=" " required="">
        </div>
        <div class="form-group text-right text-light">
          <label>: </label>
          <input type="number" class="form-control text-right" name="pdct_price" placeholder="50" required="">
        </div>
        <div class="form-group text-right text-light">
          <label>: </label>
          <input type="number" class="form-control text-right" name="pdct_qty" placeholder="80" required="">
        </div>
        <div class="form-group text-right text-light">
          <label>: </label>
          <input type="file" class="form-control text-right" name="pdct_img" >
        </div>
        <div class="form-group text-right text-light">
          <label for="username">:  </label>
          <select class="form-control text-right" name="pdct_cat">
              <option> </option>
              <?php
              if($result->num_rows > 0)
              {
                  while($row = $result->fetch_assoc()) 
                  {
                      echo '<option value="'.$row["cat_id"].'">'.$row["cat_name"].'</option>';
                  }
              }
              ?>
          </select>
        </div>
        <div class="form-group text-right text-light">
          <label for="username">:  </label>
          <input type="text" class="form-control text-right" name="pdct_code" placeholder=" 80  " required="">
        </div>

        <div class=" text-right form-group text-light">
          <a href="../pro.php"   class="btn btn-light btn-right"></a>
          <input type="submit" name="btn_insert" class="btn btn-danger" style="float:right;" value=""></a>
        </div>
      </form>
    </div>
  </body>
</html>

How can i edit data with image without affect the text data?