<?php require 'authentication_manager.php'; ?>
<style type="text/css">
<!--
.newcolumn { width:100%; /*float:left;*/ margin-left:0; clear:both; }
.newclass { margin:0; padding:3px 0; clear:both; overflow:hidden; border-bottom:1px #EEEEEE dotted; }
.block_span { font-size:12px; vertical-align:middle; display:inline-block; *display:inline; *zoom:1; vertical-align:middle; line-height:normal; text-align:left; overflow:hidden; }
.bjcolor { height:32px; }
.n_nav { margin-top:10px; }
.n_nav td { padding:5px 0; line-height:normal; background-color:#A9B6D3; font-size:12px; color:#FFFFFF; }
.gray_err { color:#999999; }
.gray_err2 { color:#333333; }
a.caozuo { text-decoration:none; }
.column_name { width:188px; white-space:nowrap; }
.area_ { margin-bottom:10px; padding:5px; padding-top:10px; border:1px #99FF33 solid; }
.s_m_is { text-decoration:line-through; }
.tool_area { width:18px; height:18px; background-image:url(readonly/images/tool_area.gif); background-repeat:no-repeat; }

-->
</style>
<?php
$tool_area = array();
$tool_align['left'] = '<span class="block_span tool_area" style="background-position:0 0;" title="字靠左排列" onmouseover="sSD(this,event);"></span>';
$tool_align['center'] = '<span class="block_span tool_area" style="background-position:-18px 0;" title="字居中排列" onmouseover="sSD(this,event);"></span>';
$tool_align['justify'] = '<span class="block_span tool_area" style="background-position:-36px 0;" title="字两端对齐（2行以上生效）" onmouseover="sSD(this,event);"></span>';
$tool_align['right'] = '<span class="block_span tool_area" style="background-position:-54px 0;" title="字靠右排列" onmouseover="sSD(this,event);"></span>';

$tool_open['new'] = '<span class="block_span tool_area" style="background-position:-72px 0;" title="打开新页面" onmouseover="sSD(this,event);"></span>';
$tool_open['in'] = '<span class="block_span tool_area" style="background-position:-90px 0;" title="打开弹窗内容" onmouseover="sSD(this,event);"></span>';

?>
<script type="text/javascript">
<!--
//添加链接

function addClass(class_title){
  //class_title=parseInt(class_title);
  //var tar=obj.parentNode;
  var par=$('class_'+class_title+'');
  var num=(new Date()).valueOf();
  var newDiv=document.createElement('DIV');
  newDiv.id='class_'+class_title+'_'+num+'';
  newDiv.className='newclass';
  newDiv.title=num;
  newDiv.innerHTML=' <input type="hidden" name="class['+class_title+']" title="'+num+'" /> \
<span class="block_span" style="width:200px;"><textarea rows="2" class="column_name" name="class_name['+class_title+']['+num+']"></textarea></span> \
<span class="block_span" style="width:50px;"><span class="block_span orangeword"><input onclick="addClassHttpNum(this,\''+class_title+'_'+num+'\');" type="checkbox" class="checkbox" name="class_index_show['+class_title+']['+num+']" id="class_index_show_'+class_title+'_'+num+'" value="1" checked="checked" /><strong>⇑</strong></span></span> \
<span class="block_span" style="width:145px;"> \
  <span name="class_http_num_'+class_title+'[]" id="class_http_num_'+class_title+'_'+num+'"> \
<input type="hidden" id="class_http_num['+class_title+']['+num+']" name="class_http_num['+class_title+']['+num+']" value="1" />\
<button type="button" name="class_http_num['+class_title+']['+num+']_" id="class_http_num'+class_title+'_'+num+'" onClick="radioClick(this, \'1\'); $(\'class_http_num_['+class_title+']['+num+']\').focus();" class="button checked">自动截取展示</button> <input type="text" id="class_http_num_['+class_title+']['+num+']" style="width:20px; height:20px; padding:0;" value="1" title="限填正整数" onmouseover="sSD(this,event);" onfocus="radioClick($(\'class_http_num'+class_title+'_'+num+'\'), this.value);" onblur="isDigit(this,\'1\', 0); radioClick($(\'class_http_num'+class_title+'_'+num+'\'), this.value);" />行<br />\
<button type="button" name="class_http_num['+class_title+']['+num+']_"" onClick="radioClick(this, \'-2\');" class="button">按分页数(如分)</button><br />\
<button type="button" name="class_http_num['+class_title+']['+num+']_"" onClick="radioClick(this, \'0\');" class="button">展示所有</button>\
  </span> \
</span> \
<span class="block_span" style="width:150px;"> \
  <input type="hidden" id="class_bj['+class_title+']['+num+']" name="class_bj['+class_title+']['+num+']" value="0" />\
  <button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, \'0\');" class="button checked" style="width:22px;">无</button><br />'+(class_title=='homepage'?'<span class="butoonbj" title="注：此处加背景后，对齐方式为平铺两端对齐，将不按上面的对齐方式；否则取消背景" onmouseover="sSD(this,event);">':'<span class="butoonbj">')+'<button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 10);" class="button"><span title="白" class="block_span qd10"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 1);" class="button"><span class="block_span qd1"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 2);" class="button"><span class="block_span qd2"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 3);" class="button"><span class="block_span qd3"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 4);" class="button"><span class="block_span qd4"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 5);" class="button"><span class="block_span qd5"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 6);" class="button"><span class="block_span qd6"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 7);" class="button"><span class="block_span qd7"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 8);" class="button"><span class="block_span qd8"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 9);" class="button"><span class="block_span qd9"></span></button></span>\
</span>\
<span class="block_span" style="width:100px;"> \
  <input type="hidden" id="class_http_type['+class_title+']['+num+']" name="class_http_type['+class_title+']['+num+']" value="0" />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, \'0\');" class="button checked">站名排列</button><br />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, \'1\');" class="button">弹窗简介</button><br />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, 2);" class="button">流布局砌砖</button>\
</span> \
<a class="caozuo" href="javascript:void(0)" onclick="removeOption(this);return false;" title="删除">╳</a> \
<a class="caozuo" href="javascript:void(0);" title="插入" onclick="insertClass(this,\''+class_title+'\');return false;">↖</a> \
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="upClass(this,\''+class_title+'\');return false;">↑</a> \
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="downClass(this,\''+class_title+'\');return false;">↓</a> \
';
  par.insertBefore(newDiv, null);
  num=num+1;
}

//插入
function insertClass(obj,class_title){
  var tar=obj.parentNode;
  var par=$('class_'+class_title+'');
  var num=(new Date()).valueOf();
  var newDiv=document.createElement('DIV');
  newDiv.id='class_'+class_title+'_'+num+'';
  newDiv.className='newclass';
  newDiv.title=num;
  newDiv.innerHTML=' <input type="hidden" name="class['+class_title+']" title="'+num+'" /> \
<span class="block_span" style="width:200px;"><textarea rows="2" class="column_name" name="class_name['+class_title+']['+num+']"></textarea></span> \
<span class="block_span" style="width:50px;"><span class="block_span orangeword"><input onclick="addClassHttpNum(this,\''+class_title+'_'+num+'\');" type="checkbox" class="checkbox" name="class_index_show['+class_title+']['+num+']" id="class_index_show_'+class_title+'_'+num+'" value="1" checked="checked" /><strong>⇑</strong></span></span> \
<span class="block_span" style="width:145px;"> \
  <span name="class_http_num_'+class_title+'[]" id="class_http_num_'+class_title+'_'+num+'"> \
<input type="hidden" id="class_http_num['+class_title+']['+num+']" name="class_http_num['+class_title+']['+num+']" value="1" />\
<button type="button" name="class_http_num['+class_title+']['+num+']_" id="class_http_num'+class_title+'_'+num+'" onClick="radioClick(this, \'1\'); $(\'class_http_num_['+class_title+']['+num+']\').focus();" class="button checked">自动截取展示</button> <input type="text" id="class_http_num_['+class_title+']['+num+']" style="width:20px; height:20px; padding:0;" value="1" title="限填正整数" onmouseover="sSD(this,event);" onfocus="radioClick($(\'class_http_num'+class_title+'_'+num+'\'), this.value);" onblur="isDigit(this,\'1\', 0); radioClick($(\'class_http_num'+class_title+'_'+num+'\'), this.value);" />行<br />\
<button type="button" name="class_http_num['+class_title+']['+num+']_"" onClick="radioClick(this, \'-2\');" class="button">按分页数(如分)</button><br />\
<button type="button" name="class_http_num['+class_title+']['+num+']_"" onClick="radioClick(this, \'0\');" class="button">展示所有</button>\
  </span> \
</span> \
<span class="block_span" style="width:150px;"> \
  <input type="hidden" id="class_bj['+class_title+']['+num+']" name="class_bj['+class_title+']['+num+']" value="0" />\
  <button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, \'0\');" class="button checked" style="width:22px;">无</button><br />'+(class_title=='homepage'?'<span class="butoonbj" title="注：此处加背景后，对齐方式为平铺两端对齐，将不按上面的对齐方式；否则取消背景" onmouseover="sSD(this,event);">':'<span class="butoonbj">')+'<button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 10);" class="button"><span title="白" class="block_span qd10"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 1);" class="button"><span class="block_span qd1"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 2);" class="button"><span class="block_span qd2"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 3);" class="button"><span class="block_span qd3"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 4);" class="button"><span class="block_span qd4"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 5);" class="button"><span class="block_span qd5"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 6);" class="button"><span class="block_span qd6"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 7);" class="button"><span class="block_span qd7"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 8);" class="button"><span class="block_span qd8"></span></button><button type="button" name="class_bj['+class_title+']['+num+']_" onClick="radioClick(this, 9);" class="button"><span class="block_span qd9"></span></button></span>\
</span>\
<span class="block_span" style="width:100px;"> \
  <input type="hidden" id="class_http_type['+class_title+']['+num+']" name="class_http_type['+class_title+']['+num+']" value="0" />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, \'0\');" class="button checked">站名排列</button><br />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, \'1\');" class="button">弹窗简介</button><br />\
  <button type="button" name="class_http_type['+class_title+']['+num+']_" onClick="radioClick(this, 2);" class="button">流布局砌砖</button>\
</span> \
<a class="caozuo" href="javascript:void(0)" onclick="removeOption(this);return false;" title="删除">╳</a> \
<a class="caozuo" href="javascript:void(0);" title="插入" onclick="insertClass(this,\''+class_title+'\');return false;">↖</a> \
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="upClass(this,\''+class_title+'\');return false;">↑</a> \
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="downClass(this,\''+class_title+'\');return false;">↓</a> \
';
  par.insertBefore(newDiv,tar);
}

//排序：链接 向上
function upClass(obj,class_title){
  var tar=obj.parentNode;
  var par=$('class_'+class_title+'');
  var prevObj=tar.previousSibling;
  while(prevObj!=null && prevObj.nodeType!=1){
    prevObj=prevObj.previousSibling;
  }
  if(prevObj==null){
    alert('已是最上级！');
    return;
  }else{
    try{par.insertBefore(tar,prevObj);}catch(err){alert('向上移动失败！请稍候再试');return;}
    //par.removeChild(tar);
  }
}

//排序：链接 向下
function downClass(obj,class_title){
  var tar=obj.parentNode;
  var par=$('class_'+class_title+'');
  var nextObj=tar.nextSibling;
  while(nextObj!=null && nextObj.nodeType!=1){
    nextObj=nextObj.nextSibling;
  }
  if(nextObj==null){
    alert('已是最下级！');
    return;
  }
  var endObj;
  if(nextObj!=null){
    var nextnextObj=nextObj.nextSibling;
    while(nextnextObj!=null && nextnextObj.nodeType!=1){
      nextnextObj=nextnextObj.nextSibling;
    }
    var endObj=nextnextObj!=null?nextnextObj:null;
  }else{
    endObj=null;
  }
  try{par.insertBefore(tar,endObj);}catch(err){alert('向下移动失败！请稍候再试');return;}
  //par.removeChild(tar);
}















//添加频道
function addColumn(cid){
  var par=$('area'+cid);
  var date=new Date();
  var num1=date.getFullYear()+''+(date.getMonth()+1).toString().replace(/^(\d{1})$/,'0$1')+''+date.getDate().toString().replace(/^(\d{1})$/,'0$1')+''+date.getHours().toString().replace(/^(\d{1})$/,'0$1')+''+date.getMinutes().toString().replace(/^(\d{1})$/,'0$1')+'';
  var num2=date.getSeconds().toString().replace(/^(\d{1})$/,'0$1');
  if($('class_'+num1+num2+'')==null){
    num=num1+num2;
  }else{
    num=num1+((parseInt(num2)+1).toString().replace(/^(\d{1})$/,'0$1'));
  }
  
  if (cid != '') {
    num = cid;
  }
/*
  var tar=document.getElementsByName("column[]");
  var end=tar.length;
  num=(end>0) ? parseInt(tar[end-3].title)+1 : 0;
*/


  var newDiv=document.createElement('DIV');
  newDiv.id='column_'+num+'';
  newDiv.style.marginBottom='7px';
  newDiv.title=num;
  newDiv.innerHTML='<input type="hidden" name="column[]" title="'+num+'" />\
  <b>频道</b> <input type="text" name="column_name['+num+']" style="width:150px;" /> \
<span class="gray_err"> \
<input type="checkbox" class="checkbox" name="column_atside['+num+']" value="1" onclick="runClassSide(this, \''+num+'\')" />置于边栏（——对齐方式：<input type="hidden" id="column_atside_align['+num+']" name="column_atside_align['+num+']" value="1" /> \
<button type="button" name="column_atside_align['+num+']_" onClick="radioClick(this, 1);" class="button checked"><?php echo $tool_align['left']; ?></button> \
<button type="button" name="column_atside_align['+num+']_" onClick="radioClick(this, 2);" class="button"><?php echo $tool_align['center']; ?></button> \
<button type="button" name="column_atside_align['+num+']_" onClick="radioClick(this, 3);" class="button"><?php echo $tool_align['justify']; ?></button> \
<button type="button" name="column_atside_align['+num+']_" onClick="radioClick(this, 4);" class="button"><?php echo $tool_align['right']; ?></button> \
——打开方式：<input type="hidden" id="column_atside_type['+num+']" name="column_atside_type['+num+']" value="2" />\
<button type="button" name="column_atside_type['+num+']_" onClick="radioClick(this, 1);" class="button checked"><?php echo $tool_open['in']; ?></button> [<a href="class_current.php?column_id=mingz&class_id=1" onclick="addSubmitSafe(1);$(\'addCFrame\').style.display=\'block\';" target="addCFrame" title="注意：别在意进入什么页面，这只是示例" onmouseover="sSD(this,event);">示例</a>]\
<button type="button" name="column_atside_type['+num+']_" onClick="radioClick(this, 2);" class="button"><?php echo $tool_open['new']; ?></button> [<a href="login.php" target="_blank" title="注意：别在意进入什么页面，这只是示例" onmouseover="sSD(this,event);">示例</a>] ）\
</span> \
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="n_nav">\
  <tr>\
    <td width="200" align="center">频道下属栏目<br />（可换行）</td>\
    <td width="50" align="center">首页<br />展示</td>\
    <td width="150" align="center">该栏目在首页推荐展示网址数量</td>\
    <td width="150" align="center">风格修饰<br />（背景着色）</td>\
    <td width="100" align="center">子页面网址排列模式（<a href="?get=style#httpType" target="_blank">说明</a>）</td>\
    <td align="center">操作</td>\
  </tr>\
</table>\
  <div id="class_'+num+'" class="newcolumn"></div><div style="height:0px; overflow:hidden;clear:both;"></div>\
  <button type="button" onclick="javascript:addClass(\''+num+'\');">为此频道添加栏目</button> '+((cid!='homepage') ? '<button type="button" onclick="javascript:removeOption(this);">删除此频道</button>' : '')+' '+((cid=='')?'<button type="button" onclick="javascript:upColumn(this);" title="上移">↑</button> <button type="button" onclick="javascript:downColumn(this);" title="下移">↓</button>' : '')+'';
  par.insertBefore(newDiv, null);
  //num=num+1;
}

//排序：栏目分类 向上
function upColumn(obj){
  var par=$('area');
  var tar=obj.parentNode;
  var prevObj=tar.previousSibling;
  while(prevObj!=null && prevObj.nodeType!=1){
    prevObj=prevObj.previousSibling;
  }
  if(prevObj==null){
    alert('已是最上级！');
    return;
  }
/*
  var O_id=tar.title;
  var A_id=prevObj.title;

  tar.id='column_'+A_id+'';
  tar.title=''+A_id+'';

  tar.innerHTML=tar.innerHTML.replace(new RegExp('name="column_name\\\['+O_id+'\\\]','g'),'name="column_name['+A_id+']');
  tar.innerHTML=tar.innerHTML.replace(new RegExp('name="class\\\['+O_id+'\\\]','g'),'name="class['+A_id+']');
  tar.innerHTML=tar.innerHTML.replace(new RegExp('name="class_name\\\['+O_id+'\\\]','g'),'name="class_name['+A_id+']');
  tar.innerHTML=tar.innerHTML.replace(new RegExp('id="class_'+O_id+'','g'),'id="class_'+A_id+'');
  tar.innerHTML=tar.innerHTML.replace(new RegExp('javascript:addClass\\\(\\\''+O_id+'\\\'\\\)','g'),'javascript:addClass(\''+A_id+'\')');

  prevObj.id='column_'+O_id+'';
  prevObj.title=''+O_id+'';
  prevObj.innerHTML=prevObj.innerHTML.replace(new RegExp('name="column_name\\\['+A_id+'\\\]','g'),'name="column_name['+O_id+']');
  prevObj.innerHTML=prevObj.innerHTML.replace(new RegExp('name="class\\\['+A_id+'\\\]','g'),'name="class['+O_id+']');
  prevObj.innerHTML=prevObj.innerHTML.replace(new RegExp('name="class_name\\\['+A_id+'\\\]','g'),'name="class_name['+O_id+']');
  prevObj.innerHTML=prevObj.innerHTML.replace(new RegExp('id="class_'+A_id+'','g'),'id="class_'+O_id+'');
  prevObj.innerHTML=prevObj.innerHTML.replace(new RegExp('javascript:addClass\\\(\\\''+A_id+'\\\'\\\)','g'),'javascript:addClass(\''+O_id+'\')');
*/
  try{par.insertBefore(tar,prevObj);}catch(err){alert('向上移动失败！请稍候再试');return;}
  //par.removeChild(tar);

}

//排序：栏目分类 向下
function downColumn(obj){
  var par=$('area');
  var tar=obj.parentNode;
  var nextObj=tar.nextSibling;
  while(nextObj!=null && nextObj.nodeType!=1){
    nextObj=nextObj.nextSibling;
  }
  if(nextObj==null){
    alert('已是最下级！');
    return;
  }
  var endObj;
  if(nextObj!=null){
    var nextnextObj=nextObj.nextSibling;
    while(nextnextObj!=null && nextnextObj.nodeType!=1){
      nextnextObj=nextnextObj.nextSibling;
    }
    var endObj=nextnextObj!=null?nextnextObj:null;
  }else{
    endObj=null;
  }
  try{par.insertBefore(tar,endObj);}catch(err){alert('向下移动失败！请稍候再试');return;}
  //par.removeChild(tar);
}

//删除栏目
function removeOption(obj){
  var tar=obj.parentNode;
  var par=tar.parentNode;
  //if(confirm('确定删除此频道吗？！')){
    try{
      par.removeChild(tar);
    }catch(err){
    }
  //}
}

function frTo(fid){
  if($('class_name_fr')==null || $('class_name_to')==null){
    alert('出错！暂停此项');
    return false;
  }
  var fr=$('class_name_fr').value;
  var to=$('class_name_to').value;
  if(fr==''){
    alert('请选择起始小类！');
    return false;
  }
  if(to==''){
    alert('请选择目标小类！');
    return false;
  }
  if(fr==to){
    alert('不能重名！');
    return false;
  }
  if($('class_'+fr+'')==null){
    alert('起始小类不存在！');
    return false;
  }
  if($('class_'+to+'')==null){
    alert('目标小类不存在！');
    return false;
  }
  return true;
}

-->
</script>
<script>
// 只允许输入4-8数字
function isDigit4_8(obj, starVal) {
  if (!/^[45678]$/.test(obj.value)) {
    alert('只允许输入4-8的整数');
    obj.value = starVal;
    //obj.focus();
  }
}

function addClassHttpNum(o, id) {
  var id_ = '['+(id.replace(/\_/g, ']['))+']';
  if (o.checked==true){
    $('class_http_num_'+id+'').style.display = '';
    if (parseInt($('class_http_num'+id_+'').value) == -1) {
      $('class_http_num'+id_+'').value = 1;
    }
    o.parentNode.className = 'block_span orangeword';
  } else {
    $('class_http_num_'+id+'').style.display = 'none';
    o.parentNode.className = 'block_span grayword';
  }
}

function runClassSide(o, id) {
  if (o.checked == true){
    var styleDis = 'none';
    o.parentNode.className = 'gray_err2';
  } else {
    var styleDis = '';
    o.parentNode.className = 'gray_err';
  }
  var a = document.getElementsByName('class_http_num_'+id+'[]');
  if (a != null && a.length > 0) {
    for (var i = 0; i < a.length; i++) {
      var reg = new RegExp('class_http_num_'+id+'_', 'ig');
      var selfId = a[i].id.replace(reg, '');
      if ($('class_index_show_'+id+'_'+selfId+'')!=null && $('class_index_show_'+id+'_'+selfId+'').checked == true) {
        if ($('class_http_num_'+id+'_'+selfId+'')!=null) {
          $('class_http_num_'+id+'_'+selfId+'').style.display = styleDis;
        }
      } else {
        continue;
      }
    }
  }
}

</script>




        <?php
@ require 'writable/set/set_area.php';
//unset($web['area']['mingz']);
//unset($web['area']['homepage']);

//@ksort($web['area']);

$text = array();
foreach ((array)$web['area'] as $fid => $f) {
  $indexclass_n = abs($f['name'][2]);
  $text[$fid] .= '
  <div id="column_'.$fid.'" style="margin-bottom:7px" title="'.$fid.'">
    <input type="hidden" name="column[]" title="'.$fid.'" value="'.$f['name'][0].'" />
    <b>频道</b> <input type="text" name="column_name['.$fid.']" value="'.$f['name'][0].'" style="width:150px;" /> ';
  if ($fid !== 'homepage') {
    $atsite = str_split($f['name'][3]);
    $text[$fid] .= '<span class="'.($f['name'][3]!=0?'gray_err2':'gray_err').'"> 
<input type="checkbox" class="checkbox" name="column_atside['.$fid.']" value="1" onclick="runClassSide(this, \''.$fid.'\')"'.($atsite[0]!=0 ? ' checked="checked"' : '').' />置于边栏（——对齐方式：<input type="hidden" id="column_atside_align['.$fid.']" name="column_atside_align['.$fid.']" value="'.($atsite[1]!=1&&$atsite[1]!=2&&$atsite[1]!=3&&$atsite[1]!=4 ? 1:$atsite[1]).'" />
<button type="button" name="column_atside_align['.$fid.']_" onClick="radioClick(this, 1);" class="button'.($atsite[1]!=2&&$atsite[1]!=3&&$atsite[1]!=4 ? ' checked':'').'">'.$tool_align['left'].'</button> 
<button type="button" name="column_atside_align['.$fid.']_" onClick="radioClick(this, 2);" class="button'.($atsite[1]==2 ? ' checked':'').'">'.$tool_align['center'].'</button> 
<button type="button" name="column_atside_align['.$fid.']_" onClick="radioClick(this, 3);" class="button'.($atsite[1]==3 ? ' checked':'').'">'.$tool_align['justify'].'</button> 
<button type="button" name="column_atside_align['.$fid.']_" onClick="radioClick(this, 4);" class="button'.($atsite[1]==4 ? ' checked':'').'">'.$tool_align['right'].'</button> 
——打开方式：<input type="hidden" id="column_atside_type['.$fid.']" name="column_atside_type['.$fid.']" value="'.($atsite[0]!=1&&$atsite[0]!=2?2:$atsite[0]).'" />
<button type="button" name="column_atside_type['.$fid.']_" onClick="radioClick(this, 1);" class="button'.($atsite[0]==1 ? ' checked':'').'">'.$tool_open['in'].'</button> [<a href="class_current.php?column_id=mingz&class_id=1" onclick="addSubmitSafe(1);$(\'addCFrame\').style.display=\'block\';" target="addCFrame" title="注意：别在意进入什么页面，这只是示例" onmouseover="sSD(this,event);">示例</a>]
<button type="button" name="column_atside_type['.$fid.']_" onClick="radioClick(this, 2);" class="button'.($atsite[0]!=1 ? ' checked':'').'">'.$tool_open['new'].'</button> [<a href="login.php" target="_blank" title="注意：别在意进入什么页面，这只是示例" onmouseover="sSD(this,event);">示例</a>] ）

</span>';
    $span1 = '<span class="butoonbj">';
    $span2 = '</span>';
  } else {
    $span1 = '<span class="butoonbj" title="注：此处加背景后，对齐方式为平铺两端对齐，将不按上面的对齐方式；否则取消背景" onmouseover="sSD(this,event);">';
    $span2 = '</span>';

  }
  $text[$fid] .= '
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="n_nav">
  <tr>
    <td width="200" align="center">频道下属栏目<br />（可换行）</td>
    <td width="50" align="center">首页<br />展示</td>
    <td width="150" align="center">该栏目在首页推荐展示网址数量</td>
    <td width="150" align="center">风格修饰<br />（背景着色）</td>
    <td width="100" align="center">子页面网址排列模式（<a href="?get=style#httpType" target="_blank">说明</a>）</td>
    <td align="center">操作</td>
  </tr>
</table>

    <div id="class_'.$fid.'" class="newcolumn">';
  $opti .= '<optgroup label="'.$f['name'][0].'">';

  unset($web['area'][$fid]['name']);



/*
$web['area']['mingz']['name'] = array('0频道名', 1拼音, 2详展数量（新版被取消）, 3置于边栏（模式1|2）);
$web['area']['mingz']['1'] =    array('0栏目名', 1拼音, 2着色背景,               3列表模式, 4首页展示否（如展示，网址数量（-1不展示/-2按分页|0所有|1-n行））);
*/

  $step_indexclass_n = 0;
  foreach ((array)$web['area'][$fid] as $cid => $c) {
    $step_indexclass_n++;
    
    $text[$fid] .= '<div id="class_'.$fid.'_'.$cid.'" class="newclass" title="'.$cid.'">
	  <input type="hidden" name="class['.$fid.']" title="'.$cid.'" />';

    if ($c[4] != -1 || $step_indexclass_n<=$indexclass_n) {
      $class_http_num = !empty($f['name'][3]) ? 'none' : '';
      $class_index_is = '<span class="block_span orangeword" title="首页主体展示" onmouseover="sSD(this,event);"><input onclick="addClassHttpNum(this,\''.$fid.'_'.$cid.'\');" type="checkbox" class="checkbox" name="class_index_show['.$fid.']['.$cid.']" id="class_index_show_'.$fid.'_'.$cid.'" value="1" checked="checked" /><strong>⇑</strong></span>';
    } else {
      $class_http_num = 'none';
      $class_index_is = '<span class="block_span grayword" title="首页主体展示" onmouseover="sSD(this,event);"><input onclick="addClassHttpNum(this,\''.$fid.'_'.$cid.'\');" type="checkbox" class="checkbox" name="class_index_show['.$fid.']['.$cid.']" id="class_index_show_'.$fid.'_'.$cid.'" value="1" /><strong>⇑</strong></span>';
    }

    $text[$fid] .= '
<span class="block_span" style="width:200px;"><textarea rows="2" class="column_name" name="class_name['.$fid.']['.$cid.']">'.($c[0]).'</textarea></span>

<span class="block_span" style="width:50px;">'.$class_index_is.'</span>

<span class="block_span" style="width:145px;">
  <span name="class_http_num_'.$fid.'[]" id="class_http_num_'.$fid.'_'.$cid.'" style="display:'.$class_http_num.';">

<input type="hidden" id="class_http_num['.$fid.']['.$cid.']" name="class_http_num['.$fid.']['.$cid.']" value="'.$c[4].'" />

<button type="button" name="class_http_num['.$fid.']['.$cid.']_" id="class_http_num'.$fid.'_'.$cid.'" onClick="radioClick(this, \'1\'); $(\'class_http_num_['.$fid.']['.$cid.']\').focus();" class="button'.($c[4]!=0&&$c[4]!=-2?' checked':'').'">自动截取展示</button> <input type="text" id="class_http_num_['.$fid.']['.$cid.']" style="width:20px; height:20px; padding:0;" value="'.(is_numeric($c[4]) && $c[4]>0?(int)$c[4]:1).'" title="限填正整数" onmouseover="sSD(this,event);" onfocus="radioClick($(\'class_http_num'.$fid.'_'.$cid.'\'), this.value);" onblur="isDigit(this,\''.(is_numeric($c[4]) && $c[4]>0 ? (int)$c[4] : 1).'\', 0); radioClick($(\'class_http_num'.$fid.'_'.$cid.'\'), this.value);" />行<br />
<button type="button" name="class_http_num['.$fid.']['.$cid.']_"" onClick="radioClick(this, \'-2\');" class="button'.($c[4]==-2?' checked':'').'">按分页数(如分)</button><br />
<button type="button" name="class_http_num['.$fid.']['.$cid.']_"" onClick="radioClick(this, \'0\');" class="button'.($c[4]==0?' checked':'').'">展示所有</button>
  </span>
</span>

<span class="block_span" style="width:150px;">

  <input type="hidden" id="class_bj['.$fid.']['.$cid.']" name="class_bj['.$fid.']['.$cid.']" value="'.$c[2].'" />

  <button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, \'0\');" class="button'.(empty($c[2]) ? ' checked':'').'" style="width:22px;">无</button><br />'.$span1.'<button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 10);" class="button'.(isset($c[2]) && $c[2] == 10 ? ' checked':'').'"><span title="白" class="block_span qd10"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 1);" class="button'.(isset($c[2]) && $c[2] == 1 ? ' checked':'').'"><span class="block_span qd1"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 2);" class="button'.(isset($c[2]) && $c[2] == 2 ? ' checked':'').'"><span class="block_span qd2"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 3);" class="button'.(isset($c[2]) && $c[2] == 3 ? ' checked':'').'"><span class="block_span qd3"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 4);" class="button'.(isset($c[2]) && $c[2] == 4 ? ' checked':'').'"><span class="block_span qd4"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 5);" class="button'.(isset($c[2]) && $c[2] == 5 ? ' checked':'').'"><span class="block_span qd5"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 6);" class="button'.(isset($c[2]) && $c[2] == 6 ? ' checked':'').'"><span class="block_span qd6"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 7);" class="button'.(isset($c[2]) && $c[2] == 7 ? ' checked':'').'"><span class="block_span qd7"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 8);" class="button'.(isset($c[2]) && $c[2] == 8 ? ' checked':'').'"><span class="block_span qd8"></span></button><button type="button" name="class_bj['.$fid.']['.$cid.']_" onClick="radioClick(this, 9);" class="button'.(isset($c[2]) && $c[2] == 9 ? ' checked':'').'"><span class="block_span qd9"></span></button>'.$span2.'
</span>

<span class="block_span" style="width:100px;">

<input type="hidden" id="class_http_type['.$fid.']['.$cid.']" name="class_http_type['.$fid.']['.$cid.']" value="'.$c[3].'" />

  <button type="button" name="class_http_type['.$fid.']['.$cid.']_" onClick="radioClick(this, \'0\');" class="button'.(($c[3]!=1&&$c[3]!=2)? ' checked':'').'">站名排列</button><br />
  <button type="button" name="class_http_type['.$fid.']['.$cid.']_" onClick="radioClick(this, \'1\');" class="button'.($c[3]==1? ' checked':'').'">弹窗简介</button><br />
  <button type="button" name="class_http_type['.$fid.']['.$cid.']_" onClick="radioClick(this, 2);" class="button'.($c[3]==2? ' checked':'').'">流布局砌砖</button>
</span>
<a class="caozuo" href="javascript:void(0)" onclick="removeOption(this);return false;" title="删除">╳</a>
<a class="caozuo" href="javascript:void(0);" title="插入" onclick="insertClass(this,\''.$fid.'\');return false;">↖</a>
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="upClass(this,\''.$fid.'\');return false;">↑</a>
<a class="caozuo" href="javascript:void(0);" title="上移" onclick="downClass(this,\''.$fid.'\');return false;">↓</a>

<a class="caozuo" href="webmaster_central.php?get=http&column_id='.$fid.'&class_id='.$cid.'" title="管理此频道下的网址">&gt;</a>
         </div>';
    $opti .= '<option value="'.$fid.'_'.$cid.'">'.$c[0].'</option>';
  }
  $text[$fid] .= '
    </div>
    <div style="height:0px; overflow:hidden;clear:both;"></div>
    <button type="button" onclick="javascript:addClass(\''.$fid.'\');" style="clear:right">为此频道添加栏目</button>
    '.(/*is_numeric($fid)*/$fid !== 'homepage' ? '
    <button type="button" onclick="javascript:removeOption(this);">删除此频道</button>
    <button type="button" onclick="javascript:upColumn(this);" title="上移">↑</button>
    <button type="button" onclick="javascript:downColumn(this);" title="下移">↓</button>' : '').'
  </div>
';
  $opti .= '</optgroup>';
}

?>
<div class="note">操作须知：
  <ol>
      <li>网址分类数量及名称默认程序都已设置好，建议不要更改；如需更改，只更改名称即可。</li>
    <li>以下信息必须认真填写，尽量不要用特殊符号，如 \ : ; * ? ' &lt; &gt; | ，必免导致错误。</li>
    <?php
if (PHP_VERSION >= '5.3.9') {
  echo '
    <li>表单数量如果很大时，提交后发现保存不全（丢失），可能是PHP系统设置问题，请修改php.ini配置文件中max_input_vars（默认为1000），增大（比如2000）后，重启Apache，问题得到解决。</li>';
}
?>
      <li>
        <form id="mainform2" action="?post=area_c" method="post" onSubmit="return frTo()" style="display:inline;">
          批量转移分类网址：
          <select name="class_name_fr" id="class_name_fr" style="width:100px">
            <option value="">请选择</option>
            <?php echo $opti; ?>
          </select>
          &harr;
          <select name="class_name_to" id="class_name_to" style="width:100px">
            <option value="">请选择</option>
            <?php echo $opti; ?>
          </select>
          <input type="checkbox" class="checkbox" name="type" value="1" checked="checked" />
          互换转移
          <button type="submit">提交</button>
        </form>
      </li>
  </ol>
</div>
<style>
.align_m { margin-bottom:10px; background-color: #C9C9B1; }
.align_m th { color:#FFFFFF; }
.align_m td { background-color:#FEFBEC; font-size:12px; line-height:normal; }
.lik { width:440px; line-height:normal; }
.lik_ { height:42px; overflow:hidden; }
.lis { display:inline-block; *display:inline; *zoom:1; padding:0 2px; margin:2px 4px; border:1px blue dotted; /*14  440-2*2*n-4*2*n-1*2*n-4*(n-1)   =336(6)*/ font-size:12px; background-color:#FFFFFF; color:blue; }
.mingz_NULL_LEFT     { text-align:left; }
.mingz_NULL_CENTER   { text-align:center; }
.mingz_NULL_JUSTIFY  { text-align:justify; text-justify:inter-ideograph; /*text-align-last:justify;*/}
.mingz_NULL_RIGHT    { text-align:right;}
.mingz_NULL_LEFT .lis,
.mingz_NULL_CENTER .lis,
.mingz_NULL_JUSTIFY .lis,
.mingz_NULL_RIGHT .lis { *width:28px; *letter-spacing:normal; text-align:center; }
.mingz_4_LEFT, .mingz_5_LEFT, .mingz_6_LEFT, .mingz_7_LEFT, .mingz_8_LEFT,
.mingz_4_CENTER, .mingz_5_CENTER, .mingz_6_CENTER, .mingz_7_CENTER, .mingz_8_CENTER,
.mingz_4_JUSTIFY, .mingz_5_JUSTIFY, .mingz_6_JUSTIFY, .mingz_7_JUSTIFY, .mingz_8_JUSTIFY,
.mingz_4_RIGHT, .mingz_5_RIGHT, .mingz_6_RIGHT, .mingz_7_RIGHT, .mingz_8_RIGHT { text-align:justify; text-justify:inter-ideograph; /*text-align-last:justify;*/}
.mingz_4_LEFT .lis, .mingz_5_LEFT .lis, .mingz_6_LEFT .lis, .mingz_7_LEFT .lis, .mingz_8_LEFT .lis { text-align:left; }
.mingz_4_CENTER .lis, .mingz_5_CENTER .lis, .mingz_6_CENTER .lis, .mingz_7_CENTER .lis, .mingz_8_CENTER .lis { text-align:center; }
.mingz_4_JUSTIFY .lis, .mingz_5_JUSTIFY .lis, .mingz_6_JUSTIFY .lis, .mingz_7_JUSTIFY .lis, .mingz_8_JUSTIFY .lis { text-align:justify; text-justify:inter-ideograph; letter-spacing:normal; }
.mingz_4_RIGHT .lis, .mingz_5_RIGHT .lis, .mingz_6_RIGHT .lis, .mingz_7_RIGHT .lis, .mingz_8_RIGHT .lis { text-align:right; }
.mingz_4_LEFT .lis, .mingz_4_CENTER .lis, .mingz_4_JUSTIFY .lis, .mingz_4_RIGHT .lis { width:93px; }
.mingz_5_LEFT .lis, .mingz_5_CENTER .lis, .mingz_5_JUSTIFY .lis, .mingz_5_RIGHT .lis { width:70px; }
.mingz_6_LEFT .lis, .mingz_6_CENTER .lis, .mingz_6_JUSTIFY .lis, .mingz_6_RIGHT .lis { width:56px; }
.mingz_7_LEFT .lis, .mingz_7_CENTER .lis, .mingz_7_JUSTIFY .lis, .mingz_7_RIGHT .lis { width:45px; }
.mingz_8_LEFT .lis, .mingz_8_CENTER .lis, .mingz_8_JUSTIFY .lis, .mingz_8_RIGHT .lis { width:37.5px; }

.kuz_NULL_LEFT     { text-align:left; }
.kuz_NULL_CENTER   { text-align:center; }
.kuz_NULL_JUSTIFY  { text-align:justify; text-justify:inter-ideograph; /*text-align-last:justify;*/}
.kuz_NULL_RIGHT    { text-align:right;}
.kuz_NULL_LEFT .lis,
.kuz_NULL_CENTER .lis,
.kuz_NULL_JUSTIFY .lis,
.kuz_NULL_RIGHT .lis { *width:28px; *letter-spacing:normal; text-align:center; }
.kuz_4_LEFT, .kuz_5_LEFT, .kuz_6_LEFT, .kuz_7_LEFT, .kuz_8_LEFT,
.kuz_4_CENTER, .kuz_5_CENTER, .kuz_6_CENTER, .kuz_7_CENTER, .kuz_8_CENTER,
.kuz_4_JUSTIFY, .kuz_5_JUSTIFY, .kuz_6_JUSTIFY, .kuz_7_JUSTIFY, .kuz_8_JUSTIFY,
.kuz_4_RIGHT, .kuz_5_RIGHT, .kuz_6_RIGHT, .kuz_7_RIGHT, .kuz_8_RIGHT { text-align:justify; text-justify:inter-ideograph; /*text-align-last:justify;*/}
.kuz_4_LEFT .lis, .kuz_5_LEFT .lis, .kuz_6_LEFT .lis, .kuz_7_LEFT .lis, .kuz_8_LEFT .lis { text-align:left; }
.kuz_4_CENTER .lis, .kuz_5_CENTER .lis, .kuz_6_CENTER .lis, .kuz_7_CENTER .lis, .kuz_8_CENTER .lis { text-align:center; }
.kuz_4_JUSTIFY .lis, .kuz_5_JUSTIFY .lis, .kuz_6_JUSTIFY .lis, .kuz_7_JUSTIFY .lis, .kuz_8_JUSTIFY .lis { text-align:justify; text-justify:inter-ideograph; letter-spacing:normal; }
.kuz_4_RIGHT .lis, .kuz_5_RIGHT .lis, .kuz_6_RIGHT .lis, .kuz_7_RIGHT .lis, .kuz_8_RIGHT .lis { text-align:right; }
.kuz_4_LEFT .lis, .kuz_4_CENTER .lis, .kuz_4_JUSTIFY .lis, .kuz_4_RIGHT .lis { width:71px; }
.kuz_5_LEFT .lis, .kuz_5_CENTER .lis, .kuz_5_JUSTIFY .lis, .kuz_5_RIGHT .lis { width:53px; }
.kuz_6_LEFT .lis, .kuz_6_CENTER .lis, .kuz_6_JUSTIFY .lis, .kuz_6_RIGHT .lis { width:41px; }
.kuz_7_LEFT .lis, .kuz_7_CENTER .lis, .kuz_7_JUSTIFY .lis, .kuz_7_RIGHT .lis { width:33px; }
.kuz_8_LEFT .lis, .kuz_8_CENTER .lis, .kuz_8_JUSTIFY .lis, .kuz_8_RIGHT .lis { width:26px; }

button.button { border:1px #C9C9B1 solid; background-color:#FEFBEC; padding:0; font-weight:normal; color:#363636; height:auto; line-height:normal; }
button.checked { border:1px #993300 solid; }
.butoonbj button { width:12px; height:18px; overflow:hidden; }
.butoonbj button span { width:18px; height:18px; margin:-3px; overflow:hidden; }
.add_border { border:1px #993300 solid; }
</style>
<script>
function example(m) {
  var classN = m;
  classN += '_';
  var n0 = $(m+'_align_0');
  if (n0.value == 'NULL') {
    classN += 'NULL';
  } else {
    if (/^[4-8]$/.test($(m+'_align_00').value)) {
      classN += $(m+'_align_00').value;
    } else {
      classN += 'NULL';
    }
  }
  classN += '_';
  var n1 = $(m+'_align_1');
  if (/^(LEFT|CENTER|JUSTIFY|RIGHT)$/.test(n1.value)) {
    classN += n1.value;
  } else {
    classN += 'LEFT';
  }
  $('example_'+m+'').className = classN;
}

</script>
<script>
function radioClick(o, v) {
  var input_arr = document.getElementsByName(o.name);
  if (input_arr != null && input_arr.length > 0) {
    for (var i = 0; i < input_arr.length; i++) {
      if (input_arr[i] != o && input_arr[i].className == 'button checked') {
        input_arr[i].className = 'button';
      }
    }
  }
  o.className = 'button checked';
  $(o.name.replace(/\_$/, '')).value = v;
}
</script>

<form id="mainform" action="?post=area" method="post" onSubmit="if($('subt').checked==true){this.target='_blank';}else{this.target='_self';}">
  <div class="area_">
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="align_m">
      <tr>
        <th colspan="3">首页版面「名站」布局方式：</th>
      </tr>
      <tr>
        <td style="text-align:center; color:#999999;">排列方式</td>
        <td style="text-align:center; color:#999999;">对齐方式</td>
        <td style="text-align:center; color:#999999;">示例</td>
      </tr>
      <tr>
        <?php
$mingz_1_start = is_numeric($web['mingz_align'][0]) && $web['mingz_align'][0]>=4 && $web['mingz_align'][0]<=8 ? $web['mingz_align'][0] : 6;
?>
        <td style="text-align:center;"><input type="hidden" id="mingz_align_0" name="mingz_align_0" value="<?php echo $web['mingz_align'][0]; ?>" />
            <input type="hidden" id="mingz_align_1" name="mingz_align_1" value="<?php echo $web['mingz_align'][1]; ?>" />
            <button type="button" name="mingz_align_0_" onClick="radioClick(this, 'NULL'); example('mingz'); $('mingz_align_00').className=''" class="button<?php echo empty($web['mingz_align'][0]) ? ' checked' : ''; ?>">自然排列</button>
          <button type="button" name="mingz_align_0_" id="mingz_align_0_" onClick="radioClick(this, $('mingz_align_00').value); example('mingz'); $('mingz_align_00').className='add_border';" class="button<?php echo is_numeric($web['mingz_align'][0]) && $web['mingz_align'][0]>=4 && $web['mingz_align'][0]<=8 ? ' checked' : ''; ?>">定宽排列</button>
          <input type="text" id="mingz_align_00" style="width:20px; height:20px; padding:0;" title="限填4、5、6、7、8" onMouseOver="sSD(this,event);" onFocus="this.className='add_border'; radioClick($('mingz_align_0_'), this.value); example('mingz');" onBlur="this.className=''; isDigit4_8(this,'<?php echo $mingz_1_start; ?>'); radioClick($('mingz_align_0_'), this.value); example('mingz');" value="<?php echo $mingz_1_start; ?>" />
          列</td>
        <td style="text-align:center;"><button type="button" name="mingz_align_1_" onClick="radioClick(this, 'LEFT'); example('mingz');" class="button<?php echo $web['mingz_align'][1]=='LEFT' ? ' checked' : ''; ?>"><?php echo $tool_align['left']; ?></button>
            <button type="button" name="mingz_align_1_" onClick="radioClick(this, 'CENTER'); example('mingz');" class="button<?php echo $web['mingz_align'][1]=='CENTER' ? ' checked' : ''; ?>"><?php echo $tool_align['center']; ?></button>
          <button type="button" name="mingz_align_1_" onClick="radioClick(this, 'JUSTIFY'); example('mingz');" class="button<?php echo $web['mingz_align'][1]=='JUSTIFY' ? ' checked' : ''; ?>"><?php echo $tool_align['justify']; ?></button>
          <button type="button" name="mingz_align_1_" onClick="radioClick(this, 'RIGHT'); example('mingz');" class="button<?php echo $web['mingz_align'][1]=='RIGHT' ? ' checked' : ''; ?>"><?php echo $tool_align['right']; ?></button></td>
        <?php
$z_class = 'mingz_';
$z_class .= is_numeric($web['mingz_align'][0]) && $web['mingz_align'][0]>=4 && $web['mingz_align'][0]<=8 ? $web['mingz_align'][0] : 'NULL';
$z_class .= '_';
$z_class .= $web['mingz_align'][1];
?>
        <td class="lik"><div class="lik_">
          <div id="example_mingz" class="<?php echo $z_class; unset($z_class); ?>">
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="br_line_100"></span> </div>
        </div></td>
      </tr>
    </table>
    <div id="areahomepage"> <?php echo $text['homepage'] ? $text['homepage'] : '<button type="button" onclick="addColumn(\'homepage\');this.style.display=\'none\';"  class="send2 send3"><b>添加频道[首页功能]</b></button>'; ?> </div>
  </div>
  <div class="area_">
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="align_m">
      <tr>
        <th colspan="3">分类区域「酷站」布局方式：</th>
      </tr>
      <tr>
        <td style="text-align:center; color:#999999;">排列方式</td>
        <td style="text-align:center; color:#999999;">对齐方式</td>
        <td style="text-align:center; color:#999999;">示例</td>
      </tr>
      <tr>
        <?php
$kuz_1_start = is_numeric($web['kuz_align'][0]) && $web['kuz_align'][0]>=4 && $web['kuz_align'][0]<=8 ? $web['kuz_align'][0] : 6;
?>
        <td style="text-align:center;"><input type="hidden" id="kuz_align_0" name="kuz_align_0" value="<?php echo $web['kuz_align'][0]; ?>" />
            <input type="hidden" id="kuz_align_1" name="kuz_align_1" value="<?php echo $web['kuz_align'][1]; ?>" />
            <button type="button" name="kuz_align_0_" onClick="radioClick(this, 'NULL'); example('kuz'); $('kuz_align_00').className='';" class="button<?php echo empty($web['kuz_align'][0]) ? ' checked' : ''; ?>">自然排列</button>
          <button type="button" name="kuz_align_0_" id="kuz_align_0_" onClick="radioClick(this, $('kuz_align_00').value); example('kuz'); $('kuz_align_00').className='add_border';" class="button<?php echo is_numeric($web['kuz_align'][0]) && $web['kuz_align'][0]>=4 && $web['kuz_align'][0]<=8 ? ' checked' : ''; ?>">定宽排列</button>
          <input type="text" id="kuz_align_00" style="width:20px; height:20px; padding:0;" title="限填4、5、6、7、8" onMouseOver="sSD(this,event);" onFocus="this.className='add_border'; radioClick($('kuz_align_0_'), this.value); example('kuz');" onBlur="this.className=''; isDigit4_8(this,'<?php echo $kuz_1_start; ?>'); radioClick($('kuz_align_0_'), this.value); example('kuz');" value="<?php echo $kuz_1_start; ?>" />
          列</td>
        <td style="text-align:center;"><button type="button" name="kuz_align_1_" onClick="radioClick(this, 'LEFT'); example('kuz');" class="button<?php echo $web['kuz_align'][1]=='LEFT' ? ' checked' : ''; ?>"><?php echo $tool_align['left']; ?></button>
            <button type="button" name="kuz_align_1_" onClick="radioClick(this, 'CENTER'); example('kuz');" class="button<?php echo $web['kuz_align'][1]=='CENTER' ? ' checked' : ''; ?>"><?php echo $tool_align['center']; ?></button>
          <button type="button" name="kuz_align_1_" onClick="radioClick(this, 'JUSTIFY'); example('kuz');" class="button<?php echo $web['kuz_align'][1]=='JUSTIFY' ? ' checked' : ''; ?>"><?php echo $tool_align['justify']; ?></button>
          <button type="button" name="kuz_align_1_" onClick="radioClick(this, 'RIGHT'); example('kuz');" class="button<?php echo $web['kuz_align'][1]=='RIGHT' ? ' checked' : ''; ?>"><?php echo $tool_align['right']; ?></button></td>
        <?php
$z_class = 'kuz_';
$z_class .= is_numeric($web['kuz_align'][0]) && $web['kuz_align'][0]>=4 && $web['kuz_align'][0]<=8 ? $web['kuz_align'][0] : 'NULL';
$z_class .= '_';
$z_class .= $web['kuz_align'][1];
?>
        <td class="lik"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td style="width:40px; text-align:left;"><span class="lis">音乐</span></td>
            <td><div class="lik_">
              <div id="example_kuz" class="<?php echo $z_class; unset($z_class); ?>">
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="lis">网址<span class="br_line_100"></span></span>
<span class="br_line_100"></span> </div>
            </div></td>
            <td style="width:45px; text-align:right;"><span class="lis">更多&raquo;</span></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <div id="area">
      <?php
unset($text['homepage']);
echo count($text) > 0 ? @implode('', $text) : '<div style="color:#FF6600">您还未设置频道！请先添加频道</div>';
unset($web, $text);
?>
    </div>
    <br />
    <button type="button" onClick="addColumn('');" class="send3">添加频道</button>
    <a href="webmaster_central.php?get=http">管理频道、栏目及分类下的网址请点此&gt;&gt;</a> </div>
  <div class="red_err">特别提示：提交前请确定set目录具备写权限，因为要将配置结果写入writable/set/set_area.php文件，否则虽提示成功，但实际仍配置失败。</div>
  <button type="submit" onClick="javascript:return confirm('确定提交吗？！');" class="send2">提交设置</button>
  <input type="checkbox" class="checkbox" id="subt" checked="checked" />
  在弹出的新页面提交，避免检查出填写错误而导致数据丧失，白写了</br />
  如果发现没有被改动，那十有八九是缓存在作怪，请刷新页面或清除浏览器缓存再观察
</form>
