//(Listing 3. Biblioteka funkcji - fnews.inc) ============================================== Administracja
">Główna | ">Dodaj | ">Wykaz 

$maxID) $maxID = $tmpID; } return $maxID; } /* wykaz wpisów */ function ListNewsAdm(){ global $PHP_SELF, $PHP_AUTH_USER, $newsy, $pos; $count = 5; $content = file($newsy["newsFile"]); $size = count($content); echo "
"; for($i=0; $i ($tmp-$count); $i--){ if(($content[$i] != '') && ($myLINES[$i][0] != "#")){ $viewADR = basename($PHP_SELF)."?cmd=view&id=".$myLINES[$i][0]; $nameADR = stripslashes($myLINES[$i][2]); $editADR = basename($PHP_SELF)."?cmd=edit&id=".$myLINES[$i][0]; $delADR = basename($PHP_SELF)."?cmd=del&id=".$myLINES[$i][0]; echo ""; echo ""; ?>
" .$myLINES[$i][1]." Edytuj |   Kasuj 

".($i+1)."  "; } else { ?>" style="font-size: 8pt">   Dostępnych jest    pozycji. 0){ ?>  << $pos+$count){ ?> >>
".$id."
"; ?>


">Edytuj | Powrót
", "\n", $myLINES[$i][3]); $tmp2 = str_replace("
", "\n", $myLINES[$i][4]); $tmp1 = stripslashes($tmp1); $tmp2 = stripslashes($tmp2); ?>
Modyfikacja nr
Data:
Tytuł:
Wstęp:
Treść:
Autor:  
", $tmp); $tmp = str_replace("\r", "", $tmp); $content = file($newsy["newsFile"]); $size = count($content); $fp = @fopen($newsy["newsFile"].".tmp", "w+"); for($line=0; $line
Dodaj artykuł
Data:
Tytuł:
Wprowadzenie:
Treść
Autor:   

", $tmp); $tmp = str_replace("\r", "", $tmp); $fp=@fopen($newsy["newsFile"], "a"); if($fp <= 0){ echo "Błąd otwarcia zbioru"; } fputs($fp, $tmp."\n"); fclose($fp); } /* kasowanie */ function delNews(){ global $newsy, $id; $content = file($newsy["newsFile"] ); $size = count($content); $fp = @fopen($newsy["newsFile"].".tmp", "w+"); for($i=0; $i