<?php





if($edit==1){
	$date=date("Ymd");
	if(!file_exists("../../com_data/UploadFiles")) mkdir("../../com_data/UploadFiles");
	$savepath = "../../com_data/UploadFiles";
	
	//如果删除旧 Banner
    if($DelOldBanner){
	   if($OldBanner){
		  $delpath = "../../com_data/UploadFiles/$OldBanner";
		  @unlink($delpath);
		  $plus .= "Banner='',";
		  $note_bg='';
	   }
	}
	//保存Banner
	if($_FILES['Banner'][size]>10){
	  //删除旧文件
	
	  $upload2 = SaveUploadFile($_FILES['Banner'],$savepath,"gif,jpeg,png,flash");
	  if($upload2['succ']==1){
		  $plus .= "Banner='".$upload2['filename']."',";
		  $note_bg=$upload2['filename'];
		  $mess .= "上传 ".$_FILES[Banner][name]." 成功<br>";

if($OldBanner){
		  $delpath = "../../com_data/UploadFiles/$OldBanner";
		  @unlink($delpath);

	  }

 

	  }else{
		 $mess .= "上传 ".$_FILES[Banner][name]." 失败，原因：".$upload2['msg']."<br>";


  }
	}
	



//如果删除旧 Banner1
    if($DelOldBanner1){
	   if($OldBanner1){
		  $delpath = "../../com_data/UploadFiles/$OldBanner";
		  @unlink($delpath);
		  $plus .= "Banner1='',";
		  $note_bg_qh='';

	   }
	}
	//保存Banner1
	if($_FILES['Banner1'][size]>10){
	  //删除旧文件
	 
	  $upload3 = SaveUploadFile($_FILES['Banner1'],$savepath,"gif,jpeg,png,flash");
	  if($upload3['succ']==1){
		  $plus .= "Banner1='".$upload3['filename']."',";
		 $note_bg_qh=$upload3['filename'];
		  $mess .= "上传 ".$_FILES[Banner1][name]." 成功<br>";

if($OldBanner1){
		  $delpath = "../../com_data/UploadFiles/$OldBanner1";
		  @unlink($delpath);

	  }

 

	  }else{
		 $mess .= "上传 ".$_FILES[Banner1][name]." 失败，原因：".$upload2['msg']."<br>";

  }
	}

	

//如果删除旧 Banner2
    if($DelOldBanner2){
	   if($OldBanner2){
		  $delpath = "../../com_data/UploadFiles/$OldBanner2";
		  @unlink($delpath);
		  $plus .= "Banner2='',";
		 $biaoti_bg='';

	   }
	}
	//保存Banner
	if($_FILES['Banner2'][size]>10){
	  //删除旧文件
	  
	  $upload4 = SaveUploadFile($_FILES['Banner2'],$savepath,"gif,jpeg,png,flash");
	  if($upload4['succ']==1){
		  $plus .= "Banner2='".$upload4['filename']."',";
		 $biaoti_bg=$upload4['filename'];
		  $mess .= "上传 ".$_FILES[Banner2][name]." 成功<br>";

if($OldBanner2){
		  $delpath = "../../com_data/UploadFiles/$OldBanner2";
		  @unlink($delpath);

	  }

 

	  }else{
		 $mess .= "上传 ".$_FILES[Banner2][name]." 失败，原因：".$upload2['msg']."<br>";


  }
	}


//如果删除旧 Banner3
    if($DelOldBanner3){
	   if($OldBanner3){
		  $delpath = "../../com_data/UploadFiles/$OldBanner3";
		  @unlink($delpath);
		  $plus .= "Banner3='',";
		 $biaoti_bg_qh='';

	   }
	}
	//保存Banner3
	if($_FILES['Banner3'][size]>10){
	  //删除旧文件
	
	  $upload5 = SaveUploadFile($_FILES['Banner3'],$savepath,"gif,jpeg,png,flash");
	  if($upload5['succ']==1){
		  $plus .= "Banner3='".$upload5['filename']."',";
		  $biaoti_bg_qh=$upload5['filename'];
		  $mess .= "上传 ".$_FILES[Banner3][name]." 成功<br>";

if($OldBanner3){
		  $delpath = "../../com_data/UploadFiles/$OldBanner3";
		  @unlink($delpath);

	  }

 

	  }else{
		 $mess .= "上传 ".$_FILES[Banner3][name]." 失败，原因：".$upload2['msg']."<br>";


  }
	}



	//更新数据库
	
	//if($_FILES['Banner'][size]>10 || $_FILES['Banner1'][size]>10 ||$_FILES['Banner2'][size]>10|| $_FILES['Banner3'][size]>10){	
if($id=="head"){
	if($tb_bg==1){

 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_note_bg='$note_bg',head_color_bg='$color_bg' where lang='$lang' ";
	}
	else
	{
 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_note_bg='$note_bg',head_color_bg='$color_bg' where IDProduct='$page_id'";
	}  
}
elseif ($id=="header")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_note_bg='$note_bg',header_color_bg='$color_bg' where lang='$lang' ";
    
	}
	else{
$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_note_bg='$note_bg',header_color_bg='$color_bg' where IDProduct='$page_id'";
	}  

}

elseif ($id=="middle")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_note_bg='$note_bg',middle_color_bg='$color_bg' where lang='$lang'";
	}
	else
	{
	$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_note_bg='$note_bg',middle_color_bg='$color_bg' where IDProduct='$page_id'";
	}

}
elseif ($id=="middler")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_note_bg='$note_bg',middler_color_bg='$color_bg' where lang='$lang' ";
    
}
else
	{
$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_note_bg='$note_bg',middler_color_bg='$color_bg' where IDProduct='$page_id'";
   
}



}

elseif ($id=="footer")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_note_bg='$note_bg',footer_color_bg='$color_bg' where lang='$lang'";
	}
	else
	{
	$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_note_bg='$note_bg',footer_color_bg='$color_bg' where IDProduct='$page_id'";
}

}
elseif ($id=="foot")
{
if($tb_bg==1){
$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_note_bg='$note_bg',foot_color_bg='$color_bg' where lang='$lang'";
}
else
	{

$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_note_bg='$note_bg',foot_color_bg='$color_bg' where IDProduct='$page_id'";

}

}
else{



 $sql = "UPDATE notes SET biaoti_bg_qh_repeat='$biaoti_bg_qh_repeat',biaoti_bg_qh='$biaoti_bg_qh',note_bg_qh='$note_bg_qh',biaoti_bg='$biaoti_bg',biaoti_bg_dq='$biaoti_bg_dq',biaoti_bg_qh_dq='$biaoti_bg_qh_dq',biaoti_bg_repeat='$biaoti_bg_repeat',repeat_bg_qh='$repeat_bg_qh',note_bg_qh_dq='$note_bg_qh_dq',repeat_bg='$repeat_bg',note_bg='$note_bg',note_bg_dq='$note_bg_dq',color_bg='$color_bg',color_bgyr='$color_bgyr',color_bgtm='$color_bgtm',link_bgyr='$link_bgyr',link_bgtm='$link_bgtm',link_bg='$link_bg' where id='$id'";



  }  
/*}





 elseif ($DelOldBanner && $_FILES['Banner'][size]<10)
{





if($id=="head"){

	if($tb_bg==1){
 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_note_bg='',head_color_bg='$color_bg' where lang='$lang'";
	}

	else
	{
	 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_note_bg='',head_color_bg='$color_bg' where IDProduct='$page_id'";
	
	
	}
    
}
elseif ($id=="header")
{
	if($tb_bg==1){
$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_note_bg='',header_color_bg='$color_bg' where lang='$lang' ";
	}
	else
	{
	$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_note_bg='',header_color_bg='$color_bg' where IDProduct='$page_id'";
	}

}

elseif ($id=="middle")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_note_bg='',middle_color_bg='$color_bg' where lang='$lang' ";
    }
	else
	{
	$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_note_bg='',middle_color_bg='$color_bg' where IDProduct='$page_id'";
	}

}
elseif ($id=="middler")
{

		if($tb_bg==1){
$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_note_bg='',middler_color_bg='$color_bg' where lang='$lang'";
		}
		else{
		
		$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_note_bg='',middler_color_bg='$color_bg' where IDProduct='$page_id'";
		
		}
}

elseif ($id=="footer")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_note_bg='',footer_color_bg='$color_bg' where lang='$lang'";
    }

	else{
	
	$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_note_bg='',footer_color_bg='$color_bg' where IDProduct='$page_id'";
	
	}

}
elseif ($id=="foot")
{
		if($tb_bg==1){
$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_note_bg='',foot_color_bg='$color_bg' where lang='$lang'";
		}
		else
	{
		$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_note_bg='',foot_color_bg='$color_bg' where IDProduct='$page_id'";
		}

}
else{





 $sql = "UPDATE notes SET biaoti_bg_qh_repeat='$biaoti_bg_qh_repeat',biaoti_bg_qh='$biaoti_bg_qh',note_bg_qh='$note_bg_qh',biaoti_bg='$biaoti_bg',biaoti_bg_dq='$biaoti_bg_dq',biaoti_bg_qh_dq='$biaoti_bg_qh_dq',biaoti_bg_repeat='$biaoti_bg_repeat',repeat_bg_qh='$repeat_bg_qh',note_bg_qh_dq='$note_bg_qh_dq',repeat_bg='$repeat_bg',note_bg='$note_bg',note_bg_dq='$note_bg_dq',color_bg='$color_bg',color_bgyr='$color_bgyr',color_bgtm='$color_bgtm',link_bgyr='$link_bgyr',link_bgtm='$link_bgtm',link_bg='$link_bg' where id='$id'";




 //$sql = "UPDATE notes SET repeat_bg='$repeat_bg',note_bg='',color_bg='$color_bg',link_bg='$link_bg' where id='$id'";


  }

  
}
else
{   





if($id=="head"){

	if($tb_bg==1){
 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_color_bg='$color_bg' where lang='$lang'";
    }

	else{
	
	 $sql = "UPDATE menu SET head_repeat_bg='$repeat_bg',tb_bg='$tb_bg',head_color_bg='$color_bg' where IDProduct='$page_id'";
	
	}
}
elseif ($id=="header")
{

	if($tb_bg==1){
$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_color_bg='$color_bg' where lang='$lang'";
    }
	else{
	
	$sql = "UPDATE menu SET header_repeat_bg='$repeat_bg',tb_bg='$tb_bg',header_color_bg='$color_bg' where IDProduct='$page_id'";
	}

}

elseif ($id=="middle")
{
	if($tb_bg==1){
$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_color_bg='$color_bg' where lang='$lang'";
    }
	else{
	$sql = "UPDATE menu SET middle_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middle_color_bg='$color_bg' where IDProduct='$page_id'";
	
	}

}
elseif ($id=="middler")
{


		if($tb_bg==1){
$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_color_bg='$color_bg' where lang='$lang'";
		}
		else
	{
	$sql = "UPDATE menu SET middler_repeat_bg='$repeat_bg',tb_bg='$tb_bg',middler_color_bg='$color_bg' where IDProduct='$page_id'";
		}

}

elseif ($id=="footer")
{
	if($tb_bg==1){
$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_color_bg='$color_bg' where lang='$lang'";
    }
	else
	{
	$sql = "UPDATE menu SET footer_repeat_bg='$repeat_bg',tb_bg='$tb_bg',footer_color_bg='$color_bg' where IDProduct='$page_id'";
	}

}
elseif ($id=="foot")
{
		if($tb_bg==1){
$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_color_bg='$color_bg' where lang='$lang'";
		}
		else
	{
		$sql = "UPDATE menu SET foot_repeat_bg='$repeat_bg',tb_bg='$tb_bg',foot_color_bg='$color_bg' where IDProduct='$page_id'";
		}

}
else
{
 $sql = "UPDATE notes SET biaoti_bg_qh_repeat='$biaoti_bg_qh_repeat',biaoti_bg_qh='$biaoti_bg_qh',note_bg_qh='$note_bg_qh',biaoti_bg='$biaoti_bg',biaoti_bg_dq='$biaoti_bg_dq',biaoti_bg_qh_dq='$biaoti_bg_qh_dq',biaoti_bg_repeat='$biaoti_bg_repeat',repeat_bg_qh='$repeat_bg_qh',note_bg_qh_dq='$note_bg_qh_dq',repeat_bg='$repeat_bg',note_bg='$note_bg',note_bg_dq='$note_bg_dq',color_bg='$color_bg',color_bgyr='$color_bgyr',color_bgtm='$color_bgtm',link_bgyr='$link_bgyr',link_bgtm='$link_bgtm',link_bg='$link_bg' where id='$id'";


 //$sql = "UPDATE notes SET repeat_bg='$repeat_bg',color_bg='$color_bg',link_bg='$link_bg' where id='$id'";

}*/

	 $db->query($sql);
     
	clear_tpl_files();
	
	$mess .= "<font color='green'><b> 背景设定已被更新 </b></font>";
	
echo "<script>window.parent.location.href='index.php?page_id=$page_id&lang=$lang';</script>";
}
//重新读取会员设定
if ($id=="foot"||$id=="footer" || $id=="head"||$id=="header" ||$id=="middle" ||$id=="middler" ){
$sql = "select * from menu where IDProduct='$page_id'";
}
else
{
$sql = "select * from notes where id='$id'";
}
$noteInfo  = $DB->getdata($sql);
?>


		<?php if ($id=="foot"||$id=="footer" || $id=="head"||$id=="header" ||$id=="middle" ||$id=="middler" ){ ?>	


<form   class="layui-form layui-form-pane" id="form" action="bg.php" method="post" enctype="multipart/form-data" onsubmit="return checkform(this)">

				
	


<div class="layui-form-item">
				 <label class="layui-form-label">背景图片</label>	
				<div class="layui-input-block">

		
					<input name="Banner" class="layui-input"  type="file" class="inputline">
	
		<?if($noteInfo[$id.'_note_bg']){
			 $src = "../../com_data/UploadFiles/".$noteInfo[$id.'_note_bg'];
		 if(preg_match("/(.swf)$/i",$noteInfo[$id.'_note_bg'])){
			
		
			  $imagesize = getimagesize($src);
			  echo "<br><embed src='$src' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$imagesize[0]' height='$imagesize[1]'></embed>";
		   }else{

			  echo "<br><br><img src='$src' height=60px width=60px ><br><br>";
		   }
		 }

else
{  echo "<br><img src='/admin/images/nopic.png' style='border:1px solid #ccc;margin-right:30px;'>";}

?>	
	<input name="OldBanner" type="hidden" value="<?=$noteInfo[$id.'_note_bg']?>">
		
		 <input name="DelOldBanner" id="DelOldBanner"  class="layui-input" type="checkbox" value="1" onchange="this.form.Banner.disabled = this.checked "> <label for='DelOldBanner'><font >删除背景图片</font></label>
					</div>
				</div>






<div class="layui-form-item">
 <label class="layui-form-label">背景重复</label>
				
				<div class="layui-input-block">
				<select name="repeat_bg" >
		<option value="no-repeat" <? if($noteInfo[$id.'_repeat_bg']=="no-repeat"){echo 'selected';}?>>不重复</option>
		<option value="repeat" <? if($noteInfo[$id.'_repeat_bg']=="repeat"){echo 'selected';}?>>重复</option>
		<option value="repeat-x" <? if($noteInfo[$id.'_repeat_bg']=="repeat-x"){echo 'selected';}?>>横向重复</option>
		<option value="repeat-y" <? if($noteInfo[$id.'_repeat_bg']=="repeat-y"){echo 'selected';}?>>众向重复</option>

		</select>
	
					</div>
				</div>


<div class="layui-form-item">
		 <label class="layui-form-label">背景颜色</label>	
				
				<div class="layui-input-block">

			<input type="text" style="background:<?=$noteInfo[$id.'_color_bg']?>" class="layui-input"  name="color_bg" id="c1" value="<?=$noteInfo[$id.'_color_bg']?>">
		<a onclick="clearcolor();">[清除颜色]</a> 
			

					
					</div>
				</div>




<div class="layui-form-item">

					<label class="layui-form-label">同步背景</label>
				<div class="layui-input-block">
			<select name="tb_bg" >
		<option value="0" >不同步</option>
		
<option value="1" <? if($noteInfo['tb_bg']=="1"){echo 'selected';}?>>同步</option>
		</select>
	 

	
					</div>
				</div>

<script>
	function clearcolor(){
document.getElementById("c1").value="";
}
</script>


	<div class="layui-form-item">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<input name="edit" type="hidden" value="1">
<input name="id" type="hidden" value="<?=$id?>">
<input name="page_id" type="hidden" value="<?=$page_id?>">
			<input name="type" type="hidden" value="all">
				<button name="submit" type="submit" class="btn btn-primary radius" ><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button name="reset" type="reset"  class="btn btn-default radius" >&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
 <input name="lang" type="hidden" class="layui-input"  type="text" placeholder="所属语言"  type="radio" value="<?=$lang?>"  >
		
			</div>
		</div>

	</form>





<? } else { ?>








	<form   class="layui-form layui-form-pane" id="form" action="bg.php" method="post" enctype="multipart/form-data" onsubmit="return checkform(this)">
<div id="tab-system" class="HuiTab">

			
			<div class="tabCon">
				
	


<div class="layui-form-item">
<label class="layui-form-label" >模块背景</label>
			<div class="layui-input-inline"  >
				
					<input name="Banner" class="layui-input" type="file" class="layui-upload-file inputline">
		
	
</div>

	<div class="layui-input-inline">


				<select name="repeat_bg" >
		<option value="no-repeat" <? if($noteInfo['repeat_bg']=="no-repeat"){echo 'selected';}?>>不重复</option>
		<option value="repeat" <? if($noteInfo['repeat_bg']=="repeat"){echo 'selected';}?>>重复</option>
		<option value="repeat-x" <? if($noteInfo['repeat_bg']=="repeat-x"){echo 'selected';}?>>横向重复</option>
		<option value="repeat-y" <? if($noteInfo['repeat_bg']=="repeat-y"){echo 'selected';}?>>众向重复</option>

		</select>
	
					</div>


						<div class="layui-input-inline">


				<select name="Banner_dq" >
		<option value="left top" <? if($noteInfo['note_bg_dq']=="left top"){echo 'selected';}?>>左上对齐</option>
		<option value="left center" <? if($noteInfo['note_bg_dq']=="left center"){echo 'selected';}?>>左中对齐</option>
		<option value="left bottom" <? if($noteInfo['note_bg_dq']=="left bottom"){echo 'selected';}?>>左下对齐</option>
		<option value="right top" <? if($noteInfo['note_bg_dq']=="right top"){echo 'selected';}?>>右上对齐</option>
		<option value="right center" <? if($noteInfo['note_bg_dq']=="right center"){echo 'selected';}?>>右中对齐</option>
		<option value="right bottom" <? if($noteInfo['note_bg_dq']=="right bottom"){echo 'selected';}?>>右下对齐</option>
<option value="top center" <? if($noteInfo['note_bg_dq']=="top center"){echo 'selected';}?>>中上对齐</option>
		<option value="center center" <? if($noteInfo['note_bg_dq']=="center center"){echo 'selected';}?>>居中对齐</option>
		<option value="bottom center" <? if($noteInfo['note_bg_dq']=="bottom center"){echo 'selected';}?>>中下对齐</option>


		</select>
	
					</div>


			</div>
<div class="layui-form-item">
				<label class="layui-form-label" >背景切换</label>
		<div class="layui-input-inline"  >
				
					<input name="Banner1" class="layui-input" class="layui-upload-file" type="file" class="layui-upload-file inputline">
		</div>			
			<div class="layui-input-inline">


				<select name="repeat_bgqh" >
		<option value="no-repeat" <? if($noteInfo['repeat_bg_qh']=="no-repeat"){echo 'selected';}?>>不重复</option>
		<option value="repeat" <? if($noteInfo['repeat_bg_qh']=="repeat"){echo 'selected';}?>>重复</option>
		<option value="repeat-x" <? if($noteInfo['repeat_bg_qh']=="repeat-x"){echo 'selected';}?>>横向重复</option>
		<option value="repeat-y" <? if($noteInfo['repeat_bg_qh']=="repeat-y"){echo 'selected';}?>>众向重复</option>

		</select>
	
					</div>


						<div class="layui-input-inline">


				<select name="Banner_dqqh" >
		<option value="left top" <? if($noteInfo['note_bg_qh_dq']=="left top"){echo 'selected';}?>>左上对齐</option>
		<option value="left center" <? if($noteInfo['note_bg_qh_dq']=="left center"){echo 'selected';}?>>左中对齐</option>
		<option value="left bottom" <? if($noteInfo['note_bg_qh_dq']=="left bottom"){echo 'selected';}?>>左下对齐</option>
		<option value="right top" <? if($noteInfo['note_bg_qh_dq']=="right top"){echo 'selected';}?>>右上对齐</option>
		<option value="right center" <? if($noteInfo['note_bg_qh_dq']=="right center"){echo 'selected';}?>>右中对齐</option>
		<option value="right bottom" <? if($noteInfo['note_bg_qh_dq']=="right bottom"){echo 'selected';}?>>右下对齐</option>
<option value="top center" <? if($noteInfo['note_bg_qh_dq']=="top center"){echo 'selected';}?>>中上对齐</option>
		<option value="center center" <? if($noteInfo['note_bg_qh_dq']=="center center"){echo 'selected';}?>>居中对齐</option>
		<option value="bottom center" <? if($noteInfo['note_bg_qh_dq']=="bottom center"){echo 'selected';}?>>中下对齐</option>


		</select>
	
					</div>

			</div>

<div class="layui-form-item">
				<label class="layui-form-label" >标题链接</label>
		<div class="layui-input-inline" >
				
					<input name="Banner2" class="layui-input" type="file" class="layui-upload-file inputline">
		</div>			
				<div class="layui-input-inline">


				<select name="biaoti_bg_repeat" >
		<option value="no-repeat" <? if($noteInfo['biaoti_bg_repeat']=="no-repeat"){echo 'selected';}?>>不重复</option>
		<option value="repeat" <? if($noteInfo['biaoti_bg_repeat']=="repeat"){echo 'selected';}?>>重复</option>
		<option value="repeat-x" <? if($noteInfo['biaoti_bg_repeat']=="repeat-x"){echo 'selected';}?>>横向重复</option>
		<option value="repeat-y" <? if($noteInfo['biaoti_bg_repeat']=="repeat-y"){echo 'selected';}?>>众向重复</option>

		</select>
	
					</div>


						<div class="layui-input-inline">

		<select name="biaoti_bg_dq" >
		<option value="left top" <? if($noteInfo['biaoti_bg_dq']=="left top"){echo 'selected';}?>>左上对齐</option>
		<option value="left center" <? if($noteInfo['biaoti_bg_dq']=="left center"){echo 'selected';}?>>左中对齐</option>
		<option value="left bottom" <? if($noteInfo['biaoti_bg_dq']=="left bottom"){echo 'selected';}?>>左下对齐</option>
		<option value="right top" <? if($noteInfo['biaoti_bg_dq']=="right top"){echo 'selected';}?>>右上对齐</option>
		<option value="right center" <? if($noteInfo['biaoti_bg_dq']=="right center"){echo 'selected';}?>>右中对齐</option>
		<option value="right bottom" <? if($noteInfo['biaoti_bg_dq']=="right bottom"){echo 'selected';}?>>右下对齐</option>
<option value="top center" <? if($noteInfo['biaoti_bg_dq']=="top center"){echo 'selected';}?>>中上对齐</option>
		<option value="center center" <? if($noteInfo['biaoti_bg_dq']=="center center"){echo 'selected';}?>>居中对齐</option>
		<option value="bottom center" <? if($noteInfo['biaoti_bg_dq']=="bottom center"){echo 'selected';}?>>中下对齐</option>


		</select>
	
					</div>
			</div>



<div class="layui-form-item">
				<label class="layui-form-label" >鼠标移入</label>
		<div class="layui-input-inline" >
				
					<input name="Banner3" class="layui-input" type="file" class="layui-upload-file inputline">
		</div>			
				<div class="layui-input-inline">


				<select name="biaoti_bg_qh_repeat" >
		<option value="no-repeat" <? if($noteInfo['biaoti_bg_qh_repeat']=="no-repeat"){echo 'selected';}?>>不重复</option>
		<option value="repeat" <? if($noteInfo['biaoti_bg_qh_repeat']=="repeat"){echo 'selected';}?>>重复</option>
		<option value="repeat-x" <? if($noteInfo['biaoti_bg_qh_repeat']=="repeat-x"){echo 'selected';}?>>横向重复</option>
		<option value="repeat-y" <? if($noteInfo['biaoti_bg_qh_repeat']=="repeat-y"){echo 'selected';}?>>众向重复</option>

		</select>
	
					</div>


						<div class="layui-input-inline">


				<select name="biaoti_bg_qh_dq" >
		<option value="left top" <? if($noteInfo['biaoti_bg_qh_dq']=="left top"){echo 'selected';}?>>左上对齐</option>
		<option value="left center" <? if($noteInfo['biaoti_bg_qh_dq']=="left center"){echo 'selected';}?>>左中对齐</option>
		<option value="left bottom" <? if($noteInfo['biaoti_bg_qh_dq']=="left bottom"){echo 'selected';}?>>左下对齐</option>
		<option value="right top" <? if($noteInfo['biaoti_bg_qh_dq']=="right top"){echo 'selected';}?>>右上对齐</option>
		<option value="right center" <? if($noteInfo['biaoti_bg_qh_dq']=="right center"){echo 'selected';}?>>右中对齐</option>
		<option value="right bottom" <? if($noteInfo['biaoti_bg_qh_dq']=="right bottom"){echo 'selected';}?>>右下对齐</option>
<option value="top center" <? if($noteInfo['biaoti_bg_qh_dq']=="top center"){echo 'selected';}?>>中上对齐</option>
		<option value="center center" <? if($noteInfo['biaoti_bg_qh_dq']=="center center"){echo 'selected';}?>>居中对齐</option>
		<option value="bottom center" <? if($noteInfo['biaoti_bg_qh_dq']=="bottom center"){echo 'selected';}?>>中下对齐</option>


		</select>
	
					</div>
			</div>


			

		<div class="layui-form-item">
<div style="float:left;margin:0 10px;border:1px solid #ddd;padding:10px">
	<?if($noteInfo['note_bg']){
			 $src = "../../com_data/UploadFiles/".$noteInfo['note_bg'];
		 if(preg_match("/(.swf)$/i",$noteInfo['note_bg'])){
			
		
			  $imagesize = getimagesize($src);
			  echo "<br><embed src='$src' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$imagesize[0]' height='$imagesize[1]'></embed>";
		   }else{

			  echo "<img src='$src' height=60px width=60px >";
		   }
		 }

else
{  echo "<img src='/admin/images/nopic.png' height=60px width=60px style='border:1px solid #ccc;margin-right:10px;'>";}

?>		
<input name="OldBanner" type="hidden" value="<?=$noteInfo['note_bg']?>">
		 <input name="DelOldBanner" id="DelOldBanner" type="checkbox" value="1" onchange="this.form.Banner.disabled = this.checked "> <label for='DelOldBanner'><font >删除</font></label>
	</div>	
<div style="float:left;border:1px solid #ddd;padding:10px">

			
		<?if($noteInfo['note_bg_qh']){
			 $src = "../../com_data/UploadFiles/".$noteInfo['note_bg_qh'];
		 if(preg_match("/(.swf)$/i",$noteInfo['note_bg_qh'])){
			
		
			  $imagesize = getimagesize($src);
			  echo "<embed src='$src' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$imagesize[0]' height='$imagesize[1]'></embed>";
		   }else{

			  echo "<img src='$src' height=60px width=60px >";
		   }
		 }

else
{  echo "<img src='/admin/images/nopic.png' style='border:1px solid #ccc;margin-right:10px;' height=60px width=60px>";}

?>			

<input name="OldBanner1" type="hidden" value="<?=$noteInfo['note_bg_qh']?>">
		 <input name="DelOldBanner1" id="DelOldBanner1" type="checkbox" value="1" onchange="this.form.Banner1.disabled = this.checked "> <label for='DelOldBanner1'><font >删除</font></label>
	
				
				
		</div>		

<div style="float:left;border:1px solid #ddd;padding:10px;margin:0 10px">

			
		<?if($noteInfo['biaoti_bg']){
			 $src = "../../com_data/UploadFiles/".$noteInfo['biaoti_bg'];
		 if(preg_match("/(.swf)$/i",$noteInfo['biaoti_bg'])){
			
		
			  $imagesize = getimagesize($src);
			  echo "<embed src='$src' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$imagesize[0]' height='$imagesize[1]'></embed>";
		   }else{

			  echo "<img src='$src' height=60px width=60px >";
		   }
		 }

else
{  echo "<img src='/admin/images/nopic.png' style='border:1px solid #ccc;margin-right:10px;' height=60px width=60px>";}

?>			

<input name="OldBanner2" type="hidden" value="<?=$noteInfo['biaoti_bg']?>">
		 <input name="DelOldBanner2" id="DelOldBanner2" type="checkbox" value="1" onchange="this.form.Banner2.disabled = this.checked "> <label for='DelOldBanner2'><font >删除</font></label>
	
				
				
		</div>	




<div style="float:left;border:1px solid #ddd;padding:10px;margin:0 10px">

			
		<?if($noteInfo['biaoti_bg_qh']){
			 $src = "../../com_data/UploadFiles/".$noteInfo['biaoti_bg_qh'];
		 if(preg_match("/(.swf)$/i",$noteInfo['biaoti_bg_qh'])){
			
		
			  $imagesize = getimagesize($src);
			  echo "<embed src='$src' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='$imagesize[0]' height='$imagesize[1]'></embed>";
		   }else{

			  echo "<img src='$src' height=60px width=60px >";
		   }
		 }

else
{  echo "<img src='/admin/images/nopic.png' style='border:1px solid #ccc;margin-right:10px;' height=60px width=60px>";}

?>			

<input name="OldBanner3" type="hidden" value="<?=$noteInfo['biaoti_bg_qh']?>">
		 <input name="DelOldBanner3" id="DelOldBanner3" type="checkbox" value="1" onchange="this.form.Banner3.disabled = this.checked "> <label for='DelOldBanner3'><font >删除</font></label>
	
				
				
		</div>	


		</div>	







<div class="layui-form-item">
<label class="layui-form-label" >背景颜色</label>
			<div class="layui-input-inline">

				


			<input type="text" style="background:<?=$noteInfo['color_bg']?>"  placeholder="全局背景颜色" class="layui-input"  name="color_bg" id="c1" value="<?=$noteInfo['color_bg']?>">
	
			

					
					</div>

					<div class="layui-input-inline">

				


			<input type="text" style="background:<?=$noteInfo['color_bgyr']?>" class="layui-input"  placeholder="鼠标移入背景颜色" name="color_bgyr" id="c3" value="<?=$noteInfo['color_bgyr']?>" >
	
			

					
					</div>


					
						<div class="layui-input-inline">

	<input type="text"  class="layui-input"  placeholder="透明度：0-1之间，0为完全透明" name="color_bgtm" id="c3" value="<?=$noteInfo['color_bgtm']?>" >
	
	
					</div>
				</div>

<script>
	function clearcolor(){
document.getElementById("c1").value="";
}
</script>
<script>
	function clearcolorc3(){
document.getElementById("c3").value="";
}
</script>


<div class="layui-form-item">
<label class="layui-form-label" >按钮链接</label>
			<div class="layui-input-inline">

				


			<input type="text" style="background:<?=$noteInfo['link_bg']?>" placeholder="按钮及链接背景" class="layui-input"  name="link_bg" id="c2" value="<?=$noteInfo['link_bg']?>">
	
			

					
					</div>

						<div class="layui-input-inline">

				


			<input type="text" style="background:<?=$noteInfo['link_bgyr']?>" placeholder="按钮及链接鼠标移入背景" class="layui-input"  name="link_bgyr" id="c4" value="<?=$noteInfo['link_bgyr']?>">
		
			

					
					</div>
					<div class="layui-input-inline">

	<input type="text"  class="layui-input"  placeholder="透明度：0-1之间，0为完全透明" name="link_bgtm" id="c3" value="<?=$noteInfo['link_bgtm']?>" >
	
	
					</div>
				</div>

<script>
	function clearcolor1(){
document.getElementById("c2").value="";
}
</script>


	<div class="layui-form-item">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<input name="edit" type="hidden" value="1">
<input name="id" type="hidden" value="<?=$id?>">
<input name="page_id" type="hidden" value="<?=$page_id?>">
			<input name="type" type="hidden" value="all">
				<button name="submit" type="submit" class="btn btn-primary radius" ><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button name="reset" type="reset"  class="btn btn-default radius" >&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
 <input name="lang" type="hidden" class="layui-input"  type="text" placeholder="所属语言"  type="radio" value="<?=$lang?>"  >
		
			</div>
		</div>

	</form>

<? }?>

</div>

