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 | <?php # Copyright by Manuel # Support www.ilch.de defined ( 'main' ) or die ( 'no direct access' ); $shoutbox_VALUE_name = getenv ( "REMOTE_ADDR" ); $datum = date ( "j.n.y" ); $zeit = date ( "@H:i" ); if ( loggedin() ) { $shoutbox_VALUE_name2 = $_SESSION [ 'authname' ]; } if ( ! empty ( $_POST [ 'shoutbox_submit' ]) ) { $shoutbox_nickname = escape( $_POST [ 'shoutbox_nickname' ], 'string' ); $shoutbox_nickname = substr ( $shoutbox_nickname , 0, 15); $shoutbox_textarea = escape( $_POST [ 'shoutbox_textarea' ], 'textarea' ); $shoutbox_textarea = preg_replace( "/\[.?(url|b|i|u|img|code|quote)[^\]]*?\]/i" , "" , $shoutbox_textarea ); $shoutbox_textarea = strip_tags ( $shoutbox_textarea ); if ( ! empty ( $shoutbox_nickname ) AND ! empty ( $shoutbox_textarea ) ) { db_query( 'INSERT INTO `prefix_shoutbox2` VALUES ( "" , "' . $shoutbox_nickname . ' ' . $datum . ' ' . $zeit . '" , "' . $shoutbox_textarea . '" ) ' ); } } if ( loggedin() ) { //angemeldeter user echo '<form action="index.php" method="POST">' ; echo '<input readonly type="text" size="20" name="shoutbox_nickname" value="' . $shoutbox_VALUE_name2 . '" onFocus="if (value == \'' . $shoutbox_VALUE_name . '\') {value = \'\'}" onBlur="if (value == \'\') {value = \'' . $shoutbox_VALUE_name . '\'}" maxlength="15">' ; echo '<br /><textarea cols="27" rows="3" name="shoutbox_textarea"></textarea><br />' ; echo '<input type="submit" value="' . $lang [ 'formsub' ]. '" name="shoutbox_submit">' ; echo '</form><table width="100%" class="border" cellpadding="2" cellspacing="1" border="0">' ; } else { //Gaeste echo "<font color=#ffffff><b><br />Zum Posten<p></p>Bitte Einloggen!<p></p></b></font>" ; echo '</form><table width="100%" class="border" cellpadding="2" cellspacing="1" border="0">' ; } $erg = db_query( 'SELECT * FROM `prefix_shoutbox2` ORDER BY id DESC LIMIT 5' ); $class = 'Cnorm' ; while ( $row = db_fetch_object( $erg ) ) { $class = ( $class == 'Cnorm' ? 'Cnorm' : 'Cnorm' ); echo '<tr class="' . $class . '"><td><b>' . $row ->nickname. ' :</b> ' .preg_replace( '/([^\s]{20})(?=[^\s])/' , "$1\n" , $row ->textarea). '</td></tr>' ; } echo '</table><a class="box" href="index.php?shoutbox">' . $lang [ 'archiv' ]. '</a>' ; ?> |
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 | <? if(isset($_REQUEST['action'])) { // übergebene Aktion setzen $action = $_REQUEST['action']; } else { // Standard Aktion $action = 'view'; } switch($action) { case 'view' : { echo' <form action="install.php?action=shoutbox2" method="post"> Bitte auf Weiter klicken um die zweite Shoutbox zu installieren!<br> <input type="submit" name="shoutbox2" value="Weiter"></form>'; } break; case 'shoutbox2' : define ( 'main' , TRUE ); require_once('include/includes/config.php'); require_once('include/includes/func/db/mysql.php'); db_connect(); db_query("CREATE TABLE `prefix_shoutbox2` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `nickname` varchar(50) NOT NULL default '', `textarea` text, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='powered by ilch.de' AUTO_INCREMENT=1 ; } else { } echo '<form action="install.php?action=fertig" method="post"> Bitte auf Weiter um die installation abzuschließen!<br> <input type="submit" name="fertig value="Weiter"></form>'; break; case 'fertig' : { header("location: http://www.ilch.de"); } break; } ?> |
Geschlossen | ||
![]() |
Zurück zu Fehlersuche und Probleme |