Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/GUI/Actions/Map.php
1071 views
1
<?php
2
/*ORIGINAL CREATOR: Luca Garofalo (Lucksi)
3
AUTHOR: Luca Garofalo (Lucksi)
4
Copyright (C) 2023 Lucksi <[email protected]>
5
License: GNU General Public License v3.0*/
6
7
function Get_Message($Type,$Param){
8
require_once ("Language_Controller.php");
9
$Message = Message($Type,$Param);
10
return $Message;
11
}
12
13
function Toolbar($final,$Mess1,$Mess2){
14
require("Builder.php");
15
NewMapConstructor($final,$Mess1,$Mess2);
16
}
17
18
function filenae(){
19
$filename = $_POST["bar1"];
20
$filename2 = '" "';
21
$final = str_replace(" ",$filename,$filename2);
22
$path = "../Maps/{$filename}/{$filename}.mh";
23
$path2 = "../Maps/{$filename}/encode.mh";
24
if(file_exists($path)){
25
$Message = Get_Message("Positives","Graph");
26
echo "
27
<script>
28
alert('$Message');
29
</script>";
30
}
31
else{
32
$Mess1 = Get_Message("Question","Graph");
33
$Msg = '" "';
34
$finalMsg = str_replace(" ",$Mess1,$Msg);
35
$Mess2 = Get_Message("Question","Reset");
36
$Msg2 = '" "';
37
$finalMsg2 = str_replace(" ",$Mess2,$Msg2);
38
mkdir("../Maps/{$filename}",0777);
39
chmod("../Maps/{$filename}",0777);
40
$tmp = "../Maps/Temp.txt";
41
$tmp2 = "../Maps/TempEncode.txt";
42
$d = fopen($tmp,"w");
43
fwrite($d,$path);
44
fclose($d);
45
$d = fopen($tmp2,"w");
46
fwrite($d,$path2);
47
fclose($d);
48
Toolbar($final,$finalMsg,$finalMsg2);
49
}
50
}
51
if(isset($_POST["Button"])){
52
filenae();
53
}
54
?>
55
56