<?php 	$ChangecateCompanyLogo2=$_POST['ChangecateCompanyLogo2'];
	$ifpro=strpos($_SERVER['PHP_SELF'],"cate")===false;
	
	$openck=new cktb();
	if($openck->checkfield("ls_products","characteristics","ALTER TABLE  `ls_products` ADD  `characteristics` VARCHAR( 200 ) NULL AFTER  `catePic`"))	$ls_msg = $ls_msg .$openck->ls_msg;
	if($openck->checkfield("ls_products","advantages","ALTER TABLE  `ls_products` ADD  `advantages` VARCHAR( 200 ) NULL AFTER  `characteristics`"))	$ls_msg = $ls_msg .$openck->ls_msg;
	if($openck->checkfield("ls_products","parameters","ALTER TABLE  `ls_products` ADD  `parameters` VARCHAR( 200 ) NULL AFTER  `advantages`"))	$ls_msg = $ls_msg .$openck->ls_msg;

?>
<style type="text/css"> 
div,ul,li {margin:0;padding:0;}
ul{list-style-type:none;}
#fo li{ width:200px;}
.tul { line-height: 30px; }
.tul li { width:20%; min-height:30px; line-min-height:30px; text-align:center; color:#0c3d66; background:#e3e6ed; font-size:14px; float:left; cursor: hand; !important;cursor: pointer; margin-right:10px; border: 1px solid #999; }
.tul .check { font-weight: bold; border-top-width: 1px; border-right-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-top-color: #999; border-right-color: #CCC; border-left-color: #CCC; border-bottom-width: 0px; border-bottom-style: solid; background-color: #f4f4f4; }
.slist { width:100%; min-height:170px;margin:auto;}
#cont{
	width:<?=$ifpro?96:100?>%;
	min-height:200px;
}
#nei{ clear:both; width:100%; min-height:160px; }
</style>
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery('.tul li').click(
                function(){
                        jQuery(this).siblings().removeClass("check");
                        jQuery(this).addClass("check");
                        var tid = "#" + jQuery(this).attr('id') + "_cont";
						
                        jQuery(tid).siblings().hide();
                        jQuery(tid).show();
                        
                },
                function(){}
        );
});
	
</script>
<tr >
	<td style="padding-left:15px;" width="9%">更多信息</td>
	<td colspan="2" style="padding-left:<?=$ifpro?3:0?>em;">

<?php $id=$_GET['id'];
if( $ifpro?$showprochara!="":$showcatechara!=""  ) $ifchara=true ;
if( $ifpro?$showproadvan!="":$showcateadvan!=""  ) $ifadvan=true ;
if( $ifpro?$showpropara!="":$showcatepara!=""  ) $ifpara=true ;

if($id == "")
{
?>
<div id="cont">
	<ul class="tul">
		<?php if($ifchara){?><li class="check" id="tabc1"><?=$ifpro?$showprochara:$showcatechara?></li><?php } ?>
		<?php if($ifadvan){?><li id="tabc2"><?=$ifpro?$showcateadvan:$showcateadvan?></li><?php } ?>
		<?php if($ifpara){?><li id="tabc3"><?=$ifpro?$showpropara:$showcatepara?></li><?php } ?>
	</ul>
	<div id="nei">
		<div class="slist" id="tabc1_cont">
        	<textarea name="characteristics" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['characteristics'] ?></textarea>
		</div>
		<div class="slist" id="tabc2_cont" style="display:none;">
        	<textarea name="advantages" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['advantages'] ?></textarea>
		</div>
		<div class="slist" id="tabc3_cont" style="display:none;">
        	<textarea name="parameters" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['parameters'] ?></textarea>
		</div>
	</div>
</div>
<?php }else{ 
	$products_sql="select * from ls_products where ID=".$id." ";
	$products_query=$opendb->query($products_sql);
	$products_rows=mysqli_fetch_assoc($products_query);
?>
<div id="cont">
	<ul class="tul">
		<?php if($ifchara){?><li class="check" id="tabc1"><?=$ifpro?$showprochara:$showcatechara?></li><?php } ?>
		<?php if($ifadvan){?><li id="tabc2"><?=$ifpro?$showcateadvan:$showcateadvan?></li><?php } ?>
		<?php if($ifpara){?><li id="tabc3"><?=$ifpro?$showpropara:$showcatepara?></li><?php } ?>
	</ul>
	<div id="nei">
		<div class="slist" id="tabc1_cont">
        	<textarea name="characteristics" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['characteristics'] ?></textarea>
		</div>
		<div class="slist" id="tabc2_cont" style="display:none;">
        	<textarea name="advantages" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['advantages']?></textarea>
		</div>
		<div class="slist" id="tabc3_cont" style="display:none;">
        	<textarea name="parameters" style="width:100%;height:400px;visibility:hidden;"><?php echo $products_rows['parameters']?></textarea>
		</div>
	</div>
</div>
<?php }?>
	</td>
</tr>