<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>关键字管理</title>
<script language="javascript">
//获得选中文件的文件名
function SelKw(kw)
{
  document.form2.keywords.value += " "+kw;
}
function ReturnValue()
{
	window.opener.document.<?php echo $f?>.value += document.form2.keywords.value;
	window.opener=true;
  window.close();
}
function showHide(objname)
{
   var obj = document.getElementById(objname);
   if(obj.style.display=="none") obj.style.display = "block";
   else obj.style.display="none";
}
function AddNewKw()
{
   showHide("addnew");
}
</script>
<link href="base.css" rel="stylesheet" type="text/css">
</head>
<body background='img/allbg.gif' leftmargin='1' topmargin='1'>
<div class="main"> 
  <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#333333">
   <form name='form1' action="article_keywords_add.php">
    <tr id="addnew" style="display:none"> 
        <td width="100%" height="24" colspan="2" align="center" bgcolor="#009900"> 
          <table border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td width="60" align="center">关键字：</td>
              <td width="140"><input name="keyword" type="text" id="keyword" style="width:130"></td>
              <td width="40">链接：</td>
              <td width="140"><input name="rpurl" type="text" id="rpurl" style="width:130"></td>
              <td width="40">频率：</td>
              <td width="50"><input name="rank" type="text" id="rank" style="width:30" value="30"></td>
              <td width="80"><input type="submit" name="Submit" value="保存" class="np"></td>
            </tr>
          </table>
		</td>
     </tr>
	 </form>
	<form name='form2'>
      <tr> 
        <td width="100%" height="26" colspan="2" background="img/tbg.gif">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="31%"><strong>选择关键字</strong></td>
              <td width="69%" align="right">
                <input type="button" name="kwa" value="新增关键字" onClick="AddNewKw()" class='nbt'>
                <input type="button" name="kwm" value="关键字管理" onClick="location='article_keywords_main.php';" class='nbt'>
                </td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td bgcolor="#FFFFFF" style="line-height:180%">
        	<?php 
          $mylist = $dlist->GetDataList();
          while($row = $mylist->GetArray('dm'))
           {
          ?>
        	 <a href='javascript:SelKw("<?php echo $row['keyword']?>")'><u><?php echo $row['keyword']?></u></a> 
          <?php 
            }
          ?>
          </td>
      </tr>
      <tr> 
        <td height="24" bgcolor="#E4FAC7" style="line-height:180%">
        <table border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td width="120">已选的关键字：</td>
              <td width="320"><input name="keywords" type="text" id="keywords" style="width:300" value="<?php echo $keywords?>"></td>
              <td width="93"><input type="button" name="Submit" value="选用" onClick="ReturnValue()" class='nbt'></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr align="center"> 
        <td height="24" bgcolor="#F8FBF0">
         <?php echo $dlist->GetPageList(5);?>
         </td>
      </tr>
    </form>
  </table>
  <div class="tbbottom" style="text-align:right;width:99%" align="left"></div>
</div>
</body>
</html>