diff Owls.php @ 2:ab74e95a8040

added display of broken nodes; Header and Footer in Owls.php now; added logos
author "Meillo r e t u r n s <meillo@marmaro.de>"
date Thu, 07 Dec 2006 21:04:30 +0100
parents 3021ce32ee14
children 3cacc24e1774
line wrap: on
line diff
--- a/Owls.php	Sun Dec 03 22:32:33 2006 +0100
+++ b/Owls.php	Thu Dec 07 21:04:30 2006 +0100
@@ -1,5 +1,78 @@
 <?php
-  require_once 'Includes/Header.inc.php';
+
+  define('DB_PREFIX', 'rem__1_');
+  define('TITLE', 'Owls');
+
+  require_once '../Db.inc.php';
+  require_once 'Includes/Loginsys.class.php';
+  include_once 'Includes/Bbcodeparser.inc.php';
+
+  $lsys = &new Loginsys();
+
+?>
+<!--
+
+                       `Owls' - some kind of wiki system
+
+
+                (c) Copyright  2006 &>  by Meillo  r e t u r n s
+
+         This program is free software; you can redistribute it and/or
+          modify it under the terms of the GNU General Public License
+         as published by the Free Software Foundation; either version 2
+             of the License, or (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+         but WITHOUT ANY WARRANTY; without even the implied warranty of
+         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+                  GNU General Public License for more details.
+
+
+                          http://prog.marmaro.de/owls/
+
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title><?php echo htmlentities(TITLE); ?></title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="shortcut icon" href="favicon.ico" />
+  <link rel="stylesheet" type="text/css" href="Owls.css.php" />
+  <script type="text/javascript">
+  <!--
+    function sureToDelete(id) {
+      if (window.prompt("Type 'delete' to delete","") == "delete") {
+        location.href = id +"d";
+      }
+    }
+
+/*  I want to use this function later ... perhaps
+    function toggleVisibility(boxId) {
+      if (document.getElementById('node'+ boxId).style.display == 'none') {
+        document.getElementById('node'+ boxId).style.display = "";
+        document.getElementById('ctrl'+ boxId).firstChild.nodeValue = "-";
+      } else{
+        document.getElementById('node'+ boxId).style.display = "none";
+        document.getElementById('ctrl'+ boxId).firstChild.nodeValue = "+";
+      }
+    }
+*/
+  //-->  
+  </script>
+</head>
+
+<body>
+<div id="websiteContainer">
+
+  <!-- Banner -->
+  <img src="Owls.png" id="banner" alt="<?php echo htmlentities(TITLE); ?>" />
+
+<?php
+
+
+
 
 
   if ($_GET['action'] == 'show') {    // show
@@ -29,7 +102,19 @@
   }
 
 
-  require_once 'Includes/Footer.inc.php';
+
+
+
+?>
+
+  </div>
+
+
+</div>
+
+</body>
+</html>
+<?php
 
 
 
@@ -142,16 +227,34 @@
 ?>
       <select name="editDoc_idCategory" style="width: 99%;">
 <?php
-      $result = mysql_query("select * from ". DB_PREFIX ."Owls order by name asc") or die(mysql_error());
+      $sql = sprintf("
+        select 
+          * 
+        from %sOwls 
+        where 
+          id != %d
+          and idParent != %d
+-- not in (
+--            select idParent from %sOwls
+--          )
+        order by name asc
+        ",
+        DB_PREFIX,
+        $row['id'],
+        $row['id'],
+        DB_PREFIX
+      );
+      $result = mysql_query($sql) or die(mysql_error());
+      unset($sql);
       while($rowCats = mysql_fetch_array($result)) {
-        echo '  <option value="'.$rowCats['id'].'"'. (($row['idParent'] == $rowCats['id']) ? ' selected="selected"' : '') .'>'.stripslashes($rowCats['name']).'</option>';
+        echo '  <option value="'.$rowCats['id'].'"'. (($row['idParent'] == $rowCats['id']) ? ' selected="selected" style="font-weight: bold;"' : '') .'>'.stripslashes($rowCats['name']).'</option>';
       }
 ?>
       </select><br /><br />
 <?php
     }
 ?>
-    <input name="editDoc_title" type="text" value="<?php echo stripslashes($row['name']); ?>" style="width: 99%;" /><br />
+    <input name="editDoc_title" type="text" value="<?php echo stripslashes($row['name']); ?>" style="width: 99%; font-weight: bold;" /><br />
     <textarea name="editDoc_text" cols="60" rows="15" style="width: 99%; height: 30em;"><?php
       echo stripslashes($row['text']);
     ?></textarea><br /><br />