Téléverser les fichiers vers "/"
This commit is contained in:
parent
34eb0e7882
commit
21645afd54
59
print-code.php
Normal file
59
print-code.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
//$qtt = $_POST["qtt"];
|
||||||
|
$qtt = empty($_POST['qtt']) ? 1 : $_POST['qtt'];
|
||||||
|
$code = $_POST["code"];
|
||||||
|
|
||||||
|
|
||||||
|
// Commande pour exécuter le script Python avec les données du formulaire
|
||||||
|
$command = "python3 etiquettes-code-serial.py --qtt $qtt --code \"$code\"";
|
||||||
|
|
||||||
|
|
||||||
|
//echo "$command <br>";
|
||||||
|
|
||||||
|
// Exécutez la commande
|
||||||
|
$output = shell_exec($command);
|
||||||
|
|
||||||
|
// Affichez la sortie du script Python
|
||||||
|
//echo "Résultat du script Python :<br>";
|
||||||
|
//echo nl2br($output); // Affiche les sauts de ligne
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<title>Impression</title>
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.png">
|
||||||
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/bootstrap.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-secondary">
|
||||||
|
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
|
||||||
|
<div class="m-4 p-3 rounded border bg-light">
|
||||||
|
<h1>Les étiquettes sont imprimées</h1>
|
||||||
|
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<p>Etiquettes à code personnalisées envoyées</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="zpl.html" class="btn btn-primary btn-block">retour</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
61
print-custom.php
Normal file
61
print-custom.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
//$qtt = $_POST["qtt"];
|
||||||
|
$qtt = empty($_POST['qtt']) ? 1 : $_POST['qtt'];
|
||||||
|
$texte = $_POST["texte"];
|
||||||
|
|
||||||
|
|
||||||
|
// Commande pour exécuter le script Python avec les données du formulaire
|
||||||
|
$command = "python3 etiquettes-custom-serial.py --qtt $qtt --texte \"$texte\"";
|
||||||
|
|
||||||
|
|
||||||
|
//echo "$command <br>";
|
||||||
|
|
||||||
|
// Exécutez la commande
|
||||||
|
$output = shell_exec($command);
|
||||||
|
|
||||||
|
// Affichez la sortie du script Python
|
||||||
|
//echo "Résultat du script Python :<br>";
|
||||||
|
//echo nl2br($output); // Affiche les sauts de ligne
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<title>Impression</title>
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.png">
|
||||||
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/bootstrap.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-secondary">
|
||||||
|
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
|
||||||
|
<div class="m-4 p-3 rounded border bg-light">
|
||||||
|
<h1>Les étiquettes sont imprimées</h1>
|
||||||
|
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<?php
|
||||||
|
echo nl2br($output); // Affiche les sauts de ligne
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="custom.html" class="btn btn-primary btn-block">retour</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
70
print.php
Normal file
70
print.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
//$qtt = $_POST["qtt"];
|
||||||
|
$qtt = empty($_POST['qtt']) ? 1 : $_POST['qtt'];
|
||||||
|
$salle = $_POST["salle"];
|
||||||
|
$snum = $_POST["snum"];
|
||||||
|
$schar = $_POST["schar"];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($schar == "") {
|
||||||
|
// Commande pour exécuter le script Python avec les données du formulaire
|
||||||
|
$command = "python3 etiquettes-serial.py --qtt $qtt --salle $salle --snum $snum";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Commande pour exécuter le script Python avec les données du formulaire
|
||||||
|
$command = "python3 etiquettes-serial.py --qtt $qtt --salle $salle --snum $snum --schar $schar";
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo "$command <br>";
|
||||||
|
|
||||||
|
// Exécutez la commande
|
||||||
|
$output = shell_exec($command);
|
||||||
|
|
||||||
|
// Affichez la sortie du script Python
|
||||||
|
//echo "Résultat du script Python :<br>";
|
||||||
|
//echo nl2br($output); // Affiche les sauts de ligne
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<title>Impression</title>
|
||||||
|
|
||||||
|
<link rel="icon" href="favicon.png">
|
||||||
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/bootstrap.css">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-secondary">
|
||||||
|
<div class="d-flex justify-content-center align-items-center" style="height: 100vh;">
|
||||||
|
<div class="m-4 p-3 rounded border bg-light">
|
||||||
|
<h1>Les étiquettes sont imprimées</h1>
|
||||||
|
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<?php
|
||||||
|
echo nl2br($output); // Affiche les sauts de ligne
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="d-grid">
|
||||||
|
<a href="/" class="btn btn-primary btn-block">retour</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user