Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Siuntiniai tik nariams

Parašė -Donatas· 2012 Sau. 7 20:01:02
#1

Sveiki. Įsirašiau siuntinių sistemą http://phpfusion.lt/infusions/mo...mod_id=428 Dabar norėčiau padaryti, kad siuntinius matytų visi, bet galėtų siųstis tik nariai. Gal turit įdėju?

Parašė SofteriZ· 2012 Sau. 7 21:01:54
#2

Susirask siuntimosi link eilutę, ją perdaryk į štai šią:

if (iMEMBER) {
echo "SIUNTIMOSI NUORODOS KODAS";
} else {
echo "Norėdami matyti siuntimosi nuorodą turite užsiregistruoti.";
}



Parašė -Donatas· 2012 Sau. 7 22:01:02
#3

Kaip suprantu reikia ieškot downloads.php . Tai gal galėtum surast? Nes pats nelabai suprantu.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| Download System mSF For PHP-Fusion 7.xx v.4.9
| Copyright © 2008-2009 Powered by .:MeF:.
| URL: http://x-iweb.ru/
+--------------------------------------------------------+
| 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 INCLUDES."download_system/download_captcha.php";

if (isset($_GET['feeds'])) { require_once INCLUDES."download_system/feeds/rss.php";
} else if (isset($_GET['status'])) { require_once INCLUDES."download_system/status.php";
} else if (isset($_GET['down'])) { captcha_down();
} else if (isset($_GET['wait'])) { require_once INCLUDES."download_system/download.php"; } else {

require_once THEMES."templates/header.php";
require_once INCLUDES."download_system/function.php";
require_once INCLUDES."download_system/top_panel.php";
include LOCALE.LOCALESET."downloads.php";

add_to_head("<script src='".INCLUDES."download_system/jscripts/status.js' type=\"text/javascript\"></script>");
add_to_head("<link rel='stylesheet' href='".INCLUDES."download_system/css/download_system.css' type='text/css' media='screen' />");
    if (!file_exists(INCLUDES."highslide/highslide-full.js")) {
add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/highslide-with-gallery.js'></script>");
add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/include_highslide.js'></script>");
add_to_head("<link rel='stylesheet' type='text/css' href='".INCLUDES."highslide/highslide.css' />");
    }

    global $active, $captcha, $bad_links, $new, $navigation, $on_coundown, $on_screen, $on_screen_list, $newincat, $row_files, $top, $noidex, $noidex_end;

   $noidex = "<span style='display: none'><![CDATA[<noindex>]]></span>";
   $noidex_end = "<span style='display: none'><![CDATA[</noindex>]]></span>";

    $ds = dbarray(dbquery("SELECT active, captcha, bad_links, new, navigation, on_coundown, on_screen, on_screen_list, newincat, row_files, top FROM ".DB_PREFIX."download_settings"));

    if($ds['active'] == '1') {
   
   reset_count_today();

    if ((isset($_GET['download_id'])) && (isnum($_GET['download_id']))) {
           if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
         LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
          WHERE d.download_id='".$_GET['download_id']."'"))) {
            if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                     $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['download_id']."'");
                  if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                     redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=get");
                  } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                     redirect("downloads.php?wait&amp;get_id=".$data['download_id']."");
                  } else {
                   down($data['download_url']);
                  }
                  }
               }

    } elseif ((isset($_GET['mirror_id'])) && (isnum($_GET['mirror_id']))) {
         if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.mirror_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
         LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
          WHERE d.download_id='".$_GET['mirror_id']."'"))) {
            if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                        $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['mirror_id']."'");
                        if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                     redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=mirror");
                  } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                        redirect("downloads.php?wait&amp;mirror_id=".$data['download_id']."");
                  } else {
                   down($data['mirror_url']);
                  }
                    }
                }

    } elseif ((isset($_GET['file_id'])) && (isnum($_GET['file_id']))) {
         if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_burl, c.download_cat_access FROM ".DB_DOWNLOADS." d
         LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
          WHERE d.download_id='".$_GET['file_id']."'"))) {
            if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                        $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['file_id']."'");
                  if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                     redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=file");
                  } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                        redirect("downloads.php?wait&amp;file_id=".$data['download_id']."");
                  } else {
                        down($data['download_burl']);
                        }
               }
                }     

    } elseif ((isset($_GET['rus_id'])) && (isnum($_GET['rus_id']))) {
      if ($data = dbarray(dbquery("SELECT (download_id),(download_rus) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['rus_id']."'"))) {
          if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
         redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=rus");
         } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
          redirect("downloads.php?wait&amp;rus_id=".$data['download_id']."");
          } else {
          down($data['download_rus']);
          }
       }

    } elseif ((isset($_GET['forum_id'])) && (isnum($_GET['forum_id']))) {
      if ($data = dbarray(dbquery("SELECT (download_forum) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['forum_id']."'"))) { redirect($data['download_forum']); }

    } elseif ((isset($_GET['author_id'])) && (isnum($_GET['author_id']))) {
        if ($data = dbarray(dbquery("SELECT (download_os) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['author_id']."' ORDER BY download_os"))) { redirect($data['download_os']); }

    } elseif ((isset($_GET['bad_link'])) && (isnum($_GET['bad_link']))) {

   if ($data = dbarray(dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['bad_link']."'"))) {

       if ($_POST['bad_description'] != '') {
       $bad_description = stripinput(censorwords($_POST['bad_description']));
        if (iMEMBER) { $bad_user = $userdata['user_id']; } else { $bad_user = "0"; }

      $result = dbquery("INSERT INTO ".DB_PREFIX."download_bad (bad_id, bad_cat, bad_down, bad_name, bad_description, bad_user, bad_user_ip) VALUES ('', '".$data['download_cat']."', '".$data['download_id']."', '".$data['download_title']."', '$bad_description', '$bad_user', '".USER_IP."')");
      redirect($_SERVER['HTTP_REFERER']);

           } else { redirect($_SERVER['HTTP_REFERER']); }
       }
    }

       if ((isset($_GET['cat_id']) == "0") && (!isset($_GET['page_id']))) {
         
      $result = dbquery("SELECT dc1.download_cat_id, dc1.download_cat_name, dc1.download_cat_icon, dc1.download_cat_description FROM ".DB_DOWNLOAD_CATS." dc1 WHERE ".groupaccess('dc1.download_cat_access')." AND dc1.download_cat_idc='0' ORDER BY dc1.download_cat_name ASC");
        $rows = dbrows($result);
        if ($rows != 0) {
            $result2 = dbquery("SELECT dc2.download_cat_id, dc2.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc2 WHERE dc2.download_cat_id='0'");
            $cdata = dbarray($result2);
         $down_cat_name = "<a href='".FUSION_SELF."?cat_id=".$cdata['download_cat_id']."'>".$cdata['download_cat_name']."</a>";
            if (dbrows($result2) == 0){$name = '';} else {$name = " > $down_cat_name";}
         if (dbrows($result2) == 0){$name2 = '';} else {$name2 = "".$cdata['download_cat_name']." | ";}
         $down = "<a href='downloads.php'>".$locale['DS100']."</a>";

         set_title($locale['DS100']." - ".$settings['sitename']);
         set_meta("keywords", $locale['DS100']);
           set_meta("description", $locale['DS100']." - ".$settings['sitename']);
         opentable("".$locale['DS100']."");
         
                $counter = 0; $columns = 2;
                $num = 0;
                echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
                while ($data = dbarray($result)) {
                        if ($counter != 0 && ($counter % $columns == 0))
                  echo "<tr>\n";
                        NomD ("0", " = '".$data['download_cat_id']."'");
        if ($data['download_cat_icon'] != '') { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/".$data['download_cat_icon']."' alt='-' style='vertical-align:middle; border: 0;' />"; } else { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/folder.png' alt='-' style='vertical-align:middle; border: 0;' />"; }
        echo "<td align='left' valign='top' width='50%' class='tbl'>\n<b>".$cat_icon."<span>&nbsp;</span><a href='downloads.php?cat_id=".$data['download_cat_id']."'>".$data['download_cat_name']." </a>(".$num.")</b>\n";
                        $result2 = dbquery("SELECT dc3.download_cat_id, dc3.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc3 WHERE ".groupaccess('dc3.download_cat_access')." AND dc3.download_cat_idc='".$data['download_cat_id']."' ORDER BY dc3.download_cat_name ASC");
                        $rows2 = dbrows($result2);
                        if ($rows2 != 0) {
                            $i = 0;
                                echo "<div class='small' style='padding: 0.5em 0em 0em 0em;'>(";
                                while ($data2 = dbarray($result2)) {
                                $zap = ($i+1 == $rows2 ? '' : ', ');
                                echo "<a href='downloads.php?cat_id=".$data2['download_cat_id']."'>".$data2['download_cat_name']."</a>".$zap."";
                                $i++;
                                }
                                echo ")</div>\n";
                        }
                        if ($data['download_cat_description'] != "") {
                  echo "<span class='small'>".$data['download_cat_description']."</span>\n"; }
                        echo "<br /></td>\n";

                        $num = 0;
                        $counter++;
              }
                echo "</tr>\n</table>\n";

            closetable();

            if($ds['top'] == '1') { top_15(); }
   
        } else {
            opentable($locale['DS100']);
            echo "<div style='text-align:center'><br />\n".$locale['DS101']."<br />\n</div>\n";
            closetable();
        }

       } elseif ((isset($_GET['cat_id'])) && (isnum($_GET['cat_id']))) {

      Put($_GET['cat_id']);
      $result = dbquery("SELECT dc1.download_cat_idc, dc1.download_cat_name, dc1.download_cat_access, dc1.download_cat_sorting FROM ".DB_DOWNLOAD_CATS." dc1 WHERE dc1.download_cat_id='".$_GET['cat_id']."'");
          if (dbrows($result) != 0) {
                $cdata = dbarray($result);

         $rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."' AND download_submit = '0'");
         if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
         if (!isset($_GET['sort']) || !isnum($_GET['sort'])) { $_GET['sort'] = 1; }
         $sorting = $cdata['download_cat_sorting'];
         if ($_GET['sort'] == 1)   $sorting = "download_title ASC";
         if ($_GET['sort'] == 2)   $sorting = "download_count DESC";
         if ($_GET['sort'] == 3)   $sorting = "download_datestamp DESC, download_title ASC";
         
         if (checkgroup($cdata['download_cat_access'])) {

         $down = "<a href='downloads.php'>".$locale['DS100']."</a>";
         
         Put2($_GET['cat_id']);
          $keywords = ""; $arry_words = explode(">", $sil2);
          foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }
         
         set_title($sil2." | ".$locale['DS100']." - ".$settings['sitename']);
         set_meta("keywords", $keywords.$locale['DS140'].", ".$locale['DS100']);
         set_meta("description", $keywords.$locale['DS100']." - ".$settings['sitename']);
         opentable("$down > ".$sil.""); echo "<br />\n";
         
         require_once INCLUDES."download_system/sub_categores.php";
         
         if (($ds['navigation'] == '1') && (($cdata['download_cat_idc']) > 0 )) { navpanel_list(); }
         
         sub_categores();
         
         if ($rows != 0) {

         echo "<table width='100%' cellspacing='1' cellpadding='1'>\n";
         echo "<tr>\n";
         echo "<td align='center' class='tbl2'><strong>".$locale['DS105']."</strong></td>\n";
         echo "<td align='left' class='".(FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
         echo (FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "<strong>".$locale['DS106']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['DS106']."</a>")."</span></td>\n";
         echo "<td align='left' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
         echo ($_GET['sort'] == 3 ? "<strong>".$locale['DS107']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['DS107']."</a>")."</span></td>\n";
         echo "<td align='left' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
         echo ($_GET['sort'] == 2 ? "<strong>".$locale['DS108']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['DS108']."</a>")."</span></td>\n";
         echo "</tr></table>\n<br />\n";

            $result = dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_cat='".$_GET['cat_id']."' AND download_submit = '0' ORDER BY $sorting LIMIT ".$_GET['rowstart'].",".$ds['row_files']."");
            
         } else {
            
      $result = dbquery("SELECT d.*, dc.*
      FROM ".DB_DOWNLOADS." d
      INNER JOIN ".DB_DOWNLOAD_CATS." dc ON d.download_cat=dc.download_cat_id
      WHERE download_cat_idc='".$_GET['cat_id']."' ORDER BY download_datestamp DESC LIMIT ".$ds['row_files']."
      ");
      
      echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
      echo "<tr><td align='left' class='tbl1'><strong>".$locale['DS142']."</strong></td></tr>\n";
      echo "</table>\n<br />\n";
      
          }
            
            $numrows = dbrows($result);
            $i = 1;

            while ($data = dbarray($result)) {
            
      if ($data['download_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
      $new = "&nbsp;<img src='".IMAGES."downloads/new.gif' width='25' height='13' alt=".$locale['DS109']." />";
      } else { $new = ""; }

                $wynik = dbquery("SELECT SUM(rating_vote) FROM ".DB_RATINGS." WHERE rating_type='F' AND rating_item_id='".$data['download_id']."'");
                $info = dbresult($wynik,0);
                $num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='F' AND rating_item_id='".$data['download_id']."'");
                $wyn_rating = ($num_rating ? $info / $num_rating : 0);
            $col = dbrows(dbquery("SELECT comment_item_id FROM ".DB_COMMENTS." WHERE comment_type='F' AND comment_item_id='".$data['download_id']."'"));

      echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
      echo "<tr><td align='center' class='downloadtitle'><strong>".$data['download_title']."</strong>".$new."</td></tr>\n";
      echo "</table>\n<br />\n";
      echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
      echo "<tr><td><table width='260' cellspacing='0' cellpadding='0' border='0' align='left'>\n";
      
      $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $description = $data['download_description']; $screen = $data['download_screen'];

      if ($license != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS123']."  </strong>".$noidex."<a href='javascript:openPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }
      if ($lang != '') { echo "<tr><td class='small2' style='white-space:nowrap;'><strong>  ".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
      if ($filesize != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

      echo "</table></td>\n";
      echo "<td><table width='100%' cellspacing='0' cellpadding='0' border='0' align='right'>\n";

               if ($data['download_allow_ratings']) {
      echo "<tr><td class='small' align='right' style='white-space:nowrap;'><strong>".$locale['DS112']."</strong><img src='".IMAGES."downloads/rate/".ceil($wyn_rating).".gif' width='64' height='12' alt='".ceil($wyn_rating)."' style='vertical-align:middle;' title='".$locale['DS112'].ceil($wyn_rating)."' /></td></tr>\n";
               }
               if ($data['download_allow_recommends']) {       
        echo "<tr><td class='small recommend' align='right' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                    }   

      echo "</table></td></tr>\n";
      echo "</table>\n";
      
        echo "<table width='100%' align='center' cellpadding='1' cellspacing='1' border='0' style='padding: 0.6em 0em 0em 0em;'>\n";
      echo "<tr>\n";
      
         if (($ds['on_screen_list'] == '1') && ($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
      echo "<td class='small2' align='center'>\n";
      echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
      echo "</td>\n";
            }

      if ($description != "") { echo "<td colspan='4' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($description))))."</td>\n"; } else { echo "<td colspan='4' class='tbl1' align='center'>".$locale['DS129']."</td>\n"; }
      
      echo "</tr>\n";
        echo "<tr><td width='28%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS121']." </strong>".showdate("%d.%m.%y", $data['download_datestamp'])."</td>\n";   
        echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS110']." </strong>".$col."</td>\n";
        echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS128']." </strong>".$data['download_count']."</td>\n";
        echo "<td width='22%' class='side-small' align='center' style='white-space:nowrap;'><a href='downloads.php?page_id=".$data['download_id']."' target='_self'>".$locale['DS111']."</a></td>\n</tr>\n";
      echo "</table>\n<br />\n";

               $col = 0;
               if ($i != $numrows) { $i++; }
              }

            closetable();

            if ($rows > 1) { echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $ds['row_files'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&amp;sort=".$_GET['sort']."&amp;")."</div>\n"; }      

                }   
               if ($ds['new'] == '1') { top_5(); }       
         }   
    }
      if ((isset($_GET['page_id'])) && (isnum($_GET['page_id']))) {
      
      $result = dbquery("SELECT d.*, c1.download_cat_name AS c1_name, c1.download_cat_id AS c1_cat_id, c2.download_cat_name AS c2_name, c2.download_cat_id AS c2_cat_id, c1.download_cat_idc AS c1_cat_idc, b.bad_down
      FROM ".DB_DOWNLOADS." d
      LEFT JOIN ".DB_DOWNLOAD_CATS." c1 ON c1.download_cat_id=d.download_cat
      LEFT JOIN ".DB_DOWNLOAD_CATS." c2 ON c2.download_cat_id=c1.download_cat_idc
      LEFT JOIN ".DB_PREFIX."download_bad b ON b.bad_down=d.download_id
      WHERE d.download_id='".$_GET['page_id']."' AND d.download_submit = '0'");
       
      if (dbrows($result) != 0) {   
      $data = dbarray($result);

      $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $screen = $data['download_screen'];

        if ($data['download_description_p'] == "") { $cont = $data['download_description']; }
      else { $cont = $data['download_description_p']; }

   $name_cat = $data['c2_name'] ? $data['c2_name'] : "";
    $base = "<a href='downloads.php'>".$locale['DS100']."</a>";
    $cat = $data['c2_name'] ? " > <a href='downloads.php?cat_id=".$data['c2_cat_id']."'>".$name_cat."</a>" : "";
    $sub_cat = " > <a href='downloads.php?cat_id=".$data['c1_cat_id']."'>".$data['c1_name']."</a>";
    $file = $locale['DS131']." ".$data['download_title'];
      
      $all_words = ($file." ".$data['c1_name']." ".$name_cat." ".$locale['DS100']);
      $keywords = ""; $arry_words = explode(" ", $all_words);
      foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }

   set_title($data['download_title']." | ".$locale['DS100']." - ".$settings['sitename']);
   set_meta("keywords", $keywords.$locale['DS140']);
    set_meta("description", $file." - ".trimlink($cont, 80)." ".$filesize.", ".$version.", ".$license);
    opentable($base.$cat.$sub_cat); echo "<br />\n";

      require_once INCLUDES."download_system/sub_categores.php";
      if($ds['navigation'] == '1') { navpanel_file(); }

      echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";

            if ($data['download_allow_recommends']) {
        echo "<tr><td width='50%' align='right' colspan='2' class='recommend' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                }

      echo "<td width='100%' align='center' class='downloadtitle'><strong>".$data['download_title']."</strong></td>\n</tr>\n";
      
              if ($data['download_os'] != '') {
        echo "<tr><td align='center' class='downloados'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?author_id=".$data['download_id']."' target='_blank'><strong>".$locale['DS119']."</strong></a>".$noidex_end."</td></tr>\n";
              }

      echo "<tr><td width='50' align='left'><span>&nbsp;&nbsp;</span></td></tr>\n";
      echo "</table>\n";

      echo "<table width='100%' cellspacing='0' cellpadding='0' border='0' style='line-height: 1.45em; padding: 1em 0.25em;'>\n";
      echo "<tr>\n<td>\n<table width='280' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

        echo "<tr><td class='small2 info' width='50%'><strong>".$locale['DS121']."</strong> ".showdate("%d.%m.%y", $data['download_datestamp'])."</td></tr>\n";

   if ($license != ''){ echo "<tr><td class='small2' style='white-space:nowrap;'><strong>".$locale['DS123']."  </strong>".$noidex."<a href='javascript:openPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }   
   if ($lang != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
   if ($version != '') { echo "<tr><td class='small2' width='50%' style='white-space:nowrap;'><strong>".$locale['DS124']."  </strong>".$version." </td></tr>\n"; }
   if ($filesize != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

      echo "</table>\n</td>\n";
      echo "<td>\n<table width='230' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

         if (($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
      echo "<tr><td class='small2' align='center'>\n";
      echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
      echo "</td></tr>\n";
            } else if($ds['on_screen'] == '1') {
        echo "<tr><td class='small2' align='center'><strong>".$locale['DS127']."</strong></td></tr>\n";
            }

      echo "</table>\n</td>\n</tr>\n";
      echo "</table>\n";
      echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' border='0'>\n";

           if ($cont != "") { echo "<tr><td colspan='3' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($cont))))."</td></tr>\n";
       } else { echo "<tr><td colspan='3' class='tbl1' align='justify'>".$locale['DS129']."</td></tr>\n"; }

        echo "</table>\n";
        echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' style='padding: 0em 1.5em 0em 0em;'>\n";
      echo "<tr><td class='small' align='left' valign='top'><strong> ".$locale['DS128']." </strong>".$data['download_count']."</td>\n";

      if (isset($_GET['captcha'])) { captcha_form(); } else {
            if (checkgroup($data['download_access'])) {

              if ($data['download_url'] != '') {
        echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/down.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;download_id=".$data['download_id']."'><strong>".$locale['DS131']."</strong></a>".$noidex_end."</div></td>\n";
              }
               if ($data['mirror_url'] != '') {
        echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/mirror.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;mirror_id=".$data['download_id']."'><strong>".$locale['DS132']."</strong></a>".$noidex_end."</div></td>\n";
               }
                if ($data['download_button'] != '') {
        echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".BASEDIR.$data['download_background']."' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;file_id=".$data['download_id']."'><strong>".$data['download_button']."</strong></a>".$noidex_end."</div></td>\n";
              }
                if ($data['download_rus'] != '') {
        echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/rus.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;rus_id=".$data['download_id']."'><strong>".$locale['DS133']."</strong></a>".$noidex_end."</div></td>\n";
              }
                if ($data['download_forum'] != '') {
        echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/forum.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;forum_id=".$data['download_id']."'><strong>".$locale['DS134']."</strong></a>".$noidex_end."</div></td>\n";
              }
       echo "</tr>\n";
          } else { echo "<tr><td align='center'><img src='".IMAGES."downloads/lock.png' alt='' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span>".$locale['DS135']."</td></tr>\n"; }
        } //
      echo "</table>\n";

          if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "SD")) {
      echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' class='small2'>\n";
           $editfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=edit&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>".$locale['A101']."</a>".$noidex_end."\n";
            $delfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=delete&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."' onClick='return DeleteItem()'>".$locale['A102']."</a>".$noidex_end."\n";
        echo "<tr><td align='left' width='100' colspan='8'> ".$locale['A100']." ".$editfile." | ".$delfile."</td></tr>\n";
      echo "</table>\n";
           } //

    if ($ds['bad_links'] != '1' && (checkgroup($ds['bad_links'])) && (checkgroup($data['download_access']))) {
               if ($data['bad_down'] == '') {
   
   add_to_head("<script type='text/javascript'><!--
function broken_link() {
if(document.getElementById('id4').style.display=='none') {
document.getElementById('id4').style.display='block';
document.getElementById('id3').innerHTML='".$locale['DS137']."';
}else{
document.getElementById('id4').style.display='none';
document.getElementById('id3').innerHTML='".$locale['DS137']."';}
}
//--></script>");

    add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."download_system/jscripts/ajax_ds.js\"></script>");
    add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."javascripts/prototype.js\"></script>");

       echo "<div id='broken_message'>\n";
      echo "<div class='small2'><span>&nbsp;</span><img src='".IMAGES."downloads/bad.gif' width='10' height='10' alt='!' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span><a href=\"javascript:broken_link();\" id=\"id3\">".$locale['DS137']."</a>";
        echo "<div id='id4' style='display:none;'><br />\n<form id='brokenform' name='brokenform' method='post'>\n";
      echo "<input type='hidden' name='download_id' value='".$data['download_id']."' />";
      echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr><td width='80' class='tbl'>".$locale['DS138']."<span style='color:#ff0000'>*</span></td><td class='tbl'><textarea name='bad_description' rows='2' cols='70' class='textbox'></textarea></td></tr><td colspan='2' class='tbl' align='center'><br />\n<input type='button' onclick=\"add_report(); return false;\" value='".$locale['DS139']."' class='button' /></td></tr></table></form></div>\n";
      echo "</div>\n";
      echo "</div>\n";
               } else {
      echo "<table width='100%' border='0' class='small2'>\n";
      echo "<tr><td width='80%' class='small2' align='right'><span>&nbsp;</span><img src='".IMAGES."downloads/warning.png' width='19' height='18' alt='!' style='vertical-align:middle; border: 0;' /></td><td width='20%' class='tbl redcolor'><strong> ".$locale['DS136']."</strong></td></tr>\n";
      echo "</table>\n";
                }
           }
                } else { echo "<center><br />\n".$locale['DS102']."\n<br />\n<br /></center>\n"; }

        closetable();

        if (dbrows($result) && checkgroup($data['download_access'])) {
      require_once INCLUDES."ratings_include.php";
       if ($data['download_allow_ratings']) { showratings("F", $_GET['page_id'], FUSION_SELF."?page_id=".$_GET['page_id']); }
      require_once INCLUDES."comments_include.php";
       if ($data['download_allow_comments']) { showcomments("F", DB_DOWNLOADS, "download_id", $_GET['page_id'],FUSION_SELF."?page_id=".$_GET['page_id']); }
        } //

         if($ds['newincat'] == '1') { top_cats($data['c2_cat_id']); }

      }
         
    } else { echo "<div align='center' class='nofailes'><strong>".$locale['DS103']."</strong></div>\n"; }

require_once THEMES."templates/footer.php";

   } //

?>



Parašė SofteriZ· 2012 Sau. 7 23:01:23
#4

Turėkis, tik per daug nepriprask.

<?php
 /*-------------------------------------------------------+
 | PHP-Fusion Content Management System
 | Copyright (C) 2002 - 2008 Nick Jones
 | http://www.php-fusion.co.uk/
 +--------------------------------------------------------+
 | Filename: downloads.php
 | Author: Nick Jones (Digitanium)
 +--------------------------------------------------------+
 | Download System mSF For PHP-Fusion 7.xx v.4.9
 | Copyright © 2008-2009 Powered by .:MeF:.
 | URL: http://x-iweb.ru/
 +--------------------------------------------------------+
 | 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 INCLUDES."download_system/download_captcha.php";

 if (isset($_GET['feeds'])) { require_once INCLUDES."download_system/feeds/rss.php";
 } else if (isset($_GET['status'])) { require_once INCLUDES."download_system/status.php";
 } else if (isset($_GET['down'])) { captcha_down();
 } else if (isset($_GET['wait'])) { require_once INCLUDES."download_system/download.php"; } else {

 require_once THEMES."templates/header.php";
 require_once INCLUDES."download_system/function.php";
 require_once INCLUDES."download_system/top_panel.php";
 include LOCALE.LOCALESET."downloads.php";

 add_to_head("<script src='".INCLUDES."download_system/jscripts/status.js' type=\"text/javascript\"></script>");
 add_to_head("<link rel='stylesheet' href='".INCLUDES."download_system/css/download_system.css' type='text/css' media='screen' />");
     if (!file_exists(INCLUDES."highslide/highslide-full.js")) {
 add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/highslide-with-gallery.js'></script>");
 add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/include_highslide.js'></script>");
 add_to_head("<link rel='stylesheet' type='text/css' href='".INCLUDES."highslide/highslide.css' />");
     }

     global $active, $captcha, $bad_links, $new, $navigation, $on_coundown, $on_screen, $on_screen_list, $newincat, $row_files, $top, $noidex, $noidex_end;

    $noidex = "<span style='display: none'><![CDATA[<noindex>]]></span>";
    $noidex_end = "<span style='display: none'><![CDATA[</noindex>]]></span>";

     $ds = dbarray(dbquery("SELECT active, captcha, bad_links, new, navigation, on_coundown, on_screen, on_screen_list, newincat, row_files, top FROM ".DB_PREFIX."download_settings"));

     if($ds['active'] == '1') {
   
    reset_count_today();

     if ((isset($_GET['download_id'])) && (isnum($_GET['download_id']))) {
            if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['download_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                      $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['download_id']."'");
                   if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=get");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                      redirect("downloads.php?wait&amp;get_id=".$data['download_id']."");
                   } else {
                    down($data['download_url']);
                   }
                   }
                }

     } elseif ((isset($_GET['mirror_id'])) && (isnum($_GET['mirror_id']))) {
          if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.mirror_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['mirror_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                         $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['mirror_id']."'");
                         if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=mirror");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                         redirect("downloads.php?wait&amp;mirror_id=".$data['download_id']."");
                   } else {
                    down($data['mirror_url']);
                   }
                     }
                 }

     } elseif ((isset($_GET['file_id'])) && (isnum($_GET['file_id']))) {
          if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_burl, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['file_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                         $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['file_id']."'");
                   if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=file");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                         redirect("downloads.php?wait&amp;file_id=".$data['download_id']."");
                   } else {
                         down($data['download_burl']);
                         }
                }
                 }     

     } elseif ((isset($_GET['rus_id'])) && (isnum($_GET['rus_id']))) {
       if ($data = dbarray(dbquery("SELECT (download_id),(download_rus) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['rus_id']."'"))) {
           if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
          redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=rus");
          } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
           redirect("downloads.php?wait&amp;rus_id=".$data['download_id']."");
           } else {
           down($data['download_rus']);
           }
        }

     } elseif ((isset($_GET['forum_id'])) && (isnum($_GET['forum_id']))) {
       if ($data = dbarray(dbquery("SELECT (download_forum) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['forum_id']."'"))) { redirect($data['download_forum']); }

     } elseif ((isset($_GET['author_id'])) && (isnum($_GET['author_id']))) {
         if ($data = dbarray(dbquery("SELECT (download_os) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['author_id']."' ORDER BY download_os"))) { redirect($data['download_os']); }

     } elseif ((isset($_GET['bad_link'])) && (isnum($_GET['bad_link']))) {

    if ($data = dbarray(dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['bad_link']."'"))) {

        if ($_POST['bad_description'] != '') {
        $bad_description = stripinput(censorwords($_POST['bad_description']));
         if (iMEMBER) { $bad_user = $userdata['user_id']; } else { $bad_user = "0"; }

       $result = dbquery("INSERT INTO ".DB_PREFIX."download_bad (bad_id, bad_cat, bad_down, bad_name, bad_description, bad_user, bad_user_ip) VALUES ('', '".$data['download_cat']."', '".$data['download_id']."', '".$data['download_title']."', '$bad_description', '$bad_user', '".USER_IP."')");
       redirect($_SERVER['HTTP_REFERER']);

            } else { redirect($_SERVER['HTTP_REFERER']); }
        }
     }

        if ((isset($_GET['cat_id']) == "0") && (!isset($_GET['page_id']))) {
         
       $result = dbquery("SELECT dc1.download_cat_id, dc1.download_cat_name, dc1.download_cat_icon, dc1.download_cat_description FROM ".DB_DOWNLOAD_CATS." dc1 WHERE ".groupaccess('dc1.download_cat_access')." AND dc1.download_cat_idc='0' ORDER BY dc1.download_cat_name ASC");
         $rows = dbrows($result);
         if ($rows != 0) {
             $result2 = dbquery("SELECT dc2.download_cat_id, dc2.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc2 WHERE dc2.download_cat_id='0'");
             $cdata = dbarray($result2);
          $down_cat_name = "<a href='".FUSION_SELF."?cat_id=".$cdata['download_cat_id']."'>".$cdata['download_cat_name']."</a>";
             if (dbrows($result2) == 0){$name = '';} else {$name = " > $down_cat_name";}
          if (dbrows($result2) == 0){$name2 = '';} else {$name2 = "".$cdata['download_cat_name']." | ";}
          $down = "<a href='downloads.php'>".$locale['DS100']."</a>";

          set_title($locale['DS100']." - ".$settings['sitename']);
          set_meta("keywords", $locale['DS100']);
            set_meta("description", $locale['DS100']." - ".$settings['sitename']);
          opentable("".$locale['DS100']."");
         
                 $counter = 0; $columns = 2;
                 $num = 0;
                 echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
                 while ($data = dbarray($result)) {
                         if ($counter != 0 && ($counter % $columns == 0))
                   echo "<tr>\n";
                         NomD ("0", " = '".$data['download_cat_id']."'");
         if ($data['download_cat_icon'] != '') { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/".$data['download_cat_icon']."' alt='-' style='vertical-align:middle; border: 0;' />"; } else { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/folder.png' alt='-' style='vertical-align:middle; border: 0;' />"; }
         echo "<td align='left' valign='top' width='50%' class='tbl'>\n<b>".$cat_icon."<span>&nbsp;</span><a href='downloads.php?cat_id=".$data['download_cat_id']."'>".$data['download_cat_name']." </a>(".$num.")</b>\n";
                         $result2 = dbquery("SELECT dc3.download_cat_id, dc3.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc3 WHERE ".groupaccess('dc3.download_cat_access')." AND dc3.download_cat_idc='".$data['download_cat_id']."' ORDER BY dc3.download_cat_name ASC");
                         $rows2 = dbrows($result2);
                         if ($rows2 != 0) {
                             $i = 0;
                                 echo "<div class='small' style='padding: 0.5em 0em 0em 0em;'>(";
                                 while ($data2 = dbarray($result2)) {
                                 $zap = ($i+1 == $rows2 ? '' : ', ');
                                 echo "<a href='downloads.php?cat_id=".$data2['download_cat_id']."'>".$data2['download_cat_name']."</a>".$zap."";
                                 $i++;
                                 }
                                 echo ")</div>\n";
                         }
                         if ($data['download_cat_description'] != "") {
                   echo "<span class='small'>".$data['download_cat_description']."</span>\n"; }
                         echo "<br /></td>\n";

                         $num = 0;
                         $counter++;
               }
                 echo "</tr>\n</table>\n";

             closetable();

             if($ds['top'] == '1') { top_15(); }
   
         } else {
             opentable($locale['DS100']);
             echo "<div style='text-align:center'><br />\n".$locale['DS101']."<br />\n</div>\n";
             closetable();
         }

        } elseif ((isset($_GET['cat_id'])) && (isnum($_GET['cat_id']))) {

       Put($_GET['cat_id']);
       $result = dbquery("SELECT dc1.download_cat_idc, dc1.download_cat_name, dc1.download_cat_access, dc1.download_cat_sorting FROM ".DB_DOWNLOAD_CATS." dc1 WHERE dc1.download_cat_id='".$_GET['cat_id']."'");
           if (dbrows($result) != 0) {
                 $cdata = dbarray($result);

          $rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."' AND download_submit = '0'");
          if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
          if (!isset($_GET['sort']) || !isnum($_GET['sort'])) { $_GET['sort'] = 1; }
          $sorting = $cdata['download_cat_sorting'];
          if ($_GET['sort'] == 1)   $sorting = "download_title ASC";
          if ($_GET['sort'] == 2)   $sorting = "download_count DESC";
          if ($_GET['sort'] == 3)   $sorting = "download_datestamp DESC, download_title ASC";
         
          if (checkgroup($cdata['download_cat_access'])) {

          $down = "<a href='downloads.php'>".$locale['DS100']."</a>";
         
          Put2($_GET['cat_id']);
           $keywords = ""; $arry_words = explode(">", $sil2);
           foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }
         
          set_title($sil2." | ".$locale['DS100']." - ".$settings['sitename']);
          set_meta("keywords", $keywords.$locale['DS140'].", ".$locale['DS100']);
          set_meta("description", $keywords.$locale['DS100']." - ".$settings['sitename']);
          opentable("$down > ".$sil.""); echo "<br />\n";
         
          require_once INCLUDES."download_system/sub_categores.php";
         
          if (($ds['navigation'] == '1') && (($cdata['download_cat_idc']) > 0 )) { navpanel_list(); }
         
          sub_categores();
         
          if ($rows != 0) {

          echo "<table width='100%' cellspacing='1' cellpadding='1'>\n";
          echo "<tr>\n";
          echo "<td align='center' class='tbl2'><strong>".$locale['DS105']."</strong></td>\n";
          echo "<td align='left' class='".(FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo (FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "<strong>".$locale['DS106']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['DS106']."</a>")."</span></td>\n";
          echo "<td align='left' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo ($_GET['sort'] == 3 ? "<strong>".$locale['DS107']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['DS107']."</a>")."</span></td>\n";
          echo "<td align='left' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo ($_GET['sort'] == 2 ? "<strong>".$locale['DS108']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['DS108']."</a>")."</span></td>\n";
          echo "</tr></table>\n<br />\n";

             $result = dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_cat='".$_GET['cat_id']."' AND download_submit = '0' ORDER BY $sorting LIMIT ".$_GET['rowstart'].",".$ds['row_files']."");
             
          } else {
             
       $result = dbquery("SELECT d.*, dc.*
       FROM ".DB_DOWNLOADS." d
       INNER JOIN ".DB_DOWNLOAD_CATS." dc ON d.download_cat=dc.download_cat_id
       WHERE download_cat_idc='".$_GET['cat_id']."' ORDER BY download_datestamp DESC LIMIT ".$ds['row_files']."
       ");
       
       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td align='left' class='tbl1'><strong>".$locale['DS142']."</strong></td></tr>\n";
       echo "</table>\n<br />\n";
       
           }
             
             $numrows = dbrows($result);
             $i = 1;

             while ($data = dbarray($result)) {
             
       if ($data['download_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
       $new = "&nbsp;<img src='".IMAGES."downloads/new.gif' width='25' height='13' alt=".$locale['DS109']." />";
       } else { $new = ""; }

                 $wynik = dbquery("SELECT SUM(rating_vote) FROM ".DB_RATINGS." WHERE rating_type='F' AND rating_item_id='".$data['download_id']."'");
                 $info = dbresult($wynik,0);
                 $num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='F' AND rating_item_id='".$data['download_id']."'");
                 $wyn_rating = ($num_rating ? $info / $num_rating : 0);
             $col = dbrows(dbquery("SELECT comment_item_id FROM ".DB_COMMENTS." WHERE comment_type='F' AND comment_item_id='".$data['download_id']."'"));

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td align='center' class='downloadtitle'><strong>".$data['download_title']."</strong>".$new."</td></tr>\n";
       echo "</table>\n<br />\n";
       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td><table width='260' cellspacing='0' cellpadding='0' border='0' align='left'>\n";
       
       $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $description = $data['download_description']; $screen = $data['download_screen'];

       if ($license != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS123']."  </strong>".$noidex."<a href='javascriptpenPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }
       if ($lang != '') { echo "<tr><td class='small2' style='white-space:nowrap;'><strong>  ".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
       if ($filesize != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

       echo "</table></td>\n";
       echo "<td><table width='100%' cellspacing='0' cellpadding='0' border='0' align='right'>\n";

                if ($data['download_allow_ratings']) {
       echo "<tr><td class='small' align='right' style='white-space:nowrap;'><strong>".$locale['DS112']."</strong><img src='".IMAGES."downloads/rate/".ceil($wyn_rating).".gif' width='64' height='12' alt='".ceil($wyn_rating)."' style='vertical-align:middle;' title='".$locale['DS112'].ceil($wyn_rating)."' /></td></tr>\n";
                }
                if ($data['download_allow_recommends']) {       
         echo "<tr><td class='small recommend' align='right' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                     }   

       echo "</table></td></tr>\n";
       echo "</table>\n";
       
         echo "<table width='100%' align='center' cellpadding='1' cellspacing='1' border='0' style='padding: 0.6em 0em 0em 0em;'>\n";
       echo "<tr>\n";
       
          if (($ds['on_screen_list'] == '1') && ($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
       echo "<td class='small2' align='center'>\n";
       echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
       echo "</td>\n";
             }

       if ($description != "") { echo "<td colspan='4' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($description))))."</td>\n"; } else { echo "<td colspan='4' class='tbl1' align='center'>".$locale['DS129']."</td>\n"; }
       
       echo "</tr>\n";
         echo "<tr><td width='28%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS121']." </strong>".showdate("%d.%m.%y", $data['download_datestamp'])."</td>\n";   
         echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS110']." </strong>".$col."</td>\n";
         echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS128']." </strong>".$data['download_count']."</td>\n";
         echo "<td width='22%' class='side-small' align='center' style='white-space:nowrap;'><a href='downloads.php?page_id=".$data['download_id']."' target='_self'>".$locale['DS111']."</a></td>\n</tr>\n";
       echo "</table>\n<br />\n";

                $col = 0;
                if ($i != $numrows) { $i++; }
               }

             closetable();

             if ($rows > 1) { echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $ds['row_files'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&amp;sort=".$_GET['sort']."&amp;")."</div>\n"; }     

                 }   
                if ($ds['new'] == '1') { top_5(); }       
          }   
     }
       if ((isset($_GET['page_id'])) && (isnum($_GET['page_id']))) {
       
       $result = dbquery("SELECT d.*, c1.download_cat_name AS c1_name, c1.download_cat_id AS c1_cat_id, c2.download_cat_name AS c2_name, c2.download_cat_id AS c2_cat_id, c1.download_cat_idc AS c1_cat_idc, b.bad_down
       FROM ".DB_DOWNLOADS." d
       LEFT JOIN ".DB_DOWNLOAD_CATS." c1 ON c1.download_cat_id=d.download_cat
       LEFT JOIN ".DB_DOWNLOAD_CATS." c2 ON c2.download_cat_id=c1.download_cat_idc
       LEFT JOIN ".DB_PREFIX."download_bad b ON b.bad_down=d.download_id
       WHERE d.download_id='".$_GET['page_id']."' AND d.download_submit = '0'");
         
       if (dbrows($result) != 0) {   
       $data = dbarray($result);

       $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $screen = $data['download_screen'];

         if ($data['download_description_p'] == "") { $cont = $data['download_description']; }
       else { $cont = $data['download_description_p']; }

    $name_cat = $data['c2_name'] ? $data['c2_name'] : "";
     $base = "<a href='downloads.php'>".$locale['DS100']."</a>";
     $cat = $data['c2_name'] ? " > <a href='downloads.php?cat_id=".$data['c2_cat_id']."'>".$name_cat."</a>" : "";
     $sub_cat = " > <a href='downloads.php?cat_id=".$data['c1_cat_id']."'>".$data['c1_name']."</a>";
     $file = $locale['DS131']." ".$data['download_title'];
       
       $all_words = ($file." ".$data['c1_name']." ".$name_cat." ".$locale['DS100']);
       $keywords = ""; $arry_words = explode(" ", $all_words);
       foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }

    set_title($data['download_title']." | ".$locale['DS100']." - ".$settings['sitename']);
    set_meta("keywords", $keywords.$locale['DS140']);
     set_meta("description", $file." - ".trimlink($cont, 80)." ".$filesize.", ".$version.", ".$license);
     opentable($base.$cat.$sub_cat); echo "<br />\n";

       require_once INCLUDES."download_system/sub_categores.php";
       if($ds['navigation'] == '1') { navpanel_file(); }

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";

             if ($data['download_allow_recommends']) {
         echo "<tr><td width='50%' align='right' colspan='2' class='recommend' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                 }

       echo "<td width='100%' align='center' class='downloadtitle'><strong>".$data['download_title']."</strong></td>\n</tr>\n";
       
               if ($data['download_os'] != '') {
         echo "<tr><td align='center' class='downloados'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?author_id=".$data['download_id']."' target='_blank'><strong>".$locale['DS119']."</strong></a>".$noidex_end."</td></tr>\n";
               }

       echo "<tr><td width='50' align='left'><span>&nbsp;&nbsp;</span></td></tr>\n";
       echo "</table>\n";

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0' style='line-height: 1.45em; padding: 1em 0.25em;'>\n";
       echo "<tr>\n<td>\n<table width='280' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

         echo "<tr><td class='small2 info' width='50%'><strong>".$locale['DS121']."</strong> ".showdate("%d.%m.%y", $data['download_datestamp'])."</td></tr>\n";

    if ($license != ''){ echo "<tr><td class='small2' style='white-space:nowrap;'><strong>".$locale['DS123']."  </strong>".$noidex."<a href='javascriptpenPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }   
    if ($lang != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
    if ($version != '') { echo "<tr><td class='small2' width='50%' style='white-space:nowrap;'><strong>".$locale['DS124']."  </strong>".$version." </td></tr>\n"; }
    if ($filesize != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

       echo "</table>\n</td>\n";
       echo "<td>\n<table width='230' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

          if (($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
       echo "<tr><td class='small2' align='center'>\n";
       echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
       echo "</td></tr>\n";
             } else if($ds['on_screen'] == '1') {
         echo "<tr><td class='small2' align='center'><strong>".$locale['DS127']."</strong></td></tr>\n";
             }

       echo "</table>\n</td>\n</tr>\n";
       echo "</table>\n";
       echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' border='0'>\n";

            if ($cont != "") { echo "<tr><td colspan='3' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($cont))))."</td></tr>\n";
        } else { echo "<tr><td colspan='3' class='tbl1' align='justify'>".$locale['DS129']."</td></tr>\n"; }

         echo "</table>\n";
         echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' style='padding: 0em 1.5em 0em 0em;'>\n";
       echo "<tr><td class='small' align='left' valign='top'><strong> ".$locale['DS128']." </strong>".$data['download_count']."</td>\n";
       if (iMEMBER) {
       if (isset($_GET['captcha'])) { captcha_form(); } else {
             if (checkgroup($data['download_access'])) {

               if ($data['download_url'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/down.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;download_id=".$data['download_id']."'><strong>".$locale['DS131']."</strong></a>".$noidex_end."</div></td>\n";
               }
                if ($data['mirror_url'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/mirror.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;mirror_id=".$data['download_id']."'><strong>".$locale['DS132']."</strong></a>".$noidex_end."</div></td>\n";
                }
                 if ($data['download_button'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".BASEDIR.$data['download_background']."' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;file_id=".$data['download_id']."'><strong>".$data['download_button']."</strong></a>".$noidex_end."</div></td>\n";
               }
                 if ($data['download_rus'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/rus.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;rus_id=".$data['download_id']."'><strong>".$locale['DS133']."</strong></a>".$noidex_end."</div></td>\n";
               }
                 if ($data['download_forum'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/forum.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;forum_id=".$data['download_id']."'><strong>".$locale['DS134']."</strong></a>".$noidex_end."</div></td>\n";
               }
        echo "</tr>\n";
           } else { echo "<tr><td align='center'><img src='".IMAGES."downloads/lock.png' alt='' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span>".$locale['DS135']."</td></tr>\n"; }
         } //
       echo "</table>\n";
      
      }else{
      echo "Tik registruotiems nariams.":
      }

           if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "SD")) {
       echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' class='small2'>\n";
            $editfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=edit&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>".$locale['A101']."</a>".$noidex_end."\n";
             $delfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=delete&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."' onClick='return DeleteItem()'>".$locale['A102']."</a>".$noidex_end."\n";
         echo "<tr><td align='left' width='100' colspan='8'> ".$locale['A100']." ".$editfile." | ".$delfile."</td></tr>\n";
       echo "</table>\n";
            } //

     if ($ds['bad_links'] != '1' && (checkgroup($ds['bad_links'])) && (checkgroup($data['download_access']))) {
                if ($data['bad_down'] == '') {
   
    add_to_head("<script type='text/javascript'><!--
 function broken_link() {
 if(document.getElementById('id4').style.display=='none') {
 document.getElementById('id4').style.display='block';
 document.getElementById('id3').innerHTML='".$locale['DS137']."';
 }else{
 document.getElementById('id4').style.display='none';
 document.getElementById('id3').innerHTML='".$locale['DS137']."';}
 }
 //--></script>");

     add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."download_system/jscripts/ajax_ds.js\"></script>");
     add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."javascripts/prototype.js\"></script>");

        echo "<div id='broken_message'>\n";
       echo "<div class='small2'><span>&nbsp;</span><img src='".IMAGES."downloads/bad.gif' width='10' height='10' alt='!' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span><a href=\"javascript:broken_link();\" id=\"id3\">".$locale['DS137']."</a>";
         echo "<div id='id4' style='display:none;'><br />\n<form id='brokenform' name='brokenform' method='post'>\n";
       echo "<input type='hidden' name='download_id' value='".$data['download_id']."' />";
       echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr><td width='80' class='tbl'>".$locale['DS138']."<span style='color:#ff0000'>*</span></td><td class='tbl'><textarea name='bad_description' rows='2' cols='70' class='textbox'></textarea></td></tr><td colspan='2' class='tbl' align='center'><br />\n<input type='button' onclick=\"add_report(); return false;\" value='".$locale['DS139']."' class='button' /></td></tr></table></form></div>\n";
       echo "</div>\n";
       echo "</div>\n";
                } else {
       echo "<table width='100%' border='0' class='small2'>\n";
       echo "<tr><td width='80%' class='small2' align='right'><span>&nbsp;</span><img src='".IMAGES."downloads/warning.png' width='19' height='18' alt='!' style='vertical-align:middle; border: 0;' /></td><td width='20%' class='tbl redcolor'><strong> ".$locale['DS136']."</strong></td></tr>\n";
       echo "</table>\n";
                 }
            }
                 } else { echo "<center><br />\n".$locale['DS102']."\n<br />\n<br /></center>\n"; }

         closetable();

         if (dbrows($result) && checkgroup($data['download_access'])) {
       require_once INCLUDES."ratings_include.php";
        if ($data['download_allow_ratings']) { showratings("F", $_GET['page_id'], FUSION_SELF."?page_id=".$_GET['page_id']); }
       require_once INCLUDES."comments_include.php";
        if ($data['download_allow_comments']) { showcomments("F", DB_DOWNLOADS, "download_id", $_GET['page_id'],FUSION_SELF."?page_id=".$_GET['page_id']); }
         } //

          if($ds['newincat'] == '1') { top_cats($data['c2_cat_id']); }

       }
         
     } else { echo "<div align='center' class='nofailes'><strong>".$locale['DS103']."</strong></div>\n"; }

 require_once THEMES."templates/footer.php";

    } //

 ?>



Parašė -Donatas· 2012 Sau. 8 00:01:33
#5

Na ačiū, bet neveikia, meta toki: Parse error: syntax error, unexpected ':', expecting ',' or ';' in /home/csinfinity/domains/lotusas.lt/public_html/downloads.php on line 430

Parašė acTesT.· 2012 Sau. 8 14:01:17
#6

<?php
 /*-------------------------------------------------------+
 | PHP-Fusion Content Management System
 | Copyright (C) 2002 - 2008 Nick Jones
 | http://www.php-fusion.co.uk/
 +--------------------------------------------------------+
 | Filename: downloads.php
 | Author: Nick Jones (Digitanium)
 +--------------------------------------------------------+
 | Download System mSF For PHP-Fusion 7.xx v.4.9
 | Copyright © 2008-2009 Powered by .:MeF:.
 | URL: http://x-iweb.ru/
 +--------------------------------------------------------+
 | 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 INCLUDES."download_system/download_captcha.php";

 if (isset($_GET['feeds'])) { require_once INCLUDES."download_system/feeds/rss.php";
 } else if (isset($_GET['status'])) { require_once INCLUDES."download_system/status.php";
 } else if (isset($_GET['down'])) { captcha_down();
 } else if (isset($_GET['wait'])) { require_once INCLUDES."download_system/download.php"; } else {

 require_once THEMES."templates/header.php";
 require_once INCLUDES."download_system/function.php";
 require_once INCLUDES."download_system/top_panel.php";
 include LOCALE.LOCALESET."downloads.php";

 add_to_head("<script src='".INCLUDES."download_system/jscripts/status.js' type=\"text/javascript\"></script>");
 add_to_head("<link rel='stylesheet' href='".INCLUDES."download_system/css/download_system.css' type='text/css' media='screen' />");
     if (!file_exists(INCLUDES."highslide/highslide-full.js")) {
 add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/highslide-with-gallery.js'></script>");
 add_to_head("<script type='text/javascript' src='".INCLUDES."highslide/include_highslide.js'></script>");
 add_to_head("<link rel='stylesheet' type='text/css' href='".INCLUDES."highslide/highslide.css' />");
     }

     global $active, $captcha, $bad_links, $new, $navigation, $on_coundown, $on_screen, $on_screen_list, $newincat, $row_files, $top, $noidex, $noidex_end;

    $noidex = "<span style='display: none'><![CDATA[<noindex>]]></span>";
    $noidex_end = "<span style='display: none'><![CDATA[</noindex>]]></span>";

     $ds = dbarray(dbquery("SELECT active, captcha, bad_links, new, navigation, on_coundown, on_screen, on_screen_list, newincat, row_files, top FROM ".DB_PREFIX."download_settings"));

     if($ds['active'] == '1') {
   
    reset_count_today();

     if ((isset($_GET['download_id'])) && (isnum($_GET['download_id']))) {
            if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['download_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                      $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['download_id']."'");
                   if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=get");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                      redirect("downloads.php?wait&amp;get_id=".$data['download_id']."");
                   } else {
                    down($data['download_url']);
                   }
                   }
                }

     } elseif ((isset($_GET['mirror_id'])) && (isnum($_GET['mirror_id']))) {
          if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.mirror_url, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['mirror_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                         $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['mirror_id']."'");
                         if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=mirror");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                         redirect("downloads.php?wait&amp;mirror_id=".$data['download_id']."");
                   } else {
                    down($data['mirror_url']);
                   }
                     }
                 }

     } elseif ((isset($_GET['file_id'])) && (isnum($_GET['file_id']))) {
          if ($data = dbarray(dbquery("SELECT d.download_id, d.download_cat, d.download_access, d.download_burl, c.download_cat_access FROM ".DB_DOWNLOADS." d
          LEFT JOIN ".DB_DOWNLOAD_CATS." c ON c.download_cat_id=d.download_cat
           WHERE d.download_id='".$_GET['file_id']."'"))) {
             if (checkgroup($data['download_cat_access']) && checkgroup($data['download_access'])) {
                         $result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1, download_count_today=download_count_today+1 WHERE download_id='".$_GET['file_id']."'");
                   if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
                      redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=file");
                   } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
                         redirect("downloads.php?wait&amp;file_id=".$data['download_id']."");
                   } else {
                         down($data['download_burl']);
                         }
                }
                 }     

     } elseif ((isset($_GET['rus_id'])) && (isnum($_GET['rus_id']))) {
       if ($data = dbarray(dbquery("SELECT (download_id),(download_rus) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['rus_id']."'"))) {
           if ($ds['captcha'] != '1' && $userdata['user_level'] == $ds['captcha']) {
          redirect("downloads.php?page_id=".$data['download_id']."&amp;captcha=rus");
          } elseif($ds['on_coundown'] != '1' && $userdata['user_level'] == $ds['on_coundown']) {
           redirect("downloads.php?wait&amp;rus_id=".$data['download_id']."");
           } else {
           down($data['download_rus']);
           }
        }

     } elseif ((isset($_GET['forum_id'])) && (isnum($_GET['forum_id']))) {
       if ($data = dbarray(dbquery("SELECT (download_forum) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['forum_id']."'"))) { redirect($data['download_forum']); }

     } elseif ((isset($_GET['author_id'])) && (isnum($_GET['author_id']))) {
         if ($data = dbarray(dbquery("SELECT (download_os) FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['author_id']."' ORDER BY download_os"))) { redirect($data['download_os']); }

     } elseif ((isset($_GET['bad_link'])) && (isnum($_GET['bad_link']))) {

    if ($data = dbarray(dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_id='".$_GET['bad_link']."'"))) {

        if ($_POST['bad_description'] != '') {
        $bad_description = stripinput(censorwords($_POST['bad_description']));
         if (iMEMBER) { $bad_user = $userdata['user_id']; } else { $bad_user = "0"; }

       $result = dbquery("INSERT INTO ".DB_PREFIX."download_bad (bad_id, bad_cat, bad_down, bad_name, bad_description, bad_user, bad_user_ip) VALUES ('', '".$data['download_cat']."', '".$data['download_id']."', '".$data['download_title']."', '$bad_description', '$bad_user', '".USER_IP."')");
       redirect($_SERVER['HTTP_REFERER']);

            } else { redirect($_SERVER['HTTP_REFERER']); }
        }
     }

        if ((isset($_GET['cat_id']) == "0") && (!isset($_GET['page_id']))) {
         
       $result = dbquery("SELECT dc1.download_cat_id, dc1.download_cat_name, dc1.download_cat_icon, dc1.download_cat_description FROM ".DB_DOWNLOAD_CATS." dc1 WHERE ".groupaccess('dc1.download_cat_access')." AND dc1.download_cat_idc='0' ORDER BY dc1.download_cat_name ASC");
         $rows = dbrows($result);
         if ($rows != 0) {
             $result2 = dbquery("SELECT dc2.download_cat_id, dc2.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc2 WHERE dc2.download_cat_id='0'");
             $cdata = dbarray($result2);
          $down_cat_name = "<a href='".FUSION_SELF."?cat_id=".$cdata['download_cat_id']."'>".$cdata['download_cat_name']."</a>";
             if (dbrows($result2) == 0){$name = '';} else {$name = " > $down_cat_name";}
          if (dbrows($result2) == 0){$name2 = '';} else {$name2 = "".$cdata['download_cat_name']." | ";}
          $down = "<a href='downloads.php'>".$locale['DS100']."</a>";

          set_title($locale['DS100']." - ".$settings['sitename']);
          set_meta("keywords", $locale['DS100']);
            set_meta("description", $locale['DS100']." - ".$settings['sitename']);
          opentable("".$locale['DS100']."");
         
                 $counter = 0; $columns = 2;
                 $num = 0;
                 echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
                 while ($data = dbarray($result)) {
                         if ($counter != 0 && ($counter % $columns == 0))
                   echo "<tr>\n";
                         NomD ("0", " = '".$data['download_cat_id']."'");
         if ($data['download_cat_icon'] != '') { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/".$data['download_cat_icon']."' alt='-' style='vertical-align:middle; border: 0;' />"; } else { $cat_icon = "<img src='".IMAGES."downloads/cat_icon/folder.png' alt='-' style='vertical-align:middle; border: 0;' />"; }
         echo "<td align='left' valign='top' width='50%' class='tbl'>\n<b>".$cat_icon."<span>&nbsp;</span><a href='downloads.php?cat_id=".$data['download_cat_id']."'>".$data['download_cat_name']." </a>(".$num.")</b>\n";
                         $result2 = dbquery("SELECT dc3.download_cat_id, dc3.download_cat_name FROM ".DB_DOWNLOAD_CATS." dc3 WHERE ".groupaccess('dc3.download_cat_access')." AND dc3.download_cat_idc='".$data['download_cat_id']."' ORDER BY dc3.download_cat_name ASC");
                         $rows2 = dbrows($result2);
                         if ($rows2 != 0) {
                             $i = 0;
                                 echo "<div class='small' style='padding: 0.5em 0em 0em 0em;'>(";
                                 while ($data2 = dbarray($result2)) {
                                 $zap = ($i+1 == $rows2 ? '' : ', ');
                                 echo "<a href='downloads.php?cat_id=".$data2['download_cat_id']."'>".$data2['download_cat_name']."</a>".$zap."";
                                 $i++;
                                 }
                                 echo ")</div>\n";
                         }
                         if ($data['download_cat_description'] != "") {
                   echo "<span class='small'>".$data['download_cat_description']."</span>\n"; }
                         echo "<br /></td>\n";

                         $num = 0;
                         $counter++;
               }
                 echo "</tr>\n</table>\n";

             closetable();

             if($ds['top'] == '1') { top_15(); }
   
         } else {
             opentable($locale['DS100']);
             echo "<div style='text-align:center'><br />\n".$locale['DS101']."<br />\n</div>\n";
             closetable();
         }

        } elseif ((isset($_GET['cat_id'])) && (isnum($_GET['cat_id']))) {

       Put($_GET['cat_id']);
       $result = dbquery("SELECT dc1.download_cat_idc, dc1.download_cat_name, dc1.download_cat_access, dc1.download_cat_sorting FROM ".DB_DOWNLOAD_CATS." dc1 WHERE dc1.download_cat_id='".$_GET['cat_id']."'");
           if (dbrows($result) != 0) {
                 $cdata = dbarray($result);

          $rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."' AND download_submit = '0'");
          if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
          if (!isset($_GET['sort']) || !isnum($_GET['sort'])) { $_GET['sort'] = 1; }
          $sorting = $cdata['download_cat_sorting'];
          if ($_GET['sort'] == 1)   $sorting = "download_title ASC";
          if ($_GET['sort'] == 2)   $sorting = "download_count DESC";
          if ($_GET['sort'] == 3)   $sorting = "download_datestamp DESC, download_title ASC";
         
          if (checkgroup($cdata['download_cat_access'])) {

          $down = "<a href='downloads.php'>".$locale['DS100']."</a>";
         
          Put2($_GET['cat_id']);
           $keywords = ""; $arry_words = explode(">", $sil2);
           foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }
         
          set_title($sil2." | ".$locale['DS100']." - ".$settings['sitename']);
          set_meta("keywords", $keywords.$locale['DS140'].", ".$locale['DS100']);
          set_meta("description", $keywords.$locale['DS100']." - ".$settings['sitename']);
          opentable("$down > ".$sil.""); echo "<br />\n";
         
          require_once INCLUDES."download_system/sub_categores.php";
         
          if (($ds['navigation'] == '1') && (($cdata['download_cat_idc']) > 0 )) { navpanel_list(); }
         
          sub_categores();
         
          if ($rows != 0) {

          echo "<table width='100%' cellspacing='1' cellpadding='1'>\n";
          echo "<tr>\n";
          echo "<td align='center' class='tbl2'><strong>".$locale['DS105']."</strong></td>\n";
          echo "<td align='left' class='".(FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo (FUSION_QUERY == "cat_id='".$_GET['cat_id']."'" || $_GET['sort'] == 1 ? "<strong>".$locale['DS106']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['DS106']."</a>")."</span></td>\n";
          echo "<td align='left' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo ($_GET['sort'] == 3 ? "<strong>".$locale['DS107']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['DS107']."</a>")."</span></td>\n";
          echo "<td align='left' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
          echo ($_GET['sort'] == 2 ? "<strong>".$locale['DS108']."</strong>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['DS108']."</a>")."</span></td>\n";
          echo "</tr></table>\n<br />\n";

             $result = dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_cat='".$_GET['cat_id']."' AND download_submit = '0' ORDER BY $sorting LIMIT ".$_GET['rowstart'].",".$ds['row_files']."");
             
          } else {
             
       $result = dbquery("SELECT d.*, dc.*
       FROM ".DB_DOWNLOADS." d
       INNER JOIN ".DB_DOWNLOAD_CATS." dc ON d.download_cat=dc.download_cat_id
       WHERE download_cat_idc='".$_GET['cat_id']."' ORDER BY download_datestamp DESC LIMIT ".$ds['row_files']."
       ");
       
       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td align='left' class='tbl1'><strong>".$locale['DS142']."</strong></td></tr>\n";
       echo "</table>\n<br />\n";
       
           }
             
             $numrows = dbrows($result);
             $i = 1;

             while ($data = dbarray($result)) {
             
       if ($data['download_datestamp'] + 604800 > time() + ($settings['timeoffset'] * 3600)) {
       $new = "&nbsp;<img src='".IMAGES."downloads/new.gif' width='25' height='13' alt=".$locale['DS109']." />";
       } else { $new = ""; }

                 $wynik = dbquery("SELECT SUM(rating_vote) FROM ".DB_RATINGS." WHERE rating_type='F' AND rating_item_id='".$data['download_id']."'");
                 $info = dbresult($wynik,0);
                 $num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='F' AND rating_item_id='".$data['download_id']."'");
                 $wyn_rating = ($num_rating ? $info / $num_rating : 0);
             $col = dbrows(dbquery("SELECT comment_item_id FROM ".DB_COMMENTS." WHERE comment_type='F' AND comment_item_id='".$data['download_id']."'"));

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td align='center' class='downloadtitle'><strong>".$data['download_title']."</strong>".$new."</td></tr>\n";
       echo "</table>\n<br />\n";
       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";
       echo "<tr><td><table width='260' cellspacing='0' cellpadding='0' border='0' align='left'>\n";
       
       $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $description = $data['download_description']; $screen = $data['download_screen'];

       if ($license != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS123']."  </strong>".$noidex."<a href='javascriptpenPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }
       if ($lang != '') { echo "<tr><td class='small2' style='white-space:nowrap;'><strong>  ".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
       if ($filesize != '') { echo "<tr><td class='small2 info' style='white-space:nowrap;'><strong>  ".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

       echo "</table></td>\n";
       echo "<td><table width='100%' cellspacing='0' cellpadding='0' border='0' align='right'>\n";

                if ($data['download_allow_ratings']) {
       echo "<tr><td class='small' align='right' style='white-space:nowrap;'><strong>".$locale['DS112']."</strong><img src='".IMAGES."downloads/rate/".ceil($wyn_rating).".gif' width='64' height='12' alt='".ceil($wyn_rating)."' style='vertical-align:middle;' title='".$locale['DS112'].ceil($wyn_rating)."' /></td></tr>\n";
                }
                if ($data['download_allow_recommends']) {       
         echo "<tr><td class='small recommend' align='right' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                     }   

       echo "</table></td></tr>\n";
       echo "</table>\n";
       
         echo "<table width='100%' align='center' cellpadding='1' cellspacing='1' border='0' style='padding: 0.6em 0em 0em 0em;'>\n";
       echo "<tr>\n";
       
          if (($ds['on_screen_list'] == '1') && ($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
       echo "<td class='small2' align='center'>\n";
       echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
       echo "</td>\n";
             }

       if ($description != "") { echo "<td colspan='4' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($description))))."</td>\n"; } else { echo "<td colspan='4' class='tbl1' align='center'>".$locale['DS129']."</td>\n"; }
       
       echo "</tr>\n";
         echo "<tr><td width='28%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS121']." </strong>".showdate("%d.%m.%y", $data['download_datestamp'])."</td>\n";   
         echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS110']." </strong>".$col."</td>\n";
         echo "<td width='25%' class='small2' align='center' style='white-space:nowrap;'><strong>".$locale['DS128']." </strong>".$data['download_count']."</td>\n";
         echo "<td width='22%' class='side-small' align='center' style='white-space:nowrap;'><a href='downloads.php?page_id=".$data['download_id']."' target='_self'>".$locale['DS111']."</a></td>\n</tr>\n";
       echo "</table>\n<br />\n";

                $col = 0;
                if ($i != $numrows) { $i++; }
               }

             closetable();

             if ($rows > 1) { echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($_GET['rowstart'], $ds['row_files'], $rows, 3, FUSION_SELF."?cat_id=".$_GET['cat_id']."&amp;sort=".$_GET['sort']."&amp;")."</div>\n"; }     

                 }   
                if ($ds['new'] == '1') { top_5(); }       
          }   
     }
       if ((isset($_GET['page_id'])) && (isnum($_GET['page_id']))) {
       
       $result = dbquery("SELECT d.*, c1.download_cat_name AS c1_name, c1.download_cat_id AS c1_cat_id, c2.download_cat_name AS c2_name, c2.download_cat_id AS c2_cat_id, c1.download_cat_idc AS c1_cat_idc, b.bad_down
       FROM ".DB_DOWNLOADS." d
       LEFT JOIN ".DB_DOWNLOAD_CATS." c1 ON c1.download_cat_id=d.download_cat
       LEFT JOIN ".DB_DOWNLOAD_CATS." c2 ON c2.download_cat_id=c1.download_cat_idc
       LEFT JOIN ".DB_PREFIX."download_bad b ON b.bad_down=d.download_id
       WHERE d.download_id='".$_GET['page_id']."' AND d.download_submit = '0'");
         
       if (dbrows($result) != 0) {   
       $data = dbarray($result);

       $filesize = $data['download_filesize']; $version = $data['download_version']; $license = $data['download_license']; $lang = $data['download_lang']; $screen = $data['download_screen'];

         if ($data['download_description_p'] == "") { $cont = $data['download_description']; }
       else { $cont = $data['download_description_p']; }

    $name_cat = $data['c2_name'] ? $data['c2_name'] : "";
     $base = "<a href='downloads.php'>".$locale['DS100']."</a>";
     $cat = $data['c2_name'] ? " > <a href='downloads.php?cat_id=".$data['c2_cat_id']."'>".$name_cat."</a>" : "";
     $sub_cat = " > <a href='downloads.php?cat_id=".$data['c1_cat_id']."'>".$data['c1_name']."</a>";
     $file = $locale['DS131']." ".$data['download_title'];
       
       $all_words = ($file." ".$data['c1_name']." ".$name_cat." ".$locale['DS100']);
       $keywords = ""; $arry_words = explode(" ", $all_words);
       foreach ($arry_words as $print_arry_words) { $keywords .= trim($print_arry_words).", "; }

    set_title($data['download_title']." | ".$locale['DS100']." - ".$settings['sitename']);
    set_meta("keywords", $keywords.$locale['DS140']);
     set_meta("description", $file." - ".trimlink($cont, 80)." ".$filesize.", ".$version.", ".$license);
     opentable($base.$cat.$sub_cat); echo "<br />\n";

       require_once INCLUDES."download_system/sub_categores.php";
       if($ds['navigation'] == '1') { navpanel_file(); }

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0'>\n";

             if ($data['download_allow_recommends']) {
         echo "<tr><td width='50%' align='right' colspan='2' class='recommend' style='white-space:nowrap;'><strong><i>".$locale['DS130']."</i></strong></td></tr>\n";
                 }

       echo "<td width='100%' align='center' class='downloadtitle'><strong>".$data['download_title']."</strong></td>\n</tr>\n";
       
               if ($data['download_os'] != '') {
         echo "<tr><td align='center' class='downloados'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?author_id=".$data['download_id']."' target='_blank'><strong>".$locale['DS119']."</strong></a>".$noidex_end."</td></tr>\n";
               }

       echo "<tr><td width='50' align='left'><span>&nbsp;&nbsp;</span></td></tr>\n";
       echo "</table>\n";

       echo "<table width='100%' cellspacing='0' cellpadding='0' border='0' style='line-height: 1.45em; padding: 1em 0.25em;'>\n";
       echo "<tr>\n<td>\n<table width='280' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

         echo "<tr><td class='small2 info' width='50%'><strong>".$locale['DS121']."</strong> ".showdate("%d.%m.%y", $data['download_datestamp'])."</td></tr>\n";

    if ($license != ''){ echo "<tr><td class='small2' style='white-space:nowrap;'><strong>".$locale['DS123']."  </strong>".$noidex."<a href='javascriptpenPopupWin();'>".$license."</a>".$noidex_end."</td></tr>\n"; }   
    if ($lang != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS125']."  </strong>".$lang." </td></tr>\n"; }
    if ($version != '') { echo "<tr><td class='small2' width='50%' style='white-space:nowrap;'><strong>".$locale['DS124']."  </strong>".$version." </td></tr>\n"; }
    if ($filesize != '') { echo "<tr><td class='small2 info' width='50%' style='white-space:nowrap;'><strong>".$locale['DS122']."  </strong>".$filesize."</td></tr>\n"; }

       echo "</table>\n</td>\n";
       echo "<td>\n<table width='230' cellspacing='0' cellpadding='0' border='0' align='left'>\n";

          if (($screen != "") && (file_exists(IMAGES.'screens/'.$screen))) {
       echo "<tr><td class='small2' align='center'>\n";
       echo "<a href='".IMAGES."screens/".$screen."' class='highslide' onclick='return hs.expand(this)' title='".$locale['DS126']." ".$data['download_title']."'><img alt='".$locale['DS126']." ".$data['download_title']."' src='".IMAGES."screens/".$screen."' style='max-width:110px;max-height:80px;border:0;vertical-align:middle' align='center' /></a>\n";
       echo "</td></tr>\n";
             } else if($ds['on_screen'] == '1') {
         echo "<tr><td class='small2' align='center'><strong>".$locale['DS127']."</strong></td></tr>\n";
             }

       echo "</table>\n</td>\n</tr>\n";
       echo "</table>\n";
       echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' border='0'>\n";

            if ($cont != "") { echo "<tr><td colspan='3' class='tbl1' align='justify'>".nl2br(stripslashes(parseubb(parsesmileys($cont))))."</td></tr>\n";
        } else { echo "<tr><td colspan='3' class='tbl1' align='justify'>".$locale['DS129']."</td></tr>\n"; }

         echo "</table>\n";
         echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' style='padding: 0em 1.5em 0em 0em;'>\n";
       echo "<tr><td class='small' align='left' valign='top'><strong> ".$locale['DS128']." </strong>".$data['download_count']."</td>\n";
       if (iMEMBER) {
       if (isset($_GET['captcha'])) { captcha_form(); } else {
             if (checkgroup($data['download_access'])) {

               if ($data['download_url'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/down.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;download_id=".$data['download_id']."'><strong>".$locale['DS131']."</strong></a>".$noidex_end."</div></td>\n";
               }
                if ($data['mirror_url'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/mirror.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;mirror_id=".$data['download_id']."'><strong>".$locale['DS132']."</strong></a>".$noidex_end."</div></td>\n";
                }
                 if ($data['download_button'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".BASEDIR.$data['download_background']."' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;file_id=".$data['download_id']."'><strong>".$data['download_button']."</strong></a>".$noidex_end."</div></td>\n";
               }
                 if ($data['download_rus'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/rus.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;rus_id=".$data['download_id']."'><strong>".$locale['DS133']."</strong></a>".$noidex_end."</div></td>\n";
               }
                 if ($data['download_forum'] != '') {
         echo "<td width='80' height='20' bgcolor='#CCCCCC' background='".IMAGES."downloads/forum.png' style='white-space:nowrap;padding: 0em 0.8em 0em 0.8em;'><div align='center'>".$noidex."<a rel='nofollow' href='".FUSION_SELF."?cat_id=".$data['c1_cat_id']."&amp;forum_id=".$data['download_id']."'><strong>".$locale['DS134']."</strong></a>".$noidex_end."</div></td>\n";
               }
        echo "</tr>\n";
           } else { echo "<tr><td align='center'><img src='".IMAGES."downloads/lock.png' alt='' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span>".$locale['DS135']."</td></tr>\n"; }
         } //
       echo "</table>\n";
     
      }else{
      echo "Tik registruotiems nariams.";
      }

           if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "SD")) {
       echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' class='small2'>\n";
            $editfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=edit&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."'>".$locale['A101']."</a>".$noidex_end."\n";
             $delfile = "".$noidex."<a rel='nofollow' href='administration/downloads.php".$aidlink."&step=delete&amp;download_cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."' onClick='return DeleteItem()'>".$locale['A102']."</a>".$noidex_end."\n";
         echo "<tr><td align='left' width='100' colspan='8'> ".$locale['A100']." ".$editfile." | ".$delfile."</td></tr>\n";
       echo "</table>\n";
            } //

     if ($ds['bad_links'] != '1' && (checkgroup($ds['bad_links'])) && (checkgroup($data['download_access']))) {
                if ($data['bad_down'] == '') {
   
    add_to_head("<script type='text/javascript'><!--
 function broken_link() {
 if(document.getElementById('id4').style.display=='none') {
 document.getElementById('id4').style.display='block';
 document.getElementById('id3').innerHTML='".$locale['DS137']."';
 }else{
 document.getElementById('id4').style.display='none';
 document.getElementById('id3').innerHTML='".$locale['DS137']."';}
 }
 //--></script>");

     add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."download_system/jscripts/ajax_ds.js\"></script>");
     add_to_head("<script type=\"text/javascript\" src=\"".INCLUDES."javascripts/prototype.js\"></script>");

        echo "<div id='broken_message'>\n";
       echo "<div class='small2'><span>&nbsp;</span><img src='".IMAGES."downloads/bad.gif' width='10' height='10' alt='!' style='vertical-align:middle; border: 0;' /><span>&nbsp;</span><a href=\"javascript:broken_link();\" id=\"id3\">".$locale['DS137']."</a>";
         echo "<div id='id4' style='display:none;'><br />\n<form id='brokenform' name='brokenform' method='post'>\n";
       echo "<input type='hidden' name='download_id' value='".$data['download_id']."' />";
       echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr><td width='80' class='tbl'>".$locale['DS138']."<span style='color:#ff0000'>*</span></td><td class='tbl'><textarea name='bad_description' rows='2' cols='70' class='textbox'></textarea></td></tr><td colspan='2' class='tbl' align='center'><br />\n<input type='button' onclick=\"add_report(); return false;\" value='".$locale['DS139']."' class='button' /></td></tr></table></form></div>\n";
       echo "</div>\n";
       echo "</div>\n";
                } else {
       echo "<table width='100%' border='0' class='small2'>\n";
       echo "<tr><td width='80%' class='small2' align='right'><span>&nbsp;</span><img src='".IMAGES."downloads/warning.png' width='19' height='18' alt='!' style='vertical-align:middle; border: 0;' /></td><td width='20%' class='tbl redcolor'><strong> ".$locale['DS136']."</strong></td></tr>\n";
       echo "</table>\n";
                 }
            }
                 } else { echo "<center><br />\n".$locale['DS102']."\n<br />\n<br /></center>\n"; }

         closetable();

         if (dbrows($result) && checkgroup($data['download_access'])) {
       require_once INCLUDES."ratings_include.php";
        if ($data['download_allow_ratings']) { showratings("F", $_GET['page_id'], FUSION_SELF."?page_id=".$_GET['page_id']); }
       require_once INCLUDES."comments_include.php";
        if ($data['download_allow_comments']) { showcomments("F", DB_DOWNLOADS, "download_id", $_GET['page_id'],FUSION_SELF."?page_id=".$_GET['page_id']); }
         } //

          if($ds['newincat'] == '1') { top_cats($data['c2_cat_id']); }

       }
         
     } else { echo "<div align='center' class='nofailes'><strong>".$locale['DS103']."</strong></div>\n"; }

 require_once THEMES."templates/footer.php";

    } //

 ?>





naudokis, pataisiau klaida :)

Parašė -Donatas· 2012 Sau. 8 14:01:26
#7

Ačiū, jau buvau pasidaręs, kad galėtų matyti tik svečiai, bet siųstis tik nariai per redagavima :)