Termék hozzáadása

"; if ( $_GET['torles']!="" ) { $id = $_GET['torles']; $q = "SELECT kep FROM termekek WHERE id='$id'"; $e = mysql_query($q); $r = mysql_fetch_row($e); unlink("termekek/$r[0]"); $q = "DELETE FROM termekek WHERE id='$id';"; $e = mysql_query($q); if ( $e ) { print ""; } } } $termek = ""; if ( isset($_GET['termek']) ) $termek = $_GET['termek']; ?>
$r[1]
\n"; } else { print "$r[1]
\n"; } } ?>
\n"; print " function torles(id) {\n"; print " if ( window.confirm('Biztosan törölni szeretné a tételt?') ) {\n"; print " document.location.href='index.php?torles='+id;\n"; print " }\n"; print " }\n"; print " function szerkesztes(id) {\n"; print " tb_show('','termekkezeles.php?id='+id+'&TB_iframe=true&height=600&width=800');\n"; print " }\n"; print "\n"; if ( $termek !="" ) { $q = "SELECT * FROM termekek WHERE id='$termek' ORDER BY id DESC;"; } else { $q = "SELECT * FROM termekek ORDER BY id DESC;"; } $e = mysql_query($q); while ( $r = mysql_fetch_assoc($e) ) { print "\n"; print "\n"; if ( $_SESSION['felhasznalo']=="admin" ) { print "\n"; } print " \n"; print " \n"; print " \n"; print " \n"; print "
\n"; print "   \n"; print "\n"; print "
\n"; print " ".$r[kep]."\n"; print " \n"; print " ".$r[nev]."

\n"; print " ".$r[leiras]."\n"; print "


\n"; } ?>