<?php
if(!defined('IN_DEMOSOSO')) {
    exit('this is wrong page,please back to homepage');
}

?>

<?php
 //pre($row_detail);
$dhtrigger = 'slick'.rand(1000,9999);
$videoid= $row_detail['videoid'];$albumid= $row_detail['albumid'];
$nodepidname= $row_detail['pidname'];
$detpriceold= $row_detail['detpriceold'];$detprice= $row_detail['detprice'];
$stock= $row_detail['stock'];
$sku= $row_detail['sku'];
$desptext= web_despdecode($row_detail['desptext']);
$desp= web_despdecode($row_detail['desp']);
$despjj= web_despdecode($row_detail['despjj']);
$despv = $desptext<>''?$desptext:$desp;
 
$news_titlev = $news_title<>''?$news_title:'内容详情';
 
$detailkv = $row_detail['kv'];
$titledetail = $title; //override by album.so set again

$despcan = detail_nodetext('node','nodeprocan',$nodepidname);
$desptab1 = detail_nodetext('node','nodetab1',$nodepidname);
$desptab2 = detail_nodetext('node','nodetab2',$nodepidname);
$desptab3 = detail_nodetext('node','nodetab3',$nodepidname);
?>

<?php
publishtext(); // in frontcommon.php

?>
<div class="content_desp content_shop">

<div class="shopw1">
<?php
 
//when domain, $mainlang is not effective
 
$albumid2 = $albumid==''?$nodepidname:$albumid;

//echo $albumid;
if($albumid<>'') $langalbum = get_fieldnolang(TABLE_NODE,'lang',$albumid,'pidname');
else $langalbum = LANG;

//echo $langalbum;  //  vv_album.php also have langalbum

//$langalbum = $mainlang;

//$langalbum = LANG; -- no use

//MAINLANGALBUM  -- no use
if(MAINLANGALBUM <> '' && $albumid=='' && 1==2) { 
        if(ENABLEMULTISITE=='y'){
          //get 主语言的nodeid havesub($table,$field,$v){
          //if(havesub(TABLE_NODELANGREL,'nodeid',$nodepidname)){
               $nrlangnodeid = get_field(TABLE_NODELANGREL,'pidname',$nodepidname,'nodeid');
               if($nrlangnodeid<>'noid'){
                $mainlang_nodeid = get_field_lang(MAINLANGALBUM,TABLE_NODELANGREL,'nodeid',$nrlangnodeid,'pidname');
                 
                 $albumid2 = $mainlang_nodeid;
                 // $langalbum = MAINLANGALBUM;;

               }
      }
} 

$row_abm = detail_album('node',$albumid2,'');


if(!$row_abm)  {
   if($detailkv=='') echo '<img src = "'.STAPATH.'img/noimg.png" alt="" />';
   else {
    echo '<a href="'.get_img($detailkv,$title,'nodiv').'" data-fancybox data-caption="'.$title.'">';
    echo get_img($detailkv,$title,'div');
    echo '</a>';
  }
  //
}
else {
  $cus_columnsv = ' '.cus_columnsfun($cus_columns_album);

//if(DMFABU=='n'){    //此代码仅测试时用。
 //echo @$_COOKIE["cookievaluealbum"];
  //if(@$_COOKIE["cookievaluealbum"]<>'')  $albumfg = @$_COOKIE["cookievaluealbum"];
//}

   //if(substr($albumfg,0,5)=='self_')  $albumfile = TPLCURROOT.'selfblock/album/'.$albumfg;
   //else if(substr($albumfg,0,5)=='dmre_')   $albumfile =  REGIONROOT.'dmregion_block/dmreblock/album/'.$albumfg;
   //else  $albumfile = BLOCKROOT.'album/'.$albumfg;
 //$albumfile = BLOCKROOT.'jteffect/'.$albumfg.'.php';
 if(substr($albumfg,0,5)=='self_') $albumfile =  TPLCURROOT.'selfblock/album/'.$albumfg;
   else  $albumfile =SYSBLOCKROOT.'album/'.$albumfg;

  if(checkfile($albumfile))  require($albumfile);

}


 ?>
</div>

<div class="shopw2">
<h1><?php echo decode($titledetail); ?></h1>


<?php
 
//if($despjj<>'') echo '<div class="despjj">'.web_despdecode($despjj).'</div>';
//$can_title = $can_title==''?'参数':$can_title;
 if($despcan) {
   echo '<div class="despjj">';
   if($can_title<>'') echo '<h3>'.$can_title.'</h3>';
     dmblockid($despcan);
   echo '</div>';
 }


if($shop_price=='y'){
 
  if($detprice<>0)  {
        echo '<div class="detailprice detailpriceold"><span class="w1">'.PRICE_TEXTOLD.'</span><span class="w2"><em>'.PRICE_CURRENCY.'</em><strong class="del">'.$detpriceold.'</strong></span></div>';

          echo '<div class="detailprice detailpricenow"><span class="w1">'.PRICE_TEXT.'</span><span class="w2"><em>'.PRICE_CURRENCY.'</em><strong class="price">'.$detprice.'</strong></span></div>';
        }
       // if($sku<>'') echo '<div class=" ">'.PRICE_MODEL.$sku.'</div>';
       // if($stock<>0) echo '<div class=" ">'.PRICE_STOCK.$stock.'</div>';
        if($detlinktitle<>'' && $detlinkurl<>'') echo '<div class="detaillinkurl dmbtn mt10 moresm"><a class="more " href="'.$detlinkurl.'" target="_blank"><i class="fa fa-shopping-cart"></i> '.$detlinktitle.'</a></div>';


} //hide price part


//when trade, show enquery button
 if($tab_formtitle<>'') echo '<div id="tradeinquery" class="dmbtn mt10 moresm"><a class="more " href="#detailtab">'.$tab_formtitle.'</a></div>';

?>


<?php

//download
echo '<div class="detaildownbtn ">';
echo '<span>';
detail_downloadurl($downloadurl);
echo '</span><span>';
detail_linkmore($linkmore);

echo '</span></div>';


?>




</div>
<div class="c"> </div>

<?php
detail_fontsize();

?>


<div id="detailtab" class="nodetab">

 <div class="nodetabhd">

 <span class="cur">
 <?php
  echo $news_titlev;
?>
 </span>

 <?php
if($nodetab1<>'') echo '<span class="dn">'.$nodetab1.'</span>';
if($nodetab2<>'') echo '<span class="dn">'.$nodetab2.'</span>';
if($nodetab3<>'') echo '<span class="dn">'.$nodetab3.'</span>';

if($tab_formtitle<>'') echo '<span id="tabform" class=" dn">'.$tab_formtitle.'</span>';
?>


   </div><!--end nodetabhd-->



  <div class="nodetabcnt content_size">
  	  <?php //显示 内容?>
  	  <div class="nodetabcntinc">



	<?php
  if($row_abm) {
        if($detailkv<>'' && $nodekvshow=='y'){
            echo '<div class="kv c">';
            echo get_img($detailkv,$title,'div');
            echo '</div>';
        }
  }

//---music
$resmusic = detail_music('node',$nodepidname);
if($resmusic)   require_once BLOCKROOT.'music/'.$musicfg;

  //视频的内容
if($videoid<>'') {
	       if(is_int(strpos($videoid,'|'))){
			   $videoid = explode('|', $videoid);
				foreach ($videoid as $v) {
				 block($v);
        }
		   }
		   else {
				  block($videoid);
		   }


}
else{
   $detailvideo = detail_video('node',$nodepidname);
      if($detailvideo)   block($detailvideo);
}


//---

dmblockid($despv);


?>
 </div>


 <?php

if($nodetab1<>'') {
   echo '<div class="nodetabcntinc  dn">';
     if($desptab1) dmblockid($desptab1);
     else echo NOARTICLE;
   echo '</div>';
}
if($nodetab2<>'') {
   echo '<div class="nodetabcntinc  dn">';
      if($desptab2) dmblockid($desptab2);
      else echo NOARTICLE;
   echo '</div>';
}
if($nodetab3<>'') {
   echo '<div class="nodetabcntinc  dn">';
      if($desptab3) dmblockid($desptab3);
      else echo NOARTICLE;
   echo '</div>';
}

if($tab_formtitle<>'') {
   echo '<div id="tabformtext" class="nodetabcntinc  dn">';
      if($formblockid) block($formblockid);
  echo '</div>';
}
 

?>

  </div><!--end nodetabcnt-->

</div><!--end nodetab-->

</div>


<?php

if($sta_tag=='y') taglink($nodepidname,$tag_title);

 if(substr($nextprev,0,5)=='self_')  $file = TPLCURROOT.'selfblock/nextprev/'.$nextprev;
   else  $file = SYSBLOCKROOT.'nextprev/'.$nextprev;
if(checkfile($file)) require $file;

$file = SYSBLOCKROOT.'relative/vv_relative.php';
if(checkfile($file)) require $file;

 ?>
