<?php 

$curr = strtolower($_POST['emu'] );
$name = $_POST['name'] ;
$content = stripcslashes( $_POST['data'] ) ;
$datalen = $_POST['datalen'] ;

print_r( $_GLOBALS ) ;
print_r( $_GET ) ;

$filename = "configs/" . $curr . "/" . $name ;

print $curr . "\r\n" . $name . "\r\n" . $datalen . "\r\n" . $filename ;

if (file_exists($filename)) 
{
   print '!!!' ;
}
else
{
   $handle = fopen( $filename, "wb" ) ;

   if ( $handle )
   {
      fputs( $handle, $content, $datalen ) ;
      fclose( $handle ) ;
      print '^^^' ;
   }
   else
   {
      print '@@@' ;
   }

}



?>