Navigacija

Vartotojų tinkle

Prisijungusių svečių: 51
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,955
Naujausias narys: lanis

Naujausi straipsniai

Paskutiniai nariai

TOMIJUS 2 dienos
ozzWANTED 3 dienos
Reikalas 9 savaitės
Jaunelis15 savaitės
lanis15 savaitės
And2s16 savaitės
Memento Mori21 savaitės
Quwqkibor23 savaitės
asirija27 savaitės
tomeem29 savaitės
weberiz33 savaitės
mRokass35 savaitės
kartoonas36 savaitės
grunskiz39 savaitės
Bruksnys39 savaitės
illusion39 savaitės
ordo40 savaitės
Jurgaila41 savaitės
originalcs1641 savaitės
Rytis42 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 18.218.146.251
Naujienų: 529
Straipsnių: 235
Temų: 52,588
Postų: 522,537
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Jaunelis
2024 Lie. 25 11:07:43
Oho vis dar veikia svetainė akinanti šypsen Šimtas metų, matau Šaukykloje nuostalgija. Smagu panaršyt po forumą ir pažiūrėt senas temas šypsosi

And2s
2024 Lie. 17 19:07:04
2008 pirmą kart čia patekau, man buvo 10m ir čia pramokau programavimo.. smagu skaityti senas žinutes, tokia nostalgija akinanti šypsen ačiū Ozz kad saugoji šitą kultūrinį reliktą šypsosi

ozzWANTED
2024 Sau. 17 01:01:00
Desperatiškus komentarus šaukykloje su accountu po mėnesio prasibuvimo, ištryniau. Pasaulis ir taip juodas. Įjungiam šviesą, prašviesės. šypsosi

Majakas
2023 Gru. 10 19:12:39
Negaliu patikėti jog žinutės/pranešimai visi yra nuo 2008 m akinanti šypsen

Žmogus
2023 Rugs. 7 21:09:14
O gal BloodKiller pasijungs?

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
news.php
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Bendri PHP-F klausimai

Autorius: GoN Peržiūrų: 3784      Spausdinti temą
2008 Sau. 2 14:01:03          1 žinutė iš 14
Spausdinti pranešimą
Sveiki, na atsisiunciau is modu tinklapio naujienu failą kaip yra pas juos toki pat tai ir man ant firefox viska gerai rodo, bet ant IE (Internet Explorer)
Rodo šita š.... tai kaip man padaryti kad rodytu taip pat kaip ant firefox?

Paveiksliukas su IE :



Paveiksliukas su FireFox :




Ir kaip padaryti knerodytu news_cats img nors nepadariau as ju kad rodytu bet vistiek juos rodo bet tik img nerodo :/


news.php failas :

<?php

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($skaityti) && !isNum($skaityti)) fallback(FUSION_SELF);

if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

$items_per_page = 11;

if (!isset($skaityti)) {
   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."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().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $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 = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
         $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } 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)", "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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }

if (isset($visos)) {
opentable("Visos naujienos");
$query3 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC");
if (mysql_num_rows($query3) == 0) {
echo "<center>Naujienø n&#235;ra</center>";
} else {
while ($data = dbarray($query3)) {
echo "<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b><br></a>";
}
}
closetable();
} elseif ($settings['news_style'] == "1") {
   openside("Naujienos");
$result=dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,3");

if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT news_cat_name FROM ".DB_PREFIX."news_cats WHERE news_cat_id='$data[news_cat]'");
$n_id = $data['news_id'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
$v_id = $data['news_reads'];

$category = dbresult($result2,0);

$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$query = dbquery("SELECT news_cat_image FROM ".$db_prefix."news_cats WHERE news_cat_id = '".$data['news_cat']."'");
$cat = dbarray($query);
echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-top:1px #ccc dotted;'>\n
<tr><td valign=top>";
echo "<img src='".IMAGES."news_cats/".$cat['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>   </td>
<td valign=top>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."' class='slink'><b>".trimlink($data[news_subject], 100)."</b></a>
<br> <i>$n_date • Komentarai $comments_n • Skaityta $v_id </i></a>
<br><br>".$news_news."</td></tr></table><br>";
   }   
$result3 = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 3,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result3)) {
$title = $data['news_subject'];
$sh_title = $title;
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$v_id = $data['news_reads'];
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
echo "<tr>
<td class='small2' style='border-top:1px #ccc dotted;'>
<img src='".THEME."images/bullet.gif'> $n_date  </span>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b></a> [$v_id | $comments_n] </td></tr>\n";
}
echo "<tr><td class='small2' style='border-top:1px #ccc dotted;'>
<a href='".BASEDIR."news.php?visos'>Visos naujienos</a> - <a href='".BASEDIR."news_cats.php'>Naujienu kategorijos</a></td></tr>\n";
echo "</table>\n";
}
closeside();

      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
openside("Naujienu nera");
echo "Naujienu nera";
closeside();
   }
} else {
   include INCLUDES."comments_include.php";
   include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$skaityti'"
   );
   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_prefix."news SET news_reads=news_reads+1 WHERE news_id='$skaityti'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
         if ($data['news_cat'] != 0) {
            $result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data['news_cat']."'");
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
               $news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".IMAGES_NC.$data2['news_cat_image']."' alt='".$data2['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
            }
         }
         $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)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$skaityti,FUSION_SELF."?skaityti=$skaityti");
         if ($data['news_allow_ratings']) showratings("N",$skaityti,FUSION_SELF."?skaityti=$skaityti");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>



2008 Sau. 2 14:01:20          2 žinutė iš 14
Spausdinti pranešimą
Pabandyk

<?php

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($skaityti) && !isNum($skaityti)) fallback(FUSION_SELF);

if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

$items_per_page = 11;

if (!isset($skaityti)) {
   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."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().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $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 = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
         $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } 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)", "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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }

if (isset($visos)) {
opentable("Visos naujienos");
$query3 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC");
if (mysql_num_rows($query3) == 0) {
echo "<center>Naujienø n&#235;ra</center>";
} else {
while ($data = dbarray($query3)) {
echo "<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b><br></a>";
}
}
closetable();
} elseif ($settings['news_style'] == "1") {
   openside("Naujienos");
$result=dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,3");

if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT news_cat_name FROM ".DB_PREFIX."news_cats WHERE news_cat_id='$data[news_cat]'");
$n_id = $data['news_id'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
$v_id = $data['news_reads'];

$category = dbresult($result2,0);

$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$query = dbquery("SELECT news_cat_image FROM ".$db_prefix."news_cats WHERE news_cat_id = '".$data['news_cat']."'");
$cat = dbarray($query);
echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-top:1px #ccc dotted;'>\n
<tr><td valign=top>";
<td valign=top>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."' class='slink'><b>".trimlink($data[news_subject], 100)."</b></a>
<br> <i>$n_date • Komentarai $comments_n • Skaityta $v_id </i></a>
<br><br>".$news_news."</td></tr></table><br>";
   }   
$result3 = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 3,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result3)) {
$title = $data['news_subject'];
$sh_title = $title;
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$v_id = $data['news_reads'];
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
echo "<tr>
<td class='small2' style='border-top:1px #ccc dotted;'>
<img src='".THEME."images/bullet.gif'> $n_date  </span>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b></a> [$v_id | $comments_n] </td></tr>\n";
}
echo "<tr><td class='small2' style='border-top:1px #ccc dotted;'>
<a href='".BASEDIR."news.php?visos'>Visos naujienos</a> - <a href='".BASEDIR."news_cats.php'>Naujienu kategorijos</a></td></tr>\n";
echo "</table>\n";
}
closeside();

      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
openside("Naujienu nera");
echo "Naujienu nera";
closeside();
   }
} else {
   include INCLUDES."comments_include.php";
   include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$skaityti'"
   );
   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_prefix."news SET news_reads=news_reads+1 WHERE news_id='$skaityti'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
       
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
             
            }
         }
         $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)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$skaityti,FUSION_SELF."?skaityti=$skaityti");
         if ($data['news_allow_ratings']) showratings("N",$skaityti,FUSION_SELF."?skaityti=$skaityti");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>




chipass: kai dedat koda, atjunkit smailus

2008 Sau. 2 14:01:21          3 žinutė iš 14
Spausdinti pranešimą
Smailus isjunk :/
2008 Sau. 2 14:01:21          4 žinutė iš 14
Spausdinti pranešimą
Tai spausk cituoti ir pamatysi be smailu blogai

ex best admin!
2008 Sau. 2 14:01:25          5 žinutė iš 14
Spausdinti pranešimą
Va be smailu:
<?php

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($skaityti) && !isNum($skaityti)) fallback(FUSION_SELF);

if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

$items_per_page = 11;

if (!isset($skaityti)) {
   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."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().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $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 = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
         $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } 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)", "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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }

if (isset($visos)) {
opentable("Visos naujienos");
$query3 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC");
if (mysql_num_rows($query3) == 0) {
echo "<center>Naujienø n&#235;ra</center>";
} else {
while ($data = dbarray($query3)) {
echo "<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b><br></a>";
}
}
closetable();
} elseif ($settings['news_style'] == "1") {
   openside("Naujienos");
$result=dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,3");

if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT news_cat_name FROM ".DB_PREFIX."news_cats WHERE news_cat_id='$data[news_cat]'");
$n_id = $data['news_id'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
$v_id = $data['news_reads'];

$category = dbresult($result2,0);

$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$query = dbquery("SELECT news_cat_image FROM ".$db_prefix."news_cats WHERE news_cat_id = '".$data['news_cat']."'");
$cat = dbarray($query);
echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-top:1px #ccc dotted;'>\n
<tr><td valign=top>";
<td valign=top>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."' class='slink'><b>".trimlink($data[news_subject], 100)."</b></a>
<br> <i>$n_date • Komentarai $comments_n • Skaityta $v_id </i></a>
<br><br>".$news_news."</td></tr></table><br>";
   }   
$result3 = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 3,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result3)) {
$title = $data['news_subject'];
$sh_title = $title;
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$v_id = $data['news_reads'];
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
echo "<tr>
<td class='small2' style='border-top:1px #ccc dotted;'>
<img src='".THEME."images/bullet.gif'> $n_date  </span>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b></a> [$v_id | $comments_n] </td></tr>\n";
}
echo "<tr><td class='small2' style='border-top:1px #ccc dotted;'>
<a href='".BASEDIR."news.php?visos'>Visos naujienos</a> - <a href='".BASEDIR."news_cats.php'>Naujienu kategorijos</a></td></tr>\n";
echo "</table>\n";
}
closeside();

      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
openside("Naujienu nera");
echo "Naujienu nera";
closeside();
   }
} else {
   include INCLUDES."comments_include.php";
   include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$skaityti'"
   );
   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_prefix."news SET news_reads=news_reads+1 WHERE news_id='$skaityti'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
       
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
             
            }
         }
         $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)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$skaityti,FUSION_SELF."?skaityti=$skaityti");
         if ($data['news_allow_ratings']) showratings("N",$skaityti,FUSION_SELF."?skaityti=$skaityti");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>




Adminas - ban'o laisvė
www.KIETEKAS.com
2008 Sau. 2 14:01:34          6 žinutė iš 14
Spausdinti pranešimą
error meta žliumbia


Parse error: syntax error, unexpected '<' in /home/.a/mano.varotojo.vardas/mano.psl/news.php on line 125
2008 Sau. 2 14:01:13          7 žinutė iš 14
Spausdinti pranešimą
<?php

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($skaityti) && !isNum($skaityti)) fallback(FUSION_SELF);

if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

$items_per_page = 11;

if (!isset($skaityti)) {
   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."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().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $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 = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
         $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } 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)", "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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }

if (isset($visos)) {
opentable("Visos naujienos");
$query3 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC");
if (mysql_num_rows($query3) == 0) {
echo "<center>Naujienø n&#235;ra</center>";
} else {
while ($data = dbarray($query3)) {
echo "<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b><br></a>";
}
}
closetable();
} elseif ($settings['news_style'] == "1") {
   openside("Naujienos");
$result=dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,3");

if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT news_cat_name FROM ".DB_PREFIX."news_cats WHERE news_cat_id='$data[news_cat]'");
$n_id = $data['news_id'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
$v_id = $data['news_reads'];

$category = dbresult($result2,0);

$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$query = dbquery("SELECT news_cat_image FROM ".$db_prefix."news_cats WHERE news_cat_id = '".$data['news_cat']."'");
$cat = dbarray($query);
echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-top:1px #ccc dotted;'>\n
<tr><td valign=top>";
echo "<td valign=top>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."' class='slink'><b>".trimlink($data[news_subject], 100)."</b></a>
<br> <i>$n_date • Komentarai $comments_n • Skaityta $v_id </i></a>
<br><br>".$news_news."</td></tr></table><br>";
   }   
$result3 = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 3,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result3)) {
$title = $data['news_subject'];
$sh_title = $title;
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$v_id = $data['news_reads'];
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
echo "<tr>
<td class='small2' style='border-top:1px #ccc dotted;'>
<img src='".THEME."images/bullet.gif'> $n_date  </span>
<a href='".BASEDIR."news.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b></a> [$v_id | $comments_n] </td></tr>\n";
}
echo "<tr><td class='small2' style='border-top:1px #ccc dotted;'>
<a href='".BASEDIR."news.php?visos'>Visos naujienos</a> - <a href='".BASEDIR."news_cats.php'>Naujienu kategorijos</a></td></tr>\n";
echo "</table>\n";
}
closeside();

      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
openside("Naujienu nera");
echo "Naujienu nera";
closeside();
   }
} else {
   include INCLUDES."comments_include.php";
   include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$skaityti'"
   );
   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_prefix."news SET news_reads=news_reads+1 WHERE news_id='$skaityti'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
       
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
             
            }
         }
         $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)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$skaityti,FUSION_SELF."?skaityti=$skaityti");
         if ($data['news_allow_ratings']) showratings("N",$skaityti,FUSION_SELF."?skaityti=$skaityti");
      } else {
         redirect(FUSION_SELF);
      }
}

require_once "side_right.php";
require_once "footer.php";
?>








Atnaujinta.


Redagavo ramon 2008 Sau. 2 15:01:27
2008 Sau. 2 15:01:01          8 žinutė iš 14
Spausdinti pranešimą
Visteik man šita meta ant IE

2008 Sau. 2 15:01:47          9 žinutė iš 14
Spausdinti pranešimą
As tik pateisiau MaFeto duota koda...

2008 Sau. 2 16:01:07          10 žinutė iš 14
Spausdinti pranešimą
adrenalinas parašė:
Visteik man šita meta ant IE be žado


Nenaudok to susikto IE
2008 Sau. 2 16:01:12          11 žinutė iš 14
Spausdinti pranešimą
Čia jau nieko nepadarysi naudok kita theme arba FF be žado
2008 Sau. 2 16:01:40          12 žinutė iš 14
Spausdinti pranešimą
Enzo parašė:
adrenalinas parašė:
Visteik man šita meta ant IE be žado


Nenaudok to susikto IE


As ir jo nenaudoju liežuvis tai man reikia lankytojams padaryti liežuvis
2008 Sau. 2 16:01:13          13 žinutė iš 14
Spausdinti pranešimą
adrenalinas parašė:
As ir jo nenaudoju :P tai man reikia lankytojams padaryti :P

Nu tai sakau keisk theme td

2008 Sau. 2 16:01:19          14 žinutė iš 14
Spausdinti pranešimą
<?php

require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (isset($skaityti) && !isNum($skaityti)) fallback(FUSION_SELF);

if ($settings['news_style'] == "1") { $i = 0; $rc = 0; $ncount = 1; $ncolumn = 1; $news_[0] = ""; $news_[1] = ""; $news_[2] = ""; } else { $i = 1; }

$items_per_page = 1;

if (!isset($skaityti)) {
   $rows = dbcount("(news_id)", "news", groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")");
   if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
   if ($rows != 0) {
      $result = dbquery(
         "SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
         LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
         LEFT JOIN ".$db_prefix."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().")
         ORDER BY news_sticky DESC, news_datestamp DESC LIMIT $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 = "<a name='news_".$data['news_id']."' id='news_".$data['news_id']."'></a>".stripslashes($data['news_subject']);
         if ($data['news_cat_image']) {
            $news_cat_image = "<a href='news_cats.php?cat_id=".$data['news_cat_id']."'><img src='".IMAGES_NC.$data['news_cat_image']."' alt='".$data['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
         } 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)", "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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[0] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[0] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[0] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date'])." &middot;\n";
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[0] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>";
               if (checkrights("N")) { $news_[0] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) $news_[0] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
            } else {
               if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }
               $row_color = ($rc % 2 == 0 ? "tbl2" : "tbl1");
               $news_[$ncolumn] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl2'><b>$news_subject</b></td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td class='tbl1' style='text-align:justify'>$news_news</td>\n</tr>\n";
               $news_[$ncolumn] .= "<tr>\n<td align='center' class='tbl2'>\n";
               if (checkrights("N")) $news_[$ncolumn] .= "<form name='editnews".$news_info['news_id']."' method='post' action='".ADMIN."news.php".$aidlink."&amp;news_id=".$news_info['news_id']."'>\n";
               $news_[$ncolumn] .= "<span class='small2'><img src='".THEME."images/bullet.gif' alt=''> <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['041'].showdate("longdate", $news_info['news_date']);
               if ($news_info['news_ext'] == "y" || $news_info['news_allow_comments']) {
                  $news_[$ncolumn] .= "<br>\n";
                  $news_[$ncolumn] .= $news_info['news_ext'] == "y" ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$locale['042']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?skaityti=".$news_info['news_id']."'>".$news_info['news_comments'].$locale['043']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['044']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".THEME."images/printer.gif' alt='".$locale['045']."' style='border:0px;vertical-align:middle;'></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <input type='hidden' name='edit' value='edit'><a href='javascript:document.editnews".$news_info['news_id'].".submit();'><img src='".IMAGES."edit.gif' alt='".$locale['048']."' title='".$locale['048']."' style='vertical-align:middle;border:0px;'></a></span>\n</form>\n"; } else { $news_[$ncolumn] .= "</span>\n"; }
               $news_[$ncolumn] .= "</td>\n</tr>\n</table>\n";
               if ($ncolumn == 1 && $i < ($nrows - 1)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) $news_[$ncolumn] .= "<div><img src='".THEME."images/blank.gif' alt='' width='1' height='8'></div>\n";
               $i++; $rc++;
            }
            $ncount++;
         } else {
            render_news($news_subject, $news_news, $news_info);
            if ($i != $numrows) { tablebreak(); } $i++;
         }
      }

if (isset($visos)) {
opentable("Visos naujienos");
$query3 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC");
if (mysql_num_rows($query3) == 0) {
echo "<center>Naujienų nėra</center>";
} else {
while ($data = dbarray($query3)) {
echo "<a href='".BASEDIR."naujienos.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b><br></a>";
}
}
closetable();
} elseif ($settings['news_style'] == "1") {
   openside("Naujienos");
$result=dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,5");

if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT news_cat_name FROM ".DB_PREFIX."news_cats WHERE news_cat_id='$data[news_cat]'");
$n_id = $data['news_id'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
$v_id = $data['news_reads'];

$category = dbresult($result2,0);

$news_news = $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_news'])) : stripslashes($data['news_news']);
$query = dbquery("SELECT news_cat_image FROM ".$db_prefix."news_cats WHERE news_cat_id = '".$data['news_cat']."'");
$cat = dbarray($query);
echo "<table width='100%' cellpadding='0' cellspacing='0' style='border-top:1px #ccc dotted;'>\n
<a href='".BASEDIR."naujienos.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."' class='slink'><b>".trimlink($data[news_subject], 100)."</b></a>
<br> <i>$n_date • Komentarai $comments_n • Skaityta $v_id </i></a>
<br><br>".$news_news."<a href='".BASEDIR."naujienos.php?skaityti=".$data['news_id']."' title='".$data['news_subject']."'><font color='#9A1818' size='1'>Skaityti plačiau..</font></a></td></tr></table><br>";
   }   
$result3 = dbquery("SELECT * FROM ".DB_PREFIX."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 5,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
while ($data = dbarray($result3)) {
$title = $data['news_subject'];
$sh_title = $title;
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=".$data['news_id']."");
$v_id = $data['news_reads'];
$date = $data['news_datestamp'];
$n_date = showdate("%Y %m %d", $date);
echo "<tr>
<td class='small2' style='border-top:1px #ccc dotted;'>
<img src='".THEME."images/bullet.gif'> $n_date  </span>
<a href='".BASEDIR."naujienos.php?skaityti=".$data['news_id']."'><b>".trimlink($data[news_subject], 100)." </b></a> [$v_id | $comments_n] </td></tr>\n";
}
echo "<tr><td class='small2' style='border-top:1px #ccc dotted;'>
<a href='".BASEDIR."naujienos.php?visos'>Visos naujienos</a> - <a href='".BASEDIR."news_cats.php'>Naujienu kategorijos</a></td></tr>\n";
echo "</table>\n";
}
closeside();

      }
      if ($rows > $items_per_page) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,$items_per_page,$rows,3)."\n</div>\n";
   } else {
openside("Naujienu nera");
echo "Naujienu nera";
closeside();
   }
} else {
   include INCLUDES."comments_include.php";
   include INCLUDES."ratings_include.php";
   $result = dbquery(
      "SELECT tn.*, user_id, user_name FROM ".$db_prefix."news tn
      LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
      WHERE news_id='$skaityti'"
   );
   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_prefix."news SET news_reads=news_reads+1 WHERE news_id='$skaityti'");
             $data['news_reads']++;
         }
         $news_subject = $data['news_subject'];
         if ($data['news_cat'] != 0) {
            $result2 = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data['news_cat']."'");
            if (dbrows($result2)) {
               $data2 = dbarray($result2);
               $news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".IMAGES_NC.$data2['news_cat_image']."' alt='".$data2['news_cat_name']."' align='left' style='border:0px;margin-top:3px;margin-right:5px'></a>";
            }
         }
         $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)", "comments", "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
            "news_allow_comments" => $data['news_allow_comments']
         );
         render_news($news_subject, $news_news, $news_info);
         if ($data['news_allow_comments']) showcomments("N","news","news_id",$skaityti,FUSION_SELF."?skaityti=$skaityti");
         if ($data['news_allow_ratings']) showratings("N",$skaityti,FUSION_SELF."?skaityti=$skaityti");
      } else {
         redirect(FUSION_SELF);
      }
   } else {
      redirect(FUSION_SELF);
   }
}

require_once "side_right.php";
require_once "footer.php";
?>





Viskas veikia.

Peršokti į forumą: