Navigacija

Vartotojų tinkle

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

Registruoti nariai: 25,952
Naujausias narys: tomeem

Naujausi straipsniai

Paskutiniai nariai

asirija 4 dienos
tomeem 2 savaitės
Reikalas 3 savaitės
weberiz 6 savaitės
mRokass 8 savaitės
kartoonas 9 savaitės
iaescortsmap 9 savaitės
ozzWANTED10 savaitės
grunskiz12 savaitės
Bruksnys12 savaitės
illusion12 savaitės
ordo13 savaitės
Jurgaila14 savaitės
originalcs1614 savaitės
Rytis15 savaitės
halis16 savaitės
junkus19 savaitės
morlis19 savaitės
Majakas20 savaitės
andsoft21 savaitės

Informacija:


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

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



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

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

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

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

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

Apocal
2023 Rugs. 2 18:09:23
Nu davai nuveikiam kažką akinanti šypsen. Prisijungti kada visi čia akinanti šypsen.

Apocal
2023 Rugs. 2 00:09:18
Šiaip atėjau pažiūrėti ar dar lopas nesby yra ar koks ten buvo.

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

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

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
v6: downloads + Lightbox
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Bendri PHP-F klausimai

Autorius: zaiboras Peržiūrų: 1358      Spausdinti temą
2011 Vas. 9 17:02:47          1 žinutė iš 4
Spausdinti pranešimą
sveiki, gal galėtumėte pasakyti kaip įdėti LightBox efektą į downloads.php .
Bandziau ir i subheader talpint kodą... bendziau ir systemos siuntinių ieškot su lightBox, bet neradau...

tai gal kas galėtu pasakyti kaip jį reikia įdėti į downloads.php...

3 atsakymai:
2011 Vas. 9 17:02:35          2 žinutė iš 4
Spausdinti pranešimą
Man to paties su photogallery.php reiktu, sorry kad i tavo tema parasiau
0

2011 Vas. 9 17:02:39          3 žinutė iš 4
Spausdinti pranešimą
Duok savo lightbox koda ir download.php koda idesiu
0


nusirasinek.lt - pratybų atsakymai. REFERALINĖS NUORODOS DRAUDŽIAMOS - SMS hostingas
2011 Vas. 9 18:02:29          4 žinutė iš 4
Spausdinti pranešimą

/*
   Lightbox JS: Fullsize Image Overlays
   by Lokesh Dhakar - http://www.huddletogether.com

   For more information on this script, visit:
   http://huddletogether.com/projects/lightbox/

   Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licen...
   (basically, do anything you want, just leave my name and link)
   
   Table of Contents
   -----------------
   Configuration
   
   Functions
   - getPageScroll()
   - getPageSize()
   - pause()
   - getKey()
   - listenKey()
   - showLightbox()
   - hideLightbox()
   - initLightbox()
   - addLoadEvent()
   
   Function Calls
   - addLoadEvent(initLightbox)

*/



//
// Configuration
//

// If you would like to use a custom loading image or close button reference them in the next two lines.
var loadingImage = 'loading.gif';      
var closeButton = 'close.gif';      





//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.org
//
function getPageScroll(){

   var yScroll;

   if (self.pageYOffset) {
      yScroll = self.pageYOffset;
   } else if (document.documentElement && document.documentElement.scrollTop){    // Explorer 6 Strict
      yScroll = document.documentElement.scrollTop;
   } else if (document.body) {// all other Explorers
      yScroll = document.body.scrollTop;
   }

   arrayPageScroll = new Array('',yScroll)
   return arrayPageScroll;
}



//
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez
//
function getPageSize(){
   
   var xScroll, yScroll;
   
   if (window.innerHeight && window.scrollMaxY) {   
      xScroll = document.body.scrollWidth;
      yScroll = window.innerHeight + window.scrollMaxY;
   } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
      xScroll = document.body.scrollWidth;
      yScroll = document.body.scrollHeight;
   } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
      xScroll = document.body.offsetWidth;
      yScroll = document.body.offsetHeight;
   }
   
   var windowWidth, windowHeight;
   if (self.innerHeight) {   // all except Explorer
      windowWidth = self.innerWidth;
      windowHeight = self.innerHeight;
   } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
      windowWidth = document.documentElement.clientWidth;
      windowHeight = document.documentElement.clientHeight;
   } else if (document.body) { // other Explorers
      windowWidth = document.body.clientWidth;
      windowHeight = document.body.clientHeight;
   }   
   
   // for small pages with total height less then height of the viewport
   if(yScroll < windowHeight){
      pageHeight = windowHeight;
   } else {
      pageHeight = yScroll;
   }

   // for small pages with total width less then width of the viewport
   if(xScroll < windowWidth){   
      pageWidth = windowWidth;
   } else {
      pageWidth = xScroll;
   }


   arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
   return arrayPageSize;
}


//
// pause(numberMillis)
// Pauses code execution for specified time. Uses busy code, not good.
// Code from http://www.faqts.com/knowledge_b...l/aid/1602
//
function pause(numberMillis) {
   var now = new Date();
   var exitTime = now.getTime() + numberMillis;
   while (true) {
      now = new Date();
      if (now.getTime() > exitTime)
         return;
   }
}

//
// getKey(key)
// Gets keycode. If 'x' is pressed then it hides the lightbox.
//

function getKey(e){
   if (e == null) { // ie
      keycode = event.keyCode;
   } else { // mozilla
      keycode = e.which;
   }
   key = String.fromCharCode(keycode).toLowerCase();
   
   if(key == 'x'){ hideLightbox(); }
}


//
// listenKey()
//
function listenKey () {   document.onkeypress = getKey; }
   

//
// showLightbox()
// Preloads images. Pleaces new image in lightbox then centers and displays.
//
function showLightbox(objLink)
{
   // prep objects
   var objOverlay = document.getElementById('overlay');
   var objLightbox = document.getElementById('lightbox');
   var objCaption = document.getElementById('lightboxCaption');
   var objImage = document.getElementById('lightboxImage');
   var objLoadingImage = document.getElementById('loadingImage');
   var objLightboxDetails = document.getElementById('lightboxDetails');

   
   var arrayPageSize = getPageSize();
   var arrayPageScroll = getPageScroll();

   // center loadingImage if it exists
   if (objLoadingImage) {
      objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - objLoadingImage.height) / 2) + 'px');
      objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoadingImage.width) / 2) + 'px');
      objLoadingImage.style.display = 'block';
   }

   // set height of Overlay to take up whole page and show
   objOverlay.style.height = (arrayPageSize[1] + 'px');
   objOverlay.style.display = 'block';

   // preload image
   imgPreload = new Image();

   imgPreload.onload=function(){
      objImage.src = objLink.href;

      // center lightbox and make sure that the top and left values are not negative
      // and the image placed outside the viewport
      var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - imgPreload.height) / 2);
      var lightboxLeft = ((arrayPageSize[0] - 20 - imgPreload.width) / 2);
      
      objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTop + "px";
      objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";


      objLightboxDetails.style.width = imgPreload.width + 'px';
      
      if(objLink.getAttribute('title')){
         objCaption.style.display = 'block';
         //objCaption.style.width = imgPreload.width + 'px';
         objCaption.innerHTML = objLink.getAttribute('title');
      } else {
         objCaption.style.display = 'none';
      }
      
      // A small pause between the image loading and displaying is required with IE,
      // this prevents the previous image displaying for a short burst causing flicker.
      if (navigator.appVersion.indexOf("MSIE")!=-1){
         pause(250);
      }

      if (objLoadingImage) {   objLoadingImage.style.display = 'none'; }

      // Hide select boxes as they will 'peek' through the image in IE
      selects = document.getElementsByTagName("select");
        for (i = 0; i != selects.length; i++) {
                selects[i].style.visibility = "hidden";
        }

   
      objLightbox.style.display = 'block';

      // After image is loaded, update the overlay height as the new image might have
      // increased the overall page height.
      arrayPageSize = getPageSize();
      objOverlay.style.height = (arrayPageSize[1] + 'px');
      
      // Check for 'x' keypress
      listenKey();

      return false;
   }

   imgPreload.src = objLink.href;
   
}





//
// hideLightbox()
//
function hideLightbox()
{
   // get objects
   objOverlay = document.getElementById('overlay');
   objLightbox = document.getElementById('lightbox');

   // hide lightbox and overlay
   objOverlay.style.display = 'none';
   objLightbox.style.display = 'none';

   // make select boxes visible
   selects = document.getElementsByTagName("select");
    for (i = 0; i != selects.length; i++) {
      selects[i].style.visibility = "visible";
   }

   // disable keypress listener
   document.onkeypress = '';
}




//
// initLightbox()
// Function runs on window load, going through link tags looking for rel="lightbox".
// These links receive onclick events that enable the lightbox display for their targets.
// The function also inserts html markup at the top of the page which will be used as a
// container for the overlay pattern and the inline image.
//
function initLightbox()
{
   
   if (!document.getElementsByTagName){ return; }
   var anchors = document.getElementsByTagName("a");

   // loop through all anchor tags
   for (var i=0; i<anchors.length; i++){
      var anchor = anchors[i];

      if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "lightbox")){
         anchor.onclick = function () {showLightbox(this); return false;}
      }
   }

   // the rest of this code inserts html at the top of the page that looks like this:
   //
   // <div id="overlay">
   //      <a href="#" onclick="hideLightbox(); return false;"><img id="loadingImage" /></a>
   //   </div>
   // <div id="lightbox">
   //      <a href="#" onclick="hideLightbox(); return false;" title="Click anywhere to close image">
   //         <img id="closeButton" />      
   //         <img id="lightboxImage" />
   //      </a>
   //      <div id="lightboxDetails">
   //         <div id="lightboxCaption"></div>
   //         <div id="keyboardMsg"></div>
   //      </div>
   // </div>
   
   var objBody = document.getElementsByTagName("body").item(0);
   
   // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
   var objOverlay = document.createElement("div");
   objOverlay.setAttribute('id','overlay');
   objOverlay.onclick = function () {hideLightbox(); return false;}
   objOverlay.style.display = 'none';
   objOverlay.style.position = 'absolute';
   objOverlay.style.top = '0';
   objOverlay.style.left = '0';
   objOverlay.style.zIndex = '90';
    objOverlay.style.width = '100%';
   objBody.insertBefore(objOverlay, objBody.firstChild);
   
   var arrayPageSize = getPageSize();
   var arrayPageScroll = getPageScroll();

   // preload and create loader image
   var imgPreloader = new Image();
   
   // if loader image found, create link to hide lightbox and create loadingimage
   imgPreloader.onload=function(){

      var objLoadingImageLink = document.createElement("a");
      objLoadingImageLink.setAttribute('href','#');
      objLoadingImageLink.onclick = function () {hideLightbox(); return false;}
      objOverlay.appendChild(objLoadingImageLink);
      
      var objLoadingImage = document.createElement("img");
      objLoadingImage.src = loadingImage;
      objLoadingImage.setAttribute('id','loadingImage');
      objLoadingImage.style.position = 'absolute';
      objLoadingImage.style.zIndex = '150';
      objLoadingImageLink.appendChild(objLoadingImage);

      imgPreloader.onload=function(){};   //   clear onLoad, as IE will flip out w/animated gifs

      return false;
   }

   imgPreloader.src = loadingImage;

   // create lightbox div, same note about styles as above
   var objLightbox = document.createElement("div");
   objLightbox.setAttribute('id','lightbox');
   objLightbox.style.display = 'none';
   objLightbox.style.position = 'absolute';
   objLightbox.style.zIndex = '100';   
   objBody.insertBefore(objLightbox, objOverlay.nextSibling);
   
   // create link
   var objLink = document.createElement("a");
   objLink.setAttribute('href','#');
   objLink.setAttribute('title','Click to close');
   objLink.onclick = function () {hideLightbox(); return false;}
   objLightbox.appendChild(objLink);

   // preload and create close button image
   var imgPreloadCloseButton = new Image();

   // if close button image found,
   imgPreloadCloseButton.onload=function(){

      var objCloseButton = document.createElement("img");
      objCloseButton.src = closeButton;
      objCloseButton.setAttribute('id','closeButton');
      objCloseButton.style.position = 'absolute';
      objCloseButton.style.zIndex = '200';
      objLink.appendChild(objCloseButton);

      return false;
   }

   imgPreloadCloseButton.src = closeButton;

   // create image
   var objImage = document.createElement("img");
   objImage.setAttribute('id','lightboxImage');
   objLink.appendChild(objImage);
   
   // create details div, a container for the caption and keyboard message
   var objLightboxDetails = document.createElement("div");
   objLightboxDetails.setAttribute('id','lightboxDetails');
   objLightbox.appendChild(objLightboxDetails);

   // create caption
   var objCaption = document.createElement("div");
   objCaption.setAttribute('id','lightboxCaption');
   objCaption.style.display = 'none';
   objLightboxDetails.appendChild(objCaption);

   // create keyboard message
   var objKeyboardMsg = document.createElement("div");
   objKeyboardMsg.setAttribute('id','keyboardMsg');
   objKeyboardMsg.innerHTML = 'press <a href="#" onclick="hideLightbox(); return false;"><kbd>x</kbd></a> to close';
   objLightboxDetails.appendChild(objKeyboardMsg);


}




//
// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{   
   var oldonload = window.onload;
   if (typeof window.onload != 'function'){
       window.onload = func;
   } else {
      window.onload = function(){
      oldonload();
      func();
      }
   }

}



addLoadEvent(initLightbox);   // run initLightbox onLoad
</script>




<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include LOCALE.LOCALESET."downloads.php";

if (isset($download_id) && !isNum($download_id)) fallback("index.php");

if (isset($download_id)) {
   $res = 0;
   if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='$download_id'"))) {
      $cdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$data['download_cat']."'"));
      if (checkgroup($cdata['download_cat_access'])) {
         $res = 1;
         $result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'");
         redirect($data['download_url']);
      }
   }
   if ($res == 0) redirect("downloads.php");
}


if($_GET['d_id'] && !isNum($d_id)){
fallback("news.php");
}
if (isset($d_id)) {
include INCLUDES."ratings_include.php";
include INCLUDES."comments_include.php";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id='$d_id'");
while ($data = dbarray($result)) {
               $id = $data['download_cat'];
               if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
                  $new = " <span class='small'>".$locale['410']."</span>";
               } else {
                  $new = "";
               }
               $time = $data['download_datestamp'];
               $laikas = showdate( "%d.%m.%y", $time);
               $kat = dbresult(dbquery("SELECT download_cat_name FROM ".$db_prefix."download_cats WHERE download_cat_id='$id'"), 0);
               echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
               echo "<tr>
<td colspan='5' class='forum-caption'>  <div id='gallery'>
               <table style='border-collapse: collapse;' border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>

               <td>&nbsp;<a href='".FUSION_SELF."' class='small' title='Siuntiniai'><b>Siuntiniai</b></a>&nbsp;>>&nbsp;<a href='".FUSION_SELF."?cat_id=".$data['download_cat']."' class='small' title='Siuntinio Kategorija'><b>$kat</b></a>&nbsp;>&nbsp;<a class='small' href='".FUSION_SELF."?cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."' title='Atsisiøsti Siuntin&#225;'><b>".$data['download_title']."</b></a> </td>
               <td align='right'><span class='small2'><b>Prid&#235;tas:</b> $laikas</span></td>
               </tr></table></td>
</tr>\n";
               if ($data['download_description'] != "") echo "<tr>\n
               <td colspan='5' class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>\n</tr>\n";
               echo "<tr>\n
               
               <td rowspan='2' class='tbl1' align='center' valign='middle' width='1%'><a class='small' href='".FUSION_SELF."?cat_id=".$data['download_cat']."&amp;download_id=".$data['download_id']."' title='Atsisiøsti Fail&#224;' style='font-weight: bold;'><img src='".IMAGES."download.png' alt='Atsisiøsti Fail&#224;' border='0'></a></td>
               
               <td width='30%' class='tbl2'><b>".$locale['413']."</b> ".$data['download_version']."</td>\n<td width='30%' class='tbl1'><b>".$locale['411']."</b> ".$data['download_license']."</td>\n";
               $kom = dbquery("SELECT count(comment_id) FROM ".$db_prefix."comments WHERE comment_type='D' AND comment_item_id='$id'");
               $kon = dbresult($kom, 0);
               if ($kon == 0) { $komentarai = 0; } else { $komentarai = $kon; }
               
               echo "<td width='40%' class='tbl2'><b>Komentarai:</b> $komentarai</td>\n</tr>\n<tr>\n<td width='30%' class='tbl2'><b>".$locale['412']."</b> ".$data['download_os']." </td>\n";
               echo "<td width='30%' class='tbl1'><b>".$locale['415']."</b> ".$data['download_count']."</td>\n<td width='40%' class='tbl2'><b>Dydis:</b> ".($data['download_filesize'] ? "".$data['download_filesize']."" : "N&#235;ra")."</td>\n</tr>\n";
               echo "</table>\n";
               
               if ($i != $numrows) { echo "<div align='center'><img src='".THEME."images/blank.gif' alt='' height='15' width='1'></div>\n"; $i++; }
            }
            
showcomments("D","downloads","download_id",$d_id,FUSION_SELF."?d_id=$d_id");

showratings("D",$d_id,FUSION_SELF."?d_id=$d_id");

} else {



if (!isset($cat_id)) {
   opentable($locale['400']);
   $result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
   $rows = dbrows($result);
   if ($rows != 0) {
      $counter = 0; $columns = 2;
      echo "<center><img src='".IMAGES."downloads.png' alt='' border='0'></center>";
      echo "<table class='tbl-border' style='margin-top: 10px;' cellpadding='0' cellspacing='1' width='100%' align='center'>";
      
      echo "<tr>
<td class='tbl1' colspan='2' align='center'>
<form name='searchform' method='post' action='search.php' style='display: inline;'>
      <b>Ie&#240;koti Siuntiniø:</b>&nbsp; <input name='stext' class='textbox' style='width: 200px;' type='text'>
      <input name='stype' value='d' type='hidden'><input name='search' value='Ie&#240;koti!' class='button' type='submit'>
      </form>
</td>
</tr>";
      
      while ($data = dbarray($result)) {
         
         $num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
         echo "<tr>
<td class='tbl1' width='1%'><a class='small' href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."' style='font-weight: bold;'><img src='images/dl_cats/".$data['download_cat_image']."' alt='".$data['download_cat_name']."' border='0'>
</a></td>
         <td class='tbl2' align='left' valign='center'><img src='".THEME."images/bullet.gif' alt='' border='0'>
         <a class='small' href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."' style='font-weight: bold;'>".$data['download_cat_name']."</a> <span class='small2'>($num)</span><br>
         <span class='small'>".$data['download_cat_description']."</span></td>
</tr>";
         $counter++;
      }
      echo "<table class='tbl-border' style='margin-top: 10px;' cellpadding='0' cellspacing='1' width='100%'>
<tr>
   <td class='forum-caption' colspan='2' width='1%'>Statistika</td>

</tr>
<tr>
   <td class='tbl1' align='center' width='1%'><img src='images/dl_stats.png' alt='Siuntiniø statistika' border='0'></td>
   <td class='tbl2'>
<table border='0' cellpadding='0' cellspacing='1'>";

$dataq = dbarray(dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_id DESC LIMIT 0,1"));
echo "<tr><td>Naujausias siuntinys: </td>
<td> <a class='small' href='".FUSION_SELF."?d_id=".$dataq['download_id']."' title=''>".$dataq['download_title']."</a></td>
</tr>";

$datax = dbarray(dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,1"));
echo "<tr><td>Populiariausias: </td>
<td> <a class='small' href='".FUSION_SELF."?d_id=".$datax['download_id']."' title=''>".$datax['download_title']."</a></td>
</tr>";

$cats = dbresult(dbquery("SELECT count(download_cat_id) FROM ".$db_prefix."download_cats"), 0);
echo "<tr><td>Kategorijø: </td>
<td class='small2'> $cats</td></tr>";

$countd = dbresult(dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads"), 0);
echo "<tr>
   <td>Siuntiniø: </td>
<td class='small2'> $countd</td>
</tr>";

$counth = dbresult(dbquery("SELECT SUM(download_count) FROM ".$db_prefix."downloads"), 0);
echo "<tr><td>Atsisiøsta: </td>
<td class='small2'> $counth</td></tr>";

echo "</table>
</td>
</tr>
</table>";
      
      $result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_id DESC LIMIT 0,20");
if (dbrows($result)) {

echo "<table class='tbl-border' style='margin-top: 10px;' border='0' cellpadding='0' cellspacing='1' width='100%'>
<tr>
      <td class='forum-caption' style='white-space: nowrap;'>Naujausi siuntiniai</td>
      <td class='forum-caption' style='white-space: nowrap;' align='center' width='1%'>Data</td>

      <td class='forum-caption' style='white-space: nowrap;' align='center' width='1%'>Siuntimai</td>
</tr>";
while ($data = dbarray($result)) {
$time = $data['download_datestamp'];
$laikas = showdate( "%d.%m.%y", $time);
echo "<tr>
         <td class='tbl1'><img src='".THEME."images/bullet.gif' alt='' border='0'> <a class='small' href='downloads.php?d_id=".$data['download_id']."'>".$data['download_title']."</a></td>

         <td class='tbl1' align='center'>$laikas</td>

         <td class='tbl1' align='center'>".$data['download_count']."</td>

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

   } else {
      echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
   }
   closetable();
} else {
   $res = 0;
   if (!isNum($cat_id)) fallback(FUSION_SELF);
   $result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'");
   if (dbrows($result) != 0) {
      $cdata = dbarray($result);
      if (checkgroup($cdata['download_cat_access'])) {
         $res = 1;
         opentable($locale['400'].": ".$cdata['download_cat_name']);
         $rows = dbcount("(*)", "downloads", "download_cat='$cat_id'");
         if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
         if ($rows != 0) {
            $result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='$cat_id' ORDER BY ".$cdata['download_cat_sorting']." LIMIT $rowstart,15");
            //s
            $catdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'"));
            $count = dbresult(dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads WHERE download_cat='$cat_id'"), 0);
            echo "
            <table class='tbl-border' cellpadding='0' cellspacing='1' width='100%'>
<tr>
         <td class='tbl2' style='white-space: nowrap;' align='center' valign='middle' width='1%'><a class='small' href='downloads.php?cat_id=$cat_id' title='".$catdata['download_cat_name']."'><img src='images/dl_cats/".$catdata['download_cat_image']."' alt='".$catdata['download_cat_name']."' border='0'>
</a></td>
         <td class='tbl1' valign='top'><span><a class='small' href='downloads.php'>Siuntiniai</a> » ".$catdata['download_cat_name']."</span><br>
         ".$catdata['download_cat_description']."<br><br>Siuntimø kategorijoje: <span class='small2'>$count</span></td>
</tr>

</table>

<table cellpadding='0' cellspacing='0' width='100%'><tbody><tr>
<td height='8'>
</td>
</tr>
</tbody></table>";
            //e
            
            
            $numrows = dbrows($result); $i = 1;
            while ($data = dbarray($result)) {
            $id = $data['download_id'];
               if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
                  $new = " <span class='small'>".$locale['410']."</span>";
               } else {
                  $new = "";
               }
               $time = $data['download_datestamp'];
               $laikas = showdate( "%d.%m.%y", $time);
               echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
               echo "<tr>
<td colspan='5' class='forum-caption'>
               <table style='border-collapse: collapse;' border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
               <td width='1%'><a class='small' href='".FUSION_SELF."?d_id=".$data['download_id']."' title='&#222;i&#251;r&#235;ti fail&#224;' style='font-weight: bold;'><img src='".IMAGES."down.png' alt='&#222;i&#251;r&#235;ti fail&#224;' border='0'></a></td>

               <td>&nbsp;<a class='small' href='".FUSION_SELF."?d_id=".$data['download_id']."' title='&#222;i&#251;r&#235;ti fail&#224;' style='font-weight: bold;'><b>".$data['download_title']."</b></a> </td>
               <td align='right'><span class='small2'><b>Prid&#235;tas:</b> $laikas</span></td>
               </tr></table></td>
</tr>\n";
               if ($data['download_description'] != "") echo "<tr>\n
               <td colspan='5' class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>\n</tr>\n";
               echo "<tr>\n
               
               <td rowspan='2' class='tbl1' align='center' valign='middle' width='1%'><a class='small' href='".FUSION_SELF."?cat_id=$cat_id&amp;download_id=".$data['download_id']."' title='Atsisiøsti Fail&#224;' style='font-weight: bold;'><img src='".IMAGES."download.png' alt='Atsisiøsti Fail&#224;' border='0'></a></td>
               
               <td width='30%' class='tbl2'><b>".$locale['413']."</b> ".$data['download_version']."</td>\n<td width='30%' class='tbl1'><b>".$locale['411']."</b> ".$data['download_license']."</td>\n";
               $kom = dbquery("SELECT count(comment_id) FROM ".$db_prefix."comments WHERE comment_type='D' AND comment_item_id='$id'");
               $kon = dbresult($kom, 0);
               if ($kon == 0) { $komentarai = 0; } else { $komentarai = $kon; }
               
               echo "<td width='40%' class='tbl2'><b>Komentarai:</b> $komentarai</td>
               <td class='tbl1' rowspan='2' colspan='1' align='right' valign='bottom' width='1%'>
               <a href='".FUSION_SELF."?d_id=".$data['download_id']."' title='Ziureti Faila Placiau, Komentuoti.'><img src='images/comments.png' alt='Ziureti Faila Placiau' border='0'></a><br>
               </td>\n</tr>\n<tr>\n<td width='30%' class='tbl2'><b>".$locale['412']."</b> ".$data['download_os']." </td>\n";
               echo "<td width='30%' class='tbl1'><b>".$locale['415']."</b> ".$data['download_count']."</td>\n<td width='40%' class='tbl2'><b>Dydis:</b> ".($data['download_filesize'] ? "".$data['download_filesize']."" : "N&#235;ra")."</td>\n</tr>\n";
               echo "</div></table>\n";
               
               if ($i != $numrows) { echo "<div align='center'><img src='".THEME."images/blank.gif' alt='' height='15' width='1'></div>\n"; $i++; }
            }
            closetable();
            if ($rows > 15) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&amp;")."\n</div>\n";
         } else {
            echo $locale['431']."\n";
            closetable();
         }
      }
   }
   if ($res == 0) redirect(FUSION_SELF);
}
}
require_once "side_right.php";
require_once "footer.php";
?>


0

Peršokti į forumą: