Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/nowe/public_html/modules/Forum/functions.php on line 292
jednak kod ktory ponizej zawarlem dziala , posty z forum sa usuwane itd.
<script language=\"Javascript\" type=\"text/javascript\"> <!-- function gotoThread(){ } window.setTimeout(\"gotoThread()\", 3000); //--> </script> <?php } else { if (!((($now_hour == $hour && $min_now - 30 < $min) || ($now_hour == $hour +1 && $now_min - 30 > 0)) || ($userdata[user_level] > 2 || is_moderator($forum, $userdata[uid], $db) || is_admin($admin)))) { include(\"modules/\".$module_name.\"/page_header.php\"); error_die(\"\"._PERMDENY.\"\"); } include(\"modules/\".$module_name.\"/page_header.php\"); $last_post_in_thread = get_last_post($topic_id, $db, \"time_fix\"); $sql = \"DELETE FROM \".$prefix.\"_posts WHERE post_id = '$post_id'\"; if(!$r = sql_query($sql, $dbi)) { error_die(\"Couldn't delete post from database\"); } $sql = \"DELETE FROM \".$prefix.\"_posts_text WHERE post_id = '$post_id'\"; if(!$r = sql_query($sql, $dbi)) { error_die(\"Couldn't delete post from database\"); } elseif ($last_post_in_thread == $this_post_time) { $topic_time_fixed = get_last_post($topic_id, $db, \"time_fix\"); $sql = \"UPDATE \".$prefix.\"_bbtopics SET topic_time = '$topic_time_fixed' WHERE topic_id = '$topic_id'\"; if(!$r = sql_query($sql, $dbi)) { error_die(\"Couldn't update to previous post time - last post has been removed\"); } } if(get_total_posts($topic_id, $db, \"topic\") == 0) { $sql = \"DELETE FROM \".$prefix.\"_bbtopics WHERE topic_id = '$topic_id'\"; if(!$r = sql_query($sql, $dbi)) { error_die(\"Couldn't delete topic from database\"); } $topic_removed = TRUE; } if($posterdata[uid] != 1) { $sql = \"UPDATE \".$user_prefix.\"_users SET user_posts = user_posts - 1 WHERE uid = $posterdata[uid]\"; if(!$r = sql_query($sql, $dbi)) { error_die(\"Couldn't change user post count.\"); } } sync($db, $forum, 'forum'); if(!$topic_removed) { sync($db, $topic_id, 'topic'); } echo \"<br><TABLE BORDER=\"0\" CELLPADDING=\"1\" cellspacing=\"0\" ALIGN=\"CENTER\" VALIGN=\"TOP\" WIDTH=\"$TableWidth\">\"; echo \"<TR><TD BGCOLOR=\"$table_bgcolor\"><TABLE BORDER=\"0\" CALLPADDING=\"1\" cellspacing=\"1\" WIDTH=\"100%\">\"; echo \"<P><BR><center>Post zosta³ pomy¶lnie usuniêty <ul>\"._BBCLICK.\" <a href=\"modules.php?op=modload&name=\".$module_name.\"&file=viewforum&forum=$forum_id\">\"._BBHERE.\"</a> \"._BBRETURNTOPIC.\"<p>\"._BBCLICK.\" <a href=\"modules.php?op=modload&name=\".$module_name.\"&file=index\">\"._BBHERE.\"</a> by powróciæ do strony g³ównej forum</ul></center><P></font>\";
zawartosc pliku functions.php niedaleko lini na ktora wskazuje blad :
<?php switch($type) { case 'time_fix': $sql = \"SELECT p.post_time FROM posts p WHERE p.topic_id = '$id' ORDER BY post_time DESC LIMIT 1\"; break; case 'forum': $sql = \"SELECT p.post_time, p.poster_id, u.username FROM posts p, users u WHERE p.f
o um_id = '$id' AND p.poster_id = u.user_id ORDER BY post_time DESC LIMIT 1\"; break; case 'topic': $sql = \"SELECT p.post_time, u.username FROM posts p, users u WHERE p.topic_id = '$id' AND p.poster_id = u.user_id ORDER BY post_time DESC LIMIT 1\"; break; case 'user': $sql = \"SELECT p.post_time FROM posts p WHERE p.poster_id = '$id' LIMIT 1\"; break; } if(!$result = mysql_query($sql, $db)) return($l_error); if(!$myrow = mysql_fetch_array($result)) return($l_noposts); if(($type != 'user') && ($type != 'time_fix')) $val = sprintf(\"%s <br> %s %s\", $myrow[post_time], $l_by, $myrow[username]); else $val = $myrow[post_time]; return($val); } ?>
ja tutaj bledu zadnego nie widze w zapytaniu i nie moge sie go doszukac , moze ktos wie chociaz jak wylaczyc ten komunikat o bledzie ? zeby nie byl wyswietlany, bo skoro wszystko dziala to chociaz kosmetyka- maskowanie tego komunikatu by sie przydalo