ΚΑΦΟΥΣΗ - ΔΑΠΕΔΟ - ΜΠΑΝΙΟ - ΚΟΥΖΙΝΑ - ΝΤΟΥΛΑΠΑ"; $txt1['en'] = "ΚΑΦΟΥΣΗ - ΔΑΠΕΔΟ - ΜΠΑΝΙΟ - ΚΟΥΖΙΝΑ - ΝΤΟΥΛΑΠΑ"; $txt2['gr'] = "

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές. Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές. Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

"; $txt2['en'] = "

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές. Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές. Με φυσική παρουσία πολλών ετών και παρακολουθώντας τις τελευταίες τεχνολογικές εξελίξεις, ενημερωνόμαστε διαρκώς και πλουτίζουμε τις γνώσεις και τη γκάμα των προιόντων μας, επιτυγχάνοντας τις καλύτερες δυνατές τιμές.

"; $txt3['gr'] = "ΕΡΓΑ"; $txt3['en'] = "PROJECTS"; $txt4['gr'] = "ΠΡΟΣΦΟΡΕΣ"; $txt4['en'] = "OFFERS"; $txt5['gr'] = "Όνομα"; $txt5['en'] = "Name"; $txt6['gr'] = "Επίθετο"; $txt6['en'] = "Lastname"; $txt7['gr'] = "Τηλέφωνο"; $txt7['en'] = "Phone"; $txt8['gr'] = "Σχόλια"; $txt8['en'] = "Comments"; $txt9['gr'] = "Αποστολή"; $txt9['en'] = "Send"; $txt10['gr'] = "Δείτε μας στο Χάρτη"; $txt10['en'] = "On the map"; $txt11['gr'] = "περισσότερα"; $txt11['en'] = "more"; $txt12['gr'] = "πίσω"; $txt12['en'] = "back"; $txt13['gr'] = "Παρακαλούμε συμπληρώστε τα υποχρεωτικά πεδία"; $txt13['en'] = "Please fill in all the necessary fields"; $txt14['gr'] = "Παρακαλούμε συμπληρώστε σωστά το email σας"; $txt14['en'] = "Please fill your email"; $txt15['gr'] = "Ευχαριστούμε που επικοινωνήσατε μαζί μας"; $txt15['en'] = "Thank you for contact with us"; ?> set_charset("utf8"); setlocale(LC_ALL, 'el_GR'); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } //prepare query for select - returns table function prepareQueryResults ($query,$kind,$valuep){ $mysqli = new mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME); $mysqli->set_charset("utf8"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if ($stmt = $mysqli->prepare($query)) { if($kind&&$valuep){ $bind_names[] = $kind; for ($i=0; $iexecute(); /* bind result variables */ $meta = $stmt->result_metadata(); while ($field = $meta->fetch_field()) { $parameters[] = &$row[$field->name]; } call_user_func_array(array($stmt, 'bind_result'), $parameters); while ($stmt->fetch()) { foreach($row as $key => $val) { $x[$key] = $val; } $results[] = $x; } return ($results); } else { /* Error */ printf("Prepared Statement Error: %s\n", $mysqli->error); } } //non-prepare query - returns table function simpleQueryResults ($query){ $mysqli = new mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME); $mysqli->set_charset("utf8"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if ($stmt = $mysqli->prepare($query)) { /* execute query */ $stmt->execute(); /* bind result variables */ $meta = $stmt->result_metadata(); while ($field = $meta->fetch_field()) { $parameters[] = &$row[$field->name]; } call_user_func_array(array($stmt, 'bind_result'), $parameters); while ($stmt->fetch()) { foreach($row as $key => $val) { $x[$key] = $val; } $results[] = $x; } return $results; } } //prepare query for update,insert - returns nothing - executing function prepareQueryParameter($query,$kind,$valuep){ $mysqli = new mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME); $mysqli->set_charset("utf8"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if ($stmt = $mysqli->prepare($query)) { if($kind&&$valuep){ $bind_names[] = $kind; for ($i=0; $iexecute(); } else { /* Error */ printf("Prepared Statement Error: %s\n", $mysqli->error); } } //non-prepare query - returns nothing - executing function simpleQueryParameter($query){ $mysqli = new mysqli(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME); $mysqli->set_charset("utf8"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } if ($stmt = $mysqli->prepare($query)) { /* execute query */ $stmt->execute(); } } $valuedef_lang = array(1); $sql_check_def_langs = prepareQueryResults('SELECT * FROM languages WHERE default1=?','i',$valuedef_lang); foreach($sql_check_def_langs as $sql_check_def_lang){ $def_lang=$sql_check_def_lang['locale']; } $valuepl = array(1); $result_contact_email = prepareQueryResults('SELECT contact_email FROM settings WHERE id=?','i',$valuepl); foreach($result_contact_email as $result_contact_emails) { $contact_email = $result_contact_emails['contact_email']; } ?> ".$langs_result['locale'].""; } elseif($menu_idp=='') { $all_langs .="".$langs_result['locale'].""; } else { $all_langs .="".$langs_result['locale'].""; } } return $all_langs; } function generalslideshow($lang){ $valuep = array(1); $slideshow_results=prepareQueryResults('SELECT * FROM slideshow WHERE pub=? ORDER BY id asc','i',$valuep); $slideshow="
"; $i= 0; foreach($slideshow_results as $slideshow_result){ $photos = $slideshow_result['image']; $descr = $slideshow_result['description_'.$lang]; if($photos!='') { $photos = str_replace("../", "", $photos); $dataPhotos = ""; } else { $dataPhotos = ""; } $slideshow .= $dataPhotos; $i++; } $slideshow .="
"; return $slideshow; } function menuslideshow($lang){ include("translations.php"); $url_array1 = getUrl(); $menu_id1 = $url_array1[url_2]; $menu_id2 = $url_array1[url_3]; $valuep = array($menu_id1); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE url=?','s',$valuep); $photos = explode("|", $cms_results[0]['sliderimages']); $valuep_home = array(369); $cms_results_home = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuep_home); $photos_home = explode("|", $cms_results_home[0]['sliderimages']); $slideshow="
"; if($photos[0] != '') { foreach ($photos as $photoss) { $photoss = str_replace("../", "", $photoss); $slideshow .= ""; } } else { if($photos_home[0] != '') { foreach ($photos_home as $photos_homes) { $photos_homes = str_replace("../", "", $photos_homes); $slideshow .= ""; } } } $slideshow .="
"; return $slideshow; } // frontpage content with limit of charachters to appear function frontpageContent($lang, $id){ $valuep = array($id); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuep); $frontContent = ""; foreach($cms_results as $cms_result){ $frontContent .=trim(strip_tags(trim(html_entity_decode($cms_result['description_'.$lang], ENT_QUOTES)))); } $letters=mb_strlen($frontContent,'UTF-8'); if($letters > 190){ $frontContent = mb_substr($frontContent,0,mb_strpos($frontContent, ' ',190,'UTF-8'),'UTF-8'). "..."; } return $frontContent; } // the more button function more_button($id, $lang, $module){ include("translations.php"); $valuep = array($id); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuep); foreach($cms_results as $cms_result){ $link = "". $txt7[$lang].""; } return $link; } function getMenu1($lang,$menu_id) { $url_array1 = getUrl(); $menu_idp = $url_array1[url_2]; $valuep = array(0,1); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE parent=? AND pub=? ORDER by order1','ii',$valuep); $rows = count($cms_results); $product_main_id = PRODUCTS_MAIN_ID; $valuepi = array($product_main_id,1); $current_menu1s = prepareQueryResults('SELECT * FROM menu WHERE parent=? AND pub=?','ii',$valuepi); $valuepii = array($menu_idp); $current_menus = prepareQueryResults('SELECT * FROM menu WHERE url=?','s',$valuepii); foreach($current_menus as $current_menu){ $active_id = $current_menu['id']; } $i = 0; $menuData = ""; } } return $menuData; } function getMenu($lang,$menu_id) { $url_array1 = getUrl(); $menu_idp = $url_array1[url_2]; $balance_id = BALANCE_ID; $valuep = array(0,1,$balance_id); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE parent=? AND pub=? AND id!=? ORDER by order1','iii',$valuep); $rows = count($cms_results); $product_main_id = 381; $valuepii = array($menu_idp); $current_menus = prepareQueryResults('SELECT * FROM menu WHERE url=? ORDER by order1','s',$valuepii); foreach($current_menus as $current_menu){ $active_id = $current_menu['id']; $active_id_parent = $current_menu['parent']; } $i = 0; $menuData = ""; } } } } return $menuData; } function getSiteTitle($lang,$menu_id) { $url_array1 = getUrl(); $url = $url_array1[url_2]; $url_prod = $url_array1[url_3]; $url_prod = strtoupper($url_prod); $url_cat = strtoupper($url); $valuep = array('1'); $sql_prefix_title = prepareQueryResults('SELECT * FROM settings WHERE id=?','i',$valuep); $prefixTtitle = ""; foreach($sql_prefix_title as $sql_prefix_titles){ $prefixTitle = html_entity_decode($sql_prefix_titles['title_'.$lang], ENT_QUOTES); if($url_prod) { $value_c = array($url); $sql_cat_title = prepareQueryResults('SELECT * FROM menu_products WHERE url=?','s',$value_c); $cat_title = $sql_cat_title[0]['title_'.$lang]; $value = array($url_prod); $sql_prod_title = prepareQueryResults('SELECT * FROM menu_products WHERE url=?','s',$value); $prod_title = $sql_prod_title[0]['title_'.$lang]; $SiteTitle = $prefixTitle." - ".$cat_title." - " .$prod_title; } else { $SiteTitle = $prefixTitle." - ".getMenuTitle($lang,$menu_id); } } if(!$url || $url=="index.php") { $SiteTitle = $prefixTitle; } return $SiteTitle; } function getSiteMeta($lang) { $valuep = array('1'); $sql_prefix_meta = prepareQueryResults('SELECT * FROM settings WHERE id=?','i',$valuep); $prefixmeta = ""; foreach($sql_prefix_meta as $sql_prefix_metas){ $getSiteMeta = html_entity_decode($sql_prefix_metas['meta_'.$lang],ENT_QUOTES); } return $getSiteMeta; } function getMenuTitle($lang) { $url_array1 = getUrl(); $url = $url_array1[url_2]; if(!$url || $url=="index.php"){ $valuep = array(HOMEPAGE_ID); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuep); } else { $valuep = array($url); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE url=?','s',$valuep); } $menuTitle = ""; foreach($cms_results as $cms_result){ $menuTitle .= html_entity_decode($cms_result['title_'.$lang], ENT_QUOTES); } return $menuTitle; } function getMenuContent($lang) { $url_array1 = getUrl(); $url = $url_array1[url_2]; if(!$url || $url=="index.php"){ $valuep = array(HOMEPAGE_ID); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuep); } else { $valuep = array($url); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE url=?','s',$valuep); } $menuTitle = ""; foreach($cms_results as $cms_result){ $descr = str_replace("../", "", $cms_result['description_'.$lang]); $MenuContent .= stripslashes(html_entity_decode($descr, ENT_QUOTES)); $link = str_replace("../", "", $cms_result['file1_'.$lang]); if($cms_result['file1_'.$lang]){ $MenuContent .= "
".$cms_result['file1_title_'.$lang]."
"; } else { $MenuContent .= ""; } } return $MenuContent; } function getMenuPhotos($menu_id) { $url_array1 = getUrl(); $url = $url_array1[url_2]; $valuep = array($url); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE url=?','s',$valuep); $photos = explode("|", $cms_results[0][images]); foreach($photos as $photoss){ if($photoss!='') { $highphotoss = str_replace("/assets", "", $photoss); $dataPhotos .= ""; } else { $dataPhotos .=""; } } return $dataPhotos; } function getAlbumPhotos($album_id,$lang) { $valuep=array($album_id); $result_sql_photos= prepareQueryResults("SELECT * FROM photos WHERE album_id=? ORDER BY order1","i",$valuep); $dataPhotos = ""; $i=0; foreach($result_sql_photos as $photos_result){ $photos = $photos_result['image1']; if($photos!='') { $dataPhotos .= " "; } else { $dataPhotos .= ""; } $i++; } $dataPhotos.=""; return $dataPhotos; } function getAlbums($album_id,$lang) { $valuep=array(1); $result_sql_albums= prepareQueryResults("SELECT * FROM albums WHERE pub=? ORDER BY order1","i",$valuep); $albums = ""; foreach($result_sql_albums as $albums_result){ $photos = $albums_result['image1']; if($photos!='') { $albums .="
".$albums_result[
".$albums_result['caption_'.$lang]."
"; }else { $albums .= "

".$albums_result['caption_'.$lang]."
"; } } return $albums; } function back_button($menu_id, $lang){ include("translations.php"); $valuep = array($menu_id); $result_sql_cms= prepareQueryResults("SELECT * FROM menu WHERE id=?","i",$valuep); foreach($result_sql_cms as $cms_result){ $parent = $cms_result['parent']; $link = "". $txt9[$lang].""; } return $link; } // function module($lang){ // $url_array1 = getUrl(); // $url = $url_array1[url_2]; // $url_3 = $url_array1[url_3]; // $url_4 = $url_array1[url_4]; // $valuep = array($url); // $module_results=prepareQueryResults('SELECT * FROM menu WHERE url=? ORDER BY id asc','s',$valuep); // $row =count($module_results); // foreach($module_results as $module_result){ // $table = $module_result['landing_table']; // } // if($row==0){ // $valuep = array($url); // $module_results_p=prepareQueryResults('SELECT * FROM menu_products WHERE url=? ORDER BY id asc','s',$valuep); // $row =count($module_results_p); // foreach($module_results_p as $module_results_ps){ // $table = $module_results_ps['landing_table']; // } // } // if($url_array1[url_3] && !is_numeric($url_array1[url_3])) { // $url = $url_array1[url_3]; // $valuep = array($url); // $module_results=prepareQueryResults("SELECT * FROM $table WHERE url=? ORDER BY id asc",'s',$valuep); // $row =count($module_results); // } // else { // $valuep = array($url); // $module_results=prepareQueryResults('SELECT * FROM menu WHERE url=? ORDER BY id asc','s',$valuep); // $row =count($module_results); // } // foreach($module_results as $module_result){ // if($url_array1[url_4] && !is_numeric($url_array1[url_4])){ // $module = $module_result['product_module']; // } else { // $module = $module_result['module']; // } // } // if($url=='index.php' || $url==''){ // $module="frontpage"; // } // if($module==''){ // $module="menus"; // } // return $module; // } function module($lang){ $url_array1 = getUrl(); $url = $url_array1[url_2]; $url_3 = $url_array1[url_3]; $url_4 = $url_array1[url_4]; if($url_4 && !is_numeric($url_4)){ $valuep = array($url_4 && !is_numeric($url_4)); $module_results=prepareQueryResults('SELECT * FROM products WHERE url=? ORDER BY id asc','s',$valuep); $row =count($module_results); $module = "product_module"; } elseif ($url_3 && !$url_4 && !is_numeric($url_3) || $url_4 && is_numeric($url_4)){ $valuep = array($url_3); $module_results=prepareQueryResults('SELECT * FROM menu_products WHERE url=? ORDER BY id asc','s',$valuep); $row =count($module_results); foreach($module_results as $module_result){ $module = $module_result['module']; } } else { $valuep = array($url); $module_results=prepareQueryResults('SELECT * FROM menu WHERE url=? ORDER BY id asc','s',$valuep); $row =count($module_results); foreach($module_results as $module_result){ $module = $module_result['module']; } } if($url=='index.php' || $url==''){ $module="frontpage"; } if($module==''){ $module="menus"; } return $module; } function getFrontNews ($lang) { include("translations.php"); $valuep = array(1); $results=prepareQueryResults('SELECT * FROM news WHERE pub=? ORDER BY id desc limit 2','i',$valuep); $row =count($results); $news =""; $i = 1; foreach($results as $result){ if($i==1) { $news .= "
".$result['news_date']."
".$result['title_'.$lang]."
".$txt3[$lang]."

"; } else { $news .= "
".$result['news_date']."
".$result['title_'.$lang]."
".$txt3[$lang]."
"; } $i++; } return $news; } function getNews($lang) { include("translations.php"); $valuep = array(1); $results=prepareQueryResults('SELECT * FROM news WHERE pub=? ORDER BY id desc','i',$valuep); $row =count($results); $news =""; $i = 1; foreach($results as $result){ $news_date = date("d-m-Y", strtotime($result['news_date'])); if($row==$i) { $news .= "
".$news_date."
".$result['title_'.$lang]."
".$txt3[$lang]."
"; } else { $news .= "
".$news_date."
".$result['title_'.$lang]."
".$txt3[$lang]."

"; } $i++; } return $news; } function getNew($lang) { include("translations.php"); $url_array1 = getUrl(); $url_parent = $url_array1[url_3]; $url_grandparent = $url_array1[url_2]; $valuep = array($url_parent); $results=prepareQueryResults('SELECT * FROM news WHERE url=? ORDER BY id desc','s',$valuep); $row =count($results); $valuep = array($url_grandparent); $results_title=prepareQueryResults('SELECT * FROM menu WHERE url=? ORDER BY id desc','s',$valuep); $title = ""; foreach($results_title as $results_titles){ $title = $results_titles['title_'.$lang]; } $new = "
"; foreach($results as $result){ $new .= ""; $new .= ""; if($result['file1_'.$lang]) { $link = str_replace("../", "", $result['file1_'.$lang]); $new .= "
".$result['file1_title_'.$lang]."
"; } $new .= "
"; } $new .="
"; return $new; } function getBanners($lang){ include("translations.php"); $valuep = array(1); $results=prepareQueryResults('SELECT * FROM banners WHERE pub=? ORDER BY order1 asc','i',$valuep); $row =count($results); $photos = ""; foreach ($results as $result) { $image = str_replace("../", "", $result['image']); if($result['link']) { $photos .= "
"; } else { $photos .= "
"; } } return $photos; } function getMenuProducts($lang,$menu_id,$module) { $url_array1 = getUrl(); $url = $url_array1[url_2]; $url_3 = $url_array1[url_3]; $url_4 = $url_array1[url_4]; $valuep = array(0,1); $cms_results = prepareQueryResults('SELECT * FROM menu_products WHERE parent=? AND pub=? ORDER by order1','ii',$valuep); $rows = count($cms_results); $product_main_id = 184; $valuepi = array($product_main_id,1); $current_menu1s = prepareQueryResults('SELECT * FROM menu_products WHERE parent=? AND pub=?','ii',$valuepi); $value = array($url_3); $current_menu = prepareQueryResults("SELECT * FROM menu_products WHERE url=?","s",$value); $i = 0; $menuData = ""; $x=0; foreach ($cms_results as $cms_result){ $x++; $i++; $target=""; if($cms_result['external']!="") { $link=$cms_result['external']; if(substr($link, 0, 7)=="http://") $target .= "target='_blank'"; } else { $link=$cms_result['url']; } $menuData .="
"; $valuep1 = array($cms_result['id'],1); $cms_results1 = prepareQueryResults('SELECT * FROM menu_products WHERE parent=? AND pub=? ORDER by order1','ii',$valuep1); foreach ($cms_results1 as $cms_results1s) { if($cms_results1s['url']==$current_menu[0]['url']){ $current = "current"; } else { $current = ""; } if($cms_results1s['external']!="") { $link1=$cms_results1s['external']; if(substr($link1, 0, 7)=="http://") $target1 .= "target='_blank'"; } else { $link1=$cms_result['url']."/".$cms_results1s['url']; } $menuData .= " "; } $menuData .="
"; if($i==$rows) { $menuData .=""; } } return $menuData; } function getProductTitleCat($lang) { include("translations.php"); $url_array1 = getUrl(); $url_parent = $url_array1[url_3]; $url_grandparent = $url_array1[url_2]; $valuep3 = array($url_parent); $products_cat_result = prepareQueryResults('SELECT * FROM menu_products WHERE url=?','s',$valuep3); $product_title = $products_cat_result[0]['title_'.$lang]; $category_title_parent = $products_cat_result[0]['parent']; $valuep4 = array($url_grandparent); $products_cat_result1 = prepareQueryResults('SELECT * FROM menu_products WHERE url=?','s',$valuep4); $category_title = $products_cat_result1[0]['title_'.$lang]; $title .= $category_title ." / " .$product_title; return $title; } function getMenuBottom($lang) { $valuep = array(0,1); $cms_results = prepareQueryResults('SELECT * FROM menu WHERE parent=? AND pub=? ORDER by order1','ii',$valuep); $rows = count($cms_results); $product_main_id = 184; $valuepi = array($product_main_id,1); $current_menu1s = prepareQueryResults('SELECT * FROM menu WHERE parent=? AND pub=?','ii',$valuepi); $valuepii = array($menu_id); $current_menus = prepareQueryResults('SELECT * FROM menu WHERE id=?','i',$valuepii); foreach($current_menus as $current_menu){ if($current_menu['parent']!=0) { $active_id = $current_menu['parent']; foreach($current_menu1s as $current_menu1){ if($active_id==$current_menu1['id']){ $active_id = $current_menu1['parent']; } } } } $i = 0; $menuData = ""; } } return $menuData; } function getProducts($lang, $page){ include("translations.php"); $url_array1 = getUrl(); $url_3 = $url_array1[url_3]; $url_2 = $url_array1[url_2]; $value = array($url_3); $products_cat_result = prepareQueryResults('SELECT * FROM menu_products WHERE url=?','s',$value); $menu_id = $products_cat_result[0]['id']; $valuep = array($menu_id,1); $result= prepareQueryResults("SELECT * FROM products WHERE product_cat=? AND pub=? ORDER by order1","ii",$valuep); $rows= count($result); if($page!=NULL) $n=$page; if($page==NULL) $n=1; $eggrafes=10; $limit=($n-1)*$eggrafes; $lim=ceil($rows/$eggrafes); if($n>$eggrafes) $start=$n-$eggrafes; if($n<=$eggrafes) $start=1; if(($n+$eggrafes)<=$lim) $end=$n+$eggrafes; if(($n+$eggrafes)>$lim) $end=$lim; $valuep1 = array ($menu_id,1); $result=prepareQueryResults("SELECT * FROM products WHERE product_cat=? AND pub=? ORDER BY order1 ASC LIMIT $limit, $eggrafes","ii",$valuep1); $rows2= count($result); $data = ""; if($rows2>0) { $i = 1; foreach($result as $result_array){ $dataPhotos = ""; if($result_array['images']!='') { $explode_photos = explode("|",$result_array['images']); $o=0; $x=0; $photo_array=array(); foreach ($explode_photos as $explode_photo) { $photo_array[$o] = str_replace("/assets", "", $explode_photo); $o++; } $firstphoto_link = str_replace("../", "", $photo_array['0']); $dataPhotos .= ""; } else { $image = "../template_images/no_image.jpg"; $dataPhotos =""; } $pro_descr =trim(strip_tags(trim(html_entity_decode($result_array['small_description_'.$lang], ENT_QUOTES)))); $pro_title =html_entity_decode($result_array['caption_'.$lang], ENT_QUOTES); $letters=mb_strlen($pro_descr,'UTF-8'); if($letters > 800){ $pro_descr = mb_substr($pro_descr,0,mb_strpos($pro_descr, ' ', 800, 'UTF-8'),'UTF-8'). "..."; } if($result_array['pub_more']==1){ $more = ""; } else { $more = ""; } $data .= "
".$dataPhotos."
".$pro_title."
".$pro_descr."
"; $data .= "
".$pdfs."
"; $data .= $more; $data .="
"; $data .= "
"; } if($end!=1){ $data .= "
"; if($n!=1){ $x= $n-1; $data .= "< "; } for($i=$start;$i<=$end;$i++){ if($i!=$n){ $data .= ""; } else { $data .= ""; } $data .= $i; if($i!=$n){ $data .= " "; } else { $data .= " "; } } if($n!=$lim){ $y = $n+1; $data .= " >> "; } $data .= "
"; $data .="
"; } } else { $data .= '
'; } return $data; } function getShowroomPhotos($lang,$page){ include("translations.php"); $url_array1 = getUrl(); $url_2 = $url_array1[url_2]; $url_1 = $url_array1[url_1]; $value = array(1); $result = prepareQueryResults('SELECT * FROM photos WHERE pub=? order by order1 ASC','i',$value); $rows= count($result); if($page!=NULL) $n=$page; if($page==NULL) $n=1; $eggrafes=25; $limit=($n-1)*$eggrafes; $lim=ceil($rows/$eggrafes); if($n>$eggrafes) $start=$n-$eggrafes; if($n<=$eggrafes) $start=1; if(($n+$eggrafes)<=$lim) $end=$n+$eggrafes; if(($n+$eggrafes)>$lim) $end=$lim; $showroom = ""; $valuep1 = array (1); $result=prepareQueryResults("SELECT * FROM photos WHERE pub=? ORDER BY order1 ASC LIMIT $limit, $eggrafes","i",$valuep1); $rows2= count($result); if($rows2>0) { $i = 1; foreach ($result as $results){ $photo = str_replace("../", "", $results['image1']); $photo1 = str_replace("assets", "../", $photo); $showroom .= " "; } if($end!=1){ $showroom .= "
"; if($n!=1){ $x= $n-1; $showroom .= "< "; } for($i=$start;$i<=$end;$i++){ if($i!=$n){ $showroom .= ""; } else { $showroom .= ""; } $showroom .= $i; if($i!=$n){ $showroom .= " "; } else { $showroom .= " "; } } if($n!=$lim){ $y = $n+1; $showroom .= " >> "; } $showroom .= "
"; $showroom .= "
"; } } else { $showroom .= '
'; } return $showroom; } function getProjectPhotos($lang,$page){ include("translations.php"); $url_array1 = getUrl(); $url_2 = $url_array1[url_2]; $url_1 = $url_array1[url_1]; $value = array(1); $result = prepareQueryResults('SELECT * FROM projects WHERE pub=? order by order1 ASC','i',$value); $rows= count($result); if($page!=NULL) $n=$page; if($page==NULL) $n=1; $eggrafes=30; $limit=($n-1)*$eggrafes; $lim=ceil($rows/$eggrafes); if($n>$eggrafes) $start=$n-$eggrafes; if($n<=$eggrafes) $start=1; if(($n+$eggrafes)<=$lim) $end=$n+$eggrafes; if(($n+$eggrafes)>$lim) $end=$lim; $projects = ""; $valuep1 = array (1); $result=prepareQueryResults("SELECT * FROM projects WHERE pub=? ORDER BY order1 ASC LIMIT $limit, $eggrafes","i",$valuep1); $rows2= count($result); if($rows2>0) { $i = 1; foreach ($result as $results){ $photo = str_replace("../", "", $results['image']); $photo1 = str_replace("assets", "../", $photo); $projects .= " "; } if($end!=1){ $projects .= "
"; if($n!=1){ $x= $n-1; $projects .= "< "; } for($i=$start;$i<=$end;$i++){ if($i!=$n){ $projects .= ""; } else { $projects .= ""; } $projects .= $i; if($i!=$n){ $projects .= " "; } else { $projects .= " "; } } if($n!=$lim){ $y = $n+1; $projects .= " >> "; } $projects .= "
"; $projects .= "
"; } else { $projects .= '
'; } } return $projects; } function getProduct($lang) { include("translations.php"); $url_array1 = getUrl(); $url_4 = $url_array1[url_4]; $url_3 = $url_array1[url_3]; $url_2 = $url_array1[url_2]; $value = array($url_3); $parent_results = prepareQueryResults('SELECT * FROM menu_products WHERE url=? ORDER by order1','s',$value); $parent = $parent_results[0]['id']; $valuep = array($url_4,1,$parent); $cms_results = prepareQueryResults('SELECT * FROM products WHERE url=? AND pub=? and product_cat=? ORDER by order1','sii',$valuep); $rows = count($cms_results); $product = ""; foreach ($cms_results as $cms_result) { if($cms_result['images']!='') { $explode_photos = explode("|",$cms_result['images']); $o=0; $x=0; $photo_array=array(); foreach ($explode_photos as $explode_photo) { $photo_array[$o] = str_replace("/assets", "", $explode_photo); $o++; } $firstphoto_link = str_replace("../", "", $photo_array['0']); $products .= "