include("db.php");
dbconnect();
mysql_query( "SET NAMES 'latin5'" );
$say = 0;
$grup = 1;
if (isset($_GET['grup'])) {
$grup = (get_magic_quotes_gpc()) ? $_GET['grup'] : addslashes($_GET['grup']); }
$sinif = 1;
if (isset($_GET['sinif'])) {
$sinif = (get_magic_quotes_gpc()) ? $_GET['sinif'] : addslashes($_GET['sinif']); }
$rec_1 = mysql_query("SELECT * FROM grup WHERE grup=1 ORDER BY id ASC");
$row_rec_1 = mysql_fetch_assoc($rec_1);
$rec_2 = mysql_query("SELECT * FROM grup WHERE grup=2 ORDER BY id ASC");
$row_rec_2 = mysql_fetch_assoc($rec_2);
$rec_3 = mysql_query("SELECT * FROM grup WHERE grup=3 ORDER BY id ASC");
$row_rec_3 = mysql_fetch_assoc($rec_3);
$rec_4 = mysql_query("SELECT * FROM urun WHERE grup='$grup' ORDER BY id ASC");
$row_rec_4 = mysql_fetch_assoc($rec_4);
$rec_4_toplam = mysql_num_rows($rec_4);
$id = $row_rec_4['id'];
if (isset($_GET['id'])) {
$id = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']); }
$rec_5 = mysql_query("SELECT * FROM foto WHERE sinif='$sinif' AND urun='$id' ORDER BY id ASC");
$row_rec_5 = mysql_fetch_assoc($rec_5);
$rec_5_toplam = mysql_num_rows($rec_5);
$rec_6 = mysql_query("SELECT * FROM urun WHERE id='$id'");
$row_rec_6 = mysql_fetch_assoc($rec_6);
if ($row_rec_6['foto']==NULL) {
$grup_foto = "1.jpg";
} else {
$grup_foto = $row_rec_6['foto'];
}
?>
Haykem Mühendislik, Danışmanlık, Elektronik San. ve Tic. Ltd.