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:
|
<?
if($_POST[haus] == 'Gryffindor'){
$hausid = '71';
};
if($_POST[haus] == 'Hufflepuff'){
$hausid = '70';
};
if($_POST[haus] == 'Ravenclaw'){
$hausid = '69';
};
if($_POST[haus] == 'Slytherin'){
$hausid = '68';
};
$parentpostid = '0';
$posttime = time();
$threadid = $hausid;
$userid = '3';
$username = 'Der sprechende Hut';
$iconid = '0';
$posttopic = 'Punkteänderung';
$message = $_POST['post'];
$attachments = '0';
$edittime = '0';
$editorid = '0';
$editor = '';
$editcount = '0';
$allowsmilies = '1';
$allowhtml = '0';
$allowbbcode = '1';
$allowimages = '1';
$showsignature = '1';
$ipaddress = '90.146.98.159';
$visible = '1';
$reindex = '0';
$n = '1';
// Versuchen die DB-Verbindung herzustellen
if (!($con = mysql_pconnect (localhost, user, passwort))) {
echo("Der Verbindungsversuch zur DB ist fehlgeschlagen!<P>");
echo mysql_error();
exit();
}
// Versuchen, die DB auszuwählen
if (!mysql_select_db (database, $con)) {
echo("Sorry, aber ich kann die DB nicht auswählen!<P>");
echo mysql_error();
exit();
}
// Die Tabelle mit Inhalt füllen
mysql_query("INSERT INTO bb1_posts (parentpostid, posttime, threadid, userid, username, iconid, posttopic, message, attachments, edittime, editorid, editor, editcount, allowsmilies, allowhtml, allowbbcode, allowimages, showsignature, ipaddress, visible, reindex) VALUES ('" .$parentpostid ."', '" .$posttime ."', '" .$threadid ."', '" .$userid ."', '" .$username ."', '" .$iconid ."', '" .$posttopic ."', '" .$message ."', '" .$attachments ."', '" .$edittime ."', '" .$editorid ."', '" .$editor ."', '" .$editcount ."', '" .$allowsmilies ."', '" .$allowhtml ."', '" .$allowbbcode ."', '" .$allowimages ."', '" .$showsignature ."', '" .$ipaddress ."', '" .$visible ."', '" .$reindex . "' )", $con);
// Die Verbindung zur DB schließen
mysql_close ($con);
echo("Die Punkte wurden erfolgreich geändert.");
?> |