Advertisement
Guest User

idontknowlulz

a guest
Aug 22nd, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.03 KB | None | 0 0
  1. <?php
  2. if(basename($_SERVER["SCRIPT_FILENAME"]) == basename(__FILE__)) { header ("HTTP/1.1 404 Not Found"); exit; }
  3.  
  4. echo '<span style="font-size: 13px;"><b>&raquo; Informationen bearbeiten</b></span><br><hr><br>';
  5.  
  6. if(isset($_REQUEST['absenden']))
  7. {
  8.     $information = $_REQUEST['information'];
  9.  
  10.     if($information=="")
  11.     {
  12.         echo '<div style="text-align: right; color: #B40404; float: right; margin-top: -45px;">&#10006; Bitte &uuml;berpr&uuml;fe, ob alle Felder ausgef&uuml;llt sind.</div>';
  13.  
  14.         ?>
  15.         <form action="<?php $PHP_SELF; ?>" style="margin-right: 20px;" method="post">
  16.         <blockquote>
  17.         <div style="float: left;">
  18.             &raquo; Information Frontend<br><textarea name="information" wrap="virtual" style="padding: 3px; margin-bottom: 5px; border:1px solid #CCCCCC; background-color:#FAFAFA; width: 300px; height: 50px;"><?php echo $information; ?></textarea>
  19.     </div>
  20. <br><br>
  21.     </div>
  22.         </blockquote><br><br><br><br><br><br><br><br><hr>
  23.         <input type="text" value="<?php echo $username; ?>" style="padding: 3px; text-align: center; margin-bottom: 5px; border:1px solid #CCCCCC; background-color:#FAFAFA; width: 150px;" disabled>
  24.         <input type="text" value="<?php echo date("d.m.Y",$timestamp); ?>" style="padding: 3px; text-align: center; margin-bottom: 5px; border:1px solid #CCCCCC; background-color:#FAFAFA; width: 150px;" disabled>
  25.         <input type="submit" name="absenden" value="Information bearbeiten" style="float: right; margin-right: -7px; padding: 3px; margin-bottom: 5px; border:1px solid #CCCCCC; background-color: #F2F2F2; width: 200px;">
  26.         </form>
  27. <?php
  28.    
  29.    
  30.     if(isset($_POST['submit']))
  31.     {
  32.       $pfad = $path_db_info;     
  33.       $datei = fopen($pfad, "w");
  34.       fwrite($datei, $information);
  35.       fclose($datei);
  36.       }
  37.     echo
  38.             <blockquote style="margin-top: -5px; margin-left: 20px; margin-right: 35px;">          
  39.             <div style="margin-top: 2px; background-color: #317994; width: 100%; height: auto; padding: 5px;">
  40.                 <div style="float: left; width: 190px;">'.$information.'</div>
  41.               </a>
  42.             </div>         
  43.             </blockquote>';
  44. }
  45.  
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement