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 | <?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $title = $allgAr [ 'title' ]. ' :: Wunschbox ' . $lang [ 'archiv' ]; $hmenu = 'Wunschbox ' . $lang [ 'archiv' ]; $design = new design ( $title , $hmenu ); $design ->header(); if ( $_SESSION [ 'authright' ] <= -3) { # delete if ( $menu ->getA(1) == 'd' AND is_numeric ( $menu ->getE(1))) { db_query( "DELETE FROM prefix_wunschbox WHERE id = " . $menu ->getE(1)); } # delete all if ( $menu ->get(1) == 'delall' ) { if ( is_numeric ( $menu ->get(2))) { $anz = db_result(db_query( "SELECT COUNT(*) FROM `prefix_wunschbox`" ),0) - $menu ->get(2); if ( $anz > 0) { db_query( "DELETE FROM `prefix_wunschbox` LIMIT $anz" ); } } else { db_query( "DELETE FROM `prefix_wunschbox`" ); } } } echo '<script type= "text/javascript" > function del() { if (anz = prompt( "Wieviele Einträge sollen erhalten bleiben?\n(Es werden die zuletzt geschriebenen erhalten)" , "0" )) { if (anz >= 0) { window.location.href = "index.php?wunscharch-delall-" +anz; } else alert( "Du musst eine Zahl größer gleich 0 eingeben" ); } } </script>'; $class = 'Cnorm' ; echo '<table width="100%" align="center" class="border" cellpadding="2" cellspacing="1" border="0"><tr class="Chead"><td colspan="2"><b>Wunschbox ' . $lang [ 'archiv' ]. '</b></td></tr>' ; $erg = db_query( 'SELECT * FROM `prefix_wunschbox` ORDER BY id DESC' ); while ( $row = db_fetch_assoc( $erg ) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); echo '<tr class="' . $class . '"><td width="35%">' ; if ( $_SESSION [ 'authright' ] <= -3 ) { echo '<a href="index.php?wunscharch-d' . $row [ 'id' ]. '"><img src="include/images/icons/del.gif" alt="' . $lang [ 'delete' ]. '" title="' . $lang [ 'delete' ]. '"></a> ' ; } echo '<b>' . $row [ 'nickname' ].'</b> </td><td> <u>Wunsch:</u> '.preg_replace( ' /([^\s]{ '.$allgAr[' sb_maxwordlength '].' })(?=[^\s])/ ', "$1\n", $row[' wunsch ']).' <br> <u>Text:</u> '.preg_replace( ' /([^\s]{ '.$allgAr[' sb_maxwordlength '].' })(?=[^\s])/ ', "$1\n", $row[' textarea ']).' </td></tr>'; } echo '</table>' ; if ( $_SESSION [ 'authright' ] <= -3) { echo '<a href="javascript:del();">Wunschbox Leeren</a>' ; } $design ->footer(); ?> |
1 | if ($_SESSION['authright'] <= -3) { |
Geschlossen | ||
![]() |
Zurück zu Module und Modifikationen |