<?php
function show_comments($id) {
$type_id='3';
include(\"show_coment.php\");
}
function add_comment($id)
{
$type_id='3';
$strona_powrotna = \"download.php?cmt=$id\";
include(\"coments.php\");
}
function lista_kategorii($cat_list) {
$sql = \"select * from download_category\";
print(\"<table align=\"center\" width=\"500\">\"); print(\"<tr><td>Category name</td><td>Last uptade</td><td>Files</td></tr>\"); $ctgr = $row[\"cat_id\"];
$sqlcat = \"select * from download_files where cat_id = '$ctgr' ORDER BY file_id DESC\";
print(\"<tr><td>\");
if($HTTP_SESSION_VARS['status']<5) {
print(\" <a href=\"download_admin.php?delcat=\".$row[\"cat_id\"].\"\" > delete </a>\"); }
print(\"<a href=\"download.php?cat=\".$row[\"cat_id\"].\"\">\".$row[\"category\"].\"</a></td><td>\".$rowe[\"date\"].\"</td><td>$cnt_files</td></tr>\"); }
print(\"</table>\"); }
function pokaz_kategorie($cat) {
$sql33 = \"select * from download_files where cat_id = '$cat' ORDER BY file_id DESC\";
print(\"<table align=\"center\" width=\"500\">\"); print(\"<tr><td>id</td><td>File name</td><td>Size</td><td>Date</td><td>Downloads</td><td>Comments</td></tr>\"); $id = $row[\"file_id\"];
$type_id = 3;
$sqlcmt = \"select * from comments where art_id='$id' AND type_id='$type_id' ORDER BY comment_id\";
print(\"<tr><td width=\"40\">\".$row[\"file_id\"].\"</td><td><a href=\"download.php?dl=\".$row[\"file_id\"].\"\">\".$row[\"name\"].\"</a></td><td>\".$row[\"size\"].\" MB</td><td>\".$row[\"date\"].\"</td><td>\".$row[\"dls\"].\"</td><td><a href=\"download.php?cmt=$id\">( $cnt )</a></td></tr>\"); print(\"<tr><td colspan=\"6\" style=\"padding:5px\"><a href=\"wyslane/img_pliki/\".$row[\"img\"].\"\"><img src=\"wyslane/img_pliki/\".$row[\"img\"].\"\" width=\"80\" height=\"80\"></a>\".$row[\"info\"].\"</td></tr>\"); print(\"<tr><td colspan=\"6\"> [ <a href=\"download.php?dl=\".$row[\"file_id\"].\"\"> DOWNLOAD </a> ]\"); if($HTTP_SESSION_VARS['status']<5) {
print(\"<a href=\"download_admin.php?ed=\".$row[\"file_id\"].\"\"> edit </a> <a href=\"download_admin.php?del=\".$row[\"file_id\"].\"\" > delete </a>\"); }
print(\"</td></tr>\"); }
print(\"</table>\"); }
$sql=\"UPDATE download_files SET dls = dls + 1 WHERE file_id = '$dl'\";
$sql2 = \"select * from download_files where file_id = '$dl'\";
$url = $row[\"url\"];
print(\"<script>window.location=\"$url\"</script>\"); }
function pokaz_plik($cmt)
{
$sql = \"select * from download_files where file_id = '$cmt'\";
print(\"<table align=\"center\" width=\"500\">\"); print(\"<tr><td>id</td><td>File name</td><td>Size</td><td>Date</td><td>Downloads</td></tr>\"); $id = $row[\"file_id\"];
$type_id = 3;
$sqlcmt = \"select * from comments where art_id='$id' AND type_id='$type_id' ORDER BY comment_id\";
print(\"<tr><td width=\"40\">\".$row[\"file_id\"].\"</td><td><a href=\"download.php?dl=\".$row[\"file_id\"].\"\">\".$row[\"name\"].\"</a></td><td>\".$row[\"size\"].\" MB</td><td>\".$row[\"date\"].\"</td><td>\".$row[\"dls\"].\"</td></tr>\"); print(\"<tr><td colspan=\"6\" style=\"padding:5px\">\".$row[\"info\"].\"</td></tr>\"); print(\"<tr><td colspan=\"6\"> [ <a href=\"download.php?dl=\".$row[\"file_id\"].\"\"> DOWNLOAD </a> ] \"); if($HTTP_SESSION_VARS['status']<5) {
print(\" <a href=\"download_admin.php?ed=\".$row[\"file_id\"].\"\">edit </a> <a href=\"download_admin.php?del=\".$row[\"file_id\"].\"\" >delete </a>\"); }
print(\"</td></tr>\"); print(\"</table>\");
show_comments($id);
add_comment($id);
}
pokaz_plik($cmt);
}
pokaz_kategorie($cat);
}
lista_kategorii($cat_list);
}
?>
Oto mój skrypt downloadu. Problem polega na tym, że zamiast wyśeitlać mi wybraną funkcję(np. jak chcem zobaczyć informacje o danych pliku) wyśietla mi wszystkie funkcje tak jakby nie istaniało if(isset()). Proszę o pomoc.