ich muss mein PHPbb noch ein wenig aufpimpen. Dazu habe ich ein kleines Script geschrieben. Dies funktioniert auch wunderbar, zumindest ohne das PHPbb. Ich habe mir dann den Mod für die Blank Admin Page gezogen, und meine Code dann einfach eingefügt. Die Seite wird auch richtig geladen. Doch wenn ich dann meine Eingabe posten möchte, wird im rechten Frame der normale Forumsindex geladen. Es wird auch kein Eintrag in der Datenbank geschrieben. Nun wo ist mein Problem?
Hier mal der Code:
Code: Alles auswählen
<?php
/***************************************************************************
*
* 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.
*
***************************************************************************/
define('IN_PHPBB', 1);
if( !empty($setmodules) )
{
$file = basename(__FILE__);
$module['Info']['erstellen'] = "$file";
return;
}
//
// Load default header
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'information/wer_config.php');
// alt include("http://127.0.0.1/phpbb/information/wer_config.php");
echo "
<form action=\"admin_info_erstellen.php\" method=\"POST\">
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td width=\"300\" align=\"center\">Bild groß</td>
<td width=\"300\" align=\"center\">Bitte OHNE *.jpg angeben!</td>
</tr>
<tr>
<td><input type=\"text\" maxlength=20 name=\"datei\" size=\"15\" class=\"inputtext\" tabindex=\"1\"></td>
<td></td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td height=\"15\"></td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td width=\"600\">Startdatum:</td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td>Tag:</td>
<td>Monat:</td>
<td>Jahr:</td>
<td>Stunde:</td>
<td>Minute:</td>
<td>Sekunde:</td>
</tr>
<tr>
<td><input type=\"text\" maxlength=2 name=\"stag\" size=\"3\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=2 name=\"smonat\" size=\"3\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"sjahr\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"sstunde\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"smin\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"ssec\" size=\"5\" class=\"inputtext\"></td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td height=\"15\"></td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td width=\"600\">Enddatum:</td>
</tr>
</table>
<table width=\"600\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
<tr>
<td>Tag:</td>
<td>Monat:</td>
<td>Jahr:</td>
<td>Stunde:</td>
<td>Minute:</td>
<td>Sekunde:</td>
</tr>
<tr>
<td><input type=\"text\" maxlength=2 name=\"etag\" size=\"3\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=2 name=\"emonat\" size=\"3\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"ejahr\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"estunde\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"emin\" size=\"5\" class=\"inputtext\"></td>
<td><input type=\"text\" maxlength=4 name=\"esec\" size=\"5\" class=\"inputtext\"></td>
</tr>
</table>
<input type=\"hidden\" name=\"send\" value=\"1\" />
<input type=\"submit\" value=\"Posten\" class=\"sendtext\">
</form>";
// timestamp erzeugen
$startzeit = mktime($_POST[sstunde],$_POST[smin],$_POST[ssec],$_POST[smonat],$_POST[stag],$_POST[sjahr]);
$endzeit = mktime($_POST[estunde],$_POST[emin],$_POST[esec],$_POST[emonat],$_POST[etag],$_POST[ejahr]);
// Bilder mit Endung
$bild = $_POST[datei] . $endung;
$thumb = $_POST[datei] . $sufflexthumb . $endung;
// In die Datenbank schreiben
if(isset($_POST['send']) && $_POST['send'] == 1)
{
echo $startzeit;
echo "<br>";
echo $endzeit;
$sql_insert = "INSERT INTO info ( datei, dateiklein, startzeit, endzeit) VALUES ('$bild', '$thumb', '$startzeit', '$endzeit')";
$result = mysql_query($sql_insert, $mdb);
echo "Der Datensatz wurde gespeichert!";
}
include('./page_footer_admin.'.$phpEx);
?>

Für jede Hilfe bin ich sehr dankbar.
Christian