Witam, mam pewny problem winksmiley.jpg zrobiłem sobie stronę w php-fusionie(wsumie to w extreme fusionie ktory bazuje na PHP-Fusion 6.01.6) (wiem brzmi to kiczowato ale nie o to tu chodzi). I sprawa wygląda tak ze mam 2 tabelki oto one: . Wyswietlają one najnowsze posty i tematy winksmiley.jpg a chciałbym aby pojawiło sie tam np. Najnowsze artykuły napisane przez użytkowników. z tego co mi sie wydaje ten kawałek odpowiada za lewą częsc tabelki

  1. <table width='$theme_width' align='center' cellspacing='0' cellpadding='0'><tr>
  2. <td style='background-image: url(".THEME."images/szablon_18.jpg); ' class='panel1'> ");
  3. if (!isset($usr_grps) || !isNum($usr_grps)) $usr_grps="";
  4. $result = dbquery(
  5. "SELECT tf.*, tt.*, tu.user_id,user_name,user_color,user_prefix FROM ".$db_prefix."forums tf
  6. INNER JOIN ".$db_prefix."threads tt USING(forum_id)
  7. INNER JOIN ".$db_prefix."users tu ON tt.thread_lastuser=tu.user_id
  8. ".$usr_grps." ORDER BY thread_lastpost DESC LIMIT 0,12");
  9. if (dbrows($result) != 0) {
  10. $i=0;
  11. if ($theme_width == "100%") echo "\n";
  12. while ($data = dbarray($result)) {
  13. if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl1"; }
  14. $new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'".(isset($lastvisited) ? $lastvisited : 0)."'");
  15. //$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
  16. $thread_replies = $data['thread_replies'];
  17. $forum_id = $data['forum_id'];
  18. if ($new_posts > 0) {
  19. $folder123 = "<img src='".THEME."forum/foldernew.gif' height='11'>";
  20. } else if ($new_posts > 19) {
  21. $folder123 = "<img src='".THEME."forum/folderhot.gif' height='11'>";
  22. } else {
  23. if ($data['thread_locked'] == 1) {
  24. $folder123 = "<img src='".THEME."forum/folderlock.gif' height='11'>";
  25. } else if ($data['thread_locked'] == 0) {
  26. $folder123 = "<img src='".THEME."forum/folder.gif' height='11'>";
  27. }
  28. }
  29. //$reply_count = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'");
  30. $reply_count = $data['thread_replies']+1;
  31.  
  32. $data2 = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC LIMIT 1"));
  33. $threads_message = $data['thread_subject'];
  34. $threads_message = str_replace("'", "", $threads_message);
  35. $rstart = ($reply_count > 20 ? "rowstart=".((ceil($reply_count / 20)-1)*20)."&" : "");
  36. echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"left\" width='65%' class='small'>";
  37. if ($theme_width == "100%") {
  38. echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' style='color: #ffffff;'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
  39. echo "<td align=\"right\" width='35%' style='color: #ffffff;'>[ ".($reply_count - 1)." / ".$data['thread_views']." ]</td>";
  40. } else {
  41. echo "$folder123 <a href='".FORUM."viewthread.php?".$rstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data2['post_id']."' style='color: #ffffff;'>".trimlink($data['thread_subject'], 16)."</a><br></td>\n";
  42. echo "<td align=\"right\" width='35%' style='color: #ffffff;'>[ ".($reply_count - 1)." / ".$data['thread_views']." ]</td>";
  43. }
  44. echo "</tr></table>";
  45. $i++;
  46. }
  47.  
  48. } else {
  49. echo "<center>".$locale['004']."</center>\n";
  50. }
  51. echo("</td>


Tak myślalem zeby dać tam skrypt panelu(sciagnietego ze strony Extreme fusiona) lecz nie zabardzo mi to wychodzi... Wiecie może jak to zrobić. Pokaże wam taki przykładowy skrypt(panelu):

  1. openside ("Top 5");
  2. $result=dbquery("SELECT user_name, user_location, user_icq, user_id, count(user_id) AS article_count FROM ".$db_prefix."articles INNER JOIN
  3. ".$db_prefix."users ON article_name=user_id GROUP BY user_name ORDER BY article_count DESC LIMIT 0,5");
  4. echo "<table width='100%' cellpadding='0' cellspacing='0'>";
  5. if(dbrows($result)!=0){
  6. while($data=dbarray($result)){
  7. echo "<tr><td class='small2' align='left'>&nbsp;&nbsp;<img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."profile.php?lookup=$data[user_id]' class='side'>";
  8. echo "$data[user_name]</a></td><td class='small2' align='right'>[$data[article_count]]</td></tr>";
  9. }
  10. }
  11. echo "</table>";
  12. closeside();
  13. ?>


Z góry dziekuje za pomoc

czemu nikt nigdy nie zna odpowiedzi na moje pytania?