hab in meinen banner eine shoutbox eingebaut die aber leider nicht funktioniert. wenn man was schreiben will dann kommt diese fehler-meldung:
Zitat
MySQL Error:
1136 : Column count doesn't match value count at row 1
in Query:
INSERT INTO `ic1_shoutbox` VALUES ( "" , "Vulpez" , "asdf" )
Debug backtrace:
@ mysql.php:32 -- debug_bt()
@ mysql.php:50 -- db_check_error(...)
@ v_shoutbox.php:24 -- db_query(...)
@ design.php:332 -- require_once(...)
@ design.php:174 -- design->get_boxcontent(...)
@ design.php:71 -- design->replace_boxes(...)
@ news.php:12 -- design->design(...)
@ index.php:38 -- require_once(...)
1136 : Column count doesn't match value count at row 1
in Query:
INSERT INTO `ic1_shoutbox` VALUES ( "" , "Vulpez" , "asdf" )
Debug backtrace:
@ mysql.php:32 -- debug_bt()
@ mysql.php:50 -- db_check_error(...)
@ v_shoutbox.php:24 -- db_query(...)
@ design.php:332 -- require_once(...)
@ design.php:174 -- design->get_boxcontent(...)
@ design.php:71 -- design->replace_boxes(...)
@ news.php:12 -- design->design(...)
@ index.php:38 -- require_once(...)
kenn mich leider zu wenig damit aus.
hier der quellcode dieser shoutbox:
Zitat
<?php
defined ('main') or die ( 'no direct access' );
$datum=date(" j.n.Y");
$zeit=date(" H:i");
if (loggedin()) {
$shoutbox_VALUE_name=$_SESSION['authname'];
}
else {
$shoutbox_VALUE_name = 'Nickname';
}
if (!empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) {
$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('DELETE FROM `prefix_shoutbox` WHERE nickname = "'.$shoutbox_VALUE_name.'" AND textarea = "'.$shoutbox_textarea.'"' );
db_query('INSERT INTO `prefix_shoutbox` VALUES ( "" , "'.$shoutbox_VALUE_name.'" , "'.$shoutbox_textarea.'" ) ' );
}
}
echo '
<div style="width:95%; height:180px; overflow:auto; border:2px solid #347; margin:1px;">
<table width="100%" cellpadding="2" cellspacing="1" border="1">';
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC');
while ($row = db_fetch_object($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '
<tr class="'.$class.'">
<td style="font-size:11px;"><b>'.$row->nickname.'</b>:</td><td style="font-size:11px;"> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", BBcode($row->textarea)).'</td>
</tr>';
}
echo '</table></div>';
if (has_right($allgAr['sb_recht'])) {
echo '
<form method="post" name="post" action="index.php">
<input type="text" name="shoutbox_textarea" value="" size="87%" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">';
echo get_antispam ('shoutbox', 0); echo '
<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">
<input type="text" size="1" style="visibility:hidden;" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15">
<a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>
</form>';
}
?>
defined ('main') or die ( 'no direct access' );
$datum=date(" j.n.Y");
$zeit=date(" H:i");
if (loggedin()) {
$shoutbox_VALUE_name=$_SESSION['authname'];
}
else {
$shoutbox_VALUE_name = 'Nickname';
}
if (!empty($_POST['shoutbox_submit']) AND chk_antispam ('shoutbox')) {
$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('DELETE FROM `prefix_shoutbox` WHERE nickname = "'.$shoutbox_VALUE_name.'" AND textarea = "'.$shoutbox_textarea.'"' );
db_query('INSERT INTO `prefix_shoutbox` VALUES ( "" , "'.$shoutbox_VALUE_name.'" , "'.$shoutbox_textarea.'" ) ' );
}
}
echo '
<div style="width:95%; height:180px; overflow:auto; border:2px solid #347; margin:1px;">
<table width="100%" cellpadding="2" cellspacing="1" border="1">';
$erg = db_query('SELECT * FROM `prefix_shoutbox` ORDER BY id DESC');
while ($row = db_fetch_object($erg) ) {
$class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' );
echo '
<tr class="'.$class.'">
<td style="font-size:11px;"><b>'.$row->nickname.'</b>:</td><td style="font-size:11px;"> '.preg_replace( '/([^\s]{'.$allgAr['sb_maxwordlength'].'})(?=[^\s])/', "$1\n", BBcode($row->textarea)).'</td>
</tr>';
}
echo '</table></div>';
if (has_right($allgAr['sb_recht'])) {
echo '
<form method="post" name="post" action="index.php">
<input type="text" name="shoutbox_textarea" value="" size="87%" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">';
echo get_antispam ('shoutbox', 0); echo '
<input type="submit" value="'.$lang['formsub'].'" name="shoutbox_submit">
<input type="text" size="1" style="visibility:hidden;" name="shoutbox_nickname" value="'.$shoutbox_VALUE_name.'" onFocus="if (value == \''.$shoutbox_VALUE_name.'\') {value = \'\'}" onBlur="if (value == \'\') {value = \''.$shoutbox_VALUE_name.'\'}" maxlength="15">
<a class="box" href="index.php?shoutbox">'.$lang['archiv'].'</a>
</form>';
}
?>
wäre toll wenn mir jemand helfen könnte
danke im vorraus
vulpes
betroffene Homepage: aefclan.at