Zapis zmian
Zmiany zostaĆy zapisane
include('../lerto-config.php'); if(!empty($_COOKIE['user_adm'])) { $r=$db->query('SELECT password FROM administracja WHERE password="'.$_COOKIE['user_adm'].'" LIMIT 1;'); if($m=$r->fetch()) {} else { header('Location: ./'); exit(); } } else { header('Location: ./'); exit(); } if (strlen($_POST['dane'])) { $_POST['dane'] = str_replace("\r\n","",$_POST['dane']); $_POST['dane'] = str_replace("\n"," ",$_POST['dane']); $_POST['dane'] = str_replace("","",$_POST['dane']); $_POST['dane'] = str_replace(" "," ",$_POST['dane']); $_POST['dane'] = str_replace("|","",$_POST['dane']); $_POST['dane'] = str_replace("\\\"","\"",$_POST['dane']); //$_POST['dane'] = str_replace("\n"," ",$_POST['dane']); //$_POST['dane'] = str_replace("\\\"","\"",$_POST['dane']); //$_POST['dane'] = htmlspecialchars($_POST['dane']); $fp=fopen("../txt/" . $_POST['plik'], "w"); flock($fp, 2); fwrite($fp, $_POST['dane']); flock($fp, 3); fclose($fp); } ?>
Zmiany zostaĆy zapisane