HEGEDŰSGUMI
gumi, felni, futómű
error_reporting(0);
//echo 'Current PHP version is ' . phpversion() . '';
//echo "1: " . $GLOBALS["do"] = $do;
//echo "2: " . $HTTP_GET_VARS["product"] = $product;
//echo "3: " . $HTTP_GET_VARS["pid"] = $pid;
//echo "4: " . $HTTP_GET_VARS["p"] = $p;
//echo "5: " . $HTTP_GET_VARS["autobrnd"] = $autobrnd;
//$_GET["lemezkeresbutton.x"] = $lemezkeresbutton.y;
//$_GET["lemezkeresbutton.y"] = $lemezkeresbutton.y;
//echo "2: " . $_GLOBALS["do"];
//echo "1: " . $HTTP_GET_VARS["do"];
$sql_user = "hegedusgumi";
$sql_pswd = "915Dq_xl";
$sql_con = mysql_connect("localhost", $sql_user, $sql_pswd);
mysql_select_db($sql_user, $sql_con) or die ("Adatbázis elérési hiba: " . mysql_error() . "
\n");
//Kereso tablazat szuroinek feltoltese - START
$item_selector = ' selected="selected"';
//Lemezfelni kereso distinct Automarkak
$lfelni_result = mysql_query("SELECT distinct AFLNI_CARTYPE from aflni ORDER BY AFLNI_CARTYPE ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($lfelni_result))
{
foreach ($egy_sor as $ertek)
{
$lfelni_gyarto = $lfelni_gyarto . '
\n";
}
}
//Abroncs kereso distinct parameterek
$abroncs_result_gyarto = mysql_query("SELECT distinct GBRCS_TYPE from gbrcs ORDER BY GBRCS_TYPE ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($abroncs_result_gyarto))
{
foreach ($egy_sor as $ertek)
{
$abroncs_gyarto = $abroncs_gyarto . '
\n";
}
}
$abroncs_result_meret1 = mysql_query("SELECT distinct GBRCS_ITEMWIDTH from gbrcs WHERE GBRCS_ITEMWIDTH<>'0' AND GBRCS_ITEMWIDTH<>'' ORDER BY GBRCS_ITEMWIDTH ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($abroncs_result_meret1))
{
foreach ($egy_sor as $ertek)
{
$abroncs_meret1 = $abroncs_meret1 . '
\n";
}
}
$abroncs_result_meret2 = mysql_query("SELECT distinct GBRCS_ITEMHIGHT from gbrcs WHERE GBRCS_ITEMHIGHT<>'0' AND GBRCS_ITEMHIGHT<>'' ORDER BY GBRCS_ITEMHIGHT ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($abroncs_result_meret2))
{
foreach ($egy_sor as $ertek)
{
$abroncs_meret2 = $abroncs_meret2 . '
\n";
}
}
$abroncs_result_meret3 = mysql_query("SELECT distinct GBRCS_ITEMCALIBER from gbrcs WHERE GBRCS_ITEMCALIBER<>'0' AND GBRCS_ITEMCALIBER<>'' ORDER BY GBRCS_ITEMCALIBER ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($abroncs_result_meret3))
{
foreach ($egy_sor as $ertek)
{
$abroncs_meret3 = $abroncs_meret3 . '
\n";
}
}
//Alufelni kereso distinct parameterek
/*$afelni_result_gyarto = mysql_query("SELECT distinct LFLNI_TYPE from lflni ORDER BY LFLNI_TYPE ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($afelni_result_gyarto))
{
foreach ($egy_sor as $ertek)
{
$afelni_gyarto = $afelni_gyarto . '
\n";
}
}
$afelni_result_meret1 = mysql_query("SELECT distinct LFLNI_ITEMWIDTH from lflni ORDER BY LFLNI_ITEMWIDTH ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($afelni_result_meret1))
{
foreach ($egy_sor as $ertek)
{
$afelni_meret1 = $afelni_meret1 . '
\n";
}
}
$afelni_result_meret2 = mysql_query("SELECT distinct LFLNI_ITEMHIGHT from lflni ORDER BY LFLNI_ITEMHIGHT ASC", $sql_con);
while ($egy_sor = mysql_fetch_row($afelni_result_meret2))
{
foreach ($egy_sor as $ertek)
{
$afelni_meret2 = $afelni_meret2 . '
\n";
}
}*/
//Kereso tablazat szuroinek feltoltese - END
// Check box-ok ertekeinek megjelolese - START
$chkbox_selector = ' selected="selected"';
if ($season == "119") { $season_chk_1 = $chkbox_selector; $where_part = $where_part . "GBRCS_SEASON = 'S' AND "; }
if ($season == "120") { $season_chk_2 = $chkbox_selector; $where_part = $where_part . "GBRCS_SEASON = 'W' AND "; }
if ($season == "121") { $season_chk_3 = $chkbox_selector; $where_part = $where_part . "GBRCS_SEASON = 'FS' AND "; }
if ($season == "118") { $season_chk_4 = $chkbox_selector; $where_part = $where_part . "GBRCS_SEASON = 'R' AND "; }
if ($season == "117") { $season_chk_5 = $chkbox_selector; $where_part = $where_part . "GBRCS_SEASON = 'A' AND "; }
if ($autotype == "122") { $autotype_chk_1 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'SZ' AND "; }
if ($autotype == "123") { $autotype_chk_2 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'K' AND "; }
if ($autotype == "124") { $autotype_chk_3 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'T' AND "; }
if ($autotype == "125") { $autotype_chk_4 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'R' AND "; }
if ($autotype == "126") { $autotype_chk_5 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'B' AND "; }
if ($autotype == "127") { $autotype_chk_6 = $chkbox_selector; $where_part = $where_part . "GBRCS_VEHICLETYPE = 'A' AND "; }
// Check box-ok ertekeinek megjelolese - END
//Termekek 20 elemenek per lap megjelenitese - Abroncs, Alufelni, Lemezfelni - START
$tabla_search_error = '
Hiba |
---|
Kérem, szűkítse a keresési feltételeket! |
';
$tabla_search_error_2 = '
Nincs ilyen termék! Kérem, szűkítse a keresési paramétereket! |
';
if ($do == "abrncs")
{
if ($pid == "" or $product == "")
{
if ($abrbrnd == "-1" and $size_x == "-1" and $size_y == "-1" and $size_z == "-1" and $season == "" and $autotype == "")
{
$table_result_write = $tabla_search_error;
} else {
$where_part = $where_part . "GBRCS_ITEMWIDTH<>'0' AND GBRCS_ITEMWIDTH<>'' AND GBRCS_ITEMHIGHT<>'0' AND GBRCS_ITEMHIGHT<>'' AND GBRCS_ITEMCALIBER<>'0' AND GBRCS_ITEMCALIBER<>''";
$where_part = rtrim($where_part, " AND ");
$table_result_full = mysql_query("SELECT * from gbrcs WHERE $where_part", $sql_con);
$table_result_rows_full = mysql_num_rows($table_result_full);
if ($p == "" or $p == "1")
{
$limit_value = 20;
} else {
$limit_value = (20*($p-1)) . ",20";
}
$table_result = mysql_query("SELECT * from gbrcs WHERE $where_part ORDER BY GBRCS_DESC ASC LIMIT $limit_value", $sql_con);
$table_result_rows = mysql_num_rows($table_result);
if ($table_result_rows == 0)
{
$table_result_write = $tabla_search_error_2;
} else {
$table_result_write = '
' . "\n\n" . 'Név | Sebességindex | Bruttó kedvezményes ár | ' . "\n";
$even_cnt = 0;
while ($egy_sor_tomb = mysql_fetch_array($table_result))
{
if ($even_cnt == 0)
{
$table_result_write = $table_result_write . "";
$picname = "cart_tablazathoz_gray_2.jpg";
} else {
$table_result_write = $table_result_write . '
';
$picname = "cart_tablazathoz_gray_3.jpg";
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 4)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,1) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],1,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 5)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,2) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 6)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 7)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,1) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],1,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],4,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 8)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,2) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],5,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 9)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],3,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],6,3);
}
$table_result_write = $table_result_write . ' ' . $egy_sor_tomb["GBRCS_DESC"] . ' | ' . $egy_sor_tomb["GBRCS_SPEEDIDX"] . ' | ' . $ar_formazott . '.- Ft |
' . "\n";
if ($even_cnt == 0) { $even_cnt = 1; } else { $even_cnt = 0; }
$ar_formazott = "";
}
$table_result_footer = ' Termékek száma: ' .$table_result_rows_full . ' db.
' . $table_result_pages = ceil($table_result_rows_full/20) . ' oldal.
';
}
}
} else {
$table_result = mysql_query("SELECT * from gbrcs WHERE GBRCS_TYPE='$product' AND GBRCS_ITEMID='$pid'", $sql_con);
$egy_sor_tomb = mysql_fetch_array($table_result);
$abrncs_part = "2";
if ($egy_sor_tomb["GBRCS_XL"] == "N") { $GBRCS_XL = "Nem"; } else { $GBRCS_XL = "Igen"; }
if ($egy_sor_tomb["GBRCS_PUNCTURE"] == "N") { $GBRCS_PUNCTURE = "Nem"; } else { $GBRCS_PUNCTURE = "Igen"; }
if ($egy_sor_tomb["GBRCS_SEASON"] == "FS") { $GBRCS_SEASON = "Négy évszak"; } elseif ($egy_sor_tomb["GBRCS_SEASON"] == "S") { $GBRCS_SEASON = "Nyári"; } elseif ($egy_sor_tomb["GBRCS_SEASON"] == "W") { $GBRCS_SEASON = "Téli"; } elseif ($egy_sor_tomb["GBRCS_SEASON"] == "R") { $GBRCS_SEASON = "Verseny"; } elseif ($egy_sor_tomb["GBRCS_SEASON"] == "A") { $GBRCS_SEASON = "Mezőgazdasági"; }
if ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "SZ") { $GBRCS_VEHICLETYPE = "Személyautó"; } elseif ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "T") { $GBRCS_VEHICLETYPE = "Terepjáró"; } elseif ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "K") { $GBRCS_VEHICLETYPE = "Kisáruszállító"; } elseif ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "R") { $GBRCS_VEHICLETYPE = "Versenyabroncs"; } elseif ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "B") { $GBRCS_VEHICLETYPE = "Motorabroncs"; } elseif ($egy_sor_tomb["GBRCS_VEHICLETYPE"] == "A") { $GBRCS_VEHICLETYPE = "Mezőgazdasági"; }
}
}
if ($do == "aflni")
{
if ($pid == "" or $product == "")
{
if ($alubrnd == "-1" and $aluszelesseg == "-1" and $alumagassag == "-1")
{
$table_result_write = $tabla_search_error;
} else {
$where_part = rtrim($where_part, " AND ");
$table_result_full = mysql_query("SELECT * from aflni WHERE $where_part", $sql_con);
$table_result_rows_full = mysql_num_rows($table_result_full);
if ($p == "" or $p == "1")
{
$limit_value = 20;
} else {
$limit_value = (20*($p-1)) . ",20";
}
$table_result = mysql_query("SELECT * from aflni WHERE $where_part ORDER BY AFLNI_DESC ASC LIMIT $limit_value", $sql_con);
$table_result_rows = mysql_num_rows($table_result);
if ($table_result_rows == 0)
{
$table_result_write = $tabla_search_error_2;
} else {
}
}
} else {
//$table_result = mysql_query("SELECT * from aflni WHERE AFLNI_CARTYPE='$product' AND AFLNI_ITEMID_1='$pid'", $sql_con);
//$egy_sor_tomb = mysql_fetch_array($table_result);
$lflni_part = "2";
}
}
if ($do == "lflni")
{
if ($pid == "" or $product == "")
{
if ($autobrnd == "-1")
{
$table_result_write = $tabla_search_error;
} else {
$where_part = rtrim($where_part, " AND ");
$table_result_full = mysql_query("SELECT * from aflni WHERE $where_part", $sql_con);
$table_result_rows_full = mysql_num_rows($table_result_full);
if ($p == "" or $p == "1")
{
$limit_value = 20;
} else {
$limit_value = (20*($p-1)) . ",20";
}
$table_result = mysql_query("SELECT * from aflni WHERE $where_part ORDER BY AFLNI_DESC ASC LIMIT $limit_value", $sql_con);
$table_result_rows = mysql_num_rows($table_result);
if ($table_result_rows == 0)
{
$table_result_write = $tabla_search_error_2;
} else {
$table_result_write = '' . "\n\n" . 'Név | Lemezméret | Bruttó kedvezményes ár | ' . "\n";
$even_cnt = 0;
while ($egy_sor_tomb = mysql_fetch_array($table_result))
{
if ($even_cnt == 0)
{
$table_result_write = $table_result_write . "";
} else {
$table_result_write = $table_result_write . '
';
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 4)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,1) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],1,3);
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 5)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,2) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 6)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,3) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 7)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,1) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],1,3) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],4,3);
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 8)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,2) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],2,3) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],5,3);
}
if (strlen($egy_sor_tomb["AFLNI_PRICE"]) == 9)
{
$ar_formazott = substr($egy_sor_tomb["AFLNI_PRICE"],0,3) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],3,3) . '.' . substr($egy_sor_tomb["AFLNI_PRICE"],6,3);
}
$table_result_write = $table_result_write . '' . $egy_sor_tomb["AFLNI_DESC"] . ' | ' . $egy_sor_tomb["AFLNI_FSIZE"] . ' | ' . $ar_formazott . '.- Ft |
' . "\n";
if ($even_cnt == 0) { $even_cnt = 1; } else { $even_cnt = 0; }
$ar_formazott = "";
}
$table_result_footer = ' Termékek száma: ' .$table_result_rows_full . ' db.
' . $table_result_pages = ceil($table_result_rows_full/20) . ' oldal.
';
}
}
} else {
$table_result = mysql_query("SELECT * from aflni WHERE AFLNI_CARTYPE='$product' AND AFLNI_ITEMID_1='$pid'", $sql_con);
$egy_sor_tomb = mysql_fetch_array($table_result);
$lflni_part = "2";
}
}
//Termekek 20 elemenek per lap megjelenitese - Abroncs, Alufelni, Lemezfelni - END
$site_product_simple = '
Lapozó
';
$site_product_abrncs = '
' . $table_result_write . '
Lapozó
' . $table_result_footer . '
';
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 4)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,1) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],1,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 5)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,2) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 6)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 7)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,1) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],1,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],4,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 8)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,2) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],2,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],5,3);
}
if (strlen($egy_sor_tomb["GBRCS_PRICE"]) == 9)
{
$ar_formazott = substr($egy_sor_tomb["GBRCS_PRICE"],0,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],3,3) . '.' . substr($egy_sor_tomb["GBRCS_PRICE"],6,3);
}
if (trim($egy_sor_tomb["GBRCS_PICTURE"]) == "NOIMAGE") { $pic_url = "/images/NOIMAGE.gif"; } else { $pic_url = "http://images.gumi.hu/mintazatok/" . trim($egy_sor_tomb["GBRCS_PICTURE"]); }
$site_product_abrncs_details = '