<?
include(dirname(__FILE__)."/global.php");



$z_ym = '9djxbj';
$z_ym_hz = 'com';


/*二级域名栏目列表*/
function list_allsub( $table ,  $parentId = 0 ){ //$modify 修改时显示所属分类 $showPId 当前的分类 id
    global $subdb,$webdb;
	$sql="select * from `$table`  where `s_bz_1` = 'sub' AND `parentId` = {$parentId} ORDER BY `list` DESC";
	//echo $sql."<br>";
    $result=mysql_query($sql);
    while($rs=mysql_fetch_array($result)){
	
		  $sub_a=explode('/',$rs["list_html"]);
		  $rs["sub_key"] = $sub_a["1"];

		  if( $parentId != 0 )$subdb[]=$rs;
		  list_allsub( $table , $rs['id'] );
   }
   //return $subdb;
}

list_allsub('w6_sort');
//print_r( $subdb );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--<?php
print <<<EOT
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>展示二级域名</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.table {
	float: left;
	height: 190px;
	width: 500px;
	margin: 10px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #CCCCCC;
}
.table .t1 {
	font-size: 12px;
	font-weight: bold;
	height: 26px;
	line-height: 26px;
}
.table .t2 {
	filter: Gray;
}
.lj {
filter:alpha(opacity=40); 
}
.gz {
	font-size: 12px;
	line-height: 14px;
	margin: 8px;
}
-->
</style>

<script language="Javascript">
function CopyText(obj) {
	ie = (document.all)? true:false
	if (ie){
		var rng = document.body.createTextRange();
		rng.moveToElementText(obj);
		rng.scrollIntoView();
		rng.select();
		rng.execCommand("Copy");
		rng.collapse(false);
		alert(obj.innerText+'被复制成功');
	}
}
</script>

</head>

<body>

<div style="clear:both"></div>
<hr />

<div class="gz">

nginx的二级域名解析设置规则：


<font color="#FF0000" title="点击即可实现复制" onClick="javascript:CopyText(this);">
  <br />
  <br />
server <br />
{ <br />
listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80; <br />
server_name $z_ym.$z_ym_hz; <br />
index index.htm index.html index.php; <br />
root  /home/www/$z_ym; <br />
include location.conf; <br />
error_page 404  /404.html;<br />
} <br />
<br />
server
	<br />
  { <br />
listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80; <br />
server_name www.$z_ym.$z_ym_hz; <br />
index index.htm index.html index.php; <br />
root  /home/www/$z_ym; <br />
include location.conf; <br />
}


<!--
EOT;
foreach($subdb AS $key=>$rs){
print <<<EOT
-->

<br />
<br />
server
	<br />
	{
		<br />
		listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80;
		<br />
		server_name $rs[sub_key].$z_ym.$z_ym_hz;
		<br />
		index index.htm index.html index.php;
		<br />
root  /home/www/$z_ym/1web/$rs[sub_key];
  <br />
  include location.conf;
  <br />
  }

<!--
EOT;
}print <<<EOT
-->

<br />
<br />
server
	<br />
  { <br />
listen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;80; <br />
server_name *.$z_ym.$z_ym_hz; <br />
index index.htm index.html index.php; <br />
root  /home/www/$z_ym; <br />
include location.conf; <br />
}

</font>
</div>




</body>

</html>
<!--
EOT;
?>
-->