<?
include_once('hdr_general.php');
/* **************************************************************************************************** */
if (!isset($_REQUEST["module"])) $_REQUEST["module"] = "general";
if (!isset($_REQUEST["task"])) $_REQUEST["task"] = "main";
$pubmodule = $_REQUEST["module"];
$pubtask = $_REQUEST["task"];
$pubitemid = $_REQUEST["itemid"];
/* **************************************************************************************************** */
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/general.css" type="text/css" media=all>
<title>CS-SECURE : Select Special Purpose Index</title>

<script type="text/javascript">
function updateSelect(keywords) {
  opener.document.frm_search.crawlkeywords.value = keywords.replace(/~/g,'"');
  self.close();
  //return false;
}

function cancelSelect() {
  self.close();
}
</script>

</head>
<body leftmargin=5 topmargin=5 style="background: #dddddd;">
<table border=0 cellspacing=0 cellpadding=0 width=460>

<tr valign=top>
<td valign=top width=100%>

  <table border=1 cellspacing=1 cellpadding=2 width=460>
  <tr valign=top>
  <td valign=top width=120 class=listheader>Name</td>
  <td valign=top width=315 class=listheader>Keywords</td>
  <td valign=top width=25 class=listheader>&nbsp;</td>
  </tr>
  <?
  $myquery="Select * from special_index order by indexname";
  $myresult =& $db->query($myquery);
  $mycount=$myresult->numRows();
  if ($mycount!=0) {
    while($myrow=$myresult->fetchRow()) {
      $mykeywords=stripslashes($myrow['indexkeywords']);
      $myrawkeywords=$myrow['indexkeywords'];
      $mytempkeywords=str_replace("'","~",$mykeywords);
      $mytempkeywords=str_replace('"','~',$mytempkeywords);
      ?>
      <tr valign=top>
      <td valign=top width=120 class=listcontent><?=$myrow['indexname'];?></td>
      <td valign=top width=315 class=listcontent><?=substr($mykeywords,0,40)."..";?></td>
      <td valign=top width=25 class=listcontent><button name="select" id="select" onClick="updateSelect('<?=$mytempkeywords;?>');">&nbsp;›&nbsp;</button></td>
      </tr>
      <?
    }
  }
  ?>
  <tr valign=top>
  <td valign=top width=460 colspan=3 class=listcontent>
  <button name="cancel" onClick="cancelSelect();">Cancel</button>
  </td>
  </tr>
  </table>

</td>
</tr>
</table>

</body>
</html>