Location: PHPKode > scripts > Lightning Notes > ln_distro/ln_distro/admin/file_update.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>update.app [lightning notes]</title>
    <link rel="stylesheet" media="screen" href="/inc/ADMIN/adm.css" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<?php
include ("config.php");
$out = $_POST['data'];
$out = str_replace('\\', '', $out);
$out = str_replace("\r\n", "\r", $out);

$line_count = 1; // Zeilenzaehler
$fp = fopen ('entries.xml', 'r');
$fileinp = '';

while ($line_count <= 3) { // Schleife bis zum Ende des Zeilenzaehlers
    $line_contents = fgets($fp, 4096); // Je eine Zeile
    $fileinp .= $line_contents;
    $line_count++; // ZeilenzŠhler plus 1
}
while (!feof($fp)) { // continue to end
    $line = fgets($fp, 4096);
    $fileinp2 .= $line;
}
fclose($fp);

$new = $fileinp;
$new .= $out;
$new .= $fileinp2;

$fh = fopen('entries.xml', 'w') or die("can't open file");
fwrite($fh,$new);
fclose($fh) or die("can't close file");

echo '<p><a href="/'.$CFGglobal['root'].'/admin/enter.php">Back</a> &#187;</p>'
?>

</body>
</html>
Return current item: Lightning Notes