php //// FILTER FUNCTIONS //// $nf = getfgroups(); $GLOBALS['filters'] = array(); foreach($nf as $nfk => $nfv){ $GLOBALS['filters']['0'][] = array('gid' => $nfk, 'gname' => $nfv , 'gopts' => getgopts($nfk)); } function findfgname($name){ $query = "SELECT * FROM [|PREFIX|]filter_groups WHERE `gname`='".$name."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $fgname = $row['gname']; } if(isset($fgname)){ return $fgname; } } function findoname($name, $gid){ $query = "SELECT * FROM [|PREFIX|]filter_group_options WHERE `oname`='".$name."' AND `gid`='".$gid."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $oname = $row['oname']; } if(isset($oname)){ return $oname; } } function getfoname($gid, $oid){ $query = "SELECT * FROM [|PREFIX|]filter_group_options WHERE `oid`='".$oid."' AND `gid`='".$gid."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $foname = $row['oname']; } if(isset($foname)){ return $foname; } } function getfgname($id){ $query = "SELECT * FROM [|PREFIX|]filter_groups WHERE `gid`='".$id."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $fgname = $row['gname']; } if(isset($fgname)){ return $fgname; } } function getfgid($name){ $query = "SELECT * FROM [|PREFIX|]filter_groups WHERE `gname`='".$name."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $fgid = $row['gid']; } if(isset($fgid)){ return $fgid; } } function getoptid($oname, $gid){ $query = "SELECT * FROM [|PREFIX|]filter_group_options WHERE `oname`='".$oname."' AND `gid`='".$gid."' LIMIT 1"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $optid = $row['oid']; } if(isset($optid)){ return $optid; } } function getfgroups(){ $fgroups = array(); $query = "SELECT * FROM [|PREFIX|]filter_groups"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $fgroups[$row['gid']] = $row['gname']; } if(isset($fgroups)){ return $fgroups; } } function getgopts($gid){ $fgopts = array(); $query = "SELECT * FROM [|PREFIX|]filter_group_options WHERE `gid`='".$gid."'"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) { $fgopts[$row['oid']] = $row['oname']; } if(isset($fgopts)){ return $fgopts; } } //////// NEW /* function getfoname($gid, $oid){ foreach($GLOBALS['filters'] as $filter){ if($filter['gid'] == $gid){ $foname = $filter['gopts'][$oid]; } } if(isset($foname)){ return $foname; } } function getfgname($id){ foreach($GLOBALS['filters'] as $filter){ if($filter['gid'] == $id){ $fgname = $filter['gname']; } } return $fgname; } function getgopts($gid){ $fgopts = array(); foreach($GLOBALS['filters'] as $filter){ if($filter['gid'] == $gid){ $fgopts = $filter['gopts']; } } return $fgopts; } */ if(isset($_POST['fload']) && $_POST['fload'] == 'fgroups'){ $fgroups = getfgroups(); $fg = array(); foreach($fgroups as $k => $v){ $fg[] = array('gid' => $k, 'gname' => $v, 'gopts' => getgopts($k)); } if($fg){ header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: application/json'); echo json_encode($fg); } exit; } if(isset($_POST['fload']) && $_POST['fload'] == 'fopts'){ $gid = $_POST['gid']; $filteroptions = array(); header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: application/json'); $filteroptions = array('gid' =>$gid, 'opts' => getgopts($gid)); if($filteroptions){ echo json_encode($filteroptions); } exit; } if(isset($_POST['addfiltru']) && $_POST['addfiltru'] == 'adauga'){ $fgname = $_POST['fgname']; if($fgname){ if(findfgname($fgname) == $fgname){ echo 'duplicate'; }else{ $query = "INSERT INTO [|PREFIX|]filter_groups (gname) VALUES ('".$fgname."');"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); echo $result; } } exit; } if(isset($_POST['addfiltru']) && $_POST['addfiltru'] == 'getid'){ $fgname = $_POST['fgname']; $id = getfgid($fgname); if($id){ echo $id; } exit; } if(isset($_POST['addoptiune']) && $_POST['addoptiune'] == 'adauga'){ $oname = $_POST['oname']; $gid = $_POST['gid']; if($oname && $gid){ if(findoname($oname, $gid) == $oname){ echo 'duplicate'; }else{ $query = "INSERT INTO [|PREFIX|]filter_group_options (oname, gid) VALUES ('".$oname."','".$gid."');"; $result = $GLOBALS['ISC_CLASS_DB']->Query($query); echo $result; } } exit; } if(isset($_POST['addoptiune']) && $_POST['addoptiune'] == 'getid'){ $oname = $_POST['oname']; $gid = $_POST['gid']; $id = getoptid($oname, $gid); if($id){ echo $id; } exit; } //// FILTER FUNCTIONS //// ?> Senzori lumina auto. Super oferta vezi pretul ! UA-49851130-1
  Incarca... Va rugam asteptati...
Bine ai venit!Intra in cont
 
 

Newsletter


Senzori lumina auto Valeo

  • Imagine 1
  • Imagine 2




discount
Pret final:
190 Lei
Model:
632030
Producator:
Greutate:
1,0 KGS
Cantitate:



Descriere produs

Senzori de lumina calitate de fabrica, montaj usor

Este un sistem automat de activare a luminilor vehiculului in functie de iluminatul exterior. Un senzor de lumina transmite informatii referitoare la iluminatul exterior si sistemul VALEO 632030 adapteaza luminile hehiculului la conditiile existente astfel incat vizibilitatea este maxima. Extrem de util in parcari subterane, tuneluri timp noros sau lasarea serii.


Scrieti-va parerea dumneavoastra despre acest produs

Nu ne puneti intrebari aici nu veti primi nici un raspuns folositi formularul din pagina de contact sau cel din dreapta jos. Aici puteti scrie o parere despre acest produs.

  1. Nu prea util in Romania

    Postat de A&B Service on 21 Jan 2015

    E ok sistemul, am montat asa ceva, dar in Romania e util doar in combinatie cu niste lampi DRL(lumini de zi) care sa fie aprinse automat la pornirea motorului, iar senzorul sa va aprinda lumina de intalnire, faza scurta daca scade luminozitatea exterioara.



Produse vizualizate