<?php
$katalog = $_GET['katalog'];
$katalog = "_ZGK";
{
print "Aktualny katalog: ".$skad."<br>************************<br>"; print "Sciezka: ".dirname($katalog."/.")." <br>************************<br>"; $i=0;
while (false !== ($file = readdir($otwiera))) {
if ($file != "." && $file != "..")
{
$fName = $file;
$file = $katalog.'/'.$file;
$tablica[$i][0] = $fName;
$tablica[$i][1] = $file;
$i++;
}
}
for ( $a=0 ; $a<count($tablica) ; $a++ )
{
$fName = $tablica[$a][0];
$file = $tablica[$a][1];
// echo( $file . "<br>" );
if ( is_file( $file ) ) // jeśli plik print "<img align='absmiddle' src='60.jpg'width='32' height='32'><a href='".$file."'>".$fName."</a>" . filesize($file) . " B<br>"; elseif ( is_dir($file) ) // jesli folder print "<img align='absmiddle' src='136.jpg'width='32' height='32'> <a href='index.php?katalog=".$file."'>".$fName."</a><br>";
}
if ( $up != "" )
{
print "<img align='absmiddle' src='wrooc.jpg'width='32' height='32'><a href='index.php?katalog=$up'> Cofnij katalog</a><br>"; }
}
$katalogrok = trim($_POST['katalogrok']); if($katalogrok) {
mkdir("_ZGK/Przetargi/". $katalogrok, 0777
); echo ("<script>alert('Dodano nowy rok prawidłowo');window.self.location.href='index.php';</script>"); }
?>
<form action="index.php" method="post">
Utwurz nowy rok:<br />
<input type="tinyint" name="katalogrok" /><br />
<input type="submit" value="utwórz" />
</form>
Witam!! potrzebuje pomocy aby zrobić takie cos gdy dodaje nazwe nowego folderu i wpisana nazwa juz istnieje niech wyskoczy komunikat taka nazwa juz istnieje.