insert_styles("chapter.css", "trip.css"); $html_obj->insert_meta("yandex-verification", "6d5197a3ba26ed9f"); $html_obj->insert_meta("verify-v1", "bc681yOEIgW5z1lZA2nF3ZivY4zY0OpMPSZbcp85n58="); seo_fill_index($html_obj); $html_obj->generate_header(); $content = new CFileVar("index_data"); $ar_index_str = $content->get(); $ar_index = @unserialize($ar_index_str); if ( !$ar_index || !is_array($ar_index) ) { $ar_index = array( 'user_count' => SITE::user_store()->get_row_count(), 'blog_count' => SITE::blog_store()->get_row_count(), 'photo_count' => SITE::photo_blog_store()->get_row_count(), 'today_blogs' => array(), /* n1,n2,n3,n4 */ 'today_image' => array()); /* 'id_photo', 'mtime', 'title', 'author_uid', 'author_name' */ } $ar_blogs = array(); foreach($ar_index['today_blogs'] AS $bid) { $blog = new CBlog($bid); if ( $blog->read() == E_SUCCESS ) { $ar_blogs[] = $blog; } } if ( $ar_index['today_image']['id_photo'] ) { $img_url = URL_popular_photo($ar_index['today_image']['id_photo']); $img_src = SRC_blog_thumbnail_big($ar_index['today_image']['id_photo'], $ar_index['today_image']['mtime']); $img_title = $ar_index['today_image']['title']; $img_author_url = URL_profile($ar_index['today_image']['author_uid']); $img_author_name = $ar_index['today_image']['author_name']; } else { $img_url = FALSE; $img_src = "/images/lang/ru/location.jpg"; $img_title = ""; $img_author_url = FALSE; $img_author_name = FALSE; } $url_europe = URL_location(MAKE_FID(LOC_REGION, IDR_EUROPE)); $url_middle_east = URL_location(MAKE_FID(LOC_REGION, IDR_MIDDLE_EAST)); $url_asia = URL_location(MAKE_FID(LOC_REGION, IDR_ASIA)); $url_africa = URL_location(MAKE_FID(LOC_REGION, IDR_AFRICA)); $url_oceania = URL_location(MAKE_FID(LOC_REGION, IDR_OCEANIA)); $url_north_america = URL_location(MAKE_FID(LOC_REGION, IDR_NORTH_AMERICA)); $url_central_america = URL_location(MAKE_FID(LOC_REGION, IDR_CENTRAL_AMERICA)); $url_south_america = URL_location(MAKE_FID(LOC_REGION, IDR_SOUTH_AMERICA)); $url_caribbean = URL_location(MAKE_FID(LOC_REGION, IDR_CARIBBEAN)); $url_antarctica = URL_location(MAKE_FID(LOC_REGION, IDR_ANTARCTICA)); $url_arctica = URL_location(MAKE_FID(LOC_REGION, IDR_ARCTICA)); $fr = t("seo.desc_region_f"); $alt_europe = sprintf($fr, t("region.europe")); $alt_middle_east = sprintf($fr, t("region.middle_east")); $alt_asia = sprintf($fr, t("region.asia")); $alt_africa = sprintf($fr, t("region.africa")); $alt_oceania = sprintf($fr, t("region.oceania")); $alt_north_america = sprintf($fr, t("region.north_america")); $alt_central_america = sprintf($fr, t("region.central_america")); $alt_south_america = sprintf($fr, t("region.south_america")); $alt_caribbean = sprintf($fr, t("region.caribbean")); $alt_antarctica = sprintf($fr, t("region.antarctica")); $alt_arctica = sprintf($fr, t("region.arctica")); echo "
", t("gen.register"), "", lg_welcome(), "

", t("index.photo_of_day"), "

", t("index.world_travel_guide"), "

\n"; if ( SITE::is_auth() ) { echo "\t\t\t\t", SITE::lg('index.welcome_back'), "!\n"; } else { echo "\t\t\t\t", t('login.member_login'), "\n"; } echo "

\n"; if ( $img_url ) { echo "\t\t\t\n", "\t\t\t\n", "\t\t\t
\n"; if ( $img_title ) { echo "\t\t\t\t$img_title
\n"; } echo "\t\t\t\t{$img_author_name}\n", "\t\t\t
\n", "\t\t\t
\n"; } else { echo "\t\t\t"; } echo "

\n"; if ( SITE::is_auth() ) { /* authentificated user */ echo " "; } else { /* not authentificated */ echo "
", t("login.forgot_pass"), "?
", t("login.forgot_name"), "?
\n"; } echo "
\n"; /* Blogs */ $blog_rows = intval(sizeof($ar_blogs)/2); for($i=0; $i<$blog_rows; $i++) { echo "\t\n", "\t\n", "\t\n", "\t\n", "\t\n"; } echo "

", t("index.todays_travel_blogs"), "

", t("index.todays_travel_blogs"), "

\n"; gen_blog_preview($ar_blogs[$i*2], TRUE/*author*/, FALSE/*edit*/); if ( $i != ($blog_rows-1) ) { echo "\t
\n"; } echo "\t
\n"; gen_blog_preview($ar_blogs[$i*2+1], TRUE/*author*/, FALSE/*edit*/); if ( $i != ($blog_rows-1) ) { echo "\t
\n"; } echo "\t
\n"; $html_obj->generate_footer(); } process_parameters(); generate(); ?>