PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 29089
Šiandien: 10
Prisijungę nariai
» Svečių: 12
» Narių: 0

» Viso narių: 10,232
» Naujausias: EdvinasG1337

Prisijungimų istorija:
tabuxsenokai
EdvinasG1337nepamenu
rolandas94nepamenu
Zbigniew@nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
mast3rnepamenu
N1nt3ndnepamenu
Matze1987nepamenu
Piter_NSnepamenu
MariukasRnepamenu
Pask. modai
Prisijungti
Vardas

Slaptažodis



Dar ne narys?
Registruotis.

Pamiršai slaptažodį?
Prašyk naujo!.

Naujausi prašymai
[L] testas
Narių apklausa
Ar dar kuriate tinklalapius?

Ne
Ne
0% [0 Balsai]

Taip
Taip
88% [7 Balsai]

Naudojuosi socialiniais tinklais
Naudojuosi socialiniais tinklais
13% [1 Balsas]

Balsai: 8
Kad galėtum balsuoti, turi prisijungti.
Pradėta: 2022-05-29 19:54
Shoutbox
You must login to post a message.

2024-03-07 22:13
Oj Tabux… apkabinčiau už tą moderatorių 😁

2024-02-22 17:40
Šypsosi2 jo buvo laikai.. Senukai jau mes. Bega laikas greiciau nei noretusi. Smagu matyti kad uzsuka seni nariai, ne as vienas Šypsosi

2024-02-20 22:18
Zodziu.. Nostalgija. Sorry Tabux uz spam’a, netelpa viskas i viena shout’a. 😁

2024-02-20 22:14
Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..

2024-02-20 22:03
Sveiki kolegos 👌 kazkada rasiau greit 11 metu bet ziuriu greit 14 metu. 😄 baisuu, reik ta proga kazka sugalvot su php-f kaip jaunima itraukt.

Shoutbox Archive
Peržiūrėti temą
 Spausdinti temą
theme_functions_include
streetboy9363
#1 Spausdinti pranešimą
parašyta 2011-04-06 14:55
Naujokas



Reputacija: 0

Pranešimai: 7
Įstojo: 2009-06-12

Sveiki isidejau v7 naujeinos tik nariams o dabar meta error ant news.php:
Notice: Undefined index: user_status in /public_html/includes/theme_functions_include.php on line 115
Gal galite padeti kas pades 10+rep
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: theme_functions_include.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).
+--------------------------------------------------------*/
if (!defined(\"IN_FUSION\")) { die(\"Access Denied\"); }

function check_panel_status($side) {
   
   global $settings;
   
   $exclude_list = \"\";
   
   if ($side == \"left\") {
      if ($settings['exclude_left'] != \"\") {
         $exclude_list = explode(\"\r\n\", $settings['exclude_left']);
      }
   } elseif ($side == \"upper\") {
      if ($settings['exclude_upper'] != \"\") {
         $exclude_list = explode(\"\r\n\", $settings['exclude_upper']);
      }
   } elseif ($side == \"lower\") {
      if ($settings['exclude_lower'] != \"\") {
         $exclude_list = explode(\"\r\n\", $settings['exclude_lower']);
      }
   } elseif ($side == \"right\") {
      if ($settings['exclude_right'] != \"\") {
         $exclude_list = explode(\"\r\n\", $settings['exclude_right']);
      }
   }
   
   if (is_array($exclude_list)) {
      $script_url = explode(\"/\", $_SERVER['PHP_SELF']);
      $url_count = count($script_url);
      $base_url_count = substr_count(BASEDIR, \"/\")+1;
      $match_url = \"\";
      while ($base_url_count != 0) {
         $current = $url_count - $base_url_count;
         $match_url .= \"/\".$script_url[$current];
         $base_url_count--;
      }
      if (!in_array($match_url, $exclude_list) && !in_array($match_url.(FUSION_QUERY ? \"?\".FUSION_QUERY : \"\"), $exclude_list)) {
         return true;
      } else {
         return false;
      }
   } else {
      return true;
   }
}

function showbanners() {
   global $settings;
   ob_start();
   if ($settings['sitebanner2']) {
      eval(\"?>
\".stripslashes($settings['sitebanner2']).\"
\n    }
   if ($settings['sitebanner1']) {
      eval(\"?>\".stripslashes($settings['sitebanner1']).\"\n    } elseif ($settings['sitebanner']) {
      echo \"'\".$settings['sitename'].\"'\n\";
   } else {
      echo \"\".$settings['sitename'].\"\n\";
   }   
   $output = ob_get_contents();
   ob_end_clean();
   return $output;
}

function showsublinks($sep = \"\", $class = \"\") {
   $sres = dbquery(
      \"SELECT link_name, link_url, link_window, link_visibility FROM \".DB_SITE_LINKS.\"
      WHERE link_position='2' OR link_position='3' ORDER BY link_order\"
   );
   if (dbrows($sres)) {
      $i = 0;
      $res = \"
    \n\";
          while ($sdata = dbarray($sres)) {
             if ($sdata['link_url'] != \"---\" && checkgroup($sdata['link_visibility'])) {
                $link_target = $sdata['link_window'] == \"1\" ? \" target='_blank'\" : \"\";
                $li_class = ($i == 0 ? \" class='first-link\".($class ? \" $class\" : \"\").\"'\" : ($class ? \" class='$class'\" : \"\"));
                if (strstr($sdata['link_url'], \"http://\") || strstr($sdata['link_url'], \"https://\")) {
                   $res .= \"\".$sep.\"\".parseubb($sdata['link_name'], \"b|i|u|color\").\"\n\";
                } else {
                   $res .= \"\".$sep.\"\".parseubb($sdata['link_name'], \"b|i|u|color\").\"\n\";
                }
                $i++;
             }
          }
          $res .= \"
\n\";
      return $res;
   }
}

function showsubdate() {
   global $settings;
   return ucwords(showdate($settings['subheaderdate'], time()));
}

function newsposter($info, $sep = \"\", $class = \"\") {
   global $locale; $res = \"\";
   $link_class = $class ? \" class='$class' \" : \"\";
   $res = THEME_BULLET.\" \".profile_link($info['user_id'], $info['user_name'], $info['user_status']).\" \";
   $res .= $locale['global_071'].showdate(\"newsdate\", $info['news_date']);
   $res .= $info['news_ext'] == \"y\" || $info['news_allow_comments'] ? $sep.\"\n\" : \"\n\";
   return \"\".$res;
}

function newsopts($info, $sep, $class = \"\") {
   global $locale, $settings; $res = \"\";
   $link_class = $class ? \" class='$class' \" : \"\";
   if (!isset($_GET['readmore']) && $info['news_ext'] == \"y\") $res = \"\".$locale['global_072'].\" \".$sep.\" \";
   if ($info['news_allow_comments'] && $settings['comments_enabled'] == \"1\") { $res .= \"\".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \".$sep.\" \"; }
   if ($info['news_ext'] == \"y\" || ($info['news_allow_comments'] && $settings['comments_enabled'] == \"1\")) { $res .= $info['news_reads'].$locale['global_074'].\"\n \".$sep; }
   $res .= \"'\".$locale['global_075'].\"'\n\";
   return \"\".$res;
}

function newscat($info, $sep = \"\", $class = \"\") {
   global $locale; $res = \"\";
   $link_class = $class ? \" class='$class' \" : \"\";
   $res .= $locale['global_079'];
   if ($info['cat_id']) {
      $res .= \"\".$info['cat_name'].\"\";
   } else {
      $res .= \"\".$locale['global_080'].\"\";
   }
   return \"\".$res.\" $sep \";
}

function articleposter($info, $sep = \"\", $class = \"\") {
   global $locale, $settings; $res = \"\";
   $link_class = $class ? \" class='$class' \" : \"\";
   $res = THEME_BULLET.\" \".$locale['global_070'].\"\".profile_link($info['user_id'], $info['user_name'], $info['user_status']).\"\n\";
   $res .= $locale['global_071'].showdate(\"newsdate\", $info['article_date']);
   $res .= ($info['article_allow_comments'] && $settings['comments_enabled'] == \"1\" ? $sep.\"\n\" : \"\n\");
   return \"\".$res;
}

function articleopts($info, $sep) {
   global $locale, $settings; $res = \"\";
   if ($info['article_allow_comments'] && $settings['comments_enabled'] == \"1\") { $res = \"\".$info['article_comments'].($info['article_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \".$sep.\"\n\"; }
   $res .= $info['article_reads'].$locale['global_074'].\" \".$sep.\"\n\";
   $res .= \"'\".$locale['global_075'].\"'\n\";
   return \"\".$res;
}

function articlecat($info, $sep = \"\", $class = \"\") {
   global $locale; $res = \"\";
   $link_class = $class ? \" class='$class' \" : \"\";
   $res .= $locale['global_079'];
   if ($info['cat_id']) {
      $res .= \"\".$info['cat_name'].\"\";
   } else {
      $res .= \"\".$locale['global_080'].\"\";
   }
   return \"\".$res.\" $sep \";
}

function itemoptions($item_type, $item_id) {
   global $locale, $aidlink; $res = \"\";
   if ($item_type == \"N\") {
      if (iADMIN && checkrights($item_type)) { $res .= \" '\".$locale['global_076'].\"'\n\"; }
   } elseif ($item_type == \"A\") {
   if (iADMIN && checkrights($item_type)) { $res .= \" '\".$locale['global_076'].\"'\n\"; }
   }
   return $res;
}

function showrendertime($queries = true) {
   global $locale, $mysql_queries_count;

   $res = sprintf($locale['global_172'], substr((get_microtime() - START_TIME),0,4));
   $res .= ($queries ? \" - $mysql_queries_count \".$locale['global_173'] : \"\");
   return $res;
}

function showcopyright($class = \"\") {
   $link_class = $class ? \" class='$class' \" : \"\";
   $res = \"Powered by PHP-Fusion copyright © 2002 - \".date(\"Y\").\" by Nick Jones.
\n\";
   $res .= \"Released as free software without warranties under GNU Affero GPL v3.\n\";
   return $res;
}

function showcounter() {
   global $locale, $settings;
   if ($settings['visitorcounter_enabled']) {
      return \"\".number_format($settings['counter']).\" \".($settings['counter'] == 1 ? $locale['global_170'] : $locale['global_171']);
   } else {
      return \"\";
   }
}

function panelbutton($state, $bname) {
   $bname = preg_replace(\"/[^a-zA-Z0-9\s]/\", \"_\", $bname);
   if (isset($_COOKIE[\"fusion_box_\".$bname])) {
      if ($_COOKIE[\"fusion_box_\".$bname] == \"none\") {
         $state = \"off\";
      } else {
         $state = \"on\";
      }
   }
   return \">\";
}

function panelstate($state, $bname) {
   $bname = preg_replace(\"/[^a-zA-Z0-9\s]/\", \"_\", $bname);
   if (isset($_COOKIE[\"fusion_box_\".$bname])) {
      if ($_COOKIE[\"fusion_box_\".$bname] == \"none\") {
         $state = \"off\";
      } else {
         $state = \"on\";
      }
   }
   return \"
\n\";
}

// v6 compatibility
function opensidex($title, $state = \"on\") {
   
   openside($title, true, $state);

}

function closesidex() {

   closeside();

}

function tablebreak() {
   return true;
}
?>



Redagavo streetboy9363 2011-04-06 14:59
 
PM
minimukas
#2 Spausdinti pranešimą
parašyta 2011-04-06 16:48
Vartotojo avataras

Geradarys



Reputacija: 0

Pranešimai: 602
Įstojo: 2009-06-11

streetboy9363 - pamegink susikurti ".htaccess" failiuka ir irasyk i ji
Download source  Code
php_flag display_errors off



".htaccess" faila kelk i root direktorija...

Jei tai nepades imesk cia news.php savo...
Redagavo minimukas 2011-04-06 16:52
www.nusirasinek.lt - Pratybų atsakymai
 
PM
Wyciokazz
#3 Spausdinti pranešimą
parašyta 2011-04-06 17:01
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

minimukas negerai yra isjungti nes po to bus klaida kur ir nerodys o paskaityk geriau sita tema http://phpfusion....post_53879
Kam kurti tai kas jau sukurta.

Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.

[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img]
 
PM
streetboy9363
#4 Spausdinti pranešimą
parašyta 2011-04-06 18:00
Naujokas



Reputacija: 0

Pranešimai: 7
Įstojo: 2009-06-12

Tai as tos temos ir pasiemiau bet sakau virs naujienos raso sita error
 
PM
Wyciokazz
#5 Spausdinti pranešimą
parašyta 2011-04-06 18:03
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

Pas tave kokia fusion versija?
Kam kurti tai kas jau sukurta.

Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.

[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img]
 
PM
streetboy9363
#6 Spausdinti pranešimą
parašyta 2011-04-06 18:05
Naujokas



Reputacija: 0

Pranešimai: 7
Įstojo: 2009-06-12

minumkas gal galetum to failiuko nuoroda ideti jai veiks +10rep

PhpFusion v7.01.05
Redagavo streetboy9363 2011-04-06 18:09
 
PM
minimukas
#7 Spausdinti pranešimą
parašyta 2011-04-06 20:47
Vartotojo avataras

Geradarys



Reputacija: 0

Pranešimai: 602
Įstojo: 2009-06-11

Wyciokazz visiskai sutinku su tavimi.. as zinau kur klaida yra kad jis neduoda savo news.php failo jame kalida yra o ne tam theme_functions_include.php ...
Jeigu noresi kad istaisyciau duosi savo news.php
Redagavo minimukas 2011-04-06 20:48
www.nusirasinek.lt - Pratybų atsakymai
 
PM
streetboy9363
#8 Spausdinti pranešimą
parašyta 2011-04-07 13:10
Naujokas



Reputacija: 0

Pranešimai: 7
Įstojo: 2009-06-12

Stai
Download source  Code
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| 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/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+-------------------------------------------------------+
| Modified for English Error page
| By Diemux @ www.phpfusion-mod...
| To show DK error page: replace all error_en.php with
| error_dk.php
+-------------------------------------------------------*/
require_once \"maincore.php\";
require_once THEMES.\"templates/header.php\";

// Predefined variables, do not edit these values
if ($settings['news_style'] == \"1\") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = \"\"; $news_[1] = \"\"; $news_[2] = \"\"; } else { $i = 1; }

// 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.*, user_id, user_name 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'
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT \".$_GET['rowstart'].\",$items_per_page\"
      );     
      $numrows = dbrows($result);
      if ($settings['news_style'] == \"1\") { $nrows = round((dbrows($result) - 1) / 2); }
      while ($data = dbarray($result)) {
         $news_cat_image = \"\";
         $news_subject = \"\".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
            if (iMEMBER) {
            $news_cat_image = \"'\".$data['news_cat_name'].\"'\";
             } else {
             $news_cat_image = \"'\".$data['news_cat_name'].\"'\";
             }
             } else {
            $news_cat_image = \"\";
         }
         $news_news = $data['news_breaks'] == \"y\" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
         if ($news_cat_image != \"\") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            \"news_id\" => $data['news_id'],
            \"user_id\" => $data['user_id'],
            \"user_name\" => $data['user_name'],
            \"news_date\" => $data['news_datestamp'],
            \"news_ext\" => $data['news_extended'] ? \"y\" : \"n\",
            \"news_reads\" => $data['news_reads'],
            \"news_comments\" => dbcount(\"(comment_id)\", DB_COMMENTS, \"comment_type='N' AND comment_item_id='\".$data['news_id'].\"'\"),
            \"news_allow_comments\" => $data['news_allow_comments']
         );
         if ($settings['news_style'] == \"1\") {
            if ($rows <= 2 || $ncount == 1) {
               $news_[0] .= \"\n\";
               $news_[0] .= \"\n\n\n\";
               $news_[0] .= \"\n\n\n\";
               $news_[0] .= \"\n\n\n
\".$news_subject.\"
\".$news_news.\"
\n\";
               $news_[0] .= \"\".THEME_BULLET.\" \".$news_info['user_name'].\" \".$locale['global_071'].showdate(\"longdate\", $news_info['news_date']).\" \n\";
               if ($news_info['news_ext'] == \"y\" || $news_info['news_allow_comments']) {
                  if (iMEMBER) {
                  $news_[0] .= $news_info['news_ext'] == \"y\" ? \"\".$locale['global_072'].\" \n\" : \"\";
                  $news_[0] .= $news_info['news_allow_comments'] ? \"\".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \n\" : \"\";
                  } else {
                  $news_[0] .= $news_info['news_ext'] == \"y\" ? \"\".$locale['global_072'].\" \n\" : \"\";
                  $news_[0] .= $news_info['news_allow_comments'] ? \"\".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \n\" : \"\";
                  }
                  $news_[0] .= $news_info['news_reads'].$locale['global_074'].\" \n\";
               }
               if (iMEMBER) {
               $news_[0] .= \"'\".$locale['global_075'].\"'\";
               } else {
               $news_[0] .= \"'\".$locale['global_075'].\"'\";
               }
               if (checkrights(\"N\")) { $news_[0] .= \"   '\".$locale['global_076'].\"'
\n\"; } else { $news_[0] .= \"\n\"; }
               $news_[0] .= \"
\n\";
               if ($ncount != $rows) { $news_[0] .= \"
''
\n\"; }
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? \"tbl2\" : \"tbl1\");
               $news_[$ncolumn] .= \"\n\";
               $news_[$ncolumn] .= \"\n\n\n\";
               $news_[$ncolumn] .= \"\n\n\n\";
               $news_[$ncolumn] .= \"\n\n\n
\".$news_subject.\"
\".$news_news.\"
\n\";
               $news_[$ncolumn] .= \"\".THEME_BULLET.\" \".$news_info['user_name'].\" \".$locale['global_071'].showdate(\"longdate\", $news_info['news_date']);
               if ($news_info['news_ext'] == \"y\" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= \"
\n\";
                  if (iMEMBER) {
                  $news_[$ncolumn] .= $news_info['news_ext'] == \"y\" ? \"\".$locale['global_072'].\" \n\" : \"\";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? \"\".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \n\" : \"\";
                  } else {
                  $news_[$ncolumn] .= $news_info['news_ext'] == \"y\" ? \"\".$locale['global_072'].\" \n\" : \"\";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? \"\".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073']).\" \n\" : \"\";
                  }
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['global_074'].\" \n\";
               } else {
                  $news_[$ncolumn] .= \" \n\";
               }
               if (iMEMBER) {
               $news_[$ncolumn] .= \"'\".$locale['global_075'].\"'\n\";
               } else {
                  $news_[$ncolumn] .= \"'\".$locale['global_075'].\"'\n\";
               }
                  if (checkrights(\"N\")) { $news_[$ncolumn] .= \" '\".$locale['global_076'].\"'
\n\"; } else { $news_[$ncolumn] .= \"\n\"; }
               $news_[$ncolumn] .= \"
\n\";
               if ($ncolumn == 1 && $i < ($nrows - 1)) { $news_[$ncolumn] .= \"
''
\n\"; }
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) { $news_[$ncolumn] .= \"
''
\n\"; }
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
         }
      }
      if ($settings['news_style'] == \"1\") {
         opentable($locale['global_077']);
         echo \"\n\n\n\n\n\n\n\n\n
\n\";
         echo $news_[0];
         echo \"
\n\";
         echo $news_[1];
         echo \"
''\n\";
         echo $news_[2];
         echo \"
\n\";
         closetable();
      }
      if ($rows > $items_per_page) echo \"
\n\".makepagenav($_GET['rowstart'],$items_per_page,$rows,3).\"\n
\n\";
   } else {
      opentable($locale['global_077']);
      echo \"

\n\".$locale['global_078'].\"

\n
\n\";
      closetable();
   }
} else {
if (iMEMBER) {
   include INCLUDES.\"comments_include.php\";
   include INCLUDES.\"ratings_include.php\";
   $result = dbquery(
      \"SELECT tn.*, user_id, user_name FROM \".DB_NEWS.\" tn
      LEFT JOIN \".DB_USERS.\" tu ON tn.news_name=tu.user_id
      WHERE news_id='\".$_GET['readmore'].\"' AND news_draft='0'\"
   );
   if (dbrows($result)!=0) {
      $data = dbarray($result);
      if (checkgroup($data['news_visibility'])) {
         $news_cat_image = \"\";
         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_subject = $data['news_subject'];
         if ($data['news_cat']) {
            $result2 = dbquery(\"SELECT * FROM \".DB_NEWS_CATS.\" WHERE news_cat_id='\".$data['news_cat'].\"'\");
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
               $news_cat_image = \"'\".$data2['news_cat_name'].\"'\";
            }
         }
         $news_news = stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']);
         if ($data['news_breaks'] == \"y\") { $news_news = nl2br($news_news); }
         if ($news_cat_image != \"\") $news_news = $news_cat_image.$news_news;
         $news_info = array(
            \"news_id\" => $data['news_id'],
            \"user_id\" => $data['user_id'],
            \"user_name\" => $data['user_name'],
            \"news_date\" => $data['news_datestamp'],
            \"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'].\"'\"),
            \"news_allow_comments\" => $data['news_allow_comments']
         );
         add_to_title($locale['global_201'].$news_subject);
         render_news($news_subject, $news_news, $news_info);
         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);
      }
   } else {
      redirect(FUSION_SELF);
   }
   } else {
   opentable(\"Naujienos\");
   echo \"Naujienos tik nariams registruokis\";
   closetable();
   }
}

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


 
PM
Peršokti į forumą: