Location: PHPKode > projects > MyPHPBib > bib_browse.php
<?php

require_once ('login/user.inc.php');
include ('phpbib/phpbib.inc.php');

?>

<?php include ('header.inc.php'); ?>

<body>

<?php include ('top.inc.php'); ?>

<?php

if ( ereg ( "MSIE" , $_SERVER['HTTP_USER_AGENT'] ))
{
	echo "<script language=\"JavaScript\">\n";
}
else
{
	echo "<script language=\"JavaScript\" type=\"application/x-javascript\">\n";
}
?>

function viewRef(selObj)
{
	var id = selObj.options[selObj.selectedIndex].value;
	document.location='bib_display_reference.php?id=' + id + 
'&amp;format=report';
}
</script>

<div id="content">

<?php
$r = new ReferenceManager();
$letter_count = array();
$letter_count = $r->CountLetters();

echo "<p>Browse by initial letter of first author: ";
foreach($letter_count as $letter=>$count)
{
	if ($count > 0)
	{
		echo "<a href=\"bib_browse.php?letter=$letter\">$letter</a>", "&nbsp;&nbsp;";
	}
}
echo "</p>\n";

if (isset($_GET['letter']))
{
	echo "<p>Double click on a reference to view details</p>\n";
	
	$reference_ids = array();
	$reference_ids = $r->GetReferencesForLetter($_GET['letter']);
	
?>
	<form name="form1" method="post" action="">
	<select id="browse" name = "browse" size="20" 
ondblclick="viewRef(this)">
	
<?php
	$count = 0;
	foreach($reference_ids as $key=>$value)
	{
		//echo $value, "<br/>";
		$ref = new Reference();
		
		$row = $ref->GetHeadline ($value);
		if ($row != "")
		{
			echo "   <option value=\"$value\"";
			if ($count == 0)
			{
				echo " selected=\"selected\"";
			}
			$count++;
			echo ">";
			echo $row;
			echo "</option>\n";
		}
	}

?>

</select>
</form>

<?php
	
}






?>


</div> 
<?php include ('footer.inc.php'); ?>


</body>
</html>
Return current item: MyPHPBib