Viewing File: /people/testlab/www/testlab.com.pl/panel/zapisz_zmiane_linka.php

<?
include('../config.php');
if (!islogin()) die();
include('../inc/db.php');
$db = new DBConnect();

$link = $_POST['nazwa'];
$link =str_replace(" ","_",$link);
$link =str_replace(",","",$link);
$link =str_replace("!","",$link);
$link =str_replace("?","",$link);
$link =str_replace(".","",$link);
$link =str_replace(":","",$link);
$link =str_replace(";","",$link);
$link =str_replace("\"","",$link);
$link =str_replace("/","",$link);
$link =str_replace("'","",$link);
$link =str_replace("-","_",$link);
$link =str_replace("__","_",$link);

$link =str_replace("ę","e",$link);
$link =str_replace("ó","o",$link);
$link =str_replace("ą","a",$link);
$link =str_replace("ś","s",$link);
$link =str_replace("ł","l",$link);
$link =str_replace("ż","z",$link);
$link =str_replace("ź","z",$link);
$link =str_replace("ć","c",$link);
$link =str_replace("ń","n",$link);

$link =str_replace("Ę","e",$link);
$link =str_replace("Ó","o",$link);
$link =str_replace("Ą","a",$link);
$link =str_replace("Ś","s",$link);
$link =str_replace("Ł","l",$link);
$link =str_replace("Ż","z",$link);
$link =str_replace("Ź","z",$link);
$link =str_replace("Ć","c",$link);
$link =str_replace("Ń","n",$link);

$link=$link.",".$_POST['id'];
$sql= "UPDATE `pages` SET `link`='".$link."' where id='".$_POST['id']."';";
$result = $db ->query($sql);

echo $link;
 //if ($result != 0) echo "<font color=green>Zmiany zostały zapisane.</font>";
 //else echo "<font color=red>Wystąpił błąd podczas zapisu danych!</font>";
?>
Back to Directory File Manager