Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <html><head>
  3. <title>Mensagem na tela p/ Michel</title>
  4. <style type="text/css">
  5. body
  6. {
  7.   font-family: Ubuntu, Verdana;
  8.   font-size: 12px;
  9. }
  10. .input
  11. {
  12.   padding: 4px;
  13.   text-align:left;
  14.   margin: 2px;
  15.   -moz-border-radius: 5px;
  16.   color:#f00;
  17.   font-size: 13px;
  18.   font-weight:bold;
  19.   border: 2px solid #ccc;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <h1>Enviar mensagem</h1>
  25. <?php print_r($_POST)?>
  26. <?php print_r($_GET)?>
  27. <?php echo trim(file_get_contents('php://input'));?>
  28. <?php if(!isset($_POST['msg'])):?>
  29. <form action="notify.php" method="POST">
  30. Escreva a mensagem a ser enviada<br/>
  31. <input type="text" class="input" name="msg" style="width: 400px" />
  32. <input type="submit" value="Enviar mensagem" name="btn"/>
  33. </form>
  34. <?php else:?>
  35. <?php shell_exec('DISPLAY=:0 notify-send "'.$_POST['msg'].'"')?>
  36. <p>Mensagem enviada com sucesso! <a href="notify.php">Enviar outra :)</a></p>
  37. <?php endif?>
  38. <hr>
  39. <address>Obrigado!</address>
  40. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement