| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Neuer Benutzer Registriert seit: 14.07.2008
Beiträge: 18
![]() | Das ist mein ADMIN[php]<?php if ($eingabe != $passwort) { die (" <tr> <td colspan='3' style='padding:10px;'> <p class='d' style='text-align:center; margin-right:10px; margin-top:5px;'> Der Administrationsbereich ist mit einem Passwort geschützt. </p> </td> </tr> <tr> <td colspan='3'> <form name='administration' action='index.php' method='post'> <input type='hidden' name='id' value='admin'> <p class='d' style='text-align:center;'>Passwort:<input type='password' name='eingabe' maxlength='7' size='12' class='d'><input class='d' type='submit' name='login' value='login' style='width:80px; border:1px solid #5db0ff; color:#ffffff; background-color:#004080;'> </p> </form> </td> </tr> </table> </body> </html> "); } else { // löschen if ($loeschen) { $zeile = array(); $speichern = array(); $loeschen = ereg_replace("","",$loeschen); $loeschen = ereg_replace(" ","",$loeschen); $groesse = filesize("gaestebuch.txt"); $datei = fopen("gaestebuch.txt","r"); while (!feof($datei)) { $zeile = fgets($datei,$groesse); $teil = explode("&&",$zeile); $datum = ereg_replace("","",$teil[0]); $datum = ereg_replace(" ","",$datum); if ($datum != $loeschen) { array_push($speichern,$zeile); } } fclose($datei); $datei = fopen("gaestebuch.txt","w"); foreach ($speichern as $x) { fputs($datei,"$x");} fclose($datei); } echo " <tr> <td colspan='3'> <p class='f' style='text-align:center; margin-right:10px;'> Administrationsbereich</p> <p class='d' style='text-align:center; margin-right:10px;'> Den zu löschenden Eintrag markieren und mit der Schaltfläche "löschen" aus dem Gästebuch entfernen. </p> <table cellpadding='0' cellspacing='0' width='690' summary='' style='color:#ffffff; background-color:inherit; margin:10px; border-top:1px dashed #5db0ff;'> "; $eintrag = array(); $lesen = array(); $teil = array(); if (file_exists("gaestebuch.txt") && filesize("gaestebuch.txt") > 1) { $groesse = filesize("gaestebuch.txt"); $datei = fopen("gaestebuch.txt","r"); while (!feof($datei)){ $lesen = fgets($datei,$groesse); array_push($eintrag,$lesen); } array_pop($eintrag); arsort($eintrag); foreach ($eintrag as $zeile) { $teil = explode("&&",$zeile); $sekunden = $teil[0]; $zeit_eintrag = $teil[1]; $name = $teil[2]; $ort = $teil[3]; $email = $teil[4]; $homepage = $teil[5]; $eintrag = $teil[6]; $name = htmlspecialchars($name); $ort = htmlspecialchars($ort); $eintrag = htmlspecialchars($eintrag); $eintrag = str_replace("<br>"," ",$eintrag); if ($sekunden > 0) { $anzeige = "ja"; echo " <tr> <td style='vertical-align:middle; border-bottom:1px dashed #5db0ff;'> <input class='d' type='button' name='auswahl' value='löschen' style='border:1px solid #ffffff; color:#ffffff; background-color:004090;' onClick=\"self.location.href='index.php?id=admin&e ingabe=$eingabe&loeschen=$sekunden'\"> </p> </td> <td style='border-bottom:1px dashed #5db0ff;'> <table class='b' style='color:#ffffff; background-color:inherit;' summary=''> <tr> <td colspan='3' style='padding-left:20px; padding-right:20px;'> <p class='b'> $zeit_eintrag</p> </td> </tr> <tr> <td colspan='3' style='padding-left:20px; padding-right:20px; padding-top:2px;'> <p class='b'>[img]bilder/gb_person.gif[/img]$name ($ort)"; // Email verschlüsseln $emailcr = ""; for ($i=0;$i<strlen($email);$i++) { $emailcr .= "&#".ord(substr($email,$i)).";"; } echo "|[img]bilder/gb_email.gif[/img]$emailcr"; if ($homepage) { $url = @parse_url($homepage); echo " | [img]bilder/gb_homepage.gif[/img]$url[host]"; } echo " </p> </td> </tr> <tr> <td colspan='3' style='padding-left:20px; padding-right:20px; padding-top:10px;'> <p class='b'>$eintrag </p> </td> </tr> </table> </td> </tr> "; } } } if (!$anzeige) { echo " <tr> <td colspan='3'> <p class='d' style='text-align:center;'> Keine Einträge vorhanden. </p> </td> </tr> "; } die (" </table> </td> </tr> </table> </body> </html> "); } ?> |
| |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| If admin keine werbung | haufe | PHP Tipps 2008 | 6 | 19.02.2008 09:35 |
| Php my Admin nicht dargestellt | lolipop 999 | Server, Hosting und Workstations | 8 | 31.10.2006 12:37 |
| Admin Buttom ist weg | PHP Tipps 2006 | 11 | 19.01.2006 10:19 | |
| UPDATE im admin Panel | T-sneak | PHP Tipps 2005-2 | 6 | 01.07.2005 00:16 |
| Admin bereich für ein php Gästebuch!! | webmaster_andre | Beitragsarchiv | 10 | 01.06.2005 19:58 |
| MySQL Admin User "root" hat kein Passwort | PHP Tipps 2005 | 7 | 24.05.2005 17:27 | |
| Junior Admin 2.0.5 und phpBB 2.0.13 Kompitabel ?? | Beitragsarchiv | 1 | 02.04.2005 15:26 | |
| Php My Admin | PHP Tipps 2005 | 10 | 01.03.2005 14:07 | |
| PHP My Admin | Lia | PHP Tipps 2005 | 9 | 02.02.2005 17:01 |
| Ich kann mich als Admin nicht mehr einloggen!!! Sicheren.... | PHP Tipps 2004-2 | 2 | 24.12.2004 08:32 | |
| als admin löschen? | PHP Tipps 2004-2 | 5 | 27.11.2004 18:59 | |
| Error im bereich admin | PHP Tipps 2004 | 5 | 28.09.2004 20:46 | |
| admin einstellungen | PHP Tipps 2004 | 5 | 27.08.2004 02:07 | |
| [Erledigt] Phpkit Problem. Komme im Admin nicht in den bereich Template | PHP Tipps 2004 | 10 | 11.07.2004 18:22 | |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.