24 lines
568 B
PHP
24 lines
568 B
PHP
<?php
|
|
|
|
if (isset($_POST["ext"]))
|
|
{
|
|
if (isset($_POST["nomProgramme"]) && $_POST["nomProgramme"]=== "")
|
|
$_POST["nomProgramme"] = "tileset";
|
|
if ($_POST["ext"] === "3")
|
|
{
|
|
$fileContent = $_POST["codeSource"];
|
|
$title = $_POST["nomProgramme"];
|
|
header('Content-Type: application/octet-stream');
|
|
header('Content-Disposition: attachment;filename="'.$title.'.c"');
|
|
header('Cache-Control: max-age=0');
|
|
$fh = fopen('php://output', 'w');
|
|
fwrite($fh, $fileContent);
|
|
fclose($fh);
|
|
}
|
|
else
|
|
{
|
|
include('telechargerG1R.php');
|
|
}
|
|
}
|
|
|
|
?>
|