Swifter
Threadstarter
Hi all... ich brauche Hilfe da ich mit HTML-Sprache nich ganz sooo klarkomme.
Wir haben bei uns auf der Site http://www.orbiamortis.de eine Shoutbox... Diese zerreisst aber nach langen Einträgen jedesmal die Site...
Und der Name des ersten Eintrags ist auch nie zu sehen...
Kann mir vielleicht jemand bei diesen Problemen helfen?
Das ist der Code:
<?php
// bx clanportal 0.3.1.1
// $Id: create.php 99 2006-07-10 14:55:58Z hajo $
$bx_lang = bx_translate('shoutbox','create');
echo bx_html_table(1,'forum',1);
echo bx_html_roco(1,'headb');
echo $bx_lang['add'];
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
if(isset($_POST['submit'])) {
$error = '';
$ip = $_SERVER['REMOTE_ADDR'];
if(empty($_POST['name']) OR $_POST['name'] == 'Nick') {
$error .= bx_html_br(1) . '- ' . $bx_lang['no_name'];
} else {
$name = bx_sql_escape($_POST['name']);
}
$message = empty($_POST['message']) ? '' : bx_sql_escape($_POST['message']);
if(!empty($_POST['message2'])) { $message = bx_sql_escape($_POST['message2']); }
if(empty($message)) {
$error .= bx_html_br(1) . '- ' . $bx_lang['no_text'];
}
if(strlen($message) > 100) {
$error .= bx_html_br(1) . '- ' . $bx_lang['too_long'];
}
$flood = bx_sql_select(__FILE__,'shoutbox','shoutbox_date',"shoutbox_ip = '" . bx_sql_escape($ip) . "'",'shoutbox_date DESC');
$maxtime = $flood['shoutbox_date'] + $bx_main['def_flood'];
if ($maxtime > bx_time()) {
$diff = $maxtime - bx_time();
$error .= bx_html_br(1) . '- ' . $bx_lang['flood1'] . ' ' . $diff . ' ' . $bx_lang['flood2'];
}
if(!empty($error)) {
echo $bx_lang['errors'];
echo $error;
echo bx_html_roco(0);
echo bx_html_table(0);
echo bx_html_br(1);
echo bx_html_form(1,'shoutbox_add','shoutbox','create');
echo bx_html_table(1,'forum',1);
echo bx_html_roco(1,'leftc');
echo bx_icon('personal') . $bx_lang['nick'] . ' *';
echo bx_html_roco(2,'leftb');
echo bx_html_input('name',$_POST['name'],'text');
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
echo bx_icon('kate') . $bx_lang['message'] . ' *';
echo bx_html_roco(2,'leftb');
echo bx_html_textarea('message2',$message,10,5);
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
echo bx_icon('ksysguard') . $bx_lang['options'];
echo bx_html_roco(2,'leftb');
echo bx_html_input('submit',$bx_lang['submit'],'submit');
echo bx_html_input('reset',$bx_lang['reset'],'reset');
echo bx_html_roco(0);
echo bx_html_table(0);
echo bx_html_form(0);
} else {
$cells = array('shoutbox_name','shoutbox_text','shoutbox_date','shoutbox_ip');
$values = array($name,$message,bx_time(),$ip);
bx_sql_insert(__FILE__,'shoutbox',$cells,$values);
echo $bx_lang['success'];
echo bx_html_roco(0);
echo bx_html_table(0);
}
} else {
echo $bx_lang['no_submit'];
echo bx_html_roco(0);
echo bx_html_table(0);
}
?>
Danke im vorraus
Greetz Swifter
Wir haben bei uns auf der Site http://www.orbiamortis.de eine Shoutbox... Diese zerreisst aber nach langen Einträgen jedesmal die Site...
Und der Name des ersten Eintrags ist auch nie zu sehen...
Kann mir vielleicht jemand bei diesen Problemen helfen?
Das ist der Code:
<?php
// bx clanportal 0.3.1.1
// $Id: create.php 99 2006-07-10 14:55:58Z hajo $
$bx_lang = bx_translate('shoutbox','create');
echo bx_html_table(1,'forum',1);
echo bx_html_roco(1,'headb');
echo $bx_lang['add'];
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
if(isset($_POST['submit'])) {
$error = '';
$ip = $_SERVER['REMOTE_ADDR'];
if(empty($_POST['name']) OR $_POST['name'] == 'Nick') {
$error .= bx_html_br(1) . '- ' . $bx_lang['no_name'];
} else {
$name = bx_sql_escape($_POST['name']);
}
$message = empty($_POST['message']) ? '' : bx_sql_escape($_POST['message']);
if(!empty($_POST['message2'])) { $message = bx_sql_escape($_POST['message2']); }
if(empty($message)) {
$error .= bx_html_br(1) . '- ' . $bx_lang['no_text'];
}
if(strlen($message) > 100) {
$error .= bx_html_br(1) . '- ' . $bx_lang['too_long'];
}
$flood = bx_sql_select(__FILE__,'shoutbox','shoutbox_date',"shoutbox_ip = '" . bx_sql_escape($ip) . "'",'shoutbox_date DESC');
$maxtime = $flood['shoutbox_date'] + $bx_main['def_flood'];
if ($maxtime > bx_time()) {
$diff = $maxtime - bx_time();
$error .= bx_html_br(1) . '- ' . $bx_lang['flood1'] . ' ' . $diff . ' ' . $bx_lang['flood2'];
}
if(!empty($error)) {
echo $bx_lang['errors'];
echo $error;
echo bx_html_roco(0);
echo bx_html_table(0);
echo bx_html_br(1);
echo bx_html_form(1,'shoutbox_add','shoutbox','create');
echo bx_html_table(1,'forum',1);
echo bx_html_roco(1,'leftc');
echo bx_icon('personal') . $bx_lang['nick'] . ' *';
echo bx_html_roco(2,'leftb');
echo bx_html_input('name',$_POST['name'],'text');
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
echo bx_icon('kate') . $bx_lang['message'] . ' *';
echo bx_html_roco(2,'leftb');
echo bx_html_textarea('message2',$message,10,5);
echo bx_html_roco(0);
echo bx_html_roco(1,'leftc');
echo bx_icon('ksysguard') . $bx_lang['options'];
echo bx_html_roco(2,'leftb');
echo bx_html_input('submit',$bx_lang['submit'],'submit');
echo bx_html_input('reset',$bx_lang['reset'],'reset');
echo bx_html_roco(0);
echo bx_html_table(0);
echo bx_html_form(0);
} else {
$cells = array('shoutbox_name','shoutbox_text','shoutbox_date','shoutbox_ip');
$values = array($name,$message,bx_time(),$ip);
bx_sql_insert(__FILE__,'shoutbox',$cells,$values);
echo $bx_lang['success'];
echo bx_html_roco(0);
echo bx_html_table(0);
}
} else {
echo $bx_lang['no_submit'];
echo bx_html_roco(0);
echo bx_html_table(0);
}
?>
Danke im vorraus
Greetz Swifter