"; //print_r($dp_array); //echo ""; $pseudo_file_name = array_pop($dp_array); //echo $pseudo_file_name."
"; //echo "
";
//print_r($dp_array);
//echo "
"; $pseudo_file_name_parts = explode("-",rtrim($pseudo_file_name,".html")); $lang = array_pop($pseudo_file_name_parts); //echo "
";
//print_r($pseudo_file_name_parts);
//echo "
"; $product = array_pop($pseudo_file_name_parts); if (is_numeric($product)){ } else{ unset($product); } //echo "
";
//print_r($pseudo_file_name_parts);
//echo "
"; //echo "
";
//print_r ($langs);
//echo "
"; $available_langs = array(); foreach ($langs as $key => $val){ $available_langs[] = $val[1]; } //echo "
";
//print_r ($available_langs);
//echo "
"; //echo "GET['lang'] = {$_GET['lang']}
"; if (!isset($_GET['lang'])){ $_GET['lang'] = $lang; } else{ $lang = $_GET['lang']; } //echo $lang."
"; if (!in_array($lang,$available_langs)){ $lang = 'ro'; //echo "was here
"; } if (isset($product)){ $_GET['product'] = $product;// ar fi bine sa testez asta... } //echo "lang = ".$lang."
"; //echo "product = ".$product."
"; foreach($dp_array as $key=>$val){ $dp .= $val."/"; } $dir_path[1] = $dp; //echo $_GET['dp']; $dir_path = trim ( $dir_path[1], '/' ); //$lvl = str_repeat('../', substr_count($dir_path, '/' ) + 2 ); $lvl = ''; if ( !isset($t_id) ) { $ctopic = cms_get_topic_by_dirpath( $dir_path ); $t_id = $ctopic->topic_id; $_GET['t_id'] = $t_id; $_REQUEST['t_id'] = $t_id; $_POST['t_id'] = $t_id; } //echo "
".$t_id."
"; $sect_type = cms_get_section_type( $t_id ); //lucreaza cu variabilele globale //global $basket_section; //global $checkout_section; //echo $sect_type."--"; switch ( $sect_type ){ case TPRODUCT: //require $level."_common/show_product_sect.php"; require $level."_common/show_article_sect.php"; break; case TBASKET: require $level."_common/show_basket_sect.php"; break; case TCHECKOUT: /// require $level."_common/show_checkout_sect.php"; require $level."_common/show_basket_sect.php"; break; default : $level = $lvl; require_once "{$level}_common/show_article_sect.php"; break; } $acensters = cms_get_parent($t_id); $titles_array = array(); if ( is_array( $acensters ) ) { $titles = ""; for ( $i= count($acensters)-1; $i>=0 ; --$i ){ if ( !in_array( $acensters[$i]->topic_id, $ign_ids ) && strlen( $acensters[$i]->title ) > 0 ){ $titles = $acensters[$i]->title.", ".$titles; } } } if (!isset($page_title)){ $page_title = $titles; } $level = $lvl; switch ($do) { case "print": include "{$level}_common/templates/{$subsite}/print.inc.php"; break; case "send": include "{$level}_common/templates/{$subsite}/send.inc.php"; break; case "test": include "{$level}_common/templates/{$subsite}/display_test.inc.php"; break; default: include "{$level}_common/templates/{$subsite}/display.inc.php"; } $level = $lvl; require_once "{$level}_common/_common_bottom_includes.php"; ?>