Advertisement
Aichan

edit.php

Jan 6th, 2013
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. <?php
  2. include 'config.php';
  3.  
  4. if(isset($_POST['source']) && isset($_POST['id']) && isset($_POST['name']) && isset($_POST['pass']) ) {
  5.    
  6.     if(file_exists($base_path . stripShit($_POST['id']) . "/pass_" . stripShit($_POST['pass']) )){
  7.        
  8.         $path = $base_path . stripShit($_POST['id']) . "/" . stripShit($_POST['name']);
  9.         $file = fopen($path, "w");
  10.         if(!$file)
  11.             echo "Could not open file";
  12.         else {
  13.             $string = iconv( 'UTF-8', 'ISO-8859-15//TRANSLIT', $_POST['source'] );
  14.             $freturn = fwrite($file, $string);
  15.             fclose($file);
  16.             echo "File saved";
  17.         }
  18.        
  19.     } else echo "Password incorrect";
  20. } else echo "NOT_ENOUGH_DATA";
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement