Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Gugio klausimai

Parašė Gugiss· 2008 Rugp. 2 23:08:46
#1

=====Klausimas #1=====

Nerodo datos forume prie posto kada narys buvo paskutiny kartą prisijunges.
echo ($data['user_lastvisit'] != 0 ? showdate("shortdate", $data['user_lastvisit'])



Redagavo Gugiss· 2008 Rugp. 20 18:08:12

Parašė Žmogus· 2008 Rugp. 2 23:08:32
#2

Aišku durnas klausimas, bet gal per nustatymas yra ištrinta?

Parašė Gugiss· 2008 Rugp. 3 00:08:51
#3

ne

Redagavo Gugiss· 2008 Rugp. 3 00:08:25

Parašė RuP3r· 2008 Rugp. 3 00:08:48
#4

O jei ? :]
echo ($data['user_lastvisit'] != 1 ? showdate("shortdate", $data['user_lastvisit'])




Parašė Gugiss· 2008 Rugp. 3 00:08:59
#5

Pas mane ne tik sito funkcijos neatlieka, bet ir keliu kitu. Gal cia del riboto hosto :?

Parašė bruzgis· 2008 Rugp. 3 00:08:41
#6

maincore.php bandyk permest, jei neveiks dek taip:

echo ($data['user_lastvisit'] != 0 ? showdate("y% %m %d H%.M%.S%", $data['user_lastvisit'])

Parašė MAnjack· 2008 Rugp. 3 09:08:54
#7

Šiaip gali būt, kad iš sql user_lastvisit nenuskaito, bet maža tikimybį, akd taip gali būti.

Parašė Gugiss· 2008 Rugp. 14 08:08:27
#8

=====Klausimas #2=====

Kai į DB importuoju kokią nors lentelę su daug info pvz. articles visi straipsniai gaunasi sugadinti matosi tik keli pirmi žodžiai. Kaip būtų galima išspręst šitą problemą? :?

Redagavo Gugiss· 2008 Rugp. 20 19:08:05

Parašė MAnjack· 2008 Rugp. 14 08:08:37
#9

Negali taip būt. Tikriausiai kopija blogai padaryta.

Parašė Gugiss· 2008 Rugp. 14 09:08:46
#10

Gali, gali ir jau numanau kodėl.... Tikriausia dėl lietuviškų raidžių, padarius kopiją jos rodomos kaip heroglifai. Gal darant kopiją yra kokia pasirinktis, kad viskas būtų ok :?

Parašė Poker· 2008 Rugp. 14 10:08:13
#11

Man ir taip buvo,bet deja jokio sprendimo neradau.:|

Parašė Gugiss· 2008 Rugp. 14 22:08:59
#12

Na va vakare susirenka protingiausi žmonės tai prikeliu temą :)

Parašė ramon· 2008 Rugp. 14 23:08:02
#13

Viena is prezasciu tai kad $data kintamasis nera nuroditas ta prasme ziurek kaip koks kintamasis yra nustatitas uzklausoi.

Parašė ozzWANTED· 2008 Rugp. 14 23:08:19
#14

žiūrėk į select dalį, jeigu nėra *, tai žiūrėk kokie laukeliai paimamami, taip pat žiūrėk ar adminkėje tvarkingai shortdate datos formatas nustatymas. Ar saite rodo datą taip pat žiūrėk. Permesk viewthread.php orginalų.

Parašė Gugiss· 2008 Rugp. 14 23:08:58
#15

ozzWANTED tas jau išsprestas klausimas :) žiūrėk 8 šios temos žinutę ;)
Gugiss parašė:
Kai į DB importuoju kokią nors lentelę su daug info pvz. articles visi straipsniai gaunasi sugadinti matosi tik keli pirmi žodžiai. Kaip būtų galima išspręst šitą problemą? :?

Redagavo Gugiss· 2008 Rugp. 14 23:08:33

Parašė Gugiss· 2008 Rugp. 20 21:08:10
#16

=====Klausimas #3=====

JS draugauja su PHP, MySQL? :?

Parašė Toonis· 2008 Rugp. 20 21:08:47
#17

Žinoma.

Parašė Gugiss· 2008 Rugp. 20 21:08:16
#18

Gal pateiktumėte pavyzdžių? Kažkodėl google man vėjus rodo :[

Parašė Toonis· 2008 Rugp. 20 21:08:48
#19

Kacapas parašė:
Gal pateiktumėte pavyzdžių? Kažkodėl google man vėjus rodo :[


Guglę užpuolė audra? Anatolijus? :o

Parašė Gugiss· 2008 Rugp. 20 21:08:21
#20

Toonolijus :[

Parašė Gugiss· 2008 Rugp. 21 12:08:08
#21

Kaip toks kodas atrodytų php faile:
<script type='text/javascript' src='js/stscode.js'></script>



Paprastai įklijavus errorą rodo :@

Parašė Enzo· 2008 Rugp. 21 12:08:06
#22

pabandyk echo""; užmest

Parašė Gugiss· 2008 Rugp. 21 12:08:10
#23

tarp <body> įdėjau ir veikia :D

Redagavo Gugiss· 2008 Rugp. 21 12:08:37

Parašė Žmogus· 2008 Rugp. 21 12:08:23
#24

Nu tai jo logiška :D

Parašė Gugiss· 2008 Rugp. 23 19:08:39
#25

Matot šitą:
$igame = $row[id];



Tipo kintamasis $igame skaitys iš eilutės id, bet pas mane užklausa vykdoma per 2 lenteles ir abejose lentelėse yra id eilutė tai kaip reikia paredaguot, kad atpažintų iš kurios lentelės reikia skaityti.

Parašė MAnjack· 2008 Rugp. 23 19:08:07
#26

Geriusia, kad id pavadinimai skirtūsi, kaip fusione.

Parašė Gugiss· 2008 Rugp. 23 20:08:28
#27

Noriu kad rodytų tik tos kategorijos naujienas kurioje esu... Kas negerai?
$latest_news = mysql_query("SELECT tn.*, title,timestamp,game,news_id from ccms_news tn
                                    LEFT JOIN ccms_gameindex tu ON tn.game=tu.id
                                    WHERE id=$gid
                                    ORDER BY id desc limit 5");
        $gid = $data['id'];
      $c = 1;
      while ($row = mysql_fetch_assoc($latest_news)) {



Redagavo Gugiss· 2008 Rugp. 23 20:08:44

Parašė MAnjack· 2008 Rugp. 23 21:08:45
#28

O kokią klaidą meta?

Parašė Gugiss· 2008 Rugp. 23 22:08:53
#29

Nemeta jokiios, tiesiog nerodo naujienų.

Parašė ramon· 2008 Rugp. 23 23:08:42
#30

Yra daug preziasciu, gali but kad naujienos is vis nera irasitos i duombaze [check db!] arba gali but kad uzklausa yra neteisinga, stai kitas budas sios uzklausos:

$gid = $data['id'];
$a = mysql_fetch_assoc(mysql_query("SELECT * FROM ccms_news"));
$b = mysql_query("SELECT * FROM ccms_gameindex WHERE game='{$a['id']}' AND id='{$gid}' ORDER BY id DESC LIMIKT 5");
$c = 1;
while ($row = mysql_fetch_assoc($b)) {




Kitas variantas gali but kad tas kintamasis $gid yra neapibreztas td $gid bus lygu ne $data[''] o $a['']....

Ai nu ka as galiu sakit kai nematau pilno naujienos failo kodo.. :|

Parašė Gugiss· 2008 Rugp. 23 23:08:20
#31

Ok duodu abejų lentelių sturktūrą ir naujienų kodą, gal padėsit genijai:

gameindex
CREATE TABLE IF NOT EXISTS `ccms_gameindex` (
  `id` int(11) NOT NULL auto_increment,
  `game_title` varchar(100) NOT NULL,
  `category` varchar(55) NOT NULL default '',
  `description` text NOT NULL,
  `box` varchar(100) NOT NULL default '',
  `date` varchar(55) NOT NULL default '',
  `gamespecs` text NOT NULL,
  `views` int(10) NOT NULL default '0',
  `burl` varchar(100) NOT NULL default '',
  `rdate` int(11) NOT NULL default '0',
  `developer` varchar(55) NOT NULL default '',
  `publisher` varchar(55) NOT NULL default '',
  `esrb` varchar(55) NOT NULL default '',
  `price` varchar(55) NOT NULL default '',
  `mokestis` varchar(55) character set utf8 collate utf8_lithuanian_ci NOT NULL,
  `buylink` varchar(100) NOT NULL,
  `genre` varchar(55) NOT NULL default '',
  `rank` int(11) NOT NULL default '0',
  `rating` decimal(2,1) NOT NULL default '0.0',
  `release_uk` varchar(255) NOT NULL default '',
  `release_jp` varchar(255) NOT NULL default '',
  `aka` varchar(255) NOT NULL default '',
  `bid` int(5) NOT NULL,
  `allow_rating` int(11) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  FULLTEXT KEY `mokestis` (`mokestis`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;





INSERT INTO `ccms_gameindex` (`id`, `game_title`, `category`, `description`, `box`, `date`, `gamespecs`, `views`, `burl`, `rdate`, `developer`, `publisher`, `esrb`, `price`, `mokestis`, `buylink`, `genre`, `rank`, `rating`, `release_uk`, `release_jp`, `aka`, `bid`, `allow_rating`) VALUES
(1, 'Age of Conan - Hyborian Adventures', 'pc', '', 'images/uploads/20080823_ageofconan_box.jpg', '2008-05-20', '', 51, 'forum-2.html', 20080520, 'Funcom', '---', 'Adults Only 18+', '€49.99', '€12.99', 'http://www.ageofconan.com/order_UK.html', 'Fantasy', 0, 0.0, '2008--', '2008--', 'AoC', 2, 1),




news
CREATE TABLE IF NOT EXISTS `ccms_news` (
  `news_id` int(11) NOT NULL auto_increment,
  `title` varchar(250) NOT NULL default '',
  `prev_news` text NOT NULL,
  `news` text NOT NULL,
  `author` varchar(99) NOT NULL default '',
  `archive_month` varchar(99) NOT NULL default '',
  `source` varchar(99) NOT NULL default '',
  `source_text` varchar(99) NOT NULL default '',
  `date` varchar(99) NOT NULL default '',
  `views` int(11) NOT NULL default '0',
  `rating` decimal(2,1) NOT NULL default '0.0',
  `platform` varchar(250) NOT NULL default '',
  `game` varchar(250) NOT NULL default '',
  `featured` int(11) NOT NULL default '0',
  `image` varchar(255) NOT NULL default '',
  `link` varchar(255) NOT NULL default '',
  `tag` varchar(25) NOT NULL default '',
  `news2` text NOT NULL,
  `timestamp` int(10) NOT NULL,
  `allow_rating` int(11) NOT NULL,
  `allow_comments` int(11) NOT NULL,
  PRIMARY KEY  (`news_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;




INSERT INTO `ccms_news` (`news_id`, `title`, `prev_news`, `news`, `author`, `archive_month`, `source`, `source_text`, `date`, `views`, `rating`, `platform`, `game`, `featured`, `image`, `link`, `tag`, `news2`, `timestamp`, `allow_rating`, `allow_comments`) VALUES
(1, 'MMORPG WORLD', 'This is gooood.', '<p>jaaaaaaaaaaaa</p>', 'Gugis', 'August 2008', '', '', 'Aug 23, 2008 18:44', 8, 0.0, '', 'World of Warcraft', 1, '', '', '', '<p>jaaaaaaaaajaaaaaaaa</p>', 1219506300, 1, 1),




kodas
<tr>
                     <td height="24" width="237" background="images/latest_right1.jpg" style="padding-left: 1px;">

                        <table cellpadding="0" align="center" cellspacing="0" border="0" width="237">
                        <tr>
                           <td width="2%" style="padding-left: 4px;"><img hspace="4" src="images/aero2.gif"></td>
                           <td width="73%"><a href="<?echo "naujiena-$row[news_id].html"?>" class="featured_list">



Redagavo Gugiss· 2008 Rugp. 24 12:08:38

Parašė ramon· 2008 Rugp. 23 23:08:41
#32

Grisiu pasiziuresiu kas ne taip..

Parašė Gugiss· 2008 Rugp. 30 21:08:22
#33

Kaip padaryt, kad butu ne viewpage.php?page_id=$id o viewpage.php?page_id=$title

Parašė ramon· 2008 Rugp. 30 21:08:26
#34

Papostink viewpage.php failo turyni. :)

Parašė MAnjack· 2008 Rugp. 30 21:08:04
#35

page_id=$title negali būt, nes page_id tik skaic\čius gali būt reikia užklausą ir tikrinimą redaguot.

Parašė ramon· 2008 Rugp. 30 21:08:32
#36

Krc, stai rask sita eilute ir istrink ja lauk:
if (isset($page_id) && !isNum($page_id)) fallback("index.php");




Veliau rask uzklausa :
$result = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_id='$page_id'");




Pakeisk i:
$result = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_title='$page_id'");




Toliau lengva kaip spjaut i ranka

Parašė Gugiss· 2008 Rugp. 30 22:08:36
#37

Dabar neiseina aidlinko pakeist is page_id y game :@

Parašė ramon· 2008 Rugp. 30 22:08:47
#38

Kurioi vietoi, be to koki tu editini viewpage.php ar adminke/cp .php ? :]

Parašė Gugiss· 2008 Rugp. 30 22:08:18
#39

Ok susitvarkiau pats. Dabar pasakyki mielasis kaip tarpus paverst - :D

Parašė ramon· 2008 Rugp. 30 22:08:01
#40

Koki tarpa? turi omeny linke "xxx=x x x"

Parašė Gugiss· 2008 Rugp. 30 22:08:36
#41

yra va tep
ramon.php?yra=labai kiec



o turi buti tep
ramon.php?yra=labai-kiec



Parašė ramon· 2008 Rugp. 30 22:08:00
#42

Na tai darik su str_replace() funk.:
Linkas :
str_reaplce(" ", "-", $id);



SQL Uzkllausa :
str_replace("-", " ", $id);




2+(2*2)*2+2*2 =

Parašė Gugiss· 2008 Rugp. 30 22:08:49
#43

vajezau kaip tingiu mastyt... kur cia viska kist :s tai va... godžirą veizdėju :s

Redagavo Gugiss· 2008 Rugp. 30 22:08:15

Parašė ramon· 2008 Rugp. 30 22:08:17
#44

Nu gi jmj $kintamaji i array idek t.y. :
$id = str_reaplce(" ", "-", $id);
$id = str_replace("-", " ", $id);




Arba :
$id = str_reaplce(" ", "-", $id);
$id .= str_replace("-", " ", $id);





Tai dek pres uzklausa...

Parašė Gugiss· 2008 Rugp. 30 22:08:38
#45

Tu man nepatinki :|
Fatal error: Call to undefined function str_reaplce() in C:\wamp\www\mmo\games.php on line 26



Parašė ramon· 2008 Rugp. 30 22:08:13
#46

wamp... :| dek i hosta ir tikrink nes as nezaidziu su wamperiu... :]

Parašė Gugiss· 2008 Rugp. 30 23:08:33
#47

uploadinau y hosta tai isvis nesusikuria puslapis, o redirectina y indexa :|

Parašė ramon· 2008 Rugp. 31 00:08:54
#48

Kaip gali redirectint jei ten nera nekur tos funkcijos? :]

Parašė Gugiss· 2008 Rugp. 31 00:08:03
#49

Ka as zn :|

Parašė Gugiss· 2008 Rugp. 31 19:08:25
#50

Noriu padaryti seo url bet kazkas nezigauna...
Error:
Notice: Use of undefined constant page_title - assumed 'page_title' in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89

Notice: Undefined variable: row in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89

Čia dėl to str_replace... O čia ta xujova vieta:
   $sres = dbquery(
      "SELECT link_window, link_visibility, link_url, link_name FROM ".DB_SITE_LINKS."
      WHERE ".groupaccess('link_visibility')." AND link_position>='2' AND link_url!='---' ORDER BY link_order ASC"
   );
   if(dbrows($sres)) {
      $i = 0;
            $title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[page_title]);
      $title_seo = str_replace(' ', '-', $title_start);

      $res = "<ul>\n";
      while ($sdata = dbarray($sres)) {
         $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 .= "<li".$li_class.">".$sep."<a href='".$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         } else {
            $res .= "<li".$li_class.">".$sep."<a href='".BASEDIR.$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         }
         $i++;
      }
      $res .= "</ul>\n";
      return $res;
   }
}



Redagavo Gugiss· 2008 Rugp. 31 19:08:41

Parašė DuRaCeLL· 2008 Rugs. 1 22:09:45
#51

ramon parašė:
2+(2*2)*2+2*2 = 14

Parašė Gugiss· 2008 Rugs. 1 22:09:16
#52

Ko nori? ?|

Parašė Gugiss· 2008 Rugs. 1 23:09:48
#53

Yo, yo niggaz. Help plyzzzzz
Notice: Undefined index: news_subject in /home/gugis/test.kar.lt/includes/theme_functions_include.php on line 125

Čia viso failo turinys:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 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("?><div style='float: right;'>".stripslashes($settings['sitebanner2'])."</div>\n<?php ");
   }
   if ($settings['sitebanner1']) {
      eval("?>".stripslashes($settings['sitebanner1'])."\n<?php ");
   } elseif ($settings['sitebanner']) {
      echo "<a href='".$settings['siteurl']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' style='border: 0;' /></a>\n";
   } else {
      echo "<a href='".$settings['siteurl']."'>".$settings['sitename']."</a>\n";
   }   
   $output = ob_get_contents();
   ob_end_clean();
   return $output;
}

function showsublinks($sep = "&middot;", $class = "") {
   $sres = dbquery(
      "SELECT link_window, link_visibility, link_url, link_name FROM ".DB_SITE_LINKS."
      WHERE ".groupaccess('link_visibility')." AND link_position>='2' AND link_url!='---' ORDER BY link_order ASC"
   );
   if(dbrows($sres)) {
      $i = 0;

      $res = "<ul>\n";
      while ($sdata = dbarray($sres)) {
         $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 .= "<li".$li_class.">".$sep."<a href='".$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         } else {
            $res .= "<li".$li_class.">".$sep."<a href='".BASEDIR.$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         }
         $i++;
      }
      $res .= "</ul>\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." <a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a> ";
   $res .= $locale['global_071'].showdate("longdate", $info['news_date']);
   $res .= $info['news_ext'] == "y" || $info['news_allow_comments'] ? $sep."\n" : "\n";
   return "<!--news_poster-->".$res;
}

function newsopts($info, $sep, $class = "") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";

if (!isset($_GET['readmore']) && $info['news_ext'] == "y") $res = "<a href='naujiena-".$info['news_id']."-".$info['news_subject'].".html'>".$locale['global_072']."</a> ".$sep." ";
   if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."#comments'".$link_class.">".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep." ";
   if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['global_074']."\n";
   $res .= $sep." <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
   return "<!--news_opts-->".$res;
}

function articleposter($info, $sep = "", $class = "") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
   $res = THEME_BULLET." ".$locale['global_070']."<a href='profile.php?lookup=".$info['user_id']."'".$link_class.">".$info['user_name']."</a>\n";
   $res .= $locale['global_071'].showdate("longdate", $info['article_date']);
   $res .= $info['article_allow_comments'] ? $sep."\n" : "\n";
   return "<!--article_poster-->".$res;
}

function articleopts($info, $sep) {
   global $locale; $res = "";
   if ($info['article_allow_comments']) { $res = "<a href='articles.php?article_id=".$info['article_id']."#comments'>".$info['article_comments'].($info['article_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep."\n"; }
   $res .= $info['article_reads'].$locale['global_074']." ".$sep."\n";
   $res .= "<a href='print.php?type=A&amp;item_id=".$info['article_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
   return "<!--article_opts-->".$res;
}

function itemoptions($item_type, $item_id) {
   global $locale, $aidlink; $res = "";
   if ($item_type == "N") {
      if (iADMIN && checkrights($item_type)) { $res .= "<!--article_news_opts--> &middot; <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
   } elseif ($item_type == "A") {
   if (iADMIN && checkrights($item_type)) { $res .= "<!--article_admin_opts--> &middot; <a href='".ADMIN."articles.php".$aidlink."&amp;action=edit&amp;article_id=".$item_id."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a>\n"; }
   }
   return $res;
}

function showcopyright($class = "") {
   $link_class = $class ? " class='$class' " : "";
   $res = "Powered by <a href='http://www.php-fusion.co.uk'".$link_class.">PHP-Fusion</a> copyright &copy; 2002 - ".date("Y")." by Nick Jones.<br />\n";
   $res .= "Released as free software without warranties under <a href='http://www.fsf.org/licensing/licenses/agpl-3.0.html'".$link_class.">GNU Affero GPL</a> v3.\n";
   return $res;
}

function showcounter() {
   global $locale,$settings;
   return "<!--counter-->".number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['global_170'] : $locale['global_171']);
}

function panelbutton($state, $bname) {
   if (isset($_COOKIE["fusion_box_".$bname])) {
      if ($_COOKIE["fusion_box_".$bname] == "none") {
         $state = "off";
      } else {
         $state = "on";
      }
   }
   return "<img src='".get_image("panel_".($state == "on" ? "off" : "on"))."' id='b_$bname' class='panelbutton' alt='' onclick=\"javascript:flipBox('$bname')\" />";
}

function panelstate($state, $bname) {
   if (isset($_COOKIE["fusion_box_".$bname])) {
      if ($_COOKIE["fusion_box_".$bname] == "none") {
         $state = "off";
      } else {
         $state = "on";
      }
   }
   return "<div id='box_$bname'".($state == "off" ? " style='display:none'" : "").">\n";
}

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

}

function closesidex() {

   closeside();

}

function tablebreak() {
   return true;
}
?>



Redagavo Gugiss· 2008 Rugs. 1 23:09:55

Parašė ramon· 2008 Rugs. 1 23:09:54
#54

Mokeciau - padeciau :) (:]:]:])

Parašė Gugiss· 2008 Rugs. 1 23:09:56
#55

Kuom tas news_subject užkliūna... o news_id neužkliūna... keista. Ramūn, tu kiec, aš tavim tikiu!

Parašė ramon· 2008 Rugs. 1 23:09:24
#56

Ramun tu kiec as tavim netikiec!

Parašė Karolis· 2008 Rugs. 2 16:09:24
#57

Gugiss gaidys man subine laižys. :p

Parašė _MaZvE_· 2008 Rugs. 2 16:09:37
#58

o ozonez jau senai jas laizo.Parodk pavizdy kaip reikia?:]:?

Parašė Gugiss· 2008 Rugs. 2 16:09:56
#59

Keršija suvartytas vaikas :]

Parašė Gugiss· 2008 Rugs. 3 18:09:28
#60

Yra tokia užklausa:
$result0 = dbquery("SELECT * FROM ".DB_NEWS."");
$data0 = dbarray($result0);
o kintamasis $data0['news_subject'] visada atvaizduoja pirmosios eilutės duomenis. Kas blogai?

Parašė MAnjack· 2008 Rugs. 3 18:09:42
#61

ciklą daryk
while ($data0 = dbarray($result0)) {

Parašė Gugiss· 2008 Rugs. 3 18:09:28
#62

Jo? :D
Tai dabar tipo šitaip turi atrodyti?
$result0 = dbquery("SELECT * FROM ".DB_NEWS."");
while ($data0 = dbarray($result0)) {

Redagavo Gugiss· 2008 Rugs. 3 18:09:23

Parašė Gugiss· 2008 Rugs. 4 15:09:39
#63

Labas!

Parašė MAnjack· 2008 Rugs. 4 15:09:34
#64

Nu taip. O vėliau eit turi lentelių kodai ir t.t.

Parašė Gugiss· 2008 Rugs. 4 15:09:27
#65

Kas? ?|:?:o:|:[

Parašė MAnjack· 2008 Rugs. 4 15:09:36
#66

Nu <tr><td> ir panašiai.

Parašė Gugiss· 2008 Rugs. 4 16:09:14
#67

Parse error: syntax error, unexpected $end in /home/gugis/test.kar.lt/includes/theme_functions_include.php on line 204 :)
function newsopts($info, $sep, $class = "") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
$result0 = dbquery("SELECT * FROM ".DB_NEWS."");
while ($data0 = dbarray($result0)) {

   if (!isset($_GET['readmore']) && $info['news_ext'] == "y") $res = "<a href='naujiena-".$data0['news_id']."-".$data0['news_subject'].".html'>".$locale['global_072']."</a> ".$sep." ";
   if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."#comments'".$link_class.">".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep." ";
   if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['global_074']."\n";
   $res .= $sep." <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
   return "<!--news_opts-->".$res;
}



Parašė MAnjack· 2008 Rugs. 4 16:09:25
#68

gale dar vieną } uždėk.

Parašė Gugiss· 2008 Rugs. 4 19:09:53
#69

Vistiek rodo visada pirmos naujienos pavadinimą. ?|

Parašė Gugiss· 2008 Rugs. 6 12:09:24
#70

:)

Parašė Dandžu· 2008 Rugs. 6 13:09:31
#71

Try now.
function newsopts($info, $sep, $class = "") {
   global $locale; $res = "";
   $link_class = $class ? " class='$class' " : "";
$result = dbquery("SELECT * FROM ".DB_NEWS."");
while ($data = dbarray($result)) {
   if (!isset($_GET['readmore']) && $info['news_ext'] == "y") $res = "<a href='naujiena-".$data0['news_id']."-".$data0['news_subject'].".html'>".$locale['global_072']."</a> ".$sep." ";
   if ($info['news_allow_comments']) $res .= "<a href='news.php?readmore=".$info['news_id']."#comments'".$link_class.">".$info['news_comments'].($info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> ".$sep." ";
   if ($info['news_ext'] == "y" || $info['news_allow_comments']) $res .= $info['news_reads'].$locale['global_074']."\n";
   $res .= $sep." <a href='print.php?type=N&amp;item_id=".$info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
   return "<!--news_opts-->".$res;
}
}




Redagavo Dandžu· 2008 Rugs. 6 13:09:59

Parašė Gugiss· 2008 Rugs. 8 17:09:14
#72

Nu pasidariau tuos friendly url su .htaccess, bet pasirodo tikrasis url kaip ka nors parasai shoutboxe arba ką nors įvertini. wtf? shoutbox:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: shoutbox_panel.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"); }

$link = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
$link = preg_replace("^(&amp;|\?)s_action=(edit|delete)&amp;shout_id=\d*^", "", $link);
$sep = stristr($link, "?") ? "&amp;" : "?";

if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == "delete") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
   if ((iADMIN && checkrights("S")) || (iMEMBER && dbcount("(shout_id)", DB_SHOUTBOX, "shout_id='".$_GET['shout_id']."' AND shout_name='".$userdata['user_id']."'"))) {
      $result = dbquery("DELETE FROM ".DB_SHOUTBOX." WHERE shout_id='".$_GET['shout_id']."'".(iADMIN ? "" : " AND shout_name='".$userdata['user_id']."'"));
   }
   redirect($link);
}

function sbwrap($text) {
   
   $i = 0; $tags = 0; $chars = 0; $res = "";
   
   $str_len = strlen($text);
   
   for ($i = 0; $i < $str_len; $i++) {
      $chr = substr($text, $i, 1);
      if ($chr == "<") {
         if (substr($text, ($i + 1), 6) == "a href" || substr($text, ($i + 1), 3) == "img") {
            $chr = " ".$chr;
            $chars = 0;
         }
         $tags++;
      } elseif ($chr == "&") {
         if (substr($text, ($i + 1), 5) == "quot;") {
            $chars = $chars - 5;
         } elseif (substr($text, ($i + 1), 4) == "amp;" || substr($text, ($i + 1), 4) == "#39;" || substr($text, ($i + 1), 4) == "#92;") {
            $chars = $chars - 4;
         } elseif (substr($text, ($i + 1), 3) == "lt;" || substr($text, ($i + 1), 3) == "gt;") {
            $chars = $chars - 3;
         }
      } elseif ($chr == ">") {
         $tags--;
      } elseif ($chr == " ") {
         $chars = 0;
      } elseif (!$tags) {
         $chars++;
      }
      
      if (!$tags && $chars == 18) {
         $chr .= "<br />";
         $chars = 0;
      }
      $res .= $chr;
   }
   
   return $res;
}

openside($locale['global_150']);
if (iMEMBER || $settings['guestposts'] == "1") {
   include_once INCLUDES."bbcode_include.php";
   if (isset($_POST['post_shout'])) {
      $flood = false;
      if (iMEMBER) {
         $shout_name = $userdata['user_id'];
      } elseif ($settings['guestposts'] == "1") {
         $shout_name = trim(stripinput($_POST['shout_name']));
         $shout_name = preg_replace("(^[0-9]*)", "", $shout_name);
         if (isnum($shout_name)) { $shout_name = ""; }
         include_once INCLUDES."securimage/securimage.php";
         $securimage = new Securimage();
         if (!isset($_POST['sb_captcha_code']) || $securimage->check($_POST['sb_captcha_code']) == false) { redirect($link); }
      }
      $shout_message = str_replace("\n", " ", $_POST['shout_message']);
      $shout_message = preg_replace("/^(.{255}).*$/", "$1", $shout_message);
      $shout_message = trim(stripinput(censorwords($shout_message)));
      if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == "edit") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
         $comment_updated = false;
         if ((iADMIN && checkrights("S")) || (iMEMBER && dbcount("(shout_id)", DB_SHOUTBOX, "shout_id='".$_GET['shout_id']."' AND shout_name='".$userdata['user_id']."'"))) {
            if ($shout_message) {
               $result = dbquery("UPDATE ".DB_SHOUTBOX." SET shout_message='$shout_message' WHERE shout_id='".$_GET['shout_id']."'".(iADMIN ? "" : " AND shout_name='".$userdata['user_id']."'"));
            }
         }
         redirect($link);
      } elseif ($shout_name && $shout_message) {
         require_once INCLUDES."flood_include.php";
         if (!flood_control("shout_datestamp", DB_SHOUTBOX, "shout_ip='".USER_IP."'")) {
            $result = dbquery("INSERT INTO ".DB_SHOUTBOX." (shout_name, shout_message, shout_datestamp, shout_ip) VALUES ('$shout_name', '$shout_message', '".time()."', '".USER_IP."')");
         }
      }
      redirect($link);
   }
   if (iMEMBER && (isset($_GET['s_action']) && $_GET['s_action'] == "edit") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
      $esresult = dbquery(
         "SELECT ts.*, tu.user_id, tu.user_name FROM ".DB_SHOUTBOX." ts
         LEFT JOIN ".DB_USERS." tu ON ts.shout_name=tu.user_id
         WHERE ts.shout_id='".$_GET['shout_id']."'"
      );
      if (dbrows($esresult)) {
         $esdata = dbarray($esresult);
         if ((iADMIN && checkrights("S")) || (iMEMBER && $esdata['shout_name'] == $userdata['user_id'] && isset($esdata['user_name']))) {
            if ((isset($_GET['s_action']) && $_GET['s_action'] == "edit") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) {
               $edit_url = $sep."s_action=edit&amp;shout_id=".$esdata['shout_id'];
            } else {
               $edit_url = "";
            }
            $shout_link = $link.$edit_url;
            $shout_message = $esdata['shout_message'];
         }
      } else {
         $shout_link = $link;
         $shout_message = "";
      }
   } else {
      $shout_link = $link;
      $shout_message = "";
   }
   
   echo "<a id='edit_shout' name='edit_shout'></a>\n";
   echo "<form name='chatform' method='post' action='".$shout_link."'>\n";
   if (iGUEST) {
      echo $locale['global_151']."<br />\n";
      echo "<input type='text' name='shout_name' value='' class='textbox' maxlength='30' style='width:140px' /><br />\n";
      echo $locale['global_152']."<br />\n";
   }
   echo "<textarea name='shout_message' rows='4' cols='20' class='textbox' style='width:140px'>".$shout_message."</textarea><br />\n";
   echo display_bbcodes("150px;", "shout_message", "chatform", "smiley|b|u|url|color")."\n";
   if (iGUEST) {
      echo $locale['global_158']."<br />\n";
      echo "<img id='sb_captcha' src='".INCLUDES."securimage/securimage_show.php' alt='' /><br />\n";
    echo "<a href='".INCLUDES."securimage/securimage_play.php'><img src='".INCLUDES."securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
    echo "<a href='#' onclick=\"document.getElementById('sb_captcha').src = '".INCLUDES."securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='".INCLUDES."securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
      echo $locale['global_159']."<br />\n<input type='text' name='sb_captcha_code' class='textbox' style='width:100px' /><br />\n";
   }
   echo "<br /><input type='submit' name='post_shout' value='".$locale['global_153']."' class='button' />\n";
   echo "</form>\n<br />\n";
} else {
   echo "<div style='text-align:center'>".$locale['global_154']."</div><br />\n";
}
$numrows = dbcount("(shout_id)", DB_SHOUTBOX);
$result = dbquery(
   "SELECT ts.*, tu.user_id, tu.user_name FROM ".DB_SHOUTBOX." ts
   LEFT JOIN ".DB_USERS." tu ON ts.shout_name=tu.user_id
   ORDER BY ts.shout_datestamp DESC LIMIT 0,".$settings['numofshouts']
);
if (dbrows($result)) {
   $i = 0;
   while ($data = dbarray($result)) {
      echo "<div class='shoutboxname'>";
      if ($data['user_name']) {
         echo "<a href='".BASEDIR."profile.php?lookup=".$data['shout_name']."' class='side'>".$data['user_name']."</a>\n";
      } else {
         echo $data['shout_name']."\n";
      }
      echo "</div>\n";
      echo "<div class='shoutboxdate'>".showdate("shortdate", $data['shout_datestamp'])."</div>";
      echo "<div class='shoutbox'>".sbwrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color"))."</div>\n";
      if ((iADMIN && checkrights("S")) || (iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name']))) {
         echo "[<a href='".$link.$sep."s_action=edit&amp;shout_id=".$data['shout_id']."#edit_shout"."' class='side'>".$locale['global_076']."</a>]\n";
         echo "[<a href='".$link.$sep."s_action=delete&amp;shout_id=".$data['shout_id']."' class='side'>".$locale['global_157']."</a>]<br />\n";
      }
      $i++;
      if ($i != $numrows) { echo "<br />\n"; }
   }
   if ($numrows > $settings['numofshouts']) {
      echo "<div style='text-align:center'>\n<a href='".INFUSIONS."shoutbox_panel/shoutbox_archive.php' class='side'>".$locale['global_155']."</a>\n</div>\n";
   }
} else {
   echo "<div>".$locale['global_156']."</div>\n";
}
closeside();
?>



Parašė Žmogus· 2008 Rugs. 8 17:09:13
#73

Tai čia taip turi būti, nieko nepakeisi :s

Parašė Gugiss· 2008 Rugs. 8 17:09:52
#74

pakeisiu! :@

Parašė Toonis· 2008 Rugs. 8 17:09:10
#75

Gugiss parašė:
pakeisiu! :@
Aš pasitikiu tavo jėgom!!!

Parašė Gugiss· 2008 Rugs. 8 18:09:13
#76

:@:@:@ pirst...

Parašė Gugiss· 2008 Rugs. 16 21:09:36
#77

Gal yra vyrai bliat nax.ui bliat suprantat toks modas http://mmorpg.com/gamelist.cfm/g... nu tipo bliat as pridedu kategorija bliat ir nu nueinu i ta kategorija nu ir tipo virsui tie linkai y tos kategorijos straipsnius ir nu bliat siuntinius, naujienas nu suprantat.

Parašė Rytis· 2008 Rugs. 16 21:09:41
#78

bliat ?|

Parašė Gugiss· 2008 Rugs. 16 21:09:57
#79

nu ?|

Parašė Rytis· 2008 Rugs. 16 21:09:53
#80

tvajumat


Parašė Gugiss· 2008 Rugs. 21 22:09:48
#81

Kaip butu galima padaryt kad straipsnio kategorijos pavadinima butu galima pasirinkt is pridetiniu puslapiu saraso. Nu ta prasme nebutu galima parasyt kategorijos pavadinimo, bet duotu pasirinkima is esamu pridetiniu puslapiu.

Parašė Gugiss· 2008 Rugs. 29 14:09:57
#82

KAs blogai:
Klaida:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN fusion_custom_pages ON rating_item_id = page_id ORDER BY rating_vote D' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN fusion_custom_pages ON rating_item_id = page_id ORDER BY rating_vote D' at line 1


Kodas:
openside("Gera");
$result = dbquery("SELECT * FROM ".$db_prefix."ratings WHERE rating_type='C' LEFT JOIN ".$db_prefix."custom_pages ON rating_item_id = page_id ORDER BY rating_vote DESC LIMIT 0,5");
while ($data = dbarray($result)) {
$id = $data['rating_item_id'];
$rating = $data['rating_vote'];
   echo "$id $rating<br>";
}

closeside();



Parašė MAnjack· 2008 Rugs. 29 14:09:34
#83

WHERE rating_type='C' turi būti gale ir kiekviena lentelė turi turėti savo trumpinį pvz r. ir cp. Pasidaryk iš forumo užklausų :)

Parašė Gugiss· 2008 Rugs. 29 16:09:10
#84

Dėkui ;) O ką būtų galima sugalvot, kad numeruotų žaidimus pagal reitingą. ?| Nu tipo kad priekyje rodytų reitingo numerį.
1. Tu
2. Aš
3. Jis

Redagavo Gugiss· 2008 Rugs. 29 16:09:55

Parašė ramon· 2008 Rugs. 29 16:09:01
#85

$nr=0;
while($a = mysql_fetch_assoc($query)) {
$nr++;
echo "#{$nr} - {$a['reitingas']}<br>";
}



Redagavo ramon· 2008 Rugs. 29 17:09:23

Parašė Gugiss· 2008 Rugs. 29 16:09:38
#86

Sitaip turi but :?
openside("Gera");
$result = dbquery("SELECT * FROM ".$db_prefix."ratings LEFT JOIN ".$db_prefix."custom_pages ON rating_item_id = page_id  WHERE rating_type='C' ORDER BY rating_vote DESC LIMIT 0,5");

while (($data = mysql_fetch_assoc($result))
$nr++;
$nr=0;
$id = $data['page_title'];
$rating = $data['rating_vote'];
}
echo "$n - $id<br>";

closeside();



Parašė Gugiss· 2008 Rugs. 29 16:09:55
#87

nu bl man reikia pilno kodo as klausiu ar teisingai pritaikiau :|

Parašė ramon· 2008 Rugs. 29 17:09:16
#88

Atsakymas: ne, netaisingai.
Turi pvz ir pagal ji darikis..

Parašė Gugiss· 2008 Rugs. 29 17:09:59
#89

Kad ir pats pvz su klaidom :|

Parašė ramon· 2008 Rugs. 29 17:09:31
#90

Pataisiau.

Parašė Gugiss· 2008 Lap. 6 21:11:56
#91

Vėl reikia pagalbos. Kaip tai padaryti?
*Administracijoje sukurdamas naują naujienų kategoriją yra laukelis į kurį gali įrašyti skaičių (jo laukelis db lentelėje vadinamas news_cat_game).
*News.php faile yra kodas echo "Labas";

Sukuriu naujieną kurios kategorijos skaičius yra 1 ir rodo tą echo labas, sukuriu naujieną kurios kategorijos skaičius 2 vistiek turi rodyti labas, bet jeigu sukuriu naujieną kurios kategorija neturi skaičiaus tai ir nerodo to "labas". Kokį kodą turėčiau įterpti į news.php kad tai ką pasakiau veiktų?
Tik nesakykit "naudok if" tai man nixuuja nepadės :D Aš PHP neraukiu :D

Redagavo Gugiss· 2008 Lap. 6 21:11:19

Parašė ramon· 2008 Lap. 6 21:11:27
#92

Geras klausimas ?| kad butu tai imanoma dar :S:D

Parašė Gugiss· 2008 Lap. 6 21:11:02
#93

Ką tu čia pysi bite :| Meluoji

Parašė ramon· 2008 Lap. 6 21:11:39
#94

Nepisu, tu jau spejai :D

Parašė Gugiss· 2008 Lap. 6 22:11:46
#95

Vai ramon noobas :] pats pasidariau :P
         if ( $gid == "0" ) {
   echo "Labas";
} else {
    echo "Kebabas";
}



Parašė Gugiss· 2008 Lap. 8 18:11:44
#96

Tokia uzklausa padariau:
$result = dbquery("SELECT FROM ".$db_prefix."news_cats");
while($data = dbarray($result)) {
}




O man raso:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM fusion_news_cats' at line 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM fusion_news_cats' at line 1




Kas negerai?

Parašė ramon· 2008 Lap. 8 18:11:07
#97

Vai gaga noob red color...

$result = dbquery("SELECT * FROM ".$db_prefix."news_cats");
while($data = dbarray($result)) {
}



Parašė Gugiss· 2008 Lap. 8 18:11:22
#98

Ai žinai pas mane ant klaviatūros nėra žvaigždutės ženklo :s

Parašė Black psycho· 2008 Lap. 8 18:11:30
#99

Ten kur lietuviškos raidės arba prie skaičių tikrai turėtų būti. :| Nebent pas tave laptopas tada tai nežinau. Copy paste galima :]

Redagavo Black psycho· 2008 Lap. 8 18:11:25

Parašė Gugiss· 2008 Lap. 8 18:11:28
#100

Black psycho parašė:
Ten kur lietuviškos raidės arba prie skaičių tikrai turėtų būti. :| Nebent pas tave laptopas tada tai nežinau. Copy paste galima :]

Nesusipratai, kad čia buvo pokštas? :s

Redagavo Gugiss· 2008 Lap. 8 18:11:54

Parašė ramon· 2008 Lap. 8 18:11:50
#101

Jei ka jis nesuprato.. :|:]:]

Parašė MAnjack· 2008 Lap. 8 18:11:14
#102

:D:D Black psycho bairis daug geresnis už Gugio :D

Parašė Gugiss· 2008 Lap. 8 18:11:15
#103

O dabar kas negerai? :D

if ( $gid0 == 0 ) {
   echo "Tuscia";
}else{
            $result7 = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_naujienos='$gid'");
while($data7 = dbarray($result7)) {
   $gid7 = $data7['page_id'];
$nid7 = $data7['page_naujienos'];
$aid = $data7['page_straipsniai'];
$pid = $data7['page_foto'];
$vid = $data7['page_video'];
$fid = $data7['page_forumas'];
$sid = $data7['page_svetaine'];
$buy = $data7['page_pirkti'];
}
echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";
}




Notice: Undefined variable: gid7 in C:\wamp\www\news.php on line 191

Suprantu, kad nesupranta kintamojo $gid7, bet nesuprantu kodėl nesupranta :( (dėl } ?)

Redagavo Gugiss· 2008 Lap. 8 19:11:10

Parašė MAnjack· 2008 Lap. 8 19:11:49
#104

Pirma uždarai While ciklą, o tik tada tą $gid7 atvaizduoji.

Parašė Gugiss· 2008 Lap. 8 20:11:06
#105

MAnjack parašė:
Pirma uždarai While ciklą, o tik tada tą $gid7 atvaizduoji.

Ech... Ir vėl tu užuominom šneki.... Padėk man mielaširdingasis pone!!!... :(

Parašė sniuff· 2008 Lap. 8 20:11:53
#106

while($data7 = dbarray($result7)) { }
   $gid7 = $data7['page_id'];
$nid7 = $data7['page_naujienos'];
$aid = $data7['page_straipsniai'];
$pid = $data7['page_foto'];
$vid = $data7['page_video'];
$fid = $data7['page_forumas'];
$sid = $data7['page_svetaine'];
$buy = $data7['page_pirkti'];
}
echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";





Manau jis tai norėjo pasakyti.

Parašė MAnjack· 2008 Lap. 8 21:11:41
#107

echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";




Pabandyk prieš } dėt.

Parašė Gugiss· 2008 Lap. 8 21:11:56
#108

Dabar
Parse error: syntax error, unexpected T_ELSE in C:\wamp\www\news.php on line 204


if ( $gid0 == 0 ) {
   echo "Tuscia";
}else{
            $result7 = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_naujienos='$gid'");
while($data7 = dbarray($result7)) { }
   $gid7 = $data7['page_id'];
$nid7 = $data7['page_naujienos'];
$aid = $data7['page_straipsniai'];
$pid = $data7['page_foto'];
$vid = $data7['page_video'];
$fid = $data7['page_forumas'];
$sid = $data7['page_svetaine'];
$buy = $data7['page_pirkti'];
}
            
echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";
}



         render_news2($news_news, $news_info);
         echo "<!--news_sub_readmore-->";
         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);
   }
}



Parašė sniuff· 2008 Lap. 8 21:11:07
#109

MAnjack parašė:
echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";




Pabandyk prieš } dėt.


Šiaip jau prieš jį yra padėtas }, ir jei jis dar vieną padės }, tai uždarys else

Gugiss duok pilną failą, nes pagal iškarpą, neįmanoma surasti, kodėl pas tave beveik visi else, neturi pradžios.

Parašė Gugiss· 2008 Lap. 8 21:11:37
#110

Manjacko būdu anksčiau bandžiau tai errorų nerodo, bet ir else turinio nerodo
Va pilnas:
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";

// Predefined variables, do not edit these values
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 = "<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='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></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)", 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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><strong>".$news_subject."</strong></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";
               $news_[0] .= "<span class='small2'>".THEME_BULLET." <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['global_071'].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."?readmore=".$news_info['news_id']."'>".$locale['global_072']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['global_074']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>";
               if (checkrights("N")) { $news_[0] .= " &middot;  <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$news_info['news_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a></span>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) { $news_[0] .= "<div><img src='".get_image("blank")."' 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'><strong>".$news_subject."</strong></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";
               $news_[$ncolumn] .= "<span class='small2'>".THEME_BULLET." <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['global_071'].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."?readmore=".$news_info['news_id']."'>".$locale['global_072']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."#comments'>".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['global_074']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$news_info['news_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a></span>\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='".get_image("blank")."' alt='' width='1' height='8' /></div>\n"; }
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) { $news_[$ncolumn] .= "<div><img src='".get_image("blank")."' alt='' width='1' height='8' /></div>\n"; }
               $i++; $rc++;
            }
            $ncount++;
         } else {
            echo "<!--news_prepost_".$i."-->\n";
            $i++;
            render_news($news_subject);
            render_news2($news_news, $news_info);
         }
      }
      if ($settings['news_style'] == "1") {
         opentable($locale['global_077']);
         echo "<table cellpadding='0' cellspacing='0' style='width:100%'>\n<tr>\n<td colspan='3' style='width:100%'>\n";
         echo $news_[0];
         echo "</td>\n</tr>\n<tr>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[1];
         echo "</td>\n<td style='width:10px'><img src='".get_image("blank")."' alt='' width='10' height='1' /></td>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[2];
         echo "</td>\n</tr>\n</table>\n";
         closetable();
      }
      if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
   } else {
      opentable($locale['global_077']);
      echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
      closetable();
   }
} else {
   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);
               $gid0 = $data2['news_cat_game'];
               $news_cat_image = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".get_image("nc_".$data2['news_cat_name'])."' alt='".$data2['news_cat_name']."' class='news-category' /></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)", 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);
         echo "<!--news_pre_readmore-->";
         render_news($news_subject);
                  echo "<!--news_pre_readmore-->";
 

$result = dbquery("SELECT * FROM ".$db_prefix."news_cats");
while($data = dbarray($result)) {
   $gid = $data['news_cat_game'];
}

if ( $gid0 == 0 ) {
   echo "Tuscia";
}else{
            $result7 = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_naujienos='$gid'");
while($data7 = dbarray($result7)) {
   $gid7 = $data7['page_id'];
$nid7 = $data7['page_naujienos'];
$aid = $data7['page_straipsniai'];
$pid = $data7['page_foto'];
$vid = $data7['page_video'];
$fid = $data7['page_forumas'];
$sid = $data7['page_svetaine'];
$buy = $data7['page_pirkti'];

}
            
echo "<a href='game.php?id=$gid0'>Pagrindinis</a> $gid7";
}



         render_news2($news_news, $news_info);
         echo "<!--news_sub_readmore-->";
         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);
   }
}

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



Redagavo Gugiss· 2008 Lap. 8 21:11:02

Parašė sniuff· 2008 Lap. 8 21:11:50
#111

Gugiss kodėl man rodo, kad viskas gerai ?

Parašė Gugiss· 2008 Lap. 8 21:11:45
#112

Dabar nusikopijuok

Parašė sniuff· 2008 Lap. 8 21:11:01
#113

Sorry, bet nerandu klaidos.
Nenaudok v7 :D

Parašė Gugiss· 2008 Lap. 8 21:11:36
#114

Naudosiu... :|

Parašė Gugiss· 2008 Lap. 9 16:11:13
#115

O kas cia dabar?
if ( $gid1 == 0 )
 echo "Tuscia";
 else                   
$result7 = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_id='$gid0'");
while($data7 = dbarray($result7)) {
     
         $result3 = dbquery("SELECT * FROM ".DB_NEWS_CATS." WHERE news_cat_id='".$data['news_cat']."'");
     $data3 = dbarray($result3);
   $gid7 = $data7['page_id'];
$nid7 = $data7['page_naujienos'];
$aid = $data7['page_straipsniai'];
$pid = $data7['page_foto'];
$vid = $data7['page_video'];
$fid = $data7['page_forumas'];


 echo "Kazkas $aid";
}




Notice: Undefined variable: result7 in C:\wamp\www\news.php on line 177

Parašė Gugiss· 2009 Kov. 13 18:03:31
#116

$result = dbquery("SELECT tt.page_id FROM ".DB_CUSTOM_PAGES." tt INNER JOIN ".DB_RATINGS." tf ON tt.page_id=tf.rating_item_id WHERE rating_type='C' ORDER BY rating_vote DESC LIMIT 0,10");
$nr=0;
$game = $data['page_title'];
$gid = $data['page_id'];
while ($data = dbarray($result)) {
$nr++;
echo "#{$nr} - <a href='game.php?id=$gid'>$game</a><br>";
    }




Kas čia blogai? Nerodo to
<a href='game.php?id=$gid'>$game</a>



Parašė Enzo· 2009 Kov. 13 18:03:12
#117

man kažkaip result keistai atrodo, ten ir bėda

Parašė Gugiss· 2009 Kov. 13 18:03:39
#118

Man irgi keistai atrodo.

Parašė MAnjack· 2009 Kov. 13 18:03:26
#119

$result = dbquery("SELECT tf.*, tt.page_id FROM ".DB_CUSTOM_PAGES." tt LEFT JOIN ".DB_RATINGS." tf ON tt.page_id=tf.rating_item_id WHERE rating_type='C' ORDER BY rating_vote DESC LIMIT 0,10");




Parašė Gugiss· 2009 Kov. 13 19:03:06
#120

Vistiek nerodo ?|

Parašė MAnjack· 2009 Kov. 13 19:03:27
#121

$result = dbquery("SELECT tf.*, tt.page_id FROM ".DB_CUSTOM_PAGES." tt LEFT JOIN ".DB_RATINGS." tf ON tt.page_id=tf.rating_item_id WHERE tf.rating_type='C' ORDER BY tf.rating_vote DESC LIMIT 0,10");



Parašė Gugiss· 2009 Kov. 13 19:03:58
#122

Nea :|

Parašė MAnjack· 2009 Kov. 13 19:03:21
#123

Nežinau tada. reiks testuot :)

Parašė Gugiss· 2009 Kov. 13 19:03:42
#124

Ačiū, kad padedi. ;)

Parašė Gugiss· 2009 Kov. 13 19:03:42
#125

Ačiū, kad padedi. ;)
VISI ŽIŪRĖKIT ČIA

Parašė MAnjack· 2009 Kov. 13 20:03:23
#126

Atidžiau pažiūrėjau ir radau klaidą. Užklausoj neselectinai page_title :)
Dabar tikrai veikia :)

$result = dbquery("SELECT tt.page_id, tt.page_title FROM ".$db_prefix."custom_pages tt LEFT JOIN ".$db_prefix."ratings tf ON tt.page_id=tf.rating_item_id WHERE tf.rating_type='C' ORDER BY tf.rating_vote DESC LIMIT 0,10");
$nr=0;
while ($data = dbarray($result)) {
$nr++;
$game = $data['page_title'];
$gid = $data['page_id'];
echo "#{$nr} - <a href='game.php?id=$gid'>$game</a><br>";
    }



Parašė Gugiss· 2009 Kov. 13 20:03:23
#127

Ačiū, veikia, duok penkis. :)

Parašė Jaunelis· 2009 Kov. 13 20:03:13
#128

gugi čia bsk OT bet kada veiks tavo tas mmo web ar jau jam senay šakes gal turi koki kitą ? :O

Parašė Gugiss· 2009 Kov. 13 20:03:56
#129

O dabar dėl šito:
$result = dbquery("SELECT tt.page_id, tt.page_title FROM ".$db_prefix."custom_pages tt LEFT JOIN ".$db_prefix."ratings tf ON tt.page_id=tf.rating_item_id WHERE tf.rating_type='C' ORDER BY tf.rating_vote DESC LIMIT 0,10");
$nr=0;

while ($data = dbarray($result)) {
$nr++;
$game = $data['page_title'];
$gid = $data['page_id'];
$b = $data['rating_vote'];
echo "#{$nr} - <a href='game.php?id=$gid'>$game</a><br> - {$b}";
    }




Rodo:
Undefined index: rating_vote

Jauneli aš jį buvau metęs, bet dabar vėl užėjo noras ką nors kurti, tai ir grįžau prie jo.

Redagavo Gugiss· 2009 Kov. 13 20:03:08

Parašė Gugiss· 2009 Kov. 13 20:03:56
#130

O dabar dėl šito:
$result = dbquery("SELECT tt.page_id, tt.page_title FROM ".$db_prefix."custom_pages tt LEFT JOIN ".$db_prefix."ratings tf ON tt.page_id=tf.rating_item_id WHERE tf.rating_type='C' ORDER BY tf.rating_vote DESC LIMIT 0,10");
$nr=0;

while ($data = dbarray($result)) {
$nr++;
$game = $data['page_title'];
$gid = $data['page_id'];
$b = $data['rating_vote'];
echo "#{$nr} - <a href='game.php?id=$gid'>$game</a><br> - {$b}";
    }




Rodo:
Undefined index: rating_vote

Jauneli aš jį buvau metęs, bet dabar vėl užėjo noras ką nors kurti, tai ir grįžau prie jo.

Parašė MAnjack· 2009 Kov. 13 20:03:46
#131

SELECT tt.page_id, tt.page_title

Keisk į SELECT ttf.*, tt.*
Svetainė daugiau apsikraus negu su praėjusia užklausa, tačiau tokių klaidų nebus :D

Parašė Gugiss· 2009 Kov. 15 10:03:44
#132

Ką šitas reiškia? :o
Notice: Uninitialized string offset: 0 in C:\wamp2\www\games.php on line 40

40 eilute: $kaina = $data['page_kaina'];

Uzklausa:
$result = dbquery("SELECT * FROM ".$db_prefix."custom_pages ORDER BY page_title DESC");
while ($data = dbarray($result)) {
$title = $data['page_title'];
$zanras = $data['page_zanras'];
$gamintojai = $data['page_gamintojai'];
$data = $data['page_data'];
$kaina = $data['page_kaina'];
$mokestis = $data['page_mokestis'];



Redagavo Gugiss· 2009 Kov. 15 10:03:07

Parašė Gugiss· 2009 Kov. 15 10:03:39
#133

Ką šitas reiškia? :o
Notice: Uninitialized string offset: 0 in C:\wamp2\www\games.php on line 40

40 eilute: $kaina = $data['page_kaina'];

Uzklausa:
$result = dbquery("SELECT * FROM ".$db_prefix."custom_pages ORDER BY page_title DESC");
while ($data = dbarray($result)) {
$title = $data['page_title'];
$zanras = $data['page_zanras'];
$gamintojai = $data['page_gamintojai'];
$data = $data['page_data'];
$kaina = $data['page_kaina'];
$mokestis = $data['page_mokestis'];



Parašė MAnjack· 2009 Kov. 15 11:03:16
#134

Kas toj duomenų bazės skitį įrašyta?

Parašė Gugiss· 2009 Kov. 15 11:03:54
#135

Ką? :s

Parašė MAnjack· 2009 Kov. 15 11:03:45
#136

Ar kas nors toję kainos skiltį įrašyta duomenų bazės ar ne?

Parašė Gugiss· 2009 Kov. 15 11:03:45
#137

Yra
Susitvarkiau jau

Redagavo Gugiss· 2009 Kov. 15 11:03:54

Parašė Gugiss· 2009 Bal. 8 15:04:57
#138

Va yra toks kodas:
<table width='100%' height='195' border='0' cellpadding='00' cellspacing='0' background='$img2'>



Kaip padaryt, kad bg nesikartotų?

Parašė Pongis· 2009 Bal. 8 15:04:11
#139

Bandyk: style='background-image:url('$img');background-repeat:no-repeat;

Parašė Gugiss· 2009 Bal. 8 15:04:16
#140

neiseina

Parašė ramon· 2009 Bal. 8 15:04:35
#141

Na jei taip ne iseina galima labai paprastu budu padarit

       if (tas ir tas) $stylius = "style='background-image:url('x.jpg');background-repeat:no-repeat;";
else if (tas ir tas) $stylius = "style='background-image:url('x1.jpg');background-repeat:no-repeat;";



Parašė Gugiss· 2009 Bal. 8 15:04:02
#142

kas tas tas?
gerai, cia susitvarkiau.cia nebeda. beda tame, kad pas zmogu su mazesne rezoliucija rodys tik puse to bg paveikslelio. kaip padaryt, kad visur vienodai rodytu? :D

Redagavo Gugiss· 2009 Bal. 8 16:04:51

Parašė ramon· 2009 Bal. 8 18:04:06
#143

padarik tokia pacia rezolucija kaip pas ta "zmogu" sumazink iki tokio didzio kol normaliai rodis ir td su if padarik jei tokia ir tokia rezolucija td sumazintas img ir t.t. :D :]

Parašė Sineik· 2009 Bal. 8 19:04:56
#144

Dar keli mėnesėliai ir galėsim švęst šitos temos gimtadienį!

Parašė ramon· 2009 Bal. 8 20:04:49
#145

gugis ja pres rasydamas sia tema atsvente :D

Parašė Gugiss· 2009 Bal. 9 18:04:10
#146

Va toks sušiktas klausimas.
Svetainė man įprasta rezoliucija atrodo taip (atkreipkime dėmesį į paveiksliuką ant kurio užrašyta AAA):





O sumažinus rezoliuciją štai taip (paveiksliukas ir lentelė kuriame yra tas paveiksliukas siaurėja):





O AŠ NENORIU KAD PAVEIKSLUKS SIAURĖTŲ

theme.php:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";

define("THEME_WIDTH", "80%");
define("THEME_BULLET", "<strong>&middot;</strong>");

function render_page($license=false) {

global $settings, $main_style;

//Header
echo "<div class='outer-border $main_style' style='background-color:#000;width:".THEME_WIDTH.";' align='center'>\n";
echo "<div class='floatfix'>\n";
echo "<div class='full-header floatfix' align='left'><table width='600' height='133' border='0' align='right' cellpadding='0' cellspacing='0'>
<tr>
<th width='468' scope='col'>&nbsp;</th>
<th width='132' scope='col'>&nbsp;</th>
</tr>
<tr>
<td height='60'><a href='http://mmo.xz.lt/reklama.php'><img src='http://mmo.xz.lt/v2/themes/onrpg/images/reklama.gif' width='468' height='60' border='0' /></a></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></div>\n";

//Content

if (LEFT) { echo "<div id='side-border-left' align='left'>".LEFT."</div>\n"; }
if (RIGHT) { echo "<div id='side-border-right' align='left' valign='top'>".RIGHT."</div>\n"; }
echo "<div id='main-bg' align='left' class='clearfix'><div id='container' align='left'>".U_CENTER.CONTENT.L_CENTER."</div></div>\n";

//Footer
echo "<div class='footer clear' style='text-align:center;'>".stripslashes($settings['footer'])."<br />\n";
echo "www.onrpg.lt";
echo "</div>\n</div>\n";

}

function render_news($subject, $news) {

echo "<div class='main-body floatfix'>".$subject."<br>".$news." ";



}


function render_news2($info) {


echo "<div class='news-footer'>\n";
echo newsposter($info,"&middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']);
echo "</div>\n";
echo "</div>\n";
}

function render_article($subject) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>".$subject."</td>\n";
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";

}

function render_article2($article, $info) {

echo "<div class='main-body floatfix'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>\n";
echo "<div class='news-footer'>\n";
echo articleposter($info,"&middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']);
echo "</div>\n";

}

function opentable($title) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>".$title."</td>\n";
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<div class='main-body floatfix'>\n";

}

function closetable() {

echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
echo "<table height='10'></table>";

}






function opentable2($title) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>".$title."</td>\n";
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<div class='main-body floatfix'>\n";

}

function closetable2() {

echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
echo "<table height='10'></table>";

}









function openside($title, $collapse = false, $state = "on") {

global $panel_collapse; $panel_collapse = $collapse;

echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='cpanel' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside() {

global $panel_collapse;

if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";

echo "<td height='10'></td>\n";

echo "</tr>\n</table>\n";
}

function openside2($title, $collapse = false, $state = "on") {

global $panel_collapse; $panel_collapse = $collapse;

echo "<table cellpadding='0' cellspacing='0' width='100%''>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='cpanel' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='side2-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }

}

function closeside2() {

global $panel_collapse;

if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";

echo "<td height='10'></td>\n";

echo "</tr>\n</table>\n";
}
?>

Redagavo Gugiss· 2009 Bal. 9 18:04:25

Parašė Gugiss· 2009 Bal. 9 19:04:21
#147

nuuuu

Parašė Gugiss· 2009 Bal. 9 19:04:38
#148

Alio

Parašė Gugiss· 2009 Bal. 9 20:04:05
#149

Manau, kad del situ cia. Bet nezinau kame beda
function opentable($title) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>".$title."</td>\n";
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<div class='main-body floatfix'>\n";

}

function closetable() {

echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
echo "<table height='10'></table>";

}

Parašė Gugiss· 2009 Bal. 9 22:04:48
#150

Manau, kad del situ cia. Bet nezinau kame beda
function opentable($title) {

echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='kpanel'></td>\n";
echo "<td class='cpanel'>".$title."</td>\n";
echo "<td class='dpanel'></td>\n";
echo "</tr>\n</table>\n";
echo "<div class='main-body floatfix'>\n";

}

function closetable() {

echo "</td>\n";
echo "</tr><tr>\n";
echo "<td style='height:5px;background-color:#f6a504;'></td>\n";
echo "</tr>\n</table>\n";
echo "<table height='10'></table>";

}

Parašė ex-it· 2009 Bal. 9 22:04:41
#151

Na, tavo vietoje naudociau iframe, nes vistiek netilptu visas imgas, jo nesumazinus, o su iframe, matysi dali paveikslelio, taciau nebus sutrauktas :}

Parašė Gugiss· 2009 Bal. 9 22:04:39
#152

cia ir matoma dalis... vienu zodziu nesupratai... laukiu kitu isminciu :)

Parašė bad_user· 2009 Bal. 9 23:04:35
#153

define("THEME_WIDTH", "80%"); - nustatai tykslu ir nesikeis pagal rez. O dabar keitinėjasi pagal rez. ;]

Redagavo bad_user· 2009 Bal. 9 23:04:20

Parašė Gugiss· 2009 Bal. 10 00:04:33
#154

tas pats sudas ?|
viskas uzlenda uz desines puses paneliu :|

Redagavo Gugiss· 2009 Bal. 10 00:04:10

Parašė bad_user· 2009 Bal. 10 00:04:26
#155

padaryk tarkime: define("THEME_WIDTH", "1010px"); ir turėtu nesikeitinėti:)

Redagavo bad_user· 2009 Bal. 10 00:04:37

Parašė Gugiss· 2009 Bal. 10 00:04:05
#156

Taip ir padariau. Vistiek viskas uzlenda uz soniniu paneliu

Parašė Gugiss· 2009 Bal. 11 20:04:05
#157

wut?

Parašė Gugiss· 2009 Bal. 11 23:04:30
#158

swx all

Parašė Gugiss· 2009 Bal. 27 15:04:33
#159

Problema su v7 foto galerija. Kai įjungiu nuotraukų ženklinimą, nuotraukų nerodo.

Parašė Gugiss· 2009 Bal. 27 17:04:30
#160

Problema su v7 foto galerija. Kai įjungiu nuotraukų ženklinimą, nuotraukų nerodo.

Parašė Gugiss· 2009 Bal. 27 20:04:55
#161

Problema su v7 foto galerija. Kai įjungiu nuotraukų ženklinimą, nuotraukų nerodo.

Parašė Gugiss· 2009 Bal. 28 16:04:16
#162

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '='6'' at line 1




if (isset($_GET['category']) && isnum($_GET['category'])) {
$result2 = dbquery("SELECT * FROM ".$db_prefix."kroax_kategori WHERE cid='".$_GET['category']."'");
while($data2 = dbarray($result2)) {
$data2 = dbarray($result2);
$gid0 = $data2['album_game'];
$gid1 = $data2['album_gamey'];
                           
if ( $gid1 == 0 ) {
$result = dbquery("SELECT * FROM ".$db_prefix."custom_pages WHERE page_id='$gid0'");
while($batas = dbarray($result)) 
$gid = $batas['page_id'];
$title = $batas['page_title'];
$kn = $batas['page_kaina'];
$mm = $batas['page_mokestis'];
$nid = $batas['page_naujienos'];
$aid = $batas['page_straipsniai'];
$pid = $batas['page_foto'];
$vid = $batas['page_video'];
$vdata = $batas['page_data'];
$fid = $batas['page_forumas'];
$url = $batas['page_svetaine'];
$gam = $batas['page_gamintojai'];
$buy = $batas['page_pirkti'];
$img2 = $batas['page_img2'];
$zan = $batas['page_zanras'];
$stat = $batas['page_status'];

$result3 = dbquery("SELECT * FROM ".$db_prefix."kroax_kategori WHERE ='".$_GET['category']."'");
$data3 = dbarray($result3);
   echo "bla bla bla
";


   echo "bla bla bla";

}else {

}
}
}



Redagavo Gugiss· 2009 Bal. 28 16:04:56

Parašė Gugiss· 2009 Bal. 28 18:04:14
#163

Problema su v7 foto galerija. Kai įjungiu nuotraukų ženklinimą, nuotraukų nerodo.

Parašė MAnjack· 2009 Bal. 28 18:04:28
#164

Tai nejunk :D Ne, o šiaip pasižiūrėk ar ftp ji yra, ar linką sutampa ir pnš.

Parašė Gugiss· 2009 Bal. 28 19:04:48
#165

viskas gerai buna kol neyjungiu senklinimo... o as jo nenoriu isjungti... :(

Parašė Gugiss· 2009 Bal. 29 17:04:29
#166

Nuo kor priklauso id suteikimas? Pvz.: ymeciau kelias foto y foto albuma, ju id: 1, 2, 3, 4. Istrynus sias foto is db ir ydejus naujas ju id bus jau 5, 6 7, 8 net jeigu ir nebus id su pradiniais skaiciais. O jeigu as noriu kad senojo failo id pakeistu naujojo failo id.

Parašė Gugiss· 2009 Bal. 30 14:04:14
#167

BUMP!

Parašė ex-it· 2009 Bal. 30 14:04:06
#168

tai padaryk tikrinima id'u ir jei neegzistuoja toks id insertins toki, kurio nera, o ant else paprastas insertas.

Parašė Gugiss· 2009 Bal. 30 14:04:45
#169

ja ja japoti matoti kapoti... urli kurli turli...

Parašė tock· 2009 Bal. 30 14:04:14
#170

Gugiss parašė:
ja ja japoti matoti kapoti... urli kurli turli...

Legendinis...

Parašė Gugiss· 2009 Geg. 2 20:05:10
#171

Labas, noreciau padaryti, kad naujienas rodytu keturiais stulpeliais.

News.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: news.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";

// Predefined variables, do not edit these values
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 = "<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='".get_image("nc_".$data['news_cat_name'])."' alt='".$data['news_cat_name']."' class='news-category' /></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)", 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] .= "<table width='100%' cellpadding='0' cellspacing='0'>\n";
               $news_[0] .= "<tr>\n<td class='tbl2'><strong>".$news_subject."</strong></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";
               $news_[0] .= "<span class='small2'>".THEME_BULLET." <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['global_071'].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."?readmore=".$news_info['news_id']."'>".$locale['global_072']."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."'>".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> &middot;\n" : "";
                  $news_[0] .= $news_info['news_reads'].$locale['global_074']." &middot;\n";
               }
               $news_[0] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>";
               if (checkrights("N")) { $news_[0] .= " &middot;  <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$news_info['news_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a></span>\n"; } else { $news_[0] .= "</span>\n"; }
               $news_[0] .= "</td>\n</tr>\n</table>\n";
               if ($ncount != $rows) { $news_[0] .= "<div><img src='".get_image("blank")."' 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'><strong>".$news_subject."</strong></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";
               $news_[$ncolumn] .= "<span class='small2'>".THEME_BULLET." <a href='profile.php?lookup=".$news_info['user_id']."'>".$news_info['user_name']."</a> ".$locale['global_071'].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."?readmore=".$news_info['news_id']."'>".$locale['global_072']."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_allow_comments'] ? "<a href='".FUSION_SELF."?readmore=".$news_info['news_id']."#comments'>".$news_info['news_comments'].($news_info['news_comments'] == 1 ? $locale['global_073b'] : $locale['global_073'])."</a> &middot;\n" : "";
                  $news_[$ncolumn] .= $news_info['news_reads'].$locale['global_074']." &middot;\n";
               } else {
                  $news_[$ncolumn] .= " &middot;\n";
               }
               $news_[$ncolumn] .= "<a href='print.php?type=N&amp;item_id=".$news_info['news_id']."'><img src='".get_image("printer")."' alt='".$locale['global_075']."' style='vertical-align:middle;border:0;' /></a>\n";
               if (checkrights("N")) { $news_[$ncolumn] .= " &middot; <a href='".ADMIN."news.php".$aidlink."&amp;action=edit&amp;news_id=".$news_info['news_id']."'><img src='".get_image("edit")."' alt='".$locale['global_076']."' title='".$locale['global_076']."' style='vertical-align:middle;border:0;' /></a></span>\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='".get_image("blank")."' alt='' width='1' height='8' /></div>\n"; }
               if ($ncolumn == 2 && $i < (dbrows($result) - $nrows - 2)) { $news_[$ncolumn] .= "<div><img src='".get_image("blank")."' alt='' width='1' height='8' /></div>\n"; }
               $i++; $rc++;
            }
            $ncount++;
         } else {
            echo "<!--news_prepost_".$i."-->\n";
            $i++;
            render_news($news_subject, $news_news, $news_info);
         }
      }
      if ($settings['news_style'] == "1") {
         opentable($locale['global_077']);
         echo "<table cellpadding='0' cellspacing='0' style='width:100%'>\n<tr>\n<td colspan='3' style='width:100%'>\n";
         echo $news_[0];
         echo "</td>\n</tr>\n<tr>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[1];
         echo "</td>\n<td style='width:10px'><img src='".get_image("blank")."' alt='' width='10' height='1' /></td>\n<td style='width:50%;vertical-align:top;'>\n";
         echo $news_[2];
         echo "</td>\n</tr>\n</table>\n";
         closetable();
      }
      if ($rows > $items_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'],$items_per_page,$rows,3)."\n</div>\n";
   } else {
      opentable($locale['global_077']);
      echo "<div style='text-align:center'><br />\n".$locale['global_078']."<br /><br />\n</div>\n";
      closetable();
   }
} else {
   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 = "<a href='news_cats.php?cat_id=".$data2['news_cat_id']."'><img src='".get_image("nc_".$data2['news_cat_name'])."' alt='".$data2['news_cat_name']."' class='news-category' /></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)", 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);
         echo "<!--news_pre_readmore-->";
         render_news($news_subject, $news_news, $news_info);
         echo "<!--news_sub_readmore-->";
         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);
   }
}

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



Parašė Gugiss· 2009 Geg. 3 10:05:05
#172

up

Parašė MAnjack· 2009 Geg. 3 11:05:03
#173

Bandyk čia skaičius pasikeist:
if ($i == $nrows && $ncolumn != 2) { $ncolumn = 2; $i = 0; }



Parašė Gugiss· 2009 Bir. 10 19:06:56
#174

Tai va man reikia panaikinti md5 kodavima slaptazodziams (nepagalvokit, kad ka nors pyzdinsiu. cia registracija saviems zmonems)
Nu va register.php padariau taip kai turi but, per duomenu baze matau slaptazodzius. Bet bandant prisijungti rasoma kad neteisingi duomenys. Zinau, kad reikia redaguoti maincore.php faila, bet jy paredagavus rodo, kad neteisingi duomenys arba isvis nereguoja bandant prisijungti. Yra ideju?
Reikalingos maincore.php eilutes:
$user_pass = md5($_POST['user_pass']);



$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_name='".$user_name."' AND user_password='".md5($user_pass)."' LIMIT 1");



$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='$cookie_1' AND user_password='".md5($cookie_2)."' LIMIT 1");
   unset($cookie_vars,$cookie_1,$cookie_2);



   $result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_id='$cookie_1' AND user_password='".md5($cookie_2)."' LIMIT 1");
   unset($cookie_vars,$cookie_1,$cookie_2);



Parašė MAnjack· 2009 Bir. 10 19:06:59
#175

Čia visur md5 kodavimą nuimk :)

Parašė Gugiss· 2009 Bir. 10 19:06:56
#176

nu nutrinu md5 visur ir bandant prisijungt tik puslapis persikrauna

Parašė MAnjack· 2009 Bir. 10 19:06:19
#177

setuser.php failą pasižiūrėk :)

Parašė Gugiss· 2009 Bir. 11 20:06:56
#178

tas pats

Parašė Nepas· 2009 Bir. 11 20:06:51
#179

as lopas

Parašė Tomcis· 2009 Bir. 11 21:06:19
#180

O tu pvz pabandyk užkoduot į md5 pw ir įeit į web. Gal įeis? Tada manau lengviau būtų sprest problemą, jei žinotume.

Parašė Gugiss· 2009 Bir. 12 12:06:06
#181

Nesamone :|

Parašė Gugiss· 2010 Spa. 6 16:10:37
#182

Labas.
Yra tokia funkcija trimlink() ane. Su sia funkcija atvaizduojant teksta
pvz.: trimlink($tekstas, 300) tekstas atvaizduojamas buna su html tagais kaip cia:

<p>Rugsėjo 7 dieną Aion serverius pasiekė pirmasis didelio turinio pavildymas \"Assault on Balaurea\" (Aion 2.0). Žemiau pateiktos šio papildymo suteiktos naujovės žaidime.</p> <ul> <li>Atsirado dvi naujos zonos <strong>Gelkmaros</strong> ir <strong>Inggison</strong></li>

Taigi taigi taigi taigi. Noreciau kad tie nereikalingi kodai butu ignoruojami ir ju tekste neatvaizduotu.
Aciu.

Parašė Impossibru· 2010 Spa. 6 18:10:28
#183

trimlink(htmlspecialchars("Tekstas"))

Parašė Gugiss· 2010 Spa. 6 18:10:04
#184

Siek tiek padejo, bet vis dar rodo tokius simbolius &#92; &quot;

Parašė Gugiss· 2010 Lap. 15 20:11:16
#185

Tai va turiu usklausa ir noriu kad ji duomenis rusiuotu pagal reitingo vidurky

$uzklausele = dbquery("SELECT avg(rating_vote) as vidurkis, rating_item_id, tt.*  FROM ".$db_prefix."custom_pages tt LEFT JOIN ".$db_prefix."ratings tf ON tt.page_id=tf.rating_item_id  WHERE tf.rating_item_id=tt.page_id ORDER BY avg(rating_vote) DESC LIMIT 0,10");

Man reikia, kad rodytu visus custom_page yrasus ir kiekvieno jo reitingu vidurky. Taciau sita uzklausa rodo pirma yrasa is custom_pages lenteles ir absoliuciai visu ratings lenteleje esanciu balu vidurky. Kur cia klaida?

Redagavo Gugiss· 2010 Lap. 15 20:11:33

Parašė Gugiss· 2010 Lap. 15 21:11:22
#186

no halp ?

Parašė Narysx· 2010 Lap. 15 22:11:37
#187

$a = mysql_query("SELECT avg(rating_vote) as vidurkis, rating_item_id from ".$db_prefix."ratings WHERE rating_type='C' GROUP by rating_item_id order by vidurkis DESC LIMIT 0,10");

while ($q = mysql_fetch_array($a))
{
$vidurkis = $q['vidurkis'];
$idas = $q['raing_item_id'];
echo "Pageo id: $idas | vidurkis: $vidurkis<br>";
}


WHERE rating_type='C'
Tiksliai nežinau, ar ten vadinas rating_type ir ar custom page'ams yra priskiriama raidė C. ;D

Redagavo Narysx· 2010 Lap. 15 22:11:18

Parašė Gugiss· 2010 Gru. 9 20:12:14
#188

Labas. Kas šitame kode blogai? Rezultate tai negerai, kad paspaudus mygtuka A atsinaujina A reikšmė tai gerai, bet paskui paspaudus F5 (refresh page) reikšmė vėlgi atsinaujina, tas pats būna paspaudus ir mygtuką B. Kitas dalykas - esu nustatęs, kad kai A ir B reikšmės lygios 1 rodytų "labas", bet nerodo.

 
						<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<center>
<input name="A" type="submit" value="Mygtukas A" />
<input name="B" type="submit" value="Mygtukas B" />
</center>
</form>
<?php
	if (isset($_POST['A'])) {
  $result = mysql_query("UPDATE lentele SET A=A+1 WHERE id='".$_SESSION['uid']."'");
}
	if (isset($_POST['B'])) {
  $result = mysql_query("UPDATE lentele SET B=B+1 WHERE id='".$_SESSION['uid']."'");
}
if($row['A'] == "1" && $row['B'] == "1") {
echo "labas";
}
?>