"); } // δημιουργία timestamp για κάθε πιθανή χρήση $_SESSION[nowtime]=time()+$time_difference; $_SESSION[timelogedin]=$_SESSION[timelogedin]?$_SESSION[timelogedin]:$_SESSION[nowtime]; $_SESSION[lang]=$_SESSION[lang]?$_SESSION[lang]:"el"; // includes include($path.'database.php'); include($path.'functions.php'); $_SESSION[banner_off]=$_SESSION[banner_off]?$_SESSION[banner_off]:0; if($_GET[lang]){if(in_array($_GET[lang],$languages)){$_SESSION[lang]=$_GET[lang];}} $_SESSION[lang]=$_SESSION[lang]?$_SESSION[lang]:$languages[1]; $sel="select var as varr,text_".$_SESSION[lang]." as text from languages"; $res=mysql_db_query($dbase,$sel,$link); while($row=mysql_fetch_array($res)){define("$row[varr]","$row[varr]");$langg[$row[varr]]=nl2br($row[text]);} // αρχικοποιήσεις $_SESSION[fontsize]=$_SESSION[fontsize]?$_SESSION[fontsize]:"11"; $_SESSION[css]=$_GET[css]?$_GET[css].".css":($_SESSION[css]?$_SESSION[css]:"style1.css"); $path=$path?$path:"./"; $_SESSION[path]=$path; $imgpath=$path.$imgpath; $picturedirectory=ltrim($picturedirectory,"./"); $mainpicture=$path."images/main_pic.jpg"; $bodyonload=""; $googlemapextra=""; $picsjava=""; $javaexecute=""; $jquery=""; $extracss=""; $_SESSION[shothumb]=$_SESSION[shothumb]?$_SESSION[shothumb]:'on'; include($path.'loginform.php'); // καταμέτρηση Online χρηστών include_once($path."usersOnline.class.php"); $visitors_online = new usersOnline(); // επιλεγμένη γλώσσα // δημιουργία πίνακα $langg με όλες τις μεταφράσεις $sel="select var as varr,text_".$_SESSION[lang]." as text from languages_orders"; $res=mysql_db_query($dbase,$sel,$link); while($row=mysql_fetch_array($res)){define("$row[varr]","$row[varr]");$langg[$row[varr]]="$row[text]";} if($_POST[add]){ $error=addToCart($_POST[add]); } // βήματα παραγγελιών if($_GET[c]==1){$_SESSION[orderstep]=1;} if($_SESSION[orderstep]==1){ if($_SESSION[sitelogedid]){ $_SESSION[orderstep]=2; } } if($_GET[c]==2){$_SESSION[orderstep]=0;} // αποσύνδεση χρήστη if($_GET[logout]){ unset($_SESSION[siteloged]); unset($_SESSION[sitelogedemail]); unset($_SESSION[sitelogedid]); unset($_SESSION[reloaded]); unset($_SESSION[sitelogedname]); $_SESSION[sitelogedrights]="5"; } if(!isset($_SESSION[sitelogedrights])){ $_SESSION[sitelogedrights]="5"; } /* $quicksms_hide=1; $newsletter_hide=0; */ if($_POST[newsletter]){ $newsletter=1; if(checkEmail($_POST[email])){ /*require_once($path."class.captcha_x1.php");$captcha1 = &new captcha_x1 (); if (!$captcha1->validate($_POST['captcha1'])) { $newsletter_added=3; } else { */ $newsletter_added=1; $timeonline=time()+$time_difference-$_SESSION[timelogedin]; $minutes = (int) ( $timeonline/ 60 ); $seconds = $timeonline % 60; $subject="New email submited for newsletter"; $html_body="

Ο επισκέπτης με email ".$_POST[email]." ζήτησε να προστεθεί το email του στη λίστα παραληπτών της newsletter.

Ο επισκέπτης επισκέφθηκε τη σελίδα από την ip ".$_SERVER['REMOTE_ADDR'].".

"; include_once($path."emails/sendemail.php"); if($html_body){ $res=sendemail_html($email_sender_name,$email_sender,$subject,$html_body,$_POST[email]); } if($res){ $newsletter_error=0; } else { $newsletter_error=$langg[newslet_failed]; } /*}*/ } else { $newsletter_error=$langg[newslet_failed_novalidemail]; } if($newsletter_error){ $newsletter_alert="

".$newsletter_error."

"; } else { $newsletter_alert="

".str_replace('',$_POST[email],$langg[newslet_success])."

"; } } // αυτόματη μεταφορά στο σωστό path για οποιοδήποτε νέο ($id) έρθει κατ' ευθείαν στη σελίδα // χρήσιμο για links προς νέα από την αρχική σελίδα ή από άλλο σύνδεσμο if($_GET[id]){ $sel="select type,subtype from articles where id='$_GET[id]'"; $res=mysql_db_query($dbase,$sel,$link); //print($sel); while($row=mysql_fetch_array($res)){ if($row[type]==5){ //$menu=$row[subtype]; $newpath=parent($row[subtype]); die(" "); } } } // δημιουργία μενού επιλογών και καθορισμού ενεργής σελίδας $sel="select id from menu where level=1 and categoryid=2"; $res=mysql_db_query($dbase,$sel,$link); while($row=mysql_fetch_array($res)){ //idslist.=$row[id].","; } if(is_array($_GET[sm])){ foreach($_GET[sm] as $key=>$value){ $idslist.=$value.","; } } else { //$idslist=0;//$start_menu_id; $firstpage=1; } $mainmenus=0; $idslist=rtrim($idslist,","); $idslist=$idslist?$idslist:$start_menu_id; $sel=" select menu.*, articles.title_".$_SESSION[lang]." as title, articles.subtitle_".$_SESSION[lang]." as subtitle, articles.shorttext_".$_SESSION[lang]." as shorttext, pictures.id as pic, pictures.safename as picsafename from menu,articles left join pictures on (pictures.articleid=articles.id and pictures.type=1 and pictureorder=1) where ((masterid=0)||(masterid in (".$idslist."))) and menu.active_".$_SESSION[lang]."=1 and menu.readrights>='".$_SESSION[sitelogedrights]."' and articles.id=menu.articleid order by categoryid,level,menuorder"; $res=mysql_db_query($dbase,$sel,$link); //print($sel); $topmenucount=0; while($row=mysql_fetch_array($res)){ if(substr($row[page],0,4)=='http'){ $linkk=str_replace("[lang]",$_SESSION[lang],$row[page]); } else { $linkk=""; } $titlefield='title_'.$_SESSION[lang]; $countt[$row[categoryid]]++; switch($row[categoryid]){ case 1: $mbcount[$row[categoryid]]++; if(is_array($_GET[sm])){ if($row[id]==$_GET[sm][$row[level]]){ if($row[level]==1){ $nowTitle="

".$row[title]."

"; } $selected="selected"; if(is_array($pagenow)){ if($pagenow[level]<$row[level]){ $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $selected=""; } } else { if($row[id]==$start_menu_id){ $selected="selected"; if($row[level]==1){ $nowTitle="

".$row[title]."

"; } } else { $selected=""; } } //$sb="<".$row[id].">"; $usedids[$row[id]]=1; $spanclass=""; if($row[level]==1){ if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[id]."/"; } $menu[$row[categoryid]].="
  • ".$row[$titlefield]."
  • "; //$sb $footmenu[$row[categoryid]].="
  • ".$row[$titlefield]."
  • "; //$sb if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } $mainmenus++; } else { $parent=parent($row[masterid])."/"; if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[id]."/"; } $mainsubmenu.="
  • ".$row[$titlefield]."
  • "; if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } } if($row[masterid]==$pagenow[id]){ if(!$pagemenuu[$row[level]]){ $pagemenuu[$row[level]]=1; $pagemenu=""; } $pagemenu.="
  • ".(is_file($path.$picturedirectory."/s/s_".$row[pic]."_".$row[picsafename].".jpg")?"":"")."
    $row[$titlefield]
  • "; } break; case 2; default: $mbcount[$row[categoryid]]++; if(is_array($_GET[sm])){ if($row[id]==$_GET[sm][$row[level]]){ if($row[level]==1){ $nowTitle="

    ".$row[title]."

    "; } $selected="selected"; $sb="<".$row[id].">"; $usedids[$row[id]]=1; if(is_array($pagenow)){ if($pagenow[level]<$row[level]){ $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $selected=""; $sb=""; } } else { if($row[id]==$start_menu_id){ $selected="selected"; if($row[level]==1){ $nowTitle="

    ".$row[title]."

    "; } } else { $selected=""; } } $sb="<".$row[id].">"; $usedids[$row[id]]=1; if($row[level]==1){ if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[id]."/"; } $menu[$row[categoryid]].="
  • ".$row[$titlefield]."$sb
  • "; if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } } else { $parent=parent($row[masterid])."/"; if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[id]."/"; } $submenu[$row[masterid]].="
  • ".$row[$titlefield]."
  • "; if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } } if($row[masterid]==$pagenow[id]){ if(!$pagemenuu[$row[level]]){ $pagemenuu[$row[level]]=1; $pagemenu=""; } $pagemenu.="
  • $row[$titlefield]
  • "; } break; case 3: $mbcount[$row[categoryid]]++; if(is_array($_GET[sm])){ if($row[id]==$_GET[sm][$row[level]]){ if($row[level]==1){ $nowTitle="

    ".$row[title]."

    "; } $selected="selected"; if(is_array($pagenow)){ if($pagenow[level]<$row[level]){ $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $pagenow[level]=$row[level]; $pagenow[id]=$row[id]; $pagenow[articleid]=$row[articleid]; $pagenow[page]=$row[page]; $pagenow[haschilds]=$row[haschilds]; $pagenow[vars]=$row[vars]?$row[vars]:$pagenow[vars]; $metatitle=$row['metatitle_'.$_SESSION[lang]]; $metakeywords=$row['metakeywords_'.$_SESSION[lang]]; $metadescription=$row['metadescription_'.$_SESSION[lang]]; } } else { $selected=""; } } else { if($row[id]==$start_menu_id){ $selected="selected"; if($row[level]==1){ $nowTitle="

    ".$row[title]."

    "; } } else { $selected=""; } } //$sb="<".$row[id].">"; $usedids[$row[id]]=1; $spanclass=""; if($row[level]==1){ if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$row[id]."/"; } $menu[$row[categoryid]].="
  • ".$row[title]."".$row[shorttext]."
  • "; //$sb $sidemenu[$row[categoryid]].="
  • ".$row[title]."".$row[shorttext]."
  • "; //$sb if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } $mainmenus++; } else { $parent=parent($row[masterid])."/"; if($row[directory]){ $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[directory]."/"; } else { $linkk=$linkk?$linkk:$path.$_SESSION[lang]."/".$parent.$row[id]."/"; } $mainsubmenu.="
  • ".$row[$titlefield]."
  • "; if($selected){ $youarehere[$row[level]]="".$row[$titlefield]." "; } } if($row[masterid]==$pagenow[id]){ if(!$pagemenuu[$row[level]]){ $pagemenuu[$row[level]]=1; $pagemenu=""; } $pagemenu.="
  • ".(is_file($path.$picturedirectory."/s/s_".$row[pic]."_".$row[picsafename].".jpg")?"":"")."
    $row[$titlefield]
  • "; } break; } } foreach($menu as $key=>$value){ $bottommenu[$key]=$value; } $inside_menu=""; if(is_array($menu)){ if(is_array($submenu)){ foreach($submenu as $key=>$value){ if($value){ if($key==$_GET[sm][1]){ //$inside_menu="
     
     
    "; } foreach($menu as $catid=>$menus){ $menu[$catid]=str_replace("<".$key.">","",$menus); $bottommenu[$catid]=str_replace("<".$key.">","",$bottommenu[$catid]); unset($usedids[$key]); } } } } if(is_array($usedids)){ foreach($usedids as $key=>$value){ foreach($menu as $catid=>$menus){ $menu[$catid]=str_replace("<".$key.">","",$menus); $bottommenu[$catid]=str_replace("<".$key.">","",$bottommenu[$catid]); } } } /*$menu[1]=""; $menu[2]=""; $menu[3]=""; $menu[4]=""; $menu[5]=""; */ } if($mainsubmenu){ $mainsubmenu=""; } $inside_menu=$inside_menu?$inside_menu:"
     
    "; if($pagemenu){ $pagemenu=""; } if(is_array($youarehere)){ if($_GET[w]){ $eles=count($youarehere); } else { $eles=count($youarehere)-1; } if($eles>0){ for($x=1;$x<=$eles;$x++){ $youare.=$youarehere[$x]; } } } // παρουσίαση επιλεγμένου άρθρου ή επιλεγμένης php σελίδας if(!$pagenow[id]){ if(($_GET[arid])&&(!$_GET[p])){ $articleid=$_GET[arid]; include($path."showarticle.php"); } else { $sel="select * from menu where id='$start_menu_id'"; $res=mysql_db_query($dbase,$sel,$link); //print($sel); while($row=mysql_fetch_array($res)){ $pagenow=$row; } } } if(is_array($pagenow)){ if($pagenow[vars]){ $vars=explode("&",$pagenow[vars]); foreach($vars as $key=>$value){ $var=explode("=",$value); $$var[0]=$var[1]; } } if($pagenow[articleid]){ $articleid=$_GET[arid]?$_GET[arid]:$pagenow[articleid]; include($path."showarticle.php"); } if($pagenow[haschilds]){ $type=5; $subtype=$pagenow[id]; include($path.$records_php[$pagenow[haschilds]].".php"); } if($pagenow[page]){ if(substr($pagenow[page],0,4)!='http'){ include($path.$pagenow[page].".php"); } } } if($youare){ $youare="

    ".str_replace("|",">",rtrim($youare,"| "))."

    "; } // ενημέρωση meta tags if(!$metatitle){ $metatitle=$meta['title_'.$_SESSION[lang]]; } if(!$metakeywords){ $metakeywords=$meta['keywords_'.$_SESSION[lang]]; } if(!$metadescription){ $metadescription=$meta['description_'.$_SESSION[lang]]; } // προβολής σελίδας προϊόντος if($_GET[w]){include($path."showproduct.php");} // προβολή υπομενού μέσα στη σελίδα αν το περιεχόμενο της σελίδας είναι ανύπαρκτο if(strlen($pagedata)<30){ //$pagedata=$pagemenu; } if($roomsmenu==1){ $jquery.=" $('li.rooms').addClass('selected'); "; } ?> <?print($metatitle);?> ".$javaexecute." "); } ?>
    previous next "); } ?>
    ":"");?>

    ".$row[title]."

    ".$row[shorttext]."

    "); } } */ print("

    ".$langg[offers_title]."

    "); ?>
    ">