Mercurial > owls
comparison 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 |
comparison
equal
deleted
inserted
replaced
1:6268cdb5fc0b | 2:ab74e95a8040 |
---|---|
1 <?php | 1 <?php |
2 require_once 'Includes/Header.inc.php'; | 2 |
3 define('DB_PREFIX', 'rem__1_'); | |
4 define('TITLE', 'Owls'); | |
5 | |
6 require_once '../Db.inc.php'; | |
7 require_once 'Includes/Loginsys.class.php'; | |
8 include_once 'Includes/Bbcodeparser.inc.php'; | |
9 | |
10 $lsys = &new Loginsys(); | |
11 | |
12 ?> | |
13 <!-- | |
14 | |
15 `Owls' - some kind of wiki system | |
16 | |
17 | |
18 (c) Copyright 2006 &> by Meillo r e t u r n s | |
19 | |
20 This program is free software; you can redistribute it and/or | |
21 modify it under the terms of the GNU General Public License | |
22 as published by the Free Software Foundation; either version 2 | |
23 of the License, or (at your option) any later version. | |
24 | |
25 This program is distributed in the hope that it will be useful, | |
26 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 GNU General Public License for more details. | |
29 | |
30 | |
31 http://prog.marmaro.de/owls/ | |
32 | |
33 --> | |
34 | |
35 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
36 | |
37 <html xml:lang="de" xmlns="http://www.w3.org/1999/xhtml"> | |
38 <head> | |
39 <title><?php echo htmlentities(TITLE); ?></title> | |
40 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
41 <link rel="shortcut icon" href="favicon.ico" /> | |
42 <link rel="stylesheet" type="text/css" href="Owls.css.php" /> | |
43 <script type="text/javascript"> | |
44 <!-- | |
45 function sureToDelete(id) { | |
46 if (window.prompt("Type 'delete' to delete","") == "delete") { | |
47 location.href = id +"d"; | |
48 } | |
49 } | |
50 | |
51 /* I want to use this function later ... perhaps | |
52 function toggleVisibility(boxId) { | |
53 if (document.getElementById('node'+ boxId).style.display == 'none') { | |
54 document.getElementById('node'+ boxId).style.display = ""; | |
55 document.getElementById('ctrl'+ boxId).firstChild.nodeValue = "-"; | |
56 } else{ | |
57 document.getElementById('node'+ boxId).style.display = "none"; | |
58 document.getElementById('ctrl'+ boxId).firstChild.nodeValue = "+"; | |
59 } | |
60 } | |
61 */ | |
62 //--> | |
63 </script> | |
64 </head> | |
65 | |
66 <body> | |
67 <div id="websiteContainer"> | |
68 | |
69 <!-- Banner --> | |
70 <img src="Owls.png" id="banner" alt="<?php echo htmlentities(TITLE); ?>" /> | |
71 | |
72 <?php | |
73 | |
74 | |
75 | |
3 | 76 |
4 | 77 |
5 if ($_GET['action'] == 'show') { // show | 78 if ($_GET['action'] == 'show') { // show |
6 show($lsys); | 79 show($lsys); |
7 | 80 |
27 show($lsys); | 100 show($lsys); |
28 | 101 |
29 } | 102 } |
30 | 103 |
31 | 104 |
32 require_once 'Includes/Footer.inc.php'; | 105 |
106 | |
107 | |
108 ?> | |
109 | |
110 </div> | |
111 | |
112 | |
113 </div> | |
114 | |
115 </body> | |
116 </html> | |
117 <?php | |
33 | 118 |
34 | 119 |
35 | 120 |
36 | 121 |
37 | 122 |
140 <?php | 225 <?php |
141 if ($_GET['id'] != 1) { | 226 if ($_GET['id'] != 1) { |
142 ?> | 227 ?> |
143 <select name="editDoc_idCategory" style="width: 99%;"> | 228 <select name="editDoc_idCategory" style="width: 99%;"> |
144 <?php | 229 <?php |
145 $result = mysql_query("select * from ". DB_PREFIX ."Owls order by name asc") or die(mysql_error()); | 230 $sql = sprintf(" |
231 select | |
232 * | |
233 from %sOwls | |
234 where | |
235 id != %d | |
236 and idParent != %d | |
237 -- not in ( | |
238 -- select idParent from %sOwls | |
239 -- ) | |
240 order by name asc | |
241 ", | |
242 DB_PREFIX, | |
243 $row['id'], | |
244 $row['id'], | |
245 DB_PREFIX | |
246 ); | |
247 $result = mysql_query($sql) or die(mysql_error()); | |
248 unset($sql); | |
146 while($rowCats = mysql_fetch_array($result)) { | 249 while($rowCats = mysql_fetch_array($result)) { |
147 echo ' <option value="'.$rowCats['id'].'"'. (($row['idParent'] == $rowCats['id']) ? ' selected="selected"' : '') .'>'.stripslashes($rowCats['name']).'</option>'; | 250 echo ' <option value="'.$rowCats['id'].'"'. (($row['idParent'] == $rowCats['id']) ? ' selected="selected" style="font-weight: bold;"' : '') .'>'.stripslashes($rowCats['name']).'</option>'; |
148 } | 251 } |
149 ?> | 252 ?> |
150 </select><br /><br /> | 253 </select><br /><br /> |
151 <?php | 254 <?php |
152 } | 255 } |
153 ?> | 256 ?> |
154 <input name="editDoc_title" type="text" value="<?php echo stripslashes($row['name']); ?>" style="width: 99%;" /><br /> | 257 <input name="editDoc_title" type="text" value="<?php echo stripslashes($row['name']); ?>" style="width: 99%; font-weight: bold;" /><br /> |
155 <textarea name="editDoc_text" cols="60" rows="15" style="width: 99%; height: 30em;"><?php | 258 <textarea name="editDoc_text" cols="60" rows="15" style="width: 99%; height: 30em;"><?php |
156 echo stripslashes($row['text']); | 259 echo stripslashes($row['text']); |
157 ?></textarea><br /><br /> | 260 ?></textarea><br /><br /> |
158 <input name="editDoc" type="submit" value="edit" class="button" style="width: 99%;" /> | 261 <input name="editDoc" type="submit" value="edit" class="button" style="width: 99%;" /> |
159 </form> | 262 </form> |