Advertisement
aea2021

fmp2

Aug 12th, 2022
1,026
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.68 KB | None | 0 0
  1. <?php
  2.  
  3. if($_POST['addition']){
  4.  
  5.  
  6. $file_open = fopen("data.txt","w+"); //fopen("something.txt","a+"); to add the contents to file
  7. fwrite($file_open, $_POST['fmpdata']);
  8. fclose($file_open);
  9. }
  10. ?>
  11.  
  12. <html>
  13.     <head>
  14.         <title>Auto FMP</title>
  15.         <meta name="author" content="ZOUANE Othmane">
  16.         <style>
  17.             body
  18.                 {
  19.                     font-family:  'Calibri';
  20.                 }
  21.             * {
  22.               box-sizing: border-box;
  23.             }
  24.  
  25.             .row {
  26.               margin-left:-5px;
  27.               margin-right:-5px;
  28.             }
  29.              
  30.             .column {
  31.               float: left;
  32.               width: 90%;
  33.               padding: 5px;
  34.             }
  35.  
  36.             /* Clearfix (clear floats) */
  37.             .row::after {
  38.               content: "";
  39.               clear: both;
  40.               display: table;
  41.             }
  42.  
  43.             table {
  44.               border-collapse: collapse;
  45.               border-spacing: 0;
  46.               width: 100%;
  47.               border: 3px solid #000;
  48.             }
  49.  
  50.             th  {
  51.               text-align: center;
  52.               background-color: #ffd466;
  53.              
  54.             }
  55.              td {
  56.               text-align: center;
  57.                
  58.             }
  59.             tr:nth-child(even) {
  60.               background-color: #f2f2f2;
  61.             }
  62.            
  63.             #btnPaste{
  64.                 background-color: #17a2b8;
  65.               border: none;
  66.               color: white;
  67.               padding: 15px 32px;
  68.               text-align: center;
  69.               text-decoration: none;
  70.               display: inline-block;
  71.               font-size: 20px;
  72.               border-radius: 12px;
  73.               margin-right : 50px;
  74.               }
  75.               #btnPaste:hover {
  76.               background-color: #17a9b6; /* Green */
  77.               color: white;
  78.              
  79.             }
  80.              
  81.              
  82.              
  83.             #btnAdd{
  84.                 background-color: #4CAF50; /* Green */
  85.               border: none;
  86.               color: white;
  87.               padding: 15px 32px;
  88.               text-align: center;
  89.               text-decoration: none;
  90.               display: inline-block;
  91.               font-size: 20px;
  92.               border-radius: 12px;
  93.               }
  94.               #btnAdd:hover {
  95.               background-color: #4C9F50; /* Green */
  96.               color: white;
  97.             }
  98.     </style>
  99.         </head>
  100.         <body>
  101.             <div class="row">
  102.                                 <div class="column">
  103.         <form method="POST" action="<?=$PHP_SELF?>">
  104.             <textarea style="background-color:#ffd466;" placeholder="Paste data" name="fmpdata" id="fmpdata" rows="15" cols="70">
  105.            
  106.             </textarea>
  107.             <BR><BR>
  108.             <button id ="btnPaste" type="button" onclick="pasteIt()">PASTE</button>
  109.             <button  type="submit" name="SubmitFile" id ="btnAdd" type="button" onclick="upload()">UPLOAD</button>
  110.             <BR>
  111.                
  112.                         <BR>
  113.                            
  114.                             </form>
  115.                                     </div>
  116.                                     <div class="column">
  117.                                    
  118.                                
  119.        
  120.  
  121.  
  122.  
  123.  
  124.                
  125.         <script>
  126.                                  function upload() {
  127.                                  
  128.                                    
  129.                                        
  130.                                    
  131.                                 }
  132.                                 async function pasteIt() {
  133.                                     var fmp = document.getElementById("fmpdata");
  134.                                     var pasted = await navigator.clipboard.readText();
  135.                                     fmp.value = pasted;
  136.                                                
  137.                                            
  138.                                 }
  139.      
  140.         </script>
  141.        
  142.     </body>
  143. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement