<?php

$ruid = $_GET['ruid'];


?>

<!doctype html public "-//w3c//dtd html 3.2//ja">
<html>
<head>
<title>pgctn main menu</title>
<meta http-equiv=content-type content="text/html; charset=x-euc-jp">
<script LANGUAGE="JavaScript" Type="text/javascript">
<!--

var hWin='';
function op(adrs){
　va=encodeURIComponent(document.smp.txt.value);
　va=adrs + va;
　searchwin = window.open(va,"smp","width=700,height=700,resizable=yes,dependent=yes,scrollbars=yes,location=yes");
  if ((!searchwin) || (hWin == searchwin))
	{
		alert("no window");
		return;
	}
}


function op2(adrs){
　va=encodeURIComponent(document.smp2.txt.value);
　va=adrs + va;
　searchwin = window.open(va,"smp2","width=700,height=700,resizable=yes,dependent=yes,scrollbars=yes,location=yes");
  if ((!searchwin) || (hWin == searchwin))
	{
		alert("no window");
		return;
	}
}

function geturl(){
	
	var url = searchwin.location.href
	alert(url);
}
//onload=javascript:window.resizeTo(800,800); 
//-->
</script>
<body BACKGROUND="./img/yellow.jpg" >

add linker


<form name="smp" action="" onSubmit="return false;">
<img width=100 src="http://goldminer.arrs.org/image/goldminer.gif" 
border="0" alt="goldminer" align="absmiddle">
　<input Type="text" name="txt" size="31" value="">
　<input type="submit" value="goldminer" onClick="op('http://goldminer.arrs.org/search.php?query=');">
</form>


<form name="smp2" action="" onSubmit="return false;">
<img width=100 src="http://scholar.google.co.jp/intl/ja/images/scholar_logo.gif" 
border="0" alt="Google" align="absmiddle">
　<input Type="text" name="txt" size="31" value="">
　<input type="submit" value="google scholar" onClick="op2('http://scholar.google.com/scholar?q=');">
</form>

 
 
add linker to web zone <br>
<form method=get action="add_linker_do.php">
<table>
<tr><td>
url
</td><td>
<input type=text name=url size=31 value="">
</td></tr>
<tr><td>
discription
</td><td>
<input type=text name=discription size=31  value="">
</td></tr>
<tr><td>
comment
</td><td>
<input type=text name=comment size=31 value="">
</td></tr>
<tr><td>
engine
</td><td>
<select name="engine">
<option value="goldminer">goldminer
<option value="Google Scholar">Google Scholar
</select>

</td></tr>
</table>
<input type=hidden name=ruid value=<?php echo $ruid?>>
<input type=submit name=btnG value="add link" >
</form>

<br>
<form method=get action="add_linker_show.php">
<input type=hidden name=ruid value=<?php echo $ruid?>>
<input type=submit name=btnG value="show link only" >

<hr>

<?php

@$ruid = $_GET['ruid'];

  include "init.inc";
  include "param_setting.ini";
  include "sql_generator.ini";
  include "file_mod.inc";
  $include_path=".";
  require("$include_path/dbconnect.ini");


//DB query

$db_handle = db_contact_start($db_type,$target_host,$target_db);

//patient query


  $sql="select discription,url,engine,comment from link_level where ruid = '$ruid'";
  
  $rtn_select = $db_handle->prepare($sql);
  $rtn_select->execute();

while ($rtn_select_row = $rtn_select->fetch(PDO::FETCH_ASSOC)) {
	$discription = $rtn_select_row['discription'] ;
	$url = $rtn_select_row['url'] ;
	$engine = $rtn_select_row['engine'] ;
	$comment = $rtn_select_row['comment'] ;

print("url:<a class=\"previewlink\"  href=\"$url\" target=_blank>$url</a><br>");
print("discription: $discription<br>");
print("comment :$comment<br>");
print("engine: $engine<br>");
print("<form method=get action=\"add_linker_del.php\">");
print("<input type=hidden name=ruid value=$ruid>");
print("<input type=hidden name=discription value=$discription>");
print("<input type=hidden name=url value=$url>");
print("<input type=hidden name=engine value=$engine>");
print("<input type=hidden name=comment value=$comment>");
print("<input type=submit name=btnG value=\"delete link\" >");
print("<br>");

}

?>

</body>
</html>