"; $elvalaszt_2 = "

"; //print_r($_GET['szezon']); //print_r($_SERVER); if (($_GET['szezon'] == "tel") || ($_GET['szezon'] == "nyar")) { $session->set("szezon",$_GET['szezon']); } $where_s = ""; $where_akc = ""; if (($_GET['cmd'] == "kereses") && ($_GET['search'] != "")) { $search = $_GET['search']; $s_arr = explode(" ",$search); $i = 0; foreach ($s_arr as $s) { if ($s != "") { $and = ""; if ($i>0) { $and = " AND "; } $i++; $where_s .= " ".$and." (LOWER(a.cim) LIKE '%".strtolower($s)."%' OR LOWER(a.bevezeto) LIKE '%".strtolower($s)."%' OR LOWER(a.leiras) LIKE '%".strtolower($s)."%')"; $where_akc .= " ".$and." (LOWER(a.cim) LIKE '%".strtolower($s)."%' OR LOWER(a.leiras) LIKE '%".strtolower($s)."%')"; } } if ($i>0) $where_s = " AND (".$where_s.")"; else $where_s = ""; if ($i>0) $where_akc = " AND (".$where_akc.")"; else $where_akc = ""; } $ajanlat_idopont_tpl = "
Időpont:
#AJANLAT_DATUM#
"; if ($session->get("szezon") != "") { $where = ""; if ($_GET['orszag'] != "") { $where .= " AND orszag='".$_GET['orszag']."'"; if ($_GET['regio'] != "") { $where .= " AND regio='".$_GET['regio']."'"; if ($_GET['terulet'] != "") { $where .= " AND terulet='".$_GET['terulet']."'"; } } } $where .= " AND szezon='".$session->get("szezon")."'"; $where = $where.$where_s; $tplname = "main.html"; $maintpl = loadtemplate($tplname, './templates/'); $nagy_ajanlatboxtpl = loadtemplate("ajanlat_box_nagy.html", './templates/'); $ajanlatboxtpl = loadtemplate("ajanlat_box_kicsi.html", './templates/'); $nagy_akcioboxtpl = loadtemplate("akcio_box_nagy.html", './templates/'); $akcioboxtpl = loadtemplate("akcio_box_kicsi.html", './templates/'); $main_menuitem = loadtemplate("menuitem_main.html", './templates/'); $sub_menuitem = loadtemplate("menuitem_sub.html", './templates/'); $normal_menuitem = loadtemplate("menuitem_normal.html", './templates/'); $partnerektpl = loadtemplate("partnerek.html", './'); $temp_node = $session->get('open_nodes'); $open_nodes = $temp_node[$session->get('szezon')]; $t_content .= ""; //TOPMENU $ki_orszag = 0; $ki_regio = 0; $ki_terulet = 0; $sql_plus = ""; if ($_GET['t'] == "orszag") { $ki_orszag = $_GET['i']; $sql_plus = " AND sz_id='".$ki_orszag."' "; } if ($_GET['t'] == "regio") { $sql_t = "SELECT * FROM regio WHERE id='".$_GET['i']."'"; $rs_t = mysql_query($sql_t); $regio_t = mysql_fetch_assoc($rs_t); $ki_orszag = $regio_t['orszag_id']; $sql_plus = " AND sz_id='".$ki_orszag."' "; $ki_regio = $_GET['i']; } if ($_GET['t'] == "terulet") { $sql_t = "SELECT * FROM terulet WHERE id='".$_GET['i']."'"; $rs_t = mysql_query($sql_t); $regio_t = mysql_fetch_assoc($rs_t); $ki_orszag = $regio_t['orszag_id']; $sql_plus = " AND sz_id='".$ki_orszag."' "; $ki_regio = $regio_t['regio_id']; $ki_terulet = $_GET['i']; } if ($_GET['t'] == "ajanlat") { $sql_t = "SELECT * FROM ajanlat WHERE id='".$_GET['i']."'"; $rs_t = mysql_query($sql_t); $regio_t = mysql_fetch_assoc($rs_t); $ki_orszag = $regio_t['orszag_id']; $ki_regio = $regio_t['terulet_id']; $ki_ajanlat = $_GET['i']; $sql_plus = ""; } $top_menu_m = ""; $top_menu_s = ""; //$maintpl=str_replace('#CONTENT#',$t_content,$maintpl); $maintpl=str_replace('#MENU_MAIN#',$top_menu_m,$maintpl); $maintpl=str_replace('#MENU_SUB#',$top_menu_s,$maintpl); //$maintpl=str_replace('#MENU#',$t_content,$maintpl); $maintpl=str_replace('#MENU#',"
Banner
",$maintpl); if ($_GET['cmd'] == "") { $sql = "SELECT a.*, ak.szezon, ak.id AS akid FROM akcio a INNER JOIN akcio_kategoria ak ON a.kategoria=ak.id WHERE 1 AND ak.szezon = '".$session->get("szezon")."' AND (a.datumig='0000-00-00' OR (NOW() BETWEEN a.datumtol AND a.datumig)) AND a.aktiv='1' AND a.nyitora='1' ORDER BY sorrend_".$session->get("szezon")."_ny ASC"; $rs_kep = mysql_query($sql); $akciok = "
"; $akciok_in = ""; $akciok_in_2 = ""; while ($kep_arr = mysql_fetch_assoc($rs_kep)) { //$akciok_in = ""; $temp_aab = $nagy_akcioboxtpl; //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/akciok/small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_aab = str_replace('#OPTION#',"wmax=210",$temp_aab); } else { $temp_aab = str_replace('#OPTION#',"hmax=150",$temp_aab); } $temp_aab = str_replace('#WEBROOT#',getcwd(),$temp_aab); $temp_aab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_aab); $temp_aab = str_replace('#INDEX_PIC#',$kep_arr['indexkep'],$temp_aab); $temp_aab = str_replace('#AID#',$kep_arr['id'],$temp_aab); $temp_aab = str_replace('#AKID#',$kep_arr['akid'],$temp_aab); //$temp_aab = str_replace('#AKCIO_LEIRAS#',"Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_LEIRAS#',"
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_CIM#',$kep_arr['cim'],$temp_aab); /* $akciok_in_2 .= "

".$kep_arr['cim']."
Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."



".$kep_arr['leiras']."

";*/ $akciok_in .= $temp_aab; } //print $akciok_in; $akciok .= $akciok_in."
"; if ($akciok_in != "") { //$maintpl = str_replace('#CIM#',"Akcióinkból...",$maintpl); //$akciok .= $elvalaszt."

Ajánlatainkból...

"; } else { //$maintpl = str_replace('#CIM#',"Ajánlatainkból...",$maintpl); } //NAGY $sql = "SELECT a.*, o.nev, r.nev, t.nev FROM ((ajanlat a INNER JOIN regio r ON a.regio=r.id) INNER JOIN orszag o ON a.orszag=o.id) INNER JOIN terulet t ON a.terulet=t.id WHERE 1 AND a.frontend_kiemelt='1'"; $sql .= "AND (((a.datumtol = '0000-00-00 00:00:00') && (a.datumig = '0000-00-00 00:00:00')) || (NOW() > a.datumtol AND NOW() < a.datumig))"; $sql .= "AND kiemelt='1' AND aktiv='1' ".$where; $a = mysql_query($sql." ORDER BY sorrend"); $a_c = mysql_num_rows($a); $i=0; $ajanlatok_nagy = ""; while ($row = mysql_fetch_assoc($a)) { //print_r($row); $i++; $temp_ab = $nagy_ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } //$temp_ab = str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$temp_ab); $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['indexkep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_ab = str_replace('#OPTION#',"wmax=210",$temp_ab); } else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); } $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto'].$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok_nagy .= $temp_ab; } //kicsi $sql = "SELECT a.*, o.nev, r.nev, t.nev FROM ((ajanlat a INNER JOIN regio r ON a.regio=r.id) INNER JOIN orszag o ON a.orszag=o.id) INNER JOIN terulet t ON a.terulet=t.id WHERE 1 AND a.frontend_kiemelt='1'"; $sql .= "AND (((a.datumtol = '0000-00-00 00:00:00') && (a.datumig = '0000-00-00 00:00:00')) || (NOW() > a.datumtol AND NOW() < a.datumig))"; $sql .= "AND kiemelt='0' AND aktiv='1' ".$where; $a = mysql_query($sql." ORDER BY sorrend"); $a_c = mysql_num_rows($a); $i=0; $ajanlatok = ""; while ($row = mysql_fetch_assoc($a)) { $i++; $temp_ab = $ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_ab = str_replace('#OPTION#',"wmax=210",$temp_ab); } else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); } $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto']."
".$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok .= $temp_ab; } $maintpl = str_replace('#CIM#',"",$maintpl); $maintpl = str_replace('#CONTENT#',$akciok.$elvalaszt.$ajanlatok_nagy.$elvalaszt.$ajanlatok,$maintpl); } else { $cmd = $_GET['cmd']; $terulet_leiras_kiirva = 0; if ($cmd == "menu") { $sql = "SELECT * FROM ajanlat_rendezes_".$session->get("szezon")." WHERE sz_tipus='".$_GET['t']."' AND sz_id='".$_GET['i']."' ORDER BY rendezes ASC"; $rs = mysql_query($sql); $sql_plus = ""; if ($_GET['t'] == "orszag") { $sql_sz = "SELECT * FROM orszag WHERE id='".$_GET['i']."'"; $rs_sz = mysql_query($sql_sz); $r_sz = mysql_fetch_assoc($rs_sz); //$maintpl = str_replace('#CIM#',"Ajánlatok: ".$r_sz['nev'],$maintpl); $maintpl = str_replace('#CIM#',$r_sz['nev'],$maintpl); $sql_plus = " AND o.id='".$_GET['i']."'"; } elseif ($_GET['t'] == "regio") { $sql_sz = "SELECT * FROM regio WHERE id='".$_GET['i']."'"; $rs_sz = mysql_query($sql_sz); $r_sz = mysql_fetch_assoc($rs_sz); //$maintpl = str_replace('#CIM#',"Ajánlatok: ".$r_sz['nev'],$maintpl); $maintpl = str_replace('#CIM#',$r_sz['nev'],$maintpl); $sql_plus = " AND r.id='".$_GET['i']."'"; } elseif ($_GET['t'] == "terulet") { $sql_sz = "SELECT * FROM terulet WHERE id='".$_GET['i']."'"; $rs_sz = mysql_query($sql_sz); $r_sz = mysql_fetch_assoc($rs_sz); //$maintpl = str_replace('#CIM#',"Ajánlatok: ".$r_sz['nev'],$maintpl); $maintpl = str_replace('#CIM#',$r_sz['nev'],$maintpl); $sql_plus = " AND t.id='".$_GET['i']."'"; } $temp_str = ""; $rendezes = array(); while ($r = mysql_fetch_assoc($rs)) { $rendezes[$r['gy_id']] = $r['rendezes']; //print_R($rendezes); $r_sz2 = array(); $t = ""; if ($r['gy_tipus'] == "orszag") { $sql_sz = "SELECT * FROM orszag WHERE id='".$r['gy_id']."'"; $rs_sz = mysql_query($sql_sz); $r_sz2 = mysql_fetch_assoc($rs_sz); $t = "orszag"; $t2 = "ország"; } elseif ($r['gy_tipus'] == "regio") { $sql_sz = "SELECT * FROM regio WHERE id='".$r['gy_id']."'"; $rs_sz = mysql_query($sql_sz); $r_sz2 = mysql_fetch_assoc($rs_sz); $t = "regio"; $t2 = "régió"; } elseif ($r['gy_tipus'] == "terulet") { $sql_sz = "SELECT * FROM terulet WHERE id='".$r['gy_id']."'"; $rs_sz = mysql_query($sql_sz); $r_sz2 = mysql_fetch_assoc($rs_sz); $t = "terulet"; $t2 = "terület"; } if ($_GET['t'] == "terulet") { if ($terulet_leiras_kiirva == 0) { $terulet_leiras_kiirva = 1; $temp_str .= "
".$r_sz['leiras']."
"; } } else { if ($t != "") { $gyerek = ""; if ($_GET['t'] == "orszag") { $gyerek = "regio"; } if ($_GET['t'] == "regio") { $gyerek = "terulet"; } //$temp_str .= " bb "; //$temp_str .= "

- ".$r_sz2['nev']."

"; //$temp_str .= "
"; $temp_str .= "
"; $temp_str .= ""; if (file_exists("misc/".$gyerek."/".$r_sz2['id'].".jpg")) { $temp_str .= ""; } $temp_str .= ""; $temp_str .= ""; $temp_str .= "
".$r_sz2['nev']."
".$r_sz2['rovid_leiras']."
tovább »
"; //$temp_str .= " - ".$r_sz2['nev'].""; $temp_str .= "
"; //$temp_str .= "
"; } } } //kicsi $sql = "SELECT a.*, o.nev, r.nev, t.nev FROM ((ajanlat a LEFT JOIN ajanlat_rendezes_".$session->get("szezon")." rend ON a.id = rend.gy_id AND rend.gy_tipus = 'ajanlat') INNER JOIN regio r ON a.regio=r.id) INNER JOIN terulet t ON a.terulet=t.id, orszag o WHERE 1 AND a.orszag=o.id $sql_plus"; //$sql. = "AND (NOW() BETWEEN a.datumtol AND a.datumig) "; $sql .= " AND kiemelt='0' AND aktiv='1' ".$where." ORDER BY rend.rendezes ASC"; $a = mysql_query($sql); $a_c = mysql_num_rows($a); $i=0; $ajanlatok = ""; while ($row = mysql_fetch_assoc($a)) { $i++; $temp_ab = $ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } //$temp_ab = str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$temp_ab); $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_ab = str_replace('#OPTION#',"wmax=210",$temp_ab); } else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); } $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto']."
".$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok .= $temp_ab; } //NAGY $sql = "SELECT a.*, o.nev, r.nev, t.nev, rend.rendezes FROM ((ajanlat a LEFT JOIN ajanlat_rendezes_".$session->get("szezon")." rend ON a.id = rend.gy_id AND rend.gy_tipus = 'ajanlat') INNER JOIN regio r ON a.regio=r.id) INNER JOIN terulet t ON a.terulet=t.id, orszag o WHERE 1 AND a.orszag=o.id $sql_plus"; //$sql .= "AND (NOW() BETWEEN a.datumtol AND a.datumig)"; $sql .= " AND kiemelt='1' AND aktiv='1' ".$where." ORDER BY rend.rendezes ASC"; $a = mysql_query($sql); $a_c = mysql_num_rows($a); $i=0; $ajanlatok_nagy = ""; while ($row = mysql_fetch_assoc($a)) { //print_r($row); $i++; $temp_ab = $nagy_ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } //$temp_ab = str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$temp_ab); $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); //if ($t_width >= $t_height) { // $temp_ab = str_replace('#OPTION#',"wmax=200",$temp_ab); //} //else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); //} $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto'].$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok_nagy .= $temp_ab; } if ($_GET['t'] == "terulet") { $maintpl = str_replace('#CONTENT#',$temp_str."".$ajanlatok_nagy.$elvalaszt.$ajanlatok,$maintpl); } else { $maintpl = str_replace('#CONTENT#',$temp_str."",$maintpl); } } if ($cmd == "informaciok") { if (intval($_GET['info_id']) == 0) { $sql_infocim = "SELECT * FROM informacio WHERE 1 AND szezon_".$session->get("szezon")."='1' AND aktiv='1'"; $rs_infocim = mysql_query($sql_infocim); $info = "
"; $info_no = "Nincs aktuális info"; $info_in = ""; while ($info_arr = mysql_fetch_assoc($rs_infocim)) { $info_no = ""; //$info_in .= "

- ".$info_arr['cim']."

"; $info_in .= "
"; $info_in .= ""; if (file_exists("misc/informacio/".$info_arr['id'].".jpg")) { $info_in .= ""; } $info_in .= ""; $info_in .= ""; $info_in .= "
".$info_arr['cim']."tovább »
"; } $info .= $info_no.$info_in."
"; $maintpl = str_replace('#CIM#',"Információk",$maintpl); $maintpl = str_replace('#CONTENT#',"
".$info."
",$maintpl); } else { $sql_info = "SELECT * FROM informacio WHERE 1 AND szezon_".$session->get("szezon")."='1' AND aktiv='1' AND id='".$_GET['info_id']."'"; $rs_info = mysql_query($sql_info); $info = "
"; $info_cim = ""; $info_no = "Nincs aktuális info"; $info_in = ""; if ($info_arr = mysql_fetch_assoc($rs_info)) { $info_no = ""; $info_cim = $info_arr['cim']; $info_in .= $info_arr['info']; } $info .= $info_no.$info_in."
"; $maintpl = str_replace('#CIM#',$info_cim,$maintpl); $maintpl = str_replace('#CONTENT#',"
".$info."
",$maintpl); } //$content = file_get_contents("a-d-m-i-n/informaciok/informaciok_".$session->get("szezon").".html"); } elseif ($cmd == "ajanlat") { $sql_aa = "SELECT * FROM ajanlat WHERE id='".$_GET['aid']."'"; $aa = array(); $r_aa = mysql_query($sql_aa); $aa = mysql_fetch_assoc($r_aa); $cim = "

".$aa['cim']."

"; $cim2 = $aa['cim']; $bevezeto = "
".$aa['bevezeto']."
"; $leiras = $aa['leiras']; $bevezeto2 = strip_tags($aa['bevezeto']); $kepek = ""; $ifiles = scandir("a-d-m-i-n/ajanlatok/ajanlat_".$_GET['aid']."/normal/"); $kepek .= "
"; if (sizeof($ifiles) > 0) { $ccc = 0; $kepek .= ""; for ($i=0;$i"; //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$_GET['aid']."/small/".$ifiles[$i]); if (intval($t_width) >= 188) { $kepek .= ""; } else { $kepek .= ""; } $kepek .= ""; if ($ccc % 3 == 0) { $kepek .= ""; } } } if ($ccc % 3 != 0) { for ($j=0;$j<($ccc % 3);$j++) { $kepek .= ""; } $kepek .= ""; } $kepek .= "
 
"; } $kepek .= "
"; $cont = "
".str_replace("userfiles", "a-d-m-i-n/userfiles/", $cont)."
"; $maintpl = str_replace('#CIM#',"",$maintpl); $maintpl = str_replace('#CIM2#',"$cim2",$maintpl); $maintpl = str_replace('#BEVEZETO2#',"$bevezeto2",$maintpl); $maintpl = str_replace('#CONTENT#',$cim."
"."
".$bevezeto."
".$kepek."
".$leiras."


",$maintpl); } elseif ($cmd == "akciok") { if (intval($_GET['akcio_kategoria']) == 0) { $sql_kat = "SELECT * FROM akcio_kategoria WHERE 1 AND (datumig='0000-00-00' OR (NOW() BETWEEN datumtol AND datumig)) AND szezon='".$session->get("szezon")."' AND aktiv='1' ORDER BY sorrend ASC"; $rs_kat = mysql_query($sql_kat); $akciok = "
"; $akciok_no = "Nincs aktuális akciókategória"; $akciok_in = ""; while ($kat_arr = mysql_fetch_assoc($rs_kat)) { $akciok_no = ""; $akciok_in .= "
"; $akciok_in .= ""; $akciok_in .= ""; $akciok_in .= ""; $akciok_in .= "
".$kat_arr['nev']."
".$kat_arr['leiras']."
Tovább »
"; $akciok_in .= "
"; } $akciok .= $akciok_no.$akciok_in."
"; $maintpl = str_replace('#CIM#',"",$maintpl); $maintpl = str_replace('#CONTENT#',$akciok,$maintpl); } else { $sql = "SELECT a.*, ak.szezon FROM akcio a INNER JOIN akcio_kategoria ak ON a.kategoria=ak.id WHERE 1 AND ak.szezon = '".$session->get("szezon")."' AND ak.id='".intval($_GET['akcio_kategoria'])."' AND (a.datumig='0000-00-00' OR (NOW() BETWEEN a.datumtol AND a.datumig)) AND a.aktiv='1' ORDER BY kateg_sorrend ASC"; $rs_kep = mysql_query($sql); $akciok = "
"; $akciok_in = "Nincs aktuális akció"; $akciok_in_2 = ""; while ($kep_arr = mysql_fetch_assoc($rs_kep)) { $akciok_in = ""; $temp_aab = $nagy_akcioboxtpl; $temp_aab = str_replace('#WEBROOT#',getcwd(),$temp_aab); list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/akciok/small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_aab = str_replace('#OPTION#',"wmax=210",$temp_aab); } else { $temp_aab = str_replace('#OPTION#',"hmax=150",$temp_aab); } $temp_aab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_aab); $temp_aab = str_replace('#INDEX_PIC#',$kep_arr['indexkep'],$temp_aab); $temp_aab = str_replace('#AID#',$kep_arr['id'],$temp_aab); $temp_aab = str_replace('#AKID#',$_GET['akcio_kategoria'],$temp_aab); //$temp_aab = str_replace('#AKCIO_LEIRAS#',"Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_LEIRAS#',"
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_CIM#',$kep_arr['cim'],$temp_aab); $akciok_in_2 .= $temp_aab; /*$akciok_in_2 .= "

".$kep_arr['cim']."
Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."



".$kep_arr['leiras']."

";*/ } $akciok .= $akciok_in_2.$akciok_in."
"; $maintpl = str_replace('#CIM#',"",$maintpl); $maintpl = str_replace('#CONTENT#',$akciok,$maintpl); } } elseif ($cmd == "akcio") { $sql = "SELECT a.*, ak.szezon FROM akcio a INNER JOIN akcio_kategoria ak ON a.kategoria=ak.id WHERE 1 AND ak.szezon = '".$session->get("szezon")."' AND ak.id='".intval($_GET['akcio_kategoria'])."' AND (a.datumig='0000-00-00' OR (NOW() BETWEEN a.datumtol AND a.datumig)) AND a.aktiv='1' AND a.id='".$_GET['aid']."'"; $rs_kep = mysql_query($sql); $akciok = "
"; $akciok_in = "Nincs ilyen akció"; $akciok_in_2 = ""; if ($kep_arr = mysql_fetch_assoc($rs_kep)) { $akciok_in = ""; $maintpl = str_replace('#CIM#',$kep_arr['cim'],$maintpl); /*$akciok_in_2 .= "

Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."



".$kep_arr['leiras']."
".$kep_arr['leiras_hosszu']."

Az akcióhoz tartozó további képek:

";*/ $akciok_in_2 .= "



".$kep_arr['leiras']."
".$kep_arr['leiras_hosszu']."

Az akcióhoz tartozó további képek:

"; $akcio_kepek .= ""; $sql_tk = "SELECT * FROM akcio_kep WHERE akcio_id='".$kep_arr['id']."' ORDER BY sorrend"; $rs_tk = mysql_query($sql_tk); $tovabbi_kepek = ""; while ($tk = mysql_fetch_assoc($rs_tk)) { $ccc++; if ($ccc % 3 == 1) { $akcio_kepek .= ""; } $akcio_kepek .= ""; if ($ccc % 3 == 0) { $akcio_kepek .= ""; } } if ($ccc % 3 != 0) { for ($j=0;$j<($ccc % 3);$j++) { $akcio_kepek .= ""; } $akcio_kepek .= ""; } $akcio_kepek .= "
 
"; $akciok_in_2 .= $akcio_kepek; $akciok_in_2 .= "
"; } $akciok .= $akciok_in_2.$akciok_in."
"; $maintpl = str_replace('#CONTENT#',$akciok,$maintpl); } elseif ($cmd == "kereses") { //kicsi $sql = "SELECT a.*, o.nev, r.nev, t.nev FROM ((ajanlat a LEFT JOIN ajanlat_rendezes_".$session->get("szezon")." rend ON a.id = rend.gy_id AND rend.gy_tipus = 'ajanlat') INNER JOIN regio r ON a.regio=r.id) INNER JOIN terulet t ON a.terulet=t.id, orszag o WHERE 1 AND a.orszag=o.id $sql_plus"; //$sql. = "AND (NOW() BETWEEN a.datumtol AND a.datumig) "; $sql .= " AND kiemelt='0' AND aktiv='1' ".$where." ORDER BY rend.rendezes ASC"; $a = mysql_query($sql); $a_c = mysql_num_rows($a); $i=0; $ajanlatok = ""; while ($row = mysql_fetch_assoc($a)) { $i++; $temp_ab = $ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } //$temp_ab = str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$temp_ab); $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_ab = str_replace('#OPTION#',"wmax=210",$temp_ab); } else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); } $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto']."
".$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok .= $temp_ab; } //NAGY $sql = "SELECT a.*, o.nev, r.nev, t.nev, rend.rendezes FROM ((ajanlat a LEFT JOIN ajanlat_rendezes_".$session->get("szezon")." rend ON a.id = rend.gy_id AND rend.gy_tipus = 'ajanlat') INNER JOIN regio r ON a.regio=r.id) INNER JOIN terulet t ON a.terulet=t.id, orszag o WHERE 1 AND a.orszag=o.id $sql_plus"; //$sql .= "AND (NOW() BETWEEN a.datumtol AND a.datumig)"; $sql .= " AND kiemelt='1' AND aktiv='1' ".$where." ORDER BY rend.rendezes ASC"; $a = mysql_query($sql); $a_c = mysql_num_rows($a); $i=0; $ajanlatok_nagy = ""; while ($row = mysql_fetch_assoc($a)) { //print_r($row); $i++; $temp_ab = $nagy_ajanlatboxtpl; $ajanlat_idopont_tpl_c = $ajanlat_idopont_tpl; if ($row['idotartamok'] != "") { $temp_ab = str_replace('#AJANLAT_DATUM#',str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$ajanlat_idopont_tpl_c),$temp_ab); } else { $temp_ab = str_replace('#AJANLAT_DATUM#',"",$temp_ab); } //$temp_ab = str_replace('#AJANLAT_DATUM#',$row['idotartamok']." ",$temp_ab); $temp_ab = str_replace('#AJANLAT_CIM#',$row['cim'],$temp_ab); $tulajdonsagok = ""; $sql_tul = "SELECT * FROM `ajanlat_parameter` WHERE ajanlat_id='".$row['id']."'"; $at = mysql_query($sql_tul); while ($row_t = mysql_fetch_assoc($at)) { $tulajdonsagok .= " - ".$row_t['nev'].": ".$row_t['ertek']."
"; } $sql = "SELECT kep FROM ajanlat_default_pic WHERE ajanlat_id='".$row['id']."'"; $rs_kep = mysql_query($sql); $kep_arr = mysql_fetch_assoc($rs_kep); $temp_ab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_ab); //wmax=210 //hmax=150 list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/ajanlatok/ajanlat_".$row['id']."/"."small/".$kep_arr['kep']); //if ($t_width >= $t_height) { // $temp_ab = str_replace('#OPTION#',"wmax=200",$temp_ab); //} //else { $temp_ab = str_replace('#OPTION#',"hmax=150",$temp_ab); //} $temp_ab = str_replace('#WEBROOT#',getcwd(),$temp_ab); $temp_ab = str_replace('#AJANLAT_LEIRAS#',$row['bevezeto'].$tulajdonsagok,$temp_ab); $temp_ab = str_replace('#AID#',$row['id'],$temp_ab); $ajanlatok_nagy .= $temp_ab; } //akciok $sql = "SELECT a.*, ak.szezon FROM akcio a INNER JOIN akcio_kategoria ak ON a.kategoria=ak.id WHERE 1 AND ak.szezon = '".$session->get("szezon")."' AND (a.datumig='0000-00-00' OR (NOW() BETWEEN a.datumtol AND a.datumig)) AND a.aktiv='1' ".$where_akc." ORDER BY kateg_sorrend ASC"; $rs_kep = mysql_query($sql); //$akciok = "
"; $akciok_in = ""; $akciok_in_2 = ""; while ($kep_arr = mysql_fetch_assoc($rs_kep)) { $akciok_in = ""; $temp_aab = $nagy_akcioboxtpl; $temp_aab = str_replace('#WEBROOT#',getcwd(),$temp_aab); list($t_width, $t_height, $t_type, $t_attr) = getimagesize("a-d-m-i-n/akciok/small/".$kep_arr['kep']); if ($t_width >= $t_height) { $temp_aab = str_replace('#OPTION#',"wmax=210",$temp_aab); } else { $temp_aab = str_replace('#OPTION#',"hmax=150",$temp_aab); } $temp_aab = str_replace('#DEFAULT_PIC#',$kep_arr['kep'],$temp_aab); $temp_aab = str_replace('#INDEX_PIC#',$kep_arr['indexkep'],$temp_aab); $temp_aab = str_replace('#AID#',$kep_arr['id'],$temp_aab); $temp_aab = str_replace('#AKID#',$_GET['akcio_kategoria'],$temp_aab); //$temp_aab = str_replace('#AKCIO_LEIRAS#',"Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_LEIRAS#',"
".substr($kep_arr['leiras'],0,620)."...
",$temp_aab); $temp_aab = str_replace('#AKCIO_CIM#',$kep_arr['cim'],$temp_aab); $akciok_in_2 .= $temp_aab; /*$akciok_in_2 .= "

".$kep_arr['cim']."
Akció időtartama: ".$kep_arr['datumtol']." - ".$kep_arr['datumig']."



".$kep_arr['leiras']."

";*/ } $akciok .= $akciok_in_2.$akciok_in; //$akciok .= "
"; $maintpl = str_replace('#CIM#',"Keresés az ajánlatok és az akciók között: ".$search."",$maintpl); $maintpl = str_replace('#CONTENT#',$temp_str."".((($ajanlatok_nagy == "") && ($ajanlatok == ""))?"

Nincs a keresésnek megfelelő ajánlat":"

Találatok az ajánlataink között

").$ajanlatok_nagy.(($ajanlatok_nagy == "")?"":$elvalaszt_2).$ajanlatok.(($ajanlatok == "")?"":$elvalaszt_2).(($akciok == "")?"

Nincs a keresésnek megfelelő akció":"

Találatok az AKCIÓK között

").$akciok,$maintpl); } } $maintpl = str_replace('#SEARCH#',$search,$maintpl); $maintpl = str_replace('#SZEZON#',$session->get("szezon"),$maintpl); //$maintpl = str_replace('#CONTENT#',$out,$maintpl); } else { $tplname = "landing.html"; $maintpl = loadtemplate($tplname, './templates/'); $sql = "SELECT * FROM nyito_szoveg WHERE aktiv='1'"; $nyito = array(); $rs = mysql_query($sql); $nyito = mysql_fetch_assoc($rs); $maintpl = str_replace('#LANDING_TITLE#',(($nyito['title_chk']=="1")?$nyito['title']:""),$maintpl); $maintpl = str_replace('#LANDING_CONTENT#',(($nyito['content_chk']=="1")?$nyito['content']:""),$maintpl); } if ($_GET['uc'] != "") { $tplname = "under_construction.html"; $maintpl = loadtemplate($tplname, './templates/'); } $maintpl = str_replace('#BASEURL#',BASEURL,$maintpl); if ($session->get("szezon") == "nyar") { $masikszezon_link = "tel"; $masikszezon_text = "téli"; } else { $masikszezon_link = "nyar"; $masikszezon_text = "nyári"; } $maintpl = str_replace('#BASEURL#',BASEURL,$maintpl); $maintpl = str_replace('#MASIKSZEZON_LINK#',$masikszezon_link,$maintpl); $maintpl = str_replace('#MASIKSZEZON_TEXT#',$masikszezon_text,$maintpl); $maintpl = str_replace('#BASEURL#',BASEURL,$maintpl); //partnerek if (SITE == "live") { $maintpl = str_replace('#PARTNEREK#',$partnerektpl,$maintpl); } else { $maintpl = str_replace('#PARTNEREK#',"",$maintpl); } if (!isset($cim2)) { $maintpl = str_replace('#CIM2#', 'Üdülés - apartmanok - szállodák - akció - last minute - wellness -', $maintpl); $maintpl = str_replace('#BEVEZETO2#', '', $maintpl); } print $maintpl; if (strstr($_SERVER['HTTP_HOST'], "localhost")) { print "
"; print_pre($_COOKIE); print_pre($_REQUEST); print_pre($_SESSION); print_pre($_SERVER); print "
"; } ?>