Oficiálna Slovenská podpora módov a infúzií pre PHP-Fusion
 
Najsťahovanejšie
Nové súbory
Aktuálna verzia

Dátum vydania: 18.6.2013

- PHP-Fusion 7.02.07
- Slovenský preklad
Užívateľský panel
Navigácia
Hlavné menu
Úvodná stránka
Návody
Na stiahnutie
Fórum
Kontakt
Vyhľadávanie
RSS odber

Čierna listina
Pridať web
Čierna listina

Informácie
Tím
Zablokovaní členovia
Userbary a tlačidlá
Kódex správania
Licencia a autorské práva
Propagácia

PHP-Fusion (CMS)
Zoznam funkcií
O verzii 6
O verzii 7
Posledné články
Blokovanie botov
Panel základný alebo...
Table "XXX" doesn't ...
Vlastný font na webe
Live Game Server Lis...
Návštevnosť
TOPlist
Štatistika
Registrovaných: 8,356 · Návodov: 47 · Súborov: 628 · Veľkosť súborov: 366,01 MB ·
Autor: OscarkO
ID témy: 4915
Informácie o téme
Celkom 9 príspevkov v tejto téme a bola zobrazená 445 krát.
Čítať tému
 Vytlačiť tému
Rozmazaný obrázky v novince
OscarkO
Dobrý den, mám takový problém. Na hlavní stránce se v novince zobrazují rozmazaný obrázky, ale po otevření novinky už jsou ve správné kvalitě, co může být závadou?
 
HaVri
pošli link na web, niečo podobné som v minulosti už riešil a myslím, že tam bol potrebný zásah do news.php, ak si dobre spomínam
 
OscarkO
www.extation.eu
 
HaVri
postni sem kód súboru news.php, problém je v tom, že sa ti to odkazuje na thumbnails napr.
www.extation.eu/images/news/thumbs/590dfe5f5bafe36b3378d122_t2.jpg toto je obrázok na úvodnej stránke zmenšený oproti originálu
 
OscarkO
Zdroj stiahnutia  Code
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";

// Predefined variables, do not edit these values
$i = 0;

// Number of news displayed
$items_per_page = $settings['newsperpage'];

add_to_title($locale['global_200'].$locale['global_077']);

if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) {
   $rows = dbcount(
      "(news_id)",
      DB_NEWS,
      groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
                              AND (news_end='0'||news_end>=".time().")
                              AND news_draft='0'"
   );
   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
   if ($rows) {
      $result = dbquery(
         "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status
         FROM ".DB_NEWS." tn
         LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
         LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
         WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
            AND (news_end='0'||news_end>=".time().") AND news_draft='0'
         GROUP BY news_id
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
      );
      $numrows = dbrows($result);
      while ($data = dbarray($result)) {
         $i++;
         $comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['news_id']."'");
         $news_cat_image = "";
         $news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         $news_cat_image = "<a href='".($settings['news_image_link'] == 0 ? "news_cats.php?cat_id=".$data['news_cat']
                                                            : FUSION_SELF."?readmore=".$data['news_id'] )."'>";
         if ($data['news_image_t2'] && $settings['news_image_frontpage'] == 0) {
            $news_cat_image .= "<img src='".IMAGES_N_T.$data['news_image_t2']."' alt='".$data['news_subject']."' class='news-category' /></a>";
         } elseif ($data['news_cat_image']) {
            $news_cat_image .= "<img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
         } else {
            $news_cat_image = "";
         }
         $news_news = preg_replace("/<!?--\s*pagebreak\s*-->/i", "", ($data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news'])));
         $news_info = array(
            "news_id" => $data['news_id'],
            "user_id" => $data['user_id'],
            "user_name" => $data['user_name'],
            "user_status" => $data['user_status'],
            "news_date" => $data['news_datestamp'],
            "cat_id" => $data['news_cat'],
            "cat_name" => $data['news_cat_name'],
            "cat_image" => $news_cat_image,
            "news_subject" => $data['news_subject'],
            "news_ext" => $data['news_extended'] ? "y" : "n",
            "news_reads" => $data['news_reads'],
            "news_comments" => $comments,
            "news_allow_comments" => $data['news_allow_comments'],
            "news_sticky" => $data['news_sticky']
         );

         echo "<!--news_prepost_".$i."-->\n";
         render_news($news_subject, $news_news, $news_info);
      }
      echo "<!--sub_news_idx-->\n";
      if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
   } else {
      opentable($locale['global_077']);
      echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
      closetable();
   }
} else {
   if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
   $result = dbquery(
      "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn
      LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
      LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
      WHERE ".groupaccess('news_visibility')." AND news_id='".$_GET['readmore']."' AND news_draft='0'
      LIMIT 1"
   );
   if (dbrows($result)) {
      include INCLUDES."comments_include.php";
      include INCLUDES."ratings_include.php";
      $data = dbarray($result);
      if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
         $result2 = dbquery("UPDATE ".DB_NEWS." SET news_reads=news_reads+1 WHERE news_id='".$_GET['readmore']."'");
         $data['news_reads']++;
      }
      $news_cat_image = "";
      $news_subject = $data['news_subject'];
      if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") {
         $img_size = @getimagesize(IMAGES_N.$data['news_image']);
         $news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('".IMAGES_N.$data['news_image']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($img_size[0]+20).",height=".($img_size[1]+20)."')\"><img src='".IMAGES_N_T.$data['news_image_t1']."' alt='".$data['news_subject']."' class='news-category' /></a>";
      } elseif ($data['news_cat_image']) {
         $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat']."'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
      }
      $news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));   
      $pagecount = count($news_news);
      $news_info = array(
         "news_id" => $data['news_id'],
         "user_id" => $data['user_id'],
         "user_name" => $data['user_name'],
         "user_status" => $data['user_status'],
         "news_date" => $data['news_datestamp'],
         "cat_id" => $data['news_cat'],
         "cat_name" => $data['news_cat_name'],
         "cat_image" => $news_cat_image,
         "news_subject" => $data['news_subject'],
         "news_ext" => "n",
         "news_reads" => $data['news_reads'],
         "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."' AND comment_hidden='0'"),
         "news_allow_comments" => $data['news_allow_comments'],
         "news_sticky" => $data['news_sticky']
      );
      add_to_title($locale['global_201'].$news_subject);
      echo "<!--news_pre_readmore-->";
      render_news($news_subject, $news_news[$_GET['rowstart']], $news_info);
      echo "<!--news_sub_readmore-->";
      if ($pagecount > 1) {
         echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?readmore=".$_GET['readmore']."&amp;")."\n</div>\n";
      }
      if ($data['news_allow_comments']) { showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
      if ($data['news_allow_ratings']) { showratings("N", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once THEMES."templates/footer.php";
?>


 
HaVri
Zdroj stiahnutia  GeSHi: PHP
  1. <?php
  2. /*-------------------------------------------------------+
  3. | PHP-Fusion Content Management System
  4. | Copyright (C) 2002 - 2011 Nick Jones
  5. | http://www.php-fusion.co.uk/
  6. +--------------------------------------------------------+
  7. | Filename: news.php
  8. | Author: Nick Jones (Digitanium)
  9. +--------------------------------------------------------+
  10. | This program is released as free software under the
  11. | Affero GPL license. You can redistribute it and/or
  12. | modify it under the terms of this license which you
  13. | can read by viewing the included agpl.txt or online
  14. | at www.gnu.org/licenses/agpl.html. Removal of this
  15. | copyright header is strictly prohibited without
  16. | written permission from the original author(s).
  17. +--------------------------------------------------------*/
  18. require_once "maincore.php";
  19. require_once THEMES."templates/header.php";
  20.  
  21. // Predefined variables, do not edit these values
  22. $i = 0;
  23.  
  24. // Number of news displayed
  25. $items_per_page = $settings['newsperpage'];
  26.  
  27. add_to_title($locale['global_200'].$locale['global_077']);
  28.  
  29. if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) {
  30. $rows = dbcount(
  31. "(news_id)",
  32. DB_NEWS,
  33. groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
  34. AND (news_end='0'||news_end>=".time().")
  35. AND news_draft='0'"
  36. );
  37. if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
  38. if ($rows) {
  39. $result = dbquery(
  40. "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status
  41. FROM ".DB_NEWS." tn
  42. LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
  43. LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
  44. WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
  45. AND (news_end='0'||news_end>=".time().") AND news_draft='0'
  46. GROUP BY news_id
  47. ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
  48. );
  49. $numrows = dbrows($result);
  50. while ($data = dbarray($result)) {
  51. $i++;
  52. $comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['news_id']."'");
  53. $news_cat_image = "";
  54. $news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
  55. $news_cat_image = "<a href='".($settings['news_image_link'] == 0 ? "news_cats.php?cat_id=".$data['news_cat']
  56. : FUSION_SELF."?readmore=".$data['news_id'] )."'>";
  57. if ($data['news_image_t2'] && $settings['news_image_frontpage'] == 0) {
  58. $news_cat_image .= "<img src='".IMAGES_N.$data['news_image_t2']."' alt='".$data['news_subject']."' class='news-category' /></a>";
  59. } elseif ($data['news_cat_image']) {
  60. $news_cat_image .= "<img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
  61. } else {
  62. $news_cat_image = "";
  63. }
  64. $news_news = preg_replace("/<!?--\s*pagebreak\s*-->/i", "", ($data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news'])));
  65. $news_info = array(
  66. "news_id" => $data['news_id'],
  67. "user_id" => $data['user_id'],
  68. "user_name" => $data['user_name'],
  69. "user_status" => $data['user_status'],
  70. "news_date" => $data['news_datestamp'],
  71. "cat_id" => $data['news_cat'],
  72. "cat_name" => $data['news_cat_name'],
  73. "cat_image" => $news_cat_image,
  74. "news_subject" => $data['news_subject'],
  75. "news_ext" => $data['news_extended'] ? "y" : "n",
  76. "news_reads" => $data['news_reads'],
  77. "news_comments" => $comments,
  78. "news_allow_comments" => $data['news_allow_comments'],
  79. "news_sticky" => $data['news_sticky']
  80. );
  81.  
  82. echo "<!--news_prepost_".$i."-->\n";
  83. render_news($news_subject, $news_news, $news_info);
  84. }
  85. echo "<!--sub_news_idx-->\n";
  86. if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
  87. } else {
  88. opentable($locale['global_077']);
  89. echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
  90. closetable();
  91. }
  92. } else {
  93. if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
  94. $result = dbquery(
  95. "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn
  96. LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
  97. LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
  98. WHERE ".groupaccess('news_visibility')." AND news_id='".$_GET['readmore']."' AND news_draft='0'
  99. LIMIT 1"
  100. );
  101. if (dbrows($result)) {
  102. include INCLUDES."comments_include.php";
  103. include INCLUDES."ratings_include.php";
  104. $data = dbarray($result);
  105. if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
  106. $result2 = dbquery("UPDATE ".DB_NEWS." SET news_reads=news_reads+1 WHERE news_id='".$_GET['readmore']."'");
  107. $data['news_reads']++;
  108. }
  109. $news_cat_image = "";
  110. $news_subject = $data['news_subject'];
  111. if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") {
  112. $img_size = @getimagesize(IMAGES_N.$data['news_image']);
  113. $news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('".IMAGES_N.$data['news_image']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($img_size[0]+20).",height=".($img_size[1]+20)."')\"><img src='".IMAGES_N.$data['news_image_t1']."' alt='".$data['news_subject']."' class='news-category' /></a>";
  114. } elseif ($data['news_cat_image']) {
  115. $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat']."'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
  116. }
  117. $news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));
  118. $pagecount = count($news_news);
  119. $news_info = array(
  120. "news_id" => $data['news_id'],
  121. "user_id" => $data['user_id'],
  122. "user_name" => $data['user_name'],
  123. "user_status" => $data['user_status'],
  124. "news_date" => $data['news_datestamp'],
  125. "cat_id" => $data['news_cat'],
  126. "cat_name" => $data['news_cat_name'],
  127. "cat_image" => $news_cat_image,
  128. "news_subject" => $data['news_subject'],
  129. "news_ext" => "n",
  130. "news_reads" => $data['news_reads'],
  131. "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."' AND comment_hidden='0'"),
  132. "news_allow_comments" => $data['news_allow_comments'],
  133. "news_sticky" => $data['news_sticky']
  134. );
  135. add_to_title($locale['global_201'].$news_subject);
  136. echo "<!--news_pre_readmore-->";
  137. render_news($news_subject, $news_news[$_GET['rowstart']], $news_info);
  138. echo "<!--news_sub_readmore-->";
  139. if ($pagecount > 1) {
  140. echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?readmore=".$_GET['readmore']."&amp;")."\n</div>\n";
  141. }
  142. if ($data['news_allow_comments']) { showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
  143. if ($data['news_allow_ratings']) { showratings("N", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
  144. } else {
  145. redirect(FUSION_SELF);
  146. }
  147. }
  148.  
  149. require_once THEMES."templates/footer.php";
  150. ?>
Vygenerované za 0.094 sekúnd, používate GeSHi 1.0.8.10

 
OscarkO
Po nahrání neukazuje obrázky vůbec, zkoušel jsem i znovu nahrát a pořád to samý.
 
HaVri
sorry moja chyba, teraz by to už malo fungovať
Zdroj stiahnutia  GeSHi: PHP
  1. <?php
  2. /*-------------------------------------------------------+
  3. | PHP-Fusion Content Management System
  4. | Copyright (C) 2002 - 2011 Nick Jones
  5. | http://www.php-fusion.co.uk/
  6. +--------------------------------------------------------+
  7. | Filename: news.php
  8. | Author: Nick Jones (Digitanium)
  9. +--------------------------------------------------------+
  10. | This program is released as free software under the
  11. | Affero GPL license. You can redistribute it and/or
  12. | modify it under the terms of this license which you
  13. | can read by viewing the included agpl.txt or online
  14. | at www.gnu.org/licenses/agpl.html. Removal of this
  15. | copyright header is strictly prohibited without
  16. | written permission from the original author(s).
  17. +--------------------------------------------------------*/
  18. require_once "maincore.php";
  19. require_once THEMES."templates/header.php";
  20.  
  21. // Predefined variables, do not edit these values
  22. $i = 0;
  23.  
  24. // Number of news displayed
  25. $items_per_page = $settings['newsperpage'];
  26.  
  27. add_to_title($locale['global_200'].$locale['global_077']);
  28.  
  29. if (!isset($_GET['readmore']) || !isnum($_GET['readmore'])) {
  30. $rows = dbcount(
  31. "(news_id)",
  32. DB_NEWS,
  33. groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
  34. AND (news_end='0'||news_end>=".time().")
  35. AND news_draft='0'"
  36. );
  37. if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
  38. if ($rows) {
  39. $result = dbquery(
  40. "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status
  41. FROM ".DB_NEWS." tn
  42. LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
  43. LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
  44. WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().")
  45. AND (news_end='0'||news_end>=".time().") AND news_draft='0'
  46. GROUP BY news_id
  47. ORDER BY news_sticky DESC, news_datestamp DESC LIMIT ".$_GET['rowstart'].",".$items_per_page
  48. );
  49. $numrows = dbrows($result);
  50. while ($data = dbarray($result)) {
  51. $i++;
  52. $comments = dbcount("(comment_id)", DB_COMMENTS." WHERE comment_type='N' AND comment_hidden='0' AND comment_item_id='".$data['news_id']."'");
  53. $news_cat_image = "";
  54. $news_subject = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
  55. $news_cat_image = "<a href='".($settings['news_image_link'] == 0 ? "news_cats.php?cat_id=".$data['news_cat']
  56. : FUSION_SELF."?readmore=".$data['news_id'] )."'>";
  57. if ($data['news_image_t2'] && $settings['news_image_frontpage'] == 0) {
  58. $news_cat_image .= "<img src='".IMAGES_N.$data['news_image']."' alt='".$data['news_subject']."' class='news-category' /></a>";
  59. } elseif ($data['news_cat_image']) {
  60. $news_cat_image .= "<img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
  61. } else {
  62. $news_cat_image = "";
  63. }
  64. $news_news = preg_replace("/<!?--\s*pagebreak\s*-->/i", "", ($data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news'])));
  65. $news_info = array(
  66. "news_id" => $data['news_id'],
  67. "user_id" => $data['user_id'],
  68. "user_name" => $data['user_name'],
  69. "user_status" => $data['user_status'],
  70. "news_date" => $data['news_datestamp'],
  71. "cat_id" => $data['news_cat'],
  72. "cat_name" => $data['news_cat_name'],
  73. "cat_image" => $news_cat_image,
  74. "news_subject" => $data['news_subject'],
  75. "news_ext" => $data['news_extended'] ? "y" : "n",
  76. "news_reads" => $data['news_reads'],
  77. "news_comments" => $comments,
  78. "news_allow_comments" => $data['news_allow_comments'],
  79. "news_sticky" => $data['news_sticky']
  80. );
  81.  
  82. echo "<!--news_prepost_".$i."-->\n";
  83. render_news($news_subject, $news_news, $news_info);
  84. }
  85. echo "<!--sub_news_idx-->\n";
  86. if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
  87. } else {
  88. opentable($locale['global_077']);
  89. echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
  90. closetable();
  91. }
  92. } else {
  93. if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
  94. $result = dbquery(
  95. "SELECT tn.*, tc.*, tu.user_id, tu.user_name, tu.user_status FROM ".DB_NEWS." tn
  96. LEFT JOIN ".DB_USERS." tu ON tn.news_name=tu.user_id
  97. LEFT JOIN ".DB_NEWS_CATS." tc ON tn.news_cat=tc.news_cat_id
  98. WHERE ".groupaccess('news_visibility')." AND news_id='".$_GET['readmore']."' AND news_draft='0'
  99. LIMIT 1"
  100. );
  101. if (dbrows($result)) {
  102. include INCLUDES."comments_include.php";
  103. include INCLUDES."ratings_include.php";
  104. $data = dbarray($result);
  105. if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
  106. $result2 = dbquery("UPDATE ".DB_NEWS." SET news_reads=news_reads+1 WHERE news_id='".$_GET['readmore']."'");
  107. $data['news_reads']++;
  108. }
  109. $news_cat_image = "";
  110. $news_subject = $data['news_subject'];
  111. if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") {
  112. $img_size = @getimagesize(IMAGES_N.$data['news_image']);
  113. $news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('".IMAGES_N.$data['news_image']."','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=".($img_size[0]+20).",height=".($img_size[1]+20)."')\"><img src='".IMAGES_N.$data['news_image']."' alt='".$data['news_subject']."' class='news-category' /></a>";
  114. } elseif ($data['news_cat_image']) {
  115. $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat']."'><img src='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></a>";
  116. }
  117. $news_news = preg_split("/<!?--\s*pagebreak\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));
  118. $pagecount = count($news_news);
  119. $news_info = array(
  120. "news_id" => $data['news_id'],
  121. "user_id" => $data['user_id'],
  122. "user_name" => $data['user_name'],
  123. "user_status" => $data['user_status'],
  124. "news_date" => $data['news_datestamp'],
  125. "cat_id" => $data['news_cat'],
  126. "cat_name" => $data['news_cat_name'],
  127. "cat_image" => $news_cat_image,
  128. "news_subject" => $data['news_subject'],
  129. "news_ext" => "n",
  130. "news_reads" => $data['news_reads'],
  131. "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."' AND comment_hidden='0'"),
  132. "news_allow_comments" => $data['news_allow_comments'],
  133. "news_sticky" => $data['news_sticky']
  134. );
  135. add_to_title($locale['global_201'].$news_subject);
  136. echo "<!--news_pre_readmore-->";
  137. render_news($news_subject, $news_news[$_GET['rowstart']], $news_info);
  138. echo "<!--news_sub_readmore-->";
  139. if ($pagecount > 1) {
  140. echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF."?readmore=".$_GET['readmore']."&amp;")."\n</div>\n";
  141. }
  142. if ($data['news_allow_comments']) { showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
  143. if ($data['news_allow_ratings']) { showratings("N", $_GET['readmore'], FUSION_SELF."?readmore=".$_GET['readmore']); }
  144. } else {
  145. redirect(FUSION_SELF);
  146. }
  147. }
  148.  
  149. require_once THEMES."templates/footer.php";
  150. ?>
Vygenerované za 0.080 sekúnd, používate GeSHi 1.0.8.10

 
HaVri
Pomohlo?
 
Prejdite na fórum: