$value) { if ($key != 'cue' && $key!='limitfrom' && $key!='property_id') { $querystring_side .= "&" . "$key=$value"; } } ## navigalas kezdoertekei if (! $limitfrom) $limitfrom = 0; if ($cue == 'forward') $limitfrom += 50; if ($cue == 'back') if ($limitfrom - 50 >= 0) $limitfrom -= 50; if ( $_GET[cue]=='qselection' ) { if ( my_ff("SELECT quality_selection FROM property_kiado WHERE id='$_GET[property_id]'")=='1' ) my_query("UPDATE property_kiado SET quality_selection='0' WHERE id='$_GET[property_id]'"); else my_query("UPDATE property_kiado SET quality_selection='1' WHERE id='$_GET[property_id]'"); } if ( $_GET[cue]=='special' ) { if ( my_ff("SELECT specialoffer FROM property_kiado WHERE id='$_GET[property_id]'")=='1' ) my_query("UPDATE property_kiado SET specialoffer='0' WHERE id='$_GET[property_id]'"); else my_query("UPDATE property_kiado SET specialoffer='1' WHERE id='$_GET[property_id]'"); } $u_id=$_SESSION['user_id']; $_user_post_id = my_ff ("select user_post_id from user where id = '$_SESSION[user_id]'"); if( $_user_post_id==11 or $_user_post_id==22 ) { $u_exec=true; } /* primelocation signing - begin */ if($u_exec) { // peti primelocationja /* foreach ($_POST as $key => $value) { if($key=='primeloc' && $_POST['primelocsign']) { foreach ($value as $subkey => $subvalue) { if($subvalue=='on') { $sql="update property set primeloc=1 where id=$subkey"; my_query($sql); //echo mysql_error(); //echo "--Kulcs: $subkey, Érték: $subvalue
\n"; } } } if($key=='primelocdel' && $_POST['primelocsign']) { foreach ($value as $subkey => $subvalue) { if($subvalue=='on') { $sql="update property set primeloc=0 where id=$subkey"; my_query($sql); //echo mysql_error(); //echo "--Kulcs: $subkey, Érték: $subvalue
\n"; } } } } */ if ($_POST['primelocsign'] == 'yes') { $del_prime = $set_prime = $unset_prime = array (); // a del torli koypontilag, a masik 2 csak a helzi adatbayis miatt kell $res = my_query ("select id, primeloc from property_kiado"); while ($row = mysql_fetch_array ($res)) { if ($_POST['primeloc_' . $row['id']] != '1' && $row['primeloc'] == '1') array_push ($del_prime, $row['id']); if ($_POST['primeloc_' . $row['id']] == '1') array_push ($set_prime, $row['id']); else array_push ($unset_prime, $row['id']); } mysql_free_result ($res); $temp = ''; for ($i = 0; $i < count ($set_prime); $i++) { if ($i > 0) $temp .= ' or '; $temp .= " id = '{$set_prime[$i]}' "; } my_query ("update property_kiado set primeloc = '1' where $temp"); $temp = ''; for ($i = 0; $i < count ($unset_prime); $i++) { if ($i > 0) $temp .= ' or '; $temp .= " id = '{$unset_prime[$i]}' "; } my_query ("update property_kiado set primeloc = '0' where $temp"); $temp = ''; for ($i = 0; $i < count ($del_prime); $i++) $temp .= $del_prime[$i] . '+'; $temp = substr ($temp, 0, strlen ($temp) - 1); echo ''; } } /* primelocation signing - end */ if ($_GET['cue'] == 'where' ) { $_SESSION['ing_query'] = $_SERVER['QUERY_STRING']; } if ($_GET['cue'] == 'del' && is_user_boss ()) { my_query ("update property_kiado set act = 'disabled' where id = '$_GET[id]'"); } if($_user_post_id==22 ) { $f_mark=true; } /********** folyamat ************* orderfield olvasása sessionből ha az uj rendezesi mezo = legutobb valasztott rendezesi mezo, akkor forduljon a sorrend (orderdesc) egyebkent orderfield[0]=orderfield[1]; orderfield[1]=neworderfield; orderfield mentése sessionbe ************************************/ // ps is a namespace for this part of code if($_GET['property_sight_id']) { $ps_res=my_query (" select id, name from property_sight order by pos"); $i=0; $ps_pos=0; while($ps_row = mysql_fetch_array ($ps_res)) { $ps_rows[$i]=$ps_row; //echo "{$ps_row['id']}
"; if($ps_row['id']==$_GET['property_sight_id']) { $ps_pos=$i; } $i=$i+1; } switch ($ps_pos) { case 0: $ps_where = " property_sight_id=" . $ps_rows[$ps_pos]['id']; break; case 1: $ps_where = " property_sight_id=" . $ps_rows[$ps_pos]['id']; break; case 2: $ps_where = " property_sight_id=" . $ps_rows[$ps_pos]['id']; break; case 3: $ps_where = " property_sight_id=" . $ps_rows[$ps_pos]['id']; break; case 4: $ps_where = " property_sight_id=" . $ps_rows[$ps_pos]['id']; break; } } if($ps_where){ $ps_where = " and (" .$ps_where . ")";} // echo "propery_sight test: {$_GET['property_sight_id']} $ps_pos xxx $ps_where"; /* *** sight absolute positions/orders: udvar 0 z.udvar 1 utcai 2 panorama 3 duna panorama 4 */ if($_GET['property_heater_id']) { $ph_res=my_query (" select id, name from property_heater order by pos"); $i=0; $ph_pos=0; while($ph_row = mysql_fetch_array ($ph_res)) { $ph_rows[$i]=$ph_row; //echo "{$ph_row['id']}
"; if($ph_row['id']==$_GET['property_heater_id']) { $ph_pos=$i; } $i=$i+1; } switch ($ph_pos) { case 0: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 1: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id'] ; break; case 2: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 3: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 4: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 5: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 6: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; case 7: $ph_where = " property_heater_id=" . $ph_rows[$ph_pos]['id']; break; } } if($ph_where){ $ph_where = " and (" .$ph_where . ")";} if($_GET['property_flattype']) { $pf_res=my_query (" select id, name from property_flattype order by pos"); $i=0; $pf_pos=0; while($pf_row = mysql_fetch_array ($pf_res)) { $pf_rows[$i]=$pf_row; //echo "{$ps_row['id']}
"; if($pf_row['id']==$_GET['property_flattype']) { $pf_pos=$i; } $i=$i+1; } switch ($pf_pos) { case 0: $pf_where = " property_flattype=" . $pf_rows[$pf_pos]['id']; break; case 1: $pf_where = " property_flattype=" . $pf_rows[$pf_pos]['id']; break; case 2: $pf_where = " property_flattype=" . $pf_rows[$pf_pos]['id']; break; case 3: $pf_where = " property_flattype=" . $pf_rows[$pf_pos]['id']; break; } } if($pf_where){ $pf_where = " and (" .$pf_where . ")";} // read array from session // if there is session defined if (isset($_SESSION['prop_orderfield'])) {$orderfield=$_SESSION['prop_orderfield'];} //printf( "%s", $_GET['orderfield']); if (isset ($_GET['orderfield'])) { if(empty($orderfield[1])) { $orderfield[1]=$_GET['orderfield']; } if($orderfield[1]!=$_GET['orderfield']) { $orderfield[0]=$orderfield[1]; $orderfield[1] = $_GET['orderfield']; $orderdesc = $_GET['orderdesc'] ? true : false; } } else { $orderfield[1] = 'district_id'; $orderfield[0] = 'address'; $orderdesc = false; } /** create $orders string **/ $orders=''; if (isset($orderfield[0])) { $orders=$orderfield[0]; } if (isset($orderfield[1])) { if($orderfield[1]!=$orderfield[0] && !empty($orderfield[1]) ) { $orders= $orderfield[1] . ", " . $orders ; } } if ($orderdesc) { $orders=$orders . " desc " ; } $_SESSION['prop_orderfield']=$orderfield; //echo "$orders ....
"; //echo "$orderdesc ....
"; //printf(" %s és %s", $orderfield[0],$orderfield[1]); $get_orders = ''; if (! empty ($_GET['ID'])) $get_orders .= "&ID=$_GET[ID]"; if (! empty ($_GET['phone'])) $get_orders .= "&phone=$_GET[phone]"; if (! empty ($_GET['mobil'])) $get_orders .= "&mobil=$_GET[mobil]"; if (! empty ($_GET['uzlethelyiseg'])) $get_orders .= "&uzlethelyiseg=$_GET[uzlethelyiseg]"; if (! empty ($_GET['price1_kiado'])) $get_orders .= "&price1=$_GET[price1_kiado]"; if (! empty ($_GET['price2_kiado'])) $get_orders .= "&price2=$_GET[price2_kiado]"; if (! empty ($_GET['m2price'])) $get_orders .= "&m2price=$_GET[m2price]"; if (! empty ($_GET['m1'])) $get_orders .= "&m1=$_GET[m1]"; if (! empty ($_GET['m2'])) $get_orders .= "&m2=$_GET[m2]"; if (! empty ($_GET['roomfull_min'])) $get_orders .= "&roomfull_min=$_GET[roomfull_min]"; if (! empty ($_GET['roomfull_max'])) $get_orders .= "&roomfull_max=$_GET[roomfull_max]"; $dist_str = var_chkbox ('district', 'property_district'); $dist_arr = ! empty ($dist_str) ? explode (',', $dist_str) : array (); if (! empty ($dist_arr)) { for ($i = 0; $i < count ($dist_arr); $i++) { $get_orders .= "&district_{$dist_arr[$i]}=on"; } } $masstrans_str = var_chkbox ('masstrans', 'property_transport'); $masstrans_arr = ! empty ($masstrans_str) ? explode (',', $masstrans_str) : array (); if (! empty ($masstrans_arr)) { for ($i = 0; $i < count ($masstrans_arr); $i++) { $get_orders .= "&masstrans_{$masstrans_arr[$i]}=on"; } } if ($_GET['address_name'] > -1) $get_orders .= "&address_name=$_GET[address_name]"; if ($_GET['flat1'] > -1) $get_orders .= "&flat1=$_GET[flat1]"; if ($_GET['flat2'] > -1) $get_orders .= "&flat2=$_GET[flat2]"; if ($_GET['outside1'] > -1) $get_orders .= "&outside1=$_GET[outside1]"; if ($_GET['outside2'] > -1) $get_orders .= "&outside2=$_GET[outside2]"; if ($_GET['inside1'] > -1) $get_orders .= "&inside1=$_GET[inside1]"; if ($_GET['inside2'] > -1) $get_orders .= "&inside2=$_GET[inside2]"; if ($_GET['floor_id']) $get_orders .= "&floor_id=$_GET[floor_id]"; if ($_GET['max_floor_lift']) $get_orders .= "&max_floor_lift=$_GET[max_floor_lift]"; if ($_GET['panorama']) $get_orders .= "&panorama=$_GET[panorama]"; if ($_GET['balcony']) $get_orders .= "&balcony=$_GET[balcony]"; if ($_GET['terrace']) $get_orders .= "&terrace=$_GET[terrace]"; if ($_GET['property_sight_id']) $get_orders .= "&property_sight_id=$_GET[property_sight_id]"; if ($_GET['property_heater_id']) $get_orders .= "&property_heater_id=$_GET[property_heater_id]"; if ($_GET['property_flattype']) $get_orders .= "&property_flattype=$_GET[property_flattype]"; if ($_GET['primelock']) $get_orders .= "&primelock=$_GET[primelock]"; if ($_GET['joelosztas']) $get_orders .= "&joelosztas=$_GET[joelosztas]"; if ($_GET['sdate1']) $get_orders .= "&sdate1=$_GET[sdate1]"; if ($_GET['sdate2']) $get_orders .= "&sdate2=$_GET[sdate2]"; if ($_GET['edate1']) $get_orders .= "&edate1=$_GET[edate1]"; if ($_GET['edate2']) $get_orders .= "&edate2=$_GET[edate2]"; if ($_GET['agent']) $get_orders .= "&agent=$_GET[agent]"; if ($_GET['agency_id']) $get_orders .= "&agency_id=$_GET[agency_id]"; //echo 'property_sight_id: '.$_GET[property_sight_id]; # ?> Ingatlanok listázása - Central Home Hungary 1 ? " rowspan=\"$row_propspan\"" : '') . " onclick=\"order ('$name', " . ($orderfield == $name && ! $orderdesc ? 1 : 0) . ');" style="cursor: hand;">' . $value . ($orderfield[1] == $name ? '' : '') . ''; } $where='cue=where&agency_id='.$_GET[agency_id].'&agent='.$_GET[agent].'&fwsstring='.$_GET[fwsstring].'&ID='.$_GET[ID].'&phone='.$_GET[phone].'&mobil='.$_GET[mobil].'&price1='.$_GET[price1].'&price2='.$_GET[price2].'&price1_kiado='.$_GET[price1_kiado].'&price2_kiado='.$_GET[price2_kiado].'&m2price='.$_GET[m2price].'&m1='.$_GET[m1].'&m2='.$_GET[m2].$get_orders.'&address_name='.$_GET[address_name].'&flat1='.$_GET[flat1].'&flat2='.$_GET[flat2].'&outside1='.$_GET[outside1].'&outside2='.$_GET[outside2].'&inside1='.$_GET[inside1].'&inside2='.$_GET[inside2].'&roomfull_min='.$_GET[roomfull_min].'&floor_id='.$_GET[floor_id].'&max_floor_lift='.$_GET[max_floor_lift].'&property_sight_id='.$_GET[property_sight_id].'&property_heater_id='.$_GET[property_heater_id].'&property_flattype='.$_GET[property_flattype].'&sdate1='.$_GET[sdate1].'&sdate2='.$_GET[sdate2].'&edate1='.$_GET[edate1].'&edate2='.$_GET[edate2]; ?>
Rögzítés', '', 2) ?> Lejárat', '', 2) ?> Ép. k.', '') ?> Ép. b.', '') ?> -tól', '') ?> -ig', '') ?> 500000"){ $price1_kiado = '10000000'; }else{ $price1_kiado = $_GET['price1_kiado']; } if (! empty ($_GET['price2_kiado']) && $_GET['price2_kiado'] == ">500000"){ $price2_kiado = '10000000'; }else{ $price2_kiado = $_GET['price2_kiado']; } $where_arr = array (); /* if (! empty ($_GET['price1_kiado'])) array_push ($where_arr, "process_property_selling_kiado.guide_price >= '$_GET[price1_kiado]'"); if (! empty ($_GET['price2_kiado'])) array_push ($where_arr, "process_property_selling_kiado.guide_price <= '$_GET[price2_kiado]'"); */ if (! empty ($price1_kiado)) array_push ($where_arr, "process_property_selling_kiado.guide_price >= '$price1_kiado'"); if (! empty ($price2_kiado)) array_push ($where_arr, "process_property_selling_kiado.guide_price <= '$price2_kiado'"); if (! empty ($_GET['price1_eur_kiado'])) array_push ($where_arr, "process_property_selling_kiado.guide_price_eur >= '$_GET[price1_eur_kiado]'"); if (! empty ($_GET['price2_eur_kiado'])) array_push ($where_arr, "process_property_selling_kiado.guide_price_eur <= '$_GET[price2_eur_kiado]'"); if ($_GET['uzlethelyiseg']) array_push ($where_arr, "property_kiado.uzlethelyiseg = '1'"); if (! empty ($_GET['m2price'])) array_push ($where_arr, "round(process_property_selling_kiado.guide_price/property_kiado.offical_size) <= '$_GET[m2price]'"); if (! empty ($_GET['m1'])) array_push ($where_arr, "property_kiado.offical_size >= $_GET[m1]"); if (! empty ($_GET['m2'])) array_push ($where_arr, "property_kiado.offical_size <= $_GET[m2]"); $dist_str = var_chkbox ('district', 'property_district'); $dist_arr = ! empty ($dist_str) ? explode (',', $dist_str) : array (); $sql_dist = ''; if (! empty ($dist_arr)) { for ($i = 0; $i < count ($dist_arr); $i++) { if (! empty ($sql_dist)) $sql_dist .= 'or '; $sql_dist .= "property_address.property_district_id = '{$dist_arr[$i]}' "; } if (! empty ($sql_dist)) array_push ($where_arr, "($sql_dist)"); } $masstrans_str = var_chkbox ('masstrans', 'property_transport'); $masstrans_arr = ! empty ($masstrans_str) ? explode (',', $masstrans_str) : array (); $sql_masstrans = ''; if (! empty ($masstrans_arr)) { for ($i = 0; $i < count ($masstrans_arr); $i++) { if (! empty ($sql_masstrans)) $sql_masstrans .= 'AND '; $sql_masstrans .= "(property_kiado.property_transport LIKE '%,{$masstrans_arr[$i]},%' OR property_kiado.property_transport LIKE '{$masstrans_arr[$i]},%' OR property_kiado.property_transport LIKE '%,{$masstrans_arr[$i]}') "; } if (! empty ($sql_masstrans)) array_push ($where_arr, "($sql_masstrans)"); } if ($_GET['flat1'] > 0) array_push ($where_arr, "property_kiado.flat >= '$_GET[flat1]'"); if ($_GET['flat2'] > 0) array_push ($where_arr, "property_kiado.flat <= '$_GET[flat2]'"); if ($_GET['outside1'] > 0) array_push ($where_arr, "property_kiado.building_outside >= '$_GET[outside1]'"); if ($_GET['outside2'] > 0) array_push ($where_arr, "property_kiado.building_outside <= '$_GET[outside2]'"); if ($_GET['inside1'] > 0) array_push ($where_arr, "property_kiado.building_inside >= '$_GET[inside1]'"); if ($_GET['inside2'] > 0) array_push ($where_arr, "property_kiado.building_inside <= '$_GET[inside2]'"); //$roomfull_min = $_GET['roomfull_min']; //$roomfull_max = $_GET['roomfull_max']; //$roomhalf = $_GET['roomhalf']; # legalabb ennyi egesz szoba legyen if (! empty ($_GET['roomfull_min'])){ $roomfull_min = $_GET['roomfull_min']; } else { $roomfull_min = '0'; } # legfeljebb ennyi egesz szoba legyen if (! empty ($_GET['roomfull_max'])){ $roomfull_max = $_GET['roomfull_max']; } else { $roomfull_max = '20'; } if ($_GET['floor_id']) array_push ($where_arr, 'property_kiado.property_floor_id ' . ($_GET['min_floor'] ? '>=' : '=') . " $_GET[floor_id]"); /* if ($_GET['max_floor_lift']) array_push ($where_arr, "((property.property_floor_id <= '$_GET[max_floor_lift]') or ((property.property_floor_id > '$_GET[max_floor_lift]') and (property.property_lift_id > '0')))"); */ if ($_GET['max_floor_lift'] && $_GET['max_floor_lift']!='0') { $m_f=$_GET['max_floor_lift']; // echo "max floor" . $_GET['max_floor_lift']; array_push ($where_arr, "( (property_kiado.property_floor_id <= $m_f) or ((property_kiado.property_floor_id > $m_f) and (property_kiado.property_lift_id <> '9')) )"); } if ($_GET['ID']) array_push ($where_arr, "property_kiado.id = '$_GET[ID]'"); if ($_GET['phone']) array_push ($where_arr, "customer.phone = '$_GET[phone]'"); if ($_GET['mobil']) array_push ($where_arr, "customer.mobil = '$_GET[mobil]'"); if ($_GET['panorama']) array_push ($where_arr, "property_kiado.property_sight_id > '5'"); if ($_GET['balcony']) array_push ($where_arr, "property_kiado.balcony > '0'"); if ($_GET['terrace']) array_push ($where_arr, "property_kiado.terrace > '0'"); if ($_GET['sdate1']) array_push ($where_arr, "process_property_selling_kiado.mandate >= '$_GET[sdate1]'"); if ($_GET['sdate2']) array_push ($where_arr, "process_property_selling_kiado.mandate <= '$_GET[sdate2]'"); if ($_GET['edate1']) array_push ($where_arr, "process_property_selling_kiado.expiration >= '$_GET[edate1]'"); if ($_GET['edate2']) array_push ($where_arr, "process_property_selling_kiado.expiration <= '$_GET[edate2]'"); if ($_GET['agent']) array_push ($where_arr, "process_property_selling_kiado.agent_user_id = '$_GET[agent]'"); if ($_GET['agency_id']) array_push ($where_arr, "agency.id = '$_GET[agency_id]'"); if ($_GET['address_name']) array_push ($where_arr, "property_address.name LIKE '%$_GET[address_name]%'"); $dateformat="Y-m-d"; $yesterday=mktime( date('G'), date('i'), date('s'), date('m'), date('d')-1, date('y')); $yesterday=date($dateformat,$yesterday); if ($_GET['yesterday']) array_push ($where_arr, "process_property_selling_kiado.mandate >= '$yesterday'"); $last1week=mktime( date('G'), date('i'), date('s'), date('m'), date('d')-7, date('y')); $last1week=date($dateformat,$last1week); if ($_GET['last1week']) array_push ($where_arr, "process_property_selling_kiado.mandate >= '$last1week'"); $last2week=mktime( date('G'), date('i'), date('s'), date('m'), date('d')-14, date('y')); $last2week=date($dateformat,$last2week); if ($_GET['last2week']) array_push ($where_arr, "process_property_selling_kiado.mandate >= '$last2week'"); if ($_GET['fwsstring']) { $fws_arr=explode(" ", $_GET['fwsstring']); $fws_sql=" AND ( "; for ( $i=0; $i"; $cx = $limitfrom; $js_str = $pr_str = $ck_str = ''; /* $sqlhard=" select property.id as id, property.primeloc as primeloc, count(distinct property_picture.id) as picture, property.hrsz as hrsz, property_address.property_district_id as district_id, property_address.name as address, property_address.property_address_suffix_id as suffix_id, property.livingroom as livingroom, property.usklivingroom as usklivingroom, property.bedroom1 as bedroom1, property.bedroom2 as bedroom2, property.bedroom3 as bedroom3, property.bedroom4 as bedroom4, property.bedroom5 as bedroom5, property.offical_size as size, property.property_sight_id as sight_id, property.property_floor_id as floor_id, property.property_lift_id as lift_id, property.property_heater_id as heater_id, process_property_selling.mandate as mandate, process_property_selling.expiration as expiration, property.flat as flat, property.building_outside as outside, property.building_inside as inside, process_property_selling.guide_price as price, user.name as agent, round(process_property_selling.guide_price/property.offical_size) as m2price, user.id as agent_id, dict_text.hu as note_hu, dict_text.en as note_en FROM property_address, process_property_selling INNER JOIN property ON process_property_selling.property_id = property.id and property.act = 'enabled' and process_property_selling.act = 'enabled' INNER JOIN user on process_property_selling.agent_user_id=user.id or process_property_selling.agent_user_id=0 left join property_picture on property_picture.property_id = property.id left join dict_text on dict_text.id=property.note where property.act = 'enabled' and process_property_selling.property_id = property.id and process_property_selling.act = 'enabled' and property_address.id = property.property_address_id $ps_where $ph_where $sql_where $tin_where $fws_sql group by property.id order by $orders "; */ $sqlhard=" SELECT property_kiado.id as id, property_kiado.primeloc as primeloc, view_picturenumbers.picturenumbers AS picture, property_kiado.hrsz as hrsz, property_address.property_district_id as district_id, property_address.name as address, property_address.property_address_suffix_id as suffix_id, property_kiado.livingroom as livingroom, property_kiado.usklivingroom as usklivingroom, property_kiado.bedroom1 as bedroom1, property_kiado.bedroom2 as bedroom2, property_kiado.bedroom3 as bedroom3, property_kiado.bedroom4 as bedroom4, property_kiado.bedroom5 as bedroom5, property_kiado.offical_size as size, property_kiado.property_sight_id as sight_id, property_kiado.property_floor_id as floor_id, property_kiado.property_lift_id as lift_id, property_kiado.property_heater_id as heater_id, property_kiado.balcony as balcony, property_kiado.terrace as terrace, process_property_selling_kiado.mandate as mandate, process_property_selling_kiado.expiration as expiration, property_kiado.flat as flat, property_kiado.building_outside as outside, property_kiado.building_inside as inside, process_property_selling_kiado.guide_price as price, process_property_selling_kiado.guide_price_eur as price_eur, process_property_selling_kiado.moment as moment, user.name as agent, round(process_property_selling_kiado.guide_price/property_kiado.offical_size) as m2price, user.id as agent_id, agency.id as agency_id, customer.id as cust_id, customer.phone as cust_phone, customer.mobil as cust_mobil, customer.type as cust_type, property_kiado.act as property_act FROM property_address, process_property_selling_kiado INNER JOIN property_kiado ON process_property_selling_kiado.property_id = property_kiado.id and property_kiado.act = 'enabled' and process_property_selling_kiado.act = 'enabled' LEFT JOIN customer ON customer.id = process_property_selling_kiado.owner_customer_id INNER JOIN user on process_property_selling_kiado.agent_user_id=user.id or process_property_selling_kiado.agent_user_id=0 LEFT JOIN view_picturenumbers ON view_picturenumbers.property_id = property_kiado.id LEFT JOIN dict_text ON dict_text.id=property_kiado.note LEFT JOIN agency ON agency.id=user.agency_id WHERE property_kiado.act = 'enabled' and process_property_selling_kiado.property_id = property_kiado.id and process_property_selling_kiado.act = 'enabled' and property_address.id = property_kiado.property_address_id and property_kiado.kiado = '1' $ps_where $ph_where $pf_where $sql_where $tin_where $fws_sql GROUP BY property_kiado.id ORDER BY $orders "; // and process_property_selling.agent_user_id = user.id # /* if($_SESSION['user_id']==199){ echo "
$sqlhard
"; } */ $res = my_query ($sqlhard); while ($row_prop = my_fetch_array ($res)) { //printf("Propid:%s agentid:%s", $row_prop['id'] ,$row_prop['agent_id']); $break = false; if ($_GET['agency_id']) if (! my_ff ("select count(*) from user where id = '$row_prop[agent_id]' and agency_id = '$_GET[agency_id]'")) $break = true; if (! $break) { /* if ($roomfull_min || $roomfull_max || $roomhalf) { $full = $half = 0; if ($row_prop['livingroom'] > 0 && $row_prop['livingroom'] < 99) $full++; if ($row_prop['usklivingroom'] > 0 && $row_prop['usklivingroom'] < 99) $full++; if ($row_prop['bedroom1'] > 0 && $row_prop['bedroom1'] < 99) $full++; if ($row_prop['bedroom2'] > 0 && $row_prop['bedroom2'] < 99) $full++; if ($row_prop['bedroom3'] > 0 && $row_prop['bedroom3'] < 99) $full++; if ($row_prop['bedroom4'] > 0 && $row_prop['bedroom4'] < 99) $full++; if ($row_prop['bedroom5'] > 0 && $row_prop['bedroom5'] < 99) $full++; } $full2 = $half2 = 0; if ($row_prop['livingroom'] > 0 && $row_prop['livingroom'] < 12) $half2++; elseif ($row_prop['livingroom'] >= 12) $full2++; if ($row_prop['usklivingroom'] > 0 && $row_prop['usklivingroom'] < 12) $half2++; elseif ($row_prop['usklivingroom'] >= 12) $full2++; if ($row_prop['bedroom1'] > 0 && $row_prop['bedroom1'] < 12) $half2++; elseif ($row_prop['bedroom1'] >= 12) $full2++; if ($row_prop['bedroom2'] > 0 && $row_prop['bedroom2'] < 12) $half2++; elseif ($row_prop['bedroom2'] >= 12) $full2++; if ($row_prop['bedroom3'] > 0 && $row_prop['bedroom3'] < 12) $half2++; elseif ($row_prop['bedroom3'] >= 12) $full2++; if ($row_prop['bedroom4'] > 0 && $row_prop['bedroom4'] < 12) $half2++; elseif ($row_prop['bedroom4'] >= 12) $full2++; if ($row_prop['bedroom5'] > 0 && $row_prop['bedroom5'] < 12) $half2++; elseif ($row_prop['bedroom5'] >= 12) $full2++; */ if ($roomfull_min || $roomfull_max || $roomhalf) { $full = $half = 0; if ($row_prop['livingroom'] > 0 && $row_prop['livingroom'] < 12) $half++; else if ($row_prop['livingroom'] >= 12) $full++; if ($row_prop['usklivingroom'] > 0 && $row_prop['usklivingroom'] < 12) $half++; else if ($row_prop['usklivingroom'] >= 12) $full++; if ($row_prop['bedroom1'] > 0 && $row_prop['bedroom1'] < 12) $half++; else if ($row_prop['bedroom1'] >= 12) $full++; if ($row_prop['bedroom2'] > 0 && $row_prop['bedroom2'] < 12) $half++; else if ($row_prop['bedroom2'] >= 12) $full++; if ($row_prop['bedroom3'] > 0 && $row_prop['bedroom3'] < 12) $half++; else if ($row_prop['bedroom3'] >= 12) $full++; if ($row_prop['bedroom4'] > 0 && $row_prop['bedroom4'] < 12) $half++; else if ($row_prop['bedroom4'] >= 12) $full++; if ($row_prop['bedroom5'] > 0 && $row_prop['bedroom5'] < 12) $half++; else if ($row_prop['bedroom5'] >= 12) $full++; if ($row_prop['bedroom6'] > 0 && $row_prop['bedroom6'] < 12) $half++; else if ($row_prop['bedroom6'] >= 12) $full++; if ($row_prop['bedroom7'] > 0 && $row_prop['bedroom7'] < 12) $half++; else if ($row_prop['bedroom7'] >= 12) $full++; if ($row_prop['bedroom8'] > 0 && $row_prop['bedroom8'] < 12) $half++; else if ($row_prop['bedroom8'] >= 12) $full++; if ($row_prop['bedroom9'] > 0 && $row_prop['bedroom9'] < 12) $half++; else if ($row_prop['bedroom9'] >= 12) $full++; if ($row_prop['bedroom10'] > 0 && $row_prop['bedroom10'] < 12) $half++; else if ($row_prop['bedroom10'] >= 12) $full++; } # //if (($roomfull_min+$roomhalf) <= ($full2+$half2)) if (($roomfull_min+$roomhalf) <= ($full+$half) && ($roomfull_max+$roomhalf) >= ($full+$half)) { $class = 2; $current_date = time (); // mod -> selling if (my_ff ("select count(*) from process_property_selling_kiado where property_id = '$row_prop[id]'") == 1) { $moment = my_ff ("select moment from process_property_selling_kiado where property_id = '$row_prop[id]'"); $reg_date = mktime ( substr ($moment, 11, 2), substr ($moment, 14, 2), substr ($moment, 17, 2), substr ($moment, 5, 2), substr ($moment, 8, 2) + $_SESSION['user_newitem_expire'], substr ($moment, 0, 4) ); if ($reg_date - $current_date > 0) $class = '_mod'; // mod=new } else { $sql_mom="select moment from process_property_selling_kiado where property_id = '$row_prop[id]' order by moment desc"; $moment = my_ff ($sql_mom); $mod_date = mktime ( substr ($moment, 11, 2), substr ($moment, 14, 2), substr ($moment, 17, 2), substr ($moment, 5, 2), substr ($moment, 8, 2) + $_SESSION['user_moditem_expire'], substr ($moment, 0, 4) ); //echo "mom:$moment ..... md:$mod_date ..... cd:$current_date
"; $sql_mom="select moment from process_property_selling_kiado where property_id = '$row_prop[id]' order by moment asc"; $moment = my_ff ($sql_mom); $reg_date = mktime ( substr ($moment, 11, 2), substr ($moment, 14, 2), substr ($moment, 17, 2), substr ($moment, 5, 2), substr ($moment, 8, 2) + $_SESSION['user_newitem_expire'], substr ($moment, 0, 4) ); if ($reg_date - $current_date > 0) { $class = '_mod'; // mod=new } else { if ($mod_date - $current_date > 0) $class = '_new'; // new=mod } } // date of expiration $moment = my_ff ("select expiration from process_property_selling_kiado where property_id = '$row_prop[id]' order by moment desc"); $reg_date = mktime ( substr ($moment, 11, 2), substr ($moment, 14, 2), substr ($moment, 17, 2), substr ($moment, 5, 2), substr ($moment, 8, 2) - 14, substr ($moment, 0, 4) ); $reg_date2 = mktime ( substr ($moment, 11, 2), substr ($moment, 14, 2), substr ($moment, 17, 2), substr ($moment, 5, 2), substr ($moment, 8, 2), substr ($moment, 0, 4) ); if ( my_ff("SELECT quality_selection FROM property WHERE id='$row_prop[id]'")=='1') $class='_good'; if ( my_ff("SELECT specialoffer FROM property WHERE id='$row_prop[id]'")=='1') $class='_spec'; if ($reg_date - $current_date <= 0) { // $class = '_end'; if ($reg_date2 - $current_date <= 0) { $class = '_wexp'; } } $ue=false;$us=false; $ue = ( is_user_boss($_SESSION['user_id']) || ($_SESSION['user_id']==$row_prop['agent_id']) || ($_SESSION['user_id']==68)) ? true : false; $ue=$ue || officeleadercanedit($row_prop['agent_id']); echo "\n"; ?>
> > > 0 && $row_prop['price_eur'] == 0){ ?> 0){ ?> 0 && $row_prop['price_eur'] > 0){ ?> > > > > 0){ $balcony = 'Van'; }else{ $balcony = 'Nincs'; } ?> > 0){ $terrace = 'Van'; }else{ $terrace = 'Nincs'; } ?> > '; mysql_free_result($res); ?>
Figyelem! Figyelem! Figyelem! Figyelem! Figyelem!

A sorrendbe állítás esetén felmerült hibát javítottam.

Nyomtatási nézet megnyitása
 
Mindet kijelöli
Bérleti díj Állapot Szerződés ideje Adminisztráció Prime Location
státusz
.   > > E > > E > > E > > E > > 0) echo "+$half" . "f"; ?>  > > > >- > Különleges ajánlat' : '' ?> kiemelten jó ingatlan' : '' ?> Szerkesztés' : '' ?> Megtekintés Belső adatok Megtekintése Rekord adatok' ?> Értékesítési adatok' : '' ?> Riport nyomtatása \"Törlés\" />
Nincs megjelenthető elem.
0 && $row_prop['livingroom'] < 12) $half++; elseif ($row_prop['livingroom'] >= 12) $full++; if ($row_prop['usklivingroom'] > 0 && $row_prop['usklivingroom'] < 12) $half++; elseif ($row_prop['usklivingroom'] >= 12) $full++; if ($row_prop['bedroom1'] > 0 && $row_prop['bedroom1'] < 12) $half++; elseif ($row_prop['bedroom1'] >= 12) $full++; if ($row_prop['bedroom2'] > 0 && $row_prop['bedroom2'] < 12) $half++; elseif ($row_prop['bedroom2'] >= 12) $full++; if ($row_prop['bedroom3'] > 0 && $row_prop['bedroom3'] < 12) $half++; elseif ($row_prop['bedroom3'] >= 12) $full++; if ($row_prop['bedroom4'] > 0 && $row_prop['bedroom4'] < 12) $half++; elseif ($row_prop['bedroom4'] >= 12) $full++; if ($row_prop['bedroom5'] > 0 && $row_prop['bedroom5'] < 12) $half++; elseif ($row_prop['bedroom5'] >= 12) $full++; }*/ ?>