forked from LinWin-Cloud/Setool-Main
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththreaten.java
81 lines (79 loc) · 2.63 KB
/
threaten.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import java.util.*;
public class threaten {
public static void main(String[]args) throws Exception
{
threaten_main();
}
public static void threaten_main()
throws Exception
{
/* input all the value */
Scanner scanner = new Scanner(System.in);
try
{
//title
System.out.print("Enter the title: ");
String title = scanner.nextLine();
//text
System.out.print("Enter the text: ");
String text = scanner.nextLine();
//name
System.out.print("Enter the name: ");
String name = scanner.nextLine();
//email
System.out.print("Enter the email: ");
String email = scanner.nextLine();
//phone
System.out.print("Enter the phone: ");
String phone = scanner.nextLine();
//time
System.out.print("Enter the time: ");
String time = scanner.nextLine();
//save name
System.out.print("Enter the save name: ");
String SaveName = scanner.nextLine();
threaten_Make(title, text, name, email, phone, time , SaveName);
setool.run_main_function();
}
catch (Exception err)
{
System.out.println("Error: " + err.getMessage());
}
finally
{
scanner.close();
}
}
public static void threaten_Make(
String title,
String text,
String name,
String email,
String phone,
String time,
String Save_Name
)
throws Exception
{
//make a new threaten page
//write title
String file = Save_Name + ".html";
String title_text = "<style>body{margin:20px;padding:20px}</style><meta name='viewport' content='width=device-width,initial-scale=1.0,user-scalable=0'><meta charset='utf-8' /><br /><br /><h1>" + title + "</h1>";
function.Wirte_Path(file, title_text);
//write text
String text_text = "<br /><p>" + text + "</p><br />";
function.Wirte_Path(file, text_text);
//write name
String name_text = "<p>Name: " + name + "</p>";
function.Wirte_Path(file, name_text);
//write email
String email_text = "<p>Email: " + email + "</p>";
function.Wirte_Path(file, email_text);
//write phone
String phone_text = "<p>Phone: " + phone + "</p>";
function.Wirte_Path(file, phone_text);
//write time
String time_text = "<br /><p>Time: " + time + "</p>";
function.Wirte_Path(file, time_text);
}
}