Page ID and Language Settings $language = $DEFAULT_SITE_LANGUAGE; if( isset( $_GET[ "lang" ] ) ) $language = $_GET[ "lang" ]; setLanguageProfile( $language ); $language_profile = strtolower( $language ); $language_id = $LANG_ID; $page_id = $ON_LINE_CONSULT_PAGE_ID; ############################################################################################################################################################ ### --> Initialize New Page ( Page Profile ) $page = new Page(); $page->setPageID( $page_id ); $page->setLangID( $language_id ); $page->getPageData(); $show_pictures = $page->getShowPictures(); $show_files = $page->getShowFiles(); $show_sub_pages = $page->getShowSubPages(); $hide_marker = $page->getHideMarker(); if( $hide_marker == "Y" ) userError( $ACCESS_DENIED_MSG, $language_profile ); $page_title = $page->getTitle(); $meta_title = $page->getMetaTitle(); $meta_description = $page->getMetaDescription(); $meta_keyworwords = $page->getMetaKeywords(); $page_description = $page->getDescription(); $parent_page = $page->getParentPage(); ############################################################################################################################################################ ### --> Page Nodes $page_title_link = "" . $page_title . ""; $path = array(); createPageNodePath( $page_id, $path, 0 ); $path_idx = count( $path ) - 1; $page1 = new Page(); $page1->setPageID( $path[ $path_idx - 2 ] ); $page1->setLangID( $language_id ); $page1->getPageData(); $call_url_1 = $page1->getCallURL(); if( $call_url_1 == "" ) $call_url_1 = "pages/" . strtolower( $language_profile ) . "/" . $path[ $path_idx - 2 ]; if( strtolower( substr( $call_url_1, 0, 4 ) ) != "http" ) $call_url_1 = $WORK_DIR . "/" . $call_url_1; $title_locator_msg .= "\n" . $page1->getTitle() . "\n"; $page_title_locator_msg = $page1->getTitle(); //$page_location_decorator = "\n\n"; for( $i = $path_idx - 3; $i >= 0; $i-- ) { $page1->setPageID( $path[ $i ] ); $page1->setLangID( $language_id ); $page1->getPageData(); $call_url_1 = $page1->getCallURL(); if( $call_url_1 == "" ) $call_url_1 = "pages/" . strtolower( $language_profile ) . "/" . $path[ $i ]; if( strtolower( substr( $call_url_1, 0, 4 ) ) != "http" ) $call_url_1 = $WORK_DIR . "/" . $call_url_1; $tmp_page_title = $page1->getTitle(); $page_title_locator_msg .= " | " . $tmp_page_title; $title_locator_msg .= "»" . "\n$tmp_page_title\n"; } ############################################################################################################################################################ ### --> Meta Information if( $meta_title == "" ) { if( $page_title_locator_msg == "" ) $meta_title = $META_TITLE; else $meta_title = $page_title_locator_msg . ", " . $META_TITLE; } if( $meta_description == "" ) $meta_description = substr( str_replace( '\r', '', str_replace( '\n', '', str_replace( ' ', ' ', $page_description ) ) ) , 0, $META_DESCRIPTION_LENGHT ); ############################################################################################################################################################ ### --> Output New Page ( Page Profile ) output_site_head_Section( $meta_title, $meta_description, $meta_keyworwords ); output_site_Header( $title_locator_msg ); open_pages_Container(); create_main_Menu(); build_inquiry_Form(); ############################################################################################################################################################ ### --> Get Subpages & Page Description if( ( $page_description != "" ) || ( $show_sub_pages == "Y" ) ) { echo <<< PAGE_CONTENT
PAGE_CONTENT; if( $show_sub_pages == "Y" ) { $qry = "select a.page_id as sub_page_id, b.title as sub_page_title, b.call_url as sub_page_call_url, c.plain_desc as subpage_short_plan_desc from pages_list a, page_data b, page_properties c where a.parent_page='$page_id' and a.hide_marker='N' and a.page_id=b.page_id and b.lang_id='$language_id' and a.page_id=c.page_id and b.page_id=c.page_id and b.lang_id=c.lang_id order by a.sort_flag"; $res = mysqli_query(\Database::getInstance()->getConnection(), $qry ) or systemError(mysqli_error(\Database::getInstance()->getConnection()), $LANG ); if( mysqli_num_rows( $res ) ) { $idx_hlp = 0; $cycle_row = 0; echo <<< SUBPAGES_DATA
SUBPAGES_DATA; while( $row = mysqli_fetch_array( $res ) ) { $idx_hlp += 1; $cycle_row += 1; $sub_page_id = $row["sub_page_id"]; $sub_page_title = $row["sub_page_title"]; $sub_page_call_url = $row["sub_page_call_url"]; $sub_page_title = cut_UTF_8_String( $sub_page_title, 0, $PP_SUB_PAGE_TITLE_LENGHT ); if ($sub_page_call_url == "") $sub_page_call_url = "pages/" . $language_profile . "/$sub_page_id"; if( strtolower( substr( $sub_page_call_url, 0, 4 ) ) != "http" ) $sub_page_call_url = $WORK_DIR . "/" . $sub_page_call_url; $final_subcategory_preview = "\"$sub_page_title\""; $qry1 = "select photo_big from page_photos where page_id = '$sub_page_id' order by photo_id limit 1"; $res1 = mysqli_query(\Database::getInstance()->getConnection(), $qry1 ) or systemError( mysqli_error(\Database::getInstance()->getConnection()), $LANG ); if( mysqli_num_rows( $res1 ) ) { $row1 = mysqli_fetch_array( $res1 ); $page_big_photo = $row1[ 'photo_big' ]; $new_dimensions = array(); $new_dimensions = custom_image_Resize( substr( $page_big_photo, 1 ), $PP_SUB_PAGE_PREVIEW, $horizontal_resizing = true ); $final_subcategory_preview = "\"$sub_page_title\""; } echo <<< SUBPAGES_DATA
$sub_page_title
$final_subcategory_preview
SUBPAGES_DATA; } echo <<< SUBPAGES_DATA
SUBPAGES_DATA; } } echo <<< SUBPAGES_DATA
$page_description
SUBPAGES_DATA; } ############################################################################################################################################################ ### --> Get Files Attached To Current Page if( $show_files == "Y" ) { $file_names_table = "page_files"; $_file_ = new UplFile(); $_file_->setTableName($file_names_table); $_file_->setLangID( $language_id ); $_file_->setOtherPrimaryKeyVarName( "page_id" ); $_file_->setOtherPrimaryKeyVarValue( $page_id ); $files = array(); $files = $_file_->getAllFiles(); $total_files = count( $files ); if ( $total_files > 0 ) { echo <<< PAGE_FILES
PAGE_FILES; for( $i = 0; $i < $total_files; $i ++ ) { $file_id = $files[ $i ][ 0 ]; $file_type = $files[ $i ][ 1 ]; $file_path = $files[ $i ][ 2 ]; $file_title = $files[ $i ][ 3 ]; if( $file_title == "" ) { $file_title = substr ( $file_path, strrpos ( $file_path, "/" ) + 1 ); $file_title = str_replace( '_', ' ', $file_title ); } $file_size = round( filesize( "." . $file_path ) / 1024, 2 ) . " KB"; echo <<< FILES_DATA
$file_title - $file_size
FILES_DATA; } echo <<< PAGE_FILES
PAGE_FILES; } } ############################################################################################################################################################ ### --> Get Images Attached To Current Page if( $show_pictures == "Y" ) { $photos_type = "page_photos"; $idx_type = "page_id"; $photo = new Photo(); $photo->setTableName( $photos_type ); $photo->setLangID( $language_id ); $photo->setOtherPrimaryKeyVarName( $idx_type ); $photo->setOtherPrimaryKeyVarValue( $page_id ); $photos = array(); $photos = $photo->getAllPhotos(); if( count( $photos ) > 0 ) { echo <<< IMAGES
IMAGES; for( $i = 0; $i < count( $photos ); $i ++ ) { $photo_big = $photos[ $i ][ 1 ]; $photo_small = $photos[ $i ][ 2 ]; $photo_title = $photos[ $i ][ 3 ]; $photo_url = $photos[$i][4]; $photo_txt = $photos[ $i ][ 6 ]; $resized_preview = array(); $resized_preview = custom_image_Resize( substr( $photo_small, 1 ), $GALLERY_THUMBNAILS_WIDTH, $horizontal_resizing = false ); echo <<< IMAGES
IMAGES; } echo <<< IMAGES
IMAGES; } } show_copyright_Message(); ############################################################################################################################################################ close_pages_Container(); output_site_closing_Tags(); ?>