Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Nie wyswitla zmiennej $version
JamalBIG
post
Post #1





Grupa: Zarejestrowani
Postów: 496
Pomógł: 1
Dołączył: 16.01.2008
Skąd: Świnoujście

Ostrzeżenie: (0%)
-----


Witam

Slencze nad tym fragmentem kodu dobre kilk godzin i nie moge znalezc powodu przez ktory nie wyswietla mi sie zmienna $version...

  1. <?php
  2. $result = $db->sql_query("SELECT lid, cid, title, date, email, downloadratingsummary, version FROM ".$prefix."_downloads_downloads WHERE title LIKE '%$query%' OR description LIKE '%$query%' ORDER BY $orderby LIMIT $min,$downloadsresults");
  3. $fullcountresult = $db->sql_query("SELECT lid, cid, title, date, email, downloadratingsummary, version FROM ".$prefix."_downloads_downloads WHERE title LIKE '%$query%' OR description LIKE '%$query%' ");
  4. $totalselecteddownloads = $db->sql_numrows($fullcountresult);
  5. $nrows = $db->sql_numrows($result);
  6. $lid = intval($lid);
  7. $cid = intval(trim($cid));
  8. $title = stripslashes(check_html($title, "nohtml"));
  9. $downloadnigsummary = intval($downloadingsummary);
  10. $verison = intval($versin);
  11. $x=0;
  12. $the_query = stripslashes($query);
  13. $the_query = str_replace("'", "'", $the_query);
  14.  
  15. echo "...";
  16.  
  17. if ($query != "") {
  18. if ($nrows>0) {
  19. $result2 = $db->sql_query("SELECT cid, title FROM ".$prefix."_downloads_categories WHERE title LIKE '%$query%' ORDER BY title DESC");
  20. while(list($cid, $stitle) = $db->sql_fetchrow($result2)) {
  21. $cid = intval($cid);
  22. }
  23. $orderbyTrans = convertorderbytrans($orderby);
  24. while(list($lid, $cid, $title, $time, $email, $totalvotes, $verison) = $db->sql_fetchrow($result)) {
  25. $lid = intval($lid);
  26. $cid = intval(trim($cid));
  27. $hits = intval($hits);
  28. $totalvotes = intval($totalvotes);
  29. $totalcomments = intval($totalcomments);
  30. $downloadratingsummary = number_format($downloadratingsummary, $mainvotedecimal);
  31. $title = stripslashes(check_html($title, "nohtml"));
  32. $url = stripslashes($url);
  33. $description = stripslashes($description);
  34. $transfertitle = str_replace (" ", "_", $title);
  35. global $prefix, $db, $admin;
  36. ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
  37. $datetime = strftime(""._LINKSDATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
  38. $datetime = ucfirst($datetime);
  39. global $prefix, $db, $admin;
  40. detecteditorial($lid, $transfertitle, 0);
  41. $result3 = $db->sql_query("SELECT cid,title,parentid FROM ".$prefix."_downloads_categories WHERE cid='$cid'");
  42. list($cid3,$title3,$parentid3) = $db->sql_fetchrow($result3);
  43. $cid3 = intval($cid3);
  44. $title3 = stripslashes(check_html($title3, "nohtml"));
  45. $parentid3 = intval($parentid3);
  46. if ($parentid3>0) $title3 = getparent($parentid3,$title3);
  47. $x++;
  48. if (is_admin($admin)) {
  49. echo "<a href=\"".$admin_file.".php?op=DownloadsModDownload&amp;lid=$lid\"><img src=\"modules/$module_name/images/lwin.gif\" border=\"0\" alt=\""._EDIT."\"></a>";
  50. }
  51. echo "<table border=\"0\" width=\"100%\" cellspacing=\"5\" cellpadding=\"0\">"
  52. . "<tr>"
  53. . "<td width=\"\"><img width='50' src=\"$email\">"
  54. . "<td width=\"80\"><a href=\"modules.php?name=$module_name&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;cid=$cid\">$title</a></td>"
  55.  . "<td width=\"120\" align=\"center\"><a href=\"modules.php?name=$module_name&amp;d_op=viewdownloaddetails&amp;lid=$lid&amp;cid=$cid\"><b>$version</b></a></td>"
  56. . "<td width=\"70\" align=\"center\"><a href=\"modules.php?name=$module_name&amp;d_op=viewdownload&cid=$cid3\">$title3</a></td>"
  57. . "<td width=\"50\" align=\"center\">Ocena: $totalvotes</td>"
  58. . "<td width=\"80\" align=\"center\">$datetime</td>"
  59. . "</tr>"
  60. . "</table>";
  61. ?>


Bylbym wdzieczny za znalezienie bledu...

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
nithajasz
post
Post #2





Grupa: Zarejestrowani
Postów: 230
Pomógł: 27
Dołączył: 27.05.2008
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $verison = intval($versin);
  3. ?>


Nie powinno być intval($version); ?
Go to the top of the page
+Quote Post
Ociu
post
Post #3





Grupa: Moderatorzy
Postów: 1 566
Pomógł: 37
Dołączył: 14.05.2003
Skąd: Kraków




Może dlatego, że nie dałeś tagu do tematu ? Popraw inaczej będę zmuszony zamknąć temat.
Go to the top of the page
+Quote Post
nevt
post
Post #4





Grupa: Przyjaciele php.pl
Postów: 1 595
Pomógł: 282
Dołączył: 24.09.2007
Skąd: Reda, Pomorskie.

Ostrzeżenie: (0%)
-----


chcesz wyświetlać $version a wkodzie masz raz $verison a raz $versin ...


--------------------

-
Oh no, my young coder. You will find that it is you who are mistaken, about a great many things... -
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 09:11