Viewing File: /people/testlab/www/testlab.com.pl/script/submenu.php
<?
if ($row['tresc']!='')
echo "".$row['tresc']."<BR>";
if ($_GET['limit']=='') $_GET['limit']=0;
$db=new DBConnect();
$db2=new DBConnect();
$sql="select * from pages where menu='".$_GET['page']."' and widoczna=1 order by pozycja";
$db->query($sql);
$liczba=$db->numrows();
$sql="select * from pages where menu='".$_GET['page']."' 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,300)."...";
echo "
<div id=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']."&dir=img&img=file.png";
if (($typ=='gif')||($typ=='jpg')||($typ=='png')) $image_path="?page=".$row['id']."&dir=s".$row['id']."&img=".$row2['plik'];
if (($typ=='flv')||($typ=='wmv')||($typ=='rmvb')||($typ=='mov')) $image_path="?page=".$row['id']."&dir=img&img=movie.png";
if (($typ=='mp3')||($typ=='wav')) $image_path="?page=".$row['id']."&dir=img&img=sound.png";
if (($typ=='rar')||($typ=='zip')) $image_path="?page=".$row['id']."&dir=img&img=archive.png";
if (($typ=='csv')||($typ=='xls')) $image_path="?page=".$row['id']."&dir=img&img=excel.png";
if (($typ=='doc')) $image_path="?page=".$row['id']."&dir=img&img=word.png";
if (($typ=='pdf')) $image_path="?page=".$row['id']."&dir=img&img=pdf.png";
}
else //miniatury usera
{
$image_path="?page=".$row['id']."&dir=upload&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></a>";
echo "<div class=\"multiBoxDesc mb".$j."\">$opis</div>";
}
echo"
<a href='".$row['link'].".html' id=div_katalog_item_title>".$row['nazwa']."</a><br>
".$tresc."
<div id=div_katalog_item_more><a href='".$row['link'].".html' >".$languages['wiecej']."</a></div>
</div>";
}
paginacja ($liczba,$_GET['limit'],10);
?>
Back to Directory
File Manager