<?php
!defined('ADMIN')&&die("<meta http-equiv='refresh' content=0;url='/'>");
FN("title","标签管理");
global $z,$i,$title;
if(ADMIN<15)Js_to("没有权限！",URL._1.D.L.D);
_F("top");
$id=N;
if(_3){
	$id=_3;
	if(!$r=GL($z->R("tag","id=$id"),4))Js_to();
}?>
<tt id="tw"></tt>
<fieldset class="form">
<script type="text/javascript" src="system/js/py.js"></script>
<legend><h1><b><var><img src="system/img/left.gif" /></var><dfn><img src="system/img/right.gif" /></dfn></b>　<a href="<?php echo URL._1.D._2.D?>"><?php echo $title?></a></h1></legend>
<ul><tt></tt></ul>
<div class="fieldset sp"><big><samp<?php if($id===N)echo ' class="del"'?>>&#9682;</samp><span<?php if($id!=N)echo ' class="del"'?>>&#9681;</span><?php echo $id>0?"编辑":"新增"?>标签:<del></del></big>
<div class="hd">
<?php
if($id===N)echo '<script type="text/javascript">$(document).ready(function(){$(".hd").hide();})</script>';
?>
<form action="" method="post" id="form" name="form">
<tt></tt>
<ul>
<dt>名称:</dt>
<dd><li><input type="text" name="name" id="name" value="<?php echo $id?$r['name']:'';?>"> <?php if(!_3)echo '<i class="red">必填</i>，如果不懂SEO，其它都可以忽略，系统会自动补全';?></li></dd>
<tt></tt></ul>
<ul class="gjc">
<dt>关键词:</dt>
<dd><li><input type="text" id="keywords" name="keywords" value="<?php echo $id?$r['keywords']:'';?>"> 多个词用空格或逗号分开，勿太多</li></dd>
<tt></tt></ul>
<ul class="<?php echo !$id||$r['gx']!=3?'hide':'';?> gjn">
<dt>SQL语句:</dt>
<dd><li><input type="text" id="sq" name="sq" value="<?php echo $id?$r['sq']:'';?>" class="w8"><br>SQL语句示例： <i class="red">( `title` LIKE '%aaa%' OR `title` LIKE '%bbb%' )  AND `title` NOT LIKE '%ccc%'</i>　<a href="http://www.02408.com/p-biaoqian-LIKE-yujumohuchaxunxiefa.html" target="_blank"> <img src="system/img/hlp_1.png"> 更多模糊搜索写法</a></li></dd>
<tt></tt></ul>
<input type="hidden" id="gjn" value="<?php echo $id?$r['gx']:'';?>">
<script type="text/javascript">
$(document).ready(function(){
	$("#dcgx").click(function(){
		var gx=$('#dcgx input:radio:checked').val();
		$('#gjn').val(gx);
		if(gx==3){
			$('.gjc').hide(222);
			$('.gjn').show(333);
			
		}
		else{
			$('.gjn').hide(222);
			$('.gjc').show(333);
		}
	});
})
</script>
<ul>
<dt>多词关系:</dt>
<dd><p id="dcgx"><label><input type="radio" value="1" <?php echo $id&&$r['gx']==1?'checked':'';?> name="gx">1.并且包含</label>　<label><input type="radio" name="gx" value="2" <?php echo !$id||$r['gx']==2?'checked':'';?>>2.或者包含</label>　<label><input type="radio" name="gx" value="3" <?php echo $id&&$r['gx']==3?'checked':'';?>>3.自定义</label> <a href="http://www.02408.com/p-biaoqian-LIKE-yujumohuchaxunxiefa.html" target="_blank"> <img src="system/img/hlp_1.png"></a></p></dd>
<tt></tt></ul>
<ul>
<dt>排序:</dt>
<dd><li><input type="text" name="paixu" value="<?php echo $id?$r['paixu']:'0';?>"> 大数优先，负数排后</li></dd>
<tt></tt></ul>
<ul><dt>URL:</dt>
<dd><li><input type="text" id="nurl" name="url" value="<?php echo $id?$r['url']:'';?>" class="w5"> 可为空，可填写绝对网址</li></dd>
<tt></tt></ul>
<ul>
<dt>标题:</dt>
<dd><li><input type="text" id="title" name="title" value="<?php echo $id?$r['title']:'';?>" class="w8"></li></dd>
<tt></tt></ul>
<ul>
<dt>说明:</dt>
<dd><li><textarea rows="3" name="description" class="w8"><?php echo $id?$r['description']:'';?></textarea></li></dd>
<tt></tt></ul>
<textarea id="con" name="center" class="del"><?php echo $id?$r['center']:'';?></textarea>
<ul>
<dt>精准广告:</dt>
<dd><li><textarea rows="3" name="ad" class="w8"><?php echo $id?$r['ad']:'';?></textarea></li></dd>
<tt></tt></ul>
<?php
if(!_3)echo '<input type="hidden" name="html" value="'.T().'" />';
?><input name="cgi" type="hidden" value="tag" />
</form>
<ul>
<link href="system/css/edit.css" rel="stylesheet" type="text/css">
<textarea id="gy" class="del"><?php echo $id?$r['center']:'<p></p>';?></textarea>
<dt>自由区域:</dt>
<div class="edit">
<script type="text/javascript">
var contT = My("gy").value;
<?php if(ADMIN<5){?>
var eN=1;
<?php }?>
var i_ml='<?php echo ML?>';
document.write('<'+'sc'+'ript language="javascript" src="system/js/edit.js" type="text/javascript"></'+'sc'+'ript>');
</script>
</div>
<tt></tt>
</ul>
<ul><tt></tt></ul>
<ul>
<big><input type="button" onclick="ps()" value="保 存 设 置"/></big>
</ul>
</div>
<ul><tt></tt></ul>
</div>
<tt></tt>
<ul><tt></tt></ul>
<div class="fieldset"><big><samp<?php if($id!=N)echo ' class="del"'?>>&#9682;</samp><span<?php if($id===N)echo ' class="del"'?>>&#9681;</span>（标签管理）:</big>
<tt></tt>
<div<?php if($id!=N)echo ' class="del"'?>>
<?php
eval(tag(25));//括号里是每页条数
echo $tag;
?>
<dir><?php echo $dir.' <span>（共'.$s.'条）</span>'?></dir>
<ul><tt></tt></ul>
</div></div>
<ul><tt></tt></ul>
</fieldset>
<?php
_F("end");