handle require_once and include_once, allow single quotes
[old-projects.git] / depview / file.php
index dc221d7..02e6a76 100644 (file)
@@ -1,12 +1,21 @@
 <?php
 require("config.inc.php");
 require("header.inc.php");
+
+/* validate parameters */
+if (!isset($_REQUEST['id'])) {
+  echo "no file specified";
+  include("footer.inc.php");
+  exit;
+}
+$id = $_REQUEST['id'];
 $res = mysql_query("select path from file where id=$id");
 if (!list($page)=mysql_fetch_row($res)) {
   echo "file $id not found";
   include("footer.inc.php");
   exit;
 }
+$d = isset($_REQUEST['d']) ? $_REQUEST['d'] : 0;
 ?>
 
 <h1>Dependencies for <?php echo $page; ?></h1>