/
end.php
42 lines (21 loc) · 991 Bytes
/
end.php
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
<?php
//session_start();
//$sourcecode = $_POST['code_input']."\n";
$sourcecode = $_SESSION['src']."\n";
$typeexport = htmlspecialchars($_POST['type']);
$converted_string = "";
$file = new converter($sourcecode, $_POST['conversion'], $_SESSION['lang'],"Gest");
$file->GetTypeOfDefinitionScreen(); //get the type of the windows (rel or abs)
if($_POST['conversion'] == 'Couleur - 83PCE/84+CE'){
$converted_string = $file->MonoToColor();
}elseif ($_POST['conversion'] == 'Monochrome - TI83(+)/84(+)(SE)') {
$converted_string = $file->ColorToMono();
}elseif($_POST['conversion'] == 'convert_none'){
$converted_string = $file->getSrc();
}
if(htmlspecialchars($_POST['type']) == 'expt_text'){
echo 'Votre code: <br /><br /><textarea class="TTREA_code" id="TTREA_code">'.$converted_string.'</textarea>';
}elseif (htmlspecialchars($_POST['type']) == 'expt_file') {
$_SESSION['src_conv'] = $converted_string;
include('export.php');
}