Viewing File: /people/testlab/www/testlab.com.pl/submenu2.php

<?
$sql= "select * from `menu` where id=".$_GET['sidemenu']."";
 $db3 ->query($sql);
$row3=$db3->fetchrow();

naglowek($row3['nazwa'])	;	

if ($_GET['limit']=='') $_GET['limit']=0;

$db=new DBConnect();
$db2=new DBConnect();
$sql="select * from pages where sidemenu='".$_GET['sidemenu']."' and widoczna=1 order by pozycja";
$db->query($sql);
//$liczba=$db->numrows();
//$sql="select * from pages where sidemenu='".$_GET['sidemenu']."' and widoczna=1 order by pozycja LIMIT ".$_GET['limit'].",10;";
//$db->query($sql);

//paginacja ($liczba,$_GET['limit'],10);

while ($row=$db->fetchrow())
{
$tresc=substr(strip_tags($row['tresc']),0,150)."...";
echo "
<div class=div_katalog_item>";
$sql="select * from files where skrypt_id='".$row['id']."' order by pozycja";
$db2->query($sql);
if ($row2=$db2->fetchrow()) 
{
$j++;
	$dest_file = "s".$row['id']."/".$row2['plik'];
	$player = "id=\"mb".$j."\" class=\"mb\"";
	$typ = end(explode(".",$dest_file));
	
	if ($row2['miniaturka']=='') //standartowe miniatury
											{
											$image_path="?page=".$_GET['page']."&amp;dir=img&amp;img=file.png";
											if (($typ=='gif')||($typ=='jpg')||($typ=='png')) $image_path="?page=".$row['id']."&amp;dir=s".$row['id']."&amp;img=".$row2['plik'];
											if (($typ=='flv')||($typ=='wmv')||($typ=='rmvb')||($typ=='mov')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=movie.png";
											if (($typ=='mp3')||($typ=='wav')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=sound.png";
											if (($typ=='rar')||($typ=='zip')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=archive.png";
											if (($typ=='csv')||($typ=='xls')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=excel.png";
											if (($typ=='doc')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=word.png";
											if (($typ=='pdf')) $image_path="?page=".$row['id']."&amp;dir=img&amp;img=pdf.png";
											}
											else //miniatury usera
											{
											$image_path="?page=".$row['id']."&amp;dir=upload&amp;img=".$row2['miniaturka'];
											}
	if ($row2['opis']!='') $opis=$row2['opis']."<br>"; else $opis="";
	
echo"<a href=\"".$dest_file."\" $player ><img src=\"panel/image.php$image_path\" id='img_$j' alt='".str_replace("'","",$row['nazwa'])."'></a>";
echo "<div class=\"multiBoxDesc mb".$j."\">$opis</div>";
}
echo"
<a href='".$row['link'].".html' class=div_katalog_item_title>".$row['nazwa']."</a><br>
".$tresc."
<div class=div_katalog_item_more><a href='".$row['link'].".html' >".$languages['wiecej']."</a></div>
</div>";
}
paginacja ($liczba,$_GET['limit'],10);
?>
Back to Directory File Manager