Hallo
ich suche solch ein FAQ Modul wie es auf dieser Seite vorhanden ist. Oder alternativ ein Wiki Modul.
Thx
verwendete ilchClan Version: 1.1
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | <?php defined ( 'main' ) or die ( 'no direct access' ); defined ( 'admin' ) or die ( 'only admin access' ); include ( "include/includes/configs/faqsys.php" ); $design = new design ( 'Admins Area' , 'Admins Area' , 2); $design ->header(); if ( $menu ->get(1) == 'editcats' ){ $sql = "select * from $faqcats order by id" ; $result = db_query( $sql ); $numrows = db_num_rows( $result ); echo "<title>Hinzufügen/Beabreite kategorien</title>" ; for ( $x =0; $x < $numrows ; $x ++){ $resrow = db_fetch_row( $result ); $catid = $resrow [0]; $cattext = $resrow [1]; $cattext = stripslashes ( $cattext ); $cattext = htmlspecialchars( $cattext ); echo "<form name='form1' method='post' action='$adminfile'>$catid: <input type='text' name='cattext' value=\"$cattext\" maxlength='255' size='40'><input type='hidden' name='catid' value='$catid'><input type='submit' value='speichern'> [<a href='" . $adminfile . "-D$catid'>löschen</a>]</form>" ; } echo "<form name='form1' method='post' action='$adminfile'>Neue Kategorie: <input type='text' name='newcat' maxlength='255' size='40'><input type='submit' value='hinzufügen'></form>" ; } elseif ((isset( $_POST [ 'catid' ]) AND ! empty ( $_POST [ 'catid' ])) && (isset( $_POST [ 'cattext' ]) AND ! empty ( $_POST [ 'cattext' ]))){ $cattext = $_POST [ 'cattext' ]; $catid = $_POST [ 'catid' ]; $cattext = addslashes ( $cattext ); $sql = "update $faqcats set cat='$cattext' where id='$catid'" ; $result = db_query( $sql ) ; wd ( $adminfile , 'Erfolgreich geändert' , 3); } elseif (isset( $_POST [ 'newcat' ]) AND ! empty ( $_POST [ 'newcat' ])){ $newcat = $_POST [ 'newcat' ]; $newcat = addslashes ( $newcat ); $sql = "insert into $faqcats (`cat`) values ('$newcat')" ; $result = db_query( $sql ) or die (mysql_error()); wd ( $adminfile , 'Erfolgreich eingefügt' , 3); } elseif ( $menu ->getA(1) === 'D' ){ $deletecat = $menu ->getE(1); $sql = "delete from $faqcats where id='$deletecat'" ; $result = db_query( $sql ); $sql = "delete from $table where catid='$deletecat'" ; $result = db_query( $sql ); wd ( $adminfile , 'Erfolgreich gelöscht' , 3); } elseif ( $menu ->getA(1) === 'n' ){ $newentry = $menu ->getE(1); echo "<title>Füge neuen FAQ Eintrag hinzu</title>" ; echo "<form name= 'form1' method= 'post' action= '$adminfile' > Frage:<br> <input type= 'text' name= 'question' maxlength= '255' size= '40' > <br> Antwort:<br> <textarea name= 'answer' cols= '100' rows= '50' wrap= 'VIRTUAL' ></textarea> <br> <input type= 'hidden' name= 'catid' value= '$newentry' > <input type= 'hidden' name= 'addentry' value= '1' > <input type= 'submit' value= 'Neuer Eintrag' > </form>"; } elseif (isset( $_POST [ 'addentry' ]) && isset( $_POST [ 'question' ]) && isset( $_POST [ 'answer' ])&& isset( $_POST [ 'catid' ])){ $addentry = $_POST [ 'addentry' ]; $question = $_POST [ 'question' ]; $answer = $_POST [ 'answer' ]; $catid = $_POST [ 'catid' ]; $question = addslashes ( $question ); $answer = addslashes ( $answer ); $sql = "insert into $table values('', '$catid', '$question', '$answer', now())" ; $result = db_query( $sql ); wd ( $adminfile , 'Erfolgreich eingefügt' , 3); } elseif ( $menu ->getA(1) === 'd' ){ $deleteentry = $menu ->getE(1); $sql = "delete from $table where id='$deleteentry'" ; $result = db_query( $sql ); wd ( $adminfile , 'Erfolgreich gelöscht' , 3); } elseif ( $menu ->getA(1) === 'e' ){ $editentry = $menu ->getE(1); $sql = "select question,answer from $table where id='$editentry'" ; $result = db_query( $sql ); $resrow = db_fetch_row( $result ); $question = htmlspecialchars( $resrow [0]); $answer = htmlspecialchars ( $resrow [1]); echo "<title>Bearbeite FAQ Eintrag</title>" ; echo "<form name= 'form1' method= 'post' action= '$adminfile' > Frage:<br> <input type= 'text' name= 'question' maxlength= '255' size= '40' value=\" $question \"> <br> Antwort:<br> <textarea name= 'answer' cols= '100' rows= '50' wrap= 'VIRTUAL' > ".stripslashes($answer)." </textarea> <br> <input type= 'hidden' name= 'faqid' value= '$editentry' > <input type= 'hidden' name= 'saveentry' value= '1' > <input type= 'submit' value= 'Speichere änderung' > </form>"; } elseif (isset( $_POST [ 'saveentry' ]) && isset( $_POST [ 'question' ]) && isset( $_POST [ 'answer' ]) && isset( $_POST [ 'faqid' ])){ $saveentry = $_POST [ 'saveentry' ]; $question = $_POST [ 'question' ]; $answer = $_POST [ 'answer' ]; $faqid = $_POST [ 'faqid' ]; $question = addslashes ( $question ); $answer = bbcode( $answer ); $answer = addslashes ( $answer ); $sql = "update $table set question='$question', answer='$answer' where id='$faqid'" ; $result = db_query( $sql ) ; wd ( $adminfile , 'Erfolgreich geändert' , 3); } else { $erg = db_query( "select * from $faqcats order by id" ); $cats = '' ; while ( $row = db_fetch_assoc( $erg )){ $cats .= '<option value="' . $row [ 'id' ]. '">' . $row [ 'cat' ]. '</option>' ;} ?> <script type= "text/javascript" > <!-- function chooseCat(){ var cat_value = document.getElementById( 'takeCat' ).value; if (cat_value > 0){ document.location.href= 'admin.php?faqsys-n' + cat_value; return true } alert( 'Bitte eine Kategorie auswählen' ); } //--> </script><noscript>Ihr Browser unterstützt kein JavaScript!</noscript> <table cellpadding= "0" cellspacing= "0" border= "0" > <tr><td><img src= "include/images/icons/admin/news.png" /> </td><td width= "30" ></td><td valign= "bottom" ><h1>FAQ</h1> </td></tr><tr><td colspan= "3" ><hr></td></tr> <tr class = "Chead" ><td> <a href= "admin.php?faqsys-editcats" >Kategorie anlegen</a> </td><td></td><td><select name= "cat" id= "takeCat" ><option value= "0" >Bitte wählen</option><?php echo $cats ; ?></select> <a href= "javascript: chooseCat()" >Neuer Eintrag</a> </td></tr> </table> <?php } $design ->footer(); ?> |
Geschlossen | ||
![]() |
Zurück zu Module und Modifikationen |