Exemplo n.º 1
0
 } else {
     $bgcolor = $bgcolor_bright;
 }
 // get values of entry
 $aentry = $aaentry[$i];
 list(, $entryfile) = each($aentry);
 list(, $category) = each($aentry);
 list(, $title) = each($aentry);
 list(, $prio) = each($aentry);
 list(, $status) = each($aentry);
 list(, $filelist) = each($aentry);
 list(, $updated) = each($aentry);
 list(, $modified) = each($aentry);
 list(, $details) = each($aentry);
 // check if commit file exists
 if (file_exists(filedb_getcommitfile($entryfile))) {
     $cvsstat = "<font color=" . filedb_getstatuscolor("COMMIT") . ">commit</font>";
 } else {
     $cvsstat = "<font color=" . filedb_getstatuscolor("CURRENT") . ">current</font>";
 }
 // display entry
 echo "<tr>";
 echo "<td align=right bgcolor=" . $bgcolor . ">";
 echo $i + 1;
 echo "</td>";
 echo "<td align=center bgcolor=" . $bgcolor . ">";
 echo $prio;
 echo "</td>";
 echo "<td bgcolor=" . $bgcolor . ">";
 echo $category;
 echo "</td>";
Exemplo n.º 2
0
} else {
    if ($file != "") {
        // read file contents
        $hfile = fopen($file, "w");
        // write data
        fputs($hfile, "CATEGORY: " . $_POST["category"] . "\r\n");
        fputs($hfile, "TITLE: " . stripslashes(trim($_POST["title"])) . "\r\n");
        fputs($hfile, "PRIO: " . $_POST["prio"] . "\r\n");
        fputs($hfile, "STATUS: " . $_POST["status"] . "\r\n");
        fputs($hfile, "FILES: " . stripslashes(trim($_POST["filelist"])) . "\r\n");
        fputs($hfile, "UPDATED: " . trim($_POST["updated"]) . "\r\n");
        fputs($hfile, "\r\n");
        fputs($hfile, stripslashes($_POST["details"]));
        fclose($hfile);
        // write comment to comment file
        $hfile = fopen(filedb_getcommitfile($file), "w");
        fputs($hfile, stripslashes(stripslashes($comment)));
        fclose($hfile);
        // update
        echo "Data was saved successfully !<p>";
        // autoload details window again
        echo "<meta http-equiv=\"refresh\" content=\"0; URL=details.php?file=" . $file . "\">";
        // refresh list window
        echo "<script type=\"text/javascript\"><!-- \n parent.ListWindow.location.reload();\n--></script>";
    } else {
        echo "Internal error: could not save data !<br>";
    }
}
?>

Exemplo n.º 3
0
// load file
$file = $_GET["file"];
if ($file != "") {
    // read database
    $aentry = filedb_read($file);
    list(, $entryfile) = each($aentry);
    list(, $category) = each($aentry);
    list(, $title) = each($aentry);
    list(, $prio) = each($aentry);
    list(, $status) = each($aentry);
    list(, $filelist) = each($aentry);
    list(, $updated) = each($aentry);
    list(, $modified) = each($aentry);
    list(, $details) = each($aentry);
    // read commit comment if exists
    $comment = "";
    $commentfile = filedb_getcommitfile($file);
    if (file_exists($commentfile)) {
        $acomment = file($commentfile);
        for ($i = 0; $i < count($acomment); $i++) {
            $comment .= $acomment[$i];
        }
    }
    // include HTML form for editing an existing file
    // but comment may result out of an uncommitted add operation
    $newfile = $comment == "First revision";
    include "formcode.inc";
}
?>